Compare commits

...

3811 Commits

Author SHA1 Message Date
Cory LaViska
d110fb4cf0 Merge branch 'next' into docs-fix 2025-06-06 08:13:29 -04:00
Cory LaViska
9a49a76cce update jsdoc 2025-06-06 08:13:17 -04:00
Cory LaViska
c162983ca2 add hover queries (#1035) 2025-06-05 22:03:51 +00:00
Cory LaViska
0d09037916 Zoomable frame (#1029)
* add zoomable frame component; #986

* remove viewport demo component

* update changelog

* fix code demos

* update zoomable iframes with theme changes
2025-06-05 17:34:25 -04:00
Cory LaViska
d2e32a0a53 Support icon buttons directly in <wa-button> (#1030)
* support icon buttons directly in <wa-button>

* [progress] replace `<wa-icon-button>` instances

* change close buttons to `<wa-button>`

* fix formatting

* change scroll buttons to `<wa-button>`

* update tests

* change tag remove button to `<wa-button>`

* fix tag tests

* remove nonexistent parts from tab docs

* change viewport demo controls to `<wa-button>`

* fix leftover icon button dependencies

* fix icon button usage in palettes and themes

* revert mistakenly committed change to theme preview heights

* fix icon button styles in old themer

* replace icon buttons in style utility examples

* fix import

* handle press on button, not icon-button, in select

* fix stray icon button references in docs

* fix broken home page button

* remove icon button overrides from Matter theme

* add generated directories so they're excluded from search results

* add dire

* remove icon-button component

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-06-05 15:16:03 -04:00
Cory LaViska
71d45eabbd Add data- invokers to dialog and drawer (#1032)
* add data- invokers to dialog and drawer

* rename var
2025-06-05 14:47:29 -04:00
Konnor Rogers
eac60a9022 Fixes for app and prettier (#1028)
* fix for app

* prettier

* fix for app

* prettier

* update prettierignore

* prettier

* prettier

* fix prism vendoring
2025-06-04 10:28:38 -04:00
Cory LaViska
f8dca5d1a8 refactor styles and simplify custom states (#1016) 2025-06-04 08:09:14 -04:00
Lindsay M
5980b5f843 Refactor form control sizing (#1005)
* visual test setup

* fix improper class placement in visual tests

* add `wa-form-control-*-font-size` and `-wa-form-control-hint-*` custom properties

* use new custom properties

* dump of component sizing improvements

* fix native color picker styles

* update menu with relative sizes

* tidy up menu, select, and tag sizing

* use relative sizing across components

* touch up custom properties

* update docs and comments

* update changelog

* revert changes to visual tests to simplify PR

* revert leftover change to visual tests

* tidy up space doc markdown

* fix default card spacing

* fix card docs

* wrap up new `--tag-max-size` for `<wa-select>`

* change default `--tag-max-size`

* prettier

* touch up

* clean up leftovers

* fix native form control margins

* set default toggle size relative to font size

* correct toggle size in docs

* Konnorrogers/lm form control sizing (#1025)

* try a second updateComplete??

* try a second updateComplete??

* more timeouts?

* try logging

* more logging
gp

* maybe now

* radio group test

* add todo note'

* add workflow dispatch for client tests

---------

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2025-06-03 16:27:24 -04:00
Cory LaViska
9a3ffb04ba remove unused custom props; align styles with wa-slider (#1017) 2025-06-03 15:51:49 -04:00
Cory LaViska
04d37224e0 remove hint from <wa-radio>; fixes #1024 (#1026) 2025-06-03 15:31:53 -04:00
Cory LaViska
f4a63f9e22 Simplify color variants docs (#1023)
* remove

* simplify
2025-06-03 15:28:11 -04:00
Cory LaViska
3ab342ebb6 add support for name attribute (#1022) 2025-06-03 15:10:31 -04:00
Cory LaViska
48fe9389c8 Use outlined appearance for buttons in <wa-color-picker> (#1021)
* use outlined appearance for buttons

* don't override child element's size
2025-06-03 15:10:15 -04:00
Cory LaViska
6b2a081fa0 Improve rating's default a11y (#1019)
* add regular star

* support dual icons; improve default contrast

* support dual icons; improve contrast

* update docs

* Update packages/webawesome/src/components/rating/rating.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

---------

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-06-03 15:09:34 -04:00
Cory LaViska
afb2082c79 add resize-vertical (#1018) 2025-06-03 15:08:52 -04:00
Cory LaViska
7bdc9a2cc4 Add <wa-popover> (#1012)
* remove redundant styles from template

* rotate arrow based on placement so borders show correctly when applied

* use actual placement, not preferred

* add popover

* update changelog

* update changelog

* use <dialog> for popover

* fix arrow border in FF/Safari

* update content

* add sidebar to plop

* add popover
2025-06-02 16:13:24 -04:00
Cory LaViska
dead18d23c Fix scroll on reload (#1015)
* fix scroll on reload

* fix comment
2025-06-02 16:09:49 -04:00
Konnor Rogers
2b37c54d7c fix code blocks (#1009) 2025-06-02 10:23:47 -04:00
Cory LaViska
35b61e5cf3 Fix plop templates (#1007)
* update plop templates

* fix plop template

* don't break react
2025-06-02 09:37:30 -04:00
Konnor Rogers
cc33805d27 add convenience scripts (#1004) 2025-05-30 11:46:43 -04:00
Konnor Rogers
6e548dd85b Turn Web Awesome into a monorepo (#1002)
* finishing touches

* finishing touches

* use bash

* remove pro stuff

* update github actions

* fix head.njk
2025-05-29 19:26:10 -04:00
Cory LaViska
212ca5b0a6 Fix icons (#997)
* remove

* remove style observer from icons

* fix size example

* unbreak the themer

* remove old test

* remove abstraction

* remove createProperty and initial; fix default attribute values

* skip it to ship it

* cleanup and add ? fallback

* update tests

* fix types

* remove default

* update test

* update tests

* update deps

* update deps

* update deps

* update dep

* fix comment

* downgrade 11ty

* revert deps

* add nunjucks

* prettier

* skip tests for now

* fix parsing error

* prettier

* skip

* sigh webkit

* tidy up icon library examples

* change rando `solid` icon to `regular`

* restore tests

* fix radio group size

* fix button group size

* remove size from card

* fix menu item sizes

* remove card `size` from visual tests and docs

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-29 15:59:41 -04:00
Cory LaViska
b96c3f318b Simplify native styles (#993)
* move print styles

* begin native styles split

* unsplit button styles 😓

* unsplit callout; remove .wa-callout

* merge forms

* remove unused

* remove unused

* unsplit checkbox

* remove old astro config

* remove overflow

* unsplit slider

* fix tooltip position in RTL

* unsplit radio

* move required light DOM styles to <wa-page>

* remove unused file

* remove unused import

* remove

* goodbye

* fix examples

* unsplit dialog

* unsplit select

* remove select

* unsplit input

* unsplit details

* update

* update comment

* update textarea

* combine native docs; improvements

* update

* reorg and fix headings

* fix details summary padding; fixes #684

* update

* fix native details summary padding; fixes #684

* #684

* remove passthrough style nonsense

* it's CSS not JS

* fix details in sidebar

* add spacing in native buttons for icons

* whitespace

* update docs

* remove button group util

* remove shadow folder, add component folder

* layerize

* default border radius

* remove color contrast script from dist

* add term

* layerize themes + color folders

* reorder

* remove radio button; #504

* remove visual tests

* remove visual tests

* remove unused stylesheet

* make search smarter

* add radio styles

* Fix filled textareas

* re-introduce visual tests (with adjustments)

* fix button appearances

* fix textarea focus styles

* re-introduce appearance classes

* remove 'native styles' note from component pages

* fix checked radio styles

* touch up callout styles

* remove errant `.wa-tag`

* scope appearance classes to relevant elements

* more visual test cases

* fix details borders

* minor visual tests reorg

* add `--box-shadow` to buttons

* fix Awesome theme

* use same layer for all themes (allows unset properties to inherit from Default theme)

* fix box-shadow in wa-textarea

* set button box shadow to `initial`

* fix Active theme

* fix Brutalist theme

* fix Glossy theme

* fix Matter theme (mostly)

* fix Playful theme

* fix Premium theme

* fix Shoelac theme

* fix Tailspin theme

* fix custom radio button styles

* fix links to native styles doc

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-29 13:10:53 -04:00
Cory LaViska
b0aba7ce07 Viewport demo fixes (#996)
* fix viewports in code demo

* sync color schemes in viewport demos

* add terms

* fix viewport styles in dark mode
2025-05-27 15:33:18 -05:00
Cory LaViska
e39bb856c4 fix code example resizer (#995) 2025-05-27 13:27:07 -04:00
Cory LaViska
23dc884678 Simplify sidebar (#989)
* remove test value

* remove animation to prevent page-to-page blips

* static sidebar

* manage open sections on page load and with turbo

* cleanup unused scripts

* Remove overlap between Style Utilities and Layout

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-23 12:07:34 -04:00
Cory LaViska
4e14f25831 Revert <wa-code-demo> in docs (#981)
* remove code demo

* fix page demos and split into external files
2025-05-23 06:21:09 -04:00
Cory LaViska
b15502a01e Use with- and without- consistently (#977)
* use with- and without- consistently

* fix test

* cleanup

* remove console
2025-05-22 14:33:24 -04:00
Cory LaViska
73f6eeacbd Add help buttons to component pages (#984)
* add help buttons to component pages; fixes #140

* justify start
2025-05-22 13:40:35 -04:00
Cory LaViska
5921f3eeaa Button slot detection (#976)
* reimplement slot detection; remove broken visually hidden logic

* update example now that wa-visually-hidden is not a component

* cleanup
2025-05-22 13:40:19 -04:00
Cory LaViska
35338ef643 Add min-block-size to divider; fixes #675 (#964)
* add min-block-size to divider; fixes #675

* Remove unnecessary divider heights from patterns

* Update src/components/divider/divider.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-05-22 11:05:38 -04:00
Cory LaViska
5c950a7874 Remove old BEM -- convention from classes and fix button group dividers (#967)
* remove old BEM -- convention from classes

* fix button group divider; #375

* Update src/styles/utilities/button-group.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

* Update src/styles/utilities/button-group.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

* fix outlined button groups

* Also overlap borders in vertical button groups

---------

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-22 11:04:11 -04:00
Konnor Rogers
a7ea989170 fix icon spritesheets (#982)
* fix icon spritesheets

* fix icon tests

* prettier
2025-05-22 06:27:08 -04:00
Konnor Rogers
7253ed8ab0 fix menu spacing (#978)
* fix menu spacing

* fix relative links in HTML files

* fix relative links in HTML files
2025-05-21 15:33:59 -04:00
Kelsey Jackson
37e82b70fa updated card slot from image to media (#975)
* updated card slot from  to

* missed a wildcard

* updated changelog
2025-05-21 13:03:11 -05:00
Cory LaViska
39d1b82634 Add data attribute invokers; fixes #246 (#966)
* add data attribute invokers; fixes #246

* Add missing word

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-21 13:47:22 -04:00
Cory LaViska
1259a9b78d use native element for native example; fixes #532 (#969) 2025-05-21 13:46:22 -04:00
Cory LaViska
59077e75d2 improve tag spacing; fixes #677 (#965)
* improve tag spacing; fixes #677

* use spacing token

* use em
2025-05-21 13:35:04 -04:00
Cory LaViska
62ddf13a6a Rename vertical to orientation="vertical"; fixes #674 (#963)
* vertical => orientation="vertical"; fixes #674

* add issue

* Update divider styles and docs to use `orientation='vertical'`

* Update split panel styles and docs to use `orientation='vertical'`

* Update remaining docs and patterns examples to `orientation='vertical'`

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-21 13:34:24 -04:00
Cory LaViska
684bb25244 Add attention attribute to <wa-badge>; fixes #940 (#962)
* add attention attribute; fixes #940

* add bounce

* update changelog

* reword
2025-05-21 13:33:45 -04:00
Cory LaViska
1f2ebf5e7a improve table styles; fixes #953 (#961) 2025-05-21 13:32:34 -04:00
Cory LaViska
2182d3c692 fix radio group when value is a number; fixes #924 (#960) 2025-05-21 13:32:16 -04:00
Cory LaViska
074c7a16d6 Rename the classic theme to shoelace; fixes #909 (#959)
* rename classic => shoelace; fixes #909

* Update Shoelace theme description

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-21 13:31:43 -04:00
Cory LaViska
4130246833 add browser + screen reader support policy; fixes #146 (#958) 2025-05-21 13:31:25 -04:00
Kelsey Jackson
bbda731f56 updated dates in the carousel (#957) 2025-05-20 21:31:26 -05:00
Konnor Rogers
6492ee7728 fix themes for app (#956)
* fix themes for app

* prettier
2025-05-20 13:29:56 -04:00
konnorrogers
73e1c04b37 update publish-alpha-cdn 2025-05-20 12:33:35 -04:00
konnorrogers
49bb6af154 3.0.0-alpha.13 2025-05-20 11:44:47 -04:00
konnorrogers
9b8d73a2ea update changelog / gitignore for 3.0.0-alpha.13 2025-05-20 11:44:42 -04:00
Lea Verou
0b4c1a5934 Themer 2nd slice: Look & Feel (#920)
* Exclude Create link from sidebar, for reals this time

* Fix bug

* Very rough prototype of look & feel

* a11y

* Clean up data files

* Automatically generate theme metadata

* Read look & feel params straight from theme

* First stab at dimensionality icons

* Fix rounding 0 bug

* Add border width slider

* [Image-comparer] Expose wrapper as part

* [Comparer] `pointer-events: none` while dragging

* Dark mode slider

* Adjust increments and ranges for look + feel sliders

* Fix preview

* Fix bug where dark mode was not inverted

* Ability to select panel from URL

* Create mixin for Vue form controls and use it in `<swatch-select>`

* Prototype of slider min/max icon buttons

* Nx tooltip

* Icons

* Prevent failed request

* info-tip: Support passing text as prop

* Clearable

* [Brutalist] Match `--wa-shadow-offset-x-scale` to `--wa-shadow-offset-y-scale`

* Add 'Blocky' dimension (derived from Awesome theme)

* Only show Reset button when `clearable` is set

* Remove `clearable` from Look & Feel sliders

* Add tooltips to min/max buttons

* Remove superfluous `aria-label`

* Do not assume that all hyphens in URLs mean nesting, make it explicit

* Formatting

* Fix bug where styles were not applied on page load

* Update Subtle dimension to maximize compatibility

* `<wa-scoped>`: Do not allow non-template children

* Workaround for card not updating

* Update Glossy dimension to maximize compatibility

* Sync scrolling between regular and inverted preview

* Fix bug

* Make changing the base theme reset customizations

* Fix palette page

* Remove cancel button from editable text

* Don't error in theme pages

* Update Playful dimension to maximize compatibility

* Rename 'Look and Feel' to 'Elements' for better parallel structure

* Hide dimensionality controls

* Make back icon motion more subtle

* Expand spacing slider bounds

* Add `tabindex="-1"` where missing in theme showcase

* Remove extraneous gap from theme headers

* fix edit button bug

* rename comparer => comparison; fix aria-controls

* Always save theme name on blur

* Add changelog for themer and new patterns category

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-05-20 10:16:49 -04:00
Kelsey Jackson
8b17b3d3e0 Kj/blog news patterns (#916)
* initial commit to this pr

* updated patterns

* category lists

* post headers

* WIP

* made some content updates

* deleted rogue file

* updated descriptions

* ran prettier

* updated padding

* updated prettierignore

* updated element

* swtiched to token

* updated with category list feedback

* updated with category list feedback

* updated with feedback for featurd post

* updated with feedback for footer

* updated with newsletter feedback'

* updated with feedback to the paywall

* updated with updates for post footer

* more footer updates

* updated with feedback for the post header

* updated with feedback for post list

* updated social share

* updated sign up and login

* added logic to elements to prevent them from closing on escape

* Fix typo (incomplete `<h2>` tag)

* Add missing input labels, fix capitalization and punctuation

* Add description to Blog & News index

* ran prettier on markdown files

* ignored the post list file

* changed hierarchy

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-19 10:32:13 -05:00
Cory LaViska
f5d1b74e00 Scroller component (#907)
* add term

* add scroller component

* update color in docs

* prettier

* add vertical example

* use CSS

* add word

* rework shadows and add opt outs

* add examples

* update docs

* Add missing closing tag in 'Adding Content' example

* fix jsdoc

* fix safari pixels

* add changelog entry

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-15 20:12:36 +00:00
Cory LaViska
40ea444c48 add slot detection back to drawer; #928 (#931)
* add slot detection back to drawer; #928

* remove unneeded attribute
2025-05-15 12:10:49 -04:00
Cory LaViska
403927687e add slot detection back to dialog; fixes #926 (#927) 2025-05-14 17:53:48 -04:00
lindsaym-fa
6af4e849af Fix issue with button border colors 2025-05-14 10:28:11 -04:00
lindsaym-fa
2c839a4225 Remove Awesome's dimension.css, re-combine with overrides.css 2025-05-14 10:28:11 -04:00
Lea Verou
3703ef26da [Comparer] pointer-events: none while dragging 2025-05-13 17:00:49 -04:00
Lea Verou
3640b4c6e1 [Image-comparer] Expose wrapper as part 2025-05-13 17:00:49 -04:00
Lea Verou
27fc269a94 Have system icons fall back to known families/variants if not found 2025-05-13 14:38:07 -04:00
Konnor Rogers
a5b2fffb7a add unlisted and unpublished support (#919)
* add unlisted and excludeFromSearch filters

* rename unlisted to unreleased, rename excludeFromSearch to unlisted

* add notes for unlisted and unpublished

* prettier

* make unused patterns unpublished

* unreleased -> unpublished

* unreleased -> unpublished

* update contributing
2025-05-12 15:44:25 -04:00
Lea Verou
7de6a676b8 Drop base part from menu-item and menu-label (rel #207) (#884)
* [Menu-item] Drop `base` wrapper (rel #207)

Also add two states: `has-submenu` and `submenu-expanded`

* Add `checked-icon` and `submenu-icon` slots

* [Menu-label] Drop `base` part

* update changelog

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-05-12 11:26:47 -04:00
Lea Verou
3c77d400f8 [breadcrumb-item] Drop base part, move styling to host (#881)
* [breadcrumb-item] Drop `base` part, move styling to host

* update changelog

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-05-12 11:19:52 -04:00
Cory LaViska
6ee10f44f4 Add size example to <wa-badge> (#915)
* add size example

* Update docs/docs/components/badge.md

Co-authored-by: Lea Verou <lea@verou.me>

* Update docs/docs/components/badge.md

Co-authored-by: Lea Verou <lea@verou.me>

* Update docs/docs/components/badge.md

Co-authored-by: Lea Verou <lea@verou.me>

---------

Co-authored-by: Lea Verou <lea@verou.me>
2025-05-12 11:02:28 -04:00
Cory LaViska
6afc6e928c remove ssr attributes since we're not using ssr (#917) 2025-05-12 10:51:49 -04:00
lindsaym-fa
f8fcbd60ec Separate dimension overrides into new files 2025-05-12 09:27:27 -04:00
Lea Verou
bdd25571a8 Themer first slice (#857)
* Basic scaffolding

* Generate theme & palette data.js that other JS can import

* Make it possible to include page-card without links

* WIP

* Add `appearance` to details, closes #569

Except `accent` as that's a) far less useful and b) trickier due to the icon color

* Fix broken link

* WIP

* WIP

* Icons icon

* Unify styles for interactive cards

* Prevent focusing inside theme icons

* Fixes

* Action page cards

* Panel scrollables

* scrollable

* Scroll shadows

* Add renaming UI

* UI

* Move styling of heading icons to `ui.css`

* Support permalinks & CRUD

* Make clickable cards more accessible

* Style cards a little better

* Default to styles panel if theme is selected

* Update theme-icons.css

* Custom themes should be saved under Custom

* Get theme code

* Bigger title

* Fixes

* Use theme Vue app for remixing too

* Fix preview jank and make preview script more flexible

* Make radio groups scrollable

* Add affordance to button cards

* Sticky

* `<color-select>`

* Fix theme remixing

* Improve previewing logic

* Fix preview

* Move `domChange()` to separate module

`theme-picker.js` includes side-effects, which may not always be desirable everywhere we may want to import `domChange()`

* Update preview.js

* Panel animation

* Hide Save button if no changes and not saved

* Do not show blank code when no selection has been made

* Use theme slug in filename

* Remove unused component

* Better UI for editing title (and any other text)

* Tweak UI of renaming

* Better indicate default selection

* Fix preview reverting bug

* Fill out app preview with more examples

* Remove `zoom` from theme showcase (yields unexpected/painful results Safari), improve display in wider viewports

* Pending delete

* Make styles panel cards scrollable

* Fix some of the Safari issues

* Update search.css

* Update panel.css

* Select preview UI

* Fix typo

* Frame colors setting as color contrast

* Show dark mode in color mappings

* Brand color

* Swatch styling

* Fix caret icon

* Move Starting theme to the same level as other controls

* Rename typography to Fonts

* Fix bug: Swatch select should show swatches from the selected palette

* Move capitalize to shared utils

* Add utils for handling nested objects

* Icons panel

* Update code.js

* Move utils around

* Add fit and finish to sidebar panels

* Theme card: Move icons to separate data structure

* Move data to dedicated folder since we now have a lot more of it

* Add default icon families and variants to themes

* Data

* Add `deepEntries()`

* Add Duotone

* Spruce up icons preview

* Use theme's icon family in showcase

* Font cards

* Font cards

* Add `max-inline-size` to preview container

* Remove alternate preview options

* Remove theme subtitle

* Support FA kit codes

* Remove Pro badges from theme cards

* Use panagram preview for Fonts

* Consistent heading and label capitalization

* Classes for different icons-card types

* Update data.js.njk

* Variable style on icon family cards

* Fix Sharp Duotone

* Clean up FA kit code hint

* Hide non-functional Icon Library field

* Fix theme icon heights

* icon variant -> style in theme metadata

* Fix bug with icons defaults not being shown

* More convenient theme defaults

* Fix bug with non updating URL

* Fix bug

* Fix multiplying badges

* Custom docs pages

* Add Duotone icons to Mellow theme

* Fix 404

* Remove "Create" from sidebar

* Fix bug

* Move vue components to `/assets/`, move their CSS with them

* Safari/FF compatibility

* Make panels scrollable again

* Fix extra spacing

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-05-09 17:04:06 -04:00
Lea Verou
38c13640fc [Tiny PR, 8 loc diff] Reduce build process noise (#766)
* Reduce build process noise

- Only run 11ty when something has changed within `docs/`
- Only run esbuild if a JS file has changed within

* Update scripts/build.js

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2025-05-08 16:05:52 -04:00
Cory LaViska
00a3b1aa8d fix select not opening after disabled (#910) 2025-05-08 14:47:50 -04:00
Cory LaViska
22298781c5 Remove alpha flags (#913)
* remove alpha flags

* revert isPro flag

* update scripts
2025-05-08 13:58:26 -04:00
Lindsay M
fe27710f57 Fix <wa-radio-button> overrides in themes (#914)
* Target `::part()` for `<wa-radio-button>` overrides

* Remove unapplied CSS properties from radio button docs
2025-05-08 13:09:56 -04:00
Cory LaViska
d94589d113 fix radio button validation (#912) 2025-05-07 18:46:24 +00:00
Cory LaViska
3508bf6339 Cloak improvement (#911)
* simplify cloak selector so it's 100% opt-in

* prevent the discovery event from bubbling

* update changelog

* whitespaec
2025-05-07 18:17:26 +00:00
Cory LaViska
61e65ffcb9 Improve native radio alignment (#904)
* show initial checks (feels less broken now)

* improve native radio dot alignment

* Update src/styles/native/radio.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

* Update src/styles/native/radio.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

* Update src/styles/native/radio.css

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

---------

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-05-07 16:43:11 +00:00
Lindsay M
aed28adbe4 Update to FA 6.7.2 and add all Duotone styles (#906)
* Update to FA 6.7.2 and add all Duotone styles

* Add changelog
2025-05-02 10:30:51 -04:00
Cory LaViska
15b8bde81b fix matter form control label + focus bug (#897) 2025-05-01 16:20:03 -04:00
Cory LaViska
9ee3fb5d28 Remove old code util; fix color scheme shortcut; fix initial examples (#905)
* fix color scheme shortcut

* remove old unused examples script and styles

* don't open the first example's code _sometimes_
2025-05-01 20:17:27 +00:00
Cory LaViska
47aa376c08 fix width example (#899) 2025-05-01 16:15:21 -04:00
Cory LaViska
69ba974a50 fix select + icon + clear spacing (#903)
* fix select + icon + clear spacing

* update styles

* revert
2025-05-01 18:56:02 +00:00
Lea Verou
8dfb411e5e Add typography metadata to themes 2025-04-30 09:42:27 -04:00
Lea Verou
a35a8fd2ad Theme typography.css fixes
- Add `:where([class^='wa-theme-'], [class*=' wa-theme-'])` to default `typography.css` since we declare mappings that need to be inherited by other themes.
- Remove declarations that redeclare defaults
- Ensure consistent order
- [Awesome] Switch code font to ui-monospace
2025-04-30 09:42:27 -04:00
Cory LaViska
2503005bbd fix radio group margin (#898) 2025-04-29 19:58:08 +00:00
Cory LaViska
78027170ea fix feature request advice (#895) 2025-04-29 14:41:01 -04:00
Konnor Rogers
a20aa48992 fix select (#892)
* fix select

* prettier
2025-04-29 12:33:03 -04:00
Lindsay M
ac8accd664 Fix color contrast in Premium theme, closes #880 (#890)
* Fix `--wa-color-brand-fill-loud` in Premium theme

* jk. *Actually* fix contrast in Premium theme.
2025-04-29 09:52:04 -04:00
Lea Verou
c571573063 [Skeleton] Remove base part, rel #207 (#885) 2025-04-28 17:04:06 -04:00
Lea Verou
e813440315 [Image-comparer] Several fixes + rename to comparer (#883)
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-04-28 16:58:24 -04:00
Lea Verou
cfc3f181a3 Fix broken demo, improve passthrough CSS (#879)
Fixes several issues for components using the `display: contents` technique:
- Introduce `--display` CSS property to make it possible to override internal display value of base part.
- Ensure `display: contents` is always applied with `!important` to avoid rendering glitches like the one here
- Ensure non-inherited custom properties are also inherited
- Ensure the `hidden` attribute still works.
2025-04-23 11:52:23 -04:00
Konnor Rogers
7545f04c46 remove all references to /docs/installation (#872) 2025-04-21 17:01:09 -04:00
Lea Verou
38bd6528fe Only apply wa-button-group-vertical class when <wa-radio-group> is a radio button group, fixes #870 2025-04-15 18:07:57 -04:00
Lea Verou
2202ea9642 CSS custom properties to set certain component attributes (#447) 2025-04-15 17:56:38 -04:00
Konnor Rogers
58fbcede51 update patterns to isPro (#869) 2025-04-14 14:59:27 -04:00
Lea Verou
971200cc88 Move domChange() to separate module (#868) 2025-04-14 12:52:00 -04:00
Konnor Rogers
b75d3b615c fix login media query and leaking variables with Turbo (#867)
* fix media queries to use wa-desktop-only

* fix errors in remix.js when changing pages

* prettier
2025-04-14 11:11:08 -04:00
Kelsey Jackson
9d1c47449e Kj/first pattern launch (#861)
* dividing up e-commerce patterns

* started invoice table

* building out the filter

* Initial Commit

* switching machines

* switching machines

* started split image pattern:

* commiting to merge in next

* commiting to switch machines

* upated the product detail patterns

* updated product list patterns

* updated some patterns

* filter work

* added utilities to order history

* added utilities to order-summary

* updated width of container

* switching machines

* switching machines

* fixing conflicts

* editing descriptions

* updated descriptions

* adding some polish

* more filter work

* updated prouct preview

* Revisions to "Product Features"

* "Category Filters" revisions + `wa-placeholder` utility

* cleaned up product list

* tweaked product overview

* tweaked order history

* tweak category preview

* "Checkout Form" revisions

* Re-add `navigation` to "Product Features" carousel

* cleaned up shopping cart

* tweaked order summary

* Add missing file extension

* Fix typo in file name

* Revert checkout form changes in attempt to improve diff

* Reimplement checkout form revisions

* cleaned up checkout form

* Add "What's a Pattern?" and "Using Patterns" to index

* Update category descriptions and headings

* Add docs layout for patterns with stylesheet

* tweaked customer review

* Add checkout form example

* a little more polish

* more tweaks

* switching branches to merge

* created e-commerce index

* unlisted links

* updtated content

* updated content for category preview

* updated order history

* committing to bring branches up to next

* inital commit

* Reorganize app patterns into separate pages

* switching machines

* Add link style utilities

* Refactor product list patterns

* more polish

* Refactor product overview patterns

* switching machines

* Refactor shopping cart patterns

* committing to pull down changes

* updated product preview

* updated image

* updated incentives

* Clean up utility usage and code formatting for category previews

* started updating with style utilities

* Clean up utilities and formatting, replace placeholder text in order history

* updated incentive images

* updated reviews

* added review variant

* more polish

* some heavy duty updates

* removed store navigation

* switching machines
:

* Clean up utility usage and code formatting for order summaries

* Clean up utility usage and code formatting for product previews

* big switchover

* removed old file

* working on sidebar

* updated sidebar

* created info category

* splitting up the old blog page

* a little cleanup and adding detail

* got three done

* updated social share

* Quick formatting adjustment

* initial paywalls

* Use overviews in pattern subcategories (#826)

* Do not error if no pages

* Automatically set parents and tags for patterns

* Update overview.njk

* [WIP] Use overview pages for pattern listings

* Remove explicit parents

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>

* some newsletter signups

* added login patterns

* reworked feeds'

* a few more

* added a few more

* add more app patterns

* App pattern tweaks (#827)

* Fix `patterns.css` reference

* Tweaks to action panel patterns

* Tweaks to comments patterns

* Progress on data display patterns

* Progress on empty state patterns

* Use email-related data from recent update in `pattern-main` (altered slightly)

* Tweaks to data display patterns

* Tweaks to empty state patterns

* Tweaks to FAQ patterns

* Tweaks to feed patterns

* Tweaks to grid patterns

* Tweaks to pagination patterns

* Tweaks to pricing patterns

* Tweaks to description list patterns

* Tweaks to leaderboard patterns

* Add and update names and descriptions

* Ensure comments fields have labels

* Tweak recent additions

* switching machines

* catching up with next

* added permissions pattern

* switching machines

* added post articles

* having local browset issues

* a few more app patterns

* took out info patterns

* spiffed up the action panels

* gave the action panels a once over

* added content to data display

* updated a few patterns

* clean up a few e-commerce patterns

* added time componen to reviews

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Lea Verou <lea@verou.me>
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-04-14 11:10:54 -04:00
Lea Verou
003fd28cb0 Mark code-demo and viewport-demo as pro 2025-04-10 10:57:06 -05:00
Lea Verou
2f300d8930 [Popup] Use viewport as default boundary for flip too (#865) 2025-04-10 10:52:15 -05:00
Lea Verou
f13deb87bb Drop hoist from public API, use Popover API where supported (#351)
* First stab at using the Popover API for PE

* fix popup

* First stab at using the Popover API for PE

* fix popup

* Prettier

* Fix TS error

* Remove workaround

* Default to `strategy = fixed` if Popover API is not supported

* Clear out default UA styles for popovers

* Kill `hoist` with fire 🔥

* Refactor

* Update `@floating-ui/dom`

* Fix flipping and shofting

* Fix autosize

* Use `defaultBoundary` for `flip` too

That way we get the previous behavior for it.

* Remove `strategy`, just use `SUPPORTS_POPOVER` check where relevant

* Remove uses of `strategy`

* Use viewport as the default boundary for shifting and autosizing and add `boundary=scroll` to override

---------

Co-authored-by: konnorrogers <konnor5456@gmail.com>
2025-04-09 16:47:40 -05:00
Konnor Rogers
deb9fd70b3 fix pass through copying (#860)
* fix pass through copying

* prettier
2025-04-04 13:46:41 -04:00
Lea Verou
ff3b3d6558 Remove current class from existing sidebar link before adding it to new one 2025-04-02 14:16:03 -04:00
Lea Verou
6b3edb8a56 Tiny fix in saving mixin 2025-04-02 14:16:03 -04:00
Lea Verou
6162b8b115 Move v-content directive to separate file 2025-04-02 11:51:12 -04:00
Lea Verou
cff752b600 Move CRUD logic from palette app to Vue mixin 2025-04-02 11:51:12 -04:00
Lea Verou
7892a94b9b Rewrite and generalize CRUD logic for customizable entities (palettes, themes) (#854)
* Generalize CRUD logic to more easily support themes (and other types of entities)
* Decouple data structures managing saved entities (palettes, themes), sidebar update logic, and palette app (and soon themer) by using events
* Simplify logic (a lot of it carried complexity back from the time we did not use uids and/or was overly general)
* `PersistedArray` class to encapsulate arrays persisted in localStorage
* Remove unused `palette.equals()` function
2025-04-01 16:26:25 -04:00
Lea Verou
40a58ff35f Do not rely on {% raw %}, fixes #851 2025-03-31 17:53:33 -04:00
Lea Verou
0f2950c4cc Import CRUD parts from #828 2025-03-31 17:53:33 -04:00
Cory LaViska
b334884f57 remove unused custom properties (#853) 2025-03-31 17:08:50 +00:00
Cory LaViska
734417d66b fix version 2025-03-28 13:40:28 -04:00
Lea Verou
2cfd651d2f Prevent theme icons from getting focus when tabbing
Looks like `tabindex="-1"` didn't work, need to file a separate issue for that
2025-03-28 13:27:08 -04:00
Lea Verou
3e2d1b98be Changelog fixes
- Moved fixes to bug fixes section
- Linked `allDefined()` and `.wa-cloak` to their docs
- Grouped related bugfixes together
- Moved docs bugfixes to the end (since they are of least interest to users)
2025-03-28 13:27:08 -04:00
Lea Verou
40f332f37c Expand docs on allDefined() 2025-03-28 13:27:08 -04:00
Lea Verou
bfda64f690 Fix wa-cloak docs 2025-03-28 13:27:08 -04:00
Konnor Rogers
883d6df2ef fix z-index issues on sticky-disabled elements. (#848) 2025-03-28 12:26:30 -04:00
Lea Verou
b4240fd321 Move /docs/installation to /docs/, fix parent URL logic, closes #585 (#846)
* Fix: Parent URL should be undefined if parent is falsy

* Document `docs.11tydata.js` better

* Move `docs/installation.md` to `docs/`, fixes #585

* Just in case
2025-03-28 12:12:42 -04:00
Cory LaViska
8755a834f6 3.0.0-alpha.12 2025-03-28 11:07:44 -04:00
Cory LaViska
8d905296b8 update changelog 2025-03-28 11:07:42 -04:00
Cory LaViska
8eba1e5003 Various bug fixes (#839)
* add default icon spacing in tab; fixes #779

* fix radio button pill styles; fixes #759

* remove redundant styles

* fixes #840

* fix focus ring in Safari; fixes #745

* improve details styles; fixes #685

* update examples

* Revert "improve details styles; fixes #685"

This reverts commit 8151872d22.

* revert

* revert

* fix dropdown alignment in button group; closes #374

* fix progress animation in Safari; closes #356

* fix native checkbox indeterminate icon; closes #386

* add comment

* stop running SSR tests locally

* update test

* add FA kit code for codepen 🤞🏻

* remove wa-cloak after components load

* fix whitespace

* update display labels when changed; fixes #702

* fix radio labels (ALPHA-211)

* revert example

* add option as a dep of select

* remove outdated section
2025-03-28 10:57:01 -04:00
Konnor Rogers
21aa85acc0 fix search for webawesome app (#845)
* fix search for webawesome app

* prettier
2025-03-27 16:51:41 -04:00
Lea Verou
404c15b303 Fix race condition, closes #843 2025-03-27 16:14:24 -04:00
Lea Verou
8a26afc334 Fix for theme icons + easier to generate palette icons (#841)
* Make sure components that only appear within page icons are still detected

* Palette icons

* Update theme-icons.css

* Reduce whitespace between swatches

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-03-27 14:25:52 -04:00
Cory LaViska
513a1e35a9 Dialog fixes (#790)
* revert structure and styles to fix WA-A #123

* fix WA-A #201

* update changelog

* fix search dialog position so it doesn't jump around

* remove close watcher; fix dialog/drawer backdrop animations
2025-03-27 12:14:35 -04:00
Lea Verou
09f668fc99 Workaround for dark mode 2025-03-26 18:31:08 -04:00
Lea Verou
d451ba98e5 Fix web fonts in theme icons
Instead of raw DSD, use a component that pulls in a child template and then goes over the CSS and extracts font-related rules into the document, just once per rule.
This also fixes theme icons in Vue.
2025-03-26 18:31:08 -04:00
lindsaym-fa
fd287edd56 Change balance of color swatches 2025-03-26 18:31:08 -04:00
Lea Verou
8424b49646 Theme icons, take 1 2025-03-26 18:31:08 -04:00
Lea Verou
fa24c0f70e Update changelog.md 2025-03-26 13:08:44 -04:00
Cory LaViska
1bba87c66d Improve search lists (#837)
* add debounce to search so it feels more natural

* improve search grid styles
2025-03-26 16:07:09 +00:00
Cory LaViska
0db9ca12e3 Remove unused SSR module and remove first load fade (#835)
* disable SSR module in 11ty

* remove first load fade
2025-03-26 14:45:29 +00:00
Lea Verou
041555fe99 border-radius: 0 on plain details 2025-03-26 10:04:25 -04:00
Lea Verou
b41dbd2de7 Fix: Specify default card background 2025-03-25 16:53:16 -04:00
Lea Verou
7c6f31e0c7 [Card docs] Use style utilities instead of custom CSS 2025-03-25 16:31:40 -04:00
Lea Verou
9e84274a93 [Card] Round all corners of the image for appearance=plain 2025-03-25 16:31:40 -04:00
Lea Verou
2b3803f91e [Card] Support appearance, closes #609 2025-03-25 16:31:40 -04:00
Lea Verou
faed8da3cd Fix broken link 2025-03-25 14:14:53 -04:00
Lea Verou
17cf902f53 Add appearance to details, closes #569
Except `accent` as that's a) far less useful and b) trickier due to the icon color
2025-03-25 14:14:53 -04:00
Lea Verou
8214ff6b2d Several fixes around overviews, outlines etc (#825)
* Fix outline for headings that have links

Previously produced blank items because it assumed any link in a heading is an anchor

* Filter unlisted items from overviews

Previously they were filtered only when the card was rendered, so their heading was still shown

* [Overview] Add id to group headings

* Hide headings from empty groups

Should never happen but you never know

* [Overview] Ensure "Other" is always last even when no sorting
2025-03-25 11:39:04 -04:00
Cory LaViska
c9979e15f8 adds a hard coded delay to drastically reduce theme picker jank (#829) 2025-03-24 20:49:08 +00:00
Cory LaViska
fcfe2bde7d Add FOUCE utilities (#686)
* add fouce utilities

* add comment

* Update docs/docs/installation.md

Co-authored-by: Lea Verou <lea@verou.me>

* commit PR suggestion

* rename wa-reduce-fouce to wa-cloak

* remove class as requested

* add cloak class

* wait a cycle

* move turbo to same file

* reduce fade

* disable SSR and add Turbo FOUCE helper

* disable SSR

* fix test suite

* workflow dispatch

* update fouce util

* no need to remove cloak class

* simplify fouce util

* add allDefined util

* update changelog

---------

Co-authored-by: Lea Verou <lea@verou.me>
Co-authored-by: konnorrogers <konnor5456@gmail.com>
2025-03-24 20:33:24 +00:00
Lea Verou
59dcaaff83 Content hierarchy bugfixes & improvements (#821)
- Sidebar, overview listings, breadcrumbs now based on actual parent-child relationships, rather than increasingly outdated heuristics
- parent properties are now generated automatically from the URL structure, and need only be specified to override that default
- Ability to group by page hierarchy in overview pages, where pages that have >= 2 children become categories

Smaller improvements:
- More flexible syntax for specifying the params of overview pages
- [Overviews] Hide group heading if only one group is present
- parentItem and parentUrl properties that can be used on any page
- Alias a collection as the children of a page (useful for "virtual" parents like Layout)
- Do not error if a page card icon is missing
2025-03-21 16:30:06 -04:00
Cory LaViska
5bad30ec30 fix remove event and return null when empty (#819)
* fix remove event and return null when empty

* use closest
2025-03-21 13:01:49 -04:00
Lea Verou
87c1762146 Scrub :host-context() from everywhere 2025-03-21 12:55:25 -04:00
Konnor Rogers
899edd1d5e Konnorrogers/add a guard for non server deploys (#818)
* add a guard for non-server builds

* add a guard for non-server builds

* add a guard for non-server builds

* prettier
2025-03-20 16:37:22 -04:00
Konnor Rogers
872a110b1e reflect href on buttons (#817) 2025-03-20 14:58:21 -04:00
Lindsay M
07fe6d598e Add curated orange to all palettes, closes #657 (#798)
* Adjust `orange` in Default palette

* Adjust `orange`, `red`, and `yellow` in Classic palette

* Adjust `orange` in Anodized palette

* Adjust `orange` in Bright palette

* Adjust `orange` in Mild palette

* Adjust `orange` in Natural palette

* Adjust `orange` in Vogue palette

* Adjust `orange` in Rudimentary palette

* Adjust `orange` in Elegant palette
2025-03-18 16:08:31 -04:00
Konnor Rogers
79bafc513a 11ty for webawesome-app (#803)
* working on integration

* 11ty for webawesome + app

* add flashes

* additional changes

* prettier

* add note about nunjucks

* prettier
2025-03-18 13:04:24 -04:00
Lea Verou
1d03f7bee0 [Icon-button] Make --background-color-hover work + remaining 3 interaction properties (#801)
* [Icon-button] Make `--background-color-hover` work, fixes #800

* [Icon-button] Introduce `--text-color-hover`, `--background-color-active`, `--text-color-active`

* Oops
2025-03-14 09:29:04 -04:00
Lindsay M
a9bf1bd838 Add --wa-color-{role}-N variables, closes #785 (#797)
* Initial comment, based on #768

* Add `neutral` color variables

* Add `success`, `warning`, and `danger` variables

* Theme touch-ups

* Remove unused clamped tokens

* Re-add clamped tokens test page, refactor to be based on hue instead of `brand`
2025-03-13 17:07:03 -04:00
Lea Verou
c0ca739366 More robust dynamic value / options handling, fixes #789 2025-03-12 16:52:50 -04:00
Cory LaViska
a6745602d6 fix color picker light dismiss (#794)
* fix color picker light dismiss

* update changelog
2025-03-12 15:59:37 -04:00
Cory LaViska
da4f619d95 prevent card example from overflowing (#795) 2025-03-12 14:44:39 -04:00
Cory LaViska
1283a696a5 fix switch + tooltip behavior (#793) 2025-03-12 18:22:23 +00:00
Cory LaViska
d12b97b0b0 fix wa-pill and wa-input[pill] styles (#791) 2025-03-12 16:19:50 +00:00
Lea Verou
e5c2884880 [Tooltip] Specify inherited CSS properties on host, fixes #773 (#774)
* [Tooltip] Specify inherited CSS properties on host, fixes #773

* Remove unused `--show-delay` and `--hide-delay`
2025-03-10 15:08:27 -04:00
Lea Verou
1d600a77c4 Fix #566 2025-03-10 14:15:06 -04:00
lindsaym-fa
db3c568ba2 Add generated orange to Anodized palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
4bb9805ba6 Add generated orange to Bright palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
bd935fa8d5 Add generated orange to Classic palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
c3e582b47b Add generated orange to Natural palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
4d094a4e19 Add generated orange to Rudimentary palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
782c404bdf Add generated orange to Default palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
f1438981b2 Add generated orange to Elegant palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
18b88c2f5c Add generated orange to Mild palette 2025-03-05 22:27:11 -05:00
lindsaym-fa
a2d85f49a3 Add generated orange to Vogue palette 2025-03-05 22:27:11 -05:00
Lea Verou
be00026cd3 Update postprocess.js 2025-03-05 22:27:11 -05:00
Lea Verou
58ed88bc5a Add orange to list of hues 2025-03-05 22:27:11 -05:00
Lea Verou
1d14e186f3 Generate missing hues from neighboring hues 2025-03-05 22:27:11 -05:00
Lea Verou
5f672aabc2 Refactor: variable rename for consistency 2025-03-05 22:27:11 -05:00
Lea Verou
db08e12a32 Pave the way for being able to have core colors that are not mapped to any tint 2025-03-05 22:27:11 -05:00
Lea Verou
e0fc639226 Only use hex when color is within sRGB 2025-03-05 22:27:11 -05:00
Lea Verou
e6c662b543 tintless.js -> postprocess.js 2025-03-05 22:27:11 -05:00
lindsaym-fa
d1de9a9a73 Fix incorrect sizing tokens in size utilities 2025-02-26 01:01:39 -05:00
lindsaym-fa
4931de8eb4 Fix text color for filled appearance 2025-02-26 01:01:39 -05:00
Lea Verou
71e7227763 Theme remixing fix: Order of params should not matter (#772)
Also renamed the `theme` export to `getThemeCode` since it was being renamed everywhere it was imported.
2025-02-21 14:03:55 -05:00
Lea Verou
dd671e15aa Changelog (#770) 2025-02-21 13:14:19 -05:00
Cory LaViska
2daeea0349 3.0.0-alpha.11 2025-02-21 12:53:05 -05:00
Cory LaViska
3cb6625c1d update changelog 2025-02-21 12:52:51 -05:00
Lea Verou
c4b5446d01 Fix boundingClientRect issue for elements whose host is display: contents 2025-02-21 12:02:20 -05:00
Lindsay M
41affca083 Allow color tweak tags to wrap (#769) 2025-02-21 11:50:13 -05:00
Lea Verou
132dbfabcc Gray tweaks prototype (#761)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-02-20 12:10:43 -05:00
lindsaym-fa
4fc6224464 Fix missing listbox border 2025-02-19 14:54:11 -05:00
Lea Verou
4921d1c32e Save palette MVP, fixes #746 (#755) 2025-02-18 16:11:40 -05:00
Lindsay M
54d71d2319 Use tintless and clamped brand colors in themes (#754)
* Use tintless `brand` colors, cutoffs in themes

* Re-add `40-min`, add `70-max`

* Fix mistakes in Mellow theme

* Revert accidental Premium brand color change

* Add changelog
2025-02-18 10:22:32 -05:00
Cory LaViska
c1ecca0169 fix select hint (#760) 2025-02-18 15:09:52 +00:00
Lea Verou
d6a91919e0 Code block improvements
- Add ids, use ids to link copy button. No need for client-side script or updating the copy button manually for dynamic code snippets.
- Add button to link to code block
- Slight refactor on copy plugin to use the 11ty API properly
2025-02-14 15:09:02 -05:00
Lea Verou
4621094ea1 [Tab] Avoid sprouting attributes in the constructor 2025-02-14 13:04:39 -05:00
Lea Verou
726dc73e2a Hue tweaking & chroma scaling, closes #669 #670 (#747)
- General infrastructure to support palette tweaking
- Hue shifts per color scale (UI, permalinks, dynamic code snippets)
- Scale overall chroma up/down (UI, permalinks, dynamic code snippets)
- Update contrast ratio tables (styling for contrast up/down/fail could use improvement, but it's a starting point)
- Make sure it works with Turbo (i.e. things don't break when we navigate to another page)
2025-02-13 19:28:20 -05:00
Lea Verou
4bfebf3249 Improve color ranges script (#752) 2025-02-13 18:15:47 -05:00
Lea Verou
99ad0abdd3 Palette icons, take 4 2025-02-13 10:52:40 -05:00
Cory LaViska
902e2b6367 Fix invalid CSS property in <wa-select> (#751)
* remove empty selectors

* fix invalid property

* update changelog
2025-02-13 15:45:57 +00:00
Lea Verou
7f3210b12d Update changelog 2025-02-13 09:44:27 -05:00
Lea Verou
eee63bdecd Clamped brand color tokens (#741) 2025-02-12 15:13:03 -05:00
Lindsay M
a91fd07ed7 Add pink, closes #658 (#742) 2025-02-11 10:52:51 -05:00
Lindsay M
34aa8917a6 Revisit default palette, closes #706 (#731)
* Adjust  everything  (but not grays)

* Update keys

* Tweak green

* Update lighter `green` tints
2025-02-10 22:37:14 -05:00
Lindsay M
715c2c0def Revisit bright palette, closes #697 (#705)
* Adjust red and yellow

* Update remaining colors

* Correct Awesome theme success colors

* Adjust `red`

* Redefine `indigo` and `purple`

* Tweak `indigo`
2025-02-10 17:11:34 -05:00
Lea Verou
13b5385633 Radio improvements
- Drop `base` part (rel #207)
- Add `hint` slot and attribute (it was the only form control that did not support that)
- Refactor `@watch` calls to `updated()` per @claviska's plan for them
2025-02-10 14:19:53 -05:00
Lea Verou
d25f3748c4 Analyze color components (#732)
Also refactored existing color scripts (moved to separate directory, extracted utils to separate file)
2025-02-10 13:54:54 -05:00
Lindsay M
b6620ddf7e Revisit vogue palette, closes #723 (#738) 2025-02-10 13:23:57 -05:00
Lindsay M
d70d4a91b1 Revisit mild palette, closes #720 (#737)
* Adjust `cyan`, `indigo`, and `purple`

* Skew `indigo` more towards blue

* Better matching to Material tonal palettes
2025-02-10 13:20:44 -05:00
Lindsay M
bb1f7b2b7a Adjust everything (#734) 2025-02-10 11:42:31 -05:00
Lindsay M
9921c17d63 Revisit natural palette, closes #721 (#735)
* Adjust `cyan`

* Adjust `blue` and `purple`

* Adjust `red` and `yellow`
2025-02-10 11:42:11 -05:00
Lindsay M
7f964f9b56 Adjust everything (#736) 2025-02-10 11:41:36 -05:00
Lindsay M
31eeea1630 Revisit anodized palette, closes #718 (#733)
* Adjust  everything 

* Shift `red` towards orange in darker tints

* Tweak `green` balance
2025-02-10 11:41:17 -05:00
Lea Verou
ffda52a7cf Theme remixing: Dynamic code snippets (#729) 2025-02-07 23:03:34 -05:00
Lea Verou
9be7919c60 Implement brand stylesheets for missing hues 2025-02-07 17:59:18 -05:00
Lea Verou
c30f3c4b09 Improve theme remixing UI (#724)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-02-07 11:35:12 -05:00
Lea Verou
7e8f13b5cb Add accent color tint as separate variable (#725)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-02-06 18:30:43 -05:00
Lindsay M
97ab986425 Revise classic palette, closes #707 (#716)
* Change  everything 

* No changes to `gray`
2025-02-06 17:58:33 -05:00
Lea Verou
f1fa7f713e Add label attribute to option & menu-item (#704)
* Add `label` attribute and `defaultLabel` getter to option and menu-item, drop `getTextLabel()`

- Add `label` attribute to option and menu-item, closes #698
- [Option] Add `defaultLabel` cached property to both
- [Option] Remove `getTextLabel()` method from both (people can just set `el.label`)
- Refactor: Merge utils to get text content into one more powerful utility function
- Fixed typo in `slot.ts`

.

Add `label` attribute to menu, remove `getTextLabel`

* Update filename
2025-02-06 10:58:09 -05:00
lindsaym-fa
3394a95057 Remove visual test failure markers 2025-02-06 10:57:33 -05:00
Lea Verou
eed9ddb9b3 Fix #622 2025-02-06 10:57:33 -05:00
Lea Verou
daf5e7734d Support opting out of anchor headings with data-no-anchor 2025-02-06 10:56:56 -05:00
Lea Verou
63133d0e33 Card fixes 2025-02-06 10:25:02 -05:00
Lea Verou
b2d74145b8 Remove stray console.log() 2025-02-05 11:35:55 -05:00
Lea Verou
17eeccbc5d Better infrastructure for core colors, show core colors in docs, closes #668 2025-02-05 11:24:13 -05:00
Lea Verou
68f645e776 [Option] Drop base part, rel #207 2025-02-05 09:29:50 -05:00
Cory LaViska
b3e4c59197 add secure context notice (#683) 2025-02-04 16:27:35 +00:00
Lindsay M
6080a85035 Replace teal with cyan, fixes #659 (#671)
Co-authored-by: Lea Verou <lea@verou.me>
2025-02-03 19:01:23 -05:00
lindsaym-fa
f7e088c8df Rename violet to purple, fixes #656 2025-02-03 18:47:03 -05:00
Lea Verou
80e1c05b37 Add --wa-color-brand-* tokens, fixes #655 (#662) 2025-02-03 15:39:59 -05:00
Cory LaViska
99f0273783 fix placeholder token (#652) 2025-02-03 17:03:34 +00:00
Cory LaViska
8e13683a30 Select tag fix (#651)
* add tag-counter part to wa-select

* on second thought
2025-02-03 16:48:46 +00:00
Cory LaViska
fd73542d2c restore slot detection for non-SSR environments (#649) 2025-02-03 16:21:53 +00:00
Cory LaViska
bde0ed7403 add orientation example and use utils for spacing (#648) 2025-02-03 15:46:51 +00:00
Cory LaViska
8dc49f7119 fix event listeners (#647) 2025-02-03 10:07:21 -05:00
Cory LaViska
25cb96aa30 3.0.0-alpha.10 2025-01-31 11:23:56 -05:00
Cory LaViska
360273ac27 update version 2025-01-31 11:23:50 -05:00
Lea Verou
404d59d9d6 Improve FOUCE reduction utility, docs fixes, :state(wa-defined) (#643)
* Utility layout

* Split out, improve & document FOUCE utility
2025-01-31 11:19:30 -05:00
Lea Verou
ce1ce6caca Fix regression (#642) 2025-01-31 10:01:01 -05:00
Lea Verou
74ecc52a15 Inheritable size (#593)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-30 15:56:32 -08:00
Lindsay M
a64cc60ad5 Revise docs to clarify installation guidance (#638)
* Revise docs to clarify installation guidance

* Fix broken link

* Clarify `:where(:root)`, add CSS part example
2025-01-30 14:40:08 -05:00
Lindsay M
c5f91ec2f7 Add missing changelog entries (#639)
* Add logs for visual tests, `variant` inheritance, and missing bug fixes

* Update logs on docs changes
2025-01-30 11:51:57 -05:00
Lea Verou
4f9af1e871 Add JS snppet for setting wa-dark based on OS default 2025-01-30 08:32:01 -08:00
Lea Verou
aeb25f3a7d Infrastructure for inheritable props, make variant inherit (#582)
Fixes #454, fixes #592 

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-29 16:22:50 -08:00
Cory LaViska
b89ee673e6 Fix <wa-textarea> form submit behavior (#637)
* fix textarea form submit behavior

* add test
2025-01-29 17:57:16 -05:00
Lindsay M
3c70c44b8a Use flex columns for form controls, fixes #629 (#636)
* Use flex columns for form controls

* Touch up spacing in color picker example

* Use consistent `display` for related form controls
2025-01-29 09:56:09 -05:00
Lindsay M
d8881c0b1e Add Visual Test Suite (#617)
* Initial progress on visual test suite

* Additional tests and descriptions

* Add native callout, add dividers between tables

* Indicate test failures, improve alignment tests

* Split tests into separate files

* Add table scrolling

* Remove irrelevant icon test cases

* Add test failures

* Shorten "Inline Code" > "Code" to prevent wrapping

* Add horizontal orientation to radio button tests
2025-01-28 18:45:19 -05:00
Lea Verou
88b6fe2fbe Docs on cherry-picking native styles (#619)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-01-28 16:58:53 -05:00
Lea Verou
6a0725cf00 Fix button appearance docs (#603) 2025-01-28 15:46:30 -05:00
Cory LaViska
3ff8745910 Add orientation to radio group (#635)
* add orientation to radio group; fixes #613

* fix timing issue that prevents value from being set sometimes

* gimme a break

* make radio button examples horizontal

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-28 14:23:39 -05:00
Lindsay M
0cb72adb28 Use 100% width for text field and select labels (#599) 2025-01-27 09:49:35 -05:00
Cory LaViska
3d35f5d4e0 Ensure change events bubble (#601) 2025-01-26 14:10:57 -05:00
Lindsay M
815cc4220b Add breaks between radios in examples (#598) 2025-01-24 17:19:26 -05:00
Lea Verou
a7caf19b34 Tintless variables + OKLCH coords as comments (#596)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-01-24 16:55:21 -05:00
Lindsay M
71c054d6e4 Use background-image for native select caret (#594) 2025-01-24 11:52:06 -05:00
Cory LaViska
e1bf5471bf Use native events when possible (#590)
* fix filename

* <wa-input> input + change (change not working)

* compose that horribly misleading change event

* use native blur/focus events

* update checkbox

* update color picker events

* update color picker events

* update radio group events

* update button events

* remove event options

* update select events

* update image comparer events

* update icon button events

* update slider events

* update rating events

* update radio events

* update switch event

* update textarea events

* update radio button events

* remove unused events

* cleanup

* fix react wrappers

* fix react events for real this time

* update changelog

* add note

* Update src/components/input/input.ts

Co-authored-by: Lea Verou <lea@verou.me>

* delete unused close event

* use same event type

* fix tests

* remove wa- from events in docs and examples

* fix comment

* Update docs/docs/resources/changelog.md

Co-authored-by: Lea Verou <lea@verou.me>

---------

Co-authored-by: Lea Verou <lea@verou.me>
2025-01-23 17:52:41 -05:00
Lea Verou
099edc5186 Implement wide page-level data 2025-01-22 13:25:29 -05:00
Lea Verou
e3560dcf98 Do not reflect default values
- Add `default` descriptor
- Do not reflect attributes when equal to their default value
- Patch getter return value to return default value when empty
- Use it in button `appearance`
2025-01-21 15:16:11 -05:00
Cory LaViska
f2bb2c84a0 fix nested tab groups (#576) 2025-01-21 12:54:38 -05:00
Cory LaViska
13b3342017 fix slot names (#577) 2025-01-21 12:52:41 -05:00
Cory LaViska
d1c1d689ce ensure fix works on backers website (#579) 2025-01-21 12:36:54 -05:00
Cory LaViska
44e5e37a2b 3.0.0-alpha.9 2025-01-17 10:40:54 -05:00
Cory LaViska
566aae927d fix typo 2025-01-17 10:39:18 -05:00
Lea Verou
7258c001a7 Demo for mixing and matching (#565) 2025-01-17 10:38:03 -05:00
Lea Verou
7a70940c6a Update changelog, remove .wa-callout from alpha 2025-01-16 18:27:47 -05:00
Lea Verou
45f4edc426 Fix #561 2025-01-16 16:50:28 -05:00
Lea Verou
da32015f27 Basic mixing and matching docs (#560) 2025-01-16 16:31:24 -05:00
Lea Verou
03d8238edb Add missing :state(blank) docs 2025-01-16 16:17:50 -05:00
Lindsay M
34f8744493 Fix missing mild palette doc and links (#557) 2025-01-16 16:09:52 -05:00
Lindsay M
fa3fe5f753 Theme files housekeeping, closes #519 (#552)
* Reorg Glossy theme

* Reorg Playful theme

* Remove redundant dark mode tokens
2025-01-16 16:09:28 -05:00
Lindsay M
fc6c7de1fd Fix contrast issues with Bright teal (#556) 2025-01-16 16:09:03 -05:00
Lea Verou
0037712549 Matter Ripple MVP (#558)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-16 16:05:50 -05:00
Lea Verou
5301945bfa Filled inputs 2025-01-16 14:48:56 -05:00
Lea Verou
1298651dd8 Floating labels on select 2025-01-16 14:48:56 -05:00
Lea Verou
5f9695fde1 Floating labels on textarea 2025-01-16 14:48:56 -05:00
Lea Verou
2eb2597efe Floating labels for input 2025-01-16 14:48:56 -05:00
lindsaym-fa
431e82261b Initial floating label attempt 2025-01-16 14:48:56 -05:00
Lea Verou
df51149d0a Show contrast ratios in contrast pair tables 2025-01-16 13:18:26 -05:00
Lindsay M
fba0b11343 Add Matter theme (#547)
* Add Matter theme

* Add Matter to alpha build

* Add changelog

* Fix incorrect palette name

* Make loud fills darker in light mode
2025-01-16 12:08:51 -05:00
Lea Verou
3618e93490 Reintroduce --border-width and --border-radius, fixes #531 2025-01-16 10:36:03 -05:00
Lea Verou
cfa95307d1 Quick proof of concept contrast tests 2025-01-16 10:22:01 -05:00
Lea Verou
15344c2a2a Appease Turbo for the color scheme picker too, fixes #520 2025-01-16 10:15:52 -05:00
lindsaym-fa
3974aa5130 Decrease line height on swatches 2025-01-16 10:15:16 -05:00
lindsaym-fa
a6702ad6d2 Revise Color tokens doc and link to palettes 2025-01-16 10:15:16 -05:00
lindsaym-fa
ecf21adddc Fix punctuation 2025-01-16 10:15:16 -05:00
Lea Verou
52c24fc3b7 Add color palette to theme pages 2025-01-16 10:15:16 -05:00
Lea Verou
d464714d7b Rudimentary palette icons 2025-01-16 10:15:16 -05:00
Lea Verou
7d089bbe2f Palette Docs 2025-01-16 10:15:16 -05:00
Lea Verou
71914afc91 defaultPalette -> palette 2025-01-16 10:15:16 -05:00
Lindsay M
9d139e3fa0 Minor style update for checkboxes in wa-tree-item (#542)
* Use theme value line height for tree item checkbox

* Apply theme checkbox styles to selected tree items
2025-01-16 09:30:35 -05:00
Lindsay M
db3039e9fe Fix green-40 in classic color palette (#548) 2025-01-16 09:26:06 -05:00
Lindsay M
9494b9bb67 Improve default tooltip styles (#543)
* Use inverted colors for tooltips

* Remove redundant tooltip overrides from themes
2025-01-16 04:35:08 -05:00
Lea Verou
7e1f4f0351 Separate meaningful theme parts out (#526)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-15 17:32:36 -05:00
Lindsay M
5ebe4f4d3e Finalize playful theme, closes #490 (#527)
* Finalize Playful theme

* Add changelog, add to alpha

* Add playful theme to alpha build

* Touchup and tweaks

* Tweak hover mix color in `wa-dark`

* Avoid transforming buttons in button groups

* Final touchup

---------

Co-authored-by: Lea Verou <lea@verou.me>
2025-01-15 17:13:48 -05:00
Lea Verou
dfb9d53a25 Checkbox improvements
- Added `part="control", fixes #529
- Removed wrapper div which is no longer needed
- Removed `form-control--has-hint` class which is no longer used anywhere
2025-01-15 15:03:58 -05:00
Lindsay M
c2c1a2ff5b Add missing Glossy and Premium themes to alpha build (#528) 2025-01-15 10:45:43 -05:00
Lindsay M
ac86c037a1 Finalize Glossy theme, closes #491 (#525)
* Initial glassy theme progress

* Add fallback to slider thumb box shadow

* Remove redundant `wa-dark` styles and refactor shadows

* Rename to 'Glossy' since it fits the vibe better
2025-01-14 18:44:31 -05:00
Lea Verou
6b07c9a040 Native callout (#513)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-14 14:56:03 -05:00
Lea Verou
24a76f6a7c Color palette housekeeping (#523) 2025-01-14 14:54:34 -05:00
Lea Verou
89c0667e9c Improve maintainability of color docs 2025-01-14 14:44:30 -05:00
Lea Verou
434084ea4e Playful: refer to rudimentary palette 2025-01-14 14:32:39 -05:00
Lea Verou
1738c6345b Fix #514 for reals this time 2025-01-14 13:02:37 -05:00
Lea Verou
0ac7916a1b Attempt to fix #514 2025-01-14 13:02:37 -05:00
Lea Verou
e7979991e3 Update docs to lean into the "tokens" terminology in lieu of "properties"
Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-01-14 12:31:24 -05:00
Lea Verou
07f70098f8 Theming -> Design Tokens 2025-01-14 12:31:24 -05:00
Lindsay M
17146698db Finalize Premium theme, closes #489 (#510)
* Finalize Premium theme

* Improve theme compatibility of dark mode shadows

* Improve theme compatibility of code examples

* Add comments

* Revert dark mode shadow color changes (to be addressed separately)

* Revert dark mode shadow color change

* Clean up redundant `wa-dark` properties
2025-01-14 11:56:30 -05:00
Lea Verou
bf852b1296 Fix #515 2025-01-14 11:29:36 -05:00
Lea Verou
e367c0ef29 Open sidebar group on overview pages, fixes #507 2025-01-14 10:20:04 -05:00
Lea Verou
01210ef364 Implement .wa-invert, closes #497 (#508) 2025-01-14 10:04:27 -05:00
Lea Verou
40648e15fb Refactor: library.system.ts to export supported icons (#505) 2025-01-13 16:37:54 -05:00
Cory LaViska
ab67ecfad3 add native icon to search (#498) 2025-01-13 14:48:51 -05:00
Lea Verou
a07f6280a3 Themes category in docs (#477)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-13 13:14:12 -05:00
Lea Verou
6822b25772 Rewrite color scheme logic (#481)
- Minimize needless swaps
- Centralize logic
- Use an actual `<wa-select>` rather than hacking it with `<wa-dropdown>`
- Move shared includes to shared template
- Rewrite critical theme JS
- Refactor of theme picker code
- Utilize view transitions better and use them for color scheme too
- Do not store default value in localStorage
- Removed unused `*-wide` templates
- Fixed #482
2025-01-10 15:32:28 -05:00
Konnor Rogers
200188b0c3 properly report build failures (#485)
* properly report build failures

* prettier
2025-01-10 13:29:14 -05:00
Lea Verou
bc6fe95f13 npm run build:alpha:serve per @KonnorRogers suggestion 2025-01-10 13:13:01 -05:00
Lea Verou
3a33fa208a Add command for testing the build without having to push to Vercel 2025-01-10 13:13:01 -05:00
Lea Verou
3ec4e6de07 Fix build 2025-01-10 13:13:01 -05:00
Lea Verou
eb07dc1410 Use passthrough copy (#474) 2025-01-09 17:24:18 -05:00
Lindsay M
5bfeb8044e Theme showcase improvements (#480)
* Presentation improvements

* Change `-webkit-text-size-adjust` to supported value (`none` isn't a supported keyword on iOS)

* Try using `text-size-adjust`

* Throwing caution to the wind

* Give up on `text-size-adjust` and add 1-column view
2025-01-09 13:31:31 -05:00
lindsaym-fa
aa915c3e28 Doc revisions 2025-01-09 11:57:35 -05:00
Lea Verou
c79457a607 Attempt at better style isolation between themes
Still doesn't quite fix #475 but might be a nudge in the right direction.
2025-01-09 11:57:35 -05:00
Lea Verou
419f0610e4 Template-tweaks
- Move breadcrumbs to separate template
- Rename `beforeContent` to `header`
- Move breadcrumbs inside header
2025-01-09 02:26:01 -05:00
Cory LaViska
7ab5ca8640 3.0.0-alpha.8 2025-01-08 18:30:48 -05:00
Cory LaViska
c39faff936 update version (#473) 2025-01-08 18:17:31 -05:00
Lindsay M
6d31db57f6 Revise and add showcase to Themes doc (#456)
* Initial progress

* Make responsive

* quick fix to show theme name/description

* Small styling tweaks

* Documentation updates

* Revisions and improvements

* Avoid using static URLs 'cause that's ridiculous

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-01-08 17:33:09 -05:00
Lea Verou
21ed4f82b0 Improve UX of Layout section 2025-01-08 17:13:38 -05:00
Lea Verou
844e374a72 Fix #470 2025-01-08 16:23:34 -05:00
Lea Verou
e5f4c14608 Fix native select caret positioning, fixes #411 2025-01-08 15:58:33 -05:00
Lea Verou
1ad963f5ad wa-card styling fixes 2025-01-08 15:36:12 -05:00
Lea Verou
4476117932 Add default layout as a failsafe 2025-01-08 15:20:26 -05:00
Lindsay M
e52a7a5ce5 Pre-release theme touchup (#465)
* Fix themed card styles

* Improve lowered surface colors across themes
2025-01-08 15:04:27 -05:00
Lindsay M
fa66f4262d Fix mobile theme selector; fixes #440 (#446)
* Fix styling

* Fix mobile theme selector label
2025-01-08 15:01:20 -05:00
Lea Verou
a87f3627bb Fix #451 without changing logic/specificity 2025-01-08 15:00:45 -05:00
Cory LaViska
06e432589f change migration => tailspin (#463) 2025-01-08 13:59:27 -05:00
Cory LaViska
b4c4074ae1 fix mobile color picker bug (#462) 2025-01-08 13:49:57 -05:00
Lea Verou
19042fcca4 Decouple dark mode & theme, fixes #445 closes #385 (#457)
Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2025-01-08 12:50:29 -05:00
Lea Verou
8541369ae1 Fix #437 regression (#458) 2025-01-08 12:33:19 -05:00
Kelsey Jackson
31cfdf5704 Fixed radio button styling regression (#443)
* fixed styling regression

* Import missing appearance utilities

* Fix up radio button theme styles

* tweaked based on feedback

---------

Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-08 12:07:28 -05:00
Lindsay M
3511a60b93 Fix missing select styles, improve consistency (#450)
* Refactor for consistency, fix missing theme styles

* Remove unused custom properties from docs

* Add missing custom property to docs

* Add UI test case
2025-01-08 12:04:22 -05:00
Lindsay M
e55e091192 Fix caret color on slider tooltips (#448) 2025-01-08 12:03:16 -05:00
Lindsay M
09df23dff8 Use theme properties for color picker border (#449) 2025-01-08 10:02:18 -05:00
Lea Verou
f4a88c3b3a Harmonize updated() definitions
- Use proper type
- Use same argument name
- Ensure `super.updated()` is called
2025-01-07 17:39:56 -05:00
Cory LaViska
559efcd1d2 Fix switch's submitted value; fixes #409 (#442)
* fix switch's submitted value; fixes #409

* update tests
2025-01-07 17:01:27 -05:00
Lindsay M
e046015ed5 Theme cleanup (#414)
* formatting, docs tweaks

* FA theme cleanup

* Revert removal of `--wa-form-control-height-*`

* Classic theme cleanup

* Use consistent selectors for dark mode

* Clean slate for additional themes

* Retire depth stylesheets

* Move header styles for themer out of themes

* Missed instance of dark mode selector

* Migration theme cleanup

* Brutalist theme cleanup

* Changelog for new themes

* Playful theme cleanup

* Formatting

* Default theme update

* Add tests for form theming

* Fix test typo

* Change misnamed `multiplier` properties to `scale`

* Active theme cleanup

* Mellow theme cleanup

* Cleanup unused FA styles

* Glassy theme progress

* Add checked styles to glassy

* Fix typo

* Final FA theme cleanup

* Rename FA theme to 'Awesome', allow in alpha

* Final brutalist theme cleanup

* A few more brutalist tweaks

* One last brutalist tweak

* Final mellow theme cleanup

* Final Tailwind theme cleanup

* Final active theme cleanup

* Some classic theme cleanup

* Remove unused `--wa-form-control-height-*`

* Rename `--wa-form-control-resting-color` to `border-color`

* Touch up callout `appearance` styles

* Add more themes to alpha

* Add changelog for removal of `--wa-form-control-height-*`

* Clean up colors

* Final classic theme cleanup

* Add new themes to alpha build

* Re-add teal (used by Awesome theme)

* sync mobile/desktop theme pickers and don't dup IDs

* Remove `color/standard.css` (duplicates `/themes/default/color.css`)

* add view transition

* Add premium theme for later cleanup

* Accommodate new tag `appearance` styles

* Revise `--wa-form-control-height-*` changelog entry

Co-authored-by: Lea Verou <lea@verou.me>

* Improve `--wa-border-width-scale` description

Co-authored-by: Lea Verou <lea@verou.me>

* Better border docs

* Premium tweaks

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
Co-authored-by: Lea Verou <lea@verou.me>
2025-01-07 15:41:57 -05:00
Lea Verou
44dbdd14cc Separate WebAwesomeFormAssociatedElement (and friends) into a separate file 2025-01-07 14:23:20 -05:00
lindsaym-fa
5e3fed605e Add changelog 2025-01-07 11:56:19 -05:00
Lea Verou
4b4f2247c5 [Tag] Add appearance, closes #435 2025-01-07 11:56:19 -05:00
Lea Verou
eca15dc7fc Revamp <wa-card> HTML & CSS, fix #431 (#433)
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2025-01-07 10:12:32 -05:00
Lea Verou
eca444bbaa [Callout] Add appearance & size, closes #422 (#432)
Co-authored-by: lindsaym-fa <dev@lindsaym.design>
2025-01-07 09:38:28 -05:00
Lea Verou
f39308dbc5 Allow customization of outlined styles, fixes #412 (#426) 2025-01-06 17:35:57 -05:00
Lea Verou
fc84e1a50d Replace M form control height with size-dependent height (#425) 2025-01-06 17:10:11 -05:00
Lea Verou
ef7d47e2b9 [Docs] Move commonalities across blocks to a single base layout (#424) 2025-01-06 17:01:29 -05:00
Lea Verou
a9af3172ad Rename Range to Slider (#428) 2025-01-06 16:44:43 -05:00
konnorrogers
cde8bea97a test commit 2025-01-06 13:24:54 -05:00
Kelsey Jackson
33b4045dad tweaked the tag component (#407)
* tweaked the tag component

* updated based on feedback

* updated to remove span

* changed display to initial

* prettier

---------

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2025-01-06 13:23:47 -05:00
Cory LaViska
bc4ad39f2e Fix tests (#410)
* skip broken test

* add middleware to follow new stylesheet imports

* fix avatar tests

* update badge tests

* fix button tests

* skip carousel test

* fix checkbox tests

* fix details test

* update radio button tests

* fix input tests

* fix progress bar tests

* update

* fix range tests

* fix select tests

* restore wrapper div to pass a11y tests

* fix switch tests

* fix tag tests

* fix textarea tests

* fix tooltip tests

* skips

* fix tree item tests

* [DRAFT]: test fixes (#421)

* working on some stuff..

* add a small delay for menu-item

* prettier

* add a small delay for menu-item

* prettier

* add a small delay for menu-item

* add a small delay for menu-item

* add a small delay for menu-item

* prettier

* Empty commit

* add a small delay for menu-item

* always build with alpha

* always build with alpha

* move to alpha builds

---------

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2025-01-06 13:13:34 -05:00
Konnor Rogers
b868b1e8fc fix alpha builds (#423)
* fix alpha builds

* Update docs/_includes/sidebar-group.njk

Co-authored-by: Lea Verou <lea@verou.me>

* Update docs/_includes/sidebar-group.njk

Co-authored-by: Lea Verou <lea@verou.me>

---------

Co-authored-by: Lea Verou <lea@verou.me>
2025-01-06 12:53:47 -05:00
Lea Verou
e916d771b0 Ensure --box-shadow & --border-width defaults are always set on the root stylable element, fixes #419 2025-01-06 12:41:28 -05:00
lindsaym-fa
bd6fe74c7d Fix missing input value styles 2025-01-04 16:42:45 -05:00
Lea Verou
ac7437894a Automate all overviews, fix bugs with filtering 2025-01-03 20:17:19 -05:00
Lea Verou
55ebe6e20b Add e-commerce tag, for overview 2025-01-03 20:14:51 -05:00
Lea Verou
e6388e7671 Let sort filter provide missing values so we can specify large values to place elements at the end 2025-01-03 19:20:49 -05:00
Lea Verou
9a21ae6f52 Make sure unlisted page cards never show up 2025-01-03 19:02:31 -05:00
Lea Verou
cd3386ce78 Exclude unlisted pages properly 2025-01-03 18:51:16 -05:00
Lea Verou
26b9bbb515 Automate Theming listing 2025-01-03 18:44:11 -05:00
Lea Verou
bda0ec0313 Overviews don't need to be MD files
And having them as MD files can insert pointless `<p>` tags if we're not careful, which can cause weird bugs.
2025-01-03 18:27:07 -05:00
Lea Verou
2490fbeaca attr filter for nicer optional attributes 2025-01-03 18:12:41 -05:00
Lea Verou
297149021e Add {% markdown %} paired shortcode 2025-01-03 17:45:26 -05:00
Lea Verou
c700c3ec09 Components index doesn't actually need to be a MD file
And having it as a MD file can insert pointless `<p>` tags if we're not careful, which can cause weird bugs.
2025-01-03 16:13:02 -05:00
Lea Verou
b383d8bf2d Move e-commerce patterns under E-commerce
As discussed on Slack with @kelseythejackson
2025-01-03 16:08:24 -05:00
Lea Verou
1dcf895be1 Don’t render children on the top level as well 2025-01-03 16:00:36 -05:00
Lea Verou
19fd55ca97 fix: noAlpha, not isAlpha 2025-01-03 15:58:42 -05:00
Lea Verou
fa094d924d Automate sidebar listings 2025-01-03 15:52:58 -05:00
Lea Verou
2a957e6316 Add layout and isAlpha to pattern pages automatically 2025-01-03 15:52:27 -05:00
Lea Verou
90b6a9a8ac Add status as computed data on component pages 2025-01-03 15:02:36 -05:00
Lea Verou
99fdd90601 [Select] Remove leftover code
The select uses the appearance utils, so this is done automatically.
2025-01-03 14:23:09 -05:00
Lea Verou
ecaa461638 [Select] Remove leftover code, rel #413
This was meant to be deleted, since there’s already `min-height: var(--wa-form-control-height);` above it which already responds to size.
2025-01-03 14:14:39 -05:00
lindsaym-fa
d3a65ee35d Fix typo 2025-01-03 09:37:39 -05:00
lindsaym-fa
8ab1489cc4 Simplify shadow scales 2025-01-02 15:59:04 -05:00
lindsaym-fa
093c42ce66 Revise changelog for border radius and width tokens 2025-01-02 15:50:09 -05:00
lindsaym-fa
ed3e7014e3 Simplify border radius scale 2025-01-02 15:37:09 -05:00
Cory LaViska
7db62766dc update changelog 2025-01-02 10:23:43 -05:00
Cory LaViska
2de515bce7 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2025-01-02 10:23:07 -05:00
Cory LaViska
80949c2988 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2025-01-02 10:23:05 -05:00
Konnor Rogers
c7a35afefb fix wa-split utility (#395) 2025-01-02 10:12:44 -05:00
Cory LaViska
89dd462720 backport SL-2318 2025-01-02 10:02:10 -05:00
Cory LaViska
ce40d5e997 Merge pull request #396 from shoelace-style/konnorrogers/fix-switch-checked-property
Fix switch dirty checking to behave like checkbox
2025-01-02 09:33:03 -05:00
Cory LaViska
752cbb2f16 Merge branch 'next' into konnorrogers/fix-switch-checked-property 2025-01-02 09:32:54 -05:00
Cory LaViska
2048df8a40 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2025-01-02 09:31:29 -05:00
Cory LaViska
beace5a611 backport SL-2329 2025-01-02 09:31:26 -05:00
Konnor Rogers
1a8908acf7 prettier 2024-12-23 16:39:32 -05:00
Konnor Rogers
812badd721 fix switch 2024-12-23 16:39:16 -05:00
Lea Verou
8142da95d8 Update sidebar.njk 2024-12-23 02:20:39 -05:00
Lea Verou
546c9c67b4 Hide cheatsheet from components sidebar 2024-12-23 02:18:59 -05:00
Lea Verou
d5fe23ab39 Add missing icons 2024-12-23 02:17:39 -05:00
Lea Verou
3b10933151 Automate listing in components index page 2024-12-23 02:15:48 -05:00
Lea Verou
51a416718d sidebar should be using components tag 2024-12-23 02:15:25 -05:00
Lea Verou
08f327c224 [docs.css] Remove duplicate code, use CSS nesting for .index.grid 2024-12-23 01:58:10 -05:00
Konnor Rogers
b196ccc0bc Merge pull request #394 from shoelace-style/next
next -> alpha
2024-12-22 06:14:28 -05:00
Konnor Rogers
c62eed16aa fix missing components and format number (#393) 2024-12-22 06:12:44 -05:00
Lea Verou
e982c10987 Move grouping logic to separate subtemplate and use it on layout too 2024-12-20 18:29:28 -05:00
Lea Verou
23af07bcd5 Temp fix for spacing issue 2024-12-20 17:49:44 -05:00
Lea Verou
6aca515024 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 17:44:12 -05:00
Lea Verou
7d3f8b175c Separate native styles page for elements that correspond to a separate WA component 2024-12-20 17:44:10 -05:00
Cory LaViska
e2acfd106f fix padding in codepen examples 2024-12-20 15:39:30 -05:00
Cory LaViska
cfd282df4b update version 2024-12-20 14:05:02 -05:00
Cory LaViska
d0567c7ae9 3.0.0-alpha.7 2024-12-20 14:04:13 -05:00
Lea Verou
f076dd1afa Usage -> Installation 2024-12-20 14:02:35 -05:00
Lea Verou
83fb761d41 Rename applied.css to docs and add some docs on usage 2024-12-20 14:01:14 -05:00
Cory LaViska
fd337dd1ee not true anymore 2024-12-20 13:40:39 -05:00
Lea Verou
22883021e9 Fix typo 2024-12-20 13:37:10 -05:00
Lea Verou
02b72f991b Mark rounding utils as WIP and change title to Rounding 2024-12-20 13:32:40 -05:00
Lea Verou
84734a56b6 Add class names to utility class pages 2024-12-20 13:20:06 -05:00
Cory LaViska
c159964490 update changelog 2024-12-20 13:17:22 -05:00
Cory LaViska
5c8e044f4d 3.0.0-alpha.6 2024-12-20 13:16:45 -05:00
Lea Verou
a238880dbe Allow utilities to have statuses too 2024-12-20 13:14:37 -05:00
Lea Verou
307c989e3b Add examples for native buttons in button group 2024-12-20 13:06:17 -05:00
Cory LaViska
c33d17b4a2 fix search styles 2024-12-20 12:59:58 -05:00
lindsaym-fa
9d3e2bd214 Fix giant homepage icons (#380) 2024-12-20 12:46:30 -05:00
Lea Verou
6e99787425 Add properties for border-radius overrides and use them to fix #348 in a better way, also closes #379 and improves #374 2024-12-20 12:26:47 -05:00
Lea Verou
43a1179513 Automate layout page listing 2024-12-20 12:00:43 -05:00
Lea Verou
8887056651 If you say pill, we should assume you really mean it :P Fixes #378 2024-12-20 11:44:29 -05:00
Lea Verou
ec3251d0c6 Utilities index pages 2024-12-20 11:37:15 -05:00
Lea Verou
f5ac87c8a3 Cards for native styles 2024-12-20 11:22:21 -05:00
Lea Verou
a3d8f712ce Remove visually-hidden component, add its icon to the util 2024-12-20 11:22:21 -05:00
Cory LaViska
0fdf4e0f4d Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 11:19:05 -05:00
Lea Verou
013cf46be8 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 11:10:59 -05:00
Lea Verou
cbd74eded2 Native <progress> styles 2024-12-20 11:10:57 -05:00
lindsaym-fa
960c6d8da3 Add descriptions for utilities 2024-12-20 11:07:51 -05:00
Cory LaViska
ef81c77c60 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 11:05:43 -05:00
Cory LaViska
01918ca784 fix button alignment in button groups 2024-12-20 11:05:32 -05:00
Lea Verou
b0bb014167 Statuses 2024-12-20 10:58:45 -05:00
Lea Verou
9f12c1d9ab Temp workaround for #376 2024-12-20 10:55:53 -05:00
lindsaym-fa
4456a8df5c Add descriptions for native styles 2024-12-20 10:36:22 -05:00
Cory LaViska
8e7816f308 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 10:33:12 -05:00
Cory LaViska
3861041bc1 fixes #350 2024-12-20 10:33:10 -05:00
Lea Verou
e29ae5d18e No, button groups shouldn't wrap 2024-12-20 10:15:29 -05:00
Cory LaViska
6ef2e92923 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-20 10:07:30 -05:00
Cory LaViska
562fec9ac7 fix component section in alpha 2024-12-20 10:07:27 -05:00
Cory LaViska
b38568f5c5 fix dropdown examples 2024-12-20 10:07:19 -05:00
Lea Verou
c0012f5b94 Fix dropdown in button-group rounding, closes #348 2024-12-20 10:03:03 -05:00
lindsaym-fa
41ee75bbfe Fix capitalization 2024-12-20 09:45:23 -05:00
Lea Verou
54f7916ddb Simplify progress bar CSS & DOM (still doesn't fix the transition in Safari but working on it) 2024-12-20 08:41:14 -05:00
Konnor Rogers
e170b488ea fix label position docs (#371) 2024-12-19 22:08:53 -05:00
Lea Verou
cd172ede8c Docs for visually hidden util, remove visually hidden component per #232 2024-12-19 21:15:33 -05:00
Konnor Rogers
d1b38af039 fix textarea jank (#370)
* fix textarea jank

* prettier
2024-12-19 20:52:05 -05:00
Lea Verou
506fb2588b Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-19 19:49:13 -05:00
Lea Verou
123a8c331f Restrict what default slot things <wa-page> adds spacing to, related to #331 2024-12-19 19:49:11 -05:00
Lea Verou
1a1847eeb5 Update search dialog styles to new simpler structure, closes #331 2024-12-19 19:48:38 -05:00
Konnor Rogers
835326a2db fix delayed button loading (#369)
* fix delayed button loading

* fix delayed button loading
2024-12-19 19:13:08 -05:00
lindsaym-fa
1905ca9b77 Capitalize "Style Utilities" 2024-12-19 18:54:12 -05:00
lindsaym-fa
fc3688df97 Fix closable tab example (#363) 2024-12-19 17:55:57 -05:00
Lea Verou
107f074f99 Page utils & native styles 2024-12-19 17:34:32 -05:00
lindsaym-fa
5d3e58bde0 Fix #361 2024-12-19 16:58:06 -05:00
lindsaym-fa
f5b8f2257d Fix specificity of gap and align-items in layout utilities 2024-12-19 16:51:55 -05:00
Lea Verou
52c0fdf6de Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-19 16:37:57 -05:00
Lea Verou
c2c42f56ba Docs for size utils 2024-12-19 16:37:55 -05:00
lindsaym-fa
328d6989d9 Set default color for dark theme 2024-12-19 16:34:36 -05:00
lindsaym-fa
49465c9a1d Fix form control label margin 2024-12-19 16:26:06 -05:00
lindsaym-fa
394a028973 Consolidate native form styles 2024-12-19 15:58:31 -05:00
lindsaym-fa
431d23d420 Fix range disabled and focus styles 2024-12-19 15:46:30 -05:00
Lea Verou
c230a42053 Fix filename 2024-12-19 15:30:48 -05:00
Lea Verou
378f100729 Update changelog.md 2024-12-19 15:30:38 -05:00
Cory LaViska
87314f8864 Merge pull request #364 from shoelace-style/konnorrogers/fix-safari-placeholder
fix safari placeholder
2024-12-19 15:01:47 -05:00
konnorrogers
70a8fc6425 fix safari placeholder 2024-12-19 14:28:35 -05:00
Konnor Rogers
486b0649e0 fix code demo with empty slot (#360)
* fix code demo with empty slot

* prettier
2024-12-19 14:12:55 -05:00
Lea Verou
63a2367cc5 Docs for color and appearance variants 2024-12-19 14:04:15 -05:00
Lea Verou
995d0f2af4 First stab at variant utils docs 2024-12-19 13:50:12 -05:00
Lindsay M
874bb5cbf6 Fix missing input and textarea styles in Firefox and Safari (#339)
* initial fix

* fix disabled styles in all browsers

* simpler fix
2024-12-19 13:32:30 -05:00
Lea Verou
15495bd9bd Automate theming sidebar block 2024-12-19 13:05:59 -05:00
Cory LaViska
f4678e12c6 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-19 12:43:31 -05:00
Cory LaViska
2bf7ebbb71 fixes #343; fixes #341 2024-12-19 12:43:29 -05:00
Lea Verou
68e53a4ef1 Automatic util listing on sidebar 2024-12-19 12:40:04 -05:00
Lea Verou
0f0b9d50cd Move all utilities under /utilities/
Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2024-12-19 12:40:04 -05:00
Lea Verou
5d13583da7 Update sort filter to take multiple keys into account in order of priority, default to order, then title
And use `order` on Page
2024-12-19 12:40:04 -05:00
Lea Verou
f99f32d054 Refactor: sort filter 2024-12-19 12:40:04 -05:00
Lea Verou
39acaeba70 Refactor: move sort filter to filters.js 2024-12-19 12:40:04 -05:00
Cory LaViska
e87c725e07 fixes #344 2024-12-19 12:38:49 -05:00
Cory LaViska
31a3421709 fixes #332 2024-12-19 12:15:34 -05:00
Cory LaViska
5d1fb7c477 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-19 11:19:51 -05:00
Lea Verou
13e606c1cb Native color-picker styles 2024-12-19 10:16:23 -05:00
lindsaym-fa
42dd64f397 Fix layout and add description to Native Styles 2024-12-19 10:13:16 -05:00
Kelsey Jackson
53e87e4dcd Remove :required content styles for native elements
* fixed label ::after

* removed label styles
2024-12-19 10:00:39 -05:00
Lea Verou
dabaef3fab The big rename nobody wants to do :P 2024-12-19 04:03:44 -05:00
Lea Verou
d5939efc30 Refactor table styles
- Use hueless color tokens so it can be used with variants (and add example)
- Fix hover effect on zebra rows
- Reduce padding a bit
- Shorten utility class
- CSS nesting
2024-12-19 03:53:54 -05:00
Lea Verou
d345878de6 Remove *--disabled classes, use regular selectors 2024-12-19 03:24:18 -05:00
lindsaym-fa
609578ff30 Fix typo 2024-12-19 03:08:37 -05:00
lindsaym-fa
648137a964 Add native select styles and share with <wa-select> 2024-12-19 03:06:31 -05:00
Lea Verou
cd487bf8be Use :dir() in CSS rather than custom RTL classes 2024-12-19 02:17:55 -05:00
Lea Verou
239ddcf75d Simplify RTL handling with logical properties 2024-12-19 02:13:17 -05:00
Lea Verou
ad2e945e44 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-19 02:01:39 -05:00
Lea Verou
11f7adefc2 Remove no longer needed hasFocus in all but color-picker 2024-12-19 02:01:30 -05:00
lindsaym-fa
909986b520 Tweak checkbox styles 2024-12-19 01:44:52 -05:00
lindsaym-fa
8de5fc9580 *Actually* add radio styles 2024-12-19 01:44:28 -05:00
lindsaym-fa
197aedcc70 Add radio styles and share with <wa-radio> 2024-12-19 01:43:56 -05:00
Lea Verou
491533e09c Merge textarea & input styles
Also simplify textarea component DOM
2024-12-19 01:38:39 -05:00
Lea Verou
474d8d7c7b Remove wa-off 2024-12-19 01:38:07 -05:00
Lea Verou
8d83076ef2 Fix transition 2024-12-19 00:59:00 -05:00
Lea Verou
e69632ff60 [Input] Several improvements
- Simplify styles and DOM
- Add `.wa-text-field` utility class
- Eliminate `--border-color` (except when set by appearance utils), `--border-style`, `--border-radius`
2024-12-19 00:39:23 -05:00
Lea Verou
996fa6df57 Import appearance helpers in elements with newly acquired appearance attribute 2024-12-19 00:39:23 -05:00
Konnor Rogers
239782a7d8 add proper dependencies to wa-page (#337)
* add proper dependencies to wa-page

* add proper dependencies to wa-page
2024-12-18 23:40:14 -05:00
Konnor Rogers
7d3a629a1e fix host context selectors for unsupported browsers (#335)
* fix host context selectors

* fix textarea value being lost

* fix textarea

* fix example

* fix textarea value being lost
2024-12-18 23:27:50 -05:00
lindsaym-fa
067ae799fd Add native textarea styles and share with <wa-textarea> 2024-12-18 22:33:24 -05:00
Lea Verou
ea165cb477 Now that all sizeable form controls use the size util, simplify form-control.css 2024-12-18 21:42:55 -05:00
Lea Verou
d33b5c4870 [Switch] Simplify DOM & CSS 2024-12-18 21:33:52 -05:00
Lea Verou
96db264724 [Switch] Use size utils 2024-12-18 21:09:22 -05:00
Lea Verou
dda4575aa4 [color-picker] Use size util 2024-12-18 21:06:52 -05:00
Lea Verou
2322762cc6 [Input] Remove unnecessary classes, simplify DOM 2024-12-18 20:56:30 -05:00
Lea Verou
4a14eb3282 Calculate form control height in size util 2024-12-18 20:48:25 -05:00
Lea Verou
931faf911c Use size helper in input 2024-12-18 20:34:55 -05:00
Lea Verou
f4db1e37e0 No need for fallback any more 2024-12-18 20:34:45 -05:00
Lea Verou
833b7b1207 Update tag.css 2024-12-18 20:33:47 -05:00
Lea Verou
622ee91323 Fix tag glitch 2024-12-18 20:12:28 -05:00
Lea Verou
d206414825 Make size utils root-level so there's always a default value 2024-12-18 20:09:31 -05:00
Lea Verou
73d26ece05 Clean up CSS structure 2024-12-18 19:40:52 -05:00
Lea Verou
3b90a1cc31 Native slider! 2024-12-18 19:36:26 -05:00
Lea Verou
289ce105dc Fix build 2024-12-18 18:59:39 -05:00
Lea Verou
deb2752d35 Refactor range styles to prepare for native ranges 2024-12-18 18:58:21 -05:00
lindsaym-fa
df4393e033 Fix native label spacing 2024-12-18 18:09:58 -05:00
Konnor Rogers
cf34747701 fix layout demo and custom states support (#318)
* fix demo

* fix linting errors

* remove jinja, run prettier

* prettier
2024-12-18 17:08:38 -05:00
lindsaym-fa
ad467f0691 Add native details styles and share with <wa-details> 2024-12-18 17:02:25 -05:00
Kelsey Jackson
142403fe78 changed disply on label 2024-12-18 15:20:07 -06:00
Cory LaViska
60f2b9657b remove base from docs 2024-12-18 15:09:46 -05:00
Lea Verou
a41787d23a Remove opt-out class, add docs on opting out, closes #300 2024-12-18 14:18:30 -05:00
Lea Verou
252adbd830 filledappearance=filled rel #330 2024-12-18 14:18:30 -05:00
lindsaym-fa
c8db30fa0f Add native checkbox styles and share with <wa-checkbox> 2024-12-18 14:09:09 -05:00
Lea Verou
fa415005eb Rename tintedfilled 2024-12-18 13:11:40 -05:00
Cory LaViska
ba8046bff5 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-18 13:08:57 -05:00
Cory LaViska
948254dd29 remove SSR in dev mode 2024-12-18 13:08:55 -05:00
Lea Verou
82b799c1a4 Prettier 2024-12-18 13:05:08 -05:00
Lea Verou
358444bc1d Remove poorly working Prettier Jinja plugin 2024-12-18 13:02:27 -05:00
Lea Verou
dbab4ae645 Rename filledaccent (rel #330) 2024-12-18 12:58:06 -05:00
Lea Verou
f5ed55513b textplain (for appearance and utils) rel #330 2024-12-18 12:51:13 -05:00
Lea Verou
d6fb269381 Add reference to button essentials in button component and vice versa 2024-12-18 12:49:16 -05:00
Lea Verou
3734f9cea5 Essential Dialog docs
Essentials page for dialog
2024-12-18 11:15:52 -05:00
Lea Verou
5a058a8808 Revamp dialog styles, port to Essentials
Refactor dialog CSS

Add native dialog stub
2024-12-18 11:15:52 -05:00
Lea Verou
e2d99e3c86 Refactor: animateWithClass() 2024-12-18 11:15:52 -05:00
Lea Verou
e74edd8f68 Element description, just like components 2024-12-18 11:15:52 -05:00
Cory LaViska
d961203d17 fix styles 2024-12-18 11:06:13 -05:00
Lea Verou
be752371a6 Revert back to has any sibling 2024-12-17 18:41:46 -05:00
Lea Verou
af3b83318b Cross linking between Essentials and Components 2024-12-17 18:06:54 -05:00
Lea Verou
b0cd38e2c5 Tweak spacing to have more reasonable spacing for callout
cc @lindsaym-fa
2024-12-17 18:06:54 -05:00
Cory LaViska
0d8d718b7a Merge pull request #317 from shoelace-style/component-search
Add search filter to component index page
2024-12-17 16:49:01 -05:00
Lea Verou
54687046ab Use .wa-off-deep for deep opt-out
Rel #300
2024-12-17 16:40:45 -05:00
Lea Verou
22529870f4 Failed attempt to get Prettier to work with .njk files 2024-12-17 16:22:42 -05:00
Lea Verou
8aafea456d Flesh out Essentials pages a little (still heavily WIP) 2024-12-17 16:22:11 -05:00
Lea Verou
cfb70f2135 Remove invalid </input> 2024-12-17 15:54:22 -05:00
Lea Verou
1d02644996 [Essentials] Write index page 2024-12-17 15:53:33 -05:00
Lea Verou
312809a766 First stab at breaking down essentials into multiple pages
Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2024-12-17 15:17:25 -05:00
Lea Verou
5e221f6c3a Remove empty page 2024-12-17 14:50:17 -05:00
Lea Verou
232734563f Formatting 2024-12-17 14:47:24 -05:00
Cory LaViska
5cbc64ad4f fix link to size.css 2024-12-17 14:46:13 -05:00
Cory LaViska
35858e0549 ugh, modal 2024-12-17 14:46:08 -05:00
Cory LaViska
752b8d462e add empty state 2024-12-17 14:41:11 -05:00
Lea Verou
1da80bee80 Fix custom parents in breadcrumbs 2024-12-17 14:38:02 -05:00
Cory LaViska
315dd40734 add search filter 2024-12-17 14:27:33 -05:00
Lea Verou
5a82b7ad99 Remove BEM-style namespaces on class names (#316) 2024-12-17 13:46:39 -05:00
Cory LaViska
1a29875940 Merge pull request #315 from shoelace-style/konnorrogers/fix-component-reloading
fix component reloading
2024-12-17 13:27:23 -05:00
konnorrogers
be0631bd3e fix component reloading 2024-12-17 13:22:10 -05:00
Lea Verou
e882102aff Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 13:00:57 -05:00
Lea Verou
97c0470f13 First stab at breadcrumbs (no custom parents yet) 2024-12-17 13:00:55 -05:00
Cory LaViska
47badda35c Merge pull request #314 from shoelace-style/custom-states
Custom states
2024-12-17 12:20:10 -05:00
Cory LaViska
b2353ca9bd remove try/catch 2024-12-17 12:18:40 -05:00
Cory LaViska
65310be0b0 Merge branch 'next' into custom-states 2024-12-17 12:14:29 -05:00
Cory LaViska
ac9960c1f0 Merge pull request #296 from shoelace-style/konnorrogers/fix-turbo-2
Fix turbo caching on script tag
2024-12-17 12:13:57 -05:00
Cory LaViska
b9393068a7 Merge branch 'next' into custom-states 2024-12-17 12:13:32 -05:00
Cory LaViska
9c216f60ff Merge pull request #312 from shoelace-style/konnorrogers/remove-unnecessary-plugin
remove unnecessary plugin
2024-12-17 12:13:10 -05:00
Cory LaViska
ce65a49dbe Merge branch 'next' into konnorrogers/remove-unnecessary-plugin 2024-12-17 12:13:02 -05:00
Cory LaViska
e973b599aa add links; fixes #313 2024-12-17 12:10:11 -05:00
Cory LaViska
9979028d7e fix smooth scroll bug 2024-12-17 12:09:45 -05:00
Cory LaViska
d09ea4a73a add section for custom states 2024-12-17 12:09:36 -05:00
Lea Verou
1bf83499b0 Refactor: Move 11ty filters to separate file 2024-12-17 12:08:55 -05:00
lindsaym-fa
9c4e4a2280 Use appearance for alpha badge 😁 2024-12-17 11:57:32 -05:00
Cory LaViska
f8e61f72c4 fix typo 2024-12-17 11:53:30 -05:00
lindsaym-fa
d08b95378a Fix custom button styles 2024-12-17 11:50:50 -05:00
lindsaym-fa
c1153708f6 Fix link button appearance 2024-12-17 11:47:59 -05:00
Cory LaViska
d676c1b569 update changelog 2024-12-17 11:46:05 -05:00
Cory LaViska
77f50a4890 fix part name 2024-12-17 11:46:00 -05:00
Cory LaViska
24e2b47ff1 fix part name 2024-12-17 11:45:56 -05:00
Cory LaViska
651c38afbf use states instead of parts 2024-12-17 11:45:45 -05:00
Cory LaViska
2dec73b2c5 hoist internals and custom state methods to WebAwesomeElement 2024-12-17 11:43:51 -05:00
Cory LaViska
ad36ba5569 rename part 2024-12-17 11:34:18 -05:00
Cory LaViska
1855d1b809 update tests to use :state() 2024-12-17 11:30:19 -05:00
Cory LaViska
543fa3c85c update tests to check states 2024-12-17 11:30:07 -05:00
Cory LaViska
fe05300bdc use :state() 2024-12-17 11:29:59 -05:00
Cory LaViska
0eebf44292 move custom states 2024-12-17 11:29:47 -05:00
Cory LaViska
7c40243da3 add custom state types to wa form control 2024-12-17 11:26:33 -05:00
Cory LaViska
4a046684c8 add comments and fix hasCustomState 2024-12-17 11:22:49 -05:00
Lea Verou
49eeca1617 Update callout.css 2024-12-17 11:20:54 -05:00
Cory LaViska
88e2af266f update docs and tests 2024-12-17 11:18:43 -05:00
Cory LaViska
0bcc788752 remove data- attribute fallback for states 2024-12-17 11:13:20 -05:00
Cory LaViska
5d687f1aa0 add custom states to checkbox/radio 2024-12-17 11:12:40 -05:00
Cory LaViska
8fbd0b54e4 update changelog 2024-12-17 11:10:10 -05:00
Cory LaViska
37a1680a85 move states 2024-12-17 11:10:04 -05:00
Cory LaViska
2b0acca219 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 10:57:42 -05:00
Cory LaViska
5293f0fa63 downgrade esbuild 2024-12-17 10:57:23 -05:00
Lea Verou
7d52f00d8d Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 10:46:55 -05:00
Lea Verou
f8e367a5e7 Move size utils to style/utilities/ 2024-12-17 10:46:40 -05:00
Cory LaViska
b9541ba2e0 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 10:44:54 -05:00
Cory LaViska
25ee6ef1ad fix ts errors 2024-12-17 10:44:40 -05:00
Cory LaViska
45cb5598fc add update script and update non-breaking deps 2024-12-17 10:44:28 -05:00
Cory LaViska
a6bf9ea58c add terms 2024-12-17 10:44:11 -05:00
Lea Verou
1e1877c954 --content-color ➡️ --text-color
Harmonize with other properties for the same thing
2024-12-17 10:41:51 -05:00
Lea Verou
47c9f43954 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 10:39:52 -05:00
Lea Verou
2136fed4cb --label-color ➡️ --text-color
As we move towards using these helpers more widely, `--label-color` doesn't quite make sense
2024-12-17 10:39:47 -05:00
Cory LaViska
4b6baa93a6 remove AI note 2024-12-17 10:13:54 -05:00
Lea Verou
ef4cbd915d Tidy up 2024-12-17 04:31:46 -05:00
Lea Verou
d9b8fc6806 Prettier 2024-12-17 04:29:37 -05:00
Lea Verou
6bb6bcc538 Simplify tag
- Drop `base`, rel #207
- Use size helper
- Drop classes duplicating attributes
2024-12-17 04:27:32 -05:00
Lea Verou
e60a5032da Remove classes no longer needed 2024-12-17 04:07:45 -05:00
Lea Verou
a6b71e119c Use variant helper in tag & callout 2024-12-17 04:06:47 -05:00
Lea Verou
8e01281c12 Leftover 2024-12-17 04:01:24 -05:00
Lea Verou
a31de87882 [Avatar] Simplify HTML & CSS, drop base (rel #207) 2024-12-17 03:58:58 -05:00
Lea Verou
dbfaa4299f [Avatar] Drop BEM 2024-12-17 03:40:28 -05:00
Lea Verou
78432c41d8 Better appearance combinations 2024-12-17 03:22:31 -05:00
Lea Verou
0d003c0309 Fix build 2024-12-17 03:06:18 -05:00
Lea Verou
0a796d618f Badge appearances! 2024-12-17 03:04:44 -05:00
Lea Verou
84909930fb Simplify badge HTML & styles 2024-12-17 03:04:36 -05:00
Lea Verou
cbab3b09e5 Move appearance utils to separate file 2024-12-17 03:03:55 -05:00
Lea Verou
8a321951d3 Fix wording 2024-12-17 03:03:28 -05:00
Lea Verou
4852f5614f Use variant helper to simplify badge styles 2024-12-17 02:22:28 -05:00
Lea Verou
87621ef109 Rename variant color tokens to be wa- prefixed, since we specify them on :root too 2024-12-17 02:22:08 -05:00
Lea Verou
6a9c7dd2bc Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-17 02:03:06 -05:00
Lea Verou
1fb8088fc8 Essentials page for button 2024-12-17 02:03:01 -05:00
Lea Verou
27c58637eb Revamp button styles
- More style sharing between native buttons & button component
- Fix radio button styling
- Better ability to style button from the outside (without `::part(base)`)
- Orthogonal variant + appearance
2024-12-17 02:02:30 -05:00
Lea Verou
426a242d26 Define button-group util and use it in button-group and radio-group 2024-12-17 01:57:48 -05:00
Lea Verou
7a7a7abe78 Add size & variant utils to Applied CSS 2024-12-17 01:55:17 -05:00
Lea Verou
aade89b66e Remove unused class 2024-12-17 01:54:32 -05:00
Lea Verou
771a1559ef Fix typo 2024-12-16 22:08:38 -05:00
lindsaym-fa
74ae758819 Add native input styles and share with <wa-input> 2024-12-16 19:32:35 -05:00
Lea Verou
5e2081451d Add --space-smaller to size utility 2024-12-16 15:41:33 -05:00
Lea Verou
1ffdc19305 Add variants.css (not yet linked from anywhere) 2024-12-16 15:41:33 -05:00
Lea Verou
6996d17531 Replace font-size variable with 1em
Revert "Replace font-size variable with `1em`"

This reverts commit 1ac70f31abe2bab310bbfbdbb3aa5d4498c5648d.

Replace font-size vars with 1em when calculating form control height
2024-12-16 15:41:33 -05:00
Cory LaViska
1e3b93d579 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-16 14:38:25 -05:00
Cory LaViska
70fab26e6b empty styles for these components 2024-12-16 14:38:22 -05:00
konnorrogers
725fb1f013 remove unnecessary plugin 2024-12-16 14:05:29 -05:00
Lea Verou
6d4c8e5942 Simplify Classic theme using the new CSS files 2024-12-16 13:21:27 -05:00
Lea Verou
b6e0ca5d45 --*-multiplier to --*-scale
As discussed with @lindsaym-fa

Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2024-12-16 12:50:37 -05:00
Lea Verou
35571c1d4e Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-16 12:46:59 -05:00
Lea Verou
82a5aff8db Split default theme tokens into separate CSS files
As discussed with @lindsaym-fa last week. Hopefully this will eventually help reduce duplication across themes.

Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2024-12-16 12:46:57 -05:00
Cory LaViska
e74a30f62a prettier 2024-12-16 12:45:25 -05:00
Lindsay M
11d3a73f05 Add native button styles and share with <wa-button> (#310) 2024-12-16 12:18:45 -05:00
Lea Verou
9fefb6d65a [Native details] Refactor to use nesting and opt-out
Rel #300
2024-12-16 11:51:40 -05:00
Lea Verou
4b18c74b83 [Details] Add RTL example 2024-12-16 11:50:41 -05:00
Lea Verou
f739c6c143 Fix details tests 2024-12-16 11:17:58 -05:00
Lea Verou
9739aceb9f Fix select tests 2024-12-16 11:16:42 -05:00
Lea Verou
afde497a1a [Docs] Collapse "Components" by default, except when viewing a page in /components/ 2024-12-16 11:14:18 -05:00
Lea Verou
666f1e5d52 Fix #309 for reals this time 2024-12-16 11:13:07 -05:00
Lea Verou
1013e83032 [Details] Fix interactive elements in summary, closes #309 2024-12-16 11:10:13 -05:00
Lea Verou
b15d938c7e Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-16 10:49:09 -05:00
Lea Verou
c066c5f30b [Details] Revamp CSS, simplify part names
First component to use the `display: contents` trick discussed in #207
2024-12-16 10:48:56 -05:00
Cory LaViska
abbfd9b43d remove eslint from gh actions 2024-12-16 10:39:25 -05:00
Cory LaViska
ee0167a059 fix jsdoc 2024-12-16 10:29:46 -05:00
Lea Verou
f86c07bdab Automate component navigation 2024-12-16 09:42:24 -05:00
Lea Verou
699595496e [Page] CSS utilities: .wa-mobile-only and .wa-desktop-only 2024-12-16 07:55:28 -05:00
Lea Verou
fa42764a4b Automatically hide [data-toggle-nav] on desktop view 2024-12-16 07:53:35 -05:00
Lea Verou
15bbafd631 Fix typo 2024-12-16 07:44:01 -05:00
Lea Verou
9423178df5 Tweaks to <details> styles 2024-12-16 07:18:02 -05:00
Lea Verou
9260d35b4c Split Applied CSS out to make it easier to manage and share w/ components
As discussed with @lindsaym-fa
Still unsure about some of these (especially about whether blockquote & details should be separate) but I figured better go ahead and split and we can fine tune later

Co-Authored-By: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2024-12-16 06:55:01 -05:00
Lea Verou
10156a8218 Add log filter for easier debugging of templates 2024-12-16 06:27:25 -05:00
Lea Verou
d0574677c1 Fix a couple types that were throwing off the CEM 2024-12-14 20:29:29 -05:00
Lea Verou
7b0274a657 Refactor: Normalize order of alternatives 2024-12-14 19:51:04 -05:00
Lea Verou
325eaeb225 [select] Mark getTag as attribute: false 2024-12-14 19:10:30 -05:00
Lea Verou
f840d623d5 We no longer need to highlight CSS in template strings 2024-12-14 18:53:56 -05:00
Lea Verou
f9590195a5 Refactor: Revamp select styles
- Removed BEM-style naming (the shadow DOM gives you scoping already!)
- Use new size helper
- Organize styles to keep an element’s styles together, using nesting for modifiers
- Removed unused classes
2024-12-14 17:35:50 -05:00
Lea Verou
53eb0d8f30 Refactor: [textarea] Use size util 2024-12-14 17:12:22 -05:00
Lea Verou
b0c4c7263b Allow Prettier default for trailing commas, run Prettier on repo
per convo with @claviska
2024-12-14 17:10:26 -05:00
Lea Verou
b5d1a71f46 Simplify hint slots 2024-12-14 17:04:42 -05:00
Lea Verou
dd7b673328 Run Prettier on repo
Turns out `prettier-plugin-organize-imports` sorts imports differently than the old one so this will prevent spreading the change across multiple commits whenever we touch a file (and potentially introducing conflicts)
2024-12-14 17:01:35 -05:00
Lea Verou
9f0276f55e Introduce size shadow utils and use them with checkbox (more to come) 2024-12-14 16:34:53 -05:00
Lea Verou
15d250b103 Refactor: [select.css] more CSS nesting 2024-12-14 15:46:59 -05:00
Lea Verou
0c40579be4 Split visually hidden into a separate file that components can import 2024-12-14 15:30:51 -05:00
Lea Verou
f0f080a428 Refactor: [select, input] Use CSS Nesting 2024-12-13 19:20:54 -05:00
Lea Verou
54b511b709 Collapse weird pill rules duplicating values 2024-12-13 18:57:45 -05:00
Lea Verou
c50da3429b Refactor: Collapse 3 rules doing the same thing 2024-12-13 17:32:34 -05:00
Lea Verou
ad3cd289dd Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-13 17:17:48 -05:00
Lea Verou
b1fffc7df9 Refactor: checkbox
- Reduce class names by using `:has()`, native pseudo-classes, or `[part~=foo]` selectors
- Remove `hasFocus` property since it’s no longer needed
- Move the icon hiding logic to CSS
2024-12-13 17:17:45 -05:00
Lea Verou
587db10022 Refactor: reduce duplication in form-controls.css 2024-12-13 17:14:15 -05:00
Lea Verou
47294ad0ed Leftover help-text ➡️ hint 2024-12-13 17:09:23 -05:00
lindsaym-fa
28ebab868b remove busted links to old layout.css location 2024-12-13 15:03:25 -05:00
lindsaym-fa
07d15fd863 fix references to utility files 2024-12-13 14:43:43 -05:00
Lea Verou
2c9eb385fd Add note about Chrome bugfix
Also revert unintentional change, oops
2024-12-13 14:35:16 -05:00
Lea Verou
6d9f513f68 help-text ➡️ hint 2024-12-13 14:17:58 -05:00
Lea Verou
4b56a03144 Convert component shadow styles to CSS files too 2024-12-13 13:56:42 -05:00
Lea Verou
9c17d27af4 Big CSS Reorg Part 1 (#304) 2024-12-13 13:45:33 -05:00
Lea Verou
cc37a5c44b Delete unused tabbable.ts file 2024-12-13 10:56:13 -05:00
Lea Verou
9e6ee89585 Support any CSS length in mobile-breakpoint (#303)
Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2024-12-13 10:48:41 -05:00
Lea Verou
ea25de8040 Split CSS utility regions into separate files 2024-12-13 04:25:58 -05:00
Lea Verou
7bee00d706 Update package-lock.json 2024-12-13 04:25:28 -05:00
Lea Verou
6b9f064aeb Ooops, turns out prettier-plugin-organize-imports was not added 2024-12-13 04:16:32 -05:00
Lea Verou
e9377cf746 Apply display: flex to gap utils, closes #265 2024-12-13 03:50:22 -05:00
Lea Verou
35d2b7f12a Add tab-size: 4, closes #256 2024-12-13 03:45:48 -05:00
Lea Verou
922d7d9894 Remove <wa-visually-hidden>, closes #232 2024-12-13 03:42:09 -05:00
Lea Verou
24f5f3c4ca Enable light dismiss by default for <wa-drawer>
The docs seemed to be hinting that this is the case, and indeed it seems more reasonable.
2024-12-13 03:32:45 -05:00
Lea Verou
8358127992 Leftover work from removing ESLint 2024-12-13 03:14:41 -05:00
Lea Verou
67563b2bba Remove ESLint, add prettier-plugin-organize-imports
Per discussions with @claviska
2024-12-13 02:56:24 -05:00
Lea Verou
73e9e9ab3a More CSS refactor
cc @lindsaym-fa
2024-12-12 20:53:54 -05:00
Lea Verou
7ce393feb8 Slight refactor of page demo CSS
@lindsaym-fa I think I didn't break anything, but you might want to take a look
2024-12-12 20:42:19 -05:00
lindsaym-fa
b25e58b24b reinstate content flow rule 2024-12-12 16:13:39 -05:00
lindsaym-fa
cb0240c91d let navigation links close the navigation drawer 2024-12-12 16:00:04 -05:00
Lea Verou
16302c0130 Move component styles to use CSS files (#298) 2024-12-12 12:30:13 -05:00
Lea Verou
88f2f99290 Simplify how components specify their own shadow styles
Shared styles are now added in the base class, rather than having to be repeated in every component.
In the odd case a component does not want the shared styles, it can define a custom `styles` property of its own.
2024-12-11 21:21:30 -05:00
Lea Verou
36a397ddaa Split out mobile page styles
Now each `*.styles.ts` file has a single default export
2024-12-11 20:40:34 -05:00
Lea Verou
8fd897e348 [viewport-demo] Revert resize button 2024-12-11 16:22:42 -05:00
Lea Verou
adc76b4eb1 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-11 16:09:17 -05:00
Lea Verou
cbb4aa8be1 Fix <wa-viewport-demo> zooming in Safari & Firefox
Also some refactoring to use `updated()` rather than `handleXXX()` functions
2024-12-11 16:09:15 -05:00
lindsaym-fa
968930c543 improve responsiveness of media example page 2024-12-11 10:52:46 -05:00
lindsaym-fa
4be8a46cdd touch up media example page 2024-12-11 10:32:09 -05:00
Lea Verou
c02496ff02 Add warning 2024-12-11 10:06:19 -05:00
Lea Verou
4b8afb4bc3 Hide zoom/viewport readings when they are lying 2024-12-11 10:02:25 -05:00
Lea Verou
01aa2afc15 Move display: flex to shared rule 2024-12-11 02:11:56 -05:00
Lea Verou
4f3539cb43 Formatting 2024-12-11 01:59:26 -05:00
Lea Verou
260bd47030 Simplify selector 2024-12-11 01:54:27 -05:00
Konnor Rogers
f27c982962 keep previews 2024-12-10 22:47:26 -05:00
konnorrogers
19340adcfb fix turbo 2024-12-10 19:07:45 -05:00
konnorrogers
f22e598ad6 prettier 2024-12-10 18:52:12 -05:00
konnorrogers
68f693cbc0 fix turbo caching stuff 2024-12-10 18:49:56 -05:00
Lea Verou
2f6fe33e2c Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 18:18:22 -05:00
Lea Verou
c307cfde1c Re-enable zoom in Safari & FF
The way they do zooming is crap, but hey, at least you can now tweak it again
2024-12-10 18:18:20 -05:00
Cory LaViska
883ef50186 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 17:42:07 -05:00
Cory LaViska
c359556605 cleanup changelog 2024-12-10 17:41:51 -05:00
Lea Verou
3e18309367 Reorg page docs, light content editing 2024-12-10 15:34:14 -05:00
Cory LaViska
2fb0cc7d6d Merge branch 'next' into alpha 2024-12-10 15:27:19 -05:00
Lea Verou
26449e12e5 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 15:23:22 -05:00
Lea Verou
7058de0568 Convert preview scripts to modules when using a manually slotted preview 2024-12-10 15:23:16 -05:00
Cory LaViska
0c3438e1a5 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 15:21:04 -05:00
Cory LaViska
bae9b57c2a temp fix for page demo not showing when rendered with turbo 2024-12-10 15:21:01 -05:00
Lea Verou
739c45d34c Better proxy feature for detecting Chrome 2024-12-10 15:20:39 -05:00
Cory LaViska
32df4598fc fix default checked state 2024-12-10 14:59:09 -05:00
Cory LaViska
f52daeecdc Merge branch 'next' into alpha 2024-12-10 14:28:33 -05:00
Cory LaViska
930216e3f7 3.0.0-alpha.5 2024-12-10 14:27:49 -05:00
Lea Verou
8e40a082f5 Quick hack to disable zooming in Firefox and Safari 2024-12-10 14:14:27 -05:00
Konnor Rogers
e3fdf61e4a add layout toggling (#294)
* Add nav toggling

* fix comments

* fix comments

* prettier

* add comments / docs

* prettier

* fix up page stuff

* prettier

* Add comment

* minor fixes

* prettier
2024-12-10 13:53:08 -05:00
lindsaym-fa
414b29b046 tweak page demo styles 2024-12-10 12:58:28 -05:00
Lea Verou
ba4cdc9b28 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 11:54:04 -05:00
Lea Verou
99704faeb4 Page demo draft 2024-12-10 11:53:39 -05:00
lindsaym-fa
78c446f525 update layout anatomy image 2024-12-10 11:41:41 -05:00
lindsaym-fa
b50b4ca632 revise responsive section on widths 2024-12-10 11:24:34 -05:00
Lea Verou
21d84332e4 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 11:18:04 -05:00
Cory LaViska
c88a2c788d Merge pull request #291 from shoelace-style/konnorrogers/set-a-default-theme
Fix FOUC for default theme
2024-12-10 11:15:54 -05:00
konnorrogers
b1c459c226 fix fouc for default theme 2024-12-10 11:06:35 -05:00
Lea Verou
a8ddefe31e Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 10:30:27 -05:00
Lea Verou
80d23a4efe Fix code-demo expand animations on page load
Rn this means we don't get expand animations at all but that’s fine. I think it's fine to have an animation on close and not on open (different user goals — you open to get to the info, you close to get it out of the way, the opening is more urgent)
2024-12-10 10:29:55 -05:00
lindsaym-fa
5393a86e2b add descriptions for page examples 2024-12-10 10:19:12 -05:00
Lea Verou
1d822db30d Reapply "Fix missing content issue, closes #198"
This reverts commit 60c7c91e8a.

Also used a longer timeout
2024-12-10 10:14:20 -05:00
konnorrogers
654cd0b0bd set a default theme 2024-12-10 10:03:20 -05:00
Cory LaViska
6da942083c Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-10 09:54:39 -05:00
Cory LaViska
f15814c784 use callout markdown syntax 2024-12-10 09:54:37 -05:00
Lea Verou
60c7c91e8a Revert "Fix missing content issue, closes #198"
This reverts commit 22ca715ddb.
2024-12-10 09:52:29 -05:00
Cory LaViska
62cf254365 remove tooltips for now 2024-12-10 09:45:23 -05:00
Cory LaViska
747f185dc5 add labels to zoom buttons 2024-12-10 09:45:17 -05:00
Cory LaViska
1a61bd9583 fix outline spacing 2024-12-10 09:35:08 -05:00
Cory LaViska
7cff8fadde update tests 2024-12-10 09:26:58 -05:00
Cory LaViska
67abde6d97 Merge pull request #289 from shoelace-style/page-docs
Page documentation revisions
2024-12-10 09:23:09 -05:00
Cory LaViska
6e0b3d820c Merge pull request #288 from shoelace-style/callout
Simplify `<wa-callout>`
2024-12-10 08:57:31 -05:00
Cory LaViska
998180b05d Update docs/docs/components/callout.md 2024-12-10 08:57:24 -05:00
lindsaym-fa
ee9cc49956 Merge branch 'next' into page-docs 2024-12-10 05:01:06 -05:00
lindsaym-fa
3f79b35878 add media layout example 2024-12-10 05:00:44 -05:00
Lea Verou
fd3ec885f9 [viewport-demp] Parts for zoom buttons, zoom cursors 2024-12-10 04:50:36 -05:00
Lea Verou
22ca715ddb Fix missing content issue, closes #198 2024-12-10 04:45:13 -05:00
Lea Verou
5e6b8628d4 We don’t use Liquid! 2024-12-10 01:29:24 -05:00
lindsaym-fa
0a980addc3 remove duplicate heading, link Theming heading 2024-12-09 22:50:24 -05:00
lindsaym-fa
9bbfa1aeb2 add page card to components overview 2024-12-09 22:49:14 -05:00
lindsaym-fa
48fc9d9779 touch up header and sidebar spacing 2024-12-09 22:31:44 -05:00
lindsaym-fa
8ec8e2a9b4 Merge branch 'next' into page-docs 2024-12-09 21:56:09 -05:00
lindsaym-fa
5ec5979136 move styles to bottom of example code 2024-12-09 21:55:47 -05:00
Lea Verou
4926ad6ce5 Remove wa-callout::part(base) 2024-12-09 21:55:29 -05:00
lindsaym-fa
f013756b7b revise and edit docs 2024-12-09 21:46:52 -05:00
Lea Verou
feb092a7fa [code-examples] Smarter default for open 2024-12-09 21:41:54 -05:00
Lea Verou
406e899b34 Merge branch 'next' into page-docs 2024-12-09 21:03:42 -05:00
Lea Verou
4d89c344d1 [code-examples] Better syntax, do not include docs.css 2024-12-09 21:01:49 -05:00
Lea Verou
b9f484ceb6 data-viewport -> viewport 2024-12-09 21:01:27 -05:00
Lea Verou
1920ae8c1e Oops, commited debug code 2024-12-09 20:43:58 -05:00
lindsaym-fa
08422c29e7 Merge branch 'next' into page-docs 2024-12-09 20:29:49 -05:00
lindsaym-fa
59a70dd5b7 add documentation page demo 2024-12-09 20:29:16 -05:00
Lea Verou
86a80d3e78 [code-demo] Bugfixes
Slotted previews still don't work well with isolated demos :(
2024-12-09 20:27:23 -05:00
lindsaym-fa
1cebae7868 fix typo 2024-12-09 20:23:39 -05:00
Lea Verou
7b0ab1f7b7 Merge branch 'next' into page-docs 2024-12-09 19:42:03 -05:00
Lea Verou
1aebdf4a06 Fix isolated demos 2024-12-09 19:40:28 -05:00
Lea Verou
e94a424596 Simplify <wa-callout>
- Remove `base` (rel #207)
- Eliminate properties mirroring standard CSS properties (rel #259)
- Simplify markup
2024-12-09 19:32:55 -05:00
lindsaym-fa
14db763613 initial progress 2024-12-09 19:09:53 -05:00
Konnor Rogers
65ced601e9 fix various page issues (#286)
* fix dialog issues

* fix various page issues

* prettier
2024-12-09 19:00:16 -05:00
Lea Verou
2f0b259d96 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-09 18:43:17 -05:00
Lea Verou
8267dd91d9 Do not restrict what attributes are allowed in curlies
We're the only ones writing Markdown…
2024-12-09 18:43:14 -05:00
Cory LaViska
2149a1efde Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-09 17:56:12 -05:00
Cory LaViska
7990717a95 move selectors to sidebar on mobile 2024-12-09 17:56:10 -05:00
Konnor Rogers
4526effbfa fix footer / header dialog (#285) 2024-12-09 17:30:56 -05:00
Lea Verou
a8774b5c88 [code-demo] Fix Safari collapsing bug 2024-12-09 17:15:07 -05:00
Lea Verou
fbc5946e71 [viewport-demo] Beautiful, cursed hack to make the resizers visible in Safari 2024-12-09 16:37:07 -05:00
Lea Verou
0fbdf110b1 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-09 15:23:27 -05:00
Lea Verou
d37d873b4c More/better parts for *-demo components 2024-12-09 15:23:21 -05:00
Lea Verou
d5419ab0d0 [code-demo] Fix Safari bug with viewport emulation 2024-12-09 15:18:15 -05:00
lindsaym-fa
4805cdb64c update sample page metadata 2024-12-09 14:43:18 -05:00
Cory LaViska
5d74d8163b hide pro themes for alpha 2024-12-09 14:31:31 -05:00
Cory LaViska
76c74fc8a9 remove code-demo + viewport-demo from the alpha 2024-12-09 14:04:22 -05:00
Lea Verou
321f53f953 Add <wa-code-demo> and <wa-viewport-demo> and use them by default
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-12-09 13:44:14 -05:00
Cory LaViska
849def9ef2 Merge pull request #284 from shoelace-style/konnorrogers/run-ssr-only-on-push-to-next
run ssr only on next push
2024-12-09 13:38:21 -05:00
konnorrogers
911668617b only on push 2024-12-09 13:35:31 -05:00
konnorrogers
d55e750ecd run ssr only on next push 2024-12-09 13:04:59 -05:00
Cory LaViska
08d6af502c Merge pull request #272 from shoelace-style/konnorrogers/set-outline-false-on-page
set outline false on page, add pattern.njk
2024-12-09 12:57:45 -05:00
Cory LaViska
9a68409ccd Merge branch 'next' into konnorrogers/set-outline-false-on-page 2024-12-09 12:56:40 -05:00
Cory LaViska
b8f4a38c80 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-09 12:15:41 -05:00
Cory LaViska
a86acc9717 remove pro/dev stuff from alpha release 2024-12-09 12:13:32 -05:00
lindsaym-fa
a1fc75689e fix outdated logo 2024-12-09 11:55:24 -05:00
Lea Verou
0a5e4ab99c Make sidebar headings links whenever an overview is available (#241) 2024-12-09 11:33:04 -05:00
Cory LaViska
fd8876b3c4 fix filename typop 2024-12-09 11:23:43 -05:00
Lindsay M
994cba2fcf Page spacing (#279)
* initial progress

* spruce up docs sample page

* clean up and organization

* revert extraneous addition to applied.css

* accidentally reverted the wrong change 😅

* take 2 - revert extraneous addition in applied.css

* more cleanup
2024-12-09 11:10:15 -05:00
lindsaym-fa
fb565d202e remove outline from 'page' layout 2024-12-09 10:54:52 -05:00
Lea Verou
adb655a53b Properties ➡️ Attributes & Properties 2024-12-09 10:44:03 -05:00
Konnor Rogers
2d19c5d915 fix dialog scroll locking (#282)
* fix dialog scroll locking

* add changelog entry
2024-12-06 17:26:03 -05:00
Cory LaViska
ff0e00e4e4 Merge pull request #277 from shoelace-style/konnorrogers/fix-dialog-show
Fix calling `.show()`
2024-12-06 12:57:17 -05:00
Cory LaViska
1ea76cc08a fix padding and newlines 2024-12-06 10:45:13 -05:00
Cory LaViska
786b3c3da2 add layout and utilities to codepen 2024-12-06 10:36:30 -05:00
konnorrogers
c74049a140 changelog 2024-12-05 18:58:12 -05:00
konnorrogers
e7a0444c67 fixed a bug in wa-dialog causing it to close prematurely 2024-12-05 18:57:12 -05:00
Cory LaViska
32ed169ca8 don't redirect on 404 in build 2024-12-05 16:34:07 -05:00
konnorrogers
9e2f1d15d8 set outline false on page, add pattern.njk 2024-12-05 12:22:45 -05:00
Lea Verou
8d93a44566 Revert edit, turns out code previews are already documented in the linked page 🤦🏽‍♀️ 2024-12-04 17:17:26 -05:00
Lea Verou
471cb0287d Document API around code examples
cc @claviska
2024-12-04 16:25:35 -05:00
Cory LaViska
1428ec0708 Merge pull request #271 from shoelace-style/backports
Backports from Shoelace
2024-12-04 14:34:41 -05:00
Cory LaViska
4ed0a93ec6 backport SL-2281, SL-2295 2024-12-04 14:05:04 -05:00
Cory LaViska
ba125dc06a backport SL-2218 2024-12-04 12:47:57 -05:00
Cory LaViska
fe8b0624fe backport SL-2192 2024-12-04 12:43:43 -05:00
Cory LaViska
56dc07e30d backport SL-2189 2024-12-04 12:39:03 -05:00
Cory LaViska
6dd31748e9 backport SL-2210 2024-12-04 12:29:23 -05:00
Cory LaViska
2f4379716a backport SL-2182 2024-12-04 12:26:30 -05:00
Cory LaViska
58ac1c920d fix prefixes 2024-12-04 12:19:49 -05:00
Cory LaViska
abedd14cac backport SL-2299 2024-12-04 12:18:17 -05:00
Cory LaViska
73ca47b608 who 2024-12-04 12:12:14 -05:00
Cory LaViska
5ddc832e9d backport SL-2292 2024-12-04 12:09:17 -05:00
Cory LaViska
c097b21443 backport SL-2274 2024-12-04 12:03:49 -05:00
Cory LaViska
17fb0ef94e backport SL-2293 2024-12-04 11:52:09 -05:00
Cory LaViska
2089065499 add missing translations from shoelace 2024-12-04 11:45:38 -05:00
Cory LaViska
b168214952 backport SL-2270 2024-12-04 11:45:27 -05:00
Cory LaViska
678e3bd108 backport SL-2272 2024-12-04 11:39:12 -05:00
Cory LaViska
6cc030fa06 backport SL-2220 2024-12-04 11:38:18 -05:00
Cory LaViska
b84bd8e3cf backport SL-2221 2024-12-04 11:33:22 -05:00
Cory LaViska
8c1921da15 lint 2024-12-03 14:21:11 -05:00
Cory LaViska
9a86311bc4 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-12-03 14:17:56 -05:00
Cory LaViska
5950100615 skip test that crashes 2024-12-03 14:17:43 -05:00
Lea Verou
4e3e0aad14 [cheatsheet] Make match URL param work
Co-Authored-By: Konnor Rogers <konnor5456@gmail.com>
2024-12-03 12:38:24 -05:00
Lea Verou
6cc3b05fb7 Move cheatsheet JS to separate file 2024-12-03 12:36:51 -05:00
Cory LaViska
0e75ec6758 fix failing test 2024-12-03 12:17:52 -05:00
Cory LaViska
f157d4dfa4 remove tests to reflect new button href behavior 2024-12-03 12:10:08 -05:00
Cory LaViska
3c81f9c5e9 Merge pull request #264 from shoelace-style/honor-existing-ids
Leave existing ids intact when generating anchor headings
2024-12-03 12:06:44 -05:00
Cory LaViska
d97bf9a9e9 Update docs/_utils/anchor-headings.js
Co-authored-by: Lea Verou <lea@verou.me>
2024-12-03 12:06:31 -05:00
Cory LaViska
bda66ab4b9 don't bork ids when already provided 2024-12-03 11:58:30 -05:00
Cory LaViska
2719880636 temporarily disable prettier in prod to speed things up 2024-12-03 11:52:23 -05:00
lindsaym-fa
ca20f4de22 add custom property for checkbox icon color 2024-12-03 10:52:59 -05:00
Lea Verou
9080810c20 [cheatsheet] Permalinks should include match params too 2024-12-03 09:40:08 -05:00
Lea Verou
0a6b36d3c8 [cheatsheet] Rename references -> cheatsheet 2024-12-02 20:38:34 -05:00
Lea Verou
0cf6765d56 [reference] Implement case insensitive and regexp search 2024-12-02 20:24:18 -05:00
Lea Verou
7b3e572d25 [reference] Update outline links when searching 2024-12-02 20:11:41 -05:00
Lea Verou
be387992e6 Enable Prettier for workspace 2024-12-02 19:57:21 -05:00
Lea Verou
1f8a282971 [reference] Support filtering permalinks 2024-12-02 19:57:10 -05:00
Lea Verou
8c804957fa [reference] Add filter input, add counts 2024-12-02 19:37:29 -05:00
Lea Verou
8b1fc9a18f [components/reference] Show count of components if > 1 2024-12-02 16:08:17 -05:00
Lea Verou
bd35c23784 Indices of components by attribute, slot, part, etc. (#240)
* Simplify how list of components is exposed to 11ty

No need for functions or computing multiple times, that's what data is for!

* Add attributes to component data

* Cleanup

* Add slug (tagName without wa-)

* Add component reference / cheatsheet
2024-11-24 21:19:50 -05:00
Cory LaViska
aef3ed8bcb Merge pull request #247 from shoelace-style/autoslot
automatically slot tab into tab group; fixes #239
2024-11-22 12:29:06 -05:00
Cory LaViska
01b23a3e88 Update src/components/tab/tab.ts
Co-authored-by: Lea Verou <lea@verou.me>
2024-11-22 12:28:58 -05:00
Cory LaViska
4185f3816b automatically slot tab into tab group; fixes #239 2024-11-22 12:15:30 -05:00
Lea Verou
4522b40879 Copyediting: First singular to first plural 2024-11-22 02:33:09 -05:00
Lindsay M
c2d240b393 Layout utilities (#169)
* initial progress

* testing progress

* play with naming, utility classes

* more tweaking and testing

* progress on 12 column grid

* add layout index, start documenting

* documentation progress

* cleanup and doc progress

* more doc progress

* more progress

* final progress hurdle and cleanup

* refining and editing

* remove sandbox

* refactor extra utility classes

* layout index improvements

* change gap modifiers to utility classes

* change align modifiers to utility classes

* move layout examples above fold

* reduce demo markup

* use standard aspect ratio property for wa-frame

* change border-radius modifier to utility class

* rename wa-grid's 'min-inline-size' to 'min-column-size'

* clean up comments

* rename wa-align-* to wa-align-items-*

* break out style utilities from layout

* clean up
2024-11-21 14:07:12 -05:00
Kelsey Jackson
85c2a38cef Merge pull request #222 from shoelace-style/kj/ipsum-cleanup
removed movie quotes
2024-11-19 13:21:21 -06:00
Kelsey Jackson
d9c64baefb removed movie quotes 2024-11-19 13:20:18 -06:00
Konnor Rogers
05b693ed12 fix failing builds (#218)
* prettier

* fix failing builds
2024-11-18 16:54:39 -05:00
Cory LaViska
6cef8ae54d Merge pull request #214 from shoelace-style/konnorrogers/fix-style-reloading-in-dev
fix style reloading with SSR in dev environment
2024-11-14 14:12:15 -05:00
konnorrogers
0d3ec37abe fix style reloading with SSR in dv 2024-11-14 14:11:13 -05:00
Cory LaViska
b83d5b3ec1 Merge pull request #213 from shoelace-style/vertical-button-groups
add vertical orientation to button groups; fixes #185
2024-11-14 14:02:42 -05:00
Cory LaViska
5889053025 Merge branch 'next' into vertical-button-groups 2024-11-14 14:01:19 -05:00
Cory LaViska
84f7a22dfe add vertical orientation to button groups; fixes #185 2024-11-14 13:59:33 -05:00
Kelsey Jackson
413c478f19 Merge pull request #182 from shoelace-style/kj/app-patterns
Kj/app patterns
2024-11-14 12:31:27 -06:00
Kelsey Jackson
6c0c8843c8 ran linter to pass tests 2024-11-14 12:19:54 -06:00
Cory LaViska
0245429d78 Merge pull request #212 from shoelace-style/data-wa-relative
always convert data-webawesome urls to root-relative
2024-11-14 13:19:48 -05:00
Cory LaViska
9f445a2083 always convert data-webawesome urls to root-relative 2024-11-14 13:19:12 -05:00
Cory LaViska
d9e1b0abb9 Merge pull request #211 from shoelace-style/autoloader
Only run autoloader once; show warnings when imports fail
2024-11-14 12:44:04 -05:00
Cory LaViska
37dcafdc47 only run autoloader once; show warnings when imports fail 2024-11-14 12:42:44 -05:00
Cory LaViska
07a10ef465 Merge pull request #210 from shoelace-style/konnorrogers/fix-rating-with-precision
Fix `<wa-rating>` when using precision
2024-11-14 10:29:50 -05:00
Kelsey Jackson
1cb0dba351 updated code example 2024-11-14 02:58:39 -06:00
Kelsey Jackson
17465c7d92 Merge branch 'next' into kj/app-patterns 2024-11-13 12:17:03 -06:00
Kelsey Jackson
2f16308b1e stated some news patterns 2024-11-13 11:51:16 -06:00
konnorrogers
fb0cb42d62 fix bug with precision 2024-11-13 11:27:53 -05:00
konnorrogers
03a75169f6 fix bug with precision 2024-11-13 11:27:34 -05:00
Cory LaViska
c57cdb75b5 backport SL-2260 2024-11-12 11:08:57 -05:00
Cory LaViska
e5fced8cee backport SL-2268 2024-11-12 11:05:03 -05:00
Cory LaViska
866c3a79d7 backport SL-2259 2024-11-05 11:45:14 -05:00
Cory LaViska
8e4d7ce3af backport SL-2257 2024-11-04 15:52:24 -05:00
Cory LaViska
a6080560b9 update docs 2024-11-01 11:57:11 -04:00
Cory LaViska
50fc61bd06 fix default rel behavior 2024-11-01 11:56:33 -04:00
Lindsay M
96f017824e Support for nested themes (#174)
* fix nested themes

* rewrite section on using multiple themes

* correct CDN links

---------

Co-authored-by: konnorrogers <konnor5456@gmail.com>
2024-10-29 17:40:23 -04:00
Cory LaViska
644e8a9d47 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-10-28 14:06:52 -04:00
Cory LaViska
03ec323733 backport SL-2107 2024-10-28 14:06:50 -04:00
Cory LaViska
b104a29950 Merge pull request #188 from shoelace-style/option-label-updates
fix labels when updated dynamically
2024-10-28 12:53:04 -04:00
Cory LaViska
6e44c1af0b backport SL-2233 2024-10-28 12:52:49 -04:00
Cory LaViska
dfbaaac019 fix labels when updated dynamically 2024-10-28 12:46:13 -04:00
Cory LaViska
7ab01f3270 fix comment 2024-10-28 12:10:21 -04:00
Cory LaViska
d3fafd6db2 Merge pull request #187 from shoelace-style/animated-image-icon
Animated image icon
2024-10-28 12:09:30 -04:00
Cory LaViska
e9af6d3ad4 Merge branch 'next' into animated-image-icon 2024-10-28 12:08:47 -04:00
Cory LaViska
387cbbc21c improve icon placement 2024-10-28 12:08:24 -04:00
Cory LaViska
6a62e6a0a4 Merge pull request #186 from shoelace-style/konnorrogers/fix-progress-in-safari
fix progress ring in safari
2024-10-28 11:58:52 -04:00
Cory LaViska
53d69774d3 Update src/components/progress-ring/progress-ring.styles.ts 2024-10-28 11:58:42 -04:00
Cory LaViska
961c63570a Merge pull request #184 from shoelace-style/konnorrogers/fix-checkbox-layout-shift
fix checkbox layout shift
2024-10-28 11:56:09 -04:00
Cory LaViska
0e5350b9bb backport SL-2234 2024-10-28 10:49:11 -04:00
konnorrogers
32a777e49e fix progress ring in safari 2024-10-24 12:07:12 -04:00
Cory LaViska
e48243b492 backport SL-2226 2024-10-23 16:07:54 -04:00
konnorrogers
ce21410233 prettier 2024-10-22 17:23:32 -04:00
Cory LaViska
1456b37915 fix docs 2024-10-22 17:01:44 -04:00
konnorrogers
0636023797 fix checkbox layout shift 2024-10-22 16:46:17 -04:00
konnorrogers
f271dde950 push all themes 2024-10-22 12:54:06 -04:00
konnorrogers
735e713ef6 add a preset theme switcher 2024-10-22 12:27:43 -04:00
Kelsey Jackson
2cad68bd18 mega menu 2024-10-22 10:34:50 -05:00
Kelsey Jackson
67c7d79f37 updated text 2024-10-17 09:58:23 -05:00
Kelsey Jackson
d8f9356e1c started paywall 2024-10-17 09:57:48 -05:00
Kelsey Jackson
78dd896386 started building pricing pattern 2024-10-05 17:10:24 -05:00
Kelsey Jackson
6fe026357e switched out some broken links 2024-10-04 08:56:02 -05:00
Kelsey Jackson
06e72f557f some cleanup 2024-10-03 16:44:18 -05:00
Kelsey Jackson
c6aa11c114 Merge branch 'next' into kj/app-patterns 2024-10-03 10:45:19 -05:00
Kelsey Jackson
adf03087a9 commiting to merge in next 2024-10-03 10:44:56 -05:00
Konnor Rogers
63df4f9631 fix a bug in select not updating when value has changed (#181)
* fix a bug in select not updating when value has changed

* prettier
2024-10-03 10:27:17 -04:00
Konnor Rogers
4158ca903a fix select loading issues (#179)
* fix select loading issues

* prettier

* try this for select

* prettier

* working on dynamic options

* prettier

* prettier

* prettier

* prettier

* prettier

* prettier

* prettier

* prettier

* remove index.html

* comment out hydration error script

* fix tree hydration issue

* prettier

* fix documentation
2024-10-02 16:54:18 -04:00
Kelsey Jackson
3e513d5eee commiting to run app 2024-09-26 08:54:56 -05:00
Kelsey Jackson
0f00b9931b added product grid 2024-09-24 19:55:15 -05:00
Cory LaViska
e142b7a504 backport relative time title fix 2024-09-24 13:02:31 -04:00
Cory LaViska
4f29770bcb 3.0.0-alpha.4 2024-09-24 09:24:01 -04:00
Cory LaViska
502853483a ship bundled dist to cdn 2024-09-24 09:23:58 -04:00
Cory LaViska
7c46ffed47 update version 2024-09-23 13:33:25 -04:00
Cory LaViska
7b9f30ad90 3.0.0-alpha.3 2024-09-23 13:28:15 -04:00
Cory LaViska
a8273ab5fa backport SL2174 2024-09-23 12:53:35 -04:00
Cory LaViska
0054ea02b7 update changelog 2024-09-23 12:43:44 -04:00
Cory LaViska
b7a8c6226c update content 2024-09-23 12:43:31 -04:00
Cory LaViska
d52ce2f9c3 remove unused term 2024-09-23 12:17:47 -04:00
Cory LaViska
6e1520c868 backport SL2155 2024-09-23 12:12:35 -04:00
Cory LaViska
ff11d86a9d fix token 2024-09-23 12:12:18 -04:00
Cory LaViska
36fd982263 backport SL2146 2024-09-23 12:04:48 -04:00
Konnor Rogers
0341c1c73e remove required from color picker docs (#178) 2024-09-19 16:31:02 -04:00
Konnor Rogers
2970b3edf2 Reduce GH Action minutes (#177)
* dont cache playwright

* prettier

* prettier

* fix crashing in form.test.ts

* prettier

* prettier

* fix crashing in form.test.ts
2024-09-19 11:22:57 -04:00
Kelsey Jackson
f9b17a2e04 merged in next 2024-09-19 00:30:37 -05:00
Kelsey Jackson
ec08532b88 commit to merge in next 2024-09-19 00:27:04 -05:00
Lindsay M
43c5c009f0 Add Shoelace theme (#173)
* initial progress

* touch up classic theme

* finalize theming index

* revise themes doc

---------

Co-authored-by: konnorrogers <konnor5456@gmail.com>
2024-09-18 12:01:44 -04:00
Konnor Rogers
fcc96e3b76 fix color picker initial 'isEmpty' state (#176) 2024-09-17 17:58:03 -04:00
Konnor Rogers
9339f87ead fix morphing (#172)
* fix morphing

* fix morphing

* prettier

* fix morphing

* fix morphing

* fix morphing

* prettier

* add morphing tests

* prettier

* fix tests for reportValidity

* fix tests for reportValidity

* fix tests for reportValidity

* try CI now

* prettier
2024-09-17 15:33:29 -04:00
Lindsay M
25944d8d7d Breadcrumb styling (#171)
allow breadcrumb labels to inherit color
2024-09-17 10:09:02 -04:00
Konnor Rogers
14914abf65 Initial SSR implementation (#157)
* continued ssr work

* continued ssr work

* prettier

* all components now rendering

* everything finally works

* fix type issues

* working on breadcrumb

* working on breadcrumb

* radio group

* convert all tests to ssr

* prettier

* test suite finally passing

* add layout stuff

* add changelog

* fix TS issue

* fix tests

* fixing deploy stuff

* get QR code displaying

* fix tests

* fix tests

* prettier

* condense hydration stuff

* prettier

* comment out range test

* fixing issues

* use base fixtures

* fixing examples

* dont vendor

* fix import of hydration support

* adding notes

* add notesg

* add ssr loader

* fix build

* prettier

* add notes

* add notes

* prettier

* fixing bundled stuff

* remove cdn

* remove cdn

* prettier

* fiixng tests

* prettier

* split jobs??

* prettier

* fix build stuff

* add reset mouse and await aTimeout

* prettier

* fix improper tests

* prettier

* bail on first

* fix linting

* only test form with client

* redundancy on ssr-loader??

* maybe this will work

* prettier

* try callout now

* fix form.test.ts

* fix form.test.ts

* prettier

* fix forms

* fix forms

* try again

* prettier

* add some awaits

* prettier

* comment out broken SSR tests

* prettier

* comment out broken SSR tests

* prettier

* dont skip in CI

* upgrade playwright to beta

* prettier

* try some trickery

* try some trickery

* await updateComplete

* try to fix form.test.ts

* import hydrateable elements 1 time

* prettier

* fix input defaultValue issues

* fix form controls to behave like their native counterpartS

* add changelog entry

* prettier

* fix unexpected behavior with range / button
2024-09-11 10:25:42 -04:00
lindsaym-fa
cd9fa25a2e fix busted syntax highlighting 2024-08-19 11:14:20 -04:00
Lindsay M
2ade7be332 Add Components Overview/Index (#159)
Adds a page with a thumbnail grid of all standalone Web Awesome components
2024-08-14 10:31:00 -04:00
Cory LaViska
6e99c20987 Merge pull request #160 from shoelace-style/tree-item-touchup
Fix tree item expand icon
2024-08-14 10:18:32 -04:00
Cory LaViska
774d0de537 Merge pull request #161 from shoelace-style/card-footer-corner-fix
Fix card footer border radius
2024-08-14 10:18:08 -04:00
lindsaym-fa
b200a4e40c fix card footer border radius 2024-08-13 13:31:06 -04:00
lindsaym-fa
42e3408993 fix expand icon sizing 2024-08-07 15:01:30 -04:00
Cory LaViska
4dc20ed989 fix port bug 2024-08-05 10:19:13 -04:00
Cory LaViska
24512bc34d backport 2015 2024-08-05 09:42:00 -04:00
Cory LaViska
1e0c095169 Merge pull request #155 from shoelace-style/91-design-tweaks-and-improvements
Fix component alignment
2024-08-01 13:58:15 -04:00
Cory LaViska
f66a6d6481 Merge pull request #158 from shoelace-style/backports
Backports
2024-08-01 13:57:58 -04:00
Cory LaViska
4b9176cce1 backport 2129 2024-08-01 13:37:44 -04:00
Cory LaViska
145c5b7c5a backport 2063 2024-08-01 13:35:19 -04:00
Cory LaViska
f58cb6b08a backport 2123 2024-08-01 13:32:25 -04:00
Cory LaViska
8535b94087 backport 2084 2024-08-01 13:29:42 -04:00
Cory LaViska
4bda5725b5 backport 2078 2024-08-01 13:28:45 -04:00
lindsaym-fa
6a1572eaf6 correct help text example description 2024-07-12 16:00:16 -04:00
Cory LaViska
7b897b5448 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-07-08 10:39:47 -04:00
Cory LaViska
33eccfc5f8 fix host styles on components 2024-07-08 10:39:43 -04:00
lindsaym-fa
3ecc14d399 touch up color picker alignment 2024-07-05 18:58:47 -04:00
lindsaym-fa
d026d5c796 add test cases 2024-07-05 18:58:31 -04:00
lindsaym-fa
9fddb4eb01 fix range tooltip positioning 2024-07-05 17:52:05 -04:00
lindsaym-fa
7ae82d722d Merge branch 'next' into 91-design-tweaks-and-improvements 2024-07-03 17:32:59 -04:00
lindsaym-fa
7474a80ff9 progress on color picker and range alignment 2024-07-03 17:32:43 -04:00
Konnor Rogers
5ac40d728c fix radio group reaidng number of radios in chrome (#153) 2024-07-03 11:25:30 -04:00
Konnor Rogers
f6dd3d383d Copy button fixes (#154)
* copy / tooltip fixeS

* revert tooltip
2024-07-03 11:25:17 -04:00
Konnor Rogers
5969d4cbdb Add copy-button to swatches, and fix min / maxlength on input (#152)
* add test for min / maxlength

* prettier

* fix accessibility issue in tab group

* add changelog entry
gp

* fix swatches for things that dont have background colors
2024-07-01 16:05:10 -04:00
Cory LaViska
3b6cea10d2 Merge pull request #151 from shoelace-style/talbs/fix-text-appearance-in-themes
Fix: Using Appearance Attribute for Text Buttons in Themes
2024-07-01 10:57:15 -04:00
lindsaym-fa
76e55f840a progress on vertical alignment of inline-block elements 2024-06-27 17:50:03 -04:00
Brian Talbot
1569d10d4b fixing appearance='text' selector in fa.css theme 2024-06-27 11:59:22 -04:00
Brian Talbot
c4d5e9d2f0 fixing appearance='text' selectors in depth styling 2024-06-27 11:59:09 -04:00
Konnor Rogers
c8e534de0b Add aria-invalid to <wa-select> due to issue with <input readonly> (#149)
* add aria-invalid to readonly input

* add comments about select.ts

* prettier

* prettier
2024-06-26 16:29:31 -04:00
Konnor Rogers
236ecd0240 Fix remember scroll (#148)
* add data-turbo-track

* add data-turbo-track

* add debugging

* add debugging

* remove nopreview

* move top level

* move top level

* move top level

* remove data-turbo-track

* add comment to base.njk

* prettier
2024-06-25 15:57:43 -04:00
Cory LaViska
1175b02d29 sigh 2024-06-24 10:22:36 -04:00
Cory LaViska
0a5b845b97 remove old test 2024-06-24 10:18:45 -04:00
Cory LaViska
6b58a7ac61 Merge pull request #145 from shoelace-style/fix-relative-time
fix relative time in screen readers
2024-06-24 10:06:15 -04:00
Cory LaViska
514e394a49 fix relative time in screen readers 2024-06-24 10:05:42 -04:00
lindsaym-fa
d89197eb78 fix typo 2024-06-21 17:55:28 -04:00
lindsaym-fa
3fd29bb252 fix 'icon button with tooltip' guidance 2024-06-21 15:49:58 -04:00
Cory LaViska
17b5c0b79e Merge pull request #143 from shoelace-style/kj/usage-update
updated usage example
2024-06-21 15:44:15 -04:00
Kelsey Jackson
7b1d5d480b updated usage example 2024-06-21 13:30:24 -05:00
Konnor Rogers
18de476ebd fix tabs in NextJS (#141) 2024-06-21 14:07:30 -04:00
Konnor Rogers
0be8efdc25 fix component generators (#142) 2024-06-21 13:38:48 -04:00
Cory LaViska
508a1511f8 fix tabler icons 2024-06-21 12:06:37 -04:00
Kelsey Jackson
42c0f9a8d1 updated carousel images 2024-06-21 11:02:00 -05:00
Cory LaViska
495a59e33e fix links 2024-06-21 11:19:12 -04:00
Cory LaViska
0cd821e954 add form control page 2024-06-21 11:16:35 -04:00
Cory LaViska
2079767828 add plausible 2024-06-21 10:45:02 -04:00
Cory LaViska
b88687e85d 3.0.0-alpha.2 2024-06-21 09:43:28 -04:00
Cory LaViska
7af3cc3c4f fix icon sizes when they have attributes 2024-06-21 09:42:53 -04:00
Cory LaViska
ab532a1153 add fa 2024-06-21 09:32:33 -04:00
Cory LaViska
f454285aba collapse svg 2024-06-21 09:32:27 -04:00
lindsaym-fa
7f53665755 update select listbox border color 2024-06-21 09:18:06 -04:00
Cory LaViska
99377f5f11 fix imports 2024-06-21 08:50:09 -04:00
lindsaym-fa
2aee4c6cc9 tweak spacing 2024-06-20 17:18:57 -04:00
Cory LaViska
7cff365355 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-20 16:50:16 -04:00
Cory LaViska
9a4cc2b151 fix light dismiss in drawer 2024-06-20 16:50:14 -04:00
lindsaym-fa
37a458aee0 fix width of details icons 2024-06-20 16:49:12 -04:00
lindsaym-fa
24389e5ab9 rename 'outline' buttons to 'outlined' 2024-06-20 16:40:13 -04:00
Cory LaViska
f534051053 fix safari light dismiss 2024-06-20 16:36:59 -04:00
Cory LaViska
6c1bd0e064 remove unused animation 2024-06-20 16:36:51 -04:00
Cory LaViska
d8fa532caa table scroll again 2024-06-20 15:56:06 -04:00
Cory LaViska
18688ef231 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-20 15:40:48 -04:00
Cory LaViska
6318d84a1d fix visually hidden labels in buttons 2024-06-20 15:40:46 -04:00
lindsaym-fa
4a27c5efff fix breadcrumb item spacing 2024-06-20 13:56:44 -04:00
lindsaym-fa
b69ba66408 improve home page responsiveness 2024-06-20 13:36:38 -04:00
Cory LaViska
1cdbf8d36d Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-20 13:08:17 -04:00
Cory LaViska
c0285fc9dd add breaking changes notice 2024-06-20 13:08:15 -04:00
lindsaym-fa
7b47f74c26 use external URLs for carousel examples 2024-06-20 12:59:36 -04:00
Cory LaViska
c450efa222 fix theme color 2024-06-20 12:30:24 -04:00
Cory LaViska
9ccf1e988b fix styles 2024-06-20 12:09:13 -04:00
Cory LaViska
2544f2e163 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-20 12:00:29 -04:00
Cory LaViska
89c3651580 add alpha cdn script 2024-06-20 12:00:12 -04:00
lindsaym-fa
df7da2e5ef touch up docs spacing 2024-06-20 11:56:49 -04:00
Cory LaViska
6566b54fe9 update repo 2024-06-20 11:54:01 -04:00
Cory LaViska
8c8f307bb1 fix loader filename 2024-06-20 11:41:53 -04:00
Cory LaViska
f51338237e fix exports 2024-06-20 11:41:39 -04:00
lindsaym-fa
7c9881ed9e update @documentation data to WA paths 2024-06-20 11:26:24 -04:00
lindsaym-fa
16cdfbb11b fix relative links 2024-06-20 11:10:22 -04:00
lindsaym-fa
7e5fa4e620 fix relative links in summaries 2024-06-20 11:00:30 -04:00
lindsaym-fa
8ab6ffb4e1 support markdown in component summaries 2024-06-20 10:59:24 -04:00
lindsaym-fa
8a15dcb379 add space after component info 2024-06-20 10:51:07 -04:00
lindsaym-fa
49d06bdbcd touch up outline responsive behavior 2024-06-20 10:45:39 -04:00
Cory LaViska
34c8967726 add vercel script 2024-06-20 10:37:51 -04:00
Cory LaViska
1dba8635ad Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-20 10:17:53 -04:00
Cory LaViska
6c86926ee5 update changelog 2024-06-20 10:17:51 -04:00
lindsaym-fa
d1cdc4c245 remove min-width from outline 2024-06-20 10:16:41 -04:00
lindsaym-fa
3f16d6fc3c link right to 'Using Kit Codes' heading 2024-06-20 10:12:14 -04:00
Cory LaViska
fddbf37a3a reword 2024-06-20 10:07:16 -04:00
Cory LaViska
9492fb7afc remove invalid example 2024-06-20 10:07:01 -04:00
Cory LaViska
a02f8e8670 remove old tests 2024-06-19 16:13:40 -04:00
Cory LaViska
c1d940466c Merge pull request #138 from shoelace-style/konnorrogers/fix-color-picker-label
fix color picker label, remove inline color picker
2024-06-19 16:04:01 -04:00
Konnor Rogers
b72e09b4e3 prettier 2024-06-18 23:19:48 -04:00
Konnor Rogers
6704db88b7 fix issue with triggers 2024-06-18 23:19:31 -04:00
Konnor Rogers
877874813e fix color picker clicks not on button or label 2024-06-18 23:14:08 -04:00
lindsaym-fa
ae9ff38fa0 limit table scrolling and prevent overflow 2024-06-18 19:23:25 -04:00
lindsaym-fa
5181377820 fix color picker border color to match surface 2024-06-18 19:12:34 -04:00
Cory LaViska
997be64cf9 Merge pull request #135 from shoelace-style/konnorrogers/dropdown-and-input-fixes
dropdown and input fixes
2024-06-18 18:13:50 -04:00
lindsaym-fa
f33735d321 fix documented default values 2024-06-18 18:12:28 -04:00
lindsaym-fa
8ad5878c33 fix capitalization 2024-06-18 18:12:02 -04:00
lindsaym-fa
a57dd53c1b all dark mode code blocks, all the time 2024-06-18 18:11:49 -04:00
konnorrogers
4fef023bea prettier 2024-06-18 17:53:13 -04:00
konnorrogers
851d276b48 update color picker 2024-06-18 17:52:32 -04:00
lindsaym-fa
ab91ab1a89 add outlines to Getting Started and Theming docs 2024-06-18 17:28:36 -04:00
lindsaym-fa
ba893cadc9 rewrite customizing doc 2024-06-18 17:23:37 -04:00
konnorrogers
50dda5d487 revert dropdown / input 2024-06-18 16:13:38 -04:00
konnorrogers
0b1b976ff5 prettier 2024-06-18 16:10:18 -04:00
konnorrogers
007b74bcf0 remove 'inline' from color picker and support labels 2024-06-18 16:09:39 -04:00
konnorrogers
12d0622f03 remove 'inline' from color picker and support labels 2024-06-18 16:08:13 -04:00
konnorrogers
fcf58f9648 remove 'inline' from color picker and support labels 2024-06-18 16:02:43 -04:00
lindsaym-fa
878f2454fe remove 'Using Multiple Themes' from Themes doc 2024-06-18 15:59:40 -04:00
lindsaym-fa
e06f6ffe52 add alpha notice to home page 2024-06-18 15:39:47 -04:00
konnorrogers
7bc36712b1 prettier 2024-06-18 15:18:10 -04:00
konnorrogers
f1627630ad dropdown and input fixes 2024-06-18 15:12:40 -04:00
konnorrogers
efda5a32f9 fixing issues 2024-06-18 15:09:38 -04:00
Cory LaViska
8c6f86abe0 update changelog 2024-06-18 14:13:10 -04:00
Cory LaViska
def14fba53 add link to changelog 2024-06-18 14:10:00 -04:00
Cory LaViska
b3d10b3e45 fix cdn paths 2024-06-18 14:06:35 -04:00
Cory LaViska
31248dbd6f update content 2024-06-18 14:03:22 -04:00
Cory LaViska
c031efe84f Merge branch 'alpha-build' into next 2024-06-18 13:51:50 -04:00
Cory LaViska
25d7e83e68 prettier 2024-06-18 13:51:43 -04:00
Cory LaViska
458b1b599f Merge pull request #134 from shoelace-style/konnorrogers/fix-dropdown
fix timing issues with dropdown updating triggers
2024-06-18 13:51:24 -04:00
Cory LaViska
015e5fc333 Merge pull request #133 from shoelace-style/konnorrogers/fix-scrollbar-position
maintain scrollbar position on page navigation
2024-06-18 13:49:52 -04:00
Cory LaViska
8fa942375a cdn urls 2024-06-18 13:49:17 -04:00
konnorrogers
231df0a036 fix timing issues with dropdown updating triggers 2024-06-18 13:46:08 -04:00
Cory LaViska
a41c917d17 add alpha flag to build and remove certain files from it 2024-06-18 12:56:55 -04:00
konnorrogers
8168249c56 maintain scrollbar position 2024-06-18 12:34:58 -04:00
lindsaym-fa
32e1dc40d0 reduce menu item and option line height 2024-06-18 12:13:28 -04:00
Cory LaViska
dba74b58ba align fixed width icons 2024-06-18 11:44:48 -04:00
Cory LaViska
30825dc8e3 make search light-dismissable 2024-06-18 10:56:53 -04:00
Cory LaViska
a9f6091b60 add back fixed-width icons; fixes #132 2024-06-18 10:54:55 -04:00
Cory LaViska
3db2fad222 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2024-06-18 10:21:35 -04:00
Cory LaViska
03321c646f remove fixed width 2024-06-18 10:21:33 -04:00
lindsaym-fa
53917b9e25 update Shadows doc 2024-06-18 10:16:47 -04:00
Cory LaViska
f43e35c3a9 add close button to sidebar 2024-06-17 16:34:27 -04:00
Cory LaViska
c385101e1f change "dismiss" to "close" 2024-06-17 16:34:22 -04:00
Cory LaViska
edc384890d swap 2024-06-17 16:20:28 -04:00
Cory LaViska
00ab1d9021 more updates 2024-06-17 16:17:09 -04:00
Cory LaViska
2cd34ad71c update docs 2024-06-17 16:11:22 -04:00
Cory LaViska
93c8ec1a26 remove extensions from layouts 2024-06-17 15:14:15 -04:00
Cory LaViska
fb5cb77c1b add page-outline layout 2024-06-17 15:14:07 -04:00
Cory LaViska
1ec44cef06 fix nav toggle styles 2024-06-17 14:15:32 -04:00
Cory LaViska
301996ed57 add appearance 2024-06-17 13:47:09 -04:00
Cory LaViska
0224a3ff98 fix button test 2024-06-17 13:46:40 -04:00
Cory LaViska
47d0184ed8 Merge pull request #128 from shoelace-style/button-appearances
Add new button appearances
2024-06-17 13:39:04 -04:00
Cory LaViska
a388cd30e0 Merge branch 'next' into button-appearances 2024-06-17 13:38:20 -04:00
Cory LaViska
4adfcecb80 update example 2024-06-17 13:36:32 -04:00
Cory LaViska
a62f9b28f0 fix footer 2024-06-17 13:26:53 -04:00
Cory LaViska
cd837cb291 reword 2024-06-17 13:26:46 -04:00
Cory LaViska
dfa1f2adf7 remove example 2024-06-17 13:26:39 -04:00
Cory LaViska
d88f27f3e1 update docs 2024-06-17 12:27:10 -04:00
Cory LaViska
4357323bbb add whitespace 2024-06-17 12:26:54 -04:00
lindsaym-fa
bd40f7b9c6 improve docs header responsiveness 2024-06-14 19:12:21 -04:00
lindsaym-fa
83715779dc implement MVP home page 2024-06-14 18:57:52 -04:00
Cory LaViska
715a4286f9 light dismiss the nav 2024-06-14 12:00:47 -04:00
lindsaym-fa
02f4b67b7f update outline attributes to appearance 2024-06-13 23:27:57 -04:00
lindsaym-fa
b189696ac5 use appearance attributes for docs header 2024-06-13 23:21:27 -04:00
lindsaym-fa
5c0013e74f Merge branch 'next' into button-appearances 2024-06-13 23:17:02 -04:00
lindsaym-fa
96b3b57d81 update docs header 2024-06-13 23:06:24 -04:00
lindsaym-fa
22e4d10031 cleanup docs sidebar design 2024-06-13 20:28:34 -04:00
lindsaym-fa
c37f86bbd6 update Themes doc 2024-06-13 17:59:50 -04:00
lindsaym-fa
0e4066b476 correct botched find and replace 2024-06-13 14:24:50 -04:00
lindsaym-fa
232f12576c tinted button style touch-ups 2024-06-13 14:20:31 -04:00
lindsaym-fa
f4f56fc344 rename appearance values 2024-06-13 13:58:05 -04:00
Kelsey Jackson
16209d02b6 merged with next 2024-06-13 11:04:21 -05:00
Kelsey Jackson
fce5357354 switching to pull down latest 2024-06-13 10:51:36 -05:00
lindsaym-fa
7709a63384 correct new button appearances 2024-06-12 20:20:20 -04:00
lindsaym-fa
21cbf76baf add 'appearance' to wa-button 2024-06-12 20:13:05 -04:00
Lindsay M
089265a022 Merge pull request #126 from shoelace-style/theming-boost
Refactor and document theming
2024-06-12 18:30:35 -04:00
lindsaym-fa
f1ee5ee508 touch up interactive icons 2024-06-12 18:09:06 -04:00
lindsaym-fa
83bc4bf2fb update component group background properties to background-color 2024-06-12 16:51:13 -04:00
lindsaym-fa
f734a85665 remove z-index properties 2024-06-12 16:30:24 -04:00
lindsaym-fa
33c859a8ca remove primary and base color aliases 2024-06-12 16:11:02 -04:00
Cory LaViska
a2f63a1b63 Merge branch 'next' into theming-boost 2024-06-12 11:16:35 -04:00
Cory LaViska
a884a0c1f0 remove examples 2024-06-12 11:06:49 -04:00
lindsaym-fa
dd37a1c2bd Merge branch 'next' into theming-boost 2024-06-12 10:59:34 -04:00
Kelsey Jackson
8c23d78362 complex share 2024-06-12 09:26:22 -05:00
Cory LaViska
847ad26814 Merge pull request #123 from shoelace-style/konnorrogers/disconnect-tooltip
Tooltips associated via selectors
2024-06-12 10:14:21 -04:00
konnorrogers
e943572d36 prettier 2024-06-12 03:28:09 -04:00
konnorrogers
62f2b1c0fb fix tooltips and everything to go along with it 2024-06-12 03:23:45 -04:00
lindsaym-fa
0e6f83b9c3 touch ups 2024-06-12 00:02:40 -04:00
lindsaym-fa
2d39099061 rename relevant --padding properties to --spacing 2024-06-11 23:35:36 -04:00
lindsaym-fa
65718a9728 use background-color for custom properties 2024-06-11 23:27:03 -04:00
lindsaym-fa
0c297196ad touch up badge styles 2024-06-11 22:50:21 -04:00
lindsaym-fa
670a581d12 remove --wa-flow-spacing from theming API 2024-06-11 22:25:40 -04:00
lindsaym-fa
a9e0a71fa1 fix typos 2024-06-11 22:10:50 -04:00
lindsaym-fa
17b34dc432 fix icon sizing in checkbox, select, and tree item 2024-06-11 22:02:33 -04:00
lindsaym-fa
6144c849e3 touch up icon and copy button styles 2024-06-11 21:44:30 -04:00
lindsaym-fa
28410618ec Merge branch 'next' into theming-boost 2024-06-11 20:35:16 -04:00
lindsaym-fa
0c8ea73282 add custom properties to tree item 2024-06-11 18:50:26 -04:00
konnorrogers
c98945a885 prettier 2024-06-11 17:52:38 -04:00
lindsaym-fa
c350614e8e touch up tooltip styles 2024-06-11 17:47:34 -04:00
konnorrogers
e42ac799af prettier 2024-06-11 17:45:34 -04:00
lindsaym-fa
1cc8d9ad28 refactor tab styles 2024-06-11 17:17:23 -04:00
lindsaym-fa
f208b5bb0f make skeleton effects more noticeable 2024-06-11 17:16:06 -04:00
konnorrogers
dbbe580ef1 prettier 2024-06-11 17:08:34 -04:00
konnorrogers
fb33dd7036 remove content property 2024-06-11 16:43:04 -04:00
konnorrogers
dc12e16d83 update tooltip 2024-06-11 16:41:42 -04:00
konnorrogers
2e7096c66f update tooltip 2024-06-11 16:37:42 -04:00
Cory LaViska
700ccff3cd Merge pull request #124 from shoelace-style/wa-icon
Update <wa-icon> docs and add support for duotone
2024-06-11 15:48:04 -04:00
lindsaym-fa
9e93d178f9 bump up contrast of active rating symbols 2024-06-11 15:31:13 -04:00
Cory LaViska
530673dcd1 change data attrib 2024-06-11 14:38:22 -04:00
Cory LaViska
5d5ac5576e update comments 2024-06-11 14:38:11 -04:00
Cory LaViska
39b5737a7f expose kit functions 2024-06-11 14:38:05 -04:00
Cory LaViska
2157b209a2 update to FA 2024-06-11 14:37:59 -04:00
Cory LaViska
4942eaedb3 add kit code info 2024-06-11 14:24:00 -04:00
konnorrogers
ca6ebecfdc add tooltip changelog 2024-06-11 13:56:59 -04:00
konnorrogers
77e1708657 fix tooltip docs, remove stopAnimations 2024-06-11 13:53:05 -04:00
konnorrogers
42b711b45a prettier 2024-06-11 13:14:10 -04:00
konnorrogers
ca524a03f3 fix tooltip docs, remove stopAnimations 2024-06-11 13:07:49 -04:00
Cory LaViska
4ee831f18a cleanup unused file 2024-06-11 13:00:14 -04:00
Cory LaViska
8430d6076b add custom props for duotone icons 2024-06-11 12:44:15 -04:00
konnorrogers
9c17b0e16b Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/disconnect-tooltip 2024-06-11 12:05:28 -04:00
lindsaym-fa
fbd7347d4c touch up menu item styles 2024-06-11 12:04:02 -04:00
lindsaym-fa
602ef0e8f3 add custom properties to option 2024-06-11 12:03:53 -04:00
Cory LaViska
1d1080f2e4 fix fw styles and update docs 2024-06-11 11:57:24 -04:00
konnorrogers
a715e0c1b6 working on tooltip 2024-06-11 11:54:58 -04:00
Cory LaViska
a134b1a359 fix examples and remove ::danger 2024-06-11 11:21:28 -04:00
Cory LaViska
d0b673c99d remove old sprite entry 2024-06-11 11:21:17 -04:00
Cory LaViska
55ba270b83 add support for fixed width 2024-06-11 10:51:49 -04:00
Cory LaViska
db94c609bd backport 2060 2024-06-11 10:29:51 -04:00
lindsaym-fa
d7e4719895 add custom properties to image comparer and split panel 2024-06-11 10:17:32 -04:00
lindsaym-fa
01e75456e8 refactor menu item and label styles 2024-06-10 23:52:04 -04:00
lindsaym-fa
acb9c69d4d expose box shadow property for dropdown 2024-06-10 22:45:53 -04:00
lindsaym-fa
275652f301 add custom properties to dialog and drawer 2024-06-10 22:25:32 -04:00
lindsaym-fa
1319ae748c Merge branch 'next' into theming-boost 2024-06-10 13:39:22 -04:00
lindsaym-fa
095ee2bfd0 add --spacing and --swatch-size to color picker 2024-06-10 13:37:43 -04:00
Konnor Rogers
823bac0174 Implement roving tabindex for tab-group (#118)
* backport roving tabindeX

* update changelog

* prettier

* implement current tab

* finish backporting

* implement current tab

* fixing tabs

* prettier

* remove unnecessary options

* remove bad docs

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-06-10 12:43:08 -04:00
lindsaym-fa
ed45d37b3d add custom properties to color picker 2024-06-08 22:27:17 -04:00
lindsaym-fa
dd040d3b39 add transition easing property 2024-06-07 18:12:02 -04:00
Kelsey Jackson
3b813a9421 started social share pattern 2024-06-07 15:37:49 -05:00
lindsaym-fa
0dccdaecdf touch up theming docs 2024-06-07 15:42:27 -04:00
konnorrogers
2423af3da2 disconnecting tooltip 2024-06-07 12:56:03 -04:00
lindsaym-fa
d9f0665766 more touch ups on theming docs 2024-06-06 19:31:43 -04:00
lindsaym-fa
282d79da4a touch up theming docs 2024-06-06 16:55:01 -04:00
lindsaym-fa
889ded3b01 Merge branch 'next' into theming-boost 2024-06-06 15:54:05 -04:00
lindsaym-fa
42103edc38 finalize shadow properties and docs 2024-06-06 15:53:10 -04:00
lindsaym-fa
da4380dabd refactor shadow properties 2024-06-05 18:04:26 -04:00
lindsaym-fa
d1a9793fec finalize component group properties and docs 2024-06-05 16:57:06 -04:00
lindsaym-fa
db092bbf52 touch up menu item styles 2024-06-05 14:42:17 -04:00
Cory LaViska
81a3f29650 never return invalid durations 2024-06-05 11:43:51 -04:00
lindsaym-fa
f8e7fe7905 Merge branch 'next' into theming-boost 2024-06-05 10:55:02 -04:00
lindsaym-fa
62888735f2 progress on tooltip properties 2024-06-04 18:41:09 -04:00
Cory LaViska
1b509dd44b remove old tests 2024-06-04 11:48:06 -04:00
Cory LaViska
a326671a21 Merge pull request #122 from shoelace-style/konnorrogers/remove-value-as-from-input
remove valueAs* getters / setters
2024-06-04 11:43:27 -04:00
konnorrogers
3dcf3af5c5 Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/remove-value-as-from-input 2024-06-04 11:32:30 -04:00
konnorrogers
7e72337ff3 remove valueAs* getters / setters 2024-06-04 11:30:12 -04:00
Cory LaViska
71bd7c039d Merge pull request #121 from shoelace-style/menus
fix menu focus colors
2024-06-04 11:19:07 -04:00
Cory LaViska
126c4f1789 fix menu focus colors 2024-06-04 11:16:42 -04:00
Cory LaViska
efc640974a Merge pull request #120 from shoelace-style/events
DRAFT: Events subclass Event instead of using CustomEvent
2024-06-04 11:08:22 -04:00
Cory LaViska
9385ebd893 don't emit twice 2024-06-04 10:59:05 -04:00
Cory LaViska
0900b012af move comment 2024-06-04 10:41:18 -04:00
lindsaym-fa
7a9872d5b7 Merge branch 'next' into theming-boost 2024-06-03 14:39:13 -04:00
lindsaym-fa
6807dc8493 tweak docs 2024-06-03 14:38:02 -04:00
lindsaym-fa
70e927db3b document and refactor transition properties 2024-06-03 14:37:51 -04:00
Cory LaViska
f94ef27a0b remove unused event 2024-06-03 14:11:18 -04:00
Cory LaViska
dccda93f6a make show/hide cancelable 2024-06-03 14:08:03 -04:00
lindsaym-fa
abc4c4a130 wrap up component groups doc 2024-06-03 12:12:34 -04:00
Cory LaViska
a293e13540 backport shoelace pr 2024-06-03 09:55:21 -04:00
lindsaym-fa
86d1ff3cef progress documenting and refactoring component group properties 2024-05-31 18:12:23 -04:00
lindsaym-fa
2631a05e74 progress with docs and theme refactoring 2024-05-31 17:25:47 -04:00
Cory LaViska
2f586f4437 eslint 2024-05-31 14:40:44 -04:00
Cory LaViska
5f01216858 fix sl prefixes 2024-05-31 14:39:42 -04:00
Cory LaViska
3154652a00 fix prefix 2024-05-31 14:39:36 -04:00
Cory LaViska
0ea9fd3f6f update contributing 2024-05-31 14:34:53 -04:00
Cory LaViska
081ef02b72 events subclass Event instead of using CustomEvent now 2024-05-31 14:28:19 -04:00
Cory LaViska
f32175bf1e Merge pull request #119 from shoelace-style/docs
Add examples to docs
2024-05-31 11:21:01 -04:00
Cory LaViska
a1e9192db7 add examples; closes #112 2024-05-31 11:20:24 -04:00
Cory LaViska
c69de376df remove unused utility styles 2024-05-31 11:15:35 -04:00
lindsaym-fa
7e8b79545f touch up styles 2024-05-30 18:05:47 -04:00
lindsaym-fa
3ce6260110 add default values to non-color docs 2024-05-30 18:05:14 -04:00
lindsaym-fa
8d74d159ba document misc custom properties 2024-05-30 17:40:37 -04:00
Kelsey Jackson
3de1eb1c51 switching machines 2024-05-30 11:41:23 -05:00
lindsaym-fa
dc8e8b9904 Merge branch 'next' into theming-boost 2024-05-30 11:30:54 -04:00
lindsaym-fa
67535f6af0 even more docs progress 2024-05-29 18:20:39 -04:00
lindsaym-fa
0b9ca99053 more docs progress 2024-05-29 18:02:24 -04:00
lindsaym-fa
25787847fd rename 'corners' and 'base' properties 2024-05-29 18:02:01 -04:00
Cory LaViska
db2e6df86d Merge pull request #117 from shoelace-style/alerts
Rename alert to callout and remove toast/dynamic behaviors
2024-05-29 13:01:23 -04:00
Cory LaViska
000bce99f8 remove unused attribute 2024-05-29 12:33:59 -04:00
Cory LaViska
3191b71235 alert => callout; fixes #104 2024-05-29 12:30:54 -04:00
Cory LaViska
6f62f96f11 fix spinner styles when host element isn't a square 2024-05-29 12:08:29 -04:00
lindsaym-fa
b621f5c2d0 Merge branch 'next' into theming-boost 2024-05-29 11:24:49 -04:00
Cory LaViska
eee439ffd2 Merge pull request #116 from shoelace-style/submenu-rtl
Fif RTL in submenu controllers and elsewhere
2024-05-28 16:41:17 -04:00
Cory LaViska
fc5e3a4cd9 remove unused 2024-05-28 16:29:49 -04:00
Cory LaViska
3119a75c19 fix ltrs 2024-05-28 15:28:20 -04:00
Cory LaViska
c3bd625d46 remove unused imports 2024-05-28 15:25:36 -04:00
Cory LaViska
92e343dd8b update changelog 2024-05-28 15:20:32 -04:00
Cory LaViska
ec41613c23 one more 2024-05-28 15:13:33 -04:00
Cory LaViska
e255006d8c fix RTL in submenus and elsewhere 2024-05-28 15:09:06 -04:00
Cory LaViska
3303a31255 Merge pull request #115 from shoelace-style/animations
Remove JS custom animations; fixes #110
2024-05-28 14:29:16 -04:00
Cory LaViska
497ccebb73 remove unused function 2024-05-28 14:24:56 -04:00
Cory LaViska
702ff2fd31 remove unused function 2024-05-28 14:24:37 -04:00
Cory LaViska
1dbef2449a 200ms not 250ms 2024-05-28 14:23:28 -04:00
Cory LaViska
50b817093d add hide duration to dialog/drawer 2024-05-28 14:23:21 -04:00
Cory LaViska
0995da09ef add back stop animations 2024-05-28 14:23:06 -04:00
Cory LaViska
53b5484f2b remove js animations from tree item 2024-05-28 14:22:54 -04:00
Cory LaViska
f803bee9a9 remove animations from CEM 2024-05-28 14:18:31 -04:00
Cory LaViska
a9e95ee493 remove js animations from select 2024-05-28 14:03:27 -04:00
Cory LaViska
a30326e4de tweak durations 2024-05-28 14:01:08 -04:00
Cory LaViska
99fe58c96f remove JS animations from dropdwon 2024-05-28 13:58:51 -04:00
Cory LaViska
2111b3c6fb remove JS animations from details 2024-05-28 13:51:48 -04:00
Cory LaViska
22e8ae39a2 remove comments 2024-05-28 13:36:11 -04:00
Cory LaViska
2941db66e4 add <br> 2024-05-28 13:35:40 -04:00
Cory LaViska
cd8d5d0eea jsdoc comments on static fields break the docs 2024-05-28 13:30:51 -04:00
Cory LaViska
56dcd409a7 newline 2024-05-28 13:30:19 -04:00
Cory LaViska
88a9093137 add raw tags 2024-05-28 13:18:35 -04:00
Cory LaViska
f77acb4716 fix comments 2024-05-28 13:08:42 -04:00
Cory LaViska
2f470f129f update comments 2024-05-28 13:07:50 -04:00
Cory LaViska
2d666a0c40 remove unused import 2024-05-28 13:07:38 -04:00
Cory LaViska
51509ddff5 wrap comments 2024-05-28 12:41:44 -04:00
Cory LaViska
d1ae120833 remove js animations from tooltip 2024-05-28 11:53:36 -04:00
Cory LaViska
6dc847f0a4 add built-in animation classes to popup 2024-05-28 11:53:28 -04:00
Cory LaViska
1a6a45c624 update class name 2024-05-28 11:15:26 -04:00
Cory LaViska
79a312acce update changelog 2024-05-28 11:09:56 -04:00
Cory LaViska
41582042fb remove js animations from copy button 2024-05-28 11:09:50 -04:00
Cory LaViska
14556a847f remove js animations from alert 2024-05-28 11:09:40 -04:00
Cory LaViska
463de572fe remove customizing animation docs 2024-05-28 11:09:26 -04:00
Cory LaViska
91d3a98fa4 import utility styles via CSS instead of build 2024-05-28 11:09:15 -04:00
Cory LaViska
a18470e5f7 use nanoid for unsecure contexts 2024-05-28 10:42:25 -04:00
Cory LaViska
0856f20e2f replace uuid util with crypto.randomUUID() 2024-05-28 09:46:15 -04:00
lindsaym-fa
fb34961fdf progress documenting and refactoring typography 2024-05-24 18:47:15 -04:00
Cory LaViska
d0b9c42d7c prettier 2024-05-24 15:38:20 -04:00
lindsaym-fa
27ab7ee41b address color doc feedback 2024-05-24 15:26:08 -04:00
Cory LaViska
a1d614600d Merge pull request #89 from shoelace-style/konnorrogers/form-association-experiment
[DRAFT]: initial prototype of form association experiment
2024-05-24 14:46:20 -04:00
Cory LaViska
3cf3492e23 Merge branch 'next' into konnorrogers/form-association-experiment 2024-05-24 14:46:03 -04:00
Cory LaViska
05193f55f8 Merge pull request #114 from shoelace-style/dialog
Dialog + drawer now use <dialog>
2024-05-24 14:37:50 -04:00
lindsaym-fa
00f01da4f4 revise color documentation 2024-05-24 11:32:22 -04:00
lindsaym-fa
84430f461a stub out theming docs 2024-05-23 18:08:18 -04:00
lindsaym-fa
1c1cad0cbb wrap up color documentation 2024-05-23 17:39:50 -04:00
konnorrogers
b8a357c6cc fix all tests 2024-05-23 16:59:15 -04:00
konnorrogers
07599df5f4 fix all tests 2024-05-23 16:58:04 -04:00
konnorrogers
da46b4faf7 Merge branch 'konnorrogers/form-association-experiment' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-05-23 16:16:50 -04:00
konnorrogers
ec1305c671 working on feedback 2024-05-23 16:16:45 -04:00
Konnor Rogers
bb47ca0ccd Update src/components/radio-group/radio-group.ts
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-05-23 16:16:17 -04:00
Cory LaViska
bf7117951a drawer uses <dialog> now 2024-05-23 14:14:02 -04:00
konnorrogers
24851812c1 Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-05-23 13:14:24 -04:00
lindsaym-fa
30463c3cd8 remove selection colors 2024-05-22 18:10:58 -04:00
lindsaym-fa
d86253a7b1 color documentation adjustments 2024-05-22 18:07:41 -04:00
lindsaym-fa
e76624a5fd fix up docs styles 2024-05-22 15:07:15 -04:00
Cory LaViska
4be761379d use <dialog> for <wa-dialog> 2024-05-22 14:13:40 -04:00
Cory LaViska
25f3c9b508 Merge pull request #111 from shoelace-style/talbs/update-docs-sidebar
Docs: Add Page component link to Docs Sidebar
2024-05-22 14:10:56 -04:00
Brian Talbot
120067a69d adding Page component to docs sidebar 2024-05-22 13:17:57 -04:00
lindsaym-fa
8df82c359a Merge branch 'next' into theming-boost 2024-05-22 11:53:27 -04:00
lindsaym-fa
f77b869283 rename line height properties 2024-05-22 11:52:54 -04:00
lindsaym-fa
cabdba9bd1 touch up form validation styles 2024-05-22 11:52:41 -04:00
konnorrogers
0cca54b731 fix test suite to use data-wa-* 2024-05-21 18:40:14 -04:00
lindsaym-fa
08f39419a3 progress refactoring color properties 2024-05-21 17:57:38 -04:00
Cory LaViska
258d1713e8 add missing image 2024-05-21 16:31:20 -04:00
Cory LaViska
f3cbec4e96 update when family/variant changes; fixes #438 2024-05-21 16:25:07 -04:00
lindsaym-fa
da8e8ad1f6 more progress on color documentation 2024-05-20 18:44:45 -04:00
konnorrogers
f0d5a115fc prettier 2024-05-20 18:13:05 -04:00
konnorrogers
8222334835 remove bad examples 2024-05-20 18:12:32 -04:00
Konnor Rogers
f3953bd5c9 Apply suggestions from code review
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-05-20 18:12:23 -04:00
Konnor Rogers
1d05c315ac Apply suggestions from code review
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-05-20 13:44:18 -04:00
lindsaym-fa
cf7a2fa672 more progress on color documentation 2024-05-17 18:22:59 -04:00
lindsaym-fa
eda6d20fe8 progress on color documentation 2024-05-16 18:39:36 -04:00
lindsaym-fa
445118b20d tweak default theme neutrals 2024-05-15 18:02:43 -04:00
lindsaym-fa
1d3826f19c fix up merged button spacing 2024-05-15 18:01:30 -04:00
lindsaym-fa
3c5b25aa92 Merge branch 'next' into theming-boost 2024-05-15 18:01:13 -04:00
lindsaym-fa
78d31430a5 update carousel custom properties 2024-05-15 17:49:07 -04:00
lindsaym-fa
b6f1833d97 progress refactoring button styles 2024-05-15 17:35:41 -04:00
Cory LaViska
0abd0dec5f Merge pull request #109 from shoelace-style/safari-spinner
fixes #95
2024-05-15 13:53:57 -04:00
Cory LaViska
6d92f03fb2 fix test/remove test 2024-05-15 13:53:44 -04:00
Cory LaViska
8deaaf04e3 fixes #95 2024-05-15 13:51:59 -04:00
Cory LaViska
c4a084ee41 docs fix 2024-05-15 13:13:52 -04:00
lindsaym-fa
0afef0f30e simplify button padding, progress on button groups 2024-05-14 18:05:29 -04:00
lindsaym-fa
5d0578ec3c touch up breadcrumb item styles 2024-05-14 13:22:16 -04:00
lindsaym-fa
4f60188e3e refactor badge styles 2024-05-13 17:18:23 -04:00
lindsaym-fa
cfa4e964a0 add custom properties to avatar 2024-05-13 17:17:39 -04:00
lindsaym-fa
870df3f030 touch up animated image styles 2024-05-13 17:17:00 -04:00
Cory LaViska
596697c5c5 Merge pull request #107 from shoelace-style/tab-indicator
Rework active tab indicator and more tab goodness
2024-05-13 16:57:31 -04:00
Cory LaViska
28c8bf1815 remove unused imports 2024-05-13 16:50:55 -04:00
Cory LaViska
296a2e6366 rework tab group 2024-05-13 16:38:32 -04:00
Cory LaViska
4b93aafccf fixes #68 2024-05-13 15:11:22 -04:00
Konnor Rogers
c9f9a88637 Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-05-11 11:21:56 -04:00
Konnor Rogers
9cb1073082 prettier 2024-05-11 03:29:35 -04:00
Konnor Rogers
a13c02ab02 add test for hasInteracted 2024-05-11 03:28:23 -04:00
konnorrogers
797d6d1eb1 prettier 2024-05-10 21:43:41 -04:00
konnorrogers
4342242455 update everything 2024-05-10 21:31:16 -04:00
lindsaym-fa
1d05474b51 redesign checked radio buttons 2024-05-10 17:55:57 -04:00
Cory LaViska
65c781c086 backport shoelace#2008 2024-05-10 11:13:24 -04:00
Cory LaViska
0b9a0bbb72 backport shoelace#2007 2024-05-10 10:45:53 -04:00
Cory LaViska
d828437316 backport shoelace#2006 2024-05-10 10:18:42 -04:00
konnorrogers
45064505ce switch passes tests 2024-05-09 17:50:23 -04:00
konnorrogers
0cdc54aba7 fix input tests 2024-05-09 12:08:06 -04:00
lindsaym-fa
40c8488712 add thumb gap to range 2024-05-09 11:44:19 -04:00
lindsaym-fa
cb56535cd5 update toggle/thumb size calcs 2024-05-09 11:44:05 -04:00
lindsaym-fa
c3a2fbdfb0 add elements to sandbox 2024-05-09 11:42:50 -04:00
Cory LaViska
13207d48df Merge pull request #102 from shoelace-style/backports
remove slot detection; #69
2024-05-08 17:21:59 -04:00
Cory LaViska
e8f7342cb6 remove slot detection; #69 2024-05-08 17:20:58 -04:00
konnorrogers
23249dc4e9 prettier 2024-05-08 16:16:14 -04:00
Cory LaViska
1703d1452d Merge pull request #101 from shoelace-style/backports
Backports
2024-05-08 16:05:16 -04:00
Cory LaViska
d0dd3b59e5 backport shoelace#1923 2024-05-08 16:02:43 -04:00
konnorrogers
e6a4eadf1c fixing validation 2024-05-08 14:24:11 -04:00
konnorrogers
34bba3db19 working on tests 2024-05-07 23:00:03 -04:00
konnorrogers
1174200f20 prettier 2024-05-07 19:42:50 -04:00
konnorrogers
1039d8e057 update to use .ts files 2024-05-07 19:33:22 -04:00
konnorrogers
51518df076 remove form controls.md 2024-05-07 16:06:07 -04:00
konnorrogers
398b4c47de remove .component.ts files 2024-05-07 13:52:52 -04:00
konnorrogers
598f598bd0 Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-05-07 13:03:23 -04:00
Cory LaViska
b28d0ad5c7 backport shoelace#1986 2024-05-07 11:50:30 -04:00
Cory LaViska
2f74995680 backport shoelace#1942 2024-05-07 11:47:30 -04:00
Cory LaViska
c7099f67fa backport shoelace#1967 2024-05-07 11:46:16 -04:00
Cory LaViska
39c4bcf3ea backport shoelace#1948 2024-05-07 11:43:12 -04:00
Cory LaViska
1e059c1fb9 backport shoelace#1911 2024-05-07 11:42:30 -04:00
Cory LaViska
bf5ed6c92a backport shoelace#1922 2024-05-07 11:40:21 -04:00
Cory LaViska
80ce2088a0 backport shoelace#1927 2024-05-07 11:37:41 -04:00
Cory LaViska
61c7329885 add missing bracket 2024-05-07 11:37:16 -04:00
Cory LaViska
11137cf6e3 backport shoelace#1935 2024-05-07 11:34:10 -04:00
Cory LaViska
4444cf45fb backport shoelace#1937 2024-05-07 11:32:36 -04:00
Cory LaViska
659bfda3ba backport shoelace#1895 2024-05-07 11:31:40 -04:00
Cory LaViska
ab4813b38e backport shoelace#1881 2024-05-07 11:27:57 -04:00
Cory LaViska
456b37fa9b backport shoelace#2003 2024-05-07 11:27:00 -04:00
Cory LaViska
7c70242b10 backport shoelace#1893 2024-05-07 11:26:31 -04:00
Cory LaViska
757539f5d2 backport shoelace#1897 2024-05-07 11:25:31 -04:00
konnorrogers
dd33acef98 finish radio group tests 2024-05-06 18:37:57 -04:00
konnorrogers
46f73540ce add notes 2024-05-06 18:27:05 -04:00
lindsaym-fa
99f6da8521 redefine applied code styles 2024-05-06 17:33:49 -04:00
lindsaym-fa
3c86c52e5c expand overlay color properties 2024-05-06 17:33:26 -04:00
lindsaym-fa
0c63db27ab refactor range styles 2024-05-06 16:54:50 -04:00
lindsaym-fa
ba002752ee make button outlines less intense 2024-05-06 15:12:00 -04:00
lindsaym-fa
8d9448acd9 spruce up toggle styles 2024-05-06 15:09:38 -04:00
lindsaym-fa
125d72958f improve switch design 2024-05-06 15:06:00 -04:00
konnorrogers
163bb16a1f update radios 2024-05-06 14:08:59 -04:00
Cory LaViska
e8d1b408ac fix missing description errors 2024-05-06 12:34:08 -04:00
Kelsey Jackson
5e8c924aa6 Merge branch 'next' into kj/app-patterns 2024-04-30 15:33:32 -05:00
Kelsey Jackson
6f6c2dce3c commiting to pull in next branch 2024-04-30 15:24:39 -05:00
Cory LaViska
608df60a9c fix search borders 2024-04-29 12:41:34 -04:00
Cory LaViska
3fb8910ba1 fix code block and copy styles 2024-04-29 12:23:11 -04:00
Cory LaViska
88a1a829f9 rename kitchen sink to themer 2024-04-29 12:16:34 -04:00
Cory LaViska
4901d87ffb update code example syntax 2024-04-29 11:33:06 -04:00
Cory LaViska
ef8d22d3bd remove warning 2024-04-29 11:25:10 -04:00
Cory LaViska
2a25d2aa6f remove log/eslint 2024-04-29 11:12:07 -04:00
Cory LaViska
edbf152f2c fix script 2024-04-29 11:09:16 -04:00
Cory LaViska
8c3b283893 Merge branch 'next' into 11ty3 2024-04-29 11:05:22 -04:00
Cory LaViska
ac576eab7b don't use the autoloader for testing 2024-04-29 10:56:17 -04:00
Cory LaViska
d30cf62f50 compare rounded values 2024-04-29 10:55:52 -04:00
Cory LaViska
6aa641bb33 fix image paths 2024-04-29 10:55:47 -04:00
Cory LaViska
90fdb93ae1 fix missing react tab and copy/code styles 2024-04-29 10:14:11 -04:00
konnorrogers
f7b520b251 Merge branch 'konnorrogers/form-association-experiment' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-04-26 13:49:42 -04:00
konnorrogers
1f83a4619f upgrade color picker to form associated 2024-04-26 13:42:49 -04:00
Konnor Rogers
07e0863ce9 converting validators 2024-04-25 00:00:17 -04:00
konnorrogers
84782b3cbe fixing type issues 2024-04-24 18:45:50 -04:00
konnorrogers
ffdcb04a84 working on continued form association 2024-04-24 14:25:30 -04:00
Cory LaViska
f1a65e7dc8 copy dist to production site 2024-04-17 15:11:10 -04:00
Cory LaViska
5ebc1b0cf0 Merge branch '11ty3' of https://github.com/shoelace-style/webawesome into 11ty3 2024-04-17 13:40:11 -04:00
Cory LaViska
f2c09ed486 update tests to use autoloader 2024-04-17 13:40:08 -04:00
Cory LaViska
eee77a13cf not needed 2024-04-17 13:39:16 -04:00
konnorrogers
6fb7e82b7a add form styling 2024-04-17 11:56:31 -04:00
konnorrogers
3dd2fc7669 copy over new themes 2024-04-17 11:53:26 -04:00
Cory LaViska
d0a348111a remove unused var 2024-04-17 11:34:48 -04:00
Cory LaViska
6663afdd10 fix link 2024-04-17 11:27:46 -04:00
Cory LaViska
878fe3b3de heavyyyy 2024-04-17 11:24:33 -04:00
Cory LaViska
67b2888489 oh no where did astro go 2024-04-17 11:20:27 -04:00
konnorrogers
af8be3216f finish select 2024-04-16 18:10:42 -04:00
konnorrogers
fb8430d9e5 working on checkbox 2024-04-11 14:26:25 -04:00
konnorrogers
c028a7a468 Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/form-association-experiment 2024-04-10 13:17:03 -04:00
Kelsey Jackson
6423c766e0 Merge pull request #92 from shoelace-style/kj/pattern-building
Kj/pattern building
2024-04-10 10:16:07 -05:00
Kelsey Jackson
6856362174 addressed feedback 2024-04-10 10:01:13 -05:00
konnorrogers
b927019e0c get button working 2024-04-08 11:37:13 -04:00
Kelsey Jackson
1f8640b5f2 added folder to config 2024-04-05 08:13:53 -05:00
Kelsey Jackson
a49b8af638 Merge branch 'next' into kj/pattern-building 2024-04-05 08:04:52 -05:00
Kelsey Jackson
8e49d99d99 e-commerce patterns 2024-04-05 08:03:15 -05:00
konnorrogers
bc9eb79e5e working on button 2024-04-03 18:58:14 -04:00
konnorrogers
c80e35ef58 fix tests for input 2024-03-29 17:44:24 -04:00
konnorrogers
e2ca0e4d5e fix form tests 2024-03-29 14:16:57 -04:00
konnorrogers
e0d79a271a prettier 2024-03-27 14:36:11 -04:00
konnorrogers
a77b9a92cd prettier 2024-03-27 14:34:12 -04:00
konnorrogers
967ffd6e39 fix textarea 2024-03-27 14:32:21 -04:00
konnorrogers
23dbadab91 more work on form association 2024-03-27 14:03:49 -04:00
konnorrogers
6b3d2fe052 prettier 2024-03-19 14:27:33 -04:00
konnorrogers
d566a829e6 initial prototype of form association experiment 2024-03-19 14:22:44 -04:00
Konnor Rogers
8e5e039af8 Rename Layout to Page (#65)
* working on layouts

* fix buildS

* first layout converted to sportawesome

* working on playgrounds

* continued work on layouts

* working on astro layout

* light-pen 3

* rename layout to page

* prettier

* add vercel.json

* add vercel.json

* add vercel.json

* add vercel.json

* add vercel.json

* add sandbox-settings

* add sandbox-settings

* add sandbox-settings

* maybe now?

* remove sandbox-settings

* remove vercel.json

* rename to pagE

* fix grid for navigation

* prettier

* fix stuff

* fix search

* prettier
2024-03-14 12:47:28 -04:00
Cory LaViska
2e725a2d93 prettier 2024-03-12 16:02:31 -04:00
Cory LaViska
c139865635 fix padding 2024-03-12 15:59:22 -04:00
Cory LaViska
f59c544fbe update content 2024-03-12 15:06:28 -04:00
Cory LaViska
28bdcae2c6 fix layout to be more font awesomey 2024-03-12 15:00:58 -04:00
konnorrogers
b1530d0773 Fix dev server infinite reload 2024-03-12 14:16:11 -04:00
Konnor Rogers
5feee64425 Font Awesome theme 👀 (#64)
* font awesome site theme

* separate font awesome.css

* prettier

* remove image borders

* fix search and prism

* select first item

* 30ms'

* fix double render

* fix for turbo loading

* fix preview

* prettier

* fix pagefind

* prettier
2024-03-12 13:45:33 -04:00
Konnor Rogers
9647259b5f fix the test suite (#63)
* fix the test suite

* prettier

* fix the test suite

* prettier
2024-03-11 12:23:25 -04:00
Cory LaViska
84e276ae10 Merge pull request #32 from shoelace-style/prepare
Backport 1868
2024-03-06 07:56:34 -05:00
Cory LaViska
4718c3d815 move to prepare 2024-03-06 07:56:24 -05:00
Cory LaViska
aa1bfb0885 Merge branch 'next' into prepare 2024-03-06 07:54:52 -05:00
Cory LaViska
acf2055768 Merge pull request #31 from shoelace-style/efficient-style-imports
Backport 1861
2024-03-06 07:54:16 -05:00
Cory LaViska
ef4d2fac40 Merge branch 'next' into efficient-style-imports 2024-03-06 07:53:52 -05:00
Cory LaViska
b53c1d940a backport 1880 2024-02-21 13:33:00 -05:00
Cory LaViska
edd62490f8 backport 1839 2024-02-20 15:01:35 -05:00
Cory LaViska
96a381d3a3 backport 1879 2024-02-20 14:18:48 -05:00
Cory LaViska
a2a72de2cf backport 1788 2024-02-20 14:13:23 -05:00
Cory LaViska
9a51e69320 backport 1878 2024-02-20 14:00:49 -05:00
Cory LaViska
07be57847d backport 1874 2024-02-20 13:48:57 -05:00
Cory LaViska
0095ca5fe7 backport 1877 2024-02-20 12:53:38 -05:00
Cory LaViska
a1b1d594aa backport 1868 2024-02-12 12:50:55 -05:00
Cory LaViska
531a2f1634 backport 1861 2024-02-09 11:03:15 -05:00
Cory LaViska
cb1c423aea backport 1862 2024-02-09 10:05:14 -05:00
Cory LaViska
93306c99ce backport 1800, 1860 2024-02-09 09:58:13 -05:00
Cory LaViska
5f8c69064c backport 1852 2024-02-09 09:46:46 -05:00
Cory LaViska
f51a09ddf0 backport 1840 2024-02-08 12:46:08 -05:00
Konnor Rogers
92533c0297 Convert to Starlight (#22)
* first pass at starlight

* converting to starlight

* working on converting to starlight

* working on data

* watch custom-elements.json

* turn on pagefind

* add component meta data

* fix renderings / overrides.

* fix mdx logo

* continue starlight work

* building site

* get global styles + reloads working

* themer fixes

* adding additional headings

* working on dynamic content

* have TableOfContents.astro push to TOC

* working on code stuff

* remove code preview

* deploy

* add patch package

* patch in build

* patch in build

* remove {% raw %} calls

* convert to starlight...complete

* prettier

* update lockfile

* merge main

* fix index.mdx

* prettier'

* fix small things

* docs updates

* add dark mode shortcut

* prettier

* prettier

* prettier

* remove pagefind from public

* add twitteR

* prettier

* fix tests

* prettier
2024-02-05 11:02:14 -05:00
Cory LaViska
94558e6ea5 Merge pull request #19 from shoelace-style/backport-menu-item-loading
backport `<sl-menu-item loading>`
2024-01-31 16:13:59 -05:00
lindsaym-fa
bab673fbdc optional class for alternating table row colors 2024-01-31 15:27:39 -05:00
lindsaym-fa
7b20f9c87a deprecate global toggle-size properties 2024-01-30 16:06:09 -05:00
lindsaym-fa
ddbd91ad89 update radio with custom properties, svg circle 2024-01-30 15:45:27 -05:00
lindsaym-fa
130844df1c add custom properties to carousel 2024-01-25 14:08:31 -05:00
lindsaym-fa
d6cfa1ab24 add custom properties to tag 2024-01-24 16:40:25 -05:00
Cory LaViska
ec613f8d32 backport 1797 2024-01-24 13:31:42 -05:00
Cory LaViska
52e2518365 backport 1818 2024-01-24 13:24:29 -05:00
Cory LaViska
9b7aad71a9 backport 1831 2024-01-24 13:23:41 -05:00
Cory LaViska
b7541d240b backport 1828 2024-01-24 13:21:27 -05:00
Cory LaViska
c67da1e818 backport 1826 2024-01-24 13:20:36 -05:00
Cory LaViska
265e523a56 backport 1822 2024-01-24 13:16:38 -05:00
Cory LaViska
bfe05d0692 backport 1821 2024-01-24 12:25:13 -05:00
Cory LaViska
651eae8cb6 backport 1820 2024-01-24 12:21:41 -05:00
lindsaym-fa
8c8b3f1853 add custom properties to badge 2024-01-23 11:27:01 -05:00
lindsaym-fa
d1ed504dd8 update custom properties on checkbox doc 2024-01-18 08:46:51 -06:00
lindsaym-fa
5335c9421a add depth to checkbox 2024-01-17 16:44:34 -06:00
lindsaym-fa
1b380f3f1d document custom properties for checkbox 2024-01-17 09:33:11 -06:00
lindsaym-fa
d166bc0e48 add custom properties to checkbox 2024-01-17 09:08:26 -06:00
lindsaym-fa
595cc303e7 add custom property for progress bar shadows 2024-01-16 14:08:11 -06:00
lindsaym-fa
4260b27fd2 tweak spacing for playful theme 2024-01-16 13:55:59 -06:00
lindsaym-fa
7c6f018c5b rename border tokens with s/m/l convention 2024-01-16 13:50:30 -06:00
lindsaym-fa
b892f1f86a re-integrate borders into main theme stylesheets 2024-01-16 13:42:32 -06:00
lindsaym-fa
a0e9125d61 add custom properties to details component 2024-01-16 13:13:32 -06:00
lindsaym-fa
5b741006a1 tweak playful theme font weights 2024-01-16 12:57:12 -06:00
lindsaym-fa
30bfabc397 add link decoration tokens; undo dark mode borders 2024-01-16 10:02:49 -06:00
lindsaym-fa
4e1bea7d94 update fonts, remove font imports from themes 2024-01-15 09:18:34 -06:00
lindsaym-fa
f2bb9fefee dark theme adjustments 2024-01-08 23:19:14 -05:00
lindsaym-fa
9987ce8d4f simplify themer logic 2024-01-08 22:49:48 -05:00
lindsaym-fa
4ace1efbe0 minor themer tweaks 2024-01-08 18:06:02 -05:00
Konnor Rogers
d7920f2e75 Add logo uploader (#18)
* fix tabbable, add logo uploader

* Add icon chooser and project name to themer

* Add icon chooser and project name to themer

* make theme swapping less jarring

* add depth to themer

* update font families / font weights on theme change

* fix prettier

* update themer to reset values on theme change

* remove custom-elements.mjs

* prettier

* update comments in isVisible

* add PR #

* prettier

* update changelog

* prettier

* update changelog

* fix themer

* ensure target exists

* update icon search

* prettier

* fix select test

* prettier

* fix sprite svg

* remove custom-elements.mjs

* Add small validation to themer

* prettier

* fix conflicts

* prettier

* remove cem-manifest.mjs

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2024-01-08 16:43:57 -05:00
Kelsey Jackson
4198cf0f15 Merge pull request #24 from shoelace-style/theming-ui/dark-mode-for-all-themes
add the ability to toggle light and dark mode for themes
2024-01-08 14:03:16 -06:00
Kelsey Jackson
7562905bbf made updates 2024-01-05 15:20:33 -06:00
Kelsey Jackson
4914cdb352 Merge pull request #23 from shoelace-style/theming-ui/add-curated-font-list
add list of curated fonts
2024-01-04 18:08:21 -06:00
Kelsey Jackson
0c95c70192 updated spacing issue 2024-01-03 11:30:16 -06:00
Kelsey Jackson
430730f24a Merge branch 'next' into theming-ui/add-curated-font-list 2024-01-03 11:01:05 -06:00
Kelsey Jackson
ab0c615e10 updated text 2024-01-03 10:46:53 -06:00
Kelsey Jackson
716ab94069 Merge branch 'next' into theming-ui/dark-mode-for-all-themes 2024-01-03 10:26:08 -06:00
lindsaym-fa
ccc6f1aa23 adjust applied code background color 2023-12-13 17:44:25 -05:00
lindsaym-fa
893f8b2740 fix sandbox icons 2023-12-13 17:10:08 -05:00
lindsaym-fa
00d5164912 touch up icons 2023-12-13 17:02:24 -05:00
Cory LaViska
fc9151e573 backport 1787 2023-12-13 12:04:53 -05:00
Kelsey Jackson
cf97bc3c6c add the ability to toggle light and dark mode for themes 2023-12-12 10:58:29 -06:00
Cory LaViska
eb9dbf097c prettier 2023-12-11 16:53:11 -05:00
konnorrogers
5422e6431c fix copying cdn build to _site after its been built 2023-12-11 16:25:24 -05:00
Cory LaViska
f3a921022e Merge branch 'icon' into next 2023-12-11 16:02:12 -05:00
Cory LaViska
be1440aee0 update settings 2023-12-11 16:01:44 -05:00
Kelsey Jackson
fe23a7ddb8 add list of curated fonts 2023-12-11 11:51:53 -06:00
lindsaym-fa
f53a643cf3 improve typescale 2023-12-08 17:53:33 -05:00
Konnor Rogers
3f604fcee1 prettier (#20) 2023-12-08 15:09:34 -05:00
lindsaym-fa
d8b6db8c5b darken background in themer sample UI 2023-12-08 14:19:54 -05:00
lindsaym-fa
31215dbda4 define font size at root in applied styles 2023-12-08 14:18:24 -05:00
Cory LaViska
f00e8c3a65 prettier ci output 2023-12-07 16:30:37 -05:00
Cory LaViska
a4f8bf94ee fix 2023-12-07 16:26:44 -05:00
Cory LaViska
8ae1303188 sigh 2023-12-07 16:26:07 -05:00
Cory LaViska
ffc0248e4c fix build 2023-12-07 15:59:53 -05:00
konnorrogers
81d3f22da6 fix dev server output for errors / logging 2023-12-07 15:18:56 -05:00
Cory LaViska
0fa8e6f550 update build 2023-12-07 14:58:12 -05:00
Cory LaViska
a67d1df89a fix error 2023-12-07 14:57:53 -05:00
Cory LaViska
0fe400c6f4 Merge branch 'next' into icon 2023-12-07 10:09:54 -05:00
Cory LaViska
349aa45d2b backport 2023-12-06 17:18:12 -05:00
Cory LaViska
fcf0a136f2 backport 1771 2023-12-06 16:26:15 -05:00
Cory LaViska
8acfc4c9de backport 1767 2023-12-06 16:19:01 -05:00
Cory LaViska
4f8417806c backport 1764 2023-12-06 12:02:20 -05:00
Cory LaViska
65cb3175af update soooo many icons 2023-12-05 17:37:06 -05:00
Cory LaViska
06135e686b fic code bg color 2023-12-05 13:55:31 -05:00
lindsaym-fa
340351ca4b improve variance between depth levels 2023-12-01 12:12:49 -05:00
Cory LaViska
5701bef6e9 backport 1749 2023-12-01 10:29:37 -05:00
Cory LaViska
62417ed1d1 backport PR 1752 2023-12-01 10:15:20 -05:00
Cory LaViska
545162eaae data-web-awesome instead of data-webawesome 2023-11-28 14:19:08 -05:00
lindsaym-fa
77a8c418ea add Font Awesome theme 2023-11-22 14:55:37 -05:00
lindsaym-fa
641e92a340 improve shadow calculations 2023-11-22 14:35:17 -05:00
lindsaym-fa
3f8535e7b8 remove border color change for alerts 2023-11-22 14:33:41 -05:00
konnorrogers
81a66df7e4 add exportConditions for tests 2023-11-21 11:07:46 -05:00
Lindsay M
ae2480dfe2 Theme revisions (#12)
* remove square, stretch, and squish spacing tokens

* remove units from base tokens

* rename corner tokens with t-shirt size scale

* rename 'font-size' tokens to 'size'

* rename 'neutral' primitives to 'base'

* remove black and white tokens

* improve 'form-controls' tokens

* reintroduce granular focus ring tokens

* fix themer styles

* tweak shadow styles

* improve naming and scope of foundational colors

* overhaul color naming and add new themes

* more classic sl component styles

* make 'chic' theme dark by default

* adjust table row colors

* remove deprecated properties from 'classic' theme

* remove mistakenly committed stylesheets

* revert adjustment to space properties

* delete web-types.json

* revert "rename 'font-size' tokens to 'size'"
2023-11-15 11:43:40 -05:00
Cory LaViska
c95b0b6c66 backport PR 1722 2023-11-14 13:15:57 -05:00
Konnor Rogers
dee01269ad Konnorrogers/backport 1711 and 1714 (#11)
* backport #1711 & #1714

* remove custom-elements.mjs

* prettier
2023-11-14 12:22:18 -05:00
Cory LaViska
e11eb363aa Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2023-11-13 15:57:49 -05:00
Cory LaViska
0d33cabec4 add back two-way binding info 2023-11-13 15:57:47 -05:00
Konnor Rogers
b5d9b49b27 backport #1707 & #1708 (#10)
* backport #1707 & #1708

* prettier

* fix prettier log level

* fix test

* backport #1707 & #1708
2023-11-08 15:20:06 -05:00
Lindsay M
1b654c7c85 Support theme customizations for depth and borders
* Move custom properties related to shadows and borders to separate stylesheets
* Change base values and themer calculations related to shadows and borders to be unitless
* Add low-level custom properties for alert, button, card, input, select, switch, and textarea
* Add generic guidance for authoring custom properties to the Contributing docs
2023-11-03 13:46:00 -04:00
Cory LaViska
4e53ce870d backport PR 1702 2023-11-03 10:27:03 -04:00
Cory LaViska
932e2e7566 update jet brains plugin and stop writing to package.json 2023-11-02 08:53:17 -04:00
Konnor Rogers
e76a1dc1f6 fix no translation error (#8)
* fix no translation error

* prettier
2023-11-01 16:49:24 -04:00
Cory LaViska
38302a7c28 fix bad port 2023-10-25 13:38:21 -04:00
Cory LaViska
71e5b10f3b backport PR 1684 2023-10-25 13:07:59 -04:00
Cory LaViska
3eda5510c3 fix tests 2023-10-23 12:33:14 -04:00
Cory LaViska
32494e783c backport PR 1605 2023-10-23 12:03:18 -04:00
Cory LaViska
cdf38fe147 remove ts-check 2023-10-23 11:35:32 -04:00
Cory LaViska
302c174055 backport PR 1671 2023-10-23 10:48:37 -04:00
Cory LaViska
fb044aae89 backport PR 1670 2023-10-23 10:19:34 -04:00
Cory LaViska
bf299d8234 backport PR 1670 2023-10-20 09:04:15 -04:00
Cory LaViska
30a3164a96 backport PR 1663 2023-10-19 10:31:24 -04:00
Cory LaViska
2a22fb683c backport PR 1667 2023-10-19 09:43:32 -04:00
Cory LaViska
325ddafb13 backport docs fix 2023-10-19 09:41:39 -04:00
Cory LaViska
fcb2c7868c backport PR 1661 2023-10-18 13:44:20 -04:00
Cory LaViska
46b198866d backport PR 1656 2023-10-18 13:26:39 -04:00
Cory LaViska
9a4da9b763 backport PR 1655 2023-10-16 13:05:53 -04:00
Cory LaViska
7869144f5e backport changelog for 2.10.0 2023-10-16 13:05:37 -04:00
Cory LaViska
2d7d400040 backport PR 1614 2023-10-16 12:47:36 -04:00
Cory LaViska
6f5e5a2433 update default 2023-10-16 12:41:37 -04:00
Cory LaViska
e59a4659d8 fix import 2023-10-16 12:39:21 -04:00
Cory LaViska
2f9732fc3d use discussions for features 2023-10-16 11:37:17 -04:00
Cory LaViska
fdede79155 backport PR 1615 2023-10-13 13:53:41 -04:00
Cory LaViska
3277284473 backport PR 1608 2023-10-12 16:28:19 -04:00
Cory LaViska
b2b8d0d941 backport PR 1583 2023-10-12 15:52:31 -04:00
Cory LaViska
91bfd38a9a update deps to stay in sync with sl 2023-10-12 15:03:38 -04:00
Cory LaViska
f4971456d0 backport PR 1599 2023-10-12 12:18:08 -04:00
Cory LaViska
cc18a90a86 backport PR 1600 2023-10-12 12:11:20 -04:00
Cory LaViska
60b6803437 Merge branch 'themer' into next 2023-10-12 12:01:36 -04:00
Cory LaViska
2b57157502 backport PR 1604 2023-10-12 12:01:10 -04:00
Cory LaViska
967208d69b backport PR 1586 2023-10-02 09:06:58 -05:00
Cory LaViska
3bd13cd7cb Merge branch 'next' into themer 2023-09-29 11:32:24 -04:00
lindsaym-fa
ebe1904479 update and add themes 2023-09-28 22:47:25 -04:00
Cory LaViska
23356f6e39 adjust help text 2023-09-27 16:48:06 -04:00
Cory LaViska
4958ee41ae add favicon 2023-09-27 16:41:35 -04:00
Cory LaViska
9784faa32a remove tooltip for demo 2023-09-27 16:35:21 -04:00
Cory LaViska
a913c22200 cap border radius for checkboxes 2023-09-27 16:35:16 -04:00
Cory LaViska
95dce95183 fix copy button 2023-09-27 16:28:26 -04:00
Cory LaViska
53f9230354 update logo and add form control examples 2023-09-27 16:17:34 -04:00
Cory LaViska
946f08db4b update logo 2023-09-27 16:05:44 -04:00
Cory LaViska
4b0ee8907f more themes for the demo 2023-09-27 14:16:25 -04:00
Cory LaViska
62bb58dc09 backport localize fix 2023-09-27 13:10:21 -04:00
Cory LaViska
1d903fab38 ignore package.json 2023-09-27 13:09:57 -04:00
Cory LaViska
a458f2a6f0 add style guide to themer demo 2023-09-27 13:09:12 -04:00
Cory LaViska
f66e8cec69 remove shadow 2023-09-26 16:45:41 -04:00
Cory LaViska
9fd070639c more knobs 2023-09-26 16:37:56 -04:00
Cory LaViska
528748155a remove sidebar 2023-09-26 12:44:59 -04:00
Cory LaViska
474ffb98d6 retro changelog 2023-09-26 10:15:34 -04:00
Cory LaViska
cb2d5e4eb4 update to 2.9.0 changelog 2023-09-26 09:33:19 -04:00
Cory LaViska
3c51262a37 Merge branch 'next' into themer 2023-09-26 09:11:03 -04:00
Cory LaViska
7e4dba7af1 backport PR 1572 2023-09-26 09:10:53 -04:00
Cory LaViska
319705106b Merge branch 'next' into themer 2023-09-26 08:54:05 -04:00
Cory LaViska
2416f93a79 backport PR #1575 2023-09-26 08:53:55 -04:00
Cory LaViska
e398091a36 backport issue 1576 2023-09-25 09:09:53 -04:00
Cory LaViska
d836bcebbc fix words 2023-09-25 09:00:31 -04:00
Cory LaViska
d08f928818 early early early themer concept 2023-09-22 11:09:34 -04:00
Cory LaViska
c3e74ada39 sample page 2023-09-21 11:58:40 -04:00
Cory LaViska
a2e9a3de96 add form validation classes 2023-09-21 09:41:36 -04:00
Cory LaViska
b2a99c83e3 don't break 2023-09-20 14:48:17 -04:00
Cory LaViska
a4185bc926 fix focus-visible styles 2023-09-20 14:47:58 -04:00
Cory LaViska
8e09db9d40 Merge branch 'next' into applied-styles 2023-09-18 15:17:15 -04:00
Cory LaViska
07ca5a45ae initial 2023-09-18 15:16:08 -04:00
lindsaym-fa
88a8173178 add mellow theme 2023-09-14 15:51:16 -04:00
lindsaym-fa
5a8c6912dc fix switch focus 2023-09-14 12:36:44 -04:00
Cory LaViska
a7c786987d backport fix for 1548 2023-09-14 12:08:33 -04:00
Cory LaViska
1179e48955 sync 2023-09-14 11:48:06 -04:00
Cory LaViska
07f0884462 fix 2023-09-14 11:45:18 -04:00
Cory LaViska
ef3575358e temp dark mode toggle 2023-09-14 11:36:00 -04:00
Cory LaViska
5e2762cbc6 backport PR 1564 2023-09-14 11:19:10 -04:00
Cory LaViska
7e165fa8bd hold 2023-09-14 11:17:31 -04:00
Cory LaViska
33706e0f27 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2023-09-14 11:15:52 -04:00
Cory LaViska
e262ed14b0 backport PR 1565 2023-09-14 11:15:17 -04:00
lindsaym-fa
545eb467fc add theme tokens, update usage, add dark mode 2023-09-13 17:51:21 -04:00
Cory LaViska
2848ab68ef backport PR 1563 2023-09-13 11:54:53 -04:00
Cory LaViska
fc1aa42c26 more style updates 2023-09-12 15:58:45 -04:00
Cory LaViska
8baa32d8c9 Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2023-09-12 15:06:47 -04:00
Cory LaViska
a519077112 inherit font sizes/line-heights 2023-09-12 15:05:53 -04:00
Konnor Rogers
5219188690 Reduce time it takes to replace strings (#6)
* reduce replacer time from 9 seconds to 3 seconds

* prettier

* prettier
2023-09-12 14:46:39 -04:00
lindsaym-fa
267b9eba20 correct shadow usage 2023-09-12 13:12:37 -04:00
lindsaym-fa
9c343ef3fd update color primitives and fix comments 2023-09-12 13:02:59 -04:00
Cory LaViska
e82b076981 fix tag height/spacing 2023-09-12 12:32:28 -04:00
Cory LaViska
97bd88f904 fix link buttons 2023-09-12 12:25:08 -04:00
Cory LaViska
21d8cdbb5c Merge branch 'next' of https://github.com/shoelace-style/webawesome into next 2023-09-12 12:09:12 -04:00
Cory LaViska
a5f8c51904 update bootstrap icons 2023-09-12 12:09:10 -04:00
lindsaym-fa
94ad43e130 improved color mixing for hover and active states 2023-09-11 16:54:20 -04:00
Cory LaViska
1f04cd2a50 prettier 2023-09-11 13:53:21 -04:00
Cory LaViska
5a55c240ee Merge pull request #4 from shoelace-style/theming
Theming API + SL => WA
2023-09-11 13:50:28 -04:00
Lindsay M
e02b36873e Merge pull request #5 from shoelace-style/lindsaym/theming-tune-up
Theming tune up
2023-09-11 13:31:41 -04:00
lindsaym-fa
f89ef95d65 updated global properties and improved usage 2023-09-11 13:21:35 -04:00
Lindsay M
a65db66005 improved naming and usage of --wa-form-controls-* properties 2023-09-08 17:00:09 -04:00
Lindsay M
a6e19d0710 renamed CSS properties for semantic color variants 2023-09-08 16:23:48 -04:00
Cory LaViska
df02aeef89 remove sponsor links 2023-09-08 14:43:15 -04:00
Cory LaViska
2d03f60c70 lint 2023-09-08 14:35:29 -04:00
Cory LaViska
e45b44ad03 stop making shoes 2023-09-08 14:32:23 -04:00
Cory LaViska
015429e05d sl => wa 2023-09-08 13:45:49 -04:00
Cory LaViska
5628381449 backport PR 1558 2023-09-08 08:33:27 -04:00
Cory LaViska
0bf3cf2535 remove webtypes 2023-09-08 08:33:04 -04:00
Cory LaViska
d4aa9ff99e backport PR 1557 2023-09-08 08:31:26 -04:00
Cory LaViska
0229c315bb remaining components 2023-09-07 12:54:44 -04:00
Cory LaViska
67d4458e69 more stylez 2023-09-06 16:13:49 -04:00
Cory LaViska
67bfbed308 input, textarea, and more button styles 2023-09-06 12:32:57 -04:00
Cory LaViska
2c053b6fd3 more components 2023-09-05 16:39:38 -04:00
Cory LaViska
6156e38a34 dialog, drawer, details, alert, divider 2023-09-05 15:16:24 -04:00
Cory LaViska
631df0293c copy button 2023-09-05 14:53:49 -04:00
Cory LaViska
b86a6a54ab carousel 2023-09-05 14:53:45 -04:00
Cory LaViska
201b32f3fb alerts 2023-09-05 14:45:33 -04:00
Cory LaViska
ebed8daee6 buttons, primary, and more 2023-09-05 12:01:19 -04:00
Cory LaViska
55be0a557f more retheming 2023-08-31 16:50:31 -04:00
Cory LaViska
b4c45b480b update docs and theme tokens to use wa 2023-08-31 12:06:32 -04:00
Cory LaViska
8b9df9871a resolve instead of reject 2023-08-30 15:12:13 -04:00
Cory LaViska
af7682aaca update setting 2023-08-30 11:35:19 -04:00
Konnor Rogers
883cb161ec show errors in dev server (#1547)
* show errors in dev server

* fix build

* prettier
2023-08-30 09:42:34 -04:00
Cory LaViska
a2fbe121c3 update ctrl/tinycolor; fixes #1542 (#1545) 2023-08-28 09:39:16 -04:00
Cory LaViska
ab770c566e fix spacing; #1540 (#1544) 2023-08-28 09:27:57 -04:00
Konnor Rogers
1867603225 log stderr in builds (#1543) 2023-08-25 16:20:19 -04:00
Cory LaViska
cf195da424 fix stuck search 2023-08-25 09:35:05 -04:00
Cory LaViska
0cb6aa5d12 reformat by CEM plugin 2023-08-23 15:36:19 -04:00
Cory LaViska
7e4d4c3c98 2.8.0 2023-08-23 12:55:35 -04:00
Cory LaViska
b5ef3191b7 update version 2023-08-23 12:53:47 -04:00
Konnor Rogers
f30481e229 remove unused code path (#1539) 2023-08-23 12:52:42 -04:00
Konnor Rogers
ae010c333b fix: check <slot> elements for assignedElements to allow wrapping focus-trapped elements (#1537)
* fix: internal logic for tabbable checks slotted elements

* prettier

* add better note for generators

* prettier

* fix tests

* prettier

* prettier

* fix tabbable test for safari

* prettier

* Update src/internal/tabbable.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>

* Update src/internal/modal.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>

* Update src/internal/tabbable.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-08-23 11:43:48 -04:00
Konnor Rogers
43d1f9ee7a fix: use verbatimModuleSyntax and isolatedModules (#1534)
* feat: use verbatimModuleSyntax and isolatedModules

* prettier

* remove newline

* prettier
2023-08-23 10:34:40 -04:00
Cory LaViska
ec17e8736d fix component links; closes #1538 2023-08-23 09:46:23 -04:00
Cory LaViska
44b27e791e fix plop template 2023-08-23 09:29:24 -04:00
Cory LaViska
02385027db fix copy button focus 2023-08-22 17:10:01 -04:00
Cory LaViska
b311072d9b use <sl-copy-button> (#1535) 2023-08-22 17:01:00 -04:00
Cory LaViska
87ac077b0a fix empty attributes in properties table (#1536) 2023-08-22 16:59:08 -04:00
Konnor Rogers
87837df35c remove extra react component wrapper, upgrade to v2 of @lit-labs/react (#1531)
* remove extra react wrapper, upgrade to v2 of @lit-labs/react, call define in module.

* add changelog entry

* prettier
2023-08-22 11:26:54 -04:00
Konnor Rogers
5d72bbd162 remove baseUrl from tsconfig for better dev experience (#1530) 2023-08-22 10:32:15 -04:00
Cory LaViska
a4fc1c5b44 Submenus (#1527)
* [RFC] Proof-of-concept commit for submenu support

This is a Request For Comments to seek directional guidance towards
implementing the submenu slot of menu-item.

Includes:
- SubmenuController to manage event listeners on menu-item.
- Example usage in menu-item documentation.
- Trivial tests to check rendering.

Outstanding questions include:
- Accessibility concerns. E.g. where to handle 'ArrowRight',
  'ArrowLeft'?
- Should selection of menu-item denoting submenu be possible or
  customizable?
- How to parameterize contained popup?
- Implementation concerns:
  - Use of ref / id
  - delegation of some rendering to the controller
  - What to test

Related to [#620](https://github.com/shoelace-style/shoelace/issues/620).

* Update submenu-controller.ts

Removed extraneous `console.log()`.

* PoC working of ArrowRight to focus on submenu.

* Revert "PoC working of ArrowRight to focus on submenu."

(Didn't mean to publish this.)

This reverts commit be04e9a221.

* [WIP] Submenu WIP continues.

- Submenus now close on change-of-focus, not a timeout.
- Keyboard navigation support added.
- Skidding fix for better alignment.
- Submenu documentation moved to Menu page.
- Tests for accessibility, right and left arrow keys.

* Cleanup: Removed dead code and dead code comments.

* style: Eslint warnings and errors fixed. npm run verify now passes.

* fix: 2 changes to menu / submenu on-click behavior:

1. Close submenu on click explicitly, so this occurs even if the menu is
   not inside of an sl-dropdown.

2. In menu, ignore clicks that do not explicitly target a menu-item.
   Clicks that were on (e.g. a menu-border) were emitting select events.

* fix: Prevent menu's extraneous Enter / space key propagation.

Menu's handleKeyDown calls item.click (to emit the selection).
Propagating the keyboard event on Enter / space would the cause re-entry
into a submenu, so prevent the needless propagation.

* Submenu tweaks ...

- 100 ms delay when opening submenus on mouseover
- Shadows added
- Distance added to popup to have submenus overlap menu slightly.

* polish up submenu stuff

* stay highlighted when submenu is open

* update changelog

* resolve feedback

---------

Co-authored-by: Bryce Moore <bryce.moore@gmail.com>
2023-08-21 17:26:41 -04:00
Konnor Rogers
539eaded73 Update React Wrappers with Refs that work (#1526)
* fix react types for refs

* fix displayName

* fix displayName]

* attempt to fix typings for React refs

* fix bad type

* prettier

* add changelog entry

* prettier
2023-08-18 13:31:50 -04:00
Cory LaViska
93b2e78092 Merge branch 'nathangray-next' into next 2023-08-18 12:05:47 -04:00
Cory LaViska
402a00dcd3 update docs 2023-08-18 12:05:22 -04:00
Cory LaViska
b63368d5f6 Merge branch 'next' of github.com:nathangray/shoelace into nathangray-next 2023-08-18 11:23:56 -04:00
Cory LaViska
74c6d3ee36 fix tree tests; #1521 2023-08-18 11:20:14 -04:00
nathan
621aa4362b Add HTMLElement to the getTag() return type 2023-08-18 09:17:02 -06:00
Cory LaViska
c8919ad11f prettier 2023-08-18 09:55:57 -04:00
Stephen Sugden
fad76dd1a2 SlTree: separate expand/collapse and selection behaviour in 'single' mode (#1521)
* Never select tree items when clicking the chevron

This changes the behaviour of sl-tree so that clicking on the expand/collapse icon will not select/deselect the item, only toggle it's expanded state.

* Refactor: inline SlTree.syncTreeItems

This was only called from 2 places, and they each had different
behaviour anyways.

* SlTree: separate expand/collapse from selection

This makes 'multi' and 'single' mode consistent with each other, and
with native file managers.
2023-08-18 09:55:29 -04:00
nathan
b2f6499b87 Fix lint warnings 2023-08-17 13:18:51 -06:00
nathan
9520e850dd Update for path changes
see 3a61d20d93
2023-08-17 11:34:25 -06:00
Cory LaViska
4ee5271a83 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-08-16 15:01:46 -04:00
Thomas Allmer
d8de7bcc51 fix(docs): Inline Form Validation Docs throw error on top level await (#1522) 2023-08-16 14:59:21 -04:00
Cory LaViska
7ee31be6d6 ignore package.json 2023-08-16 14:57:03 -04:00
Cory LaViska
9cb5ba7ac1 Radio button fix (#1524)
* fix formatting

* fix radio button spacing; fixes #1523
2023-08-16 14:51:46 -04:00
Peter Siska
c380368b61 Fix NPMDIR config (#1518)
* Fix NPMDIR config

* Add missing semi
2023-08-15 10:46:51 -04:00
Konnor Rogers
e298f7e5f4 fix broken tests for shoelace-element (#1516)
* add stub code prior to test

* fix broken test

* prettier

* prettier

* prettier
2023-08-14 11:23:00 -04:00
Cory LaViska
c743561c25 update docs 2023-08-14 10:23:59 -04:00
Alexander Krolick
e73e32fb71 Add docs on setting multiple values in select (#1508) 2023-08-14 10:21:52 -04:00
Cory LaViska
b09a48bec4 fix arg name 2023-08-14 10:02:23 -04:00
Burton Smith
aeef986cf5 JetBrains IDE Integration (#1512)
* upgrade vs code integration package

* add references

* add web-types plugin

* update reference

* run prettier

* update documentation

* run prettier

* remove test script
2023-08-14 09:34:34 -04:00
Cory LaViska
6f08f50639 2.7.0 2023-08-11 13:16:46 -04:00
Cory LaViska
8fc5f598d0 update changelog 2023-08-11 13:13:00 -04:00
Cory LaViska
1383ea3fe8 React import paths (#1507)
* fix react imports in examples

* move types to definition files

* update changelog

* update changelog
2023-08-11 13:09:44 -04:00
king8fisher
f8c37e0d14 Fix missing comma in linear-gradient (#1506) 2023-08-11 13:06:10 -04:00
Cory LaViska
cf543ef335 don't hijack key presses in text fields; fixes #1492 (#1504) 2023-08-11 11:25:46 -04:00
Cory LaViska
a3450a7d83 move emphasis 2023-08-11 11:01:37 -04:00
Cory LaViska
e80b2c9fb9 prettier 2023-08-11 11:01:00 -04:00
Alexander Krolick
8d617fb98c Expand on comment about space-separated value for sl-select (#1502) 2023-08-11 10:58:14 -04:00
Burton Smith
a6e225e47c upgrade vs code integration package (#1500)
* upgrade vs code integration package

* add references
2023-08-11 10:51:33 -04:00
Cory LaViska
e21943f4fb fix typos/whitespace 2023-08-11 10:30:40 -04:00
Cory LaViska
c36df5ecc1 <sl-copy> (#1483)
* copy updates

* Update docs/pages/components/copy.md

Co-authored-by: Thomas Allmer <d4kmor@gmail.com>

* unwrap and fix case

* copy button updates

* use bs icon

* add parts, hoist, and improve parsing a bit

* update docs

* remove comment

---------

Co-authored-by: Thomas Allmer <d4kmor@gmail.com>
2023-08-11 10:27:34 -04:00
Cory LaViska
458def7830 update bootstrap icons and fix license 2023-08-10 12:59:44 -04:00
Cory LaViska
b5d800f07a don't wrap code tags in tables 2023-08-10 11:29:25 -04:00
Cory LaViska
6551a6330b remove default assignee 2023-08-09 16:13:52 -04:00
Cory LaViska
cb5f670909 update changelog 2023-08-09 15:40:36 -04:00
Cory LaViska
5b6c1632bd update var names and use stylesheet; #1496 2023-08-09 15:38:24 -04:00
Tomas Drencak
bf15f2fb8a Toggle visibility of the clear button (#1496) 2023-08-09 15:28:30 -04:00
Konnor Rogers
31ef2f7929 remove side-effects key, update React docs for cherry-picking (#1485)
* remove side-effects, update React docs for cherry-picking

* prettier

* add PR #

* prettier

* fix react import paths

* Update docs/pages/frameworks/react.md

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>

* add colons to imports

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-08-07 13:20:34 -04:00
Cory LaViska
8aab94f184 switch skypack to esm.sh to fix react examples 2023-08-03 15:27:10 -04:00
Cory LaViska
b7acb27c98 Revert "feat(clipboard): add new component sl-clipboard (#1473)"
This reverts commit 16f3e256b0.
2023-08-02 15:35:11 -04:00
Cory LaViska
dcbbc55f28 fix up/down focus in dropdown; closes #1472 (#1481) 2023-08-01 14:05:11 -04:00
Konnor Rogers
81dfcc2eae fix treeshaking array (#1480)
* fix treeshaking array

* fix treeshaking array

* imports to not use .component
2023-08-01 14:04:36 -04:00
Thomas Allmer
16f3e256b0 feat(clipboard): add new component sl-clipboard (#1473)
* feat(clipboard): add new component sl-clipboard

* using slots

* using a single copyStatus

* feat(clipboard): support inputs/textarea/links and shadow dom

* fix(clipboard): add area-live to announce copied

* feat(clipboard): support any component with a value property
2023-08-01 13:53:11 -04:00
Cory LaViska
75b2da9eab 2.6.0 2023-07-31 15:17:43 -04:00
Cory LaViska
9736f053d9 update version 2023-07-31 15:15:54 -04:00
Cory LaViska
d0b710c26d clear search index and other cache with cmd+shift+r 2023-07-31 15:14:25 -04:00
Cory LaViska
5b83d4d1b0 update changelog 2023-07-31 14:00:57 -04:00
Thomas Allmer
89f0f4a02c feat(details): use details and summary html tag to enable in browser searching (#1470) 2023-07-31 13:58:42 -04:00
Cory LaViska
a067ccb9e0 fix docs 2023-07-27 12:39:44 -04:00
Cory LaViska
1ccea42cca fix card borders 2023-07-26 15:20:51 -04:00
Cory LaViska
0f90dd0f54 update changelog 2023-07-25 22:20:13 -04:00
Ben Anderson
262cbc9a22 Add entry to changelog for types for react-wrapped elements (#1464) 2023-07-25 22:18:54 -04:00
Konnor Rogers
3a61d20d93 Create non-auto-registering routes (#1450)
* initial attempt at not auto defining

* add files with -

* continued work on removing auto-define

* fix component definitions

* update with new tag stuff

* fix lots of things

* fix improper scoped elements

* working through side effects

* continued react wrapper work

* update changelog

* formatting

* fixes

* update changelog

* lint / formatting

* fix version injection

* fix version injection, work on test

* fix version injection, work on test

* fix merge conflicts

* fix jsdoc null issue

* fix templates

* use exports

* working on tests

* working on registration mocking

* fix customElements test

* linting

* fix some test stuff

* clean up test

* clean up comment

* rename scopedElements to dependencies

* linting / formatting

* linting / formatting

* mark all packages external and still bundle

* set bundle false

* set bundle true

* dont minify

* fix merge conflicts

* use built shoelace-element

* fix lint errors

* prettier

* appease eslint

* appease eslint gods

* appease eslint gods

* appease eslint gods

* appease eslint gods

* add shoelace-autoloader

* move it all into 1 function

* add exportmaps note

* prettier

* add jsdelivr entrypoint

* read as utf8

* update docs with .component.js importS

* prettier
2023-07-24 13:00:07 -04:00
Cory LaViska
95f4f87eb8 update changelog 2023-07-19 15:06:25 -04:00
Cory LaViska
5b3cc0d492 add part to docs; #1460 2023-07-19 15:05:52 -04:00
Yehuda Ringler
0de39a8163 Add part to button spinner (#1460) 2023-07-19 15:04:49 -04:00
Cory LaViska
879fd7a224 wait for registration before attaching form handlers; closes #1452 2023-07-18 13:38:20 -04:00
Cory LaViska
50af138424 fix typos 2023-07-18 13:15:21 -04:00
Cory LaViska
9d592f4e08 wait longer to prevent flakiness 2023-07-18 13:13:59 -04:00
Cory LaViska
5016d27af7 remove test because we can't reliably suppress retargeted clicks 2023-07-18 13:11:08 -04:00
Chellappan
7218a19357 Replace .bind() with arrow functions in form controller,modal and slot controller (#1453) 2023-07-18 13:05:00 -04:00
Cory LaViska
33d2d4368f fix logic 2023-07-18 13:03:34 -04:00
Cory LaViska
cca40ca710 remove test because we can't reliably prevent retargeted click handlers 2023-07-18 12:58:22 -04:00
Cory LaViska
c6281859fd remove dead logic 2023-07-18 12:49:22 -04:00
Cory LaViska
956271880d fix for contained 2023-07-18 12:39:44 -04:00
Cory LaViska
201ff4efc5 fix escape key in dialog/drawer; closes #1457 2023-07-18 12:37:52 -04:00
Cory LaViska
f954233bda Revert "Move keydown handler for sl-drawer back to base div (#1459)"
This reverts commit 1e243e4257.
2023-07-18 12:12:43 -04:00
Cory LaViska
8267968b76 update output 2023-07-18 12:08:50 -04:00
Stephen Sugden
1e243e4257 Move keydown handler for sl-drawer back to base div (#1459)
* Move keydown handler for sl-drawer back to base div

This restores the stacking behaviour of drawers

See: #1457

* Autofocus panel of sl-drawer when it is open on firstUpdate
2023-07-18 11:57:16 -04:00
Cory LaViska
0b6c3a46cf Quick fixes (#1458)
* update base path docs

* fix examples

* fix broken CEM data in <sl-popup>

* Update docs/pages/getting-started/installation.md

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>

---------

Co-authored-by: Lindsay M <126139086+lindsaym-fa@users.noreply.github.com>
2023-07-17 14:05:17 -04:00
Cory LaViska
a2e58b7696 fix link 2023-07-17 10:05:00 -04:00
Cory LaViska
119d299657 remove old SPA settings 2023-07-13 17:00:23 -04:00
Cory LaViska
e8634e4178 Popup virtual elements (#1449)
* 1433: POC for comments (+ fix build.watch())

* 1433: consolidate virtualAnchor into anchor

* add virtual element examples

* update changelog

---------

Co-authored-by: Marko <marko@modelcitizen.com>
2023-07-13 16:49:57 -04:00
Cory LaViska
2e2a683d11 cleanup /index.html from search results (#1454) 2023-07-13 16:20:26 -04:00
Cory LaViska
414197acc9 unset last focused item; #1436 (#1446) 2023-07-12 14:52:13 -04:00
Ben Anderson
8fd01e1eda Add event types to react wrapper components (#1419)
* Rename SlSlideChange for consistency with other events

* Setup React event types for events used by Shoelace components

Means that consumers of Shoelace via the React wrapper will be able to
use callback methods with the correct event type, instead of having to
rely on casting and friends when using Typescript.

* Add docs demonstrating importing event types for React callbacks
2023-07-12 11:31:27 -04:00
Cory LaViska
e1ca7d1f59 Lit a11y update (#1444)
* update eslint-plugin-lit-a11y to latest

* update eslint deps

* remove aria- and role attribs from slots; closes #1422
2023-07-12 11:12:15 -04:00
Cory LaViska
f84d6939bd Doc updates (#1445)
* rename to CSS parts

* fix double dashes from merging
2023-07-11 15:23:51 -04:00
Konnor Rogers
82446e2114 Add modal tab tracking (#1403)
* add modal tab tracking

* prettier

* sort by tabindex

* sort by tabindex

* add a dialog test case for shadow roots

* add a changelog note

* add a changelog note

* prettier + test fixes

* prettier + test fixes
2023-07-07 15:32:23 -04:00
Konnor Rogers
a4f0ae9088 fix: valueAsDate now falls back to native implementation (#1399)
* fix: valueAsDate now falls back to native implementation

* changelog

* prettier

* prettier
2023-07-07 13:51:22 -04:00
Cory LaViska
fe3906f766 Don't steal focus when removing focused tree items (#1430)
* don't steal focus when removing focused tree items; #1428

* update PR link
2023-07-06 10:36:41 -04:00
Cory LaViska
c9e644f3fc Allow selecting menu items with space (#1429)
* allow selecting menu items with space; #1423

* update PR
2023-07-06 10:36:29 -04:00
Cory LaViska
8ffbd02db7 update changelog 2023-07-05 16:32:59 -04:00
Evan Harrison
e88d57d17d change .floor to .ceil in getCurrentPage; modify prev function to return to closest previous snappable index (#1420) 2023-07-05 16:26:00 -04:00
Cory LaViska
5f4de6d9f5 skip flaky tests 2023-07-03 15:59:24 -04:00
Cory LaViska
2cce87deeb add links 2023-07-03 15:50:58 -04:00
Cory LaViska
630b5b19a0 fix regression; #1417 2023-07-03 15:49:25 -04:00
Cory LaViska
2ce1451a9f fix typo 2023-07-03 15:17:43 -04:00
Cory LaViska
2d1badba96 this is why we can't have nice things 2023-07-03 13:31:28 -04:00
Cory LaViska
1b5db078a7 move aria attribs off <slot>; fixes #1417 2023-07-03 12:39:42 -04:00
Cory LaViska
91095bd63a better description for lighthouse 2023-07-03 12:38:09 -04:00
Cory LaViska
d9703a64fd restore concurrency 2023-07-03 11:25:43 -04:00
Cory LaViska
4c22e72390 update changelog 2023-07-03 11:21:39 -04:00
dhellgartner
d05b8fca20 Qr code tests (#1416)
* Add tests for qr-code

* Fix a small bug in qr-code

The background color was not passed to the
qr code

---------

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-07-03 11:19:50 -04:00
Evan Harrison
afca2ad2e0 change carousel docs to use correct attr name, slides-per-page (#1415) 2023-07-03 11:14:15 -04:00
Cory LaViska
b2aa854d98 update docs 2023-06-28 15:27:21 -04:00
Cory LaViska
287fff7cf1 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-06-26 12:25:30 -04:00
Cory LaViska
136ecae4a6 2.5.2 2023-06-26 12:21:04 -04:00
Cory LaViska
cac772d5e6 update version 2023-06-26 12:20:55 -04:00
Cory LaViska
e1dedcb1b5 Fix broken links (#1407)
* add spacing

* update old links
2023-06-26 12:20:13 -04:00
Cory LaViska
c4901eca68 update old links 2023-06-26 12:17:48 -04:00
Cory LaViska
a001c2d12b add spacing 2023-06-26 12:11:15 -04:00
Eddie Cheng R4
c4c622eabd redirect the link to the right page (#1404) 2023-06-26 12:08:54 -04:00
Cory LaViska
1ae018bedd fix broken source buttons in docs (#1401) 2023-06-23 12:03:51 -04:00
Cory LaViska
24929e27c1 skip 2023-06-22 11:23:45 -04:00
Cory LaViska
33a8d92aec update version 2023-06-22 11:11:11 -04:00
Cory LaViska
32d21fa560 2.5.1 2023-06-22 11:10:15 -04:00
Cory LaViska
347d8b7f79 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-06-22 11:04:34 -04:00
Cory LaViska
8f9c15913b update changelog 2023-06-22 11:04:33 -04:00
Konnor Rogers
60d7f688eb fix extensionless imports (#1394) 2023-06-22 10:56:24 -04:00
Cory LaViska
15f914914c simplify theme toggle 2023-06-22 10:47:41 -04:00
Alan Chambers
2914475821 docs changed theme toggle to theme selector (#1395) 2023-06-22 10:44:08 -04:00
Konnor Rogers
8e831aa3e7 fix source flavors (#1388)
* fix load flavor

* Update docs/assets/scripts/code-previews.js

* fix previews

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-06-21 11:12:09 -04:00
Cory LaViska
985d4585c4 fixes #1387 (#1392) 2023-06-21 11:07:02 -04:00
Cory LaViska
854db13bd7 2.5.0 2023-06-20 15:26:55 -04:00
Cory LaViska
4ddf80459a ignore 2023-06-20 15:25:04 -04:00
Cory LaViska
89fc2ff643 update version 2023-06-20 15:24:21 -04:00
Konnor Rogers
d7145f1f84 Konnorrogers/fix value as number 2 (#1385)
* fix: garbage collected valueAs*

* weird....

* prettier and tests
2023-06-20 15:22:13 -04:00
Konnor Rogers
441a957432 fix: <sl-carousel> has the wrong import for LocalizeController (#1384)
* fix autoloading translations

* add changelog entry

* prettier

* prettier
2023-06-20 14:02:07 -04:00
Konnor Rogers
67cbb85682 Add support for svg sprites in <sl-icon> (#1374)
* wip: initial implementation for review

* icon testing

* feat: add the ability to use SVG sprite sheets

* finish up spritesheets

* add icon notes

* update plopfile, add changelog entry

* prettier

* linting

* linting

* fix icon test

* eslint fixes?

* prettier

* disable eslint -.-

* linting loop!

* linting loop!

* prettier

* prettier

---------

Co-authored-by: Diego <diego@trebellar.com>
2023-06-20 14:01:58 -04:00
Cory LaViska
0005d16a06 fixes #1380 2023-06-19 15:13:48 -04:00
Cory LaViska
ca5ab03cd4 update docs 2023-06-19 10:12:01 -04:00
Konnor Rogers
c9e30022df overeager %CDNDIR% in sandbox previews. (#1377)
* overeager with sandboxes

* prettier
2023-06-15 13:25:12 -04:00
Konnor Rogers
c167bdd80f Merge pull request #1372 from justinfagnani/no-bind
Code size optimizations: Replace .bind() with arrow functions, add listeners in constructors.
2023-06-15 11:58:08 -04:00
Justin Fagnani
b9f62bb1bc Migrate SlCarousel.handleSlotChange 2023-06-14 15:16:26 +09:00
Justin Fagnani
a01b2cf8a2 Replace .bind() with arrow functions, add listeners in constructors. 2023-06-14 08:52:12 +09:00
Konnor Rogers
f4b2623c8f Merge pull request #1371 from shoelace-style/konnorrogers/fix-the-tests
fix the tests
2023-06-13 16:11:54 -04:00
konnorrogers
af8426579e prettier 2023-06-13 15:59:16 -04:00
konnorrogers
6b9ba9becf eslint 2023-06-13 15:54:09 -04:00
konnorrogers
c6cc7b6983 prettier 2023-06-13 15:43:21 -04:00
konnorrogers
0e869ec18d fix the tests 2023-06-13 15:40:04 -04:00
Cory LaViska
1b347874ef fix tests 2023-06-13 14:22:56 -04:00
Cory LaViska
ff5b1e8573 fix imports 2023-06-13 14:06:37 -04:00
Cory LaViska
73ad76a2fa fix serve 2023-06-13 13:48:50 -04:00
Konnor Rogers
aadcb486a9 fix broken build (#1370)
* fix broken build

* prettier
2023-06-13 12:30:32 -04:00
Cory LaViska
4c854d64a7 upgrade lit 2023-06-13 12:19:39 -04:00
Cory LaViska
c2e02d34ad remove log 2023-06-13 12:19:34 -04:00
Cory LaViska
8c8977549c fix dispose 2023-06-13 12:19:25 -04:00
Cory LaViska
24ef154d42 update esbuild 2023-06-13 11:48:17 -04:00
Cory LaViska
b5a3045bae update typescript 2023-06-13 11:37:33 -04:00
Cory LaViska
7404e496cb Merge branch 'konnorrogers/modify-build-script-for-npm-2' into next 2023-06-13 10:05:00 -04:00
konnorrogers
5ba2c7eeec watch cdn, not dist 2023-06-13 09:31:02 -04:00
Cory LaViska
514a7f3d51 Merge branch 'konnorrogers/modify-build-script-for-npm-2' of https://github.com/shoelace-style/shoelace into konnorrogers/modify-build-script-for-npm-2 2023-06-12 16:24:24 -04:00
Cory LaViska
15474b83b1 update 2023-06-12 16:24:21 -04:00
konnorrogers
a5f1bc6c82 fix circular dependency 2023-06-12 16:23:47 -04:00
Cory LaViska
834d44e0e4 npm 2023-06-12 16:22:20 -04:00
Cory LaViska
c070149ae6 update + formatting 2023-06-12 16:22:08 -04:00
Cory LaViska
b0b6ea943e use cdn bundle for docs 2023-06-12 16:15:52 -04:00
Cory LaViska
65b72217ea remove copydir and fix virtual path for serve 2023-06-12 16:15:29 -04:00
Cory LaViska
c4c2e8e3a9 make esbuild happy again 2023-06-12 15:36:35 -04:00
Cory LaViska
47018d61cd don't bundle anything for npm 2023-06-12 15:32:45 -04:00
konnorrogers
d18db9adfa prettier 2023-06-12 14:20:11 -04:00
konnorrogers
41913c8c58 update docs with cdn / npm paths 2023-06-12 13:45:27 -04:00
konnorrogers
68b982a744 update docs 2023-06-12 12:48:15 -04:00
Cory LaViska
a582302a79 update changelog 2023-06-12 12:13:18 -04:00
Brendon Muir
bd3b2c93ee Fix sl-input[type="date|time"] placeholder on macOS Safari (#1341)
Allowing the background to inherit rather than removing it allows the weird date and time placeholder text opacity to work on macOS Safari.
2023-06-12 12:09:20 -04:00
konnorrogers
4704d63791 Merge branch 'konnorrogers/modify-build-script-for-npm-2' of https://github.com/shoelace-style/shoelace into konnorrogers/modify-build-script-for-npm-2 2023-06-12 11:40:01 -04:00
konnorrogers
415a1477bb changelog, prettier 2023-06-12 11:39:56 -04:00
Cory LaViska
f363d5e187 Merge branch 'next' into konnorrogers/modify-build-script-for-npm-2 2023-06-12 11:36:23 -04:00
Cory LaViska
efb0ee9c48 fix spelling 2023-06-12 11:36:08 -04:00
konnorrogers
96daee5e1a use cdn dir for testing 2023-06-12 11:18:24 -04:00
konnorrogers
d236206cce remove unneeded CLI args 2023-06-12 10:54:33 -04:00
Konnor Rogers
1ef8e1cf73 fix: radio group race condition (#1364)
* fix: radio group race condition

* update changelog

* prettier

* fix changelog
2023-06-08 15:45:34 -04:00
Cory LaViska
dc63f858b0 fix typo 2023-06-08 15:41:03 -04:00
Cory LaViska
b8a3952153 show next/dev versiosn 2023-06-08 15:33:36 -04:00
Cory LaViska
4b2a62f660 prettier 2023-06-08 15:27:32 -04:00
Cory LaViska
08c074e44b prettier 2023-06-08 15:24:56 -04:00
Cory LaViska
d1953b0215 Merge branch 'new-docs' into next 2023-06-08 15:22:02 -04:00
Cory LaViska
b268d7dd8e done! 2023-06-08 15:12:23 -04:00
Cory LaViska
90e56e2f07 don't swallow errors 2023-06-08 15:05:39 -04:00
Cory LaViska
45ddaa4d38 cleaner watching 2023-06-08 14:46:12 -04:00
Cory LaViska
0de54b163a smarter exit 2023-06-08 13:47:01 -04:00
Cory LaViska
620b86cddb exit after 2023-06-08 12:51:15 -04:00
Cory LaViska
32d0ac4147 remove extra heading 2023-06-08 12:39:18 -04:00
Cory LaViska
a16733eb93 don't allow numbers at the start of an id 2023-06-08 12:39:12 -04:00
Cory LaViska
b67eef484c prettier 2023-06-08 12:23:31 -04:00
Konnor Rogers
5166964659 fix scroll spy 2023-06-08 12:15:02 -04:00
Cory LaViska
e72c2df6d2 fixes for turbo 2023-06-08 12:02:24 -04:00
Cory LaViska
cdafb3870c use delegation so resizing works with turbo 2023-06-08 11:26:25 -04:00
Cory LaViska
20abf21791 move scripts to <head> and defer for turbo 2023-06-08 11:12:31 -04:00
Konnor Rogers
482d155af4 add turbo 2023-06-08 00:15:07 -04:00
Konnor Rogers
ece23c727e add turbo 2023-06-07 17:23:57 -04:00
Cory LaViska
b7726cd514 cleanup 2023-06-07 16:56:46 -04:00
Cory LaViska
c31fe1ed35 update template 2023-06-07 16:53:48 -04:00
Cory LaViska
9e034810d9 reorder 2023-06-07 16:50:30 -04:00
Cory LaViska
217aabe55a update plop 2023-06-07 16:49:27 -04:00
Cory LaViska
1dea2f384e reorder 2023-06-07 16:47:28 -04:00
Cory LaViska
c24edec6b9 sync changelog 2023-06-07 16:43:03 -04:00
Cory LaViska
add09ca5b8 cleanup 2023-06-07 16:38:13 -04:00
Cory LaViska
57bd3632e8 fix spinner in prod build 2023-06-07 16:16:00 -04:00
Cory LaViska
6f44b6ffa6 remove await 2023-06-07 16:14:32 -04:00
Cory LaViska
ca8ba2d16b don't swallow errors 2023-06-07 16:14:25 -04:00
Cory LaViska
c37e4ba6b5 don't hide cursor 2023-06-07 15:19:10 -04:00
Cory LaViska
82cc778a0f fix urls when build on win 2023-06-07 14:03:04 -04:00
Cory LaViska
5085ef831b add shell for win 2023-06-07 13:49:10 -04:00
Cory LaViska
4721bd117b kill child processes without errors 2023-06-07 14:12:34 -04:00
Cory LaViska
57b13d848a nicer build (abort still erroring) 2023-06-07 13:28:22 -04:00
Cory LaViska
e01a43f01e rename vars 2023-06-07 07:54:05 -04:00
Cory LaViska
ec92351acf serve pages like page/index.html 2023-06-07 07:46:41 -04:00
Cory LaViska
8c44eb75d5 improvements 2023-06-06 17:02:15 -04:00
Konnor Rogers
aa48566aef make live reload actually work. 2023-06-06 15:46:50 -04:00
Scott Martin
7cbb26cbdb Correct import statement for all React components (#1363)
The current statement is incorrect and will result in
`Module not found: Package path ./dist/shoelace is not exported from package /your/path/to/node_modules/@shoelace-style/shoelace (see exports field in /your/path/to/node_modules/@shoelace-style/shoelace/package.json)`
2023-06-06 15:27:54 -04:00
Cory LaViska
b8b6175a64 works with a 24 second docs refresh 😕 2023-06-06 09:21:07 -04:00
Cory LaViska
de5ad1b1b9 new docs 2023-06-06 08:22:18 -04:00
Cory LaViska
0866785495 remove old docs 2023-06-06 08:20:35 -04:00
Cory LaViska
947b3a9ec4 support cjs 2023-06-06 08:18:44 -04:00
Cory LaViska
6db27ca51f update changelog 2023-06-01 08:57:03 -05:00
Yuki Nishijima
f966ba97d7 Update the tutorial for Rails (#1258)
* Update the tutorial for Rails

* Update docs/tutorials/integrating-with-rails.md

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

* Update docs/tutorials/integrating-with-rails.md

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

* Update docs/tutorials/integrating-with-rails.md

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

* Update docs/tutorials/integrating-with-rails.md

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

* Update docs/tutorials/integrating-with-rails.md

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>

* Update docs/tutorials/integrating-with-rails.md

* Add a bit more explanation to set up icons

---------

Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
2023-06-01 08:53:33 -05:00
Cory LaViska
1af711bc89 update changelog 2023-05-25 12:26:56 -04:00
dhellgartner
c71da4a075 Split panel tests (#1343)
* Added tests for sl-split-panel

test for horizontal arrangement

* Added tests for sl-split-panel

tests for vertical arrangement

---------

Co-authored-by: stefanie.hellgartner <stefanie.hellgartner@in-tech.com>
2023-05-25 12:25:48 -04:00
Cory LaViska
d609fa87b4 reflect size; fixes #1348 2023-05-25 10:47:44 -04:00
Cory LaViska
dd16b0f65f update form control guidelines 2023-05-25 10:29:15 -04:00
ErikOnBike
6144e5eff4 Replace .map with .forEach when return value not used. See issue #740 (#1349) 2023-05-24 10:34:42 -04:00
Bernhard
c4db99f5a3 update angular getting started (#1352) 2023-05-24 10:34:05 -04:00
Cory LaViska
21431b0e56 Remove outdated line from docs 2023-05-22 09:41:12 -04:00
Cory LaViska
136e6bc915 update changelog 2023-05-17 16:54:16 -04:00
Stefan Bauer
05aeb78b01 Update de.ts (#1339)
"Gleiten" is a verb and means glide, "Slide" must be translated with "Folie" (like in previousSlide, nextSlide)
2023-05-17 16:51:34 -04:00
Yuki Nishijima
22010a1f9b Add better support for Turbo Drive (#1338) 2023-05-17 16:50:34 -04:00
Erick Almeida
e0fd6b210e Fix Portuguese translation strings (#1336) 2023-05-16 07:55:17 -04:00
Konnor Rogers
be1c38f0e5 tests: add regression tests for checkbox and toggle focus behavior (#1330)
* add regression test for checkbox focusing

* change number of checkboxes / switches

* change max-height to 400px so it fails

* re-add positon: relative;
2023-05-10 16:54:44 -04:00
Cory LaViska
b1bdedd3a3 add submenu-icon part 2023-05-04 10:17:41 -04:00
Cory LaViska
429b47963b update changelog; #1310 2023-05-02 10:23:20 -04:00
Cory LaViska
466c8a0883 Merge branch 'mpharoah-mpharoah/sl-rating-perf' into next 2023-05-02 10:22:30 -04:00
Cory LaViska
3a212030c0 Merge branch 'mpharoah/sl-rating-perf' of github.com:mpharoah/shoelace into mpharoah-mpharoah/sl-rating-perf 2023-05-02 10:02:13 -04:00
Cory LaViska
7f1ac48f5f update changelog 2023-05-02 10:01:28 -04:00
Cory LaViska
9c3e344ae0 reorder properties 2023-05-02 10:01:25 -04:00
Cory LaViska
db147e77b0 Merge branch 'KonnorRogers-patch-1' into next 2023-05-02 10:00:14 -04:00
Cory LaViska
0384b03528 add checkbox + exported parts; #1318 2023-05-01 13:43:42 -04:00
Konnor Rogers
fc06de7b11 feat: support variable height elements inside <sl-button> 2023-04-28 22:31:42 -04:00
Cory LaViska
5ada0a7093 update radio size when group size changes 2023-04-27 13:18:21 -04:00
Cory LaViska
f136b8eb12 update docs; fixes #1315 2023-04-27 13:17:54 -04:00
Matt Pharoah
56a160464f Fixed clipPath 2023-04-21 08:56:43 -04:00
Matt Pharoah
3dc9430932 Improve performance of sl-rating by not render all icons twice 2023-04-20 17:01:12 -04:00
Cory LaViska
afa69b4f9c 2.4.0 2023-04-14 12:56:26 -04:00
Cory LaViska
102f46d185 bump version 2023-04-14 12:54:55 -04:00
Cory LaViska
9c5e184d82 fixes #1302 2023-04-14 12:48:57 -04:00
Cory LaViska
385b5451c8 add size to radio group; fixes #1301 2023-04-14 12:20:17 -04:00
Cory LaViska
0e7487257b spell check and reorder static function 2023-04-13 14:16:03 -04:00
Matt Pharoah
eab0e3219f Improve performance of sl-icon by caching later (#1286)
* Improve performance of sl-icon by caching later

* Fixed error handling

* Don't use requestInclude in sl-icon

* Separate sl-icon errors into cacheable and retryable errors
2023-04-13 14:12:59 -04:00
Cory LaViska
cf89c901a2 no roles on slots; fixes #1287 2023-04-13 12:52:03 -04:00
Cory LaViska
902b08cc0f revert role and don't use <header> for buttons 2023-04-13 12:47:48 -04:00
Cory LaViska
caf9a09efa fix typos 2023-04-13 12:47:18 -04:00
dhellgartner
65734dc993 Slot aria attributes (#1296)
* Fix acessability issue

* Additionally adapted the test

* Added more accessability tests

* Updated the testing documentation

to take the fact that accessability checks cover only
rendered content into account

---------

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-04-13 12:45:52 -04:00
Cory LaViska
0f02fffc3a less pipeline flakes 🤞🏻 2023-04-13 11:58:46 -04:00
Cory LaViska
931ecad8c5 update changelog 2023-04-13 11:56:33 -04:00
Alessandro
c137f83df6 fix(carousel): clickable elements don't work on chrome (#1266)
* fix(carousel): clickable elements don't work on chrome

* fix: update implementation
2023-04-13 11:55:40 -04:00
Cory LaViska
d3a0a38dce don't show hover when focused; fixes #1282 2023-04-13 10:31:24 -04:00
Cory LaViska
b76af1aa21 update changelog 2023-04-13 09:51:11 -04:00
Cory LaViska
5cf6a37ee2 wait until registered to set initial state; fixes #1292 2023-04-13 09:51:07 -04:00
Cory LaViska
63194abf93 prettier + changelog 2023-04-05 09:21:25 -05:00
Konnor Rogers
e196b0915a fix: split-panel divider now focusable in Edge / Chrome (#1289) 2023-04-05 09:18:57 -05:00
Cory LaViska
d2369d1de8 fix @since 2023-04-04 16:22:24 -05:00
dhellgartner
a9bbcc5556 first draft of testing guidelines (#1223)
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-04-04 09:00:03 -05:00
Cory LaViska
8d9430e7a2 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-04-03 16:25:21 -05:00
Cory LaViska
0411754949 update changelog 2023-04-03 16:25:18 -05:00
Christophe Eymard
91ffaa1a2d stop holding a reference to a Promise when it is resolved (#1284) 2023-04-03 16:23:59 -05:00
Cory LaViska
ae9972a91a clarify events; #1283 2023-04-03 16:19:35 -05:00
Cory LaViska
478fa6f2bb update changelog 2023-03-31 15:03:31 -04:00
Cory LaViska
6a52a04591 Merge branch 'sloth30799-sloth30799' into next 2023-03-31 14:39:50 -04:00
Cory LaViska
a8f87e0d5e Merge branch 'sloth30799' of github.com:sloth30799/shoelace into sloth30799-sloth30799 2023-03-31 14:37:54 -04:00
Cory LaViska
cbc96fdf5c update changelog 2023-03-31 11:59:49 -04:00
dhellgartner
b4d24dd9af Added a basic test for animation (#1274)
Did not manage to check
that the properties are correctly passed
to the animation api at this point so this
stays a blackbox test

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-03-31 11:59:07 -04:00
Cory LaViska
4b66cc2acb update changelog 2023-03-31 11:53:43 -04:00
Thomas Blum
3766d5ce27 Fixed wrong property value (#1272) 2023-03-31 11:52:03 -04:00
Cory LaViska
4b7d686754 prettier + highlighter 2023-03-29 16:49:59 -04:00
gennitdev
b948a07a4d Include slot example for Vue (#1271) 2023-03-29 16:48:39 -04:00
Cory LaViska
6d3505aefa fix property name 2023-03-28 11:31:42 -04:00
Cory LaViska
b22650ff51 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-03-27 09:31:46 -04:00
Cory LaViska
23a7f65b49 fix variable name case 2023-03-27 09:31:43 -04:00
Han Ye Htun
f4fba8eab4 added tests 2023-03-24 00:05:10 +06:30
Christophe Eymard
1734bf54a7 replaced Set with WeakSet (#1249) 2023-03-23 12:13:13 -04:00
Cory LaViska
88efec7815 prettier 2023-03-23 08:39:20 -04:00
Marko Hrovatic
e335189bb8 Update angular.md (#1264)
Added an example how to access Shoelace components from component code
2023-03-22 16:39:20 -04:00
Han Ye Htun
d03ca4ab95 Avatar Initials visible when image has a transparent background(#1256) 2023-03-22 21:46:23 +06:30
Cory LaViska
257407758f remove unnecessary dep 2023-03-21 16:25:52 -04:00
Han Ye Htun
2443c046aa Avatar Initials visible when image has a transparent background(#1256) 2023-03-22 00:50:01 +06:30
Cory LaViska
d710eb3947 update changelog 2023-03-20 14:00:42 -04:00
dhellgartner
7b2f6f230d Added tests to the sl-animated-images component (#1246)
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-03-20 13:59:54 -04:00
Cory LaViska
07cb6070cc Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-03-20 11:25:56 -04:00
Cory LaViska
bd7dc2a7be #1244 2023-03-20 11:25:55 -04:00
Alessandro
db931c12be fix: prevent expand button to shrink (#1245) 2023-03-20 11:24:58 -04:00
Cory LaViska
765b311a08 update changelog 2023-03-14 12:00:53 -04:00
Cory LaViska
ce198d9c0b Merge branch 'alenaksu-fix/tree-item/clickable-label-elements' into next 2023-03-14 11:59:06 -04:00
Cory LaViska
8f5893931b Merge branch 'fix/tree-item/clickable-label-elements' of github.com:alenaksu/shoelace into alenaksu-fix/tree-item/clickable-label-elements 2023-03-14 11:57:36 -04:00
Stefan Bauer
221be48589 fixed big bug typo ;-) (#1242) 2023-03-14 11:56:55 -04:00
Cory LaViska
234ff2619d fixes #1243 2023-03-14 11:16:39 -04:00
Alessandro
b37be46ba3 fix(tree-item): move label outside of checkbox 2023-03-13 19:52:12 +00:00
Cory LaViska
6e2ea508db update changelog 2023-03-13 11:48:35 -04:00
Jared White
0e6e2abd28 Export autoload discover function and support shadow roots (#1236)
* Export autoload discover function and support shadow roots

* run prettier
2023-03-13 11:47:37 -04:00
Cory LaViska
db1bdfbf65 update changelog 2023-03-13 10:58:01 -04:00
Alessandro
7bf0f647b3 fix(carousel): change the way slide position is computed (#1235) 2023-03-13 10:56:00 -04:00
Cory LaViska
df25f8617b 2.3.0 2023-03-09 16:19:23 -05:00
Cory LaViska
ad2099a27f update version 2023-03-09 16:19:13 -05:00
Martin Alix
708127f96d Update French for Slide # (#1231) 2023-03-09 16:10:06 -05:00
Cory LaViska
9deb51e95a update docs 2023-03-09 16:09:33 -05:00
Cory LaViska
67852ea657 update installation docs 2023-03-07 16:52:02 -05:00
Cory LaViska
7240f4f8f4 Merge branch 'next' into autoload 2023-03-07 14:05:26 -05:00
Cory LaViska
17ee89a5e8 rename variable for clarity 2023-03-07 13:23:02 -05:00
Cory LaViska
f2177dccaf closes #1226 2023-03-07 11:03:03 -05:00
Cory LaViska
6aaf17b81a fixes #1224 2023-03-06 17:11:39 -05:00
dhellgartner
d113d13792 Fixed the avatar tests to produce less logs (#1222)
The reason for the problems is that the error event does
not escape from the shadow dom.
Thus it cannot be awaited for in the test

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-03-06 08:30:01 -05:00
Cory LaViska
ab9cb5f185 update changelog 2023-03-03 10:56:55 -05:00
Cory LaViska
76fd7aa28d trigger update immediately 2023-03-03 10:55:53 -05:00
Cory LaViska
8f17bf4e9d Improve Carousel Accessibility (#1218)
* fix demo

* improve accessibility, reorg, and polish up

* add support for up/down

* fix docs

* update docs
2023-03-03 10:53:17 -05:00
Cory LaViska
0f0f71af9b add custom-elements.json to exports 2023-03-03 10:36:30 -05:00
Cory LaViska
e624701022 fixes #1220 2023-03-03 10:16:15 -05:00
Cory LaViska
4cedfc3201 fix check 2023-03-02 11:43:09 -05:00
Cory LaViska
d88d9fc81a update example 2023-03-02 11:43:00 -05:00
Cory LaViska
051baa4ff5 remove warning 2023-03-02 11:27:47 -05:00
Cory LaViska
57c3d7009b fix example 2023-03-02 11:27:42 -05:00
Cory LaViska
a27fd4d2e9 Merge branch 'next' into autoload 2023-03-02 10:49:30 -05:00
Cory LaViska
79ac425e2b fix demo 2023-03-01 12:59:14 -05:00
Cory LaViska
857f318f9c fix overscroll (#1217) 2023-03-01 11:48:16 -05:00
Cory LaViska
c0966bf767 remove unused property 2023-03-01 11:35:25 -05:00
Cory LaViska
86cecc9e30 fix carousel pagination in iOS 2023-03-01 11:34:42 -05:00
Alessandro
ec036d8e61 fix(carousel): various fixes and improvements (#1216)
* fix(carousel): don't resume autoplay if interacting

* fix(carousel): wrap pagination items

* chore(carousel): add unit tests

* feat(carousel): more reactive pagination dots

* fix(carousel): trigger scrollend when user scroll exactly over a snap point
2023-03-01 11:05:29 -05:00
Cory LaViska
77b25f4581 add tag parts to <sl-select> 2023-03-01 10:58:24 -05:00
Cory LaViska
a8d59b3329 update changelog 2023-02-28 17:11:21 -05:00
Cory LaViska
5990fbd000 2.2.0 2023-02-28 17:05:11 -05:00
Cory LaViska
954d78dcd1 update version 2023-02-28 17:04:59 -05:00
Cory LaViska
3ea31389dd fixes #1082 2023-02-28 13:33:34 -05:00
Cory LaViska
d79799043a remove unused import 2023-02-28 13:07:18 -05:00
Cory LaViska
9f8ce58288 use clickOnElement 2023-02-28 13:07:07 -05:00
Cory LaViska
2371c5490f Merge branch 'next' into autoload 2023-02-28 12:45:23 -05:00
Cory LaViska
77abd42d66 fix popup positioning edge case; closes #1135 2023-02-28 12:30:05 -05:00
Cory LaViska
218e78e947 add getForm() method; closes #1180 2023-02-28 12:10:14 -05:00
Cory LaViska
8a1efac9b8 fixes #1201 2023-02-28 12:03:20 -05:00
Cory LaViska
f9ae8327f6 fix menu focus color 2023-02-28 09:46:49 -05:00
Cory LaViska
7f3076d195 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2023-02-27 16:40:55 -05:00
Cory LaViska
1fa79e64ae fix track color in dark mode 2023-02-27 16:40:53 -05:00
Bünyamin Eskiocak
dde1010465 Fixed clipped calendar toggle in Firefox (#1213)
* fixed clipped calendar toggle in firefox

* changelog

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-02-27 12:04:32 -05:00
Cory LaViska
3a3a7347bc link to event 2023-02-27 11:15:57 -05:00
Cory LaViska
77c9750206 fix sl-tab-show event when closing 2023-02-27 11:13:59 -05:00
Cory LaViska
3d2e618be8 fix term 2023-02-24 16:08:06 -05:00
Cory LaViska
79feaae7fc adjust attribution 2023-02-24 15:56:31 -05:00
Cory LaViska
b0f7dfb86b update comment 2023-02-24 15:55:02 -05:00
Cory LaViska
e1979b8f38 reorder custom properties 2023-02-24 15:54:57 -05:00
Cory LaViska
7e9ae32b9b add carousel terms 2023-02-24 15:48:39 -05:00
Cory LaViska
480a1df246 reorder 2023-02-24 15:24:39 -05:00
Cory LaViska
ff798adb49 update examples 2023-02-24 15:10:54 -05:00
Cory LaViska
70a64262e9 add svg part 2023-02-24 12:51:46 -05:00
Cory LaViska
5f65896150 update localize 2023-02-24 12:35:25 -05:00
Cory LaViska
c69db4919b wip; improve carousel docs 2023-02-23 16:50:18 -05:00
Cory LaViska
a526e8a956 cleanup 2023-02-23 15:00:27 -05:00
Cory LaViska
4970ba065e set a default aspect ratio 2023-02-23 15:00:02 -05:00
Cory LaViska
0292ed30c5 update example 2023-02-23 14:59:48 -05:00
Cory LaViska
b64b1c2536 fix test 2023-02-23 14:49:49 -05:00
Cory LaViska
8f9eb012ba sort imports 2023-02-23 14:42:58 -05:00
Cory LaViska
c8fd9f19d2 ignore lorem ipsum 2023-02-23 14:40:05 -05:00
Cory LaViska
603aa93322 update and fix typos 2023-02-23 14:39:05 -05:00
Cory LaViska
74203de094 sort imports 2023-02-23 14:23:38 -05:00
Cory LaViska
4fa4682a45 Merge branch 'alenaksu-feat/carousel' into next 2023-02-23 14:20:01 -05:00
Cory LaViska
34e0fb2fc1 Merge branch 'feat/carousel' of github.com:alenaksu/shoelace into alenaksu-feat/carousel 2023-02-23 14:13:19 -05:00
Cory LaViska
50972f2b38 update changelog and comment 2023-02-23 11:33:31 -05:00
Cory LaViska
652ce6c9f1 Merge branch 'mpharoah-mpharoah/typescript-events' into next 2023-02-23 11:26:47 -05:00
Cory LaViska
8412b150b2 Merge branch 'mpharoah/typescript-events' of github.com:mpharoah/shoelace into mpharoah-mpharoah/typescript-events 2023-02-23 11:24:19 -05:00
Justin Fagnani
22b8ef4edf Fix a few spelling issues (#1192) 2023-02-23 11:15:20 -05:00
Cory LaViska
0865dede6f fix heading 2023-02-23 11:11:19 -05:00
Cory LaViska
d638d811ad remove unused type 2023-02-23 11:04:51 -05:00
Cory LaViska
bc58472b7b fix skipped tests 2023-02-23 11:02:26 -05:00
Cory LaViska
226c856b1e update scroll controls when adding tabs; fixes #1208 2023-02-23 10:12:36 -05:00
Cory LaViska
a127b8722e fix autoload timing issues 2023-02-22 14:18:43 -05:00
Cory LaViska
9c573fb454 add autoloader to docs 2023-02-22 14:18:36 -05:00
Cory LaViska
a346d18930 add autoloader docs 2023-02-22 14:18:19 -05:00
Cory LaViska
a32488baeb add autoloader prototype 2023-02-22 14:18:04 -05:00
Cory LaViska
a4131caeda add subpath 2023-02-22 14:16:11 -05:00
Cory LaViska
6c62a4f4c0 use passive listeners 2023-02-22 12:54:33 -05:00
Cory LaViska
5b12de1edf fixes #1205 2023-02-21 11:54:39 -05:00
Cory LaViska
f79a670ca3 fix padding in Chrome; closes #1197 2023-02-17 09:56:52 -05:00
Cory LaViska
e1ec60af62 2.1.0 2023-02-16 16:40:34 -05:00
Cory LaViska
dcbcc4c050 bump version 2023-02-16 16:39:11 -05:00
Cory LaViska
0eb3375bb9 welcome back, null 2023-02-16 16:30:13 -05:00
Cory LaViska
c26a8810c8 add crude inline error example; closes #1191 2023-02-16 16:22:46 -05:00
Cory LaViska
872227e345 reformat and add comment 2023-02-16 15:19:24 -05:00
dhellgartner
f22c529eab Avoid null logs on resize observer errors (#1196)
* Resize observer sometimes throws errors which
are nothing to worry about, see also the corresponding
comment on tab-group.test.ts
* Unfortunately, the web testing library installs an
error event handler which takes precedence before the
event handlers installed in the tests
(see node_modules/@web/browser-logs/dist/logUncaughtErrors.js)
* the only possibility to avoid these null logs is to install
an error event handler at an even earlier place

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-02-16 15:13:57 -05:00
dhellgartner
3430b33c3e Alert test (#1189)
* Improved tests for SlAlert

* added more test for coverage
* Grouped tests in multiple subgroups

* remove executing only one tests

* Fix the now executing tests

---------

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-02-16 15:04:11 -05:00
Cory LaViska
1bc2a6ef76 expose rel; fixes #1200 2023-02-16 12:15:59 -05:00
Cory LaViska
5a94f5bf5b update changelog 2023-02-16 10:43:28 -05:00
Thomas Blum
4277377189 Underscore was missing (#1195) 2023-02-16 10:39:01 -05:00
Matt Pharoah
d818980dea Fixed copy-paste type in comment 2023-02-15 09:41:05 -05:00
Matt Pharoah
636f61006f Adjusted comment to be more clear 2023-02-15 09:39:43 -05:00
Matt Pharoah
d93e698baf Added comments to explain the Typescript metaprogramming 2023-02-15 09:37:48 -05:00
Matt Pharoah
f8d8291caa Added sl-invalid event type 2023-02-14 23:06:47 -05:00
Matt Pharoah
21bef1c2ea Merge branch 'next' into mpharoah/typescript-events 2023-02-14 22:59:20 -05:00
Cory LaViska
f0efb9253c remove inline validation examples 2023-02-14 16:38:10 -05:00
Cory LaViska
cfd28f2608 update changelog 2023-02-14 15:24:19 -05:00
Cory LaViska
a3844fe074 comments 2023-02-14 15:21:52 -05:00
Cory LaViska
65e90f12f4 rename event 2023-02-14 15:12:21 -05:00
Cory LaViska
4335289d6a make doc comments consistent for check/report validity 2023-02-14 15:02:52 -05:00
Cory LaViska
86cc721e03 update description and document sl-invalid event 2023-02-14 14:59:34 -05:00
xdev1
4a28825ea7 Added some missing form validation standard features (implemented for #1181) (#1167)
* #1163 - added read-only properties 'validity' and 'validationMessage' to all nine form controls

* #1163 - added base support for showing form validation messages below the form controls

* #1163 - animated validation errors in demo

* #1181 - Removed all previous changes that have been validation error specific

* Started with 'Inline validation' demo / fixed merge issues / etc.

* #1181 - continued work on missing form validation features

* #1181 - enhanced validation support for SlColorPicker / some cleanup

* #1181 - fixed CSS issues

* #1181 - fixed again CSS issues

* '1181 - added form validation features finally working

* #1181 - bug fixes

* #1181 - fixed open issues / added API doc comments

* #1181 - updated inline validation demos / removed some legacy code

* #1181 - finished invalid form validation example

* #1181 - added tests / several bugfixes

* #1181 - fixed typos etc.

* #1181 - tests

* #1181 - tests

* #1181 - tests
2023-02-14 14:50:06 -05:00
Cory LaViska
19cf823da5 Merge branch 'ceymard-popup-element' into next 2023-02-14 09:30:47 -05:00
Christophe Eymard
737b55d78d allow Element as the anchor - now with correct typings 2023-02-10 21:56:57 +01:00
Cory LaViska
8493131db5 Revert "let popup be anchored to Element and not HTMLElement (#1186)"
This reverts commit 0d86c2af37.
2023-02-10 12:42:19 -05:00
Christophe Eymard
0d86c2af37 let popup be anchored to Element and not HTMLElement (#1186)
It works with SVG as well, is there a need to be restrictive here ?
2023-02-10 12:38:47 -05:00
Matt Pharoah
d6a7820a52 Make emit return the actual event type instead of CustomEvent<any> 2023-02-09 15:56:54 -05:00
Matt Pharoah
39ca1208f5 Removed unused event handler from sl-dropdown 2023-02-09 13:09:31 -05:00
Matt Pharoah
610a06bcb9 Use PropertyKey instead of string where appropriate 2023-02-09 13:06:17 -05:00
Matt Pharoah
b8584c0581 Require detail to always be provided when calling emit with an event that requires it 2023-02-09 13:00:04 -05:00
Matt Pharoah
ab19afeb66 Resolved merge conflict 2023-02-08 18:24:17 -05:00
Matt Pharoah
41b5cb367f Use typed events in components and tests 2023-02-08 18:19:27 -05:00
Matt Pharoah
e65b09fdec Fixed Typescript error when CustomEvents with non-object details are registered 2023-02-08 17:55:28 -05:00
Matt Pharoah
15a4049a01 Require the options parameter to have a detail property for events with details 2023-02-08 17:42:14 -05:00
Matt Pharoah
ce708fbba8 Perform type checking of the event detail in the emit function if the event type matches a Shoelace event 2023-02-08 17:01:00 -05:00
Matt Pharoah
75bd7784fb Basic events have an empty details object, not a null 2023-02-08 14:12:15 -05:00
Matt Pharoah
6e092ccf7a Added event types for all events 2023-02-08 13:55:19 -05:00
Matt Pharoah
b7b73ea3a9 Added sl-request-close event 2023-02-08 13:30:56 -05:00
Matt Pharoah
9dab91e0d1 Added event for sl-error 2023-02-08 13:17:12 -05:00
Matt Pharoah
a3a802a37b Register events with global event map 2023-02-08 13:14:43 -05:00
Matt Pharoah
358ad7bb30 Fixed type in documentation (TreeItem[] -> SlTreeItem[]) 2023-02-07 17:44:56 -05:00
Matt Pharoah
0a555c53c7 Export typescript types for events with details 2023-02-07 17:20:01 -05:00
Cory LaViska
b260a4dc29 add focus/blur to color picker 2023-02-07 17:18:03 -05:00
Cory LaViska
1f1024f4ca change default; #1175 2023-02-07 15:57:50 -05:00
Cory LaViska
9e92d92684 whitespace 2023-02-07 15:56:43 -05:00
Cory LaViska
527bf79973 improve user interaction heuristics; closes #1175 2023-02-07 15:29:26 -05:00
Cory LaViska
b281c5bbc1 use Set instead of WeakMap 2023-02-07 13:56:02 -05:00
Cory LaViska
f03de8925b fix checkbox required label in Chrome
See https://bugs.chromium.org/p/chromium/issues/detail?id=1413733
2023-02-07 10:52:54 -05:00
Cory LaViska
776ab2c715 add getForm() method 2023-02-07 09:01:32 -05:00
Cory LaViska
df967b7e84 improve checked state in forced-colors mode; fixes #1114 2023-02-06 18:00:39 -05:00
Cory LaViska
a539058253 validate even with novalidate; fixes #1164 2023-02-06 17:18:01 -05:00
Cory LaViska
af70d88153 improve icon page; fixes #1122 2023-02-06 15:19:08 -05:00
Cory LaViska
8dcffe270f remove 16.x from actions 2023-02-06 12:30:22 -05:00
Cory LaViska
c958f2e50a move focus logic; #1177 2023-02-06 12:20:32 -05:00
Cory LaViska
cedcd65c72 fix dropdown keyboard controls; closes #1177 2023-02-06 12:18:33 -05:00
Cory LaViska
12f62075ad move escape close logic to document listener; #1177 2023-02-06 11:32:06 -05:00
Cory LaViska
b8695b70a9 don't emit click when disabled; fixes #1113 2023-02-06 10:48:38 -05:00
Cory LaViska
a4e371618a fix comment 2023-02-06 10:47:08 -05:00
Cory LaViska
039ab175c3 add comment 2023-02-06 10:46:37 -05:00
Cory LaViska
7549e50fe4 fix positioning of native inputs; closes #1169 2023-02-05 12:06:06 -05:00
Cory LaViska
3c2cda699e fixes #1179 2023-02-05 11:08:57 -05:00
Cory LaViska
8685ddd049 fix select template; fixes #1178 2023-02-05 10:53:51 -05:00
Cory LaViska
c47ad40802 fixes #1172 2023-02-05 10:49:10 -05:00
Cory LaViska
ef1f129b22 fix test 2023-02-03 14:44:56 -05:00
Cory LaViska
6bb508ef14 revert; #1166 2023-02-03 14:36:17 -05:00
Cory LaViska
3596c8144d add dist to custom-elements.json; fixes #1166 2023-02-03 14:27:17 -05:00
Cory LaViska
20903bb638 update test 2023-02-02 12:23:32 -05:00
Alan Chambers
f45fb6848f Adjust sl-dropdown up/down keypress menuItems array to match menu (#1170)
* dropdown filtered menu items

* updated filter, added test

- updated filter to match menu getAllItems private method
- added test

---------

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-02-02 11:53:38 -05:00
Cory LaViska
400f9b76d5 ignore non-menu items; fixes #1165 2023-02-02 11:47:00 -05:00
dhellgartner
38a9e98d9b Tab group tests (#1128)
* remove duplicate test

* Add tests for sl-tab-group -- initial round of tests

* use individual fixtures for each test

* extract mocks + utility functions in external files

* remove unnecessary internals of intersection observer from the mock

* added first test on scroll buttons

* add scrolling tests

* remove resize observer mock

Resize observer is triggered but waiting for element
to be updated is not enough. You need to free the main thread
with the test for some time

* Also removed intersection observer mock

By waiting long enough for the things to happen automatically

* Fix problems with resize observer

These problems appeared after npm ci but (according
to the sources linked in the comments) unproblematic

* Handle merge request comments

* replace custom wait function with corresponding function
 from openwc/testing
* Extracted waitForScrollingToEnd and isElementVisibleFromScrolling into
dedicated files to be reused
* Improve queryByTestId --> make it usable for more complex values
* Add js docs

* run lint fix

* Added tests for selecting a tab by click

* added further tests for tab group selection

* use Promise<void> instead of Promise<any>

to avoid eslint errors

---------

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2023-01-27 09:55:28 -05:00
Cory LaViska
e8fe783fb4 fixes #1157 2023-01-26 14:22:04 -05:00
Cory LaViska
223ef32b70 fix web-types.json 2023-01-26 09:47:33 -05:00
Cory LaViska
0793a219a2 fix play/pause buttons; fixes #1147 2023-01-25 16:52:30 -05:00
Cory LaViska
3bb92c095f add state 2023-01-24 11:46:37 -05:00
Cory LaViska
deec097267 2.0.0 2023-01-24 11:43:38 -05:00
Cory LaViska
873e280700 update changelog 2023-01-24 11:38:17 -05:00
Cory LaViska
5d047f7a93 remove beta disclaimer 2023-01-23 12:55:45 -05:00
Cory LaViska
f24ab23752 add more design tokens to docs 2023-01-23 12:55:36 -05:00
Cory LaViska
44ecc8ce56 fixes #1141 2023-01-23 11:36:45 -05:00
Cory LaViska
e758b1d9bb whitespace 2023-01-23 11:29:50 -05:00
Cory LaViska
5cdbaa873d fixes #1141 2023-01-23 11:29:12 -05:00
Cory LaViska
e9aca6cedb fix part names; closes #1142 2023-01-23 10:51:24 -05:00
Cory LaViska
7c3896ed42 fix select input color; closes #1143 2023-01-23 10:44:19 -05:00
Cory LaViska
93158e8e90 fixes #1141 2023-01-22 13:34:32 -05:00
Cory LaViska
5f9bbdfa06 fixes #1139 2023-01-20 11:38:04 -05:00
Cory LaViska
3a0f486e98 fix label colors in checkbox, radio, and switch 2023-01-19 14:34:43 -05:00
Cory LaViska
29c671c0f4 fixes #1138 2023-01-19 14:22:29 -05:00
Cory LaViska
88c4bef5e7 Revert "Add JSON format for design tokens (#1129)"
This reverts commit 4a3f2caf59.
2023-01-19 11:37:52 -05:00
Cory LaViska
6066bc468b update config 2023-01-18 09:29:39 -05:00
Cory LaViska
efd944d822 remove contain:strict 2023-01-18 09:07:37 -05:00
Jared White
4a3f2caf59 Add JSON format for design tokens (#1129)
* Initial example of a JSON schema and converter for design tokens

* Clean up script and relocate file

* Update token JSON format and finish build process
2023-01-17 13:22:02 -05:00
Cory LaViska
511182b41b add padding to offset scrollbar; fixes #1132 2023-01-17 11:56:16 -05:00
Cory LaViska
1088a51ed5 fixes 1134 2023-01-17 10:45:19 -05:00
Cory LaViska
e3e0842bdd reorder importss 2023-01-17 10:44:07 -05:00
Cory LaViska
e4c908b08b add missing docs 2023-01-17 10:33:21 -05:00
Cory LaViska
f86578a213 fix tab panel display 2023-01-13 15:57:02 -05:00
Cory LaViska
3c2f5ec48e sort this, eslint 2023-01-13 15:43:55 -05:00
Cory LaViska
fec7ef17aa prettier 2023-01-13 14:42:21 -05:00
Cory LaViska
29ff99dd76 sigh 2023-01-13 14:37:45 -05:00
Cory LaViska
6b9b410bdc *put table back up* 2023-01-13 14:37:34 -05:00
Cory LaViska
b45a9d55ca update deps 2023-01-13 14:35:28 -05:00
Cory LaViska
7ce079b7a1 *flip table* 2023-01-13 14:29:25 -05:00
Cory LaViska
b0ba9ff14f remove expect 2023-01-13 14:22:45 -05:00
Cory LaViska
f665bf984b fix types 2023-01-13 14:22:06 -05:00
Cory LaViska
ac429a62c0 disable lint 2023-01-13 14:16:16 -05:00
Cory LaViska
dc909d10b6 fix words 2023-01-13 14:08:44 -05:00
Cory LaViska
aa65077b12 add getFormControls() method 2023-01-13 14:06:58 -05:00
Cory LaViska
7e37c51856 revert example 2023-01-13 12:52:02 -05:00
Cory LaViska
6e26daf804 add form attribute; fixes #1130 2023-01-13 12:34:33 -05:00
Cory LaViska
25c2d2d5bf upgrade CEM plugin 2023-01-13 10:39:59 -05:00
Cory LaViska
edc9e69f30 add @documentation tag 2023-01-12 10:26:25 -05:00
Cory LaViska
2e7ac38678 fixes #1127 2023-01-12 09:34:41 -05:00
Cory LaViska
1a68c825c0 update deps section 2023-01-11 15:29:51 -05:00
Cory LaViska
2cbdeeade0 remove cspell comment 2023-01-10 17:34:00 -05:00
Cory LaViska
79624f63ed add en-GB 2023-01-10 17:33:55 -05:00
xdev1
01a8ec36ec #1108 - simplification of translation files (#1120)
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2023-01-10 17:33:23 -05:00
Jens Gabe
60324885ed Updated Danish translations (#1123)
Fixed typos and copy/paste translations from other languages
2023-01-10 17:30:01 -05:00
Cory LaViska
0c2f43b837 fixes #1125 2023-01-10 17:10:18 -05:00
Cory LaViska
0df27cf730 never return -0 2023-01-10 16:14:30 -05:00
Cory LaViska
68ed69292c add validation tests; fixes #1065 2023-01-10 15:05:44 -05:00
Cory LaViska
62c58b3a8c simplify validation logic 2023-01-10 15:05:07 -05:00
Cory LaViska
1fbb809057 update docs comment 2023-01-10 15:04:53 -05:00
Cory LaViska
e2d2f5d670 rename FormSubmitController; remove this.invalid 2023-01-10 13:24:06 -05:00
Cory LaViska
acef0da2c1 remove unused classes 2023-01-10 12:28:44 -05:00
Cory LaViska
3c66d2ab99 fixes #1121 2023-01-10 10:48:55 -05:00
Cory LaViska
31f16c4680 fix changelog 2023-01-09 16:31:05 -05:00
Cory LaViska
8056379fdd support multiple properties in watch decorator 2023-01-09 16:07:59 -05:00
Cory LaViska
9a6b9a7841 fixes #1119 2023-01-09 14:54:17 -05:00
Cory LaViska
02fc39ebe0 add parts 2023-01-09 14:25:26 -05:00
Cory LaViska
a90b22c05d add test 2023-01-09 14:25:21 -05:00
Cory LaViska
f5dd4f2aca fixes #1117 2023-01-09 14:20:17 -05:00
Cory LaViska
d5b3489b22 fixes #1066 2023-01-09 13:06:34 -05:00
Cory LaViska
8ee5f19184 pin source-map to beta; fixes #1066 2023-01-09 12:55:35 -05:00
Cory LaViska
d0a32d48b1 upgrade CEM and fix comment 2023-01-09 10:47:10 -05:00
Cory LaViska
bf527437a0 add stylesheet to test runner; fix tests 2023-01-09 10:35:37 -05:00
Cory LaViska
ae3070ac45 fixes #1107 2023-01-09 09:40:51 -05:00
Cory LaViska
6af68343a7 stop removing eslint comments 2023-01-09 09:39:47 -05:00
alenaksu
48ccc95dd9 chore: add react examples 2023-01-08 13:36:24 +01:00
Alessandro
c6a6a77bbd feat: add carousel component
feat: add nav indicators

wip

wip

wip

fix: minor fixes

fix: minor fixes

fix: some refactor

chore: update docs

chore: update docs

fix: remove slide component

feat: create sl-carousel-item

feat: code refactoring and improvements

chore: update docs with more examples

chore: fix docs

feat: add autoplay

feat: implement accessibility

fix: change icons for rtl

chore: minor change

feat: improve accessibility

fix: minor regression

fix: minor regression

chore: fix docs

fix: improve accessibility and minor fixes

fix: remove heading and refactor component

chore: add custom style exmaple

fix: address review commnets

* Removed header from carousel
* Added `ArrowUp` and `ArrowDown` in keyboard navigation
* Added `--scroll-hint-margin` css property
* Added an example with customized carousel layout
* Fixed thumbnails navigation in demo
* Renamed show-controls to show-arrows and updated the corresponding parts/css accordingly
* Changed `activeSlideElement` getter to a private method
* Changed pagination colors
* Added `--slide-width` and `--slide-height` css properties

chore: update docs

fix: integrate latest repo changes

fix: add aspect ratio and rebase

chore: remove ignore path

feat: multiple slides per page

feat: multiple slide per page

fix: various improvements

chore: minor changes

chore: minor changes

chore: add bit of documentation

chore: improve documentation

fix: add unit tests and fix minor issues

chore: update documentation and unit tests

chore: update tests
2023-01-08 12:24:24 +01:00
Cory LaViska
e632b51eb8 fixes #1110 2023-01-06 16:43:31 -05:00
Cory LaViska
c8e633c4a1 fix color picker bug 2023-01-06 15:24:57 -05:00
Cory LaViska
724f4a59db remove log 2023-01-06 13:28:48 -05:00
Cory LaViska
041364fb7d ignore swatch whitespace 2023-01-06 13:28:30 -05:00
Cory LaViska
fbcb4d8dbd fixes #1109 2023-01-06 12:25:03 -05:00
Cory LaViska
27a6b4a8c9 fixes #1108 2023-01-06 11:50:10 -05:00
Cory LaViska
c814e9e94e 2.0.0-beta.88 2023-01-05 15:43:08 -05:00
Cory LaViska
0e957c0cd4 update version 2023-01-05 15:41:32 -05:00
Cory LaViska
b330657e0a focus on disabled menu items and fix aria-checked 2023-01-05 15:13:21 -05:00
Cory LaViska
a0fce64fd9 closes #1070 2023-01-05 14:50:19 -05:00
Cory LaViska
b183a04fba add auto 2023-01-05 13:33:10 -05:00
Cory LaViska
7645b997b2 fixes #1105 2023-01-05 13:30:39 -05:00
Cory LaViska
d81e2f1470 fixes #1063 2023-01-05 12:43:17 -05:00
Cory LaViska
f50fe72df2 don't show scrollbar 2023-01-05 12:40:22 -05:00
Cory LaViska
dcca64a986 use public method for validity 2023-01-05 11:54:10 -05:00
Cory LaViska
c216cfe0fd fix min/max types 2023-01-05 11:29:51 -05:00
Cory LaViska
192f15e3b7 update cem plugin 2023-01-05 11:29:34 -05:00
Cory LaViska
01be3daf6d update docs 2023-01-04 14:51:30 -05:00
Cory LaViska
d36eec5637 add info about updateComplete 2023-01-04 14:04:24 -05:00
Cory LaViska
121464fa2d make swatches an attribute 2023-01-04 12:37:16 -05:00
Cory LaViska
ee0254e822 fixes #1097 2023-01-04 11:29:11 -05:00
Cory LaViska
27f634402c fix switch default value; #1103 2023-01-04 11:04:25 -05:00
Cory LaViska
67fbe3b34e fixes #1101 2023-01-04 09:58:56 -05:00
Cory LaViska
164ebce990 remove tts test 2023-01-03 15:17:39 -05:00
Cory LaViska
571ae704e0 update changelog 2023-01-03 15:10:51 -05:00
Cory LaViska
ad305fb653 Remove orphaned code 2023-01-03 15:09:57 -05:00
Cory LaViska
fc0541ce53 make internal 2023-01-03 15:08:49 -05:00
Cory LaViska
c8555f448c reorg and add private keyword 2023-01-03 15:04:07 -05:00
Cory LaViska
96e41198ec remove comment 2023-01-03 14:24:27 -05:00
Cory LaViska
57064aef4d remove void 2023-01-03 13:36:12 -05:00
Cory LaViska
cf200aa58a update tests 2023-01-03 10:37:39 -05:00
Cory LaViska
388a4f85a4 Revert "Remove the need to bind member methods in the connectedCallback (#1081)"
This reverts commit 5f8556b1b2.
2023-01-03 10:19:25 -05:00
Jeremiah Hoyet
5f8556b1b2 Remove the need to bind member methods in the connectedCallback (#1081)
* Remove the need to bind member methods in the connectedCallback

* Remove console.log
2023-01-03 10:15:12 -05:00
Cory LaViska
e411b57124 fixes #1096 2023-01-03 10:10:14 -05:00
Cory LaViska
0120e7429d update changelog 2023-01-03 09:49:56 -05:00
sowiner
377dbe28eb add zh-tw translations (#1086)
* add zh-tw translations

* add numOptionsSelected translate
2023-01-03 09:48:56 -05:00
Cory LaViska
b25b1d5750 Update changelog 2023-01-03 09:05:16 -05:00
Alan Chambers
0e1b792bf7 Update make-react.js script to use new @lit-labs/react createComponent options object (#1090)
* Update react wrapper signature

Updated react createComponent to use new options object

* removed unused pascalCase import
2023-01-03 08:57:27 -05:00
Cory LaViska
417f0d17c9 don't scroll when refocusing 2022-12-28 17:21:11 -05:00
Cory LaViska
d9252fe755 ignore disabled controls 2022-12-28 17:18:48 -05:00
Cory LaViska
c5555ab5fe Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-12-28 16:50:37 -05:00
Cory LaViska
eb61dc7d91 update bootstrap-icons 2022-12-28 16:50:35 -05:00
Bünyamin Eskiocak
a4c522f090 Added control--checked and control--indeterminate parts to <sl-checkbox> (#1085)
* removed checked and indeterminate parts from doc

* Revert "removed checked and indeterminate parts from doc"

This reverts commit 5e702387e1ace4e5d6b424f861df8e6a3a1a4fdd.

* control--checked & control--indeterminate parts
2022-12-28 16:40:59 -05:00
Cory LaViska
a8fe8c3e71 update hover styles 2022-12-28 16:36:07 -05:00
Cory LaViska
87000306c0 remove unused import 2022-12-28 16:25:33 -05:00
Cory LaViska
ae07b7d0a8 update changelog 2022-12-28 16:22:08 -05:00
Cory LaViska
626b76610f fix example 2022-12-28 16:22:05 -05:00
Cory LaViska
b4a1e1b0c9 fix docs 2022-12-28 16:12:41 -05:00
Cory LaViska
913243f8c1 more finishing touches + tests 2022-12-28 16:07:37 -05:00
Cory LaViska
563ed81984 remove example 2022-12-28 16:07:22 -05:00
Cory LaViska
fcbf339a86 remove unused selectors 2022-12-28 16:07:17 -05:00
Cory LaViska
70585e1d2a finishing touches 2022-12-28 15:31:42 -05:00
Cory LaViska
479e568296 update docs 2022-12-28 15:31:05 -05:00
Cory LaViska
a473e41ab3 fix docs 2022-12-28 14:43:01 -05:00
Cory LaViska
92f6a2d8e9 update changelog 2022-12-28 11:42:34 -05:00
Cory LaViska
06dc5740bf updates 2022-12-28 11:42:08 -05:00
Cory LaViska
fe524e0fac ignore clear button keys 2022-12-20 20:49:10 -05:00
Cory LaViska
ea7de2eb70 document slots 2022-12-20 18:44:57 -05:00
Cory LaViska
b8d02537a6 add grouping example 2022-12-20 18:44:33 -05:00
Cory LaViska
24744ef8c5 docs + cleanup wrapper 2022-12-20 18:24:25 -05:00
Cory LaViska
69997466be update example 2022-12-20 18:23:51 -05:00
Cory LaViska
f7d7fdf5b1 rerorder props 2022-12-20 18:23:19 -05:00
Cory LaViska
c0013c5639 refactor into set function 2022-12-20 17:53:55 -05:00
Cory LaViska
935040204f fix alignment to match other controls 2022-12-20 17:53:45 -05:00
Cory LaViska
2ffbf9b017 update examples 2022-12-20 17:43:50 -05:00
Cory LaViska
0f67b9a9d1 remove unused var 2022-12-20 13:51:53 -05:00
Cory LaViska
c5dee51233 restore example 2022-12-20 13:50:48 -05:00
Cory LaViska
b07238d536 temporarily disable a11y bug 2022-12-20 13:37:30 -05:00
Cory LaViska
e2a65c28f4 update select examples 2022-12-20 13:37:05 -05:00
Cory LaViska
1f457cdde0 keep on keepin on 2022-12-20 13:36:53 -05:00
Cory LaViska
46fda5f0a6 upgrade 2022-12-20 13:36:06 -05:00
Cory LaViska
e22c2f839b don't select disabled options 2022-12-20 13:00:27 -05:00
Cory LaViska
5bff912162 loosen up that type 2022-12-20 13:00:13 -05:00
Cory LaViska
f3010cecbe fix tests 2022-12-20 12:13:39 -05:00
Cory LaViska
2dc275defd fix validity and events 2022-12-20 11:40:49 -05:00
Cory LaViska
9f79445292 improve scroll on open 2022-12-20 10:31:55 -05:00
Cory LaViska
10cb26b81e focus after update 2022-12-20 10:21:41 -05:00
Cory LaViska
3722e0ad91 focus after open 2022-12-19 18:17:41 -05:00
Cory LaViska
f28a0ec743 fix in screen readers 2022-12-19 17:46:31 -05:00
Cory LaViska
a42b393bf1 Merge branch 'next' into select 2022-12-17 11:29:58 -05:00
Cory LaViska
41f50777bd update changelog 2022-12-17 11:29:25 -05:00
Cory LaViska
6afc3ba12e select rewrite (incomplete) 2022-12-17 11:27:30 -05:00
Alessandro
d8b7040a9e fix(tree): add initial sync (#1080) 2022-12-17 11:26:42 -05:00
Cory LaViska
59cd70ae6f 2.0.0-beta.87 2022-12-14 09:29:18 -05:00
Cory LaViska
6d9c8561fb update version 2022-12-14 09:22:57 -05:00
Cory LaViska
edb8a92838 update changelog 2022-12-14 09:22:30 -05:00
Cory LaViska
da3ffe9a60 update changelog and spelling list 2022-12-13 12:15:40 -05:00
Cory LaViska
e2b791dee8 i didn't attend Oxford, but I do like their commas 2022-12-13 12:15:28 -05:00
Alan Chambers
9178be576b color-picker library change and hsv format support (#1072)
* sl-color-picker use lib '@ctrl/tinycolor' instead of 'color'

typescript, esm and smaller

* parseColor adjustments

removed normalizeColorString and other tweaks

* added hsv format

* fixed const
2022-12-13 11:01:07 -05:00
Cory LaViska
752f5cff55 fixes #1071 2022-12-13 09:28:12 -05:00
Cory LaViska
3675787ddd remove polyfill 2022-12-13 07:24:06 -05:00
Cory LaViska
6284ed0347 Update tsconfig 2022-12-09 11:54:40 -05:00
Cory LaViska
1ff05c4b3d fixes #1061 2022-12-08 14:42:04 -05:00
Cory LaViska
066abe4e52 wait longer 2022-12-08 11:16:08 -05:00
Cory LaViska
e9134ddcf6 fixes #1051 2022-12-08 10:54:05 -05:00
Cory LaViska
0237851aa1 fix failing test 2022-12-08 09:01:33 -05:00
Cory LaViska
1841251fdf Current (#1059)
* Update fa.ts (#1053)

Improved translations by using original Farsi words rather than English ones

* Revert "Update fa.ts (#1053)" (#1058)

This reverts commit c951661b58.

Co-authored-by: Hadi F <62212402+hadi-f90@users.noreply.github.com>
2022-12-08 08:52:55 -05:00
Cory LaViska
b1e48406f3 #1053 2022-12-08 08:51:03 -05:00
Cory LaViska
4ca51cf11e cleanup 2022-12-07 17:43:48 -05:00
Cory LaViska
41bd61c3a5 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-12-07 17:40:49 -05:00
Cory LaViska
c6df057e15 fixes #917 2022-12-07 17:40:46 -05:00
Alan Chambers
1428481a5c Add direct react export to package.json (#1050) 2022-12-07 09:23:26 -05:00
Cory LaViska
1c359fbea9 2.0.0-beta.86 2022-12-06 15:38:56 -05:00
Cory LaViska
0329694760 update version 2022-12-06 15:38:52 -05:00
Cory LaViska
936ec5a23a fix focus visible 2022-12-06 15:32:06 -05:00
Cory LaViska
d291506284 update docs 2022-12-06 14:12:36 -05:00
Cory LaViska
3877351fdc fix wrong values for buttons in form submission 2022-12-06 14:04:34 -05:00
Cory LaViska
7885572ebd jsdoc exported functions 2022-12-06 11:48:57 -05:00
Cory LaViska
2ee926023c fix translate arg 2022-12-06 11:41:51 -05:00
Cory LaViska
69e557cd8c convert to static method 2022-12-06 11:37:44 -05:00
Cory LaViska
f2efa73e20 improve documentation 2022-12-06 11:18:14 -05:00
Cory LaViska
2dd57956d5 move slots up and add parens to methods 2022-12-06 11:17:48 -05:00
Cory LaViska
ce86a1c9f2 update CEM plugin 2022-12-06 11:17:28 -05:00
Cory LaViska
a0f83c3b2b fix border radius bug 2022-12-05 09:38:42 -05:00
Cory LaViska
80a16ee42a remove slot wrappers 2022-12-02 17:03:59 -05:00
Cory LaViska
31b05fedd3 fix mislabeled slot 2022-12-01 16:39:39 -05:00
Cory LaViska
d3a7950483 add fallback content 2022-12-01 16:36:53 -05:00
Cory LaViska
f299621490 add note about icons + slots 2022-12-01 16:29:02 -05:00
Cory LaViska
c62ee3e207 refactor icon animation 2022-12-01 16:02:36 -05:00
Cory LaViska
a313087937 fix example 2022-12-01 16:01:45 -05:00
Cory LaViska
3945571b20 update changelog 2022-12-01 15:39:40 -05:00
Cory LaViska
c6a044416a remove transform from animations 2022-12-01 15:38:59 -05:00
Cory LaViska
d2f1b50ad0 fix tree item bug 2022-12-01 15:29:46 -05:00
Cory LaViska
1f1bae77dd don't use transform 2022-12-01 15:28:02 -05:00
Cory LaViska
829e22dc1e stop using transform 2022-12-01 15:26:46 -05:00
Cory LaViska
8b28ee818f improve custom icons 2022-12-01 15:25:09 -05:00
Cory LaViska
afb2e3d5b4 fix docs 2022-12-01 14:08:16 -05:00
Cory LaViska
fb0adb9ccb fix description 2022-12-01 13:28:04 -05:00
Cory LaViska
efea514f5a add summary-icon slot + example; #1046 2022-12-01 13:23:09 -05:00
Cory LaViska
fda9bd52a3 move up 2022-11-30 15:45:21 -05:00
Cory LaViska
01f8ce6b03 fix typo 2022-11-30 15:43:43 -05:00
Cory LaViska
e10651565f fix typos 2022-11-30 15:43:36 -05:00
Bünyamin Eskiocak
35aa56d334 Added title attribute (#1043)
* added title attribute

Fixes #1042

* added tests for title

* also some other tests

* clarify why title was added
2022-11-30 15:42:56 -05:00
Tao Cumplido
31e1f2fc59 fix sl-selection-change event not emitted when all items are deselected (#1038)
also added more tests
2022-11-30 08:18:56 -05:00
Cory LaViska
ee30f7a10b fix indicator animation bug 2022-11-29 16:06:52 -05:00
Cory LaViska
a50909d474 fixes #1037 2022-11-29 15:52:13 -05:00
Cory LaViska
63115d51e5 fixes #1036 2022-11-29 14:47:23 -05:00
Cory LaViska
026036a14b fix border when hovering over icon; #1035 2022-11-29 14:22:50 -05:00
Cory LaViska
22e09a778b update test to account for removed attrs 2022-11-29 11:30:11 -05:00
Cory LaViska
488088d5f0 add header-actions slot 2022-11-29 11:17:15 -05:00
Cory LaViska
0c18880e5c replace icon x => x-lg 2022-11-29 11:03:58 -05:00
Cory LaViska
0b0a571d17 update changelog 2022-11-29 10:01:53 -05:00
Cory LaViska
ea9e596279 remove unused attribs 2022-11-29 10:01:25 -05:00
Cory LaViska
fe17c8406b add link to BEM post 2022-11-29 09:47:48 -05:00
Cory LaViska
e7a4a5135d improve screen reader experience 2022-11-29 09:25:45 -05:00
Cory LaViska
ebf12860be update changelog 2022-11-28 16:17:43 -05:00
Bünyamin Eskiocak
4b81778e46 moved changelog entry to correct version (#1033) 2022-11-28 16:14:16 -05:00
Cory LaViska
28a8a90bb1 update docs 2022-11-28 16:13:36 -05:00
Cory LaViska
8dab5a8f04 Merge branch 'next' into cem-better-data 2022-11-28 16:07:29 -05:00
Cory LaViska
4ac9483213 remove unused config 2022-11-28 16:06:35 -05:00
Cory LaViska
ae3c0d72c0 update plugin 2022-11-28 16:05:11 -05:00
Cory LaViska
83b73e823d update changelog; #1030 2022-11-28 11:56:13 -05:00
Tao Cumplido
da6ae608f1 only emit a tree's selection change event when the selection has actually changed (#1030) 2022-11-28 11:55:12 -05:00
Cory LaViska
1e39647d7f Merge branch 'next' into cem-better-data 2022-11-28 11:51:20 -05:00
Cory LaViska
4dc92247d5 add usage disclaimer to popup 2022-11-28 09:56:41 -05:00
Cory LaViska
1b6f982d68 fix missing dist 2022-11-28 09:24:27 -05:00
Cory LaViska
81c775ea87 2.0.0-beta.85 2022-11-24 13:39:15 -05:00
Cory LaViska
09f741e930 update changelog 2022-11-24 13:36:21 -05:00
Tao Cumplido
602a863d89 fix isTreeItem method when called with non-element nodes (#1026) 2022-11-24 13:33:33 -05:00
Cory LaViska
3dd19a7f62 fixes #1024 2022-11-24 13:29:34 -05:00
Cory LaViska
bdf890ab0d Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-11-23 10:48:04 -05:00
Cory LaViska
0b7eae0c20 update changelog 2022-11-23 10:48:02 -05:00
Tao Cumplido
f3e273744a don't treat lazy tree items as leaf nodes (#1023) 2022-11-23 10:46:25 -05:00
Cory LaViska
7f9b0bd5a2 fixes #1024 2022-11-23 10:38:04 -05:00
Cory LaViska
6579a95999 fixes #1024 2022-11-23 10:32:27 -05:00
Cory LaViska
aaa8e4a01b 2.0.0-beta.84 2022-11-22 15:26:00 -05:00
Cory LaViska
200d4385ec update version 2022-11-22 15:23:57 -05:00
Cory LaViska
50d983a1ab move controls and show code when clicking 2022-11-22 15:06:11 -05:00
Cory LaViska
1e6d295746 update form validation docs 2022-11-22 14:18:54 -05:00
Cory LaViska
5d128c154c remove tab reuse logic
This broke recently so might as well remove the extra logic and make launching a bi faster.
2022-11-22 13:22:51 -05:00
Cory LaViska
6c7d7f4b7e revert dist 2022-11-22 13:01:15 -05:00
Cory LaViska
0cc8fdb8f8 add comment 2022-11-22 11:00:36 -05:00
Uilton Oliveira
4f7d915853 Fix mapping in exports (#1020)
* Fix mapping in exports

Fixes #1019
- Add correct mapping for public entrypoints.

* Remove shoelace.js from from exports list

Should still works fine while importing this way: import { thing } from '@shoelace-style/shoelace';
2022-11-22 10:58:07 -05:00
Cory LaViska
61738a3f6a update cem plugin 2022-11-22 09:23:10 -05:00
Cory LaViska
9061c1987a Merge branch 'next' into cem-better-data 2022-11-22 09:01:05 -05:00
Cory LaViska
c40b3a86a9 add support for extended language codes 2022-11-22 08:55:34 -05:00
Cory LaViska
8b2c090bac fixes #1018 2022-11-21 16:18:44 -05:00
Bünyamin Eskiocak
8f2a3bd8bd fixed type validation by changing variant to type (#1017) 2022-11-21 16:06:41 -05:00
Cory LaViska
ade05a6262 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-11-21 12:41:15 -05:00
Bünyamin Eskiocak
a706e69be6 Added stepUp, stepDown and showPicker functions (#1013)
* added stepUp and stepDown to sl-range

* step function & default props tests for sl-range

* stepUp, stepDown & showPicker functions for input

* step functions & default props tests for sl-input

* made name and placeholder default to empty string

* updated changelog

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2022-11-21 12:41:09 -05:00
Bünyamin Eskiocak
bc6a813c46 Added formenctype to <sl-button> (#1009)
* added formenctype to sl-button

* updated changelog

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2022-11-21 12:37:54 -05:00
Cory LaViska
599373c24a use attr not prop 2022-11-18 10:45:47 -05:00
Cory LaViska
daebd08475 add validation states to all form controls; closes #1011 2022-11-18 09:56:05 -05:00
Cory LaViska
a3f658938d bulletproof part selectors 2022-11-17 09:35:44 -05:00
Cory LaViska
23414fe411 fix callout 2022-11-16 14:59:35 -05:00
Cory LaViska
c8061fdee9 update deps 2022-11-16 14:57:21 -05:00
Cory LaViska
857b21a6a3 don't error out on missing summaries 2022-11-16 12:58:32 -05:00
Cory LaViska
48be3f46b8 add cem-custom-data-generator 2022-11-16 12:47:34 -05:00
Cory LaViska
66012a57c8 remove unused properties; #1007 2022-11-16 10:21:38 -05:00
Samuel Stroschein
0e77d8a459 add "exports" field to fix node16 module resolution (#1007) 2022-11-16 10:19:43 -05:00
Cory LaViska
b559c2345a remove whitespace 2022-11-15 13:52:03 -05:00
Cory LaViska
d79d7da299 various improvements in forced-colors mode 2022-11-14 16:12:24 -05:00
Cory LaViska
b296ac08cf fix menu selection in WHC 2022-11-14 14:49:48 -05:00
Cory LaViska
36e677dd6b fix dialog/drawer borders in WHC 2022-11-14 14:49:24 -05:00
Cory LaViska
6167993941 improve search in WHC 2022-11-14 14:49:13 -05:00
Cory LaViska
f9d3f0be27 use outline 2022-11-14 14:43:12 -05:00
Cory LaViska
7f76cacc10 make docs search usable 2022-11-14 14:41:35 -05:00
Cory LaViska
96cac8da85 improve color picker for WHC 2022-11-14 13:00:30 -05:00
Cory LaViska
a788e976c9 update docs/changelog 2022-11-14 09:50:35 -05:00
Emil
68c1319ed5 Add loading attribute to sl-avatar (#1006) 2022-11-14 09:48:26 -05:00
Cory LaViska
9db6f256e5 update icons 2022-11-14 09:11:12 -05:00
Cory LaViska
33e19c003c fixes #968 2022-11-10 17:12:29 -05:00
Cory LaViska
337d688bd3 add 18.x 2022-11-10 16:34:22 -05:00
Cory LaViska
cc305f8957 replace all paths in CEM 2022-11-10 16:27:23 -05:00
Cory LaViska
40cb38e0a0 point module paths to dist; fixes #725 2022-11-10 15:28:08 -05:00
Cory LaViska
a0d3ac047d loosen rule 2022-11-10 15:26:10 -05:00
Bünyamin Eskiocak
e399bd19a2 updated changelog (#1005) 2022-11-10 12:34:36 -05:00
Cory LaViska
f64f144b4b fixes #985 2022-11-10 12:27:03 -05:00
Cory LaViska
197a0c3048 update icon tests 2022-11-10 12:02:26 -05:00
Cory LaViska
e5e6b0d74f watch grouped tests by default 2022-11-10 11:43:40 -05:00
Cory LaViska
db1c2ee5cc update changelog 2022-11-10 11:30:51 -05:00
Cory LaViska
c6a43ba4c2 remove base from icons 2022-11-10 11:30:42 -05:00
Cory LaViska
ed45f52433 update comment 2022-11-10 08:06:35 -05:00
Cory LaViska
2d478c36fa fixes #963 2022-11-09 16:53:53 -05:00
Cory LaViska
f140007758 fixes #992 2022-11-09 16:07:34 -05:00
Cory LaViska
f03b09a410 fixes #965 2022-11-09 15:27:51 -05:00
Cory LaViska
0d9767596a disable rule 2022-11-09 13:18:05 -05:00
Cory LaViska
c626706e27 update changelog 2022-11-09 11:54:51 -05:00
VitaliyMaznyi
58b653f1ae improve input submit (#988)
add check to input component if japanese character is chosen by pressing enter key and prevent form submitting

Co-authored-by: VitaliyMaznyi <vitalii.maznyi@fasterthanlight.me>
2022-11-09 11:51:17 -05:00
Cory LaViska
5eeb98d39d fixes #925 2022-11-09 11:34:50 -05:00
Cory LaViska
e90b64b463 revert example 2022-11-09 09:58:04 -05:00
Cory LaViska
5fd682d83a fixes #990 2022-11-09 09:50:58 -05:00
Cory LaViska
49193c972f fixes #999 2022-11-08 12:15:14 -05:00
Cory LaViska
c027c0a527 use margin instead of padding 2022-11-07 12:31:13 -05:00
Cory LaViska
8160c33aa4 update deps 2022-11-07 12:06:34 -05:00
Cory LaViska
7d0226e3c4 make sl-show|hide cancelable 2022-11-03 10:33:10 -05:00
Cory LaViska
084c1dc5b5 fix tab a11y test 2022-11-02 08:48:39 -05:00
Cory LaViska
bfa320c5b5 fix a11y test 2022-11-02 08:43:52 -05:00
Buni48
4e1cf11461 Added turkish, british and austrian translations (#989)
* turkish translation

* austrian translation

* british translations

* updated changelog

* Update src/translations/en-gb.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2022-11-02 08:37:22 -05:00
dhellgartner
5b4197da2c Relative time tests (#991)
* Added tests for sl-relative-time

* Solves a blinker which appears only when I run
the full test suite: Chromium and webkit are fine
but sometimes there is this one error on firefox
for the disabled test of the menu item (saying there
was a timeout waiting). Did not happen again after
doing the change.

Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2022-11-02 08:37:00 -05:00
Cory LaViska
e29b2f12fb fix typo 2022-10-28 11:16:12 -04:00
Cory LaViska
33a41bb2e4 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-10-28 09:57:44 -04:00
Cory LaViska
ab754e9409 add transition duration custom prop 2022-10-28 09:57:41 -04:00
dhellgartner
433955acf7 Added tests for sl-menu (#984)
Co-authored-by: Dominikus Hellgartner <dominikus.hellgartner@gmail.com>
2022-10-28 08:31:20 -04:00
Buni48
55445a80a3 removed left border from button group (#983) 2022-10-28 08:28:18 -04:00
Cory LaViska
9a64ea0670 update changelog 2022-10-27 13:00:17 -04:00
Buni48
0ff144a787 Fixed button group inner border disappears (#980)
* fixed button group inner border disappears

* updated changelog

* show border on active
2022-10-27 12:55:20 -04:00
bolte-17
8893045bf1 Avoid null dereference when removing event listeners in Dropdown (#958) 2022-10-27 09:28:35 -04:00
kzsa
a8de02bd53 Add hungarian translation (#982) 2022-10-27 09:21:20 -04:00
Michael Daross
4db0aec1c2 Fix: Issue 978 - Missing @summary annotation (#979)
Fixes https://github.com/shoelace-style/shoelace/issues/978
2022-10-27 09:20:19 -04:00
Cory LaViska
d885087c93 this is why we can't have nice thing 2022-10-24 10:45:42 -04:00
Cory LaViska
065aad2e4c bump node versions 2022-10-24 10:15:56 -04:00
Cory LaViska
9027ce055a prettier 2022-10-24 10:06:39 -04:00
Felix Becker
119b923522 testing: components/tag (#949)
* add test for SlTag

* add all classes (even not test relevant ones) to fix failing tests
2022-10-24 10:04:42 -04:00
Felix Becker
3b4d0652c4 testing: components/skeleton (#951)
* add tests for SlSkeleton

* check base aria-properties too
2022-10-24 10:04:30 -04:00
Felix Becker
1301934796 add test for SlRating (#953) 2022-10-24 10:04:17 -04:00
Emil
a8539bae02 Update vue-2.md (#959) 2022-10-24 10:03:24 -04:00
Manuel Schmidt
8121faa1d4 Enrich components @summary with description from docs (#962)
* keep header styles with repositioned description text

* `animated-image` move description to component

* code style

* `avatar` add summary from docs

* `badge` add summary from docs

* `breadcrumb` add summary from docs

* `button` add summary from docs

* lead sentence is now part of the header

* `button-group` add summary from docs

* `card` add summary from docs

* `checkbox` add summary from docs

* `color-picker` add summary from docs

* `details` add summary from docs

* `dialog` add summary from docs

* `divider` add summary from docs

* `drawer` add summary from docs

* `dropdown` add summary from docs

* `format-bytes` add summary from docs

* `format-date` add summary from docs

* `format-number` add summary from docs

* `icon` add summary from docs

* `icon-button` add summary from docs

* `image-comparer` add summary from docs

* `include` add summary from docs

* `input` add summary from docs

* `menu` add summary from docs

* `menu-item` add summary from docs

* `menu-label` add summary from docs

* `popup` add summary from docs

* `progressbar` add summary from docs

* `progress-ring` add summary from docs

* `radio` add summary from docs

* `radio-button` add summary from docs

* `range` add summary from docs

* `rating` add summary from docs

* `relative-time` add summary from docs

* `select` add summary from docs

* `skeleton` add summary from docs

* `spinner` add summary from docs

* `split-panel` add summary from docs

* `switch` add summary from docs

* `tab-group` add summary from docs

* `tag` add summary from docs

* `textarea` add summary from docs

* `tooltip` add summary from docs

* `visually-hidden` add summary from docs

* `animation` add summary from docs

* `breadcrumb-item` add summary from docs

* `mutation-observer` add summary from docs

* `radio-group` add summary from docs

* `resize-observer` add summary from docs

* `tab` add summary from docs

* `tab-panel` add summary from docs

* `tree` add summary from docs

* `tree-item` add summary from docs

* remove `title` for further usage of `Sl` classnames in docs

* revert: use markdown parser for component summary
2022-10-21 09:56:35 -04:00
Felix Becker
70766b4e68 add new theme token --sl-input-required-content-color to both themes (#948)
* add new theme token --sl-input-required-content-color to both themes

* use new token

* use label color as default value
2022-10-21 08:59:20 -04:00
Nick Cipriani
361efd43a2 Remove extra footer slot from Card with Footer example (#966)
The button and div both had a slot equal to footer when only the footer div actually needs it.
2022-10-21 08:08:49 -04:00
Manuel Schmidt
a78b9fe5bd sl-alert: move description from docs to component (#947)
* move component description from docs to component

* use component description in docs

* add style for lead sentence, keep bc for not updated components

* run `npm prettier`

* render summary as part of the header

* add `title` as another custom tag for JSDoc

* render components title in header
2022-10-19 09:35:53 -04:00
Manuel Schmidt
0cba4695ba Enrich docs with @summary and @title from custom-elements.json (#952)
* provide possibility to render components "description" into docs with `[component-description:COMPONENT_NAME]`

* the meta summary should be rendered into header too
2022-10-18 12:22:48 -04:00
Buni48
22fa81433e tests for sl-tab-panel (#956) 2022-10-18 10:49:50 -04:00
Buni48
5458a0e8f5 Added tests to menu-item & menu-label (#935)
* added tests to menu-item & menu-label

* updated changelog

* aTimeout instead of setTimeout
2022-10-14 08:55:09 -04:00
Buni48
0e67f85995 Fixed applying border radius to card header (#934)
* fixed applying border radius to card header

* updated changelog

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2022-10-14 08:36:11 -04:00
Buni48
808003f3df Added checked state part for radio & radio button (#933)
* added checked state part for radio & radio button

* updated changelog
2022-10-14 08:35:00 -04:00
Buni48
46c225d50f removed intl safari support notice (#954) 2022-10-14 08:34:11 -04:00
Cory LaViska
0a3656efc5 prettier 2022-10-03 16:19:22 -04:00
Greg Leaver
0aca600063 Fix <sl-range> docs to have correct closing tag in examples. (#928)
A couple of the examples had `</sl-input>` instead of `</sl-range>`
2022-10-03 16:15:04 -04:00
Cory LaViska
38f05ff010 ts 2022-09-21 10:30:23 -04:00
Cory LaViska
3d4cbbf6ba fix path 2022-09-21 10:27:37 -04:00
Cory LaViska
c877e16c14 improve badge font size 2022-09-20 10:25:01 -04:00
Cory LaViska
acce8eb146 increase badge padding 2022-09-20 10:19:35 -04:00
Cory LaViska
03fe71353a 2.0.0-beta.83 2022-09-19 08:50:51 -04:00
Cory LaViska
8915282082 update version 2022-09-19 08:46:31 -04:00
Cory LaViska
28003ac430 downgrade Floating UI for perf reasons 2022-09-19 08:39:11 -04:00
Cory LaViska
f2dcad82a9 fixes #916 2022-09-19 08:19:04 -04:00
Cory LaViska
69ff4f0bbc refactor emit into ShoelaceElement 2022-09-16 16:21:40 -04:00
Cory LaViska
a1c93fd30f fixes #913 2022-09-16 15:27:10 -04:00
ErikOnBike
bdf8c4e669 Fix workaround for Safari which still has old property name in sl-progress-ring (#914) 2022-09-16 15:14:38 -04:00
Cory LaViska
854e576c2c fixes #912 2022-09-16 15:11:02 -04:00
Cory LaViska
cf32064e8c add issue number 2022-09-12 08:53:32 -04:00
Cory LaViska
1f91d4cb79 add missing part 2022-09-12 08:50:16 -04:00
Cory LaViska
a7fdb23577 fix tooltip alignmen 2022-09-12 07:51:03 -04:00
Cory LaViska
39d1bbed2c fixes #905 2022-09-09 09:38:54 -04:00
Cory LaViska
e2e152c373 update changelog 2022-09-05 12:56:05 -04:00
Cory LaViska
aae74dbaf7 reorder and update changelog 2022-09-05 12:56:00 -04:00
Buni48
6c716db037 added expand button part for tree item (#893); fixes #890 2022-09-05 12:52:41 -04:00
Cory LaViska
7c0c0fa244 use event phase constants 2022-09-05 12:27:47 -04:00
Jared White
ffd32e52ef Avoid bubbling events for sl-include (#897)
* Avoid bubbling events for sl-include

I ran into an issue where icons inside of an HTML include were dispatching `sl-load` events, which was causing my `sl-include` event handler to run multiple times. By adding these guards, we ensure only events immediately dispatched by the element itself will be handled.

* Use the correct event variable
2022-09-05 12:23:47 -04:00
Cory LaViska
27868b56e8 fixes #891 2022-09-02 15:19:35 -04:00
Cory LaViska
346f13e5a5 fix arrow placement 2022-09-02 11:28:49 -04:00
Cory LaViska
69547d4800 remove unused styles 2022-08-31 16:19:42 -05:00
Patrick McElhaney
9fc4185f87 Better descriptions for checkbox attributes (#894)
The description for the checkbox's value attribute is currently "the checkbox's value attribute." I think we can do better than that, especially considering anyone who hasn't worked with old-school HTML forms that POST to the URL in the `action` attribute is unlikely to know why a checkbox has a value and that value is not boolean. 

While I was here I improved a couple of other descriptions. If there's an interest, I can expand this PR to update all of the properties in all controls where the description is tautological.
2022-08-31 16:14:34 -05:00
Justin Fagnani
08b5da7c56 Change LitElement and site to Lit and lit.dev (#889) 2022-08-30 23:28:45 -05:00
Cory LaViska
05e026876a fix transition in Firefox 2022-08-30 17:51:51 -05:00
Cory LaViska
8d0d0ac4e0 forEach 2022-08-30 16:59:40 -05:00
Cory LaViska
972d629883 remove 404 from search 2022-08-30 16:59:24 -05:00
Cory LaViska
ce12020fca remove clearable 2022-08-30 16:09:49 -05:00
Cory LaViska
29b149cd26 fix sidebar buttons 2022-08-30 16:08:51 -05:00
Cory LaViska
7de37b9315 remove date 2022-08-30 16:08:40 -05:00
Cory LaViska
237cda3b63 fixes #884 2022-08-30 11:56:34 -05:00
Cory LaViska
51c4abb72b remove log 2022-08-30 11:49:17 -05:00
Cory LaViska
3a6890af81 fixes #886 2022-08-30 09:17:46 -05:00
Cory LaViska
7cc2c89f92 remove responsive media 2022-08-26 10:43:12 -04:00
Cory LaViska
bb55c93b1a upgrade exp components 2022-08-26 10:33:45 -04:00
Cory LaViska
a3d00a92a0 fixes #882 2022-08-26 10:28:18 -04:00
Christian Oliff
5eccce625a Update node.js.yml (#883) 2022-08-26 09:46:35 -04:00
Cory LaViska
0c3a25d2ad prettier 2022-08-26 09:21:02 -04:00
Rich Klein
d225aaa2ff Update Laravel integration guide to reflect v9.1 (#865)
Laravel 9.1 now uses Vite as the default bundler instead of webpack.
2022-08-26 09:18:28 -04:00
Christian Oliff
c6b7c24ed7 Update .editorconfig (#880) 2022-08-26 09:16:57 -04:00
Cory LaViska
827c36bb1d update tree; fixes #879 2022-08-26 09:12:51 -04:00
Cory LaViska
d9f48a5f2a update examples 2022-08-26 09:11:09 -04:00
Cory LaViska
ccbdc6c014 fix docs 2022-08-25 17:36:06 -04:00
Cory LaViska
b6edba912b fixes #873 2022-08-25 17:22:18 -04:00
Cory LaViska
4cc5baaa0b fixes #876 2022-08-25 16:24:13 -04:00
Cory LaViska
c2bbb0e8a4 fix arrow 2022-08-25 16:09:27 -04:00
Cory LaViska
352cade421 fix example 2022-08-25 12:24:39 -04:00
Cory LaViska
708977acf7 2.0.0-beta.82 2022-08-25 10:03:51 -04:00
Cory LaViska
bab5749788 update version 2022-08-25 10:00:03 -04:00
Cory LaViska
c6d0b27f0d fix test 2022-08-25 09:46:34 -04:00
Cory LaViska
ee31f3f682 fix disabled tab tabbing 2022-08-25 09:42:55 -04:00
Cory LaViska
105bb08ee1 fixes #872 2022-08-25 09:37:20 -04:00
Cory LaViska
ca64d26d77 fixes #871 2022-08-25 09:18:36 -04:00
Cory LaViska
23b2f9335b add test for #869 2022-08-25 09:00:52 -04:00
Cory LaViska
dfdd7c75c2 fixes #869 2022-08-25 08:48:23 -04:00
Cory LaViska
156a2812ae fix docs 2022-08-25 08:33:32 -04:00
Cory LaViska
e42beab336 remove extra border and redundant styels 2022-08-24 15:08:32 -04:00
Cory LaViska
098db9c3fa add arrow-placement 2022-08-24 15:06:16 -04:00
Cory LaViska
81d393fbc1 update heroicons example to 2.0 2022-08-24 08:23:55 -04:00
Cory LaViska
2696b1a9ec fixes #867 (for real this time) 2022-08-23 10:55:49 -04:00
Cory LaViska
322f23ba56 revert fix 2022-08-23 10:42:16 -04:00
Cory LaViska
09224041b8 revert fix 2022-08-23 10:42:01 -04:00
Cory LaViska
326816e7b7 fixes #867 2022-08-23 09:00:03 -04:00
Cory LaViska
4117b6d219 fix fallback 2022-08-22 17:15:27 -04:00
Cory LaViska
af9905acff fix flip fallbacks and add example 2022-08-22 17:11:21 -04:00
Cory LaViska
e0727cc72c cleanup when auto-size changes 2022-08-19 14:32:53 -04:00
Cory LaViska
624297f624 update docs 2022-08-19 14:26:41 -04:00
Cory LaViska
1996037acc update auto-size; fixes #860 2022-08-19 14:21:30 -04:00
Cory LaViska
8fa665d3e7 fix react example 2022-08-19 10:26:16 -04:00
Cory LaViska
f0a3972ef6 add sync 2022-08-19 09:17:44 -04:00
Cory LaViska
c8f42c5bde fixes #862 2022-08-18 08:43:37 -04:00
Cory LaViska
7a6144d8c4 fix react example 2022-08-17 17:23:38 -04:00
Cory LaViska
ea71155b8f fix style types 2022-08-17 16:31:23 -04:00
Cory LaViska
20e9e3c320 tree updates 2022-08-17 16:22:03 -04:00
Cory LaViska
bcf2139fe7 fix types 2022-08-17 12:33:37 -04:00
Cory LaViska
48f864475e fix tree single select behavior 2022-08-17 12:33:33 -04:00
Cory LaViska
32f24a881e make dir/lang reactive everywhere 2022-08-17 11:37:37 -04:00
Cory LaViska
0163edd8a3 improve RTL 2022-08-17 10:48:40 -04:00
Cory LaViska
81620f0199 2.0.0-beta.81 2022-08-17 09:31:21 -04:00
Cory LaViska
d850b0f507 update changelog 2022-08-17 09:29:15 -04:00
Cory LaViska
19b2cde0d9 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-08-17 08:50:09 -04:00
Cory LaViska
87e252940d fixes #858 2022-08-17 08:50:07 -04:00
Cory LaViska
c6d30ae1b5 fix example 2022-08-16 15:32:14 -04:00
Cory LaViska
23bb45b1b6 add react example 2022-08-15 16:41:55 -04:00
Cory LaViska
70f59aa4ba add support for external anchors 2022-08-15 16:26:10 -04:00
Cory LaViska
237230961a fixes #854 2022-08-15 12:16:21 -04:00
Cory LaViska
b669ab7b74 fixes #855 2022-08-15 11:02:36 -04:00
Cory LaViska
040e8ce5e1 update deps 2022-08-11 09:59:02 -04:00
Denis Korablev
a74de59687 chore(i18n): fix ru translations (#853) 2022-08-11 09:27:10 -04:00
Cory LaViska
186f57cdde update docs 2022-08-11 09:22:35 -04:00
Cory LaViska
c94db27f07 fix rating a11y 2022-08-11 09:17:34 -04:00
Cory LaViska
578a58042b fix test 2022-08-10 16:53:27 -04:00
Cory LaViska
b3b3956ff5 improve spinner a11y 2022-08-10 16:52:39 -04:00
Cory LaViska
ce2abb97e0 accept cmd+k for search 2022-08-10 16:28:39 -04:00
Cory LaViska
6fc71601dd fix attribute 2022-08-10 16:25:27 -04:00
Cory LaViska
fd3da7e773 fix examples 2022-08-10 16:24:45 -04:00
Cory LaViska
70700b1ab5 fix example 2022-08-10 12:54:36 -04:00
Cory LaViska
eb9107bf2b add cursor 2022-08-10 11:31:30 -04:00
Cory LaViska
d0820178c9 remove background on hover 2022-08-10 11:12:07 -04:00
Cory LaViska
a8e8325ea7 fix popup 2022-08-10 11:01:13 -04:00
Cory LaViska
4b9e35313d remove dup 2022-08-10 09:13:50 -04:00
Cory LaViska
dc1394483a fix link 2022-08-10 08:29:49 -04:00
Cory LaViska
4b32b9461c 2.0.0-beta.80 2022-08-09 16:33:55 -04:00
Cory LaViska
308c8228aa fix tooltip 2022-08-09 16:29:55 -04:00
Cory LaViska
d74d2dec2e move var 2022-08-09 16:22:44 -04:00
Cory LaViska
c9f3497a8a update comment 2022-08-09 16:22:40 -04:00
Cory LaViska
8e57d0075c update version 2022-08-09 16:14:25 -04:00
Cory LaViska
73c8eba269 remove padding from example 2022-08-09 16:10:09 -04:00
Cory LaViska
1c0ffa7a24 fix changelog 2022-08-09 16:06:28 -04:00
Cory LaViska
014354efde fix typo 2022-08-09 16:01:33 -04:00
Cory LaViska
13ec55ba07 simplify initial open behavior 2022-08-09 16:01:13 -04:00
Cory LaViska
d6508a1262 fix initial open state and add test 2022-08-09 16:00:56 -04:00
Cory LaViska
9ebb5c8ec7 remove error 2022-08-09 16:00:43 -04:00
Cory LaViska
2093568981 use popup in dropdown 2022-08-09 15:28:01 -04:00
Cory LaViska
bd5ca9034c fix example 2022-08-09 15:27:41 -04:00
Cory LaViska
7ae454f8ca add data-current-placement 2022-08-09 15:27:34 -04:00
Cory LaViska
b9fcd09209 fix placement styles 2022-08-09 15:27:08 -04:00
Cory LaViska
cf2915a591 add react examples 2022-08-09 12:49:01 -04:00
Cory LaViska
9e625752be fix tag 2022-08-09 11:19:12 -04:00
Cory LaViska
147d1f048b update examples 2022-08-09 11:00:04 -04:00
Cory LaViska
801c4f70ec add examples 2022-08-09 10:52:36 -04:00
Cory LaViska
bcc9081247 update changelog 2022-08-09 10:52:31 -04:00
Cory LaViska
3919ea97e9 move it 2022-08-09 10:52:25 -04:00
Cory LaViska
876078b725 remove redundant style 2022-08-09 10:52:11 -04:00
Cory LaViska
c765a1df9b fix attrib names and middleware order 2022-08-09 10:52:04 -04:00
Cory LaViska
a1bc784bc7 bigger checks 2022-08-08 15:44:57 -04:00
Cory LaViska
d14b9e12ed use popup in tooltip 2022-08-08 15:41:19 -04:00
Cory LaViska
ab0fdd66b4 add sl-reposition event; support <slot> anchors 2022-08-08 15:40:21 -04:00
Cory LaViska
bf730f5bd2 use display:contents 2022-08-08 11:10:53 -04:00
Cory LaViska
8c667791fa fix menu item alignment 2022-08-08 11:08:13 -04:00
Cory LaViska
d07a8cfaea fix import paths 2022-08-08 10:15:41 -04:00
Cory LaViska
23deda2253 refactor watch logic 2022-08-08 10:08:57 -04:00
Cory LaViska
1c6cf769d4 update example 2022-08-08 10:08:53 -04:00
Cory LaViska
2add23d5d2 add example template 2022-08-05 16:13:24 -04:00
Cory LaViska
26693b2256 looking good; needs docs 2022-08-05 16:11:39 -04:00
Cory LaViska
f31d13c424 add popup 2022-08-05 09:17:58 -04:00
Cory LaViska
59182db564 reorder method 2022-08-04 09:22:13 -04:00
Cory LaViska
1bae224f80 remove constant 2022-08-04 09:17:08 -04:00
Cory LaViska
9b3240a14f update examples 2022-08-04 08:23:50 -04:00
Cory LaViska
860224c894 use token 2022-08-03 15:57:40 -04:00
Cory LaViska
a8b2eb2bb0 fix styles 2022-08-03 15:26:54 -04:00
Cory LaViska
cea69beca9 update radio group, radio, radio buton 2022-08-03 11:55:24 -04:00
Cory LaViska
4b7da8f510 update docs 2022-08-03 11:06:52 -04:00
Cory LaViska
6d31b1d63d remove unused styles; fix focus 2022-08-03 10:56:46 -04:00
Cory LaViska
7b55b38aa4 remove unused property 2022-08-03 10:56:37 -04:00
Cory LaViska
bf1121d126 Merge branch 'break-stuff-radio-group-a11y-fixes' into next 2022-08-03 10:00:49 -04:00
Burton Smith
fb2d419ab0 fix react example 2022-08-02 13:20:02 -04:00
Burton Smith
7179b60499 update docs 2022-08-02 13:16:19 -04:00
Burton Smith
ad00d8840e run prettier 2022-08-02 13:10:26 -04:00
Burton Smith
3d9fd3b889 disable button group role when nested 2022-08-02 13:03:47 -04:00
Burton Smith
90f4d77ed6 fix screen reader issues for radios and group 2022-08-02 12:59:00 -04:00
Cory LaViska
36d1e7c52e fixes #845 2022-08-02 08:26:03 -04:00
Andreas
2a1895a125 🔨 fix missing kbd closing tag (#846) 2022-08-02 07:51:00 -04:00
Cory LaViska
d5a352465e 2.0.0-beta.79 2022-08-01 12:18:57 -04:00
Cory LaViska
088ab99d02 revert version 2022-08-01 12:18:54 -04:00
Cory LaViska
42ed7f5cbb 2.0.0-beta.80 2022-08-01 12:17:16 -04:00
Cory LaViska
66e8259421 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-08-01 12:08:33 -04:00
Cory LaViska
1f34b63a2e revert radio fixes 2022-08-01 12:08:31 -04:00
Cory LaViska
cf3b4fa501 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-08-01 12:01:46 -04:00
Cory LaViska
73c190217f Revert "fix event docs"
This reverts commit f5bcd03c3f.
2022-08-01 12:01:34 -04:00
Cory LaViska
b2986e89b0 Revert "update changelog"
This reverts commit 8b2ddc984b.
2022-08-01 12:01:30 -04:00
Cory LaViska
2bf68e8a32 revert 2022-08-01 12:00:30 -04:00
Cory LaViska
f392ab4270 2.0.0-beta.79 2022-08-01 11:43:04 -04:00
Cory LaViska
eefb8f6a6b update version 2022-08-01 11:42:52 -04:00
Cory LaViska
8b2ddc984b update changelog 2022-08-01 11:41:56 -04:00
Cory LaViska
f5bcd03c3f fix event docs 2022-08-01 11:41:51 -04:00
Cory LaViska
92a73f21eb Merge branch 'fix-radio-a11y' of github.com:break-stuff/shoelace into next 2022-08-01 11:28:38 -04:00
Cory LaViska
4dbc3d2c8f Revert "fix checked handling"
This reverts commit 98746c86e4.
2022-08-01 11:25:09 -04:00
Burton Smith
90aac9abe9 fix type-o 2022-08-01 10:38:58 -04:00
Burton Smith
589021c40f remove logs 2022-08-01 10:38:07 -04:00
Burton Smith
1cc65b145a fix form validation 2022-08-01 10:35:00 -04:00
Cory LaViska
f6fbde3c96 update order 2022-08-01 10:34:50 -04:00
Cory LaViska
caf25773f0 Merge branch 'feat/tree-view' of github.com:alenaksu/shoelace into next 2022-08-01 10:21:53 -04:00
Alessandro
b904bb0736 chore: update styles 2022-08-01 13:58:24 +00:00
Cory LaViska
28ecc90e7f prettier 2022-08-01 09:28:47 -04:00
Cory LaViska
72fb9c7293 update changelog 2022-08-01 09:25:50 -04:00
Denis Korablev
d69712530c fix: fix dropdown hoist position (#844) 2022-08-01 09:24:11 -04:00
Alessandro
71a39600f5 chore: update docs 2022-08-01 12:51:14 +00:00
Alessandro
0291d7c28d chore: minor refactor 2022-08-01 12:48:02 +00:00
Alessandro
ed2417d974 feat: add customizable icons
* fix a bug focusing collapsed nodes
2022-08-01 12:41:36 +00:00
Burton Smith
85fd8a5204 update checked radio when value changes 2022-07-29 13:13:54 -04:00
Burton Smith
6446bb1013 prevent form submission 2022-07-29 12:31:29 -04:00
Burton Smith
2f8852245e update docs to reflect new API 2022-07-29 12:20:16 -04:00
Burton Smith
401b46bad8 update label 2022-07-29 12:20:00 -04:00
Burton Smith
ae3efaf8ae fix focus styles 2022-07-29 11:03:49 -04:00
Cory LaViska
98746c86e4 fix checked handling 2022-07-29 08:25:36 -04:00
Alessandro
268aef1711 fix: collapsed nodes are still focusable 2022-07-28 18:01:43 +00:00
Burton Smith
d765cef376 move validation logic and value to group level 2022-07-28 13:00:43 -04:00
Cory LaViska
23ed3d5647 add RTL info 2022-07-28 09:16:37 -04:00
Cory LaViska
1a7fbbfab4 fixes #839 2022-07-27 16:45:39 -04:00
Cory LaViska
47388d4a3f update deps 2022-07-27 16:17:23 -04:00
Cory LaViska
ce09869ea2 various updates 2022-07-26 15:53:24 -04:00
Cory LaViska
33587f51d3 Merge branch 'feat/tree-view' of github.com:alenaksu/shoelace into alenaksu-feat/tree-view 2022-07-26 08:17:41 -04:00
Cory LaViska
ed76d8aecc update changelog 2022-07-26 08:04:02 -04:00
Daniel Dennerkrans
33d2ec0597 added swedish translation (#838) 2022-07-26 08:03:02 -04:00
Alessandro
b4ae6ed1aa chore: update docs 2022-07-24 15:12:57 +00:00
Alessandro
b6839254d4 feat: add new tree-view component
feat: add indeterminate state

fix: rename item role

fix: aria attributes

fix: restore hover effect

fix: indeterminate state

chore: fix lint issue

fix: address (partially) review comment

fix: minor fix

feat: add keyboard navigation

fix: dependency name

fix: keyboard selection does not update all items

chore: minor changes

chore: remove leftover

chore: update documentation

feat: add lazy loading + several fixes

fix: add aria-busy attribute

fix: improve keyboard navigation and lazy loading

chore: fix linting issue

chore: minor fixes

fix: update component styling and slot

chore: remove exportparts attribute

fix: remove button margin for safari

fix: set correct part name

feat: implement selection modes and fix accessibility issues

chore: fix linting issues

chore: update docs

fix: minor fix

fix: treeitem height style

chore: update documentation

chore: refactor implementation

chore: implement unit tests

chore: update Enter key behavior

chore: update doc

chore: update doc
2022-07-23 15:16:17 +00:00
Cory LaViska
8ee811af58 fixes #837 2022-07-21 15:29:58 -04:00
Cory LaViska
f34ffdac55 fix color selection 2022-07-21 10:12:29 -04:00
Cory LaViska
d7e7ff6101 fix tooltip hoist position 2022-07-21 10:08:04 -04:00
Cory LaViska
1c36a7bcd4 remove void 2022-07-21 10:01:30 -04:00
Cory LaViska
7a77be017e improve menu a11y 2022-07-20 16:53:59 -04:00
Cory LaViska
5b5c6710fe add roles 2022-07-20 16:46:14 -04:00
Cory LaViska
04f7d2e182 use connectedCallback 2022-07-20 16:46:06 -04:00
Cory LaViska
36ee3c8a70 don't use getTarget() 2022-07-20 15:41:46 -04:00
Cory LaViska
98eec84422 fix tests 2022-07-20 15:37:47 -04:00
Burton Smith
bc08a4c005 run prettier 2022-07-20 15:34:10 -04:00
Cory LaViska
41580992f6 fix focus styles 2022-07-20 15:33:50 -04:00
Cory LaViska
9b7ce98ec0 fix disabled + focus styles 2022-07-20 15:32:26 -04:00
Cory LaViska
864d567572 improve tab accessibility 2022-07-20 15:29:19 -04:00
Burton Smith
cf360b3b3f fix radio a11y 2022-07-20 13:55:12 -04:00
Cory LaViska
673dc29dfe update changelog 2022-07-20 10:46:29 -04:00
Steven Traversi
849b643cfc Tooltip: Recalculate target after slotchange (#831)
* Tooltip: Recalculate target after slotchange

The tooltip's positioning breaks after a slotchange, unless the tooltips target is recalculated.

* Update src/components/tooltip/tooltip.test.ts

Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2022-07-20 10:43:47 -04:00
Cory LaViska
c39c4a9e9f update floating ui to 1.0.0 2022-07-20 08:28:16 -04:00
Cory LaViska
92c36c65cb update text 2022-07-19 09:39:51 -04:00
Cory LaViska
b6f25e09d2 fixes #815 2022-07-19 09:34:42 -04:00
Cory LaViska
71119c963d use classMap instead of inline style 2022-07-19 09:06:24 -04:00
Cory LaViska
ecf5ab5aad use classMap instead of inline style 2022-07-19 09:06:12 -04:00
Cory LaViska
7e581e6ad7 fix tab divider 2022-07-19 09:05:22 -04:00
Cory LaViska
36fa84e4b0 update changelog 2022-07-19 08:33:39 -04:00
Philipp Sonntag
3fb4cba856 Added type declaration to styles property for all components (#829)
* Updated the plop template with type for styles property
2022-07-19 08:27:39 -04:00
Cory LaViska
00f98cc505 update icon sprite 2022-07-18 08:41:48 -04:00
Cory LaViska
d9f719196a update bootstrap-icons 2022-07-18 08:18:01 -04:00
Cory LaViska
4b0c7245bd update sl localize 2022-07-15 12:16:43 -04:00
Cory LaViska
ced3a2a45a 2.0.0-beta.78 2022-07-15 10:00:20 -04:00
Cory LaViska
e6838e0a1f update version 2022-07-15 09:59:49 -04:00
Cory LaViska
9e637ce0db add shameless plug 2022-07-15 09:35:59 -04:00
Cory LaViska
acbee743a0 update deps 2022-07-14 09:11:16 -04:00
Cory LaViska
fa179fa30b fixes #824 2022-07-11 09:18:29 -04:00
Cory LaViska
2376f75f1d remove code blocks from search results 2022-07-11 09:13:57 -04:00
Cory LaViska
ca95822bba than than 2022-07-08 08:37:23 -04:00
Cory LaViska
6fbcd2158a add note about ai-generated code 2022-07-08 08:36:33 -04:00
Cory LaViska
389b78f748 remove :focus-visible shim 2022-07-07 09:43:27 -04:00
Cory LaViska
99368b9fdd fixes #821 2022-07-06 09:48:30 -04:00
Cory LaViska
a5a4621e25 update changelog 2022-07-06 08:39:11 -04:00
Cory LaViska
fe95ebaa95 Merge branch 'alenaksu-feat/range/active-track-offset' into next 2022-07-06 08:37:07 -04:00
Alessandro
01c7ca27fe feat(range): add active track offset 2022-07-06 09:27:37 +00:00
Cory LaViska
96ab3146be fixes #814 2022-07-05 08:58:11 -04:00
Cory LaViska
3c920cfed2 update text 2022-07-01 20:33:26 -04:00
Oliver Salzburg
db7caf1997 docs: Note that releases are not on a schedule (#810) 2022-07-01 20:25:24 -04:00
Oliver Salzburg
808815bdab docs: Fix duplicate package in list (#809) 2022-07-01 20:24:28 -04:00
Cory LaViska
8a8fd7f5a9 break it 2022-06-29 08:10:48 -04:00
Cory LaViska
3b3cb6d61d fixes #786 2022-06-29 08:09:25 -04:00
Cory LaViska
30a45f1d14 2.0.0-beta.77 2022-06-28 18:15:42 -04:00
Cory LaViska
d10f628f1d update version 2022-06-28 18:15:18 -04:00
Cory LaViska
615da18dc9 update changelog 2022-06-28 18:08:35 -04:00
Cory LaViska
be11c13f67 fix sort order 2022-06-28 18:08:28 -04:00
Cory LaViska
cb7f0aa41e webkit doesn't focus ranges like inputs 2022-06-28 18:01:55 -04:00
Alessandro
b2cf3a5505 feat(form): add reset functionality (#799)
* feat(form): add reset functionality

* feat(interal): add defaultValue decorator

* feat: add defaultValue and defaultChecked

* chore: implement unit tests

* chore: remove leftover
2022-06-28 17:59:52 -04:00
Cory LaViska
0d19c46d18 update changelog 2022-06-24 09:09:20 -04:00
Cory LaViska
c05832db67 Merge branch 'PavelDymkov-tabbable-fix' into next 2022-06-24 09:03:55 -04:00
Cory LaViska
e76dbef5f5 Merge branch 'tabbable-fix' of github.com:PavelDymkov/shoelace into PavelDymkov-tabbable-fix 2022-06-24 09:01:39 -04:00
Cory LaViska
25c00c80b7 fix label color 2022-06-24 08:46:44 -04:00
Pavel Dymkov
012206e4d8 Algorithm fix: fill "allElements" with only unique elements to improve performance. 2022-06-24 15:37:38 +03:00
Cory LaViska
de9da437f1 fix password autocomplete/correct/capitalize 2022-06-24 08:36:51 -04:00
Cory LaViska
153fe15ed3 fix label alignment 2022-06-24 08:22:13 -04:00
Cory LaViska
b58374aff1 fixes #798 2022-06-23 16:57:30 -04:00
Cory LaViska
31ae084538 fixes #797 2022-06-23 16:34:59 -04:00
Cory LaViska
f980126e81 fixes #796 2022-06-22 09:18:34 -04:00
Cory LaViska
cb1ada1bd7 Merge branch 'Buni48-next' into next 2022-06-22 09:03:10 -04:00
Cory LaViska
200d340123 Merge branch 'next' of github.com:Buni48/shoelace into Buni48-next 2022-06-22 08:57:36 -04:00
Buni48
5c2f4dd84e Revert "Fixes #791"
This reverts commit 1c23daa3b1.
2022-06-21 17:26:13 +02:00
Buni48
953d175b44 Revert "fixed typescript error"
This reverts commit 9549539f5d.
2022-06-21 17:25:13 +02:00
Buni48
f52a463728 merge next 2022-06-21 17:21:54 +02:00
Cory LaViska
5f25049abc fixes #791 2022-06-21 09:53:48 -04:00
Cory LaViska
8edaf67197 add checked-icon part 2022-06-21 09:37:16 -04:00
Cory LaViska
41c1979283 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-06-21 09:21:41 -04:00
Cory LaViska
9840891cdc update changelog 2022-06-21 09:21:36 -04:00
Cory LaViska
7d22e18bfb reflect fieldset and add required 2022-06-21 09:21:33 -04:00
Cory LaViska
07af6f2741 whitespace 2022-06-21 09:21:11 -04:00
Cory LaViska
60d9819088 add required symbol 2022-06-21 09:20:58 -04:00
Buni48
9549539f5d fixed typescript error 2022-06-19 19:40:50 +02:00
Buni48
1c23daa3b1 Fixes #791 2022-06-19 18:37:38 +02:00
Buni48
4a6c37ae0c Fixes #793 2022-06-19 18:22:52 +02:00
Oliver Salzburg
f1bfd58dd2 chore: Add missing colons (#792) 2022-06-18 17:13:03 -04:00
Cory LaViska
4446814114 2.0.0-beta.76 2022-06-15 09:27:32 -04:00
Cory LaViska
1ae6236e90 update version 2022-06-15 09:27:17 -04:00
Cory LaViska
624a8bbe71 fixes #777 2022-06-15 09:12:01 -04:00
Cory LaViska
ca876b291a revert formdata event detection 2022-06-10 17:22:34 -04:00
Cory LaViska
c850a7eae1 improve formdata event detection 2022-06-10 16:52:31 -04:00
Cory LaViska
5613a3cef3 upgrade localization lib 2022-06-10 16:37:10 -04:00
Cory LaViska
d3b161fc25 fix border bug 2022-06-10 09:44:27 -04:00
Cory LaViska
7659e45cc1 fix border bug 2022-06-10 09:44:22 -04:00
Cory LaViska
8a28d66393 fixes #784 2022-06-09 18:14:38 -04:00
Cory LaViska
c8d92e41b2 add link 2022-06-09 17:22:25 -04:00
Cory LaViska
9b39c90849 improve toast stack RTL styles 2022-06-09 17:21:44 -04:00
Cory LaViska
5c8a34696e revert dir 2022-06-09 09:24:11 -04:00
Cory LaViska
3e5da7c25a fixes #783 2022-06-09 09:23:33 -04:00
Cory LaViska
b1e6770712 2.0.0-beta.75 2022-06-08 17:24:52 -04:00
Cory LaViska
fd49fd6456 update version 2022-06-08 17:24:18 -04:00
Cory LaViska
d0ff2fef35 fix RTL in breadcrumb, tab group, and split panel 2022-06-08 17:15:40 -04:00
Cory LaViska
4c3313e275 improve badge RTL styles 2022-06-07 13:27:42 -04:00
Cory LaViska
4e0bc36b02 improve RTL in rating 2022-06-07 13:09:14 -04:00
Cory LaViska
01eb84e3a6 fix indeterminate state in RTL 2022-06-07 10:37:33 -04:00
Cory LaViska
70c97e2ae4 add --track-width; fix rtl 2022-06-07 10:26:04 -04:00
Cory LaViska
c165c8e71f update localize 2022-06-07 10:04:06 -04:00
Cory LaViska
6dd9773f2c update Floating UI 2022-06-07 09:27:15 -04:00
Cory LaViska
15dbb0a634 defer dom parser instantiation 2022-06-07 09:08:54 -04:00
Cory LaViska
ce09ac2a92 update base path 2022-06-07 08:59:29 -04:00
Cory LaViska
425f936254 fixes #781 2022-06-06 17:14:50 -04:00
Cory LaViska
7a9e4b0e8f fixes #776 2022-06-06 17:01:27 -04:00
xdev1
48f10011e1 Fixed translations for 'de' and 'de-CH' (#779) 2022-06-06 11:07:53 -04:00
Cory LaViska
f6d3f799dd update localize and fix range RTL 2022-06-06 10:57:59 -04:00
Cory LaViska
2157f4a385 update changelog 2022-06-02 08:17:12 -04:00
S. MohammadMahdi Zamanian
0f76d05546 add Persian translation
* feat: fa translate

* fix: fa localize name
2022-06-02 08:16:11 -04:00
Cory LaViska
293f49e178 fixes #775 2022-06-02 08:11:51 -04:00
Cory LaViska
4d2de2dd57 fixes #775 2022-06-02 08:10:46 -04:00
Cory LaViska
46dc965cd0 update changelog 2022-06-01 10:18:25 -04:00
Cory LaViska
707aeb6d65 revert button group RTL styles due to breakage 2022-06-01 10:17:36 -04:00
Godgiven
96c63c60a2 refactor: changed style to minimum support of RTL language (#768) 2022-06-01 10:00:46 -04:00
Cory LaViska
9539123fc3 improve image comparer icon 2022-06-01 09:36:16 -04:00
Cory LaViska
ea07346ae6 change weakmap name 2022-06-01 09:27:16 -04:00
Cory LaViska
af1e440103 fixes #772 2022-06-01 09:23:06 -04:00
Cory LaViska
0cea7d23f0 run prettier 2022-06-01 08:15:36 -04:00
Corbin Crutchley
ea8c88a31a docs: Update NextJS guide with ESM instructions (#771) 2022-06-01 07:43:39 -04:00
Cory LaViska
b4e5544ff8 fixes #767 2022-05-31 08:41:06 -04:00
Cory LaViska
04d534cd30 fixes #766 2022-05-31 08:31:41 -04:00
Cory LaViska
7cb247976f 2.0.0-beta.74 2022-05-27 15:06:45 -04:00
Cory LaViska
3cbf9e14e6 update version 2022-05-27 15:04:00 -04:00
Majid Valipour
3bd6516440 Fix broken link design tokens in docs (#733)
`light.styles.ts` no longer exists and has been replaced with `light.css`
2022-05-27 14:44:55 -04:00
Cory LaViska
e3f691fbda remove variant 2022-05-27 14:38:42 -04:00
Cory LaViska
ae76bea220 improve code block hover styles 2022-05-27 14:38:30 -04:00
Cory LaViska
ca81a507b6 rework focus rings 2022-05-27 10:13:51 -04:00
Cory LaViska
3f2382cfdc update vue instructions 2022-05-27 09:45:14 -04:00
Oleg Voronkovich
c1ccae315f Add instructions for Vue 3 (#756) 2022-05-27 09:41:47 -04:00
Cory LaViska
92cb4e3d29 move warning 2022-05-27 08:29:03 -04:00
Cory LaViska
9dd8c45c57 update deps 2022-05-27 08:23:02 -04:00
Cory LaViska
fa84a84a40 fixes #764 2022-05-27 08:15:31 -04:00
Cory LaViska
9e747e7c2e fixes #765 2022-05-27 07:43:42 -04:00
Cory LaViska
79306e0618 use HSB grid for color picker; fixes #762 2022-05-26 17:01:29 -04:00
Cory LaViska
139073dc3e fix word 2022-05-26 07:42:27 -04:00
Cory LaViska
18d441ef2e cache menu items 2022-05-25 09:53:19 -04:00
Cory LaViska
e07058ef5a add tablericons 2022-05-25 09:27:20 -04:00
Cory LaViska
f02941445b fixes #760 2022-05-25 08:56:22 -04:00
Cory LaViska
37b172dbfd fixes #758 2022-05-24 10:34:47 -04:00
Cory LaViska
4b2fc37015 update changelog 2022-05-24 09:00:34 -04:00
Cory LaViska
ae219c83fb fixes #743 2022-05-24 09:00:28 -04:00
Cory LaViska
e60c5c4546 update eslint 2022-05-24 08:12:13 -04:00
Cory LaViska
f57adb33eb update deps 2022-05-24 07:54:33 -04:00
Alan Chambers
25821c1294 Added datetime-local as valid sl-input type (#753) 2022-05-11 15:54:37 -04:00
Cory LaViska
8904e9d709 #744 2022-05-11 10:48:06 -04:00
Cory LaViska
35885ef59f fixes #744 2022-05-11 10:34:40 -04:00
Cory LaViska
c19eb5847a #751 2022-05-11 10:16:37 -04:00
Pavel Dymkov
c591f1d23e Fix error when set null or undefined to SlInput.value (#751) 2022-05-11 10:14:54 -04:00
Cory LaViska
fd1f76169a update changelog 2022-05-11 08:34:19 -04:00
Buni48
8814746738 Prevent toggling password & clearing on disabled form controls (#746)
* prevent toggling password & clearing on disabled form controls

* hide clear icon also on readonly
2022-05-11 08:33:27 -04:00
Cory LaViska
7bb6c4f0c1 update message 2022-05-11 08:27:00 -04:00
Cory LaViska
6c14282223 add base path note 2022-05-11 08:25:27 -04:00
Cory LaViska
7333760ada ignore polyfill types 2022-05-11 08:17:27 -04:00
Cory LaViska
cb0b5feef8 prettier 2022-05-11 08:12:02 -04:00
Cory LaViska
01369464fa Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-05-11 08:10:57 -04:00
Cory LaViska
c2ceaa9a3f update changelog 2022-05-11 08:10:56 -04:00
Cory LaViska
36716508c3 fix test type 2022-05-11 08:10:47 -04:00
Jared White
d683a76a49 Ensure FormDataPolyfill arg is optional (#749)
Fixes #747
2022-05-11 08:08:53 -04:00
Cory LaViska
4a0f6ef8af reflect disabled in dropdown 2022-05-02 16:33:30 -04:00
Cory LaViska
92b735b7fa update changelog 2022-05-02 16:28:21 -04:00
Buni48
240db01e75 reflecting name and library in sl-icon (#742) 2022-05-02 16:26:37 -04:00
Cory LaViska
04bacccfea use forEach instead of map; fixes #740 2022-05-02 07:48:43 -04:00
Cory LaViska
25b6e8c2d7 fix typo 2022-05-02 07:48:25 -04:00
Cory LaViska
1e2ceb8252 prettier 2022-04-26 08:13:13 -04:00
Buni48
329a5aec32 added time as valid sl-input type (#736) 2022-04-26 08:09:54 -04:00
Cory LaViska
c86ae623cb fixes #732 2022-04-25 08:00:16 -04:00
Cory LaViska
ce8dbc4302 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-04-19 09:30:20 -04:00
Cory LaViska
72972c76af fixes #730 2022-04-19 09:30:17 -04:00
modmuss50
d55813fffb Fix placeholder capitalisation (#731) 2022-04-19 08:55:00 -04:00
Cory LaViska
1f92e96079 add comma dangle rule 2022-04-15 09:28:09 -04:00
Cory LaViska
2cb3c1fc9f add env 2022-04-15 09:26:36 -04:00
Cory LaViska
caaf2b0d1e fixes #729 2022-04-14 18:01:25 -04:00
Cory LaViska
a635e4cd30 gtfo 2022-04-14 17:33:32 -04:00
Cory LaViska
aa336fb525 make touchstart passive 2022-04-14 16:58:08 -04:00
Cory LaViska
c0dc08116c remove unnecessary bind 2022-04-14 15:28:43 -04:00
Cory LaViska
a5b3334222 remove rules 2022-04-13 10:59:24 -04:00
Cory LaViska
8fd2491b9c use visually hidden tag 2022-04-13 10:29:27 -04:00
Cory LaViska
deea93acad 2.0.0-beta.73 2022-04-13 10:12:04 -04:00
Cory LaViska
ba92feee4a update version 2022-04-13 10:11:34 -04:00
Cory LaViska
e6458c26d6 fixes #727 2022-04-13 09:39:29 -04:00
Cory LaViska
4befbfafc5 improve tooltip a11y; #219 2022-04-13 09:02:23 -04:00
Cory LaViska
fc938ea3eb improve form control listeners 2022-04-11 10:36:16 -04:00
Cory LaViska
5e444a4f7c don't skip 2022-04-11 10:23:03 -04:00
Cory LaViska
1250627862 remove fix 2022-04-08 11:03:44 -04:00
Cory LaViska
a588bdc7b3 fix examples for codepen 2022-04-08 10:53:00 -04:00
Cory LaViska
44a4d13bad update note 2022-04-08 10:39:27 -04:00
Cory LaViska
7467806969 revert capturing due to inconsistent behavior; #718 2022-04-08 10:25:43 -04:00
Cory LaViska
9f844a8b91 fixes #718 2022-04-08 10:14:59 -04:00
Cory LaViska
83435a47de fixes #726 2022-04-08 08:56:05 -04:00
Cory LaViska
33612590ed fixes #720 2022-04-08 08:52:20 -04:00
James Garbutt
7475e9576c test: add image-comparer tests (#722) 2022-04-07 07:25:05 -04:00
James Garbutt
56d114f13d test: add tab tests (#724) 2022-04-07 07:24:59 -04:00
James Garbutt
50f702e9f1 test: add checkbox tests (#723) 2022-04-07 07:24:48 -04:00
Cory LaViska
43a361a52d update changelog 2022-04-06 10:12:06 -04:00
Cory LaViska
85976a1f35 use sendKeys/sendMouse 2022-04-06 09:48:54 -04:00
Cory LaViska
167cc6862a Merge branch '43081j-dropdown-without-menu' into next 2022-04-06 09:14:35 -04:00
Cory LaViska
5ca57e4110 Merge branch 'dropdown-without-menu' of https://github.com/43081j/shoelace into 43081j-dropdown-without-menu 2022-04-06 09:11:22 -04:00
Cory LaViska
988d09ed2a update test runner dep 2022-04-06 09:10:09 -04:00
Cory LaViska
bafa5fad54 stahp 2022-04-06 09:09:52 -04:00
43081j
a2e816253f fix (dropdown): tolerate dropdowns without menus 2022-04-05 20:08:54 +01:00
Cory LaViska
68603f9aed add enterkeyhint 2022-04-04 09:47:44 -04:00
Cory LaViska
46ac480713 update instructions 2022-03-30 09:13:49 -04:00
Cory LaViska
35cad794e9 update changelog 2022-03-30 09:07:51 -04:00
Cory LaViska
ee1a0c2c59 fixes #717 2022-03-30 09:05:19 -04:00
Cory LaViska
6f2ded4ce8 remove unused ts plugin 2022-03-28 09:03:19 -04:00
Cory LaViska
756b86a416 cycle through tabs/menu items 2022-03-24 08:50:44 -04:00
Cory LaViska
4b22fd2095 move to lint config 2022-03-24 08:23:58 -04:00
Cory LaViska
368854ba41 fix test 2022-03-24 08:17:28 -04:00
Cory LaViska
af4d25ee37 restore desired commits 2022-03-24 08:11:49 -04:00
Cory LaViska
cb460ee7ba test variants 2022-03-24 08:03:14 -04:00
Cory LaViska
300cbd090f revert path aliases 2022-03-24 08:01:09 -04:00
Cory LaViska
e32c15204c Revert recent changes 2022-03-24 07:48:03 -04:00
Cory LaViska
b8b68af316 update changelog 2022-03-23 17:38:07 -04:00
Cory LaViska
0a5fb5e9e7 refactor radio base class 2022-03-23 17:37:24 -04:00
Cory LaViska
99f475b56f remove comment 2022-03-23 17:37:11 -04:00
Cory LaViska
0b1ff75f1b add tests 2022-03-23 17:37:08 -04:00
Cory LaViska
ca653cd245 remove comment 2022-03-23 17:36:48 -04:00
Cory LaViska
84563bdcd4 update docs 2022-03-23 17:35:54 -04:00
Cory LaViska
49215503a6 add custom validity eexamples 2022-03-23 17:35:37 -04:00
Cory LaViska
9a8aafc189 remove tsconfig.prod 2022-03-23 17:35:11 -04:00
Cory LaViska
347808e86c test variants 2022-03-23 09:35:15 -04:00
Cory LaViska
f34960d82a revert path aliases since we can't override WTR's TS config 2022-03-23 09:30:39 -04:00
Cory LaViska
c6165ee502 pin TS 2022-03-22 11:11:10 -04:00
Cory LaViska
f676949460 remove unused import 2022-03-22 11:03:00 -04:00
Cory LaViska
73cfaee5ec fix typo 2022-03-22 10:59:20 -04:00
Cory LaViska
a6983d2d99 update styles 2022-03-22 10:56:34 -04:00
Cory LaViska
43e4a5b250 ts fixes 2022-03-22 10:32:39 -04:00
Cory LaViska
7b2c027c26 remove test 2022-03-22 10:32:28 -04:00
Michael Warren
e2069889b4 Icon and Icon-button tests (#706)
* initial button tests and setup helpers

* fix as many linting errors as I could

* switch back to regular fixtures

* test(button|button-group|divider|format-bytes) add tests for more components

* add tests for format util components

* finish format-number tests

* remove unnecessary ignore

* test(icon|icon-button) add tests for icon and icon-button

* chore(lint) fix linting issues

* chore(test) fix bad merge unintentional removes

* chore(test) remove unneded time el check

* chore(tests) fix PR comments

* chore(lint) lint rules

* chore(tests) fix missed accidental changes
2022-03-22 10:07:30 -04:00
Cory LaViska
499b3f1ff4 fixes #714 2022-03-21 08:51:41 -04:00
Cory LaViska
b4713f9bc6 fix typo 2022-03-20 09:18:32 -04:00
Cory LaViska
5132ee3559 fix react example 2022-03-19 18:24:37 -04:00
Cory LaViska
2a702d1cb5 add react example 2022-03-19 18:19:00 -04:00
Cory LaViska
23a4859e0e add color example 2022-03-19 18:14:37 -04:00
Cory LaViska
ae94aecdd7 2.0.0-beta.72 2022-03-18 17:34:05 -04:00
Cory LaViska
a6edf34a92 update changelog 2022-03-18 17:33:45 -04:00
Cory LaViska
c26b1335f5 refactor form control parts 2022-03-18 17:33:23 -04:00
Cory LaViska
fdeb7689d7 fixes #709 2022-03-18 16:02:58 -04:00
Cory LaViska
2d5e765193 add visually hidden dep 2022-03-18 15:58:35 -04:00
Cory LaViska
29d82736a7 update docs 2022-03-18 15:58:25 -04:00
Cory LaViska
e493c65b12 revert link cols 2022-03-17 10:53:03 -04:00
Cory LaViska
ada6f533b7 add label to color picker 2022-03-17 10:31:29 -04:00
Cory LaViska
5ea578b8c8 remove redundant attribs 2022-03-17 10:00:49 -04:00
Cory LaViska
67cb6abe56 update changelog 2022-03-17 09:49:49 -04:00
Cory LaViska
3ff6a02391 fix tag button 2022-03-17 09:48:08 -04:00
Cory LaViska
dde83e7f67 update images 2022-03-17 09:47:25 -04:00
Cory LaViska
fe527ff5dd Revert "improve constrast to meet AA standard"
This reverts commit ad0ac34f9d.
2022-03-17 08:33:11 -04:00
Cory LaViska
4f99bbace9 fix tests 2022-03-16 17:52:30 -04:00
Cory LaViska
ad0ac34f9d improve constrast to meet AA standard 2022-03-16 17:45:06 -04:00
Cory LaViska
ba3306b497 improve accessibility in various examples 2022-03-16 17:44:40 -04:00
Cory LaViska
7ff8b34e80 fix accessible trigger 2022-03-16 17:40:31 -04:00
Cory LaViska
fc4b1464b9 use time element in output 2022-03-16 17:40:08 -04:00
Cory LaViska
485347e20b use class for selector 2022-03-16 17:39:53 -04:00
Cory LaViska
34676105a1 hide helper buttons from readers 2022-03-16 17:39:39 -04:00
Cory LaViska
339eacb01f remove unused stylesheet 2022-03-16 17:39:09 -04:00
Cory LaViska
27a047976b fix disable aria 2022-03-16 17:38:58 -04:00
Cory LaViska
3289129782 ignore visually hidden when detecting slots 2022-03-16 17:37:42 -04:00
Cory LaViska
afa715c860 improve docs search a11y 2022-03-16 17:36:39 -04:00
Cory LaViska
ae0eddfb25 fix docs 2022-03-16 10:42:01 -04:00
Cory LaViska
13b2f8018d remove sl-error payload 2022-03-16 09:04:35 -04:00
Cory LaViska
eb66ce2d4b add watch flag to test:component 2022-03-16 08:57:25 -04:00
Cory LaViska
ad16b0b5a6 fix docs 2022-03-15 18:06:01 -04:00
Cory LaViska
c81f519b7c improve constrast in the docs 2022-03-15 18:01:01 -04:00
Cory LaViska
6450c0bee6 add radio button; refactor radio group 2022-03-15 17:42:59 -04:00
Cory LaViska
87d1db760f improve search results 2022-03-15 08:56:08 -04:00
Cory LaViska
1c903f4d26 refactor radio logic 2022-03-14 17:47:02 -04:00
Cory LaViska
b84a8bc76a fixes #704 2022-03-14 10:11:55 -04:00
Cory LaViska
e77f059685 revert example 2022-03-14 09:05:26 -04:00
Cory LaViska
4e108d434a fix tagToTitle helper 2022-03-14 08:59:21 -04:00
Cory LaViska
0f626bebbf upgrade visually hidden 2022-03-14 08:50:25 -04:00
Cory LaViska
cff57b6562 fixes #703 2022-03-11 14:31:25 -05:00
Cory LaViska
5cb9212fa4 update examples 2022-03-11 11:40:34 -05:00
Cory LaViska
c2910d742a fix form submission 2022-03-11 11:28:34 -05:00
Cory LaViska
e8174f7462 group tests 2022-03-11 11:27:36 -05:00
Cory LaViska
f245d97fc0 fix types 2022-03-11 09:26:19 -05:00
Cory LaViska
469c03f5e7 prettier + tag fix 2022-03-11 09:14:17 -05:00
Michael Warren
3144c45688 Button tests (#667)
* initial button tests and setup helpers

* fix as many linting errors as I could

* switch back to regular fixtures

* test(button|button-group|divider|format-bytes) add tests for more components

* add tests for format util components

* finish format-number tests

* remove unnecessary ignore
2022-03-11 08:56:24 -05:00
Cory LaViska
99e746ba81 2.0.0-beta.71 2022-03-09 16:56:59 -05:00
Cory LaViska
7527b9f9b1 update version 2022-03-09 16:56:47 -05:00
Cory LaViska
5e6add724d fix home and end in dropdown 2022-03-09 16:07:11 -05:00
Cory LaViska
a5cd9a4968 refactor parts and exported parts 2022-03-09 15:54:18 -05:00
Cory LaViska
c5fe481c33 update template 2022-03-09 09:51:20 -05:00
Cory LaViska
38b0ace0ca remove comments 2022-03-09 09:20:22 -05:00
Cory LaViska
1819f38ccb fix import order 2022-03-09 09:18:43 -05:00
Cory LaViska
4834ecbddb remove borders 2022-03-09 09:05:55 -05:00
Cory LaViska
3aa5fdba55 improve form controls a11y; add tests 2022-03-08 17:34:17 -05:00
Cory LaViska
8ae987ea69 update typeToSelect arg 2022-03-04 10:12:05 -05:00
Cory LaViska
d77f543c8f fix menu styles 2022-03-04 10:08:59 -05:00
Cory LaViska
517415f743 menu improvements 2022-03-03 17:15:58 -05:00
Cory LaViska
b9770e7e73 replace popper with floating ui 2022-03-03 15:48:20 -05:00
Cory LaViska
93cb8a2411 update eslint sorting 2022-03-02 17:20:40 -05:00
Cory LaViska
4866d2d190 fix valueAsDate and valueAsNumber bug 2022-03-02 12:19:59 -05:00
Cory LaViska
80a9d05ff3 add prettier and eslint to markdown 2022-03-02 10:10:41 -05:00
Cory LaViska
1db7aa3f26 remove overflow hidden 2022-03-02 09:46:11 -05:00
Cory LaViska
ff1e11022d reintroduce path aliasing and fix autosort 2022-03-02 09:28:34 -05:00
Cory LaViska
b55bf31fdc remove import sorter 2022-03-01 18:06:11 -05:00
Cory LaViska
75c557ec63 add group test shortcut 2022-03-01 18:06:05 -05:00
Cory LaViska
2116ba19f6 ignore modifier keys when pressing enter 2022-03-01 10:34:59 -05:00
Cory LaViska
8b9375ea68 fixes #700 2022-03-01 10:24:57 -05:00
Cory LaViska
9a024c6146 update docs 2022-03-01 09:32:01 -05:00
Cory LaViska
642de684e8 fixes #699 2022-02-28 09:59:32 -05:00
Cory LaViska
eb18d759f1 fixes #693 2022-02-27 11:46:55 -05:00
Cory LaViska
3fa41ea8d9 revert path aliasing and update import orders 2022-02-26 10:48:56 -05:00
Cory LaViska
1147d6ba4a add descriptions 2022-02-26 10:46:25 -05:00
Cory LaViska
b0bebcd162 2.0.0-beta.70 2022-02-25 10:06:44 -05:00
Cory LaViska
12dedf2047 update changelog 2022-02-25 10:06:17 -05:00
Cory LaViska
9af8184221 update changelog 2022-02-25 09:18:46 -05:00
Cory LaViska
62eeb06abe remove ga 2022-02-25 09:13:26 -05:00
Cory LaViska
e60b5f670a update changelog 2022-02-22 09:12:43 -05:00
Cory LaViska
6b2e64ef96 update comment 2022-02-22 09:12:39 -05:00
Denis Korablev
d6bfc773de fix positioning of active tab indicator (#695) 2022-02-22 09:10:33 -05:00
Cory LaViska
a1e4b50b29 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2022-02-21 09:13:40 -05:00
Cory LaViska
38c8762f64 update changelog 2022-02-21 09:13:37 -05:00
Cory LaViska
ddd5b581fa update docs 2022-02-21 09:13:33 -05:00
Patrick Nærvig Wøhlk
e2afe4b787 Add danish translation (#690) 2022-02-21 09:12:15 -05:00
Buni48
b24ff33fe0 Added placement property to sl-select (#687)
* added placement to sl-select

* sl-select placement: just allow top and bottom
2022-02-21 09:04:21 -05:00
Cory LaViska
0922ee202a update docs 2022-02-20 21:43:45 -05:00
Cory LaViska
946fcf2b25 add support for autofocus in dialog/drawer 2022-02-20 21:38:45 -05:00
Cory LaViska
a517a8038f fixes #688 2022-02-20 21:18:26 -05:00
Cory LaViska
faca17ff78 remove preventScroll option in fallback conditional 2022-02-20 21:05:07 -05:00
Cory LaViska
d4e6126ec3 fix changelog 2022-02-19 13:49:45 -05:00
Cory LaViska
5c0da06d66 add parts to select 2022-02-19 12:47:13 -05:00
Cory LaViska
0d3bcb0b2c improve tag remove button 2022-02-19 12:23:16 -05:00
Cory LaViska
e0ab8fc8e2 fixes #684 2022-02-19 11:56:16 -05:00
Cory LaViska
011f12a7e4 fixes #684 2022-02-19 11:56:09 -05:00
Cory LaViska
f7f146df04 2.0.0-beta.69 2022-02-16 16:15:08 -05:00
Cory LaViska
803a6d8a25 bump version 2022-02-16 16:14:51 -05:00
Cory LaViska
fa907a7f2b update deps + changelog 2022-02-16 16:13:54 -05:00
Cory LaViska
033a3a9db9 finishing touches 2022-02-16 16:02:21 -05:00
Matthias Guth
4a0dbde6b7 Customelements to webtypes (#681)
* (feat) generate web-types.json

* (feat) added doc ref

Co-authored-by: Matthias Guth <matthias.guth@vitagroup.ag>
2022-02-16 15:51:44 -05:00
Cory LaViska
e41e08f2af remove unused helper 2022-02-15 08:23:33 -05:00
Cory LaViska
c738f715a3 fixes #674 2022-02-14 18:15:45 -05:00
Cory LaViska
0d2572d37d updated changelog 2022-02-14 11:10:20 -05:00
Jake Patterson
a0df846493 issue 662 (#672) 2022-02-14 11:08:26 -05:00
Cory LaViska
01a6d60890 update changelog 2022-02-13 16:53:19 -05:00
Cory LaViska
8721999a22 fix typo 2022-02-13 16:53:13 -05:00
Jake Patterson
2b505466ce fix: tab group indicator offset when element is animated (#671)
* fix issue 622

* run prettier
2022-02-13 16:50:11 -05:00
Cory LaViska
17627d0775 update docs 2022-02-12 13:46:27 -05:00
Cory LaViska
0f87fb86a9 improve up/down logic in dropdown 2022-02-12 13:37:55 -05:00
Cory LaViska
f438f5252e 2.0.0-beta.68 2022-02-12 12:33:49 -05:00
Cory LaViska
a7291046a6 update changelog 2022-02-12 12:29:12 -05:00
Cory LaViska
9e15209161 Merge branch 'CreativeTechGuy-typescript-transform-paths' into next 2022-02-12 12:25:51 -05:00
Jason O'Neill
aed26b526a fix typescript path alias in declarations 2022-02-11 10:12:49 -08:00
Cory LaViska
da5b7afa58 2.0.0-beta.67 2022-02-11 08:26:35 -05:00
Cory LaViska
c271b07476 fix build 2022-02-11 08:25:11 -05:00
Cory LaViska
6b428c1ea9 revert param 2022-02-11 08:03:41 -05:00
Cory LaViska
5641ba4a14 update scripts 2022-02-11 08:00:09 -05:00
Cory LaViska
461c7099ed fix tsc param 2022-02-11 07:58:54 -05:00
Cory LaViska
81871868c4 2.0.0-beta.66 2022-02-10 17:48:58 -05:00
Cory LaViska
191a835d9f update changelog 2022-02-10 17:43:18 -05:00
Cory LaViska
0d7aabe920 fix indentation 2022-02-10 17:42:41 -05:00
Cory LaViska
1b8b7823c2 log tsc 2022-02-10 16:41:20 -05:00
Cory LaViska
75ca306959 2.0.0-beta.65 2022-02-10 10:35:15 -05:00
Cory LaViska
37994de120 update changelog 2022-02-10 10:34:45 -05:00
Cory LaViska
3e35b0f7c6 add source to dialog/drawer event 2022-02-10 10:34:22 -05:00
Cory LaViska
f555a3323e update bootstrap-icons 2022-02-10 09:02:48 -05:00
Cory LaViska
a57526a0ff fixes #666 2022-02-10 08:56:41 -05:00
Cory LaViska
68001b00f3 update changelog 2022-02-07 08:52:32 -05:00
Buni48
7fbc248aa7 added spacing css custom property to docs (#664) 2022-02-07 08:50:46 -05:00
Cory LaViska
ec63d4c528 improve search results 2022-02-04 09:37:57 -05:00
Cory LaViska
c368af633c use event.reactName 2022-02-04 09:28:35 -05:00
Cory LaViska
486fe1dfc4 ignore empty values 2022-02-03 17:12:25 -05:00
Cory LaViska
271ae9a36a add display-label part 2022-02-03 08:31:52 -05:00
Cory LaViska
18513724a0 update cloud dev options 2022-02-01 17:04:07 -05:00
Ofer Shaal
9cfb652b29 Adding Gitpod support (#661)
* Adding Gitpod setup

* remove specifying vscode extensions in gitpod

* Allow ports 4000-4999

* Make local dev env instructions the first option
2022-02-01 16:53:49 -05:00
Cory LaViska
fbec7bd360 fix disabled screen reader bug; closes #658 2022-02-01 09:19:25 -05:00
Cory LaViska
401aba407c update icons + deps 2022-02-01 09:16:38 -05:00
Cory LaViska
c9f14d7f58 exclude styles from manifest 2022-01-31 14:41:18 -05:00
Cory LaViska
aa7e32f81d fix link 2022-01-31 10:55:19 -05:00
Cory LaViska
6ab6ac81aa stop breaking when cspell is updated through the "quick fix" UI 2022-01-31 10:50:25 -05:00
Cory LaViska
f13672776a don't break build on spelling errors 2022-01-31 10:46:29 -05:00
Cory LaViska
13b299a3aa add word 2022-01-31 10:46:22 -05:00
Cory LaViska
7a764f51ec feather => lucide 2022-01-31 10:42:11 -05:00
Cory LaViska
71a93409fe prettier 2022-01-27 09:00:06 -05:00
Cory LaViska
f70961e67d refactor format-bytes to use Intl 2022-01-27 08:56:51 -05:00
Cory LaViska
8194d627ee Update deps 2022-01-26 09:36:07 -05:00
Cory LaViska
4e9573334a fix outdir bug 2022-01-26 08:46:20 -05:00
Cory LaViska
74cc1296c8 add word 2022-01-25 17:32:38 -05:00
Cory LaViska
4adcb8c938 fixes #571 2022-01-25 17:09:53 -05:00
Cory LaViska
4fdc5aa55f improve dialog/drawer a11y 2022-01-24 17:27:24 -05:00
Cory LaViska
fd43cb4fd7 fixes #656 2022-01-24 08:32:05 -05:00
Cory LaViska
e08236eaff restore spinner animation 2022-01-20 08:53:34 -05:00
Cory LaViska
27b5e3daa7 fix typo 2022-01-19 10:10:30 -05:00
Cory LaViska
955d3f9dd5 fix broken tabs 2022-01-19 10:01:22 -05:00
Cory LaViska
557d973ba4 revert rules 2022-01-19 09:37:07 -05:00
Cory LaViska
b9bf8887dc Merge branch 'CreativeTechGuy-bs-auto-sync' into next 2022-01-19 08:40:01 -05:00
Cory LaViska
5995258c5e Add whitespace 2022-01-19 08:39:48 -05:00
Jason O'Neill
2f46b6f507 dev: start BrowserSync timeout after server init 2022-01-18 15:11:00 -08:00
Jason O'Neill
dbb4be7cfa dev: reuse existing browser tab for dev server 2022-01-18 15:11:00 -08:00
Cory LaViska
a6a8da5aa4 update min node version 2022-01-18 09:23:48 -05:00
Cory LaViska
86706f31c6 Merge branch 'CreativeTechGuy-eslint-ts-a11y' into next 2022-01-18 09:22:28 -05:00
Cory LaViska
59ba63f875 Merge branch 'eslint-ts-a11y' of https://github.com/CreativeTechGuy/shoelace into CreativeTechGuy-eslint-ts-a11y 2022-01-18 08:58:14 -05:00
Cory LaViska
52933a528b Add note about setting multiselect values 2022-01-18 08:50:14 -05:00
Jason O'Neill
0330498bbb eslint: enable one-liner functions, dangling promises 2022-01-16 20:44:10 -08:00
Jason O'Neill
837dac17ea restore fsevents to package-lock.json 2022-01-15 23:19:04 -08:00
Jason O'Neill
9fb3b5cfed feat: add ESLint, improve types, improve a11y 2022-01-15 21:47:14 -08:00
Cory LaViska
2ad00deb38 2.0.0-beta.64 2022-01-11 09:47:00 -05:00
Cory LaViska
8fb8a5002d update 2022-01-11 09:46:23 -05:00
Cory LaViska
af9ee948ef update 2022-01-11 09:41:36 -05:00
Konnor Rogers
9eb76fe470 Fix: filled inputs looked bizarre with autofill. (#644)
* Update input.styles.ts

* Update input.styles.ts
2022-01-11 09:35:28 -05:00
Cory LaViska
6d766a8ce9 remove dead link 2022-01-11 09:30:15 -05:00
Cory LaViska
33afecf7da support for <form> elements; remove <sl-form> 2022-01-11 09:18:20 -05:00
Cory LaViska
938c7d2437 update lit 2022-01-06 09:11:28 -05:00
Cory LaViska
c3bee5e725 simplify HasSlotController args 2022-01-06 09:04:02 -05:00
Cory LaViska
bb46282b91 add min node version 2022-01-06 08:50:45 -05:00
Jason O'Neill
ca346ccbb2 update dependencies, cleanup, refine (#642)
* update dependencies, cleanup, refine

fixes #637

* update CI command to verify
2022-01-06 08:44:13 -05:00
Cory LaViska
46f05224ab use reactive controller for slot detection 2022-01-05 18:31:41 -05:00
Cory LaViska
1e3bac6031 trim whitespace 2022-01-05 18:26:39 -05:00
Cory LaViska
3f90a3f49d fix search suffix position in docs 2022-01-05 11:06:13 -05:00
Cory LaViska
099dea886f add start, end, panel parts to split panel 2022-01-05 11:02:39 -05:00
Cory LaViska
d4d253284d add start, end, panel parts to split panel 2022-01-05 11:02:14 -05:00
Jason O'Neill
d6e15f985c add cspell and fix typos
fixes 636
2021-12-31 17:39:16 -08:00
Cory LaViska
c1b0497624 add valueAsDate & valueAsNumber to input; fixes #570 2021-12-31 12:30:54 -05:00
Cory LaViska
f25e4827a2 remove the offending test 2021-12-31 11:25:49 -05:00
Cory LaViska
5d57a51618 fix test 2021-12-31 11:20:40 -05:00
Cory LaViska
d803ffcf95 update alt attrib 2021-12-31 11:18:44 -05:00
Cory LaViska
4de5f180b6 fix test 2021-12-31 11:05:55 -05:00
Cory LaViska
2bad321397 change alt to label 2021-12-31 11:02:27 -05:00
Cory LaViska
ab37cc9661 center icons 2021-12-31 10:53:38 -05:00
Cory LaViska
a9a5166da7 improve focus when clicking edge 2021-12-31 10:53:06 -05:00
Cory LaViska
5723ea3f8b api improvements 2021-12-30 18:14:07 -05:00
Cory LaViska
2daea0836a update tooltip 2021-12-30 18:12:29 -05:00
Cory LaViska
e05c66a973 show defaults 2021-12-30 18:11:07 -05:00
Cory LaViska
0295d9c573 fixes #596; improves radio a11y 2021-12-30 16:32:57 -05:00
Cory LaViska
d60e9f3bc2 remove unused var 2021-12-30 16:16:19 -05:00
Cory LaViska
d71d35b258 move init logic to connectedCallback 2021-12-30 13:09:50 -05:00
Cory LaViska
9988d76c3f fix ids 2021-12-30 12:14:39 -05:00
Cory LaViska
f55d0a67d9 update usage 2021-12-30 11:12:00 -05:00
Cory LaViska
171adf7310 add loading section 2021-12-29 11:16:33 -05:00
Cory LaViska
03a9890781 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-12-29 09:31:25 -05:00
Cory LaViska
bf2d7b9d92 fix typo 2021-12-28 10:24:26 -05:00
Cory LaViska
05da17e9cb Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-12-28 09:20:20 -05:00
David Gonzalez
f653f643f7 refactor(image-comparer): remove unused Y position (#635) 2021-12-28 09:20:13 -05:00
Cory LaViska
d742ea6efc remove relative positioning 2021-12-27 14:05:25 -05:00
Cory LaViska
1fb1103e2d fix examples 2021-12-27 14:04:31 -05:00
Cory LaViska
baea8b62be add react examples 2021-12-27 14:04:20 -05:00
Cory LaViska
fe3dd76f68 fix typo 2021-12-27 12:55:31 -05:00
Cory LaViska
6af6e9c2c0 fix test 2021-12-27 12:45:24 -05:00
Cory LaViska
707bfb9c78 fixes #633 2021-12-27 12:40:30 -05:00
Cory LaViska
316087d18c remove unnecessary calc() 2021-12-27 11:37:40 -05:00
Cory LaViska
46c538dffb revert logic 2021-12-27 10:31:57 -05:00
David Gonzalez
218f6cb8d1 fix(split-panel): add missing keys (#629)
* fix(split-panel): add missing keys

* feat(split-panel): improve handleKeyDown algorithm
2021-12-27 10:22:59 -05:00
Cory LaViska
05f6c7656c 2.0.0-beta.63 2021-12-23 12:02:03 -05:00
Cory LaViska
3534ae910e update version 2021-12-23 12:01:36 -05:00
Cory LaViska
dd65778017 fixes #626 2021-12-23 11:53:37 -05:00
Cory LaViska
67f3a4b164 reorder 2021-12-23 11:52:30 -05:00
Cory LaViska
fcf1fd9bec update docs 2021-12-23 11:39:25 -05:00
Cory LaViska
2ceccd201a almost 2021-12-23 11:23:14 -05:00
Cory LaViska
45edfeee2d update docs 2021-12-23 10:27:05 -05:00
Cory LaViska
2a6cf2aea2 refactor keyboard logic 2021-12-23 10:21:10 -05:00
Cory LaViska
8bb3e5d9c9 boom 2021-12-23 10:07:37 -05:00
Cory LaViska
d3ad2ec4f8 primary 2021-12-23 08:24:44 -05:00
Cory LaViska
a3ef96a799 all except min/max 2021-12-22 19:07:16 -05:00
Cory LaViska
a5b7f8fd6b rework 2021-12-22 18:32:27 -05:00
Cory LaViska
33accf65ef prefix light dom ids 2021-12-17 10:31:14 -05:00
Cory LaViska
e2012433cb add blur() 2021-12-17 09:27:23 -05:00
ErikOnBike
d6d05121e4 Add focus method to SlSelect (#625) 2021-12-17 09:15:47 -05:00
Cory LaViska
125392ce57 simplify spinner animation 2021-12-14 13:34:06 -05:00
Cory LaViska
fb20155485 type => variant 2021-12-13 17:38:40 -05:00
Cory LaViska
1d44ee2f45 simplify divider API 2021-12-13 17:16:50 -05:00
Cory LaViska
2a6e91477a refactor button using static expressions 2021-12-13 16:56:03 -05:00
Cory LaViska
302f3b57c5 fix tooltip formatter in react@ext 2021-12-09 09:39:24 -05:00
Cory LaViska
7d818c0590 update icon count 2021-12-07 17:04:27 -05:00
Cory LaViska
ab77fca2f5 2.0.0-beta.62 2021-12-07 17:02:33 -05:00
Cory LaViska
4d33e1388b update version 2021-12-07 17:02:08 -05:00
Cory LaViska
9bac03d2f3 update deps 2021-12-07 16:59:16 -05:00
Cory LaViska
68bb155793 fixes #602 2021-12-07 16:52:17 -05:00
Cory LaViska
2be6ec1711 test all three at once 2021-12-07 16:46:05 -05:00
Cory LaViska
27e254ac4d install playwright deps 2021-12-07 15:03:16 -05:00
Cory LaViska
a7a1fb45bb update localize 2021-12-07 14:27:45 -05:00
Cory LaViska
0732799ecb update localize 2021-12-07 14:11:00 -05:00
Cory LaViska
ea22ac6b37 update localize 2021-12-07 13:32:50 -05:00
Cory LaViska
aeacf40654 update changelog 2021-12-07 13:20:38 -05:00
Cory LaViska
f87cb8d940 use localize lib for utility components 2021-12-07 13:20:27 -05:00
Cory LaViska
f37907a55a add dutch to list 2021-12-07 13:18:37 -05:00
Cory LaViska
0538d5c0db update localize 2021-12-07 13:16:22 -05:00
Cory LaViska
9a84e126a1 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-12-07 12:28:56 -05:00
Jan van Hellemond
5ec633192f Added Dutch translation (#614) 2021-12-07 12:28:50 -05:00
Cory LaViska
7b87dc9d21 add he 2021-12-07 11:24:35 -05:00
Cory LaViska
35df355cc6 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-12-07 11:23:58 -05:00
Benny Powers
59830a4793 feat: hebrew translation (#613) 2021-12-07 11:13:20 -05:00
Cory LaViska
d685ce1e6e fix code 2021-12-07 10:51:27 -05:00
Cory LaViska
0eba0d4b4a add translations 2021-12-07 10:36:27 -05:00
Cory LaViska
b32d3e5c17 consistent name/code 2021-12-07 10:35:41 -05:00
Cory LaViska
d696f19764 fix quotes 2021-12-07 10:35:07 -05:00
Cory LaViska
1645c2103c Merge branch 'localize' of https://github.com/shoelace-style/shoelace into localize 2021-12-07 10:34:06 -05:00
Peter Siska
9dfac1dd6f Add FR translation (#612) 2021-12-07 10:34:01 -05:00
Peter Siska
2937dbfc3a Add de_CH translation (#611)
Region-specific translation for German (Switzerland). 

Initiated from here: https://github.com/shoelace-style/shoelace/pull/609#issuecomment-987711804
2021-12-07 10:32:56 -05:00
Cory LaViska
f3a1cf82ac add localization docs 2021-12-07 10:32:05 -05:00
Cory LaViska
84ae7d187b prettier 2021-12-07 10:07:02 -05:00
Cory LaViska
49ba670b36 no dash 2021-12-07 10:05:14 -05:00
Manuel Schmidt
78f9dcc68a Add german translation (#608)
* add german translation

* Update src/translations/de.ts

* Update src/translations/de.ts
2021-12-07 08:32:16 -05:00
Alan Dávalos
8258d84c23 Add Japanese translation (#606)
* add Japanese translation

* update label for Japanese
2021-12-07 08:20:23 -05:00
Max
a2a48415f7 Add portuguese translations (#605) 2021-12-07 08:19:11 -05:00
Denis Korablev
5539705bf3 add Russian translations (#607)
Co-authored-by: Denis Korablev <d.korablev@nominex.io>
2021-12-07 08:18:05 -05:00
Paweł Charasimiuk
1061873788 add Polish translation (#610) 2021-12-07 08:16:43 -05:00
Cory LaViska
a587c9523d run tests in chrome, firefox, and safari via playwright 2021-12-06 16:30:07 -05:00
Cory LaViska
eed18fba57 prettierrrr 2021-12-06 12:02:31 -05:00
Cory LaViska
df2158df0b update changelog 2021-12-06 12:02:04 -05:00
Cory LaViska
40ec49aeb9 improve term 2021-12-06 11:59:06 -05:00
Cory LaViska
4900bbf989 localize 2.0 2021-12-06 10:57:54 -05:00
Cory LaViska
3dc92ae8e8 fix switch tests 2021-12-03 15:04:26 -05:00
Cory LaViska
7255b0b30f locale => lang 2021-12-02 10:29:04 -05:00
Cory LaViska
b9b01d3816 "consistency is the key to success" 2021-12-01 17:40:58 -05:00
Cory LaViska
256103b02e whitespace + prettier 2021-11-29 09:55:31 -05:00
Mathias Picker
194c190519 Added check for PopperInstance before destroying it (#597) 2021-11-29 09:55:13 -05:00
Cory LaViska
8e5c258896 style fixes 2021-11-29 08:49:18 -05:00
Cory LaViska
fd375788f8 update color 2021-11-29 08:48:54 -05:00
Cory LaViska
d80fe902b3 fix lgtm warnings 2021-11-24 10:59:31 -05:00
Cory LaViska
4304d8badd fix tooltip positioning 2021-11-24 10:20:44 -05:00
Cory LaViska
ecdf507645 update wording 2021-11-24 10:12:42 -05:00
Cory LaViska
c4d271d767 fix base path examples 2021-11-24 10:03:38 -05:00
Cory LaViska
2dcd60efc4 fix focus 2021-11-24 09:54:58 -05:00
Cory LaViska
4251f2a7f7 fix search panel bg 2021-11-24 09:51:58 -05:00
Cory LaViska
4a58ad861c update wording 2021-11-24 09:04:49 -05:00
Cory LaViska
b87bbd569e less purple 2021-11-24 08:41:28 -05:00
Cory LaViska
11bad31b5f upgrade qr code to stable 2021-11-24 08:32:11 -05:00
Cory LaViska
d428ffe937 add color to images 2021-11-23 16:59:23 -05:00
Cory LaViska
4ff60abb93 fix wording 2021-11-23 16:58:24 -05:00
Cory LaViska
7a5a476ed1 fix input tokens 2021-11-23 16:58:11 -05:00
Cory LaViska
b47f3563de improve code contrast 2021-11-23 16:57:53 -05:00
Cory LaViska
a828addd28 fix instructions 2021-11-23 15:32:06 -05:00
Cory LaViska
93ce71acdd adjust color 2021-11-23 15:31:52 -05:00
Cory LaViska
a15ccfee1b Revert "Merge branch 'radio-group' of https://github.com/Trendy/shoelace into next"
This reverts commit e5cbee2770, reversing
changes made to 3897446cb7.
2021-11-23 11:05:04 -05:00
Cory LaViska
e5cbee2770 Merge branch 'radio-group' of https://github.com/Trendy/shoelace into next 2021-11-23 08:14:16 -05:00
Jeremiah Hoyet
e9f7c5ed5a Make the default the same as the getter default 2021-11-22 19:30:51 -05:00
Jeremiah Hoyet
3141590d28 Update react example 2021-11-22 19:27:12 -05:00
Jeremiah Hoyet
cfa800c1cd Fix getter 2021-11-22 19:18:07 -05:00
Jeremiah Hoyet
6eb79aacdb Review feedback updates 2021-11-22 18:58:43 -05:00
Jeremiah Hoyet
2ace7d4161 Update src/components/radio-group/radio-group.ts
Co-authored-by: Cory LaViska <cory@abeautifulsite.net>
2021-11-22 18:10:45 -05:00
Jeremiah Hoyet
b36d2edfde Clean up tests 2021-11-22 17:17:31 -05:00
Cory LaViska
3897446cb7 add visually hidden tests 2021-11-22 15:17:02 -05:00
Jeremiah Hoyet
d4c41a2b27 Move selection logic from radio to radio group 2021-11-22 14:46:10 -05:00
Jeremiah Hoyet
dfaabeead2 Clean up react example 2021-11-22 14:20:33 -05:00
Jeremiah Hoyet
989e368fb4 Remove required on sl-radio checks from sl-radio-group 2021-11-22 14:05:14 -05:00
Jeremiah Hoyet
0c6060eae7 Add required attribute to radio group and radio 2021-11-22 12:34:52 -05:00
Cory LaViska
8a766fe100 update changelog 2021-11-22 09:03:49 -05:00
Kazem Keshavarz
9afb32f526 Fix vscode custom data tag name (#593) 2021-11-22 08:40:23 -05:00
Cory LaViska
8ea8a20cc9 add dark mode to codepen 2021-11-22 08:32:53 -05:00
Cory LaViska
70f0c7d01e fix wording 2021-11-22 08:21:38 -05:00
Cory LaViska
f214f0f033 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-11-19 16:18:13 -05:00
Cory LaViska
37425db04d improve search selection colors 2021-11-19 16:12:39 -05:00
Cory LaViska
357909401d update theme docs 2021-11-19 12:32:52 -05:00
Cory LaViska
87286593cb 2.0.0-beta.61 2021-11-19 10:49:59 -05:00
Cory LaViska
2e1a74f79a update version 2021-11-19 10:48:58 -05:00
Cory LaViska
341ea70dbc add accessibility commitment 2021-11-19 10:42:59 -05:00
Cory LaViska
54e4c57ae5 fixes #591 2021-11-19 08:36:59 -05:00
Cory LaViska
9432ffebad reduce base lightness slightly 2021-11-19 08:26:03 -05:00
Cory LaViska
c748792f16 improve text contrast in doc 2021-11-19 08:19:23 -05:00
Cory LaViska
f1b304304c improve string colors 2021-11-18 18:00:19 -05:00
Cory LaViska
8532f7df26 make it stable 2021-11-18 17:46:37 -05:00
Cory LaViska
9cb3314494 improve dark theme and remove rgb() from tokens 2021-11-18 17:41:03 -05:00
Cory LaViska
cfc7b2ac93 fix button slots 2021-11-18 08:01:00 -05:00
Cory LaViska
2f2709abc6 remove unused function 2021-11-18 08:00:28 -05:00
Cory LaViska
8fd8087370 fix docs 2021-11-17 09:26:22 -05:00
Cory LaViska
d140dc2c71 prettier 2021-11-17 09:22:41 -05:00
Cory LaViska
1a4f330bd5 update bs icons 2021-11-17 09:12:34 -05:00
ErikOnBike
65a0125035 Remove duplicate values for autocapitalize (#590) 2021-11-17 08:24:36 -05:00
Cory LaViska
bfe506dbf3 add expanded support 2021-11-16 10:49:26 -05:00
Cory LaViska
da7a177599 add react examples 2021-11-16 10:09:31 -05:00
Cory LaViska
fe677f133b add visually hidden component 2021-11-16 09:31:38 -05:00
Cory LaViska
d6e4d2f24b add border to control button 2021-11-16 09:30:23 -05:00
Cory LaViska
a14642b62a don't guess labels 2021-11-16 09:19:49 -05:00
Cory LaViska
9d223067ae add contribution links 2021-11-16 09:19:34 -05:00
Cory LaViska
39009a6ee6 add script tag import 2021-11-15 17:43:13 -05:00
Cory LaViska
0ea16b1d97 update docs 2021-11-15 17:42:53 -05:00
Cory LaViska
977e9e0019 update form examples 2021-11-15 09:36:30 -05:00
Cory LaViska
e186db3b8e npm audit 2021-11-12 17:50:48 -05:00
Cory LaViska
0135a37af8 a11y improvements; fixes #579 2021-11-12 17:40:26 -05:00
Cory LaViska
a923d1effc remove unused styles 2021-11-12 12:03:19 -05:00
Cory LaViska
11f7bf2bb1 fix example 2021-11-12 12:01:04 -05:00
Cory LaViska
b336cdffe5 add testing info 2021-11-12 11:20:04 -05:00
Cory LaViska
f85b9e1b2b update framework pages 2021-11-12 10:31:13 -05:00
Cory LaViska
1422e3ffb7 update intro 2021-11-12 10:09:04 -05:00
Cory LaViska
b1a080cb91 fix incorrect aria-controls 2021-11-12 09:59:29 -05:00
Cory LaViska
59ad01c560 fix lit dep 2021-11-12 09:55:53 -05:00
Cory LaViska
a24eaa6693 remove redundant role 2021-11-12 09:50:50 -05:00
Cory LaViska
b98b10c580 faster animations 2021-11-12 09:43:02 -05:00
Marcel Kuhmann
2fca01401b allow query strings (#582) 2021-11-11 10:55:26 -05:00
Thomas Klemm
f20296cf7c Docs: Fix typo in React setup code sample (#580) 2021-11-07 07:11:33 -05:00
Cory LaViska
fe041c5e10 fix typo 2021-11-06 08:28:47 -04:00
Cory LaViska
ca44d23031 2.0.0-beta.60 2021-11-05 11:57:49 -04:00
Cory LaViska
18452f692c update version 2021-11-05 11:57:33 -04:00
Cory LaViska
6aca68824a fixes #578 2021-11-05 11:53:53 -04:00
Cory LaViska
7177b9bf82 update intro 2021-11-05 11:51:24 -04:00
Cory LaViska
5b6e24bd13 fix example 2021-11-05 11:51:12 -04:00
Cory LaViska
cc93108df0 less verbose 2021-11-05 11:50:59 -04:00
Cory LaViska
95041b75b0 add react examples 2021-11-05 11:50:46 -04:00
Cory LaViska
0929799daf fix style attrs 2021-11-05 11:26:09 -04:00
Cory LaViska
c771534c43 fix className 2021-11-05 10:06:06 -04:00
Cory LaViska
3ffbc09630 improve flavor logic 2021-11-05 09:47:43 -04:00
Cory LaViska
de4207940c add react event names to manifest 2021-11-05 09:23:30 -04:00
Cory LaViska
3eb7d6337a fix mutation observer in react 2021-11-05 09:22:59 -04:00
Cory LaViska
1dd556d6c8 react examples and fixes 2021-11-04 18:12:47 -04:00
Cory LaViska
a250d9b184 support react imports in examples; set base path 2021-11-04 08:12:01 -04:00
Cory LaViska
bb6cedfce4 2.0.0-beta.59 2021-11-04 07:27:30 -04:00
Cory LaViska
a4c9b9c8cf add react support into lib 2021-11-04 07:27:18 -04:00
Cory LaViska
c88ea6666b update react imports 2021-11-02 17:13:12 -04:00
Cory LaViska
5ecd73c599 update example 2021-11-02 16:54:17 -04:00
Cory LaViska
84739ba695 update clear icon 2021-11-02 16:52:31 -04:00
Cory LaViska
3bb1e9ff91 update bootstrap icons 2021-11-02 16:46:17 -04:00
Cory LaViska
fbd6691711 improve search panel color 2021-10-29 14:42:17 -04:00
Cory LaViska
aec17da6b0 improve trigger border color in dark mode 2021-10-29 14:35:57 -04:00
Cory LaViska
639533662d update changelog 2021-10-26 09:35:59 -04:00
Cory LaViska
a340ce4a68 document part 2021-10-26 09:35:46 -04:00
Cory LaViska
6e5fe64e8b add eye dropper 2021-10-26 09:35:07 -04:00
Cory LaViska
84bdbb84b8 update lit 2021-10-26 09:34:48 -04:00
Cory LaViska
f91ffb6cb4 fix border radius on single button groups 2021-10-26 09:34:33 -04:00
Cory LaViska
13815199a3 fix dark theme link 2021-10-22 10:57:07 -04:00
Cory LaViska
98c20ff551 2.0.0-beta.58 2021-10-22 10:52:27 -04:00
Cory LaViska
479b6b9081 bundle back up for now 2021-10-22 10:51:17 -04:00
Cory LaViska
c640d2ea77 add stack overflow section 2021-10-19 10:51:41 -04:00
Cory LaViska
715547d2fd update changelog 2021-10-19 09:56:41 -04:00
Cory LaViska
8a914a536b fix cssproperty docs 2021-10-19 09:56:28 -04:00
Cory LaViska
f56b6c0648 remove RAFs 2021-10-19 09:52:41 -04:00
Denis Korablev
25aa8318d9 fix(sl-range): add value change handler (#572) 2021-10-19 09:48:39 -04:00
Cory LaViska
72f2cbe9e8 fix aspect ratio bug 2021-10-19 09:43:16 -04:00
Cory LaViska
fc7836084a add tooltip guard 2021-10-18 17:54:29 -04:00
Cory LaViska
60d9d9202b update bootstrap-icons to 1.6.1 2021-10-18 17:07:52 -04:00
Cory LaViska
a9df468282 fixes #563 2021-10-18 17:07:07 -04:00
Yuki Nishijima
0bba773c3e Bring the divider back to the Shadow DOM (#568) 2021-10-18 09:14:13 -04:00
Cory LaViska
7be03ae623 fix metadata plugin 2021-10-18 08:58:50 -04:00
Cory LaViska
d4741532f5 fix build dir 2021-10-16 10:35:42 -04:00
Cory LaViska
10f31efefa fix comment parser 2021-10-16 10:28:51 -04:00
Cory LaViska
be662ddf32 add animated-image 2021-10-16 08:29:25 -04:00
Cory LaViska
ff84beaade use :enabled 2021-10-14 09:02:00 -04:00
Cory LaViska
8dba8fa5fb fix tooltip bug 2021-10-14 09:01:37 -04:00
Cory LaViska
3a3f5552a7 fix test:watch 2021-10-14 08:39:17 -04:00
Cory LaViska
88cba353c0 add labels examples 2021-10-14 08:34:54 -04:00
Cory LaViska
a2851370bb revert styles 2021-10-14 08:32:11 -04:00
Cory LaViska
7c0ef7dcf0 Merge branch 'christoshrousis-test/progress' into next 2021-10-14 08:25:42 -04:00
Cory LaViska
fb6d5d89b8 use label attrib 2021-10-14 08:24:38 -04:00
Cory LaViska
45ceff4c08 Merge branch 'test/progress' of https://github.com/christoshrousis/shoelace into christoshrousis-test/progress 2021-10-14 08:10:57 -04:00
Cory LaViska
6169abc700 update bootstrap icons 2021-10-14 07:21:27 -04:00
Cory LaViska
c09e12d13e 2.0.0-beta.57 2021-10-13 17:34:04 -04:00
Cory LaViska
6152e15e10 fix esm links 2021-10-13 17:30:13 -04:00
Cory LaViska
79910b2ae8 2.0.0-beta.56 2021-10-13 17:14:22 -04:00
Cory LaViska
c347df7c17 rework build to support bare specifiers 2021-10-13 17:12:50 -04:00
Cory LaViska
e9e2b35c59 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-10-13 08:30:16 -04:00
Denis Korablev
8ae753c396 feat: add hoist attribute for sl-tooltip (#565) 2021-10-13 08:29:38 -04:00
Cory LaViska
d2c94321f2 update docs 2021-10-12 10:26:26 -04:00
Yuki Nishijima
4c10f8a537 Update the CSS path in the Integrating with Rails (#561) 2021-10-11 08:25:09 -04:00
Christos Hrousis
9a19cc2173 revert: misunderstood part/slot definition. 2021-10-10 13:37:32 +11:00
Christos Hrousis
c4cbc894f5 revert: misunderstood part/slot definition. 2021-10-10 13:36:41 +11:00
Christos Hrousis
449f5e6c7f style: typo. 2021-10-10 13:24:28 +11:00
Christos Hrousis
34447a3f2f test: migrate progress-ring tests to progress-bar
- Match coverage with progress-ring
- Attached titles/label/labelledby
- Value '' on aria-valuenow is does not pass AXE
2021-10-10 13:24:01 +11:00
Christos Hrousis
eee97d7dba test: cover progress-ring
- Add title to make ring accessibly hoverable.
- Add label/labelledby as aria options.
- Remove ununsed label slot.
2021-10-10 13:05:40 +11:00
Christos Hrousis
f16392947a docs: ring uses css prop for track-width. 2021-10-10 13:00:41 +11:00
Cory LaViska
c3adf92b49 2.0.0-beta.55 2021-10-08 17:06:12 -04:00
Cory LaViska
a6580b018d updat3e changelog 2021-10-08 17:05:53 -04:00
Cory LaViska
00c843c7ce revert unbundling 2021-10-08 17:04:30 -04:00
Cory LaViska
5fe55a4db9 2.0.0-beta.54 2021-10-08 16:55:09 -04:00
Cory LaViska
4ca998c346 revert 2021-10-08 16:54:57 -04:00
Cory LaViska
42b3e2cc11 update changelog 2021-10-08 16:53:31 -04:00
Cory LaViska
59fb8db6be unbundle select deps 2021-10-08 16:52:01 -04:00
Cory LaViska
664beafefa 2.0.0-beta.54 2021-10-08 16:42:53 -04:00
Cory LaViska
04443a64e2 update changelog 2021-10-08 16:39:10 -04:00
Cory LaViska
92dedf3386 ship bare module specifiers for prod 2021-10-08 10:11:12 -04:00
Cory LaViska
2ba5fb9820 update command line args 2021-10-08 10:10:26 -04:00
Cory LaViska
222235159b rename clear => remove 2021-10-07 09:52:23 -04:00
Cory LaViska
1061bd5e0d add disabled prop 2021-10-07 09:31:20 -04:00
Cory LaViska
ccec9a8348 fix initial disabled state 2021-10-07 09:30:47 -04:00
Cory LaViska
bf9e06e67d remove attr column 2021-10-05 10:41:52 -04:00
Cory LaViska
1e03d222c5 fix code in tables 2021-10-05 10:41:39 -04:00
Cory LaViska
3722f46b8e Merge branch 'kanoni4567-next' into next 2021-10-05 09:03:51 -04:00
Cory LaViska
8d7bf97127 Merge branch 'next' of https://github.com/kanoni4567/shoelace into kanoni4567-next 2021-10-05 09:01:35 -04:00
Cory LaViska
d26c1a6407 update docs 2021-10-05 08:58:41 -04:00
Rich Klein
f296ff8476 Create integrating-with-laravel.md (#553)
* Create integrating-with-laravel.md

Instructions for using Shoelace components in a Laravel 8.x application.

* Update integrating-with-laravel.md

Added a section for setting the base path and switched to using the full import path for each component. Also included a full `bootstrap.js` example.
2021-10-05 08:54:12 -04:00
Christos Hrousis
a75a71994a test: component/spinner (#556)
- covers accessibility
- provides explainer for aria-busy and aria-live tags.
2021-10-05 08:53:28 -04:00
Shanyu Cui
7d1373a1d1 radio: emit sl-change when toggled via arrow keys 2021-10-04 23:27:28 -07:00
Shanyu Cui
23abc50015 Merge branch 'shoelace-style:next' into next 2021-10-04 22:39:37 -07:00
Cory LaViska
5e28d1131a 2.0.0-beta.53 2021-10-04 09:31:07 -04:00
Cory LaViska
a141e64a69 update version 2021-10-04 09:30:21 -04:00
Cory LaViska
e12ee97bd9 add --padding to tab panel 2021-10-04 09:29:14 -04:00
Cory LaViska
ebd84642e1 Merge branch 'christoshrousis-test/card' into next 2021-10-04 09:06:55 -04:00
Christos Hrousis
888ac2ea0d test: first pass test.
- Cover use of header slot.
- Cover use of footer slot.
- Cover use of image slot.
2021-10-02 19:44:45 +10:00
Cory LaViska
37068c922c add margin 2021-10-01 09:03:29 -04:00
Cory LaViska
eec24d2ed1 add sl-mutation-observer 2021-09-30 18:32:59 -04:00
Cory LaViska
8fa9d629a3 fix tag default 2021-09-30 17:42:34 -04:00
Cory LaViska
ef22dd7dc4 fix docs 2021-09-30 17:16:27 -04:00
Cory LaViska
3f12624b78 bye, dotty! 2021-09-30 11:20:05 -04:00
Cory LaViska
d6fa67374c revert table change 2021-09-30 09:37:39 -04:00
Cory LaViska
d4183cf718 fix indentations 2021-09-30 09:28:00 -04:00
Cory LaViska
4ad0480039 rename percentage => value 2021-09-30 09:02:28 -04:00
Cory LaViska
7188425ac0 fix animation bug 2021-09-30 08:40:21 -04:00
Cory LaViska
c83581cf47 improve search 2021-09-30 08:07:15 -04:00
Cory LaViska
f8fa29f157 Merge branch 'timefordroids-550' into next 2021-09-30 07:51:54 -04:00
Cory LaViska
f2a4db6291 update docs, expose custom properties, rework to not use getComputedStyle 2021-09-30 07:51:28 -04:00
Denis
a4aff0b1e9 #550 added progress indicator to sl-range component 2021-09-30 11:20:39 +04:00
Cory LaViska
f5c2e0b425 fixes #549 2021-09-29 17:03:37 -04:00
Cory LaViska
2f88c55ec0 fix default height 2021-09-29 09:40:56 -04:00
Cory LaViska
db7075a91a update changelog 2021-09-29 08:42:39 -04:00
Narendra Sisodiya
8ac007ba9a Removed lit-html and added lit (#547) 2021-09-29 08:40:26 -04:00
Cory LaViska
111fa8397c fix default outline border 2021-09-29 08:38:43 -04:00
Cory LaViska
0ef4e92a96 add border 2021-09-29 08:35:43 -04:00
Cory LaViska
9123afac18 add examples 2021-09-29 08:33:52 -04:00
Cory LaViska
1b5dca52e3 add divider component 2021-09-29 08:03:03 -04:00
Christos Hrousis
bc3e9c43da test: components/breadcrumb-item (#541)
* test: migrate skipped tests to the breadcrumb-item

* test: when rendering a HTMLAnchorElement

* test: add checks for classes.

* test: uplift langauge and query selector to test label part

* test: default button test

* refactor: set default for rel on prop declaration.
2021-09-28 08:27:19 -04:00
Cory LaViska
ded01cfd8a fixes #544 2021-09-28 08:22:26 -04:00
Cory LaViska
c737b7494f fix comments 2021-09-27 17:58:14 -04:00
Cory LaViska
47aff56e71 add panel border width token 2021-09-27 16:53:24 -04:00
Cory LaViska
15ce341d81 add filled tokens and update styles 2021-09-27 10:48:47 -04:00
Cory LaViska
7476204258 add theme toggle shortcut 2021-09-27 10:24:51 -04:00
Cory LaViska
e083b1a02e revert luminance removal and rework surface tokens 2021-09-27 10:24:29 -04:00
Cory LaViska
fa74fc54e3 fix bg 2021-09-24 22:38:08 -04:00
Cory LaViska
fbbeec6d2f Merge branch 'christoshrousis-test/breadcrumb' into next 2021-09-24 22:31:21 -04:00
Cory LaViska
b4192364f6 Merge branch 'test/breadcrumb' of https://github.com/christoshrousis/shoelace into christoshrousis-test/breadcrumb 2021-09-24 22:30:16 -04:00
Cory LaViska
c7dc82947f add filled variant 2021-09-24 22:28:14 -04:00
Christos Hrousis
c38fd3986c test: uplift sepcificity of aria test, and test separator. 2021-09-25 12:12:50 +10:00
Christos Hrousis
35d7926e18 test: first pass test for breadcrumb 2021-09-25 11:41:00 +10:00
Christos Hrousis
86e06ce1e6 test: start the breadcrumb test. 2021-09-25 11:41:00 +10:00
Cory LaViska
1a08f063a6 add outline buttons; closes #522 2021-09-24 16:40:03 -04:00
Cory LaViska
740208ed76 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-09-24 09:18:45 -04:00
Cory LaViska
521f6fe3f1 update test 2021-09-24 09:18:28 -04:00
Cory LaViska
f43d490763 Create node.js.yml 2021-09-24 09:07:06 -04:00
Christos Hrousis
898179b645 test: components/avatar (#529)
* test: introduce first pass test for components/avatar
feat: set alt="" on img element

* test: resolve img src 404 errors

* test: remove bad test

* test: test children by assigning nodes...

* test: add patches similar to badge patch

* style: address typing issues.
2021-09-24 08:56:08 -04:00
Cory LaViska
8c3888da02 add control part to select 2021-09-24 08:48:01 -04:00
Cory LaViska
e1471ec9a1 change default dropdown distance 2021-09-24 08:31:54 -04:00
Cory LaViska
eac07a51ba update issue templates 2021-09-23 09:32:53 -04:00
Cory LaViska
753000b56a update changelog 2021-09-23 08:54:04 -04:00
Cory LaViska
8ab2907c3f update components to use surface tokens 2021-09-23 08:53:05 -04:00
Cory LaViska
723ee80c8f update docs to use surface tokens 2021-09-23 08:52:49 -04:00
Cory LaViska
e1c003c8df add surface tokens and remove luminance shift 2021-09-23 08:52:18 -04:00
Cory LaViska
96c82dc69f fix discord badge 2021-09-23 07:54:14 -04:00
Cory LaViska
0dd9483797 remove bogus space 2021-09-22 15:35:26 -04:00
Cory LaViska
4da110087d update badges 2021-09-22 10:04:42 -04:00
Cory LaViska
7f75a64647 update vue usage 2021-09-22 09:06:13 -04:00
Cory LaViska
71d7f6fd98 2.0.0-beta.52 2021-09-20 23:22:29 -04:00
Cory LaViska
42595f241f fix test 2021-09-20 23:20:29 -04:00
Cory LaViska
c67c84dfda simplify math 2021-09-20 23:14:39 -04:00
Cory LaViska
2ba6a3b097 remove unused style 2021-09-20 22:33:17 -04:00
Cory LaViska
0456ad96fb update changelog 2021-09-20 22:09:14 -04:00
Cory LaViska
0ab87b03fa remove dashes from animation descriptions 2021-09-20 22:05:27 -04:00
Cory LaViska
54fc41e175 update to lit 2.0 2021-09-20 22:01:21 -04:00
Cory LaViska
261e824290 update changelog 2021-09-20 11:07:51 -04:00
Cory LaViska
802363e1da Merge branch 'christoshrousis-test/badge' into next 2021-09-20 11:06:09 -04:00
Cory LaViska
1054d5bb74 Merge branch 'test/badge' of https://github.com/christoshrousis/shoelace into christoshrousis-test/badge 2021-09-20 11:04:49 -04:00
Cory LaViska
f5d143710e fixes #528 2021-09-20 10:41:10 -04:00
Christos Hrousis
c025208bf5 test: first pass for badge test 2021-09-20 18:11:00 +10:00
Cory LaViska
7306e39f3e Add no-codepen for previews with assets 2021-09-19 12:01:04 -04:00
Cory LaViska
0d30d183df fix typo 2021-09-19 11:43:16 -04:00
Cory LaViska
cd504a4127 fix color 2021-09-19 11:42:33 -04:00
Cory LaViska
bba41402aa update progress ring to use CSS 2021-09-17 18:15:13 -04:00
Cory LaViska
e1f129abc5 improve spinner animation and API 2021-09-17 17:48:44 -04:00
Cory LaViska
7e6c6924f2 make search a bit fuzzier 2021-09-17 16:27:11 -04:00
Cory LaViska
185fc4c942 add file name to search index 2021-09-17 16:26:57 -04:00
Cory LaViska
5f7c6b307f improve search height 2021-09-17 16:13:29 -04:00
Cory LaViska
a9f80467c3 remove gap 2021-09-17 16:09:32 -04:00
Jake Patterson
89fb1a8804 fix broken link design token (#526) 2021-09-15 09:22:38 -04:00
Cory LaViska
54bfce0d5d add link 2021-09-13 08:12:51 -04:00
Cory LaViska
dca1d1b413 update docs 2021-09-13 07:54:05 -04:00
Cory LaViska
4b07ee40a7 fixes #523 2021-09-12 19:57:48 -04:00
Cory LaViska
d8644c940b add links to description 2021-09-11 09:44:47 -04:00
Cory LaViska
7df70abb48 no longer true 2021-09-09 10:41:23 -04:00
Cory LaViska
6e3c5c0388 reduce member boost 2021-09-09 10:17:55 -04:00
Cory LaViska
6cbe2e288b fix home button in search 2021-09-09 09:23:45 -04:00
Cory LaViska
1f95c6ca6e 2.0.0-beta.51 2021-09-09 09:14:51 -04:00
Cory LaViska
ac6ae43449 add metadata to search index 2021-09-09 09:13:55 -04:00
Cory LaViska
ba3117f435 fix comment 2021-09-09 09:13:29 -04:00
Cory LaViska
fd449f68d9 update changelog 2021-09-09 08:49:12 -04:00
Cory LaViska
574947656c add importing section to docs 2021-09-09 08:46:37 -04:00
Cory LaViska
5b1b704d1d more mobile tweaks 2021-09-09 07:46:04 -04:00
Cory LaViska
abbdb207e0 fix mobile styles 2021-09-09 07:43:17 -04:00
Cory LaViska
2d89fc945f remove elevation 2021-09-08 17:04:12 -04:00
Cory LaViska
25b130ce2c not too fuzzy 2021-09-08 12:25:02 -04:00
Cory LaViska
ca098eb171 fuzzy search and icon 2021-09-08 12:05:28 -04:00
Cory LaViska
f6ccd119e8 fix styles 2021-09-08 10:01:54 -04:00
Cory LaViska
7b1f99b41a update t-shirt tokens 2021-09-08 09:51:31 -04:00
Cory LaViska
4193ee1980 use focus-visible for code block buttons 2021-09-08 07:37:22 -04:00
Cory LaViska
c718012c3e remove unused code 2021-09-08 07:37:07 -04:00
Cory LaViska
aca5c8af73 updates 2021-09-08 07:25:07 -04:00
Cory LaViska
2d4a699790 no backslashes 2021-09-08 07:18:23 -04:00
Cory LaViska
fc0475b2c5 adjust for mobile 2021-09-08 07:16:05 -04:00
Cory LaViska
0f6e13b8c9 update changelog 2021-09-07 16:32:21 -04:00
Cory LaViska
c60cfae677 search styles 2021-09-07 15:05:57 -04:00
Cory LaViska
ded05cf079 improve search 2021-09-07 14:44:46 -04:00
Cory LaViska
c360d471cd fix ios 2021-09-07 13:21:22 -04:00
Cory LaViska
382a39e6ed fix build loop 2021-09-07 13:13:18 -04:00
Cory LaViska
bfa1499889 less noise 2021-09-07 13:13:02 -04:00
Cory LaViska
053a5e9bd7 generate at build time 2021-09-07 11:53:32 -04:00
Cory LaViska
3677f6cf0f add dep 2021-09-07 11:53:19 -04:00
Cory LaViska
03fb75f030 custom search 2021-09-07 11:52:58 -04:00
Cory LaViska
8e209d2767 update docs 2021-09-07 08:03:59 -04:00
Cory LaViska
0cf77a4115 update docs 2021-09-06 19:45:48 -04:00
Cory LaViska
14368c4ce2 Fix comment 2021-09-06 19:22:02 -04:00
Cory LaViska
e74838fdc1 adjust default button elevation 2021-09-03 10:06:09 -04:00
Cory LaViska
3f64b13d70 add missing tokens 2021-09-03 08:35:29 -04:00
Cory LaViska
613f4b6440 remove icon dep; improve copy animation 2021-09-03 08:21:16 -04:00
Cory LaViska
1bfa4c6ba8 reduce size 2021-09-03 08:09:07 -04:00
Cory LaViska
9089473cf0 improve elevation + overlay tokens 2021-09-03 08:03:32 -04:00
Cory LaViska
687eb7d0dc fix buttons on mobile 2021-09-02 10:57:59 -04:00
Cory LaViska
52cb8adf65 2.0.0-beta.50 2021-09-01 09:10:42 -04:00
Cory LaViska
06f241adb1 update version 2021-09-01 09:10:22 -04:00
Cory LaViska
f5ba173156 add breadcrumb + breadcrumb item 2021-09-01 09:06:19 -04:00
Cory LaViska
5bd7bfb4ce fix buttons on mobile 2021-08-31 07:41:53 -04:00
Cory LaViska
e4413dceee update docs 2021-08-31 07:37:41 -04:00
Cory LaViska
f644454080 add new typography tokens 2021-08-30 16:39:08 -04:00
Cory LaViska
16f4b485b5 fix tables 2021-08-30 16:38:53 -04:00
Cory LaViska
679dd4578c add click transition 2021-08-30 16:21:02 -04:00
Cory LaViska
00bf318ee9 prevent errors when setting controls undefined 2021-08-30 08:27:47 -04:00
Sidharth Ramesh
da3415d029 Prevents error if sl-input has value undefined (#513)
The sl-input's value state being `undefined` is very common when using shoelace with frameworks. Instead of erroring out and not showing the input, this should handle it gracefully.
2021-08-30 08:25:25 -04:00
Benny Powers
147a8d2f57 docs: add themed css to getting started snippet (#512)
* docs: add themed css to getting started snippet

* docs: add instructions to force light or dark themes
2021-08-27 17:05:31 -04:00
Cory LaViska
a1d354ac15 remove unused import 2021-08-27 16:45:33 -04:00
Cory LaViska
1fb0e41603 2.0.0-beta.49 2021-08-27 16:44:35 -04:00
Cory LaViska
f121c119f0 update changelog 2021-08-27 16:44:01 -04:00
Cory LaViska
f4c472e7de remove --focus-ring 2021-08-27 09:07:42 -04:00
Cory LaViska
719d62b670 fix spacing in select clearable 2021-08-27 09:03:10 -04:00
Cory LaViska
165306f56a remove no-fieldset; add fieldset 2021-08-27 09:00:01 -04:00
Cory LaViska
248bb32977 fix radio focus visible styles 2021-08-27 08:54:00 -04:00
Cory LaViska
dfb9127052 fix checkbox/switch focus visible 2021-08-27 08:50:31 -04:00
Cory LaViska
5933e948e1 fix checkbox focus visible 2021-08-27 08:38:11 -04:00
Cory LaViska
624f6ef5a1 fix arrow keys 2021-08-27 08:26:48 -04:00
Cory LaViska
2865b546fa add --sl-focus-ring and update styles 2021-08-27 08:21:18 -04:00
Cory LaViska
9d7c3b2af9 no need to force focus 2021-08-27 08:20:26 -04:00
Cory LaViska
033896dfc2 adjust default button 2021-08-27 08:20:07 -04:00
Cory LaViska
10d95ba8e6 remove focus from resizer 2021-08-26 10:18:54 -04:00
Cory LaViska
43f74583ea rework focus-visible logic 2021-08-26 08:35:36 -04:00
Cory LaViska
36d499f253 use a pill button 2021-08-26 07:45:30 -04:00
Cory LaViska
4c6e61e6dd improve switch contrast 2021-08-25 17:57:52 -04:00
Cory LaViska
0829af77c0 fix --sl-color-neutral-0|1000 2021-08-25 17:48:37 -04:00
Cory LaViska
f3281d3985 fix toggle hover 2021-08-25 17:36:46 -04:00
Cory LaViska
5cd5567292 disable ghost mode 2021-08-24 09:03:01 -04:00
Cory LaViska
c0102a1658 fix dev dep 2021-08-24 08:57:02 -04:00
Cory LaViska
c173d0d76e don't use hash routing in dev 2021-08-24 08:49:27 -04:00
Cory LaViska
d7dd4b82da add missing component 2021-08-24 08:14:28 -04:00
Cory LaViska
f9010cf3ca add date to input 2021-08-24 08:13:36 -04:00
Cory LaViska
a0d2dbf685 update lit and lit-html 2021-08-23 09:17:21 -04:00
Cory LaViska
d679d27043 update changelog 2021-08-23 09:12:50 -04:00
Cory LaViska
9c0641dcad fixes #508 2021-08-23 09:11:40 -04:00
Cory LaViska
af852a088c improve icon color contrast 2021-08-23 09:11:27 -04:00
Cory LaViska
76f04c0b0e link to color token generator 2021-08-23 09:06:20 -04:00
Cory LaViska
27376df5f2 improve color picker 2021-08-23 08:50:18 -04:00
Cory LaViska
fd285dbd6f use black for overlay color 2021-08-23 08:17:45 -04:00
Cory LaViska
76e1d4b403 adjust elevation tokens 2021-08-20 17:23:59 -04:00
Cory LaViska
51dbc1a1ee remove elevation when inline 2021-08-20 17:00:07 -04:00
Cory LaViska
7095236116 fix whitespace 2021-08-20 14:19:19 -04:00
Cory LaViska
6014c888c2 2.0.0-beta.48 2021-08-20 09:59:57 -04:00
Cory LaViska
c41714c6f3 fix menu selection via type to select 2021-08-20 09:55:32 -04:00
Cory LaViska
a3626e121b update changelog 2021-08-20 09:55:14 -04:00
Cory LaViska
b7caba8b11 Merge branch 'gtyamamoto-fix/ctrlkeys-usability-sl-select' into next 2021-08-20 09:40:43 -04:00
Cory LaViska
0a45f446e2 Merge branch 'fix/ctrlkeys-usability-sl-select' of https://github.com/gtyamamoto/shoelace into gtyamamoto-fix/ctrlkeys-usability-sl-select 2021-08-20 09:38:57 -04:00
Cory LaViska
917dbb12da update changelog 2021-08-20 09:36:43 -04:00
gtyamamoto
767c0b3675 fix: allow ctrl/command + key when the sl-select is on focus
- doing a more simplistic approach to handle ctrlKey/metaKey values
2021-08-20 09:20:01 -03:00
Cory LaViska
30477bb0ad shifted dark theme 2021-08-20 07:56:18 -04:00
Cory LaViska
1ce4d31503 update screen color 2021-08-19 17:29:12 -04:00
gtyamamoto
066f7cfa08 fix: allow ctrl/command + key when the sl-select is on focus 2021-08-19 17:21:18 -03:00
Cory LaViska
be8f2bf280 improve help text contrast 2021-08-19 15:01:48 -04:00
Cory LaViska
e339571ce0 fix menu bug 2021-08-19 09:34:08 -04:00
Cory LaViska
3ea89b3956 fix mouseup 2021-08-19 09:04:08 -04:00
Cory LaViska
1e65d45844 add design token section 2021-08-19 08:36:12 -04:00
Cory LaViska
99750b8edb improve table viewing on mobile (still not great) 2021-08-19 08:28:52 -04:00
Cory LaViska
2af3831366 fix example 2021-08-19 08:01:54 -04:00
Cory LaViska
5d9c65041e info => neutral 2021-08-19 08:01:45 -04:00
Cory LaViska
e789f92db2 remove outdated warning 2021-08-19 07:58:56 -04:00
Cory LaViska
9a1f7dd3eb fix SVG in safari 2021-08-19 07:57:39 -04:00
Cory LaViska
fb48c4cf0e remove ref attr 2021-08-18 18:17:58 -04:00
Cory LaViska
8c5dee529b revert SL brand color 2021-08-18 18:15:24 -04:00
Cory LaViska
c885b76bbc add theme color back 2021-08-18 17:56:51 -04:00
Cory LaViska
6d03f12e54 improve contrast; fixes #128 2021-08-18 17:54:35 -04:00
Cory LaViska
be5bbe95b6 change default effect to 'none' 2021-08-18 17:30:51 -04:00
Cory LaViska
e571c884c1 fix example 2021-08-18 17:29:59 -04:00
Cory LaViska
96008539d5 fix whitespace 2021-08-18 09:53:51 -04:00
Cory LaViska
8c221f33a8 docs styles 2021-08-18 09:52:51 -04:00
Cory LaViska
9612af06a8 update example 2021-08-18 08:55:59 -04:00
Cory LaViska
17c1be6dd7 pure inversion 2021-08-17 17:42:52 -04:00
Cory LaViska
6607cdb0bd remove extra comment 2021-08-17 17:04:57 -04:00
Cory LaViska
5f33bd312e fix theme picker again 2021-08-17 09:14:38 -04:00
Cory LaViska
185bc30893 improve theme picker 2021-08-16 17:58:34 -04:00
Cory LaViska
b35d5e9914 update examples and changelog 2021-08-16 17:05:28 -04:00
Cory LaViska
a89eab43c4 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-08-16 16:31:02 -04:00
Rafael Rossini
5eac4ebee8 Add prefix and suffix slot to sl-select component (#501)
* Add prefix and suffix slot to sl-select component

* Adding align-items: center in prefix/suffix and changing documentation to showcase using as visual aids
2021-08-16 16:30:55 -04:00
Cory LaViska
65a3c3a33c remove z-index 2021-08-16 16:17:55 -04:00
Cory LaViska
b0cf35d264 fix copy button animation 2021-08-12 12:57:13 -04:00
Cory LaViska
f8aff7dcd9 improve theme picker 2021-08-12 09:36:48 -04:00
Cory LaViska
b754912990 remove toggle transition 2021-08-12 09:00:06 -04:00
Cory LaViska
83a01cf0e2 update brand color 2021-08-12 08:59:56 -04:00
Cory LaViska
d81db3fd4b remove unused style 2021-08-12 08:39:06 -04:00
Cory LaViska
1b383888b8 remove unused z-index 2021-08-11 17:50:28 -04:00
Cory LaViska
cd76672831 use prefers-color-scheme by default 2021-08-11 17:50:17 -04:00
Cory LaViska
94f4d652b4 remove focus ring color tokens 2021-08-10 17:53:15 -04:00
Cory LaViska
5aab7c34e6 fix radio group focus bug 2021-08-10 17:24:52 -04:00
Cory LaViska
72eff3754f emit on left/right 2021-08-10 17:13:21 -04:00
Cory LaViska
0d3d9c8233 Merge branch 'bennypowers-fix/checkbox-emit-on-user-action-only' into next 2021-08-10 17:11:32 -04:00
Cory LaViska
3bb8614143 use fixture types consistently 2021-08-10 17:11:07 -04:00
Cory LaViska
2b12a47915 merge changes 2021-08-10 17:10:50 -04:00
Benny Powers
9216e72a3e fix: emit sl-change from radio and switch on user interaction only 2021-08-10 18:53:15 +03:00
Benny Powers
9b99a92dc1 fix: emit sl-change from checkbox on user interaction only
fixes #497
2021-08-10 18:53:15 +03:00
Cory LaViska
ab1a68d0f8 fix color 2021-08-10 11:40:59 -04:00
Cory LaViska
4fedf9548f faster copy animation 2021-08-10 11:16:44 -04:00
Cory LaViska
a396c86e84 improve code block button styles 2021-08-10 11:07:17 -04:00
Cory LaViska
75f2da3547 prettier 2021-08-10 10:57:24 -04:00
Cory LaViska
6c9a25a0c7 Merge branch 'theming' into next 2021-08-10 10:56:27 -04:00
Benny Powers
34db96822b Add href etc to sl-icon-button (#496)
* perf: only calculate the used button template

* feat: add href and friends to icon-button

closes #495
2021-08-10 10:52:17 -04:00
Cory LaViska
37e60c9dfe update changelog 2021-08-10 10:46:44 -04:00
Cory LaViska
54b2cbc608 inline script + style for codepen 2021-08-10 10:45:33 -04:00
Cory LaViska
7f4169e4e3 tweak styles 2021-08-10 10:45:18 -04:00
Cory LaViska
c356ec40d6 update theme docs 2021-08-10 09:08:50 -04:00
Cory LaViska
23a7268e84 square hover 2021-08-10 09:08:39 -04:00
Cory LaViska
35d960c09f better copy button styles 2021-08-10 09:01:53 -04:00
Cory LaViska
a7d81993d5 add codepen button to code blocks 2021-08-10 08:39:19 -04:00
Cory LaViska
e5af3257c9 add icons back 2021-08-09 09:21:55 -04:00
Cory LaViska
da83581f45 disallow expressions 2021-08-09 08:33:50 -04:00
Cory LaViska
5900594562 exit on startup when scripts fail 2021-08-09 08:33:30 -04:00
Cory LaViska
a050832da0 rename base.css to light.css 2021-08-09 08:06:59 -04:00
Guillaume Laforge
fe766dc438 Minor typo in the page describing forms (#492) 2021-08-06 19:36:55 -04:00
Cory LaViska
c1a5ce4b27 improve copy styles 2021-08-06 16:11:14 -04:00
Cory LaViska
64b0e63945 update theme docs 2021-08-06 15:52:48 -04:00
Cory LaViska
95f6841a48 update base theme class 2021-08-06 15:52:27 -04:00
Cory LaViska
3189c6fe98 change -0 -1000 to --sl-color-neutral-0|1000 2021-08-06 09:37:16 -04:00
Cory LaViska
9dbee4c686 add neutral color palette 2021-08-06 08:32:46 -04:00
Cory LaViska
04a2d45334 update content 2021-08-05 18:07:53 -04:00
Cory LaViska
6766af0f9d fix focus ring styles 2021-08-05 17:59:58 -04:00
Cory LaViska
c7058e7613 improve link contrast in docs 2021-08-05 17:48:04 -04:00
Cory LaViska
3d1f858301 black/white => empty/full 2021-08-05 17:42:12 -04:00
Cory LaViska
21de0db790 use color scale 2021-08-05 17:17:44 -04:00
Cory LaViska
c5d4c532b3 generate css files from themes/*.styles.ts 2021-08-05 16:48:15 -04:00
Cory LaViska
3877e89277 reword 2021-08-05 09:49:25 -04:00
Cory LaViska
688ac96faa colors 1000 => 950 2021-08-05 09:43:03 -04:00
Cory LaViska
e53f36e5ef update docs and changelog 2021-08-05 09:39:58 -04:00
Cory LaViska
ad35df2a17 use rgb primitives for color tokens to support alpha 2021-08-05 08:27:58 -04:00
Cory LaViska
fd104ad74f expose styles for js 2021-08-04 18:03:24 -04:00
Cory LaViska
bffa9a2ed8 improve palette styles 2021-08-04 17:54:18 -04:00
Cory LaViska
dfd18776c6 add :host selector 2021-08-04 08:14:47 -04:00
Cory LaViska
f746ef7954 update changelog 2021-08-03 17:51:53 -04:00
Cory LaViska
a71b83b4c3 update changelog 2021-08-03 17:46:19 -04:00
Cory LaViska
cebd206bcc rework design tokens and use inverted dark theme 2021-08-03 17:35:37 -04:00
Cory LaViska
d07311cf64 split utility styles out 2021-08-03 17:35:13 -04:00
Cory LaViska
7d6390d9bf adjust styles and use tokens when possible 2021-08-03 17:34:51 -04:00
Cory LaViska
68f40ed779 use token for track color 2021-08-03 17:23:17 -04:00
Cory LaViska
4d56124274 update installation instructions 2021-08-03 17:22:55 -04:00
Cory LaViska
6aa31e612a more contrast for avatars 2021-08-03 07:37:17 -04:00
Cory LaViska
6d9018627e fix transparent bg styles 2021-08-03 07:36:56 -04:00
Cory LaViska
28b0e74e04 semibold labels 2021-08-03 07:35:55 -04:00
Cory LaViska
246f1155e6 move qr out of utils 2021-08-03 07:31:00 -04:00
Cory LaViska
a59d29e10c update changelog 2021-07-28 09:04:06 -04:00
David Gonzalez
b13e2c32ff Simplify switch thumb calc (#490) 2021-07-28 09:03:22 -04:00
Cory LaViska
807cba18d1 fix type to select bug 2021-07-26 08:23:46 -04:00
Cory LaViska
e938f94ffc add console error 2021-07-26 08:20:18 -04:00
Cory LaViska
d6e6f2cb25 update doc 2021-07-23 16:27:56 -04:00
Cory LaViska
43328b94b7 2.0.0-beta.47 2021-07-18 16:22:07 -04:00
Cory LaViska
dde15b0881 update version 2021-07-18 16:15:46 -04:00
Andreas
d84fd95f3c Automate GitHub release creation (#483)
* automate github release creation

Adds a workflow file to create a GitHub release, when a version tag is pushed.

* set fix latest version of auto release action
2021-07-18 16:13:23 -04:00
Cory LaViska
efed99b890 Remove unused import in example 2021-07-18 16:10:25 -04:00
Cory LaViska
1a6c1ed1c3 fixes #480 2021-07-16 10:16:02 -04:00
Cory LaViska
fa82d31000 update changelog 2021-07-16 08:38:59 -04:00
Cory LaViska
d11e7fe562 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-07-16 08:29:45 -04:00
Shanyu Cui
e36a49b635 update hasSlot selector to search top-level only (#481) 2021-07-16 08:28:47 -04:00
Shanyu Cui
17df0e3cd3 Merge branch 'next' of github.com:shoelace-style/shoelace into next 2021-07-16 02:04:07 -07:00
Shanyu Cui
76df2fd204 update hasSlot selector to search top-level only 2021-07-16 02:03:02 -07:00
Cory LaViska
f9491bb944 simplify component gathering 2021-07-13 16:43:18 -04:00
Cory LaViska
3541540d84 fix grid handle drag behavior 2021-07-13 07:55:49 -04:00
Cory LaViska
1ae5b9cfcd add descr 2021-07-13 07:15:03 -04:00
Cory LaViska
e493bda6df fix changelog 2021-07-13 07:14:33 -04:00
Cory LaViska
7de15e94b2 adjust comment 2021-07-13 07:13:04 -04:00
Cory LaViska
002f847165 remove unused rule 2021-07-13 07:12:55 -04:00
Cory LaViska
a654f50c33 fix box-sizing 2021-07-13 07:12:24 -04:00
Cory LaViska
a2594d4a6b add note about deps 2021-07-12 11:40:25 -04:00
Cory LaViska
b98e1f6b20 fix radio group tabbing 2021-07-12 10:48:38 -04:00
Cory LaViska
a48eef2575 refactor base path logic 2021-07-12 10:36:29 -04:00
Cory LaViska
4aeb804441 auto import dependencies 2021-07-12 10:36:06 -04:00
Cory LaViska
a30adac959 add reflects column 2021-07-12 09:38:06 -04:00
Cory LaViska
d605de4e07 update analyzer 2021-07-12 09:37:55 -04:00
Cory LaViska
fe49ee0aad 2.0.0-beta.46 2021-07-09 20:55:37 -04:00
Cory LaViska
e47fd3b879 update version 2021-07-09 20:55:17 -04:00
Cory LaViska
383e039297 sass => lit styles 2021-07-09 20:45:44 -04:00
Cory LaViska
46a206de64 add interactive demo 2021-07-09 20:38:55 -04:00
Cory LaViska
f39cb976aa don't use "prop" 2021-07-08 17:41:10 -04:00
Cory LaViska
ad7c02f745 update analyzer 2021-07-08 17:25:05 -04:00
Cory LaViska
1c98a831d8 use roving tab index for menu 2021-07-08 17:23:47 -04:00
Cory LaViska
ffcdf4462b fixes #477 2021-07-07 08:30:31 -04:00
Cory LaViska
22cfc82d35 remove unnecessary bindings 2021-07-07 08:13:27 -04:00
Cory LaViska
83fbe9eccc remove unnecessary bindings 2021-07-07 08:13:07 -04:00
Cory LaViska
9a89c14e20 improve tabbable logic 2021-07-07 07:59:06 -04:00
Cory LaViska
6b1d762245 rename columns 2021-07-06 17:56:29 -04:00
Cory LaViska
0b9da0b049 fix comment 2021-07-06 17:56:19 -04:00
Cory LaViska
5bcce80b50 improve metadata parsing for new analyzer version 2021-07-06 10:29:58 -04:00
Cory LaViska
9f3bf24d06 show dev/next 2021-07-06 08:39:40 -04:00
Cory LaViska
647ab0ab78 fix jsdoc plugin 2021-07-06 08:39:29 -04:00
Cory LaViska
188a7b661e update changelog 2021-07-06 08:27:12 -04:00
Cory LaViska
fe4393593a Update analyzer 2021-07-06 08:26:20 -04:00
Cory LaViska
6fd5a97fde fix boolean true prop 2021-07-01 17:23:16 -04:00
Cory LaViska
10cd4b8999 cleanup unused things 2021-07-01 17:14:25 -04:00
Cory LaViska
cb3d76889d improve sl-animation 2021-07-01 09:34:00 -04:00
Cory LaViska
07504dd149 add meta tag for CEM 2021-07-01 07:15:53 -04:00
Cory LaViska
2ea5b65cb8 remove redundant types 2021-06-30 20:04:46 -04:00
Cory LaViska
f124c8d81b clarify comments 2021-06-30 20:03:34 -04:00
Cory LaViska
1e7567fb8f update analyzer 2021-06-30 20:03:17 -04:00
Cory LaViska
5f6874edbf remove options 2021-06-30 20:03:07 -04:00
Cory LaViska
3558bd5d9b update analyzer and remove dash plugin 2021-06-29 09:37:19 -04:00
Cory LaViska
8e45f7d785 2.0.0-beta.45 2021-06-29 08:48:07 -04:00
Cory LaViska
ceb234f0d5 update changelog 2021-06-29 08:47:29 -04:00
Cory LaViska
1c8a3ea7d2 fixes #466 2021-06-29 08:34:40 -04:00
Cory LaViska
522d6a5fc4 improve order 2021-06-29 07:08:49 -04:00
Cory LaViska
21a7df9a84 update analyzer 2021-06-28 16:50:28 -04:00
Cory LaViska
d6eeacbdc1 fix focus trap when open on init 2021-06-28 16:49:56 -04:00
Cory LaViska
d4d581e4fb fix metadata fetch bug 2021-06-28 09:43:55 -04:00
Cory LaViska
9c31d148fe fix argument 2021-06-28 09:31:22 -04:00
Cory LaViska
47c932bd46 fix incorrect types 2021-06-28 09:26:55 -04:00
Cory LaViska
cc7ab8f7c4 fix bad type 2021-06-28 09:25:47 -04:00
Cory LaViska
6883851866 don't use inferred types for analyzer 2021-06-28 09:23:39 -04:00
Cory LaViska
94a5c6244e update helper functions 2021-06-28 08:53:31 -04:00
Cory LaViska
42fb6c7100 update changelog 2021-06-28 08:36:57 -04:00
Cory LaViska
5e7fcdd105 refactor metadata fetching 2021-06-28 08:34:37 -04:00
Cory LaViska
12b0365ce0 hide private methods 2021-06-25 20:07:22 -04:00
Cory LaViska
114dfa3904 fix class name 2021-06-25 20:01:53 -04:00
Cory LaViska
e31a05beb0 Merge branch 'next' into metadata 2021-06-25 19:40:12 -04:00
Cory LaViska
a28942f264 use @watch and reorder handlers 2021-06-25 19:22:05 -04:00
Cory LaViska
af61f45ecb fixes #473 2021-06-25 19:02:34 -04:00
Cory LaViska
0da9955403 Add dashes back to metadata 2021-06-25 16:25:46 -04:00
Cory LaViska
e4f699641a remove script 2021-06-25 10:00:39 -04:00
Cory LaViska
23b56b4053 show default slot better 2021-06-25 09:59:36 -04:00
Cory LaViska
0971153a74 update analyzer 2021-06-25 09:58:41 -04:00
Cory LaViska
0b3abfae28 fix animations and support dash separators in descriptions 2021-06-25 09:58:26 -04:00
Cory LaViska
d0b9488c1c switch to custom elements manifest analyzer 2021-06-24 18:24:54 -04:00
Cory LaViska
698962e0ea fix tests 2021-06-23 09:14:58 -04:00
Cory LaViska
1c010ffe5a add sl-request-close event 2021-06-21 09:40:11 -04:00
Cory LaViska
95ba1b5849 update docs 2021-06-21 08:52:55 -04:00
Cory LaViska
19dba93cca use plop for npm run create 2021-06-18 10:07:17 -04:00
Cory LaViska
94fe4f1f46 remove { waitUntilFirstUpdate } when not needed 2021-06-18 08:51:00 -04:00
Cory LaViska
de9d43f67a fixes #468 2021-06-18 08:36:24 -04:00
Cory LaViska
301c58d6fb add initial tests 2021-06-18 08:34:42 -04:00
Cory LaViska
227ecc0193 2.0.0-beta.44 2021-06-17 17:40:01 -04:00
Cory LaViska
ee260e671f update version 2021-06-17 17:39:16 -04:00
Cory LaViska
1a954c5b25 convert build scripts to ESM 2021-06-17 17:38:48 -04:00
Cory LaViska
a14dd95c21 assign certain props as properties 2021-06-17 16:45:49 -04:00
Cory LaViska
19f7918435 remove comments 2021-06-17 16:44:53 -04:00
Cory LaViska
1e4de5f821 fixes #455 2021-06-16 08:42:02 -04:00
Cory LaViska
45f4b33eb1 add select sl-change test 2021-06-15 09:36:45 -04:00
Cory LaViska
16e7287c24 rework @watch decorator 2021-06-15 09:26:35 -04:00
Cory LaViska
3b2b5eed5a add test for sl-include 2021-06-15 09:11:04 -04:00
Cory LaViska
0521740824 fix preview imports 2021-06-14 17:17:41 -04:00
Cory LaViska
1d2033953b npm audit 2021-06-14 17:17:27 -04:00
Cory LaViska
e20edefc61 allow null 2021-06-10 09:50:30 -04:00
Cory LaViska
a9287d9d80 use a button 2021-06-10 09:34:13 -04:00
Cory LaViska
ba029db24e only open when key press is printable 2021-06-10 09:33:02 -04:00
Cory LaViska
529c187bc4 make imports consistent 2021-06-09 08:48:26 -04:00
Cory LaViska
714914ffe5 Merge branch 'next' of https://github.com/shoelace-style/shoelace into next 2021-06-09 08:36:27 -04:00
Matthias Max
cd23b9ebfe Fix import path (#463) 2021-06-09 08:36:19 -04:00
Cory LaViska
35ce68f4f6 fix animation import example 2021-06-09 08:34:31 -04:00
Cory LaViska
f7bcd89b97 fixes #456 2021-06-05 12:29:57 -04:00
Cory LaViska
0b44fba68c cleanup listener 2021-06-05 12:28:35 -04:00
Cory LaViska
501869c7aa fixes #458 2021-06-04 09:33:43 -04:00
Cory LaViska
15cb1cb746 fixes #457 2021-06-04 08:56:35 -04:00
Cory LaViska
7454cc12a1 restore select docs 2021-06-04 08:19:28 -04:00
Cory LaViska
52d52810b9 2.0.0-beta.43 2021-06-03 14:14:53 -04:00
Cory LaViska
936039f7a7 update changelog 2021-06-03 14:14:11 -04:00
Cory LaViska
ba0e8f7973 add link 2021-06-03 11:55:56 -04:00
Cory LaViska
8449a99418 update splash 2021-06-03 11:55:47 -04:00
Cory LaViska
28c9dbab1f add initial tests 2021-06-03 08:42:51 -04:00
Cory LaViska
81753cd44b fixes #454 2021-06-03 07:38:05 -04:00
Cory LaViska
9970bc84ff fixes #452; fixes #453 2021-06-02 19:06:04 -04:00
Cory LaViska
499bc4c4cd fix comments 2021-06-02 19:05:47 -04:00
Cory LaViska
b0921b5be0 fixes #451 2021-06-02 08:47:55 -04:00
Cory LaViska
afc4dfaf50 use globby 2021-06-02 07:41:28 -04:00
Cory LaViska
9dda3a9323 remove unused lib 2021-06-02 07:41:18 -04:00
Cory LaViska
115e80dce0 fix scrollable tabs 2021-06-01 08:21:10 -04:00
Cory LaViska
9f405686ec fixes #450 2021-06-01 08:09:13 -04:00
Cory LaViska
e7d7469c4e make reflected types show up in docs 2021-05-30 09:46:09 -04:00
Cory LaViska
0dbb72efe9 add scrollPosition method 2021-05-29 10:55:56 -04:00
Cory LaViska
9b21d5a619 add ? to optional args 2021-05-29 10:54:55 -04:00
Cory LaViska
8ffcdebffc 2.0.0-beta.42 2021-05-28 22:09:46 -04:00
Cory LaViska
e089184a14 revert 2021-05-28 22:09:40 -04:00
Cory LaViska
a2a059962c 2.0.0-beta.43 2021-05-28 22:08:45 -04:00
Cory LaViska
3eb42321d5 exclude tests 2021-05-28 22:08:21 -04:00
Cory LaViska
474484b059 2.0.0-beta.42 2021-05-28 22:03:24 -04:00
Cory LaViska
998e255636 update version 2021-05-28 22:02:27 -04:00
Cory LaViska
3938644442 add tests to prepub 2021-05-28 22:02:17 -04:00
Cory LaViska
b13e637593 added tests for details 2021-05-28 21:53:38 -04:00
Cory LaViska
95e3f5e0e8 fixes #445 2021-05-28 21:53:20 -04:00
Cory LaViska
d5ee79fe1e remove unused custom props 2021-05-28 21:08:31 -04:00
Cory LaViska
51f003d5fd add test info 2021-05-28 20:45:32 -04:00
Cory LaViska
dd89657f1e fix popper positioning 2021-05-28 10:47:24 -04:00
Cory LaViska
1e280608d3 update changelog 2021-05-28 10:14:34 -04:00
Cory LaViska
c6e5bedd3c fixes #448 2021-05-28 10:13:46 -04:00
Cory LaViska
0ff5b46799 add test runner and initial alert tests 2021-05-27 17:52:19 -04:00
Cory LaViska
e34090a87b update lit/esbuild 2021-05-27 17:00:43 -04:00
Cory LaViska
f690b24c68 use glob and ignore test files 2021-05-27 16:50:58 -04:00
Cory LaViska
10f045fe6e fix show/hide logic 2021-05-27 16:29:10 -04:00
Cory LaViska
8d8b77ca07 fix icon search and debounce results 2021-05-27 07:28:30 -04:00
Cory LaViska
234d2380ef update changelog 2021-05-26 20:28:25 -04:00
Cory LaViska
4de659d5bb Add iconoir example 2021-05-26 20:27:16 -04:00
Cory LaViska
2aabe4e11c 2.0.0-beta.41 2021-05-26 19:57:07 -04:00
Cory LaViska
171e55ce6d update version 2021-05-26 19:56:07 -04:00
Cory LaViska
297e6c8872 npm audit 2021-05-26 19:55:44 -04:00
Cory LaViska
2b39d613b7 update docs 2021-05-26 19:53:56 -04:00
Cory LaViska
2432fd1d85 remove bad keyframe 2021-05-26 12:55:12 -04:00
Cory LaViska
3cc3d4997b update changelog 2021-05-26 12:49:30 -04:00
Cory LaViska
9c0189f8be fix disabled and destroy popovers 2021-05-26 12:49:20 -04:00
Cory LaViska
fc5a21f57d add guard to show/hide methods 2021-05-26 12:43:30 -04:00
Cory LaViska
ee9ce8a87b remove popover util 2021-05-26 12:43:03 -04:00
Cory LaViska
d720121044 update tooltip 2021-05-26 12:42:50 -04:00
Cory LaViska
3fce846a8d add parseDuration method 2021-05-26 12:41:52 -04:00
Cory LaViska
8776c3f4a8 destructure animation 2021-05-26 08:42:55 -04:00
Cory LaViska
189ad7889d update dropdown 2021-05-26 08:42:33 -04:00
Cory LaViska
79a15e1470 remove unused code 2021-05-26 08:17:28 -04:00
Cory LaViska
dfd0d0ed30 Merge branch 'next' into animation-rework 2021-05-26 07:53:57 -04:00
Cory LaViska
d7bf0bd653 fixes #443 2021-05-26 07:51:57 -04:00
Cory LaViska
6044190019 update changelog 2021-05-26 07:33:38 -04:00
Cory LaViska
89b8d0ef67 update template 2021-05-26 07:33:00 -04:00
Cory LaViska
489d713fa2 update tab group placements 2021-05-26 07:32:51 -04:00
Cory LaViska
8d984d8dac only support Keyframe[] 2021-05-26 07:32:31 -04:00
Cory LaViska
cadbae85a5 update drawer 2021-05-26 07:32:16 -04:00
Cory LaViska
01bb476023 slow it down 2021-05-26 07:31:42 -04:00
Cory LaViska
d5c37f7b29 update details 2021-05-26 07:31:26 -04:00
Cory LaViska
99181cf5c6 slow it down 2021-05-26 07:29:59 -04:00
Cory LaViska
7836b8229a Merge branch 'next' into animation-rework 2021-05-24 16:09:16 -04:00
Cory LaViska
3cff627b22 Merge branch 'current' into next 2021-05-24 16:08:59 -04:00
Cory LaViska
4263899bc0 parse decorator for attribute 2021-05-24 16:07:41 -04:00
Cory LaViska
0f4bb2b24b fix comment 2021-05-24 16:07:06 -04:00
Cory LaViska
7bd7b421b8 update syntax 2021-05-24 09:15:09 -04:00
Cory LaViska
49eb9bbcf8 fix metadata 2021-05-24 09:13:46 -04:00
Cory LaViska
a87596b3a1 Add animation registry and update alert/dialog 2021-05-21 17:53:53 -04:00
Cory LaViska
1ca890b1e9 rework alert animations 2021-05-19 13:46:18 -04:00
Cory LaViska
52aba14ae9 add animation utils 2021-05-19 13:46:03 -04:00
Cory LaViska
916ee07265 move custom property tags to main comment block 2021-05-17 18:04:28 -04:00
Cory LaViska
1e67c7411c add settings and recommended extensions for vs code 2021-05-17 09:03:18 -04:00
Cory LaViska
62ef8e17c7 remove resize observer types
These were finally added to TypeScript so they're no longer needed.
2021-05-17 09:02:59 -04:00
Cory LaViska
327ef6b06c fix typo 2021-05-13 10:51:50 -04:00
Cory LaViska
5dff7b2855 remove md extension from docs 2021-05-13 09:11:24 -04:00
Cory LaViska
22b359a612 update typedoc 2021-05-13 09:10:52 -04:00
Cory LaViska
7bf3a8d8f7 2.0.0-beta.40 2021-05-12 08:04:59 -04:00
Cory LaViska
4bd73ac374 update version 2021-05-12 08:04:07 -04:00
Cory LaViska
cae50866f9 remove global [hidden] styles 2021-05-12 07:42:44 -04:00
Cory LaViska
ebd1b95ba0 remove src/utilities/index 2021-05-12 07:33:56 -04:00
Cory LaViska
703cb4dc7a update typescript
=
2021-05-12 07:30:26 -04:00
Cory LaViska
e274904d28 use platform agnostic delete 2021-05-11 08:35:31 -04:00
Cory LaViska
b3bcfc9934 update bootstrap icons to 1.5.0 2021-05-10 12:43:31 -04:00
Cory LaViska
a3beaafbcc fixes #424 2021-05-10 09:31:53 -04:00
Cory LaViska
5c619b87b6 add responsive media component; fixes #436 2021-05-04 09:51:16 -04:00
Cory LaViska
86fc6b85d6 fix import bug; closes #439 2021-05-03 15:08:17 -04:00
Cory LaViska
4c1e077833 fixes #425 2021-05-03 11:32:59 -04:00
Cory LaViska
c8e94ea098 remove bypass logic 2021-05-03 11:32:38 -04:00
Cory LaViska
cf38478cd5 improve a11y 2021-05-03 11:28:57 -04:00
Cory LaViska
e3ca914eac remove null 2021-05-03 11:25:20 -04:00
Cory LaViska
18a933bf6b update attribution 2021-04-26 15:48:17 -04:00
Cory LaViska
7554f47258 Update React to use @shoelace-style/react 2021-04-26 11:48:24 -04:00
Cory LaViska
e579330177 update changelog 2021-04-26 07:07:57 -04:00
Cory LaViska
360cfa43d8 formatting corrections 2021-04-26 07:07:08 -04:00
Corbin Crutchley
f66535f7d4 Update NextJS docs for beta 39 (#434) 2021-04-26 07:04:24 -04:00
Cory LaViska
ce0b64045c 2.0.0-beta.39 2021-04-22 15:44:44 -04:00
Cory LaViska
b09bfdd01d update changelog 2021-04-22 15:42:23 -04:00
Cory LaViska
eeb1a097a3 udpate esbuild 2021-04-22 09:34:58 -04:00
Cory LaViska
0911299797 update lit 2021-04-22 08:18:51 -04:00
Cory LaViska
af601c6e9c Add system icon library (#420, #422)
* Add system icon library

* fixes #420

* update changelog
2021-04-20 09:37:19 -04:00
Cory LaViska
51d48b6aad 2.0.0-beta.38 2021-04-19 10:08:49 -04:00
Cory LaViska
a3d38c0e4b update version 2021-04-19 10:08:18 -04:00
Cory LaViska
19f01d29aa remove example 2021-04-18 16:01:27 -04:00
Cory LaViska
bf2a4ac6cb cache menu items for better performance 2021-04-15 14:27:35 -04:00
Cory LaViska
51c252420e refactor tabbable utils 2021-04-15 13:38:53 -04:00
Cory LaViska
a02354283b improve focus traps and a11y for dialog/drawer 2021-04-15 13:30:58 -04:00
Cory LaViska
121723b440 update changelog 2021-04-12 10:44:38 -04:00
Cory LaViska
3834f3a61a remove dot 2021-04-12 10:44:29 -04:00
Joël Billaud
a1c6035542 Fixes icon loading race (#411) 2021-04-12 10:40:36 -04:00
Cory LaViska
f2005bdcd8 fixes #407 2021-04-12 10:05:03 -04:00
Cory LaViska
9f42a698c4 fixes #409 2021-04-12 10:00:07 -04:00
Cory LaViska
2bbea51830 don't announce icon 2021-04-09 13:51:48 -04:00
Cory LaViska
70a94bb38e fix prefix/suffix spacing 2021-04-09 13:38:17 -04:00
Cory LaViska
b06f58db5f Add note about usage 2021-04-09 13:38:01 -04:00
Cory LaViska
75bd54d16a hide radio check in WHC mode 2021-04-09 08:48:25 -04:00
Cory LaViska
f4ccf86ece add role 2021-04-09 08:47:14 -04:00
Cory LaViska
b4fc01e99a add radio group 2021-04-09 08:15:33 -04:00
Cory LaViska
8e404bd478 2.0.0-beta.37 2021-04-07 17:07:10 -04:00
Cory LaViska
4555406143 update version 2021-04-07 17:06:46 -04:00
Cory LaViska
8f8cf9649d fixes #403 2021-04-07 17:05:38 -04:00
Cory LaViska
9b8bee2bc5 add create script 2021-04-07 17:03:24 -04:00
Cory LaViska
5bea4269a7 don't break if dependency doesn't exist 2021-04-07 12:56:44 -04:00
Cory LaViska
0b4dc3f6a8 fixes #401 2021-04-07 10:01:31 -04:00
Cory LaViska
c2314e9871 improve aria-labelledby for form controls 2021-04-05 17:13:17 -04:00
Cory LaViska
4b4361c514 Add pink button styling example 2021-04-05 16:59:11 -04:00
Cory LaViska
8d2d8cd9f0 add activation prop 2021-04-05 16:58:33 -04:00
Cory LaViska
d59fdbc443 remove unused import 2021-04-02 14:42:01 -04:00
Cory LaViska
16add89462 improve button group divider color 2021-04-02 14:41:51 -04:00
Cory LaViska
16a3d5f156 fix default values 2021-04-02 07:47:25 -04:00
Cory LaViska
19b0c7978f rename toast stack stylesheet 2021-04-02 07:33:36 -04:00
Cory LaViska
7a64963fef rework button group to not use light DOM styles 2021-04-02 07:24:59 -04:00
Cory LaViska
48216a4fdc allow dropdown events to bubble 2021-04-01 09:50:38 -04:00
Cory LaViska
b2599d5a9f remove unused events 2021-04-01 09:50:33 -04:00
Cory LaViska
2e893bbaf2 fix show/hide when disabled 2021-04-01 09:50:29 -04:00
Cory LaViska
26bfe8ef11 fix event names 2021-04-01 09:50:23 -04:00
Cory LaViska
784c173728 add click method 2021-04-01 09:50:18 -04:00
Cory LaViska
619758cbc3 improve a11y 2021-04-01 09:49:36 -04:00
Cory LaViska
d1ab1e5cc2 fixes #391 2021-04-01 09:49:31 -04:00
Cory LaViska
261f6bb322 cleanup events 2021-04-01 09:49:27 -04:00
Cory LaViska
e4a4281200 fix default values 2021-04-01 07:57:31 -04:00
Cory LaViska
dac05f8d06 improve a11y 2021-04-01 07:50:27 -04:00
Cory LaViska
3c9a4812ca fixes #391 2021-04-01 07:38:17 -04:00
Cory LaViska
0208cf6229 cleanup events 2021-04-01 07:20:37 -04:00
Cory LaViska
1282deabd0 improve a11y for button links 2021-03-31 12:03:20 -04:00
Cory LaViska
d6e109b895 2.0.0-beta.36 2021-03-30 09:30:47 -04:00
Cory LaViska
7a512232c4 update version 2021-03-30 09:30:16 -04:00
Cory LaViska
75d1abaa9c fixes #357 2021-03-30 09:30:00 -04:00
Cory LaViska
485a7252b0 reorder 2021-03-30 09:11:35 -04:00
Cory LaViska
0935e1574a rename setFocus and removeFocus methods 2021-03-30 09:09:52 -04:00
Cory LaViska
a04fc7c681 fixes #388, #fixes #389 2021-03-30 09:03:36 -04:00
Cory LaViska
a71f28c664 update sprite 2021-03-30 08:52:03 -04:00
Cory LaViska
e00997ce97 update bootstrap-icons 2021-03-30 08:49:58 -04:00
Cory LaViska
c50b57d96b tidy up color picker 2021-03-30 08:44:41 -04:00
Cory LaViska
3bd3bdd086 cleanup 2021-03-30 08:34:44 -04:00
Cory LaViska
d059017153 update changelog 2021-03-30 08:33:43 -04:00
Cory LaViska
28c0121a69 add open watcher 2021-03-30 08:33:08 -04:00
Cory LaViska
560441bea3 fix attr 2021-03-30 08:29:54 -04:00
Cory LaViska
7518e07882 rename components.json 2021-03-25 08:15:26 -04:00
Cory LaViska
25f63df53a fix link button events 2021-03-24 11:33:44 -04:00
Cory LaViska
9e325dffa0 simplify code block logic 2021-03-24 11:26:20 -04:00
Cory LaViska
389dd0b44e update to lit-element and lit-html prerelease 2021-03-24 10:21:21 -04:00
1873 changed files with 96765 additions and 24928 deletions

View File

@@ -1,4 +1,4 @@
# http://editorconfig.org
# https://editorconfig.org
root = true

View File

@@ -35,7 +35,7 @@ This Code of Conduct applies within all project spaces, and it also applies when
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at cory@abeautifulsite.net. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@fontawesome.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

1
.github/FUNDING.yml vendored
View File

@@ -1 +0,0 @@
github: [claviska]

View File

@@ -1,38 +1,35 @@
---
name: Bug Report
about: Create a report to help us improve.
about: Create a bug report to help us fix a demonstrable problem with code in the library.
title: ''
labels: bug
assignees: claviska
assignees:
---
**Describe the bug**
A clear and concise description of what the bug is.
### Describe the bug
A bug is _a demonstrable problem_ caused by code in the library. Please provide a clear and concise description of what the bug is here.
**To Reproduce**
### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
2. Click on '...'
3. Scroll down to '...'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
### Demo
**Screenshots**
If applicable, add screenshots to help explain your problem.
If the bug isn't obvious, please provide a link to a CodePen or Fiddle with a minimal reproduction. Bugs that have repros get attention faster than those that don't.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Tip: use the CodePen button on any example in the docs!
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
### Screenshots
If applicable, add screenshots to help explain the bug.
**Additional context**
Add any other context about the problem here.
### Browser / OS
- OS: [e.g. Mac, Windows]
- Browser: [e.g. Chrome, Firefox, Safari]
- Browser version: [e.g. 22]
### Additional information
Provide any additional information about the bug here.

View File

@@ -1,4 +1,7 @@
contact_links:
- name: Feature Requests
url: https://github.com/shoelace-style/shoelace/discussions/categories/ideas
about: All requests for new features should go here.
- name: Help & Support
url: https://github.com/shoelace-style/shoelace/discussions/categories/help
about: Please don't create issues for personal help requests. Instead, ask your question on the discussion forum.

View File

@@ -1,20 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project.
title: ''
labels: feature
assignees: claviska
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

6
.github/SECURITY.md vendored
View File

@@ -1,7 +1,7 @@
# Reporting Security Issues
We take security issues in Shoelace very seriously and appreciate your efforts to disclose your findings responsibly.
We take security issues in Web Awesome very seriously and appreciate your efforts to disclose your findings responsibly.
To report a security issue, email [cory@abeautifulsite.net](mailto:cory@abeautifulsite.net) and include "SHOELACE SECURITY" in the subject line.
To report a security issue, email [support@fontawesome.com](mailto:support@fontawesome.com) and include "WEB AWESOME SECURITY" in the subject line.
Well respond as soon as possible and keep you updated throughout the process.
We'll respond as soon as possible and keep you updated throughout the process.

48
.github/workflows/client_tests.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
# # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Client Tests
on:
workflow_dispatch:
push:
branches: [next]
pull_request:
branches: [next]
jobs:
client_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run prettier
working-directory: ./packages/webawesome
- name: Build
run: npm run build
working-directory: ./packages/webawesome
- name: Install Playwright
run: npx playwright install --with-deps
working-directory: ./packages/webawesome
- name: Run CSR tests
# FAIL_FAST to fail on first failing test.
run: FAIL_FAST="true" CSR_ONLY="true" npm run test
working-directory: ./packages/webawesome

17
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# This workflow will create a GitHub release every time a tag is pushed
name: Create GitHub Release
on:
push:
tags:
- "v2.*"
- "v3.*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: "marvinpinto/action-automatic-releases@v1.2.1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

42
.github/workflows/ssr_tests.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: SSR Tests
on:
# push:
# branches: [next]
workflow_dispatch:
jobs:
ssr_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
working-directory: ./packages/webawesome
- name: Install Playwright
run: npx playwright install --with-deps
working-directory: ./packages/webawesome
- name: Run SSR tests
# FAIL_FAST to fail on first failing test.
run: FAIL_FAST="true" SSR_ONLY="true" npm run test
working-directory: ./packages/webawesome

14
.gitignore vendored
View File

@@ -1,6 +1,12 @@
.DS_Store
_site
.cache
docs/dist
dist
examples
.DS_Store
dist/
dist-cdn/
node_modules
packages/**/*/src/react
cdn/
yarn.lock
_bundle_
/packages/webawesome-pro
/packages/webawesome-app

4
.husky/pre-commit Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged

View File

@@ -1,9 +1,23 @@
# Files are relative to .prettierignore at the root of this monorepo.
# <https://github.com/prettier/prettier-vscode/issues/1252>
*.hbs
*.md
.cache
!packages/webawesome/docs/docs/patterns/**/*.md
docs/docs/patterns/blog-news/post-list.md
**/*/.cache
.github
dist
docs/*.md
src/components/icon/icons
cspell.json
packages/**/*/dist
packages/**/*/dist-cdn
packages/**/*/docs/search.json
packages/**/*/src/components/icon/icons
packages/**/*/src/react/index.ts
**/*/package.json
**/*/package-lock.json
**/*/tsconfig.json
**/*/tsconfig.prod.json
node_modules
package-lock.json
tsconfig.json
packages/**/*/_site
packages/webawesome/docs/assets/scripts/prism-downloaded.js

8
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bierner.lit-html",
"streetsidesoftware.code-spell-checker"
]
}

9
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"debug.enableStatusBarColor": false
}

View File

@@ -1,5 +1,5 @@
# Contributing to Shoelace
# Contributing to Web Awesome
Before contributing, please review the contributions guidelines at:
[shoelace.style/resources/contributing](https://shoelace.style/resources/contributing)
[webawesome.com/docs/resources/contributing](https://webawesome.com/docs/resources/contributing)

View File

@@ -1,4 +1,4 @@
Copyright (c) 2020 A Beautiful Site, LLC
Copyright (c) 2023 Fonticons, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

101
README.md
View File

@@ -1,6 +1,4 @@
# Shoelace
A forward-thinking library of web components.
# Web Awesome
- Works with all frameworks 🧩
- Works with CDNs 🚛
@@ -9,78 +7,109 @@ A forward-thinking library of web components.
- Built with accessibility in mind ♿️
- Open source 😸
Designed in New Hampshire by [Cory LaViska](https://twitter.com/claviska).
Built by the folks behind [Font Awesome](https://fontawesome.com/).
---
Documentation: [shoelace.style](https://shoelace.style)
Documentation: [webawesome.com](https://webawesome.com)
Source: [github.com/shoelace-style/shoelace](https://github.com/shoelace-style/shoelace)
Source: [github.com/shoelace-style/webawesome](https://github.com/shoelace-style/webawesome)
Twitter: [@shoelace_style](https://twitter.com/shoelace_style)
Twitter: [@webawesomer](https://twitter.com/webawesomer)
---
## Shoemakers 🥾
## Developers
Shoemakers, or "Shoelace developers," can use this documentation to learn how to build Shoelace from source. You will need Node >= 12.10.0 to build and run the project locally.
Developers can use this documentation to learn how to build Web Awesome from source. You will need Node >= 14.17 to build and run the project locally.
**You don't need to do any of this to use Shoelace!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of Shoelace.
**You don't need to do any of this to use Web Awesome!** This page is for people who want to contribute to the project, tinker with the source, or create a custom build of Web Awesome.
If that's not what you're trying to do, the [documentation website](https://shoelace.style) is where you want to be.
If that's not what you're trying to do, the [documentation website](https://webawesome.com) is where you want to be.
### What are you using to build Shoelace?
### What are you using to build Web Awesome?
Components are built with [LitElement](https://lit-element.polymer-project.org/), a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by [esbuild](https://esbuild.github.io/).
### Forking the Repo
### Understanding the Web Awesome monorepo
Start by [forking the repo](https://github.com/shoelace-style/shoelace/fork) on GitHub, then clone it locally and install dependencies.
Web Awesome uses [NPM workspaces](https://docs.npmjs.com/cli/v11/using-npm/workspaces) for its monorepo structure and is fairly minimal in what it provides.
By using a NPM workspaces and a monorepo structure, we can get consistent builds, shared configurations, and reduced duplication across repositories which reduces regressions and forces consistency across `webawesome`, `webawesome-pro`, and `webawesome-app`.
Generally, if you plan to only work with the free version of `webawesome` it is easiest to go to `packages/webawesome` and run all commands from there.
### Where do NPM dependencies go?
Any dependencies intended to be used across all packages (IE: `prettier`, `eslint`) that are _NOT_ used at runtime should be in the root `devDependencies` of `package.json`.
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/shoelace
cd shoelace
npm install -D -w prettier
```
Any dependencies that will be used at runtime by a package should be part of the specific package's `"dependencies"` such as `lit`. This is required because if that dependency is not in the `packages/*/package.json`, it will not be installed when used via NPM.
Individual packages are also free to install devDependencies as needed as long as they are specific to that package only.
To do install a package specific to a package, change your working directory to that package's root
IE: `cd packages/webawesome && npm install <package-name>`
### Forking the Repo
Start by [forking the repo](https://github.com/shoelace-style/webawesome/fork) on GitHub, then clone it locally and install dependencies.
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/webawesome
cd webawesome
npm install
```
### Developing
Once you've cloned the repo, run the following command.
Once you've cloned the repo, run the following command from the respective directory within `packages/*`
```bash
cd packages/webawesome
npm start
```
This will spin up the Shoelace dev server. After the initial build, a browser will open automatically.
There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically. The exception is component metadata used by the docs, which is generated by TypeDoc. This tool takes a few seconds to run so, to prevent long reload delays, it only runs once at startup.
The documentation is powered by Docsify, which uses raw markdown files to generate pages. As such, no static files are built for the docs.
This will spin up the dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically.
### Building
To generate a production build, run the following command.
```bash
cd packages/webawesome
npm run build
```
You can also run `npm run build:serve` to start an [`http-server`](https://www.npmjs.com/package/http-server) instance on `http://localhost:4000` after the build completes, so you can preview the production build.
### Creating New Components
To scaffold a new component, run the following command, replacing `wa-tag-name` with the desired tag name.
```bash
cd packages/webawesome
npm run create wa-tag-name
```
This will generate a source file, a stylesheet, and a docs page for you. When you start the dev server, you'll find the new component in the "Components" section of the sidebar.
### Adding additional packages
Right now the only additional packages are in private repositories.
To add additional packages from other repositories, run: `git clone <url> packages/<package-name>` to clone your repo into `packages/`.
Make sure to run `npm install` at the root of the monorepo after adding your package!
### Contributing
Shoelace is an open source project and contributions are encouraged! If you're interesting in contributing, please review the [contribution guidelines](CONTRIBUTING.md) first.
Web Awesome is an open source project and contributions are encouraged! If you're interesting in contributing, please review the [contribution guidelines](CONTRIBUTING.md) first.
## License
Shoelace is designed in New Hampshire by [Cory LaViska](https://twitter.com/claviska). Its available under the terms of the MIT license.
Designing, developing, and supporting this library requires a lot of time, effort, and skill. Id like to keep it open source so everyone can use it, but that doesnt provide me with any income.
**Therefore, if youre using my software to make a profit,** I respectfully ask that you help [fund its development](https://github.com/sponsors/claviska) by becoming a sponsor. There are multiple tiers to choose from with benefits at every level, including prioritized support, bug fixes, feature requests, and advertising.
👇 Your support is very much appreciated! 👇
- [Become a sponsor](https://github.com/sponsors/claviska)
- [Star on GitHub](https://github.com/shoelace-style/shoelace/stargazers)
- [Follow on Twitter](https://twitter.com/shoelace_style)
Whether you're building Shoelace or building something _with_ Shoelace — have fun creating! 🥾
Web Awesome is available under the terms of the MIT license.

223
cspell.json Normal file
View File

@@ -0,0 +1,223 @@
{
"version": "0.2",
"words": [
"activedescendant",
"allowfullscreen",
"animationend",
"Animista",
"APG",
"apos",
"atrule",
"autocorrect",
"autofix",
"autoload",
"autoloader",
"autoloading",
"autoplay",
"bezier",
"Blockquotes",
"boxicons",
"CACHEABLE",
"callout",
"callouts",
"canvastext",
"chatbubble",
"checkmark",
"Clippy",
"codebases",
"codepen",
"colocated",
"colorjs",
"colour",
"combobox",
"Commonmark",
"compat",
"Composability",
"Consolas",
"contenteditable",
"copydir",
"Cotte",
"coverpage",
"crossorigin",
"crutchcorn",
"csspart",
"cssproperty",
"cssstate",
"datetime",
"describedby",
"Docsify",
"dogfood",
"dropdowns",
"easings",
"ecommerce",
"endfor",
"endraw",
"endregion",
"enterkeyhint",
"eqeqeq",
"erroneou",
"errormessage",
"esbuild",
"exportmaps",
"exportparts",
"fieldsets",
"focusin",
"focusout",
"fontawesome",
"formaction",
"formdata",
"formenctype",
"formmethod",
"formnovalidate",
"formtarget",
"FOUC",
"FOUCE",
"Frontmatter",
"fullscreen",
"gestern",
"giga",
"globby",
"Grayscale",
"haspopup",
"heroicons",
"hexa",
"Hotwire",
"Iconoir",
"Iframes",
"iife",
"inputmode",
"ionicon",
"ionicons",
"jsDelivr",
"jsfiddle",
"keydown",
"keyframes",
"keymaker",
"Konnor",
"Kool",
"labelledby",
"Laravel",
"linkify",
"listbox",
"listitem",
"litelement",
"longform",
"lowercasing",
"Lucide",
"maxlength",
"Menlo",
"menuitemcheckbox",
"menuitemradio",
"metaframeworks",
"middlewares",
"minlength",
"minmax",
"monospace",
"mousedown",
"mousemove",
"mouseout",
"mouseup",
"multiselectable",
"nextjs",
"nocheck",
"noindex",
"noopener",
"noreferrer",
"novalidate",
"Numberish",
"nums",
"oklab",
"oklch",
"onscrollend",
"outdir",
"ParamagicDev",
"peta",
"petabit",
"Preact",
"preconnect",
"prerendered",
"prismjs",
"progressbar",
"radiogroup",
"Railsbyte",
"referrerpolicy",
"remixicon",
"reregister",
"resizer",
"resizers",
"retargeted",
"RETRYABLE",
"rgba",
"roadmap",
"Roboto",
"roledescription",
"Sapan",
"saturationl",
"Schilp",
"scrollbars",
"scrollend",
"scroller",
"Scrollers",
"Segoe",
"semibold",
"shadowrootmode",
"Shortcode",
"Shortcodes",
"sitedir",
"slotchange",
"smartquotes",
"spacebar",
"srcdoc",
"stylesheet",
"svgs",
"Tabbable",
"tabindex",
"tabler",
"tablist",
"tabpanel",
"tbody",
"templating",
"tera",
"testid",
"textareas",
"textfield",
"thead",
"Themer",
"tinycolor",
"transitionend",
"treeitem",
"treeshaking",
"Triaging",
"turbolinks",
"typeof",
"unbundles",
"unbundling",
"unicons",
"unsanitized",
"unsupportive",
"valpha",
"valuenow",
"valuetext",
"viewports",
"Vuejs",
"WCAG",
"webawesome",
"webawesomer",
"WEBP",
"Webpacker",
"xmark",
"zoomable"
],
"ignorePaths": [
"package.json",
"package-lock.json",
"docs/assets/examples/include.html",
".vscode/**",
"src/translations/!(en).ts",
"**/*.min.js"
],
"ignoreRegExpList": [
"(^|[^a-z])sl[a-z]*(^|[^a-z])"
],
"useGitignore": true
}

View File

@@ -1,3 +0,0 @@
# Not Found
Sorry, I couldn't find that page.

View File

@@ -1,72 +0,0 @@
- Getting Started
- [Overview](/)
- [Installation](/getting-started/installation.md)
- [Usage](/getting-started/usage.md)
- [Customizing](/getting-started/customizing.md)
- [Themes](/getting-started/themes.md)
- Resources
- [Community](/resources/community.md)
- [Contributing](/resources/contributing.md)
- [Changelog](/resources/changelog.md)
- Components
- [Alert](/components/alert.md)
- [Avatar](/components/avatar.md)
- [Badge](/components/badge.md)
- [Button](/components/button.md)
- [Button Group](/components/button-group.md)
- [Card](/components/card.md)
- [Checkbox](/components/checkbox.md)
- [Color Picker](/components/color-picker.md)
- [Details](/components/details.md)
- [Dialog](/components/dialog.md)
- [Drawer](/components/drawer.md)
- [Dropdown](/components/dropdown.md)
- [Form](/components/form.md)
- [Icon](/components/icon.md)
- [Icon Button](/components/icon-button.md)
- [Image Comparer](/components/image-comparer.md)
- [Input](/components/input.md)
- [Menu](/components/menu.md)
- [Menu Divider](/components/menu-divider.md)
- [Menu Item](/components/menu-item.md)
- [Menu Label](/components/menu-label.md)
- [Progress Bar](/components/progress-bar.md)
- [Progress Ring](/components/progress-ring.md)
- [Radio](/components/radio.md)
- [Range](/components/range.md)
- [Rating](/components/rating.md)
- [Responsive Embed](/components/responsive-embed.md)
- [Select](/components/select.md)
- [Skeleton](/components/skeleton.md)
- [Spinner](/components/spinner.md)
- [Switch](/components/switch.md)
- [Tab Group](/components/tab-group.md)
- [Tab](/components/tab.md)
- [Tab Panel](/components/tab-panel.md)
- [Tag](/components/tag.md)
- [Textarea](/components/textarea.md)
- [Tooltip](/components/tooltip.md)
- Utilities
- [Animation](/components/animation.md)
- [Format Bytes](/components/format-bytes.md)
- [Format Date](/components/format-date.md)
- [Format Number](/components/format-number.md)
- [Include](/components/include.md)
- [Relative Time](/components/relative-time.md)
- [Resize Observer](/components/resize-observer.md)
- Design Tokens
- [Typography](/tokens/typography.md)
- [Color](/tokens/color.md)
- [Spacing](/tokens/spacing.md)
- [Elevation](/tokens/elevation.md)
- [Border Radius](/tokens/border-radius.md)
- [Transition](/tokens/transition.md)
- [Z-index](/tokens/z-index.md)
- Tutorials
- [Integrating with NextJS](/tutorials/integrating-with-nextjs.md)
- [Integrating with Rails](/tutorials/integrating-with-rails.md)

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 678 KiB

View File

@@ -1,7 +0,0 @@
<svg viewBox="0 0 127 141" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g fill-rule="nonzero" fill="#409eff">
<path d="M102.375,90.85 C102.979,90.557 103.57,90.215 104.15,89.826 L106.425,88.501 C106.848,88.19 107.64,87.573 108.8,86.65 L108.95,86.501 C109.883,85.567 110.916,85.117 112.05,85.15 C112.55,85.15 113.133,85.284 113.8,85.55 L122.3,78 C122.533,77.8 122.767,77.633 123,77.5 L123.05,77.5 C123.95,76.967 124.7,77 125.3,77.6 C126.367,78.166 126.45,79.133 125.55,80.5 L116.65,88.399 C116.717,88.533 116.75,88.666 116.75,88.799 C116.883,89.399 116.833,89.999 116.6,90.599 C116.4,90.999 116.117,91.382 115.75,91.749 C115.379,92.145 114.996,92.528 114.6,92.898 L109.45,96.648 C108.99,96.97 108.523,97.27 108.05,97.548 C107.46,97.906 106.86,98.232 106.25,98.523 C105.985,98.644 105.718,98.76 105.45,98.874 C103.841,99.559 102.174,100.017 100.45,100.249 C99.65,106.982 97.35,113.183 93.55,118.849 C88.75,125.915 82.183,131.299 73.85,134.999 C65.55,138.699 56.567,140.549 46.9,140.549 C33.567,140.415 22.75,137.415 14.45,131.549 C4.817,124.75 0,115.7 0,104.399 L0,102.849 C0.333,95.149 2.6,87.849 6.8,80.95 C10.933,74.116 16.983,69.5 24.95,67.1 C29.05,65.9 33.166,65.3 37.3,65.3 C41.567,65.3 45.967,66.083 50.5,67.65 C55.033,69.216 60.15,71.916 65.85,75.75 L80.7,85.7 C84.833,88.399 88.6,90.233 92,91.2 C91.3,84.3 88.8,78.399 84.5,73.5 C80.2,68.533 74.717,64.9 68.05,62.6 L61.65,60.4 C55.783,58.333 51.417,56.3 48.55,54.3 C40.817,49.067 36.517,41.883 35.65,32.75 L35.5,30.05 C35.5,21.25 39.067,13.883 46.2,7.95 C52.567,2.65 60.133,0 68.9,0 C75.5,0 81.417,1.9 86.65,5.7 C91.917,9.533 94.9,14.967 95.6,22 L95.75,24.75 C95.75,29.85 94.433,34.216 91.8,37.85 C89.1,41.483 86.717,43.3 84.65,43.3 C84.21,43.269 83.802,43.21 83.425,43.125 L74.1,51.9 C72.6,52.733 71.583,52.583 71.05,51.45 C70.517,50.85 70.567,50.1 71.2,49.2 L71.25,49.15 C71.383,48.95 71.567,48.733 71.8,48.5 L80.475,40.275 C80.376,39.872 80.318,39.431 80.3,38.95 C80.3,37.817 80.75,36.867 81.65,36.1 C85.45,32.7 87.35,28.784 87.35,24.35 C87.35,19.95 85.683,16.25 82.35,13.25 C79.017,10.25 74.467,8.716 68.7,8.65 C61.5,8.65 55.583,10.817 50.95,15.15 C46.317,19.483 44,24.683 44,30.75 C44,35.65 45.883,40.066 49.65,44 C53.383,47.9 59.15,50.966 66.95,53.2 C77.883,56.367 86.233,61.7 92,69.2 C97.133,75.833 100,83.283 100.6,91.55 C101.199,91.365 101.791,91.132 102.375,90.85 Z M71.95,49.05 C71.95,49.35 72.117,49.5 72.45,49.5 C72.483,49.5 75.117,47.066 80.35,42.2 C80.35,41.533 78.95,42.45 76.15,44.95 C73.35,47.483 71.95,48.85 71.95,49.05 Z M74.15,50.8 C74.15,50.533 74.017,50.4 73.75,50.4 C73.45,50.4 73.183,50.55 72.95,50.85 C72.416,50.817 72.033,50.884 71.8,51.05 C71.7,51.117 71.65,51.183 71.65,51.25 C71.65,51.45 71.783,51.6 72.05,51.7 L72.95,51.7 C73.75,51.4 74.15,51.1 74.15,50.8 Z M80.35,45.35 C80.35,44.583 79.9,44.583 79,45.35 C78.567,45.75 78.017,46.317 77.35,47.05 C77.117,47.217 76.633,47.667 75.9,48.4 C75.133,49.2 74.75,49.683 74.75,49.85 L74.8,50.2 C75,50.267 75.133,50.3 75.2,50.3 C75.233,50.3 76.1,49.5 77.8,47.9 C79.5,46.3 80.35,45.45 80.35,45.35 Z M124.2,78.3 L115.8,85.7 C116.3,85.967 116.667,86.349 116.9,86.849 L125.2,79.45 C125.266,79.116 125.217,78.849 125.05,78.649 C124.883,78.517 124.6,78.399 124.2,78.3 Z M123.75,78.05 L123.55,77.85 L116.15,83.85 L116.6,84.4 L123.75,78.05 Z M91.85,99.899 C89.65,99.333 87.617,98.649 85.75,97.849 C81.55,96.149 76.333,93.183 70.1,88.95 L59.85,82 C55.517,79.233 51.567,77.166 48,75.8 C44.4,74.467 40.867,73.8 37.4,73.8 L35.9,73.8 C27.067,74.267 20.2,77.583 15.3,83.75 C10.734,89.45 8.45,96.184 8.45,103.95 C8.45,112.683 11.95,119.516 18.95,124.45 C25.916,129.416 35.467,131.899 47.6,131.899 C57.133,131.899 65.166,130.2 71.7,126.799 C78.2,123.399 83.25,118.899 86.85,113.299 C89.55,109.033 91.217,104.566 91.85,99.899 Z"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="879px" height="553px" viewBox="0 0 879 553" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 53.2 (72643) - https://sketchapp.com -->
<title>undraw-content-team</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="undraw-content-team" transform="translate(-3.000000, 0.000000)">
<rect id="Rectangle" fill-opacity="0.25" fill="#FFFFFF" x="180" y="16" width="579" height="343" rx="20"></rect>
<path d="M840.86295,552.21468 L98.22937,552.21468 C84.4769827,552.21468 73.32847,541.066167 73.32847,527.31378 L73.32847,527.31378 C342.533003,496.02706 606.678133,496.02706 865.76386,527.31378 L865.76386,527.31378 C865.763854,541.066169 854.615339,552.21468 840.86295,552.21468 Z" id="Path" fill="#CCCCCC" fill-rule="nonzero"></path>
<path d="M865.76386,528.77851 L73.32847,527.31375 L165.16896,372.78153 L165.60837,372.04915 L165.60837,31.47769 C165.607672,23.1290737 168.923838,15.1221947 174.827202,9.21883153 C180.730565,3.31546831 188.737444,-0.00069762467 197.08606,2.84217094e-14 L737.61198,2.84217094e-14 C745.960596,-0.00069762467 753.967475,3.31546831 759.870838,9.21883153 C765.774202,15.1221947 769.090368,23.1290737 769.08967,31.47769 L769.08967,374.39269 L865.76386,528.77851 Z M196.36834,21.97141 C190.70822,21.9777587 186.121369,26.5646095 186.11502,32.22473 L186.11502,342.75394 C186.121622,348.413956 190.708324,353.000658 196.36834,353.00726 L742.72398,353.00726 C748.383893,353.000411 752.970451,348.413853 752.9773,342.75394 L752.9773,32.22473 C752.970704,26.5647122 748.383998,21.9780061 742.72398,21.97141 L196.36834,21.97141 Z" id="Combined-Shape" fill="#E6E6E6" fill-rule="nonzero"></path>
<path d="M199.95903,394.02055 C198.24391,394.023463 196.686317,395.021305 195.9667,396.57816 L167.66779,458.0981 C167.041726,459.458563 167.151668,461.044211 167.959498,462.305253 C168.767328,463.566295 170.161797,464.32907 171.6594,464.3291 L766.77054,464.3291 C768.293506,464.329083 769.707849,463.540407 770.508355,462.244793 C771.308862,460.949179 771.381351,459.331427 770.69993,457.96941 L739.93993,396.44947 C739.199697,394.957483 737.676056,394.015676 736.01054,394.0206 L199.95903,394.02055 Z" id="Path" fill="#CCCCCC" fill-rule="nonzero"></path>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="467.34902" cy="10.25332" r="6.59142"></circle>
<path d="M408.85444,476.04714 C406.86865,476.049642 405.130517,477.381666 404.61179,479.29851 L397.51328,505.66419 C397.15753,506.984241 397.436508,508.39467 398.26801,509.479887 C399.099513,510.565104 400.388783,511.201438 401.75593,511.20139 L536.75349,511.20139 C538.174875,511.201399 539.508438,510.513737 540.332692,509.355747 C541.156947,508.197757 541.370032,506.712543 540.9046,505.36952 L531.77845,479.00384 C531.165175,477.234516 529.498505,476.04781 527.62591,476.04714 L408.85444,476.04714 Z" id="Path" fill="#CCCCCC" fill-rule="nonzero"></path>
<polygon id="Path" fill="#CCCCCC" fill-rule="nonzero" points="769.09 366.922 769.09 372.782 165.169 372.782 165.623 372.049 165.623 366.922"></polygon>
<path d="M694.54732,380.34397 C694.063752,380.344578 693.640491,380.668942 693.51417,381.13572 L691.78557,387.55617 C691.698952,387.877623 691.766894,388.221078 691.969377,388.485341 C692.17186,388.749605 692.485812,388.904563 692.81873,388.90456 L725.69267,388.90456 C726.038798,388.904561 726.36354,388.737104 726.564256,388.455115 C726.764973,388.173127 726.816861,387.811455 726.70352,387.48441 L724.48117,381.06397 C724.331826,380.633113 723.925966,380.344133 723.46996,380.34397 L694.54732,380.34397 Z" id="Path" fill="#CCCCCC" fill-rule="nonzero"></path>
<path d="M646.54732,380.34397 C646.063752,380.344578 645.640491,380.668942 645.51417,381.13572 L643.78557,387.55617 C643.698952,387.877623 643.766894,388.221078 643.969377,388.485341 C644.17186,388.749605 644.485812,388.904563 644.81873,388.90456 L677.69267,388.90456 C678.038798,388.904561 678.36354,388.737104 678.564256,388.455115 C678.764973,388.173127 678.816861,387.811455 678.70352,387.48441 L676.48117,381.06397 C676.331826,380.633113 675.925966,380.344133 675.46996,380.34397 L646.54732,380.34397 Z" id="Path" fill="#CCCCCC" fill-rule="nonzero"></path>
<path d="M507.48137,421.13959 L510.05784,421.13959 L504.90484,76.75135 L502.32836,76.75135 L502.43115,83.62195 L444.68449,83.62195 L444.78727,76.75135 L442.2108,76.75135 L437.0578,421.13959 L439.63428,421.13959 L439.96839,398.81019 L507.14722,398.81019 L507.48137,421.13959 Z M503.76762,172.93959 L443.34807,172.93959 L443.9777,130.85725 L503.13798,130.85725 L503.76762,172.93959 Z M503.8062,175.51607 L504.43583,217.5984 L442.67983,217.5984 L443.30947,175.51607 L503.8062,175.51607 Z M504.47441,220.17488 L505.10405,262.25722 L442.01164,262.25722 L442.64128,220.17488 L504.47441,220.17488 Z M505.14262,264.83369 L505.77226,306.91603 L441.34343,306.91603 L441.97307,264.83369 L505.14262,264.83369 Z M505.81083,309.49251 L506.44047,351.5749 L440.67517,351.5749 L441.30481,309.49251 L505.81083,309.49251 Z M502.46977,86.19843 L503.09941,128.28077 L444.01628,128.28077 L444.64592,86.19843 L502.46977,86.19843 Z M440.007,396.23371 L440.63664,354.15137 L506.47905,354.15137 L507.10869,396.23371 L440.007,396.23371 Z" id="Shape" fill="#3F3D56" fill-rule="nonzero"></path>
<circle id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="460.7944" cy="153.35761" r="42.01233"></circle>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" transform="translate(481.263536, 194.779340) rotate(-10.261060) translate(-481.263536, -194.779340) " x="474.881916" y="183.345595" width="12.76324" height="22.86749"></rect>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" transform="translate(456.145380, 199.326392) rotate(-10.261060) translate(-456.145380, -199.326392) " x="449.76376" y="187.892647" width="12.76324" height="22.86749"></rect>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(455.991944, 213.405824) rotate(-40.261060) translate(-455.991944, -213.405824) " cx="455.991944" cy="213.405824" rx="10.63602" ry="3.98853"></ellipse>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(480.586874, 208.953401) rotate(-40.261060) translate(-480.586874, -208.953401) " cx="480.586874" cy="208.953401" rx="10.63605" ry="3.98853"></ellipse>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="457.85318" cy="143.08115" r="14.35864"></circle>
<circle id="Oval" fill="#3F3D56" fill-rule="nonzero" cx="451.95181" cy="137.93436" r="4.78622"></circle>
<path d="M493.93625,107.65269 C494.56802,92.0991 481.16312,78.92509 463.99545,78.22776 C446.82778,77.53043 432.39853,89.57376 431.76672,105.12736 C431.13491,120.68096 443.06863,124.21482 460.23627,124.91221 C477.40391,125.6096 493.30447,123.20627 493.93625,107.65269 Z" id="Path" fill="#009DFF" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(422.001785, 145.703659) rotate(-77.089900) translate(-422.001785, -145.703659) " cx="422.001785" cy="145.703659" rx="6.59448" ry="21.00616"></ellipse>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(504.470422, 159.418119) rotate(-77.089900) translate(-504.470422, -159.418119) " cx="504.470422" cy="159.418119" rx="6.59448" ry="21.00616"></ellipse>
<path d="M472.3331,169.91416 C472.9488,173.280144 471.720947,176.718794 469.112518,178.933525 C466.504089,181.148255 462.911834,181.802199 459.690258,180.648779 C456.468682,179.495358 454.107795,176.710012 453.4978,173.34299 L453.49445,173.3245 C452.5527,168.12235 456.57483,166.2815 461.77701,165.33976 C466.97919,164.39802 471.39139,164.71201 472.3331,169.91416 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(312.185926, 293.633672) rotate(-69.082170) translate(-312.185926, -293.633672) " cx="312.185926" cy="293.633672" rx="21.53369" ry="6.76007"></ellipse>
<circle id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(272.378778, 326.155721) rotate(-80.782520) translate(-272.378778, -326.155721) " cx="272.378778" cy="326.155721" r="43.06735"></circle>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="252.75315" y="359.95537" width="13.08374" height="23.44171"></rect>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="278.92063" y="359.95537" width="13.08374" height="23.44171"></rect>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="263.65629" cy="383.66967" rx="10.90314" ry="4.08868"></ellipse>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="289.82377" cy="383.12453" rx="10.90314" ry="4.08868"></ellipse>
<path d="M230.60203,286.10434 C227.12455,270.53055 238.2407,254.79388 255.43064,250.9555 C272.62058,247.11712 289.37486,256.63058 292.85233,272.20438 C296.3298,287.77818 284.93742,293.52203 267.74748,297.36038 C250.55754,301.19873 234.07951,301.67812 230.60203,286.10434 Z" id="Path" fill="#009DFF" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(223.870603, 306.172293) rotate(-64.625740) translate(-223.870603, -306.172293) " cx="223.870603" cy="306.172293" rx="6.76007" ry="21.53368"></ellipse>
<circle id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="85.9008" cy="369.76318" r="43.06733"></circle>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="66.27519" y="403.56287" width="13.08374" height="23.44171"></rect>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="92.44267" y="403.56287" width="13.08374" height="23.44171"></rect>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="77.17827" cy="427.27716" rx="10.90314" ry="4.08868"></ellipse>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="103.34581" cy="426.732" rx="10.90314" ry="4.08868"></ellipse>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="86.99113" cy="358.86008" r="14.71922"></circle>
<circle id="Oval" fill="#3F3D56" fill-rule="nonzero" cx="86.99113" cy="358.86008" r="4.90642"></circle>
<path d="M44.12401,329.71183 C40.64653,314.13804 51.76268,298.4014 68.95262,294.56302 C86.14256,290.72464 102.89683,300.23813 106.37431,315.81192 C109.85179,331.38571 98.45939,337.12961 81.26945,340.96792 C64.07951,344.80623 47.60154,345.28568 44.12401,329.71183 Z" id="Path" fill="#E6E6E6" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(110.988725, 213.490755) rotate(-69.082170) translate(-110.988725, -213.490755) " cx="110.988725" cy="213.490755" rx="21.53369" ry="6.76007"></ellipse>
<circle id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(71.181568, 246.012788) rotate(-80.782520) translate(-71.181568, -246.012788) " cx="71.1815681" cy="246.012788" r="43.06735"></circle>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="51.55595" y="279.81244" width="13.08374" height="23.44171"></rect>
<rect id="Rectangle" fill="#2F2E41" fill-rule="nonzero" x="77.72343" y="279.81244" width="13.08374" height="23.44171"></rect>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="62.45909" cy="303.52674" rx="10.90314" ry="4.08868"></ellipse>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" cx="88.62657" cy="302.9816" rx="10.90314" ry="4.08868"></ellipse>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="72.27189" cy="235.10965" r="14.71922"></circle>
<circle id="Oval" fill="#3F3D56" fill-rule="nonzero" cx="72.27189" cy="235.10965" r="4.90642"></circle>
<path d="M29.40483,205.96134 C25.92735,190.38755 37.0435,174.65088 54.23344,170.8125 C71.42338,166.97412 88.17766,176.48758 91.65513,192.06138 C95.1326,207.63518 83.74022,213.37903 66.55028,217.21738 C49.36034,221.05573 32.88231,221.53519 29.40483,205.96134 Z" id="Path" fill="#009DFF" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(22.673401, 226.029366) rotate(-64.625740) translate(-22.673401, -226.029366) " cx="22.6734006" cy="226.029366" rx="6.76007" ry="21.53368"></ellipse>
<path d="M50.02702,261.54972 C50.02702,265.76487 60.88029,274.08829 72.92357,274.08829 C84.96685,274.08829 96.25871,262.22129 96.25871,258.0062 C96.25871,253.79111 84.96678,258.82395 72.92357,258.82395 C60.88036,258.82395 50.02702,257.33457 50.02702,261.54972 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M113.52376,81.56869 C111.867655,81.5704977 110.525568,82.9125851 110.52376,84.56869 L110.52376,208.56869 C110.525568,210.224795 111.867655,211.566882 113.52376,211.56869 L400.52376,211.56869 C402.179865,211.566882 403.521952,210.224795 403.52376,208.56869 L403.52376,84.56869 C403.521952,82.9125851 402.179865,81.5704977 400.52376,81.56869 L113.52376,81.56869 Z" id="Path" fill="#009DFF" fill-rule="nonzero"></path>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="191.01816" cy="146.56869" r="29.1211"></circle>
<path d="M256.7436,142.69417 C254.884983,142.724723 253.39428,144.240132 253.39428,146.099 C253.39428,147.957868 254.884983,149.473277 256.7436,149.50383 L348.68926,149.50383 C349.906316,149.524778 351.042001,148.894505 351.668119,147.850647 C352.294237,146.806789 352.31556,145.508108 351.72405,144.444258 C351.132539,143.380407 350.018157,142.713189 348.80107,142.69417 C348.763797,142.693537 348.726527,142.693537 348.68926,142.69417 L256.7436,142.69417 Z" id="b71acdfd-6a55-428e-917a-53f192cb0203" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M256.7436,122.96697 C254.884983,122.997523 253.39428,124.512932 253.39428,126.3718 C253.39428,128.230668 254.884983,129.746077 256.7436,129.77663 L302.65917,129.77663 C303.876249,129.797613 305.011971,129.167347 305.638111,128.123473 C306.26425,127.0796 306.285572,125.78089 305.694037,124.717025 C305.102503,123.65316 303.988082,122.985951 302.77097,122.96697 C302.733703,122.966337 302.696437,122.966337 302.65917,122.96697 L256.7436,122.96697 Z" id="ad4fbcfa-41b0-45f9-a593-23b6dc3fe165" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M256.7436,163.36076 C254.884983,163.391313 253.39428,164.906722 253.39428,166.76559 C253.39428,168.624458 254.884983,170.139867 256.7436,170.17042 L348.68926,170.17042 C349.906316,170.191368 351.042001,169.561095 351.668119,168.517237 C352.294237,167.473379 352.31556,166.174698 351.72405,165.110848 C351.132539,164.046997 350.018157,163.379779 348.80107,163.36076 C348.763797,163.360093 348.726527,163.360093 348.68926,163.36076 L256.7436,163.36076 Z" id="bce2a7cd-a325-424d-9b3a-f63d1dad5aba" fill="#FFFFFF" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(695.602650, 372.610085) rotate(-20.917830) translate(-695.602650, -372.610085) " cx="695.60265" cy="372.610085" rx="6.76007" ry="21.53369"></ellipse>
<circle id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(726.409811, 414.132115) rotate(-9.217470) translate(-726.409811, -414.132115) " cx="726.409811" cy="414.132115" r="43.06733"></circle>
<polygon id="Path" fill="#2F2E41" fill-rule="nonzero" points="746.035 447.932 732.952 447.932 735.512 476.005 746.058 473.14"></polygon>
<polygon id="Path" fill="#2F2E41" fill-rule="nonzero" points="717.512 448.005 704.428 448.005 706.988 476.078 717.058 473.14"></polygon>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(706.318056, 473.319125) rotate(-4.181640) translate(-706.318056, -473.319125) " cx="706.318056" cy="473.319125" rx="10.90314" ry="4.08868"></ellipse>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="725.31949" cy="403.22896" r="14.71922"></circle>
<circle id="Oval" fill="#3F3D56" fill-rule="nonzero" cx="725.31949" cy="403.22896" r="4.90642"></circle>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(771.918005, 384.148727) rotate(-53.549900) translate(-771.918005, -384.148727) " cx="771.918005" cy="384.148727" rx="21.53368" ry="6.76007"></ellipse>
<path d="M705.39698,436.33866 C705.39698,432.86466 714.34198,426.00466 724.26778,426.00466 C734.19358,426.00466 743.50006,435.78516 743.50006,439.25914 C743.50006,442.73312 734.19351,438.58514 724.26778,438.58514 C714.34205,438.58514 705.39698,439.81268 705.39698,436.33866 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(724.448520, 433.325266) rotate(-180.000000) translate(-724.448520, -433.325266) "></path>
<path d="M847.1767,378.54172 L611.43117,345.86064 C607.604361,345.32541 604.932725,341.793834 605.45868,337.96574 L631.96057,146.79396 C632.495641,142.967058 636.027329,140.295337 639.85547,140.82147 L875.60098,173.50256 C879.427885,174.037626 882.099609,177.569318 881.57347,181.39746 L855.0716,372.56924 C854.536375,376.396051 851.004794,379.067687 847.1767,378.54172 L847.1767,378.54172 Z" id="Path" fill="#009DFF" fill-rule="nonzero"></path>
<path d="M762.72231,318.87957 L642.36784,302.19498 C642.216871,302.176045 642.067969,302.14324 641.92302,302.09698 L712.51355,211.39072 C713.394132,210.238632 714.82651,209.649483 716.262854,209.8486 C717.699198,210.047717 718.917295,211.004295 719.45127,212.35248 L748.48059,283.8148 L749.87186,287.23459 L762.72231,318.87957 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<polygon id="Path" fill="#000000" fill-rule="nonzero" opacity="0.2" points="762.722 318.879 721.63 313.183 745.864 286.679 747.609 284.77 748.481 283.815 749.872 287.235"></polygon>
<path d="M829.73481,328.16942 L725.63807,313.73863 L749.87186,287.23463 L751.61612,285.32515 L783.19533,250.78503 C784.29885,249.735613 785.796059,249.204111 787.314261,249.322828 C788.832463,249.441546 790.228856,250.199316 791.15584,251.40751 C791.271244,251.575507 791.375823,251.750689 791.46894,251.93199 L829.73481,328.16942 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<circle id="Oval" fill="#FFFFFF" fill-rule="nonzero" cx="764.18602" cy="224.18353" r="18"></circle>
<rect id="Rectangle" fill="#3F3D56" fill-rule="nonzero" transform="translate(653.262165, 167.923576) rotate(7.892770) translate(-653.262165, -167.923576) " x="642.262129" y="156.923541" width="22.0000711" height="22.0000711"></rect>
<path d="M768.18655,374.08068 C771.66403,358.50689 760.54788,342.77022 743.35794,338.93184 C726.168,335.09346 709.41373,344.60692 705.93625,360.18071 C702.45877,375.7545 713.85117,381.49837 731.04111,385.33671 C748.23105,389.17505 764.70908,389.6545 768.18655,374.08068 Z" id="Path" fill="#F2F2F2" fill-rule="nonzero"></path>
<ellipse id="Oval" fill="#2F2E41" fill-rule="nonzero" transform="translate(735.010556, 473.249892) rotate(-4.181640) translate(-735.010556, -473.249892) " cx="735.010556" cy="473.249892" rx="10.90314" ry="4.08868"></ellipse>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,167 +0,0 @@
.code-block {
position: relative;
border-radius: 3px;
background: var(--sl-color-gray-50);
margin-bottom: 1.5rem;
}
.code-block__preview {
position: relative;
border: solid 1px var(--sl-color-gray-200);
border-bottom: none;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
background-color: white;
min-width: 20rem;
max-width: 100%;
padding: 1.5rem 3.25rem 1.5rem 1.5rem;
}
/* Block the preview while dragging to prevent iframes from intercepting drag events */
.code-block__preview--dragging:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: ew-resize;
}
.code-block__resizer {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 1.75rem;
font-size: 20px;
color: var(--sl-color-gray-500);
background-color: white;
border-left: solid 1px var(--sl-color-gray-200);
border-top-right-radius: 3px;
cursor: ew-resize;
transition: 250ms background-color;
}
.code-block__resizer:focus {
outline: none;
box-shadow: 0 0 0 1px var(--sl-color-primary-400), 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-primary);
background-color: var(--sl-color-primary-50);
color: var(--sl-color-primary-500);
z-index: 2;
}
@media screen and (max-width: 600px) {
.code-block__preview {
padding-right: 1.5rem;
}
.code-block__resizer {
display: none;
}
}
.code-block__source {
border: solid 1px var(--sl-color-gray-200);
border-bottom: none;
border-radius: 0 !important;
margin: 0;
display: none;
}
.code-block__source .docsify-copy-code-button {
border-top-right-radius: 0;
}
.code-block--expanded .code-block__source {
display: block;
}
.code-block__toggle {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 2.5rem;
border: solid 1px var(--sl-color-gray-200);
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
background: var(--sl-color-white);
font: inherit;
font-size: 0.875rem;
color: var(--sl-color-gray-600);
cursor: pointer;
transition: 250ms background-color;
-webkit-appearance: none;
}
.code-block__toggle:hover,
.code-block__toggle:active {
border-color: var(--sl-color-primary-400);
background-color: var(--sl-color-primary-50);
color: var(--sl-color-primary-500);
}
.code-block__toggle:focus {
outline: none;
border-color: var(--sl-color-primary-400);
background-color: var(--sl-color-primary-50);
color: var(--sl-color-primary-500);
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-primary);
}
.code-block__toggle svg {
width: 1em;
height: 1em;
margin-left: 0.25rem;
transition: 250ms transform;
}
.code-block--expanded .code-block__toggle svg {
transform: rotate(180deg);
}
/* Dark theme */
.sl-theme-dark .code-block {
background-color: var(--sl-color-gray-800);
}
.sl-theme-dark .code-block__preview {
background-color: var(--sl-color-gray-900);
border-color: var(--sl-color-gray-800);
}
.sl-theme-dark .code-block__source {
border-color: var(--sl-color-gray-800);
}
.sl-theme-dark .code-block__resizer {
border-left-color: var(--sl-color-gray-800);
background-color: var(--sl-color-gray-900);
color: var(--sl-color-gray-400);
}
.sl-theme-dark .code-block__toggle {
background-color: var(--sl-color-gray-900);
border-color: var(--sl-color-gray-800);
color: var(--sl-color-gray-400);
}
.sl-theme-dark .code-block__toggle:hover,
.sl-theme-dark .code-block__toggle:active {
background-color: var(--sl-color-gray-900);
border-color: var(--sl-color-gray-800);
color: var(--sl-color-gray-400);
}
.sl-theme-dark .code-block__toggle:focus {
border-color: var(--sl-color-primary-500);
background-color: var(--sl-color-primary-900);
color: var(--sl-color-primary-500);
}

View File

@@ -1,160 +0,0 @@
(() => {
let count = 1;
if (!window.$docsify) {
throw new Error('Docsify must be loaded before installing this plugin.');
}
function runScript(script) {
const newScript = document.createElement('script');
if (script.type === 'module') {
newScript.type = 'module';
newScript.textContent = script.innerHTML;
} else {
newScript.appendChild(document.createTextNode(`(() => { ${script.innerHTML} })();`));
}
script.parentNode.replaceChild(newScript, script);
}
function wrap(el, wrapper) {
el.parentNode.insertBefore(wrapper, el);
wrapper.appendChild(el);
}
window.$docsify.plugins.push((hook, vm) => {
// Convert code blocks to previews
hook.afterEach(function (html, next) {
const domParser = new DOMParser();
const doc = domParser.parseFromString(html, 'text/html');
[...doc.querySelectorAll('code[class^="lang-"]')].map(code => {
if (code.classList.contains('preview')) {
const codeBlock = document.createElement('div');
const preview = document.createElement('div');
const pre = code.closest('pre');
const preId = `code-block-preview-${count}`;
const toggle = document.createElement('button');
const toggleId = `code-block-toggle-${count}`;
wrap(pre, codeBlock);
codeBlock.classList.add('code-block');
preview.classList.add('code-block__preview');
preview.innerHTML = code.textContent;
preview.innerHTML += `
<div
class="code-block__resizer"
tabindex="0"
>
<sl-icon name="grip-vertical"></sl-icon>
</div>
`;
pre.id = preId;
pre.classList.add('code-block__source');
pre.setAttribute('data-lang', pre.getAttribute('data-lang').replace(/ preview$/, ''));
pre.setAttribute('aria-labelledby', toggleId);
toggle.id = toggleId;
toggle.type = 'button';
toggle.classList.add('code-block__toggle');
toggle.setAttribute('aria-expanded', 'false');
toggle.setAttribute('aria-controls', preId);
toggle.innerHTML = `
Source
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
`;
codeBlock.prepend(preview);
codeBlock.append(toggle);
count++;
}
});
next(doc.body.innerHTML);
});
// After the page is done loading, force scripts in previews to execute
hook.doneEach(() => {
[...document.querySelectorAll('.code-block__preview script')].map(script => runScript(script));
});
// Horizontal resizing
hook.doneEach(() => {
[...document.querySelectorAll('.code-block__preview')].map(preview => {
const resizer = preview.querySelector('.code-block__resizer');
let startX;
let startWidth;
const dragStart = event => {
startX = event.changedTouches ? event.changedTouches[0].pageX : event.clientX;
startWidth = parseInt(document.defaultView.getComputedStyle(preview).width, 10);
preview.classList.add('code-block__preview--dragging');
event.preventDefault();
resizer.focus();
document.documentElement.addEventListener('mousemove', dragMove, false);
document.documentElement.addEventListener('touchmove', dragMove, false);
document.documentElement.addEventListener('mouseup', dragStop, false);
document.documentElement.addEventListener('touchend', dragStop, false);
};
const dragMove = event => {
setWidth(startWidth + (event.changedTouches ? event.changedTouches[0].pageX : event.pageX) - startX);
};
const dragStop = event => {
preview.classList.remove('code-block__preview--dragging');
document.documentElement.removeEventListener('mousemove', dragMove, false);
document.documentElement.removeEventListener('touchmove', dragMove, false);
document.documentElement.removeEventListener('mouseup', dragStop, false);
document.documentElement.removeEventListener('touchend', dragStop, false);
};
const handleKeyDown = event => {
if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {
const currentWidth = preview.clientWidth;
const maxWidth = preview.parentElement.clientWidth;
const incr = event.shiftKey ? 100 : 10;
event.preventDefault();
if (event.key === 'ArrowLeft') setWidth(currentWidth - incr);
if (event.key === 'ArrowRight') setWidth(currentWidth + incr);
if (event.key === 'Home') setWidth(0);
if (event.key === 'End') setWidth(maxWidth);
}
};
const setWidth = width => (preview.style.width = width + 'px');
resizer.addEventListener('mousedown', dragStart);
resizer.addEventListener('touchstart', dragStart);
resizer.addEventListener('keydown', handleKeyDown);
}, false);
});
});
// Expand and collapse code blocks
document.addEventListener('click', event => {
const toggle = event.target.closest('.code-block__toggle');
if (toggle) {
const codeBlock = event.target.closest('.code-block');
codeBlock.classList.toggle('code-block--expanded');
event.target.setAttribute('aria-expanded', codeBlock.classList.contains('code-block--expanded'));
}
});
})();

View File

@@ -1,398 +0,0 @@
(() => {
let metadataStore;
function getAttrName(propName) {
return propName.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`).replace(/^-/, '');
}
function createPropsTable(props) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Property</th>
<th>Description</th>
<th>Type</th>
<th>Default</th>
</tr>
</thead>
<tbody>
${props
.map(prop => {
const attr = getAttrName(prop.name);
return `
<tr>
<td>
<code>${escapeHtml(prop.name)}</code>
${
prop.name !== attr
? `
<br>
<small>
<sl-tooltip content="Use this attribute in your HTML">
<code class="attribute-tooltip">${escapeHtml(attr)}</code>
</sl-tooltip>
</small>`
: ''
}
</td>
<td>${escapeHtml(prop.description)}</td>
<td><code style="white-space: normal;">${escapeHtml(prop.type)}</code></td>
<td><code style="white-space: normal;">${escapeHtml(prop.defaultValue)}</code></td>
</tr>
`;
})
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createEventsTable(events) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Event</th>
<th>Description</th>
<th>Details</th>
</tr>
</thead>
<tbody>
${events
.map(
event => `
<tr>
<td><code>${escapeHtml(event.name)}</code></td>
<td>${escapeHtml(event.description)}</td>
<td><code style="white-space: normal;">${escapeHtml(event.details)}</code></td>
</tr>
`
)
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createMethodsTable(methods) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Method</th>
<th>Description</th>
<th>Arguments</th>
</tr>
</thead>
<tbody>
${methods
.map(
method => `
<tr>
<td><code>${escapeHtml(method.name)}</code></td>
<td>${escapeHtml(method.description)}</td>
<td>
${
method.params.length
? `
<code style="white-space: normal;">${escapeHtml(
method.params.map(param => `${param.name}: ${param.type}`).join(', ')
)}</code>
`
: ''
}
</td>
</tr>
`
)
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createSlotsTable(slots) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Slot</th>
<th>Description</th>
</tr>
</thead>
<tbody>
${slots
.map(
slot => `
<tr>
<td><code>${slot.name ? escapeHtml(slot.name) : '(default)'}</code></td>
<td>${escapeHtml(slot.description)}</td>
</tr>
`
)
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createCustomPropertiesTable(styles) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
${styles
.map(
style => `
<tr>
<td><code>${escapeHtml(style.name)}</code></td>
<td>${escapeHtml(style.description)}</td>
</tr>
`
)
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createPartsTable(parts) {
const table = document.createElement('table');
table.innerHTML = `
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
${parts
.map(
part => `
<tr>
<td><code>${escapeHtml(part.name)}</code></td>
<td>${escapeHtml(part.description)}</td>
</tr>
`
)
.join('')}
</tbody>
`;
return table.outerHTML;
}
function createDependenciesList(targetComponent, allComponents) {
const ul = document.createElement('ul');
const dependencies = [];
// Recursively fetch subdependencies
function getDependencies(tag) {
const component = allComponents.find(c => c.tag === tag);
if (!component && !Array.isArray(component.dependencies)) {
return [];
}
component.dependencies.map(tag => {
if (!dependencies.includes(tag)) {
dependencies.push(tag);
}
getDependencies(tag);
});
}
getDependencies(targetComponent);
dependencies.sort().map(tag => {
const li = document.createElement('li');
li.innerHTML = `<code>&lt;${tag}&gt;</code>`;
ul.appendChild(li);
});
return ul.outerHTML;
}
function escapeHtml(html) {
return (html + '')
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;')
.replace(/`(.*?)`/g, '<code>$1</code>');
}
function getMetadata() {
return new Promise((resolve, reject) => {
// Simple caching to prevent multiple XHR requests
if (metadataStore) {
return resolve(metadataStore);
}
fetch('/dist/components.json')
.then(res => res.json())
.then(data => {
metadataStore = data;
resolve(metadataStore);
})
.catch(err => console.error(err));
});
}
if (!window.$docsify) {
throw new Error('Docsify must be loaded before installing this plugin.');
}
window.$docsify.plugins.push((hook, vm) => {
hook.mounted(function () {
getMetadata().then(metadata => {
const target = document.querySelector('.app-name');
// Add version
const version = document.createElement('div');
version.classList.add('sidebar-version');
version.textContent = metadata.version;
target.appendChild(version);
// Add repo buttons
const buttons = document.createElement('div');
buttons.classList.add('sidebar-buttons');
buttons.innerHTML = `
<a class="repo-button repo-button--small repo-button--sponsor" href="https://github.com/sponsors/claviska" rel="noopener" target="_blank">
<sl-icon name="heart"></sl-icon> Sponsor
</a>
<a class="repo-button repo-button--small repo-button--github" href="https://github.com/shoelace-style/shoelace/stargazers" rel="noopener" target="_blank">
<sl-icon name="github"></sl-icon> <span class="github-star-count">Star</span>
</a>
<a class="repo-button repo-button--small repo-button--twitter" href="https://twitter.com/shoelace_style" rel="noopener" target="_blank">
<sl-icon name="twitter"></sl-icon> Follow
</a>
`;
target.appendChild(buttons);
});
});
hook.beforeEach(async function (content, next) {
const metadata = await getMetadata();
// Replace %VERSION% placeholders
content = content.replace(/%VERSION%/g, metadata.version);
// Handle [component-header] tags
content = content.replace(/\[component-header:([a-z-]+)\]/g, (match, tag) => {
const component = metadata.components.filter(data => data.tag === tag)[0];
let result = '';
if (!component) {
console.error('Component not found in metadata: ' + tag);
next(content);
}
let badgeType = 'info';
if (component.status === 'stable') badgeType = 'primary';
if (component.status === 'experimental') badgeType = 'warning';
if (component.status === 'planned') badgeType = 'info';
if (component.status === 'deprecated') badgeType = 'danger';
result += `
<div class="component-header">
<div class="component-header__tag">
<code>${component.className} | &lt;${component.tag}&gt;</code>
</div>
<div class="component-header__info">
<sl-badge type="info" pill>
Since ${component.since || '?'}
</sl-badge>
<sl-badge type="${badgeType}" pill style="text-transform: capitalize;">
${component.status}
</sl-badge>
</div>
</div>
`;
return result.replace(/^ +| +$/gm, '');
});
// Handle [component-metadata] tags
content = content.replace(/\[component-metadata:([a-z-]+)\]/g, (match, tag) => {
const component = metadata.components.filter(data => data.tag === tag)[0];
let result = '';
if (!component) {
console.error('Component not found in metadata: ' + tag);
next(content);
}
if (component.props.length) {
result += `
## Properties
${createPropsTable(component.props)}
`;
}
if (component.events.length) {
result += `
## Events
${createEventsTable(component.events)}
`;
}
if (component.methods.length) {
result += `
## Methods
${createMethodsTable(component.methods)}
`;
}
if (component.slots.length) {
result += `
## Slots
${createSlotsTable(component.slots)}
`;
}
if (component.cssCustomProperties.length) {
result += `
## CSS Custom Properties
${createCustomPropertiesTable(component.cssCustomProperties)}
`;
}
if (component.parts.length) {
result += `
## CSS Parts
${createPartsTable(component.parts)}
`;
}
if (component.dependencies.length) {
result += `
## Dependencies
This component has the following dependencies so, if you're [cherry picking](/getting-started/installation#cherry-picking),
be sure to import these components in addition to <code>&lt;${tag}&gt;</code>.
${createDependenciesList(component.tag, metadata.components)}
`;
}
// Strip whitespace so markdown doesn't process things as code blocks
return result.replace(/^ +| +$/gm, '');
});
next(content);
});
});
})();

View File

@@ -1,24 +0,0 @@
(() => {
if (!window.$docsify) {
throw new Error('Docsify must be loaded before installing this plugin.');
}
//
// Docsify generates pages dynamically and asynchronously, so when a reload happens, the scroll position can't be
// be restored immediately. This plugin waits until Docsify loads the page and then restores it.
//
window.$docsify.plugins.push((hook, vm) => {
hook.ready(() => {
// Restore
const scrollTop = sessionStorage.getItem('bs-scroll');
if (scrollTop) {
document.documentElement.scrollTop = scrollTop;
}
// Remember
document.addEventListener('scroll', event => {
sessionStorage.setItem('bs-scroll', document.documentElement.scrollTop);
});
});
});
})();

View File

@@ -1,14 +0,0 @@
(() => {
if (!window.$docsify) {
throw new Error('Docsify must be loaded before installing this plugin.');
}
window.$docsify.plugins.push((hook, vm) => {
hook.mounted(function () {
// Move search below the app name
const appName = document.querySelector('.sidebar .app-name');
const search = document.querySelector('.sidebar .search');
appName.insertAdjacentElement('afterend', search);
});
});
})();

View File

@@ -1,13 +0,0 @@
.theme-toggle {
position: fixed;
top: 0.5rem;
right: 0.5rem;
z-index: 100;
}
@media screen and (max-width: 768px) {
.theme-toggle {
top: 0.25rem;
right: 0.25rem;
}
}

View File

@@ -1,41 +0,0 @@
(() => {
if (!window.$docsify) {
throw new Error('Docsify must be loaded before installing this plugin.');
}
window.$docsify.plugins.push((hook, vm) => {
hook.mounted(function () {
let isDark = localStorage.getItem('theme') === 'sl-theme-dark';
const sidebarToggle = document.querySelector('.sidebar-toggle');
const noTransitions = Object.assign(document.createElement('style'), {
textContent: '* { transition: none !important; }'
});
const toggle = Object.assign(document.createElement('sl-icon-button'), {
name: isDark ? 'sun' : 'moon',
label: 'Toggle dark mode'
});
toggle.classList.add('theme-toggle');
// Set initial theme
if (isDark) {
document.body.classList.add('sl-theme-dark');
}
// Toggle theme
toggle.addEventListener('click', () => {
isDark = !isDark;
isDark ? localStorage.setItem('theme', 'sl-theme-dark') : localStorage.removeItem('theme');
toggle.name = isDark ? 'sun' : 'moon';
// Disable transitions as the theme changes
document.body.appendChild(noTransitions);
requestAnimationFrame(() => {
document.body.classList.toggle('sl-theme-dark', isDark);
requestAnimationFrame(() => document.body.removeChild(noTransitions));
});
});
sidebarToggle.insertAdjacentElement('afterend', toggle);
});
});
})();

View File

@@ -1,60 +0,0 @@
/* Color demo */
.color-demo {
width: 4rem;
height: 2rem;
border-radius: var(--sl-border-radius-small);
box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.33);
}
/* Border radius demo */
.border-radius-demo {
width: 3rem;
height: 3rem;
background: var(--sl-color-primary-500);
}
/* Transition demo */
.transition-demo {
position: relative;
background: var(--sl-color-gray-200);
width: 8rem;
height: 2rem;
}
.transition-demo:after {
content: '';
position: absolute;
background-color: var(--sl-color-primary-500);
top: 0;
left: 0;
width: 0;
height: 100%;
transition-duration: inherit;
transition-property: width;
}
.transition-demo:hover:after {
width: 100%;
}
.sl-theme-dark .transition-demo {
background: var(--sl-color-gray-800);
}
/* Spacing demo */
.spacing-demo {
width: 100px;
background: var(--sl-color-primary-500);
}
/* Elevation dmeo */
.elevation-demo {
background: var(--sl-color-white);
border-radius: 3px;
width: 4rem;
height: 4rem;
}
.sl-theme-dark .elevation-demo {
background-color: var(--sl-color-gray-800);
}

View File

@@ -1,195 +0,0 @@
/* Elevation tokens */
.sl-theme-dark {
--sl-shadow-x-small: 0 1px 0 #6b72800d;
--sl-shadow-small: 0 1px 2px #6b72801a;
--sl-shadow-medium: 0 2px 4px #6b72801a;
--sl-shadow-large: 0 2px 8px #6b72801a;
--sl-shadow-x-large: 0 4px 16px #6b72801a;
}
.sl-theme-dark {
background: var(--sl-color-gray-900);
color: var(--sl-color-gray-200);
}
/* Sidebar **/
.sl-theme-dark .sidebar {
background: var(--sl-color-gray-900);
border-right-color: var(--sl-color-gray-900);
}
.sl-theme-dark .sidebar li > p {
color: var(--sl-color-white);
border-bottom-color: var(--sl-color-gray-800);
}
.sl-theme-dark .sidebar-toggle {
background-color: var(--sl-color-gray-900);
}
.sl-theme-dark .docsify-pagination-container {
border-top-color: var(--sl-color-gray-800) !important;
}
/* Search */
.sl-theme-dark .sidebar .search input[type='search'] {
background: var(--sl-input-background-color);
border-color: var(--sl-input-border-color);
color: var(--sl-input-color);
}
.sl-theme-dark .sidebar .search input[type='search']:hover {
border-color: var(--sl-input-border-color-hover);
}
.sl-theme-dark .sidebar .search input[type='search']:focus {
border-color: var(--sl-input-border-color-focus);
}
.sl-theme-dark .sidebar .clear-button {
color: var(--sl-color-gray-700);
}
.sl-theme-dark .sidebar .clear-button svg circle {
fill: currentColor;
}
/* Content */
.sl-theme-dark .component-header {
border-bottom-color: var(--sl-color-gray-800);
}
.sl-theme-dark .anchor span {
color: var(--sl-color-white);
}
.sl-theme-dark .markdown-section h2 {
border-bottom-color: var(--sl-color-gray-800);
}
.sl-theme-dark .markdown-section blockquote {
border-left-color: var(--sl-color-gray-800);
}
.sl-theme-dark .markdown-section kbd {
border-color: var(--sl-color-gray-800);
}
/* Tables */
.sl-theme-dark .markdown-section tr:nth-child(2n) {
background: var(--sl-color-gray-950);
}
.sl-theme-dark .markdown-section td {
border-top-color: var(--sl-color-gray-800);
border-bottom-color: var(--sl-color-gray-800);
}
.sl-theme-dark .markdown-section table .attribute-tooltip {
border-bottom-color: var(--sl-color-gray-700);
}
/* Tips & warnings */
.sl-theme-dark .markdown-section p.tip,
.sl-theme-dark .markdown-section p.warn {
background-color: var(--sl-color-gray-950);
}
.sl-theme-dark .markdown-section p.tip:before,
.sl-theme-dark .markdown-section p.warn:before {
color: var(--sl-color-gray-900);
}
.sl-theme-dark .markdown-section p.tip code,
.sl-theme-dark .markdown-section p.warn code {
background-color: var(--sl-color-gray-800);
}
/* Code */
.sl-theme-dark .markdown-section code {
background: var(--sl-color-gray-950);
}
/* Code blocks */
.sl-theme-dark .markdown-section pre,
.sl-theme-dark .code-block__source {
background-color: var(--sl-color-gray-800);
}
.sl-theme-dark .markdown-section pre > code {
color: var(--sl-color-gray-200);
}
.sl-theme-dark .markdown-section pre .token.comment {
color: var(--sl-color-gray-600);
}
.sl-theme-dark .markdown-section pre .token.prolog,
.sl-theme-dark .markdown-section pre .token.doctype,
.sl-theme-dark .markdown-section pre .token.cdata,
.sl-theme-dark .markdown-section pre .token.operator {
color: var(--sl-color-gray-300);
}
.sl-theme-dark .markdown-section pre .token.property,
.sl-theme-dark .markdown-section pre .token.keyword,
.sl-theme-dark .markdown-section pre .token.tag,
.sl-theme-dark .markdown-section pre .token.url {
color: var(--sl-color-primary-400);
}
.sl-theme-dark .markdown-section pre .token.symbol,
.sl-theme-dark .markdown-section pre .token.deleted {
color: #f92672;
}
.sl-theme-dark .markdown-section pre .token.boolean,
.sl-theme-dark .markdown-section pre .token.constant,
.sl-theme-dark .markdown-section pre .token.selector,
.sl-theme-dark .markdown-section pre .token.attr-name,
.sl-theme-dark .markdown-section pre .token.string,
.sl-theme-dark .markdown-section pre .token.char,
.sl-theme-dark .markdown-section pre .token.builtin,
.sl-theme-dark .markdown-section pre .token.inserted {
color: var(--sl-color-success-400);
}
.sl-theme-dark .markdown-section pre .token.atrule,
.sl-theme-dark .markdown-section pre .token.attr-value,
.sl-theme-dark .markdown-section pre .token.number,
.sl-theme-dark .markdown-section pre .token.variable {
color: #c380ff;
}
.sl-theme-dark .markdown-section pre .token.function,
.sl-theme-dark .markdown-section pre .token.class-name {
color: #ffbb4d;
}
.sl-theme-dark .markdown-section pre .token.regex {
color: #f8bd5b;
}
.sl-theme-dark .markdown-section pre .token.important {
color: #fd495f;
}
/* Repo buttons */
.sl-theme-dark .repo-button {
background-color: var(--sl-color-gray-900);
border-color: var(--sl-color-gray-800);
color: var(--sl-color-gray-200);
}
.sl-theme-dark .repo-button--github sl-icon {
color: var(--sl-color-white);
}
.sl-theme-dark .repo-button:hover {
background-color: var(--sl-color-gray-900);
border: solid 1px var(--sl-color-gray-700);
}
.sl-theme-dark .repo-button:focus {
border-color: var(--sl-color-primary-500);
}

View File

@@ -1,621 +0,0 @@
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
font-family: var(--sl-font-sans);
font-size: var(--sl-font-size-medium);
font-weight: var(--sl-font-weight-normal);
letter-spacing: var(--sl-letter-spacing-normal);
color: var(--sl-color-gray-800);
line-height: var(--sl-line-height-normal);
}
a {
color: var(--sl-color-primary-500);
}
strong {
font-weight: var(--sl-font-weight-bold);
}
/* Sidebar */
.sidebar {
background: var(--sl-color-white);
border-right: solid 1px var(--sl-color-gray-200);
}
.sidebar .app-name {
padding: 0 1.5rem;
margin-top: 1.5rem;
}
.sidebar-version {
font-size: var(--sl-font-size-x-small);
font-weight: var(--sl-font-weight-normal);
color: var(--sl-color-gray-400);
text-align: right;
padding: 0 var(--sl-spacing-small);
margin: -1.25rem 0 0.6rem 0;
}
.sidebar-buttons {
text-align: center;
margin-top: 0;
}
/* Search */
.sidebar .search {
position: relative;
border: none;
}
.sidebar .search input[type='search'] {
border: solid 1px var(--sl-input-border-color);
border-radius: var(--sl-border-radius-pill);
padding-left: 1rem;
padding-right: 2rem;
margin: 0 1.25rem;
transition: var(--sl-transition-fast) color, var(--sl-transition-fast) border, var(--sl-transition-fast) box-shadow;
}
.sidebar .search input[type='search']:hover {
border-color: var(--sl-input-border-color-hover);
}
.sidebar .search input[type='search']:focus {
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-primary);
border-color: var(--sl-input-border-color-focus);
outline: none;
}
.sidebar .input-wrap {
position: relative;
width: 100%;
padding: 0 0.25rem;
}
.sidebar .clear-button {
position: absolute;
right: 30px;
top: 7px;
width: 22px !important;
height: 22px !important;
}
.sidebar .clear-button svg {
transform: scale(0.75) !important;
}
.sidebar .clear-button:focus {
outline: none;
}
.search .results-panel {
margin-top: 1rem;
}
.search .matching-post {
border-bottom: solid 1px var(--sl-color-gray-500) !important;
padding: 0.25rem 1.5rem;
}
.search .matching-post a {
display: block;
border-radius: inherit;
padding: 0.5rem;
}
.search .matching-post h2 {
margin-bottom: 0;
}
.search .matching-post p {
margin-top: 0;
}
/* Sidebar toggle */
.sidebar-toggle {
top: 0.25rem;
left: 0.25rem;
width: 2rem;
height: 2rem;
border-radius: var(--sl-border-radius-medium);
background-color: var(--sl-color-white);
padding: 0.5rem;
}
.sidebar-toggle:focus {
outline: none;
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-primary);
}
.sidebar-toggle span:last-child {
margin-bottom: 0;
}
@media screen and (max-width: 768px) {
body.close .sidebar-toggle {
width: 2rem;
background: none;
padding: 0.5rem;
}
}
/* Sidebar nav */
.sidebar-nav {
padding: 0 1rem;
}
.sidebar-nav li {
line-height: 1;
padding: 0;
}
.sidebar-nav a {
color: inherit;
text-decoration: none;
line-height: 1.5em;
padding-top: 0.25em;
padding-bottom: 0.25em;
}
.sidebar-nav li.collapse > a,
.sidebar-nav li.active > a {
color: var(--sl-color-primary-500);
}
.sidebar li > p {
font-weight: var(--sl-font-weight-bold);
border-bottom: solid 1px var(--sl-color-gray-200);
margin: 0 0.75rem 0.5rem 0;
}
.sidebar ul li ul {
padding-left: 0.5rem;
margin: 0 0.75rem 1.5rem 0;
}
.sidebar ul ul ul {
padding: 0;
margin: 0 0 0 0.5rem;
}
.sidebar ul ul ul li {
list-style: disc;
margin-left: 1.5rem;
}
/* Splash */
.splash {
display: flex;
padding-top: 2rem;
}
.splash-start {
min-width: 420px;
}
.splash-end {
display: flex;
align-items: flex-end;
width: auto;
padding-left: 1rem;
}
.splash-image {
width: 100%;
height: auto;
}
.splash-logo {
max-width: 22rem;
}
@media screen and (max-width: 1040px) {
.splash {
display: block;
}
.splash-start {
min-width: 0;
padding-bottom: 1rem;
}
.splash-end {
padding: 0;
}
.splash-image {
display: block;
max-width: 400px;
}
/* Shields */
.splash + p {
margin-top: 2rem;
}
}
/* Content */
.content {
padding-top: 0;
}
.markdown-section {
max-width: 860px;
overflow-anchor: none;
}
.markdown-section blockquote {
position: relative;
border-left: solid 4px var(--sl-color-gray-200);
font-style: italic;
padding: 1rem 1.5rem;
margin: 0 0 1rem 0;
}
.markdown-section blockquote p:first-child {
margin-top: 0;
}
.markdown-section blockquote p:last-child {
margin-bottom: 0;
}
.markdown-section ul {
padding: 0 0 0 1.5rem;
margin: 0 0 1rem 0;
}
.markdown-section ul ul {
margin-bottom: 0;
}
.docsify-pagination-container {
border-top-color: var(--sl-color-gray-200) !important;
}
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
font-weight: var(--sl-font-weight-normal);
margin: 0 0 1em 0;
}
.markdown-section h1 {
font-size: var(--sl-font-size-xx-large);
}
.markdown-section h2 {
font-size: var(--sl-font-size-x-large);
border-bottom: solid 1px var(--sl-color-gray-200);
margin-top: 2rem;
}
.markdown-section h3 {
font-size: var(--sl-font-size-large);
}
.markdown-section h4 {
font-size: var(--sl-font-size-medium);
}
.markdown-section h5 {
font-size: var(--sl-font-size-small);
}
.markdown-section h6 {
font-size: var(--sl-font-size-x-small);
}
.markdown-section pre {
font-family: var(--sl-font-mono);
}
.markdown-section h1:first-of-type {
margin-bottom: 0;
}
.markdown-section code {
font-family: var(--sl-font-mono);
font-size: 87.5%;
background: var(--sl-color-gray-50);
border-radius: var(--sl-border-radius-small);
padding: 2px 4px;
}
.markdown-section kbd {
font-family: var(--sl-font-mono);
font-size: 87.5%;
border-radius: var(--sl-border-radius-small);
border: solid 1px var(--sl-color-gray-200);
padding: 2px 4px;
}
/* Code blocks */
.markdown-section pre {
position: relative;
background: var(--sl-color-gray-50);
border-radius: var(--sl-border-radius-medium);
}
.markdown-section pre > code {
display: block;
background: none;
border-radius: 0;
color: var(--sl-color-gray-700);
padding: var(--sl-spacing-medium);
overflow: auto;
hyphens: none;
tab-size: 2;
}
.markdown-section pre .token.comment {
color: var(--sl-color-gray-400);
}
.markdown-section pre .token.prolog,
.markdown-section pre .token.doctype,
.markdown-section pre .token.cdata,
.markdown-section pre .token.operator {
color: var(--sl-color-gray-600);
}
.markdown-section pre .token.punctuation {
color: var(--sl-color-gray-500);
}
.namespace {
opacity: 0.7;
}
.markdown-section pre .token.property,
.markdown-section pre .token.keyword,
.markdown-section pre .token.tag,
.markdown-section pre .token.url {
color: var(--sl-color-primary-500);
}
.markdown-section pre .token.symbol,
.markdown-section pre .token.deleted {
color: #f92672;
}
.markdown-section pre .token.boolean,
.markdown-section pre .token.constant,
.markdown-section pre .token.selector,
.markdown-section pre .token.attr-name,
.markdown-section pre .token.string,
.markdown-section pre .token.char,
.markdown-section pre .token.builtin,
.markdown-section pre .token.inserted {
color: var(--sl-color-success-600);
}
.markdown-section pre .token.atrule,
.markdown-section pre .token.attr-value,
.markdown-section pre .token.number,
.markdown-section pre .token.variable {
color: #9013fe;
}
.markdown-section pre .token.function,
.markdown-section pre .token.class-name {
color: #eb9200;
}
.markdown-section pre .token.regex {
color: #f5a623;
}
.markdown-section pre .token.important {
color: #d0021b;
}
.markdown-section pre .token.important,
.markdown-section pre .token.bold {
font-weight: bold;
}
.markdown-section pre .token.italic {
font-style: italic;
}
/* Tables */
.markdown-section table {
margin-bottom: 1.5rem;
}
.markdown-section tr {
border: none;
}
.markdown-section tr:nth-child(2n) {
background: var(--sl-color-gray-50);
}
.markdown-section th {
border: none;
font-weight: inherit;
text-align: left;
}
.markdown-section td {
border-top: solid 1px var(--sl-color-gray-200);
border-bottom: solid 1px var(--sl-color-gray-200);
border-left: none;
border-right: none;
}
.markdown-section td code {
white-space: nowrap;
}
.markdown-section table .attribute-tooltip {
background: none;
border-bottom: dashed 1px var(--sl-color-gray-200);
cursor: help;
}
/* Iframes */
.markdown-section iframe {
border: none;
}
/* Tips & Warnings */
.markdown-section p.tip,
.markdown-section p.warn {
position: relative;
background: var(--sl-color-gray-50);
border-left: solid 4px transparent;
border-radius: var(--sl-border-radius-medium);
padding-left: 1.5rem;
}
.markdown-section p.tip:before,
.markdown-section p.warn:before {
content: '!';
border-radius: 100%;
color: var(--sl-color-white);
font-size: 14px;
font-weight: bold;
left: -12px;
line-height: 20px;
position: absolute;
height: 20px;
width: 20px;
text-align: center;
top: calc(50% - 10px);
}
.markdown-section p.warn {
border-left-color: var(--sl-color-primary-500);
}
.markdown-section p.warn:before {
background-color: var(--sl-color-primary-500);
}
.markdown-section p.tip {
border-left-color: var(--sl-color-danger-500);
}
.markdown-section p.tip:before {
background-color: var(--sl-color-danger-500);
}
.markdown-section p.tip code,
.markdown-section p.warn code {
background-color: var(--sl-color-gray-100);
}
/* Component headers */
.component-header {
border-bottom: solid 1px var(--sl-color-gray-200);
padding-bottom: 2rem;
margin-top: -1rem;
margin-bottom: 2rem;
}
.component-header__tag {
border-bottom: none;
padding: 0;
margin: 0.75rem 0 0.25rem 0;
}
.component-header__tag code {
background: none;
color: var(--sl-color-gray-500);
font-size: var(--sl-font-size-large);
padding: 0;
margin: 0;
}
.component-header__info {
margin-bottom: 0.5rem;
}
/* Lead sentences that occur immediately after the header */
.component-header + p {
font-size: var(--sl-font-size-large);
line-height: 1.6;
}
/* Copy button */
.docsify-copy-code-button {
font-size: var(--sl-font-size-small) !important;
border-top-right-radius: var(--sl-border-radius-medium) !important;
border-bottom-left-radius: var(--sl-border-radius-medium) !important;
}
/* Repo buttons */
html .repo-button {
display: inline-flex;
align-items: center;
background-color: var(--sl-color-white);
border: solid 1px var(--sl-color-gray-200);
border-radius: var(--sl-border-radius-medium);
box-shadow: var(--sl-shadow-x-small);
font-size: var(--sl-font-size-small);
font-weight: var(--sl-font-weight-semibold);
line-height: 2;
text-decoration: none;
color: var(--sl-color-gray-700);
padding: var(--sl-spacing-xx-small) var(--sl-spacing-small);
margin-bottom: var(--sl-spacing-xx-small);
transition: 0.25s all;
}
html .repo-button:hover {
text-decoration: none;
background-color: var(--sl-color-gray-50);
border: solid 1px var(--sl-color-gray-200);
}
html .repo-button:focus {
outline: none;
border-color: var(--sl-color-primary-500);
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-primary);
}
html .repo-button:not(:last-of-type) {
margin-right: 0.125rem;
}
html .repo-button sl-icon {
position: relative;
vertical-align: middle;
margin-right: 0.35rem;
}
html .repo-button--small {
font-size: var(--sl-font-size-x-small);
padding: var(--sl-spacing-xxx-small) var(--sl-spacing-x-small);
}
html .repo-button--sponsor sl-icon {
color: #ea4aaa;
}
html .repo-button--github sl-icon {
color: #242a2e;
}
html .repo-button--twitter sl-icon {
color: #1ea0f2;
}
body[data-page^='tokens/'] .table-wrapper td:first-child,
body[data-page^='tokens/'] .table-wrapper td:first-child code {
white-space: nowrap;
}

View File

@@ -1,234 +0,0 @@
# Alert
[component-header:sl-alert]
Alerts are used to display important messages either inline or as toast notifications.
```html preview
<sl-alert open>
<sl-icon slot="icon" name="info-circle"></sl-icon>
This is a standard alert. You can customize its content and even the icon.
</sl-alert>
```
?> Alerts will not be visible if the `open` attribute is not present.
## Examples
### Types
Set the `type` attribute to change the alert's type.
```html preview
<sl-alert type="primary" open>
<sl-icon slot="icon" name="info-circle"></sl-icon>
<strong>This is super informative</strong><br>
You can tell by how pretty the alert is.
</sl-alert>
<br>
<sl-alert type="success" open>
<sl-icon slot="icon" name="check2-circle"></sl-icon>
<strong>Your changes have been saved</strong><br>
You can safely exit the app now.
</sl-alert>
<br>
<sl-alert type="info" open>
<sl-icon slot="icon" name="gear"></sl-icon>
<strong>Your settings have been updated</strong><br>
Settings will take affect on next login.
</sl-alert>
<br>
<sl-alert type="warning" open>
<sl-icon slot="icon" name="exclamation-triangle"></sl-icon>
<strong>Your session has ended</strong><br>
Please login again to continue.
</sl-alert>
<br>
<sl-alert type="danger" open>
<sl-icon slot="icon" name="exclamation-octagon"></sl-icon>
<strong>Your account has been deleted</strong><br>
We're very sorry to see you go!
</sl-alert>
```
### Closable
Add the `closable` attribute to show a close button that will hide the alert.
```html preview
<sl-alert type="primary" open closable class="alert-closable">
<sl-icon slot="icon" name="info-circle"></sl-icon>
You can close this alert any time!
</sl-alert>
<script>
const alert = document.querySelector('.alert-closable');
alert.addEventListener('sl-after-hide', () => {
setTimeout(() => alert.open = true, 2000);
});
</script>
```
### Without Icons
Icons are optional. Simply omit the `icon` slot if you don't want them.
```html preview
<sl-alert type="primary" open>
Nothing fancy here, just a simple alert.
</sl-alert>
```
### Duration
Set the `duration` prop to automatically hide an alert after a period of time. This is useful for alerts that don't require acknowledgement.
```html preview
<div class="alert-duration">
<sl-button type="primary">Show Alert</sl-button>
<sl-alert type="primary" duration="3000" closable>
<sl-icon slot="icon" name="info-circle"></sl-icon>
This alert will automatically hide itself after three seconds, unless you interact with it.
</sl-alert>
</div>
<script>
const container = document.querySelector('.alert-duration');
const button = container.querySelector('sl-button');
const alert = container.querySelector('sl-alert');
button.addEventListener('click', () => alert.show());
</script>
<style>
.alert-duration sl-alert {
margin-top: var(--sl-spacing-medium);
}
</style>
```
### Toast Notifications
To display an alert as a toast notification, or "toast", create the alert and call its `toast()` method. This will move the alert out of its position in the DOM and into [the toast stack](#the-toast-stack) where it will be shown. Once dismissed, it will be removed from the DOM completely. To reuse a toast, store a reference to it and call `toast()` again later on.
You should always use the `closable` prop so users can dismiss the notification. It's also common to set a reasonable `duration` when the notification doesn't require acknowledgement.
```html preview
<div class="alert-toast">
<sl-button type="primary">Primary</sl-button>
<sl-button type="success">Success</sl-button>
<sl-button type="info">Info</sl-button>
<sl-button type="warning">Warning</sl-button>
<sl-button type="danger">Danger</sl-button>
<sl-alert type="primary" duration="3000" closable>
<sl-icon slot="icon" name="info-circle"></sl-icon>
<strong>This is super informative</strong><br>
You can tell by how pretty the alert is.
</sl-alert>
<sl-alert type="success" duration="3000" closable>
<sl-icon slot="icon" name="check2-circle"></sl-icon>
<strong>Your changes have been saved</strong><br>
You can safely exit the app now.
</sl-alert>
<sl-alert type="info" duration="3000" closable>
<sl-icon slot="icon" name="gear"></sl-icon>
<strong>Your settings have been updated</strong><br>
Settings will take affect on next login.
</sl-alert>
<sl-alert type="warning" duration="3000" closable>
<sl-icon slot="icon" name="exclamation-triangle"></sl-icon>
<strong>Your session has ended</strong><br>
Please login again to continue.
</sl-alert>
<sl-alert type="danger" duration="3000" closable>
<sl-icon slot="icon" name="exclamation-octagon"></sl-icon>
<strong>Your account has been deleted</strong><br>
We're very sorry to see you go!
</sl-alert>
</div>
<script>
const container = document.querySelector('.alert-toast');
['primary', 'success', 'info', 'warning', 'danger'].map(type => {
const button = container.querySelector(`sl-button[type="${type}"]`);
const alert = container.querySelector(`sl-alert[type="${type}"]`);
button.addEventListener('click', () => alert.toast());
});
</script>
```
### Creating Toasts Imperatively
For convenience, you can create a utility that emits toast notifications with a function call rather than composing them in your HTML. To do this, generate the alert with JavaScript, append it to the body, and call the `toast()` method as shown in the example below.
```html preview
<div class="alert-toast-wrapper">
<sl-button type="primary">Create Toast</sl-button>
</div>
<script>
const container = document.querySelector('.alert-toast-wrapper');
const button = container.querySelector('sl-button');
let count = 0;
// Always escape HTML for text arguments!
function escapeHtml(html) {
const div = document.createElement('div');
div.textContent = html;
return div.innerHTML;
}
// Custom function to emit toast notifications
function notify(message, type = 'primary', icon = 'info-circle', duration = 3000) {
const alert = Object.assign(document.createElement('sl-alert'), {
type: type,
closable: true,
duration: duration,
innerHTML: `
<sl-icon name="${icon}" slot="icon"></sl-icon>
${escapeHtml(message)}
`
});
document.body.append(alert);
return alert.toast();
}
button.addEventListener('click', () => {
notify(`This is custom toast #${++count}`);
});
</script>
```
### The Toast Stack
The toast stack is a fixed position singleton element created and managed internally by the alert component. It will be added and removed from the DOM as needed when toasts are shown. When more than one toast is visible, they will stack vertically in the toast stack.
By default, the toast stack is positioned at the top-right of the viewport. You can change its position by targeting `.sl-toast-stack` in your stylesheet. To make toasts appear at the top-left of the viewport, for example, use the following styles.
```css
.sl-toast-stack {
left: 0;
right: auto;
}
```
?> By design, it is not possible to show toasts in more than one stack simultaneously. Such behavior is confusing and makes for a poor user experience.
[component-metadata:sl-alert]

View File

@@ -1,178 +0,0 @@
# Animation
[component-header:sl-animation]
Animate elements declaratively with nearly 100 baked-in presets, or roll your own with custom keyframes. Powered by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).
To animate an element, wrap it in `<sl-animation>` and set a `name` and `duration`. Refer to the [properties table](#properties) for additional options.
```html preview
<div class="animation-overview">
<sl-animation name="bounce" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="jello" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="heartBeat" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="flip" duration="2000"><div class="box"></div></sl-animation>
</div>
<style>
.animation-overview .box {
display: inline-block;
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-500);
margin: 1.5rem;
}
</style>
```
?> The animation will be applied only to the first child element found in `<sl-animation>`.
## Examples
### Animations & Easings
This example demonstrates all of the baked-in animations and easings. Animations are based on those found in the popular [Animate.css](https://animate.style/) library.
```html preview
<div class="animation-sandbox">
<sl-animation name="bounce" easing="ease-in-out" duration="2000">
<div class="box"></div>
</sl-animation>
<div class="controls">
<sl-select label="Animation" value="bounce"></sl-select>
<sl-select label="Easing" value="linear"></sl-select>
<sl-range min="0" max="2" step=".5" value="1"></sl-range>
</div>
</div>
<script type="module">
import { getAnimationNames, getEasingNames } from '/dist/shoelace.js';
const container = document.querySelector('.animation-sandbox');
const animation = container.querySelector('sl-animation');
const animationName = container.querySelector('.controls sl-select:nth-child(1)');
const easingName = container.querySelector('.controls sl-select:nth-child(2)');
const playbackRate = container.querySelector('sl-range');
const animations = getAnimationNames();
const easings = getEasingNames();
animations.map(name => {
const menuItem = Object.assign(document.createElement('sl-menu-item'), {
textContent: name,
value: name
});
animationName.appendChild(menuItem);
});
easings.map(name => {
const menuItem = Object.assign(document.createElement('sl-menu-item'), {
textContent: name,
value: name
});
easingName.appendChild(menuItem);
});
animationName.addEventListener('sl-change', () => animation.name = animationName.value);
easingName.addEventListener('sl-change', () => animation.easing = easingName.value);
playbackRate.addEventListener('sl-change', () => animation.playbackRate = playbackRate.value);
playbackRate.tooltipFormatter = val => `Playback Rate = ${val}`;
</script>
<style>
.animation-sandbox .box {
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-500);
}
.animation-sandbox .controls {
max-width: 300px;
margin-top: 2rem;
}
.animation-sandbox .controls sl-select {
margin-bottom: 1rem;
}
</style>
```
### Using Intersection Observer
Use an [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) to control the animation when an element enters or exits the viewport. For example, scroll the box below in and out of your screen. The animation stops when the box exits the viewport and restarts each time it enters the viewport.
```html preview
<div class="animation-scroll">
<sl-animation name="jackInTheBox" duration="2000" iterations="1"><div class="box"></div></sl-animation>
</div>
<script>
const container = document.querySelector('.animation-scroll');
const animation = container.querySelector('sl-animation');
const box = animation.querySelector('.box');
// Watch for the box to enter and exit the viewport. Note that we're observing the box, not the animation element!
const observer = new IntersectionObserver(entries => {
if (entries[0].isIntersecting) {
// Start the animation when the box enters the viewport
animation.pause = null;
} else {
// Reset the animation when the box leaves the viewport
animation.pause = true;
animation.setCurrentTime(0);
}
});
observer.observe(box);
</script>
<style>
.animation-scroll .box {
display: inline-block;
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-500);
}
</style>
```
### Custom Keyframe Formats
Supply your own [keyframe formats](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats) to build custom animations.
```html preview
<div class="animation-keyframes">
<sl-animation easing="ease-in-out" duration="2000">
<div class="box"></div>
</sl-animation>
</div>
<script>
const animation = document.querySelector('.animation-keyframes sl-animation');
animation.keyframes = [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transformOrigin: 'center center',
transform: 'rotate(0)'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transformOrigin: 'center center',
transform: 'rotate(90deg)'
}
];
</script>
<style>
.animation-keyframes .box {
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-500);
}
</style>
```
[component-metadata:sl-animation]

View File

@@ -1,86 +0,0 @@
# Avatar
[component-header:sl-avatar]
Avatars are used to represent a person or object.
```html preview
<sl-avatar></sl-avatar>
```
## Examples
### Images
To use an image for the avatar, set the `image` and `alt` attributes. This will take priority and be shown over initials and icons.
```html preview
<sl-avatar
image="https://images.unsplash.com/photo-1529778873920-4da4926a72c2?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"
alt="Gray tabby kitten looking down"
></sl-avatar>
```
### Initials
When you don't have an image to use, you can set the `initials` attribute to show something more personalized than an icon.
```html preview
<sl-avatar initials="SL"></sl-avatar>
```
### Custom Icons
When no image or initials are set, an icon will be shown. The default avatar shows a generic "user" icon, but you can customize this with the `icon` slot.
```html preview
<sl-avatar>
<sl-icon slot="icon" name="image"></sl-icon>
</sl-avatar>
<sl-avatar>
<sl-icon slot="icon" name="archive"></sl-icon>
</sl-avatar>
<sl-avatar>
<sl-icon slot="icon" name="briefcase"></sl-icon>
</sl-avatar>
```
### Shapes
Avatars can be shaped using the `shape` attribute.
```html preview
<sl-avatar shape="square"></sl-avatar>
<sl-avatar shape="rounded"></sl-avatar>
<sl-avatar shape="circle"></sl-avatar>
```
### Avatar Groups
You can group avatars with a few lines of CSS.
```html preview
<div class="avatar-group">
<sl-avatar image="https://images.unsplash.com/photo-1490150028299-bf57d78394e0?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=256&h=256&q=80&crop=right"></sl-avatar>
<sl-avatar image="https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=256&h=256&crop=left&q=80"></sl-avatar>
<sl-avatar image="https://images.unsplash.com/photo-1456439663599-95b042d50252?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=256&h=256&crop=left&q=80"></sl-avatar>
<sl-avatar image="https://images.unsplash.com/flagged/photo-1554078875-e37cb8b0e27d?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=256&h=256&crop=top&q=80"></sl-avatar>
</div>
<style>
.avatar-group sl-avatar:not(:first-of-type) {
margin-left: -1rem;
}
.avatar-group sl-avatar::part(base) {
border: solid 2px white;
}
</style>
```
[component-metadata:sl-avatar]

View File

@@ -1,90 +0,0 @@
# Badge
[component-header:sl-badge]
Badges are used to draw attention and display statuses or counts.
```html preview
<sl-badge>Badge</sl-badge>
```
## Examples
### Types
Set the `type` attribute to change the badge's type.
```html preview
<sl-badge type="primary">Primary</sl-badge>
<sl-badge type="success">Success</sl-badge>
<sl-badge type="info">Info</sl-badge>
<sl-badge type="warning">Warning</sl-badge>
<sl-badge type="danger">Danger</sl-badge>
```
### Pill Badges
Use the `pill` attribute to give badges rounded edges.
```html preview
<sl-badge type="primary" pill>Primary</sl-badge>
<sl-badge type="success" pill>Success</sl-badge>
<sl-badge type="info" pill>Info</sl-badge>
<sl-badge type="warning" pill>Warning</sl-badge>
<sl-badge type="danger" pill>Danger</sl-badge>
```
### Pulsating Badges
Use the `pulse` attribute to draw attention to the badge with a subtle animation.
```html preview
<div class="badge-pulse">
<sl-badge type="primary" pill pulse>1</sl-badge>
<sl-badge type="success" pill pulse>1</sl-badge>
<sl-badge type="info" pill pulse>1</sl-badge>
<sl-badge type="warning" pill pulse>1</sl-badge>
<sl-badge type="danger" pill pulse>1</sl-badge>
</div>
<style>
.badge-pulse sl-badge:not(:last-of-type) {
margin-right: 1rem;
}
</style>
```
### With Buttons
One of the most common use cases for badges is attaching them to buttons. To make this easier, badges will be automatically positioned at the top-right when they're a child of a button.
```html preview
<sl-button>
Requests
<sl-badge pill>30</sl-badge>
</sl-button>
<sl-button style="margin-left: 1rem;">
Warnings
<sl-badge type="warning" pill>8</sl-badge>
</sl-button>
<sl-button style="margin-left: 1rem;">
Errors
<sl-badge type="danger" pill>6</sl-badge>
</sl-button>
```
### With Menu Items
When including badges in menu items, use the `suffix` slot to make sure they're aligned correctly.
```html preview
<sl-menu style="max-width: 240px; border: solid 1px var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium);">
<sl-menu-label>Messages</sl-menu-label>
<sl-menu-item>Comments <sl-badge slot="suffix" type="info" pill>4</sl-badge></sl-menu-item>
<sl-menu-item>Replies <sl-badge slot="suffix" type="info" pill>12</sl-badge></sl-menu-item>
</sl-menu>
```
[component-metadata:sl-badge]

View File

@@ -1,221 +0,0 @@
# Button Group
[component-header:sl-button-group]
Button groups can be used to group related buttons into sections.
```html preview
<sl-button-group>
<sl-button>Left</sl-button>
<sl-button>Center</sl-button>
<sl-button>Right</sl-button>
</sl-button-group>
```
## Examples
### Button Sizes
All button sizes are supported, but avoid mixing sizes within the same button group.
```html preview
<sl-button-group>
<sl-button size="small">Left</sl-button>
<sl-button size="small">Center</sl-button>
<sl-button size="small">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button size="medium">Left</sl-button>
<sl-button size="medium">Center</sl-button>
<sl-button size="medium">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button size="large">Left</sl-button>
<sl-button size="large">Center</sl-button>
<sl-button size="large">Right</sl-button>
</sl-button-group>
```
### Theme Buttons
Theme buttons are supported through the button's `type` attribute.
```html preview
<sl-button-group>
<sl-button type="primary">Left</sl-button>
<sl-button type="primary">Center</sl-button>
<sl-button type="primary">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button type="success">Left</sl-button>
<sl-button type="success">Center</sl-button>
<sl-button type="success">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button type="info">Left</sl-button>
<sl-button type="info">Center</sl-button>
<sl-button type="info">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button type="warning">Left</sl-button>
<sl-button type="warning">Center</sl-button>
<sl-button type="warning">Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button type="danger">Left</sl-button>
<sl-button type="danger">Center</sl-button>
<sl-button type="danger">Right</sl-button>
</sl-button-group>
```
### Pill Buttons
Pill buttons are supported through the button's `pill` attribute.
```html preview
<sl-button-group>
<sl-button size="small" pill>Left</sl-button>
<sl-button size="small" pill>Center</sl-button>
<sl-button size="small" pill>Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button size="medium" pill>Left</sl-button>
<sl-button size="medium" pill>Center</sl-button>
<sl-button size="medium" pill>Right</sl-button>
</sl-button-group>
<br><br>
<sl-button-group>
<sl-button size="large" pill>Left</sl-button>
<sl-button size="large" pill>Center</sl-button>
<sl-button size="large" pill>Right</sl-button>
</sl-button-group>
```
### Dropdowns in Button Groups
Dropdowns can be placed inside button groups as long as the trigger is a `<sl-button>` element.
```html preview
<sl-button-group>
<sl-button>Button</sl-button>
<sl-button>Button</sl-button>
<sl-dropdown>
<sl-button slot="trigger" caret>Dropdown</sl-button>
<sl-menu>
<sl-menu-item>Item 1</sl-menu-item>
<sl-menu-item>Item 2</sl-menu-item>
<sl-menu-item>Item 3</sl-menu-item>
</sl-menu>
</sl-dropdown>
</sl-button-group>
```
### Split Buttons
Create a split button using a button and a dropdown.
```html preview
<sl-button-group>
<sl-button type="primary">Save</sl-button>
<sl-dropdown placement="bottom-end">
<sl-button slot="trigger" type="primary" caret></sl-button>
<sl-menu>
<sl-menu-item>Save</sl-menu-item>
<sl-menu-item>Save as&hellip;</sl-menu-item>
<sl-menu-item>Save all</sl-menu-item>
</sl-menu>
</sl-dropdown>
</sl-button-group>
```
### Tooltips in Button Groups
Buttons can be wrapped in tooltips to provide more detail when the user interacts with them.
```html preview
<sl-button-group>
<sl-tooltip content="I'm on the left">
<sl-button>Left</sl-button>
</sl-tooltip>
<sl-tooltip content="I'm in the middle">
<sl-button>Center</sl-button>
</sl-tooltip>
<sl-tooltip content="I'm on the right">
<sl-button>Right</sl-button>
</sl-tooltip>
</sl-button-group>
```
### Toolbar Example
Create interactive toolbars with button groups.
```html preview
<div class="button-group-toolbar">
<sl-button-group label="History">
<sl-tooltip content="Undo">
<sl-button><sl-icon name="arrow-counterclockwise"></sl-icon></sl-button>
</sl-tooltip>
<sl-tooltip content="Redo">
<sl-button><sl-icon name="arrow-clockwise"></sl-icon></sl-button>
</sl-tooltip>
</sl-button-group>
<sl-button-group label="Formatting">
<sl-tooltip content="Bold">
<sl-button><sl-icon name="type-bold"></sl-icon></sl-button>
</sl-tooltip>
<sl-tooltip content="Italic">
<sl-button><sl-icon name="type-italic"></sl-icon></sl-button>
</sl-tooltip>
<sl-tooltip content="Underline">
<sl-button><sl-icon name="type-underline"></sl-icon></sl-button>
</sl-tooltip>
</sl-button-group>
<sl-button-group label="Alignment">
<sl-tooltip content="Align Left">
<sl-button><sl-icon name="justify-left"></sl-icon></sl-button>
</sl-tooltip>
<sl-tooltip content="Align Center">
<sl-button><sl-icon name="justify"></sl-icon></sl-button>
</sl-tooltip>
<sl-tooltip content="Align Right">
<sl-button><sl-icon name="justify-right"></sl-icon></sl-button>
</sl-tooltip>
</sl-button-group>
</div>
<style>
.button-group-toolbar sl-button-group:not(:last-of-type) {
margin-right: var(--sl-spacing-x-small);
}
</style>
```
[component-metadata:sl-button-group]

View File

@@ -1,183 +0,0 @@
# Button
[component-header:sl-button]
Buttons represent actions that are available to the user.
```html preview
<sl-button>Button</sl-button>
```
## Examples
### Types
Use the `type` attribute to set the button's type.
```html preview
<sl-button type="default">Default</sl-button>
<sl-button type="primary">Primary</sl-button>
<sl-button type="success">Success</sl-button>
<sl-button type="info">Info</sl-button>
<sl-button type="warning">Warning</sl-button>
<sl-button type="danger">Danger</sl-button>
```
### Sizes
Use the `size` prop to change a button's size.
```html preview
<sl-button size="small">Small</sl-button>
<sl-button size="medium">Medium</sl-button>
<sl-button size="large">Large</sl-button>
```
### Pill Buttons
Use the `pill` prop to give buttons rounded edges.
```html preview
<sl-button size="small" pill>Small</sl-button>
<sl-button size="medium" pill>Medium</sl-button>
<sl-button size="large" pill>Large</sl-button>
```
### Circle Buttons
Use the `circle` prop to create circular icon buttons.
```html preview
<sl-button type="default" size="small" circle><sl-icon name="gear"></sl-icon></sl-button>
<sl-button type="default" size="medium" circle><sl-icon name="gear"></sl-icon></sl-button>
<sl-button type="default" size="large" circle><sl-icon name="gear"></sl-icon></sl-button>
```
### Text Buttons
Use the `text` type to create text buttons that share the same size as regular buttons but don't have backgrounds or borders.
```html preview
<sl-button type="text" size="small">Text</sl-button>
<sl-button type="text" size="medium">Text</sl-button>
<sl-button type="text" size="large">Text</sl-button>
```
### Link Buttons
It's often helpful to have a button that works like a link. This is possible by setting the `href` attribute, which will make the component render an `<a>` under the hood. This gives you all the default link behavior the browser provides (e.g. <kbd>CMD/CTRL/SHIFT + CLICK</kbd>) and exposes the `target` and `download` attributes.
```html preview
<sl-button href="https://example.com/">Link</sl-button>
<sl-button href="https://example.com/" target="_blank">New Window</sl-button>
<sl-button href="/assets/images/wordmark.svg" download="shoelace.svg">Download</sl-button>
<sl-button href="https://example.com/" disabled>Disabled</sl-button>
```
?> When a `target` is set, the link will receive `rel="noreferrer noopener"` for [security reasons](https://mathiasbynens.github.io/rel-noopener/).
### Setting a Custom Width
As expected, buttons can be given a custom width by setting its `width`. This is useful for making buttons span the full width of their container on smaller screens.
```html preview
<sl-button type="default" size="small" style="width: 100%; margin-bottom: 1rem;">Small</sl-button>
<sl-button type="default" size="medium" style="width: 100%; margin-bottom: 1rem;">Medium</sl-button>
<sl-button type="default" size="large" style="width: 100%;">Large</sl-button>
```
### Prefix and Suffix Icons
Use the `prefix` and `suffix` slots to add icons.
```html preview
<sl-button type="default" size="small">
<sl-icon slot="prefix" name="gear"></sl-icon>
Settings
</sl-button>
<sl-button type="default" size="small">
<sl-icon slot="suffix" name="arrow-counterclockwise"></sl-icon>
Refresh
</sl-button>
<sl-button type="default" size="small">
<sl-icon slot="prefix" name="link-45deg"></sl-icon>
<sl-icon slot="suffix" name="box-arrow-up-right"></sl-icon>
Open
</sl-button>
<br><br>
<sl-button type="default">
<sl-icon slot="prefix" name="gear"></sl-icon>
Settings
</sl-button>
<sl-button type="default">
<sl-icon slot="suffix" name="arrow-counterclockwise"></sl-icon>
Refresh
</sl-button>
<sl-button type="default">
<sl-icon slot="prefix" name="link-45deg"></sl-icon>
<sl-icon slot="suffix" name="box-arrow-up-right"></sl-icon>
Open
</sl-button>
<br><br>
<sl-button type="default" size="large">
<sl-icon slot="prefix" name="gear"></sl-icon>
Settings
</sl-button>
<sl-button type="default" size="large">
<sl-icon slot="suffix" name="arrow-counterclockwise"></sl-icon>
Refresh
</sl-button>
<sl-button type="default" size="large">
<sl-icon slot="prefix" name="link-45deg"></sl-icon>
<sl-icon slot="suffix" name="box-arrow-up-right"></sl-icon>
Open
</sl-button>
```
### Caret
Use the `caret` prop to add a dropdown indicator when a button will trigger a dropdown, menu, or popover.
```html preview
<sl-button size="small" caret>Small</sl-button>
<sl-button size="medium" caret>Medium</sl-button>
<sl-button size="large" caret>Large</sl-button>
```
### Loading
Use the `loading` prop to make a button busy. The width will remain the same as before, preventing adjacent elements from moving around. Clicks will be suppressed until the loading state is removed.
```html preview
<sl-button type="default" loading>Default</sl-button>
<sl-button type="primary" loading>Primary</sl-button>
<sl-button type="success" loading>Success</sl-button>
<sl-button type="info" loading>Info</sl-button>
<sl-button type="warning" loading>Warning</sl-button>
<sl-button type="danger" loading>Danger</sl-button>
```
### Disabled
Use the `disabled` prop to disable a button. Clicks will be suppressed until the disabled state is removed.
```html preview
<sl-button type="default" disabled>Default</sl-button>
<sl-button type="primary" disabled>Primary</sl-button>
<sl-button type="success" disabled>Success</sl-button>
<sl-button type="info" disabled>Info</sl-button>
<sl-button type="warning" disabled>Warning</sl-button>
<sl-button type="danger" disabled>Danger</sl-button>
```
[component-metadata:sl-button]

View File

@@ -1,144 +0,0 @@
# Card
[component-header:sl-card]
Cards can be used to group related subjects in a container.
```html preview
<sl-card class="card-overview">
<img
slot="image"
src="https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"
alt="A kitten sits patiently between a terracotta pot and decorative grasses."
>
<strong>Mittens</strong><br>
This kitten is as cute as he is playful. Bring him home today!<br>
<small>6 weeks old</small>
<div slot="footer">
<sl-button type="primary" pill>More Info</sl-button>
<sl-rating></sl-rating>
</div>
</sl-card>
<style>
.card-overview {
max-width: 300px;
}
.card-overview small {
color: var(--sl-color-gray-500);
}
.card-overview [slot="footer"] {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
```
## Examples
## Basic Card
Basic cards aren't very exciting, but they can display any content you want them to.
```html preview
<sl-card class="card-basic">
This is just a basic card. No image, no header, and no footer. Just your content.
</sl-card>
<style>
.card-basic {
max-width: 300px;
}
</style>
```
## Card with Header
Headers can be used to display titles and more.
```html preview
<sl-card class="card-header">
<div slot="header">
Header Title
<sl-icon-button name="gear"></sl-icon-button>
</div>
This card has a header. You can put all sorts of things in it!
</sl-card>
<style>
.card-header {
max-width: 300px;
}
.card-header [slot="header"] {
display: flex;
align-items: center;
justify-content: space-between;
}
.card-header h3 {
margin: 0;
}
.card-header sl-icon-button {
font-size: var(--sl-font-size-medium);
}
</style>
```
## Card with Footer
Footers can be used to display actions, summaries, or other relevant content.
```html preview
<sl-card class="card-footer">
This card has a footer. You can put all sorts of things in it!
<div slot="footer">
<sl-rating></sl-rating>
<sl-button slot="footer" type="primary">Preview</sl-button>
</div>
</sl-card>
<style>
.card-footer {
max-width: 300px;
}
.card-footer [slot="footer"] {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
```
## Images
Cards accept an `image` slot. The image is displayed atop the card and stretches to fit.
```html preview
<sl-card class="card-image">
<img
slot="image"
src="https://images.unsplash.com/photo-1547191783-94d5f8f6d8b1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=400&q=80"
alt="A kitten walks towards camera on top of pallet."
>
This is a kitten, but not just any kitten. This kitten likes walking along pallets.
</sl-card>
<style>
.card-image {
max-width: 300px;
}
</style>
```
[component-metadata:sl-card]

View File

@@ -1,39 +0,0 @@
# Checkbox
[component-header:sl-checkbox]
Checkboxes allow the user to toggle an option on or off.
```html preview
<sl-checkbox>Checkbox</sl-checkbox>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
## Examples
### Checked
Use the `checked` attribute to activate the checkbox.
```html preview
<sl-checkbox checked>Checked</sl-checkbox>
```
### Indeterminate
Use the `indeterminate` attribute to make the checkbox indeterminate.
```html preview
<sl-checkbox indeterminate>Indeterminate</sl-checkbox>
```
### Disabled
Use the `disabled` attribute to disable the checkbox.
```html preview
<sl-checkbox disabled>Disabled</sl-checkbox>
```
[component-metadata:sl-checkbox]

View File

@@ -1,52 +0,0 @@
# Color Picker
[component-header:sl-color-picker]
Color pickers allow the user to select a color.
```html preview
<sl-color-picker></sl-color-picker>
```
## Examples
### Opacity
Use the `opacity` attribute to enable the opacity slider. When this is enabled, the value will be displayed as HEXA, RGBA, or HSLA based on `format`.
```html preview
<sl-color-picker opacity></sl-color-picker>
```
### Formats
Set the color picker's format with the `format` attribute. Valid options include `hex`, `rgb`, and `hsl`. Note that the color picker's input will accept any parsable format (including CSS color names) regardless of this option.
To prevent users from toggling the format themselves, add the `no-format-toggle` attribute.
```html preview
<sl-color-picker format="hex" value="#4a90e2"></sl-color-picker>
<sl-color-picker format="rgb" value="rgb(80, 227, 194)"></sl-color-picker>
<sl-color-picker format="hsl" value="hsl(290, 87%, 47%)"></sl-color-picker>
```
### Sizes
Use the `size` attribute to change the color picker's trigger size.
```html preview
<sl-color-picker size="small"></sl-color-picker>
<sl-color-picker size="medium"></sl-color-picker>
<sl-color-picker size="large"></sl-color-picker>
```
### Inline
The color picker can be rendered inline instead of in a dropdown using the `inline` attribute.
```html preview
<sl-color-picker inline></sl-color-picker>
```
[component-metadata:sl-color-picker]

View File

@@ -1,65 +0,0 @@
# Details
[component-header:sl-details]
Details show a brief summary and expand to show additional content.
```html preview
<sl-details summary="Toggle Me">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
```
## Examples
### Disabled
Use the `disable` attribute to prevent the details from expanding.
```html preview
<sl-details summary="Disabled" disabled>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
```
### Grouping Details
Details are designed to function independently, but you can simulate a group or "accordion" where only one is shown at a time by listening for the `sl-show` event.
```html preview
<div class="details-group-example">
<sl-details summary="First" open>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
<sl-details summary="Second">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
<sl-details summary="Third">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</sl-details>
</div>
<script>
const container = document.querySelector('.details-group-example');
// Close all other details when one is shown
container.addEventListener('sl-show', event => {
[...container.querySelectorAll('sl-details')].map(details => (details.open = event.target === details));
});
</script>
<style>
.details-group-example sl-details:not(:last-of-type) {
margin-bottom: var(--sl-spacing-xx-small);
}
</style>
```
[component-metadata:sl-details]

View File

@@ -1,141 +0,0 @@
# Dialog
[component-header:sl-dialog]
Dialogs, sometimes called "modals", appear above the page and require the user's immediate attention.
```html preview
<sl-dialog label="Dialog" class="dialog-overview">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-dialog>
<sl-button>Open Dialog</sl-button>
<script>
(() => {
const dialog = document.querySelector('.dialog-overview');
const openButton = dialog.nextElementSibling;
const closeButton = dialog.querySelector('sl-button[slot="footer"]');
openButton.addEventListener('click', () => dialog.show());
closeButton.addEventListener('click', () => dialog.hide());
})();
</script>
```
## UX Tips
- Use a dialog when you immediately require the user's attention, e.g. confirming a destructive action.
- Always provide an obvious way for the user to dismiss the dialog.
- Don't nest dialogs. It almost always leads to a poor experience for the user.
## Examples
### Custom Width
Use the `--width` custom property to set the dialog's width.
```html preview
<sl-dialog label="Dialog" class="dialog-width" style="--width: 50vw;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-dialog>
<sl-button>Open Dialog</sl-button>
<script>
(() => {
const dialog = document.querySelector('.dialog-width');
const openButton = dialog.nextElementSibling;
const closeButton = dialog.querySelector('sl-button[slot="footer"]');
openButton.addEventListener('click', () => dialog.show());
closeButton.addEventListener('click', () => dialog.hide());
})();
</script>
```
### Scrolling
By design, a dialog's height will never exceed that of the viewport. As such, dialogs will not scroll with the page ensuring the header and footer are always accessible to the user.
```html preview
<sl-dialog label="Dialog" class="dialog-scrolling">
<div style="height: 150vh; border: dashed 2px var(--sl-color-gray-200); padding: 0 1rem;">
<p>Scroll down and give it a try! 👇</p>
</div>
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-dialog>
<sl-button>Open Dialog</sl-button>
<script>
(() => {
const dialog = document.querySelector('.dialog-scrolling');
const openButton = dialog.nextElementSibling;
const closeButton = dialog.querySelector('sl-button[slot="footer"]');
openButton.addEventListener('click', () => dialog.show());
closeButton.addEventListener('click', () => dialog.hide());
})();
</script>
```
### Ignoring Clicks on the Overlay
By default, dialogs are closed when the user clicks or taps on the overlay. To prevent this behavior, cancel the `sl-overlay-dismiss` event.
```html preview
<sl-dialog label="Dialog" class="dialog-no-overlay-dismiss">
This dialog will not be closed when you click outside of it.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-dialog>
<sl-button>Open Dialog</sl-button>
<script>
(() => {
const dialog = document.querySelector('.dialog-no-overlay-dismiss');
const openButton = dialog.nextElementSibling;
const closeButton = dialog.querySelector('sl-button[slot="footer"]');
openButton.addEventListener('click', () => dialog.show());
closeButton.addEventListener('click', () => dialog.hide());
dialog.addEventListener('sl-overlay-dismiss', event => event.preventDefault());
})();
</script>
```
### Customizing Initial Focus
By default, the dialog's panel will gain focus when opened. To set focus on a different element, listen for the `sl-initial-focus` event.
```html preview
<sl-dialog label="Dialog" class="dialog-focus">
<sl-input placeholder="I will have focus when the dialog is opened"></sl-input>
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-dialog>
<sl-button>Open Dialog</sl-button>
<script>
(() => {
const dialog = document.querySelector('.dialog-focus');
const input = dialog.querySelector('sl-input');
const openButton = dialog.nextElementSibling;
const closeButton = dialog.querySelector('sl-button[slot="footer"]');
openButton.addEventListener('click', () => dialog.show());
closeButton.addEventListener('click', () => dialog.hide());
dialog.addEventListener('sl-initial-focus', event => {
event.preventDefault();
input.setFocus({ preventScroll: true });
});
})();
</script>
```
[component-metadata:sl-dialog]

View File

@@ -1,237 +0,0 @@
# Drawer
[component-header:sl-drawer]
Drawers slide in from a container to expose additional options and information.
```html preview
<sl-drawer label="Drawer" class="drawer-overview">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-overview');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
## Examples
### Slide in From Left
To make the drawer slide in from the left, set the `placement` attribute to `left`.
```html preview
<sl-drawer label="Drawer" placement="left" class="drawer-placement-left">
This drawer slides in from the left.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-placement-left');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Slide in From Top
To make the drawer slide in from the top, set the `placement` attribute to `top`.
```html preview
<sl-drawer label="Drawer" placement="top" class="drawer-placement-top">
This drawer slides in from the top.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-placement-top');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Slide in From Bottom
To make the drawer slide in from the bottom, set the `placement` attribute to `bottom`.
```html preview
<sl-drawer label="Drawer" placement="bottom" class="drawer-placement-bottom">
This drawer slides in from the bottom.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-placement-bottom');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Contained to an Element
By default, the drawer slides out of its [containing block](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#Identifying_the_containing_block), which is usually the viewport. To make the drawer slide out of its parent element, add the `contained` prop and `position: relative` to the parent.
```html preview
<div
style="position: relative; border: solid 2px var(--sl-panel-border-color); height: 300px; padding: 1rem; margin-bottom: 1rem;"
>
The drawer will be contained to this box. This content won't shift or be affected in any way when the drawer opens.
<sl-drawer label="Drawer" contained class="drawer-contained" style="--size: 50%;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
</div>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-contained');
const openButton = drawer.parentElement.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Custom Size
Use the `--size` custom property to set the drawer's size. This will be applied to the drawer's width or height depending on its `placement`.
```html preview
<sl-drawer label="Drawer" class="drawer-custom-size" style="--size: 50vw;">
This drawer is always 50% of the viewport.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-custom-size');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Scrolling
By design, a drawer's height will never exceed 100% of its container. As such, drawers will not scroll with the page to ensure the header and footer are always accessible to the user.
```html preview
<sl-drawer label="Drawer" class="drawer-scrolling">
<div style="height: 150vh; border: dashed 2px var(--sl-color-gray-200); padding: 0 1rem;">
<p>Scroll down and give it a try! 👇</p>
</div>
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-scrolling');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
})();
</script>
```
### Ignoring Clicks on the Overlay
By default, drawers are closed when the user clicks or taps on the overlay. To prevent this behavior, cancel the `sl-overlay-dismiss` event.
```html preview
<sl-drawer label="Drawer" class="drawer-no-overlay-dismiss">
This drawer will not be closed when you click outside of it.
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-no-overlay-dismiss');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
drawer.addEventListener('sl-overlay-dismiss', event => event.preventDefault());
})();
</script>
```
### Customizing Initial Focus
By default, the drawer's panel will gain focus when opened. To set focus on a different element, listen for the `sl-initial-focus` event.
```html preview
<sl-drawer label="Drawer" class="drawer-focus">
<sl-input placeholder="I will have focus when the drawer is opened"></sl-input>
<sl-button slot="footer" type="primary">Close</sl-button>
</sl-drawer>
<sl-button>Open Drawer</sl-button>
<script>
(() => {
const drawer = document.querySelector('.drawer-focus');
const input = drawer.querySelector('sl-input');
const openButton = drawer.nextElementSibling;
const closeButton = drawer.querySelector('sl-button[type="primary"]');
openButton.addEventListener('click', () => drawer.show());
closeButton.addEventListener('click', () => drawer.hide());
drawer.addEventListener('sl-initial-focus', event => {
event.preventDefault();
input.setFocus({ preventScroll: true });
});
})();
</script>
```
[component-metadata:sl-drawer]

View File

@@ -1,177 +0,0 @@
# Dropdown
[component-header:sl-dropdown]
Dropdowns expose additional content that "drops down" in a panel.
Dropdowns consist of a trigger and a panel. By default, activating the trigger will expose the panel and interacting outside of the panel will close it.
Dropdowns are designed to work well with [menus](/components/menu.md) to provide a list of options the user can select from. However, dropdowns can also be used in lower-level applications (e.g. [color picker](/components/color-picker.md) and [select](/components/select.md)). The API gives you complete control over showing, hiding, and positioning the panel.
```html preview
<sl-dropdown>
<sl-button slot="trigger" caret>Dropdown</sl-button>
<sl-menu>
<sl-menu-item>Dropdown Item 1</sl-menu-item>
<sl-menu-item>Dropdown Item 2</sl-menu-item>
<sl-menu-item>Dropdown Item 3</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item checked>Checked</sl-menu-item>
<sl-menu-item disabled>Disabled</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>
Prefix
<sl-icon slot="prefix" name="gift"></sl-icon>
</sl-menu-item>
<sl-menu-item>
Suffix Icon
<sl-icon slot="suffix" name="heart"></sl-icon>
</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
## Examples
### Placement
The preferred placement of the dropdown can be set with the `placement` attribute. Note that the actual position may vary to ensure the panel remains in the viewport.
```html preview
<sl-dropdown placement="top-start">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Distance
The distance from the panel to the trigger can be customized using the `distance` attribute. This value is specified in pixels.
```html preview
<sl-dropdown distance="30">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Skidding
The offset of the panel along the trigger can be customized using the `skidding` attribute. This value is specified in pixels.
```html preview
<sl-dropdown skidding="30">
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item>Cut</sl-menu-item>
<sl-menu-item>Copy</sl-menu-item>
<sl-menu-item>Paste</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>Find</sl-menu-item>
<sl-menu-item>Replace</sl-menu-item>
</sl-menu>
</sl-dropdown>
```
### Hoisting
Dropdown panels will be clipped if they're inside a container that has `overflow: auto|hidden`. The `hoist` attribute forces the panel to use a fixed positioning strategy, allowing it to break out of the container. In this case, the panel will be positioned relative to its containing block, which is usually the viewport unless an ancestor uses a `transform`, `perspective`, or `filter`. [Refer to this page](https://developer.mozilla.org/en-US/docs/Web/CSS/position#fixed) for more details.
```html preview
<div class="dropdown-hoist">
<sl-dropdown>
<sl-button slot="trigger" caret>No Hoist</sl-button>
<sl-menu>
<sl-menu-item>Item 1</sl-menu-item>
<sl-menu-item>Item 2</sl-menu-item>
<sl-menu-item>Item 3</sl-menu-item>
</sl-menu>
</sl-dropdown>
<sl-dropdown hoist>
<sl-button slot="trigger" caret>Hoist</sl-button>
<sl-menu>
<sl-menu-item>Item 1</sl-menu-item>
<sl-menu-item>Item 2</sl-menu-item>
<sl-menu-item>Item 3</sl-menu-item>
</sl-menu>
</sl-dropdown>
</div>
<style>
.dropdown-hoist {
border: solid 2px var(--sl-panel-border-color);
padding: var(--sl-spacing-medium);
overflow: hidden;
}
</style>
```
### Getting the Selected Item
When dropdowns are used with [menus](/components/menu.md), you can listen for the `sl-select` event to determine which menu item was selected. The menu item element will be exposed in `event.detail.item`. You can set `value` props to make it easier to identify commands.
```html preview
<div class="dropdown-selection">
<sl-dropdown>
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item value="cut">Cut</sl-menu-item>
<sl-menu-item value="copy">Copy</sl-menu-item>
<sl-menu-item value="paste">Paste</sl-menu-item>
</sl-menu>
</sl-dropdown>
</div>
<script>
const container = document.querySelector('.dropdown-selection');
const dropdown = container.querySelector('sl-dropdown');
dropdown.addEventListener('sl-select', event => {
const selectedItem = event.detail.item;
console.log(selectedItem.value);
});
</script>
```
Alternatively, you can listen for the `click` event on individual menu items. Note that, using this approach, disabled menu items will still emit a `click` event.
```html preview
<div class="dropdown-selection-alt">
<sl-dropdown>
<sl-button slot="trigger" caret>Edit</sl-button>
<sl-menu>
<sl-menu-item value="cut">Cut</sl-menu-item>
<sl-menu-item value="copy">Copy</sl-menu-item>
<sl-menu-item value="paste">Paste</sl-menu-item>
</sl-menu>
</sl-dropdown>
</div>
<script>
const container = document.querySelector('.dropdown-selection-alt');
const cut = container.querySelector('sl-menu-item[value="cut"]');
const copy = container.querySelector('sl-menu-item[value="copy"]');
const paste = container.querySelector('sl-menu-item[value="paste"]');
cut.addEventListener('click', () => console.log('cut'));
copy.addEventListener('click', () => console.log('copy'));
paste.addEventListener('click', () => console.log('paste'));
</script>
```
[component-metadata:sl-dropdown]

View File

@@ -1,217 +0,0 @@
# Form
[component-header:sl-form]
Forms collect data that can easily be processed and sent to a server.
All Shoelace components make use of a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate markup, styles, and behavior. One caveat of this approach is that native `<form>` elements will not recognize Shoelace form controls.
This component solves that problem by serializing _both_ Shoelace form controls and native form controls when the form is submitted. The resulting form data is exposed in the `sl-submit` event as a [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) object in `event.detail.formData`. You can also find an array of form controls in `event.detail.formControls`.
Shoelace forms don't make use of `action` and `method` attributes and they don't submit the same was as native forms. To handle submission, you need to listen for the `sl-submit` event as shown in the example below and make an XHR request with the resulting form data.
```html preview
<sl-form class="form-overview">
<sl-input name="name" type="text" label="Name"></sl-input>
<br>
<sl-select name="favorite" label="Select your favorite">
<sl-menu-item value="birds">Birds</sl-menu-item>
<sl-menu-item value="cats">Cats</sl-menu-item>
<sl-menu-item value="dogs">Dogs</sl-menu-item>
</sl-select>
<br>
<sl-checkbox name="agree" value="yes">
I totally agree
</sl-checkbox>
<br><br>
<sl-button submit>Submit</sl-button>
</sl-form>
<script>
const form = document.querySelector('.form-overview');
// Watch for the slSubmit event
form.addEventListener('sl-submit', event => {
const formData = event.detail.formData;
let output = '';
//
// Example 1: Post data to a server and wait for a JSON response
//
fetch('https://jsonplaceholder.typicode.com/posts', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(result => {
console.log('Success:', result);
})
.catch(error => {
console.error('Error:', error);
});
//
// Example 2: Output all form control names + values
//
for (const entry of formData.entries()) {
output += `${entry[0]}: ${entry[1]}\n`;
}
alert(output);
//
// Example 3: Get all form controls that were serialized as
// an array of HTML elements
//
console.log(event.detail.formControls);
});
</script>
```
## Form Control Validation
Client-side validation can be enabled through the browser's [Constraint Validation API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation) for many form controls. You can enable it using props such as `required`, `pattern`, `minlength`, and `maxlength`. As the user interacts with the form control, the `invalid` attribute will reflect its validity based on its current value and the constraints that have been defined.
When a form control is invalid, the containing form will not be submitted. Instead, the browser will show the user a relevant error message. If you don't want to use client-side validation, you can suppress this behavior by adding `novalidate` to the `<sl-form>` element.
All form controls support validation, but not all validation props are available for every component. Refer to a component's documentation to see which validation props it supports.
Note that validity is not checked until the user interacts with the control or its containing form is submitted. This prevents required controls from being rendered as invalid right away, which can result in a poor user experience. If you need this behavior, set the `invalid` attribute initially.
!> Client-side validation can be used to improve the UX of forms, but it is not a replacement for server-side validation. **You should always validate and sanitize user input on the server!**
### Required Fields
To make a field required, use the `required` prop. The form will not be submitted if a required form control is empty.
```html preview
<sl-form class="input-validation-required">
<sl-input name="name" label="Name" required></sl-input>
<br>
<sl-select label="Favorite Animal" clearable required>
<sl-menu-item value="birds">Birds</sl-menu-item>
<sl-menu-item value="cats">Cats</sl-menu-item>
<sl-menu-item value="dogs">Dogs</sl-menu-item>
<sl-menu-item value="other">Other</sl-menu-item>
</sl-select>
<br>
<sl-textarea name="comment" label="Comment" required></sl-textarea>
<br>
<sl-checkbox required>Check me before submitting</sl-checkbox>
<br><br>
<sl-button type="primary" submit>Submit</sl-button>
</sl-form>
<script>
const form = document.querySelector('.input-validation-required');
form.addEventListener('sl-submit', () => alert('All fields are valid!'));
</script>
```
### Input Patterns
To restrict a value to a specific [pattern](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern), use the `pattern` attribute. This example only allows the letters A-Z, so the form will not submit if a number or symbol is entered. This only works with `<sl-input>` elements.
```html preview
<sl-form class="input-validation-pattern">
<sl-input name="letters" required label="Letters" pattern="[A-Za-z]+"></sl-input>
<br>
<sl-button type="primary" submit>Submit</sl-button>
</sl-form>
<script>
const form = document.querySelector('.input-validation-pattern');
form.addEventListener('sl-submit', () => alert('All fields are valid!'));
</script>
```
### Input Types
Some input types will automatically trigger constraints, such as `email` and `url`.
```html preview
<sl-form class="input-validation-type">
<sl-input type="email" label="Email" placeholder="you@example.com" required></sl-input>
<br>
<sl-input type="url" label="URL" placeholder="https://example.com/" required></sl-input>
<br>
<sl-button type="primary" submit>Submit</sl-button>
</sl-form>
<script>
const form = document.querySelector('.input-validation-type');
form.addEventListener('sl-submit', () => alert('All fields are valid!'));
</script>
```
### Custom Validation
To create a custom validation error, use the `setCustomValidity` method. The form will not be submitted when this method is called with anything other than an empty string, and its message will be shown by the browser as the validation error. To make the input valid again, call the method a second time with an empty string as the argument.
```html preview
<sl-form class="input-validation-custom">
<sl-input label="Type 'shoelace'" required></sl-input>
<br>
<sl-button type="primary" submit>Submit</sl-button>
</sl-form>
<script>
const form = document.querySelector('.input-validation-custom');
const input = form.querySelector('sl-input');
form.addEventListener('sl-submit', () => alert('All fields are valid!'));
input.addEventListener('sl-input', () => {
if (input.value === 'shoelace') {
input.setCustomValidity('');
} else {
input.setCustomValidity('Hey, you\'re supposed to type \'shoelace\' before submitting this!');
}
});
</script>
```
### Custom Validation Styles
The `invalid` attribute reflects the form control's validity, so you can style invalid fields using the `[invalid]` selector. The example below demonstrates how you can give erroneous fields a different appearance. Type something other than "shoelace" to demonstrate this.
```html preview
<sl-input class="custom-input" required pattern="shoelace">
<small slot="help-text">Please enter "shoelace" to continue</small>
</sl-input>
<style>
.custom-input[invalid]:not([disabled])::part(label),
.custom-input[invalid]:not([disabled])::part(help-text) {
color: var(--sl-color-danger-600);
}
.custom-input[invalid]:not([disabled])::part(base) {
border-color: var(--sl-color-danger-500);
}
.custom-input[invalid] {
--focus-ring: 0 0 0 var(--sl-focus-ring-width) var(--sl-focus-ring-color-danger);
}
</style>
```
### Third-party Validation
To opt out of the browser's built-in validation and use your own, add the `novalidate` attribute to the form. This will ignore all constraints and prevent the browser from showing its own warnings when form controls are invalid.
Remember that the `invalid` prop on form controls reflects validity as defined by the [Constraint Validation API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation). You can set it initially, but the `invalid` prop will update as the user interacts with the form control. As such, you should not rely on it to set invalid styles using a custom validation library.
Instead, toggle a class and target it in your stylesheet as shown below.
```html
<sl-form novalidate>
<sl-input class="invalid"></sl-input>
</sl-form>
<style>
sl-input.invalid {
...
}
</style>
```
[component-metadata:sl-form]

View File

@@ -1,58 +0,0 @@
# Format Bytes
[component-header:sl-format-bytes]
Formats a number as a human readable bytes value.
```html preview
<div class="format-bytes-overview">
The file is <sl-format-bytes value="1000"></sl-format-bytes> in size.
<br><br>
<sl-input type="number" value="1000" label="Number to Format" style="max-width: 180px;"></sl-input>
</div>
<script>
const container = document.querySelector('.format-bytes-overview');
const formatter = container.querySelector('sl-format-bytes');
const input = container.querySelector('sl-input');
input.addEventListener('sl-input', () => formatter.value = input.value || 0);
</script>
```
## Examples
### Formatting Bytes
Set the `value` attribute to a number to get the value in bytes.
```html preview
<sl-format-bytes value="12"></sl-format-bytes><br>
<sl-format-bytes value="1200"></sl-format-bytes><br>
<sl-format-bytes value="1200000"></sl-format-bytes><br>
<sl-format-bytes value="1200000000"></sl-format-bytes>
```
### Formatting Bits
To get the value in bits, set the `unit` attribute to `bits`.
```html preview
<sl-format-bytes value="12" unit="bits"></sl-format-bytes><br>
<sl-format-bytes value="1200" unit="bits"></sl-format-bytes><br>
<sl-format-bytes value="1200000" unit="bits"></sl-format-bytes><br>
<sl-format-bytes value="1200000000" unit="bits"></sl-format-bytes>
```
### Localization
Use the `locale` attribute to set the number formatting locale.
```html preview
<sl-format-bytes value="12" locale="de"></sl-format-bytes><br>
<sl-format-bytes value="1200" locale="de"></sl-format-bytes><br>
<sl-format-bytes value="1200000" locale="de"></sl-format-bytes><br>
<sl-format-bytes value="1200000000" locale="de"></sl-format-bytes>
```
[component-metadata:sl-format-bytes]

View File

@@ -1,64 +0,0 @@
# Format Date
[component-header:sl-format-date]
Formats a date/time using the specified locale and options.
Localization is handled by the browser's [`Intl.DateTimeFormat` API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat). No language packs are required.
```html preview
<!-- Shoelace 2 release date 🎉 -->
<sl-format-date date="2020-07-15T09:17:00-04:00"></sl-format-date>
```
The `date` prop determines the date/time to use when formatting. It must be a string that [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) can interpret or a [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object set via JavaScript. If omitted, the current date/time will be assumed.
?> When using strings, avoid ambiguous dates such as `03/04/2020` which can be interpreted as March 4 or April 3 depending on the user's browser and locale. Instead, always use a valid [ISO 8601 date time string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#Date_Time_String_Format) to ensure the date will be parsed properly by all clients.
## Examples
### Date & Time Formatting
Formatting options are based on those found in the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat). When formatting options are provided, the date/time will be formatted according to those values. When no formatting options are provided, a localized, numeric date will be displayed instead.
```html preview
<!-- Human-readable date -->
<sl-format-date month="long" day="numeric" year="numeric"></sl-format-date><br>
<!-- Time -->
<sl-format-date hour="numeric" minute="numeric"></sl-format-date><br>
<!-- Weekday -->
<sl-format-date weekday="long"></sl-format-date><br>
<!-- Month -->
<sl-format-date month="long"></sl-format-date><br>
<!-- Year -->
<sl-format-date year="numeric"></sl-format-date><br>
<!-- No formatting options -->
<sl-format-date></sl-format-date>
```
### Hour Formatting
By default, the browser will determine whether to use 12-hour or 24-hour time. To force one or the other, set the `hourFormat` prop to `12` or `24`.
```html preview
<sl-format-date hour="numeric" minute="numeric" hour-format="12"></sl-format-date><br>
<sl-format-date hour="numeric" minute="numeric" hour-format="24"></sl-format-date>
```
### Localization
Use the `locale` attribute to set the date/time formatting locale.
```html preview
English: <sl-format-date locale="en"></sl-format-date><br>
French: <sl-format-date locale="fr"></sl-format-date><br>
Russian: <sl-format-date locale="ru"></sl-format-date><br>
```
[component-metadata:sl-format-date]

View File

@@ -1,61 +0,0 @@
# Format Number
[component-header:sl-format-number]
Formats a number using the specified locale and options.
Localization is handled by the browser's [`Intl.NumberFormat` API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat). No language packs are required.
```html preview
<div class="format-number-overview">
<sl-format-number value="1000"></sl-format-number>
<br><br>
<sl-input type="number" value="1000" label="Number to Format" style="max-width: 180px;"></sl-input>
</div>
<script>
const container = document.querySelector('.format-number-overview');
const formatter = container.querySelector('sl-format-number');
const input = container.querySelector('sl-input');
input.addEventListener('sl-input', () => formatter.value = input.value || 0);
</script>
```
## Examples
### Percentages
To get the value as a percent, set the `type` attribute to `percent`.
```html preview
<sl-format-number type="percent" value="0"></sl-format-number><br>
<sl-format-number type="percent" value=".25"></sl-format-number><br>
<sl-format-number type="percent" value=".50"></sl-format-number><br>
<sl-format-number type="percent" value=".75"></sl-format-number><br>
<sl-format-number type="percent" value="1"></sl-format-number>
```
### Localization
Use the `locale` attribute to set the number formatting locale.
```html preview
English: <sl-format-number value="2000" locale="en" minimum-fraction-digits="2"></sl-format-number><br>
German: <sl-format-number value="2000" locale="de" minimum-fraction-digits="2"></sl-format-number><br>
Russian: <sl-format-number value="2000" locale="ru" minimum-fraction-digits="2"></sl-format-number>
```
### Currency
To format a number as a monetary value, set the `type` attribute to `currency` and set the `currency` attribute to the desired ISO 4217 currency code. You should also specify `locale` to ensure the the number is formatted correctly for the target locale.
```html preview
<sl-format-number type="currency" currency="USD" value="2000" locale="en-US"></sl-format-number><br>
<sl-format-number type="currency" currency="GBP" value="2000" locale="en-GB"></sl-format-number><br>
<sl-format-number type="currency" currency="EUR" value="2000" locale="de"></sl-format-number><br>
<sl-format-number type="currency" currency="RUB" value="2000" locale="ru"></sl-format-number><br>
<sl-format-number type="currency" currency="CNY" value="2000" locale="zh-cn"></sl-format-number>
```
[component-metadata:sl-format-number]

View File

@@ -1,67 +0,0 @@
# Icon Button
[component-header:sl-icon-button]
Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.
For a full list of icons that come bundled with Shoelace, refer to the [icon component](/components/icon).
```html preview
<sl-icon-button name="gear" label="Settings"></sl-icon-button>
```
## Examples
### Sizes
Icon buttons inherit their parent element's `font-size`.
```html preview
<sl-icon-button name="pencil" label="Edit" style="font-size: 1.5rem;"></sl-icon-button>
<sl-icon-button name="pencil" label="Edit" style="font-size: 2rem;"></sl-icon-button>
<sl-icon-button name="pencil" label="Edit" style="font-size: 2.5rem;"></sl-icon-button>
```
### Colors
Icon buttons are designed to have a uniform appearance, so their color is not inherited. However, you can still customize them by styling the `base` part.
```html preview
<div class="icon-button-color">
<sl-icon-button name="type-bold" label="Bold"></sl-icon-button>
<sl-icon-button name="type-italic" label="Italic"></sl-icon-button>
<sl-icon-button name="type-underline" label="Underline"></sl-icon-button>
</div>
<style>
.icon-button-color sl-icon-button::part(base) {
color: #b00091;
}
.icon-button-color sl-icon-button::part(base):hover,
.icon-button-color sl-icon-button::part(base):focus {
color: #c913aa;
}
.icon-button-color sl-icon-button::part(base):active {
color: #960077;
}
</style>
```
### Icon Button with Tooltip
Wrap a tooltip around an icon button to provide contextual information to the user.
```html preview
<sl-tooltip content="Settings">
<sl-icon-button name="gear" label="Settings"></sl-icon-button>
</sl-tooltip>
```
### Disabled
```html preview
<sl-icon-button name="gear" label="Settings" disabled></sl-icon-button>
```
[component-metadata:sl-icon-button]

View File

@@ -1,626 +0,0 @@
# Icon
[component-header:sl-icon]
Icons are symbols that can be used to represent various options within an application.
Shoelace comes bundled with over 1,300 icons courtesy of the [Bootstrap Icons](https://icons.getbootstrap.com/) project. If you prefer, you can also register a [custom icon library](#icon-libraries).
Click or tap on an icon below to copy its name and use it like this.
```html
<sl-icon name="icon-name-here"></sl-icon>
```
<div class="icon-search">
<div class="icon-search-controls">
<sl-input placeholder="Search Icons" clearable>
<sl-icon slot="prefix" name="search"></sl-icon>
</sl-input>
<sl-select value="outline">
<sl-menu-item value="outline">Outlined</sl-menu-item>
<sl-menu-item value="fill">Filled</sl-menu-item>
<sl-menu-item value="all">All icons</sl-menu-item>
</sl-select>
</div>
<div class="icon-list"></div>
<input type="text" class="icon-copy-input">
</div>
## Examples
### Sizing
Icons are sized relative to the current font size. To change their size, set the `font-size` property on the icon itself or on a parent element as shown below.
```html preview
<div style="font-size: 32px;">
<sl-icon name="exclamation-triangle"></sl-icon>
<sl-icon name="archive"></sl-icon>
<sl-icon name="battery-charging"></sl-icon>
<sl-icon name="bell"></sl-icon>
<sl-icon name="clock"></sl-icon>
<sl-icon name="download"></sl-icon>
<sl-icon name="file-earmark"></sl-icon>
<sl-icon name="flag"></sl-icon>
<sl-icon name="heart"></sl-icon>
<sl-icon name="image"></sl-icon>
<sl-icon name="lightning"></sl-icon>
<sl-icon name="mic"></sl-icon>
<sl-icon name="search"></sl-icon>
<sl-icon name="star"></sl-icon>
<sl-icon name="trash"></sl-icon>
<sl-icon name="x-circle"></sl-icon>
</div>
```
### Custom Icons
Custom icons can be loaded individually with the `src` attribute. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon, it might make sense to register a [custom icon library](#icon-libraries).
```html preview
<sl-icon src="/assets/images/shoe.svg" style="font-size: 8rem;"></sl-icon>
```
## Icon Libraries
Shoelace lets you register additional icons to use with the `<sl-icon>` component through icon libraries. The icon files can exist locally or on a CORS-enabled endpoint (e.g. a CDN). There is no limit to how many icon libraries you can register and there is no cost associated with registering them, as individual icons are only requested when they're used.
To register an icon library, use the `registerIconLibrary()` function that's exported from `utilities/icon-library.js`. At a minimum, you must provide a name and a resolver function. The resolver function translates an icon name to a URL where the corresponding SVG file exists. Refer to the examples below to better understand how it works.
If necessary, a mutator function can be used to mutate the SVG element before rendering. This is necessary for some libraries due to the many possible ways SVGs are crafted. For example, icons should ideally inherit the current text color via `currentColor`, so you may need to apply `fill="currentColor` or `stroke="currentColor"` to the SVG element using this function.
Here's an example that registers an icon library located in the `/assets/icons` directory.
```html
<script type="module">
import { registerIconLibrary } from '/shoelace/dist/utilities/icon-library.js';
registerIconLibrary('my-icons', {
resolver: name => `/assets/icons/${name}.svg`,
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
```
To display an icon, set the `library` and `name` attributes of an `<sl-icon>` element.
```html
<!-- This will show the icon located at /assets/icons/smile.svg -->
<sl-icon library="my-icons" name="smile"></sl-icon>
```
If an icon is used before registration occurs, it will be empty initially but shown when registered.
The following examples demonstrate how to register a number of popular, open source icon libraries via CDN. Feel free to adapt the code as you see fit to use your own origin or naming conventions.
### Boxicons
This will register the [Boxicons](https://boxicons.com/) library using the jsDelivr CDN. This library has three variations: regular (`bx-*`), solid (`bxs-*`), and logos (`bxl-*`). A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [Creative Commons 4.0 License](https://github.com/atisawd/boxicons#license).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('boxicons', {
resolver: name => {
let folder = 'regular';
if (name.substring(0, 4) === 'bxs-') folder = 'solid';
if (name.substring(0, 4) === 'bxl-') folder = 'logos';
return `https://cdn.jsdelivr.net/npm/boxicons@2.0.5/svg/${folder}/${name}.svg`;
},
mutator:svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="boxicons" name="bx-bot"></sl-icon>
<sl-icon library="boxicons" name="bx-cookie"></sl-icon>
<sl-icon library="boxicons" name="bx-joystick"></sl-icon>
<sl-icon library="boxicons" name="bx-save"></sl-icon>
<sl-icon library="boxicons" name="bx-server"></sl-icon>
<sl-icon library="boxicons" name="bx-wine"></sl-icon>
<br>
<sl-icon library="boxicons" name="bxs-bot"></sl-icon>
<sl-icon library="boxicons" name="bxs-cookie"></sl-icon>
<sl-icon library="boxicons" name="bxs-joystick"></sl-icon>
<sl-icon library="boxicons" name="bxs-save"></sl-icon>
<sl-icon library="boxicons" name="bxs-server"></sl-icon>
<sl-icon library="boxicons" name="bxs-wine"></sl-icon>
<br>
<sl-icon library="boxicons" name="bxl-apple"></sl-icon>
<sl-icon library="boxicons" name="bxl-chrome"></sl-icon>
<sl-icon library="boxicons" name="bxl-edge"></sl-icon>
<sl-icon library="boxicons" name="bxl-firefox"></sl-icon>
<sl-icon library="boxicons" name="bxl-opera"></sl-icon>
<sl-icon library="boxicons" name="bxl-microsoft"></sl-icon>
</div>
```
### Feather Icons
This will register the [Feather Icons](https://feathericons.com/) library using the jsDelivr CDN.
Icons in this library are licensed under the [MIT License](https://github.com/feathericons/feather/blob/master/LICENSE).
```html preview
<div style="font-size: 24px;">
<sl-icon library="feather" name="feather"></sl-icon>
<sl-icon library="feather" name="pie-chart"></sl-icon>
<sl-icon library="feather" name="settings"></sl-icon>
<sl-icon library="feather" name="map-pin"></sl-icon>
<sl-icon library="feather" name="printer"></sl-icon>
<sl-icon library="feather" name="shopping-cart"></sl-icon>
</div>
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('feather', {
resolver: name => `https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/icons/${name}.svg`
});
</script>
```
### Font Awesome
This will register the [Font Awesome Free](https://fontawesome.com/) library using the jsDelivr CDN. This library has three variations: regular (`far-*`), solid (`fas-*`), and brands (`fab-*`). A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [Font Awesome Free License](https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt). Some of the icons that appear on the Font Awesome website require a license and are therefore not available in the CDN.
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('fa', {
resolver: name => {
const filename = name.replace(/^fa[rbs]-/, '');
let folder = 'regular';
if (name.substring(0, 4) === 'fas-') folder = 'solid';
if (name.substring(0, 4) === 'fab-') folder = 'brands';
return `https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/${folder}/${filename}.svg`;
},
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="fa" name="far-bell"></sl-icon>
<sl-icon library="fa" name="far-comment"></sl-icon>
<sl-icon library="fa" name="far-hand-point-right"></sl-icon>
<sl-icon library="fa" name="far-hdd"></sl-icon>
<sl-icon library="fa" name="far-heart"></sl-icon>
<sl-icon library="fa" name="far-star"></sl-icon>
<br>
<sl-icon library="fa" name="fas-archive"></sl-icon>
<sl-icon library="fa" name="fas-book"></sl-icon>
<sl-icon library="fa" name="fas-chess-knight"></sl-icon>
<sl-icon library="fa" name="fas-dice"></sl-icon>
<sl-icon library="fa" name="fas-pizza-slice"></sl-icon>
<sl-icon library="fa" name="fas-scroll"></sl-icon>
<br>
<sl-icon library="fa" name="fab-apple"></sl-icon>
<sl-icon library="fa" name="fab-chrome"></sl-icon>
<sl-icon library="fa" name="fab-edge"></sl-icon>
<sl-icon library="fa" name="fab-firefox"></sl-icon>
<sl-icon library="fa" name="fab-opera"></sl-icon>
<sl-icon library="fa" name="fab-microsoft"></sl-icon>
</div>
```
### Heroicons
This will register the [Heroicons](https://heroicons.com/) library using the jsDelivr CDN.
Icons in this library are licensed under the [MIT License](https://github.com/tailwindlabs/heroicons/blob/master/LICENSE).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('heroicons', {
resolver: name => `https://cdn.jsdelivr.net/npm/heroicons@0.4.2/outline/${name}.svg`
});
</script>
<div style="font-size: 24px;">
<sl-icon library="heroicons" name="chat"></sl-icon>
<sl-icon library="heroicons" name="cloud"></sl-icon>
<sl-icon library="heroicons" name="cog"></sl-icon>
<sl-icon library="heroicons" name="document-text"></sl-icon>
<sl-icon library="heroicons" name="gift"></sl-icon>
<sl-icon library="heroicons" name="volume-up"></sl-icon>
</div>
```
### Ionicons
This will register the [Ionicons](https://ionicons.com/) library using the jsDelivr CDN. This library has three variations: outline (default), filled (`*-filled`), and sharp (`*-sharp`). A mutator function is required to polyfill a handful of styles we're not including.
Icons in this library are licensed under the [MIT License](https://github.com/ionic-team/ionicons/blob/master/LICENSE).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('ionicons', {
resolver: name => `https://cdn.jsdelivr.net/npm/ionicons@5.1.2/dist/ionicons/svg/${name}.svg`,
mutator: svg => {
svg.setAttribute('fill', 'currentColor');
svg.setAttribute('stroke', 'currentColor');
[...svg.querySelectorAll('.ionicon-fill-none')].map(el => el.setAttribute('fill', 'none'));
[...svg.querySelectorAll('.ionicon-stroke-width')].map(el => el.setAttribute('stroke-width', '32px'));
}
});
</script>
<div style="font-size: 24px;">
<sl-icon library="ionicons" name="alarm"></sl-icon>
<sl-icon library="ionicons" name="american-football"></sl-icon>
<sl-icon library="ionicons" name="bug"></sl-icon>
<sl-icon library="ionicons" name="chatbubble"></sl-icon>
<sl-icon library="ionicons" name="settings"></sl-icon>
<sl-icon library="ionicons" name="warning"></sl-icon>
<br>
<sl-icon library="ionicons" name="alarm-outline"></sl-icon>
<sl-icon library="ionicons" name="american-football-outline"></sl-icon>
<sl-icon library="ionicons" name="bug-outline"></sl-icon>
<sl-icon library="ionicons" name="chatbubble-outline"></sl-icon>
<sl-icon library="ionicons" name="settings-outline"></sl-icon>
<sl-icon library="ionicons" name="warning-outline"></sl-icon>
<br>
<sl-icon library="ionicons" name="alarm-sharp"></sl-icon>
<sl-icon library="ionicons" name="american-football-sharp"></sl-icon>
<sl-icon library="ionicons" name="bug-sharp"></sl-icon>
<sl-icon library="ionicons" name="chatbubble-sharp"></sl-icon>
<sl-icon library="ionicons" name="settings-sharp"></sl-icon>
<sl-icon library="ionicons" name="warning-sharp"></sl-icon>
</div>
```
### Jam Icons
This will register the [Jam Icons](https://jam-icons.com/) library using the jsDelivr CDN. This library has two variations: regular (default) and filled (`*-f`). A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [MIT License](https://github.com/michaelampr/jam/blob/master/LICENSE).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('jam', {
resolver: name => `https://cdn.jsdelivr.net/npm/jam-icons@2.0.0/svg/${name}.svg`,
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="jam" name="calendar"></sl-icon>
<sl-icon library="jam" name="camera"></sl-icon>
<sl-icon library="jam" name="filter"></sl-icon>
<sl-icon library="jam" name="leaf"></sl-icon>
<sl-icon library="jam" name="picture"></sl-icon>
<sl-icon library="jam" name="set-square"></sl-icon>
<br>
<sl-icon library="jam" name="calendar-f"></sl-icon>
<sl-icon library="jam" name="camera-f"></sl-icon>
<sl-icon library="jam" name="filter-f"></sl-icon>
<sl-icon library="jam" name="leaf-f"></sl-icon>
<sl-icon library="jam" name="picture-f"></sl-icon>
<sl-icon library="jam" name="set-square-f"></sl-icon>
</div>
```
### Material Icons
This will register the [Material Icons](https://material.io/resources/icons/?style=baseline) library using the jsDelivr CDN. This library has three variations: outline (default), round (`*_round`), and sharp (`*_sharp`). A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [Apache 2.0 License](https://github.com/google/material-design-icons/blob/master/LICENSE).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('material', {
resolver: name => {
const match = name.match(/^(.*?)(_(round|sharp))?$/);
return `https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/${match[1]}/${match[3] || 'outline'}.svg`;
},
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="material" name="notifications"></sl-icon>
<sl-icon library="material" name="email"></sl-icon>
<sl-icon library="material" name="delete"></sl-icon>
<sl-icon library="material" name="volume_up"></sl-icon>
<sl-icon library="material" name="settings"></sl-icon>
<sl-icon library="material" name="shopping_basket"></sl-icon>
<br>
<sl-icon library="material" name="notifications_round"></sl-icon>
<sl-icon library="material" name="email_round"></sl-icon>
<sl-icon library="material" name="delete_round"></sl-icon>
<sl-icon library="material" name="volume_up_round"></sl-icon>
<sl-icon library="material" name="settings_round"></sl-icon>
<sl-icon library="material" name="shopping_basket_round"></sl-icon>
<br>
<sl-icon library="material" name="notifications_sharp"></sl-icon>
<sl-icon library="material" name="email_sharp"></sl-icon>
<sl-icon library="material" name="delete_sharp"></sl-icon>
<sl-icon library="material" name="volume_up_sharp"></sl-icon>
<sl-icon library="material" name="settings_sharp"></sl-icon>
<sl-icon library="material" name="shopping_basket_sharp"></sl-icon>
</div>
```
### Remix Icon
This will register the [Remix Icon](https://remixicon.com/) library using the jsDelivr CDN. This library has two variations: line (default) and fill (`*-fill`). It also groups icons by categories, so the name must include the category and icon separated by a slash. A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [Apache 2.0 License](https://github.com/Remix-Design/RemixIcon/blob/master/License).
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('remixicon', {
resolver: name => {
const match = name.match(/^(.*?)\/(.*?)(-(fill))?$/);
match[1] = match[1].charAt(0).toUpperCase() + match[1].slice(1);
return `https://cdn.jsdelivr.net/npm/remixicon@2.5.0/icons/${match[1]}/${match[2]}${match[3] || '-line'}.svg`;
},
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="remixicon" name="business/cloud"></sl-icon>
<sl-icon library="remixicon" name="design/brush"></sl-icon>
<sl-icon library="remixicon" name="business/pie-chart"></sl-icon>
<sl-icon library="remixicon" name="development/bug"></sl-icon>
<sl-icon library="remixicon" name="media/image"></sl-icon>
<sl-icon library="remixicon" name="system/alert"></sl-icon>
<br>
<sl-icon library="remixicon" name="business/cloud-fill"></sl-icon>
<sl-icon library="remixicon" name="design/brush-fill"></sl-icon>
<sl-icon library="remixicon" name="business/pie-chart-fill"></sl-icon>
<sl-icon library="remixicon" name="development/bug-fill"></sl-icon>
<sl-icon library="remixicon" name="media/image-fill"></sl-icon>
<sl-icon library="remixicon" name="system/alert-fill"></sl-icon>
</div>
```
### Unicons
This will register the [Unicons](https://iconscout.com/unicons) library using the jsDelivr CDN. This library has two variations: line (default) and solid (`*-s`). A mutator function is required to set the SVG's `fill` to `currentColor`.
Icons in this library are licensed under the [Apache 2.0 License](https://github.com/Iconscout/unicons/blob/master/LICENSE). Some of the icons that appear on the Unicons website, particularly many of the solid variations, require a license and are therefore not available in the CDN.
```html preview
<script type="module">
import { registerIconLibrary } from '/dist/shoelace.js';
registerIconLibrary('unicons', {
resolver: name => {
const match = name.match(/^(.*?)(-s)?$/);
return `https://cdn.jsdelivr.net/npm/@iconscout/unicons@3.0.3/svg/${match[2] === '-s' ? 'solid' : 'line'}/${match[1]}.svg`;
},
mutator: svg => svg.setAttribute('fill', 'currentColor')
});
</script>
<div style="font-size: 24px;">
<sl-icon library="unicons" name="clock"></sl-icon>
<sl-icon library="unicons" name="graph-bar"></sl-icon>
<sl-icon library="unicons" name="padlock"></sl-icon>
<sl-icon library="unicons" name="polygon"></sl-icon>
<sl-icon library="unicons" name="rocket"></sl-icon>
<sl-icon library="unicons" name="star"></sl-icon>
<br>
<sl-icon library="unicons" name="clock-s"></sl-icon>
<sl-icon library="unicons" name="graph-bar-s"></sl-icon>
<sl-icon library="unicons" name="padlock-s"></sl-icon>
<sl-icon library="unicons" name="polygon-s"></sl-icon>
<sl-icon library="unicons" name="rocket-s"></sl-icon>
<sl-icon library="unicons" name="star-s"></sl-icon>
</div>
```
### Customizing the Default Library
Shoelace comes bundled with over 1,300 icons courtesy of the [Bootstrap Icons](https://icons.getbootstrap.com/) project. These are the default icons that display when you use `<sl-icon>` without a `name` attribute. If you prefer to have these icons resolve elsewhere, you can register an icon library with the `default` name and a custom resolver.
This example will load the same set of icons from the jsDelivr CDN instead of your local assets folder.
```html
<script type="module">
import { registerIconLibrary } from '/shoelace/dist/utilities/icon-library.js';
registerIconLibrary('default', {
resolver: name => `https://cdn.jsdelivr.net/npm/bootstrap-icons@1.0.0/icons/${name}.svg`
});
</script>
```
Alternatively, you can replace the default icons with a completely different icon set. Just keep in mind that some of the default icons are used by components so you'll want to make sure those names resolve to an appropriate alternative.
```html
<script type="module">
import { registerIconLibrary } from '/shoelace/dist/utilities/icon-library.js';
registerIconLibrary('default', {
name => `/my/custom/icons/${name}.svg`
});
</script>
```
<!-- Supporting scripts and styles for the search utility -->
<script>
fetch('/dist/assets/icons/icons.json')
.then(res => res.json())
.then(icons => {
const container = document.querySelector('.icon-search');
const input = container.querySelector('sl-input');
const select = container.querySelector('sl-select');
const copyInput = container.querySelector('.icon-copy-input');
const loader = container.querySelector('.icon-loader');
const list = container.querySelector('.icon-list');
const queue = [];
// Generate icons
icons.map(i => {
const item = document.createElement('div');
item.classList.add('icon-list-item');
item.setAttribute('data-name', i.name);
item.setAttribute('data-terms', [i.name, i.title, ...(i.tags || []), ...(i.categories || [])].join(' '));
item.innerHTML = `
<svg width="1em" height="1em">
<use xlink:href="/assets/icons/sprite.svg#${i.name}"></use>
</svg>
`;
const tooltip = document.createElement('sl-tooltip');
tooltip.content = i.name;
tooltip.appendChild(item);
list.appendChild(tooltip);
item.addEventListener('click', () => {
copyInput.value = i.name;
copyInput.select();
document.execCommand('copy');
tooltip.content = 'Copied!';
setTimeout(() => tooltip.content = i.name, 1000);
});
});
// Filter as the user types
input.addEventListener('sl-input', () => {
[...list.querySelectorAll('.icon-list-item')].map(item => {
const filter = input.value.toLowerCase();
if (filter === '') {
item.hidden = false;
} else {
const terms = item.getAttribute('data-terms').toLowerCase();
item.hidden = terms.indexOf(filter) < 0;
}
});
});
// Sort by type and remember preference
const iconType = localStorage.getItem('sl-icon:type') || 'outline';
select.value = iconType;
list.setAttribute('data-type', select.value);
select.addEventListener('sl-change', () => {
list.setAttribute('data-type', select.value);
localStorage.setItem('sl-icon:type', select.value);
});
});
</script>
<style>
.icon-search {
border: solid 1px var(--sl-panel-border-color);
border-radius: var(--sl-border-radius-medium);
padding: var(--sl-spacing-medium);
}
.icon-search-controls {
display: flex;
}
.icon-search-controls sl-input {
flex: 1 1 auto;
}
.icon-search-controls sl-select {
width: 10rem;
flex: 0 0 auto;
margin-left: 1rem;
}
.icon-loader {
display: flex;
align-items: center;
justify-content: center;
min-height: 30vh;
}
.icon-list {
display: grid;
grid-template-columns: repeat(12, 1fr);
position: relative;
margin-top: 1rem;
}
.icon-loader[hidden],
.icon-list[hidden] {
display: none;
}
.icon-list-item {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: var(--sl-border-radius-circle);
font-size: 24px;
width: 2em;
height: 2em;
margin: 0 auto;
cursor: copy;
transition: var(--sl-transition-medium) all;
}
.icon-list-item:hover {
background-color: var(--sl-color-primary-50);
color: var(--sl-color-primary-500);
}
.sl-theme-dark .icon-list-item:hover {
background-color: var(--sl-color-primary-900);
}
.icon-list[data-type="outline"] .icon-list-item[data-name$="-fill"] {
display: none;
}
.icon-list[data-type="fill"] .icon-list-item:not([data-name$="-fill"]) {
display: none;
}
.icon-copy-input {
position: absolute;
opacity: 0;
pointer-events: none;
}
@media screen and (max-width: 1000px) {
.icon-list {
grid-template-columns: repeat(8, 1fr);
}
.icon-list-item {
font-size: 20px;
}
.icon-search-controls {
display: block;
}
.icon-search-controls sl-select {
width: auto;
margin: 1rem 0 0 0;
}
}
@media screen and (max-width: 500px) {
.icon-list {
grid-template-columns: repeat(4, 1fr);
}
}
</style>
[component-metadata:sl-icon]

View File

@@ -1,29 +0,0 @@
# Image Comparer
[component-header:sl-image-comparer]
Compare visual differences between similar photos with a sliding panel.
For best results, use images that share the same dimensions. The slider can be controlled by dragging or pressing the left and right arrow keys. (Tip: press shift + arrows to move the slider in larger intervals, or home + end to jump to the beginning or end.)
```html preview
<sl-image-comparer>
<img slot="before" src="https://images.unsplash.com/photo-1517331156700-3c241d2b4d83?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80&sat=-100&bri=-5" alt="Grayscale version of kittens in a basket looking around.">
<img slot="after" src="https://images.unsplash.com/photo-1517331156700-3c241d2b4d83?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=80" alt="Color version of kittens in a basket looking around.">
</sl-image-comparer>
```
## Examples
### Initial Position
Use the `position` attribute to set the initial position of the slider. This is a percentage from `0` to `100`.
```html preview
<sl-image-comparer position="0">
<img slot="before" src="https://images.unsplash.com/photo-1520903074185-8eca362b3dce?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1200&q=80" alt="A person sitting on bricks wearing untied boots.">
<img slot="after" src="https://images.unsplash.com/photo-1520640023173-50a135e35804?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2250&q=80" alt="A person sitting on a yellow curb tying shoelaces on a boot.">
</sl-image-comparer>
```
[component-metadata:sl-image-comparer]

View File

@@ -1,39 +0,0 @@
# Include
[component-header:sl-include]
Includes give you the power to embed external HTML files into the page.
Included files are asynchronously requested using `window.fetch()`. Requests are cached, so the same file can be included multiple times, but only one request will be made.
The included content will be inserted into the `<sl-include>` element's default slot so it can be easily accessed and styled through the light DOM.
```html preview
<sl-include src="/assets/examples/include.html"></sl-include>
```
## Examples
### Listening for Events
When an include file loads successfully, the `sl-load` event will be emitted. You can listen for this event to add custom loading logic to your includes.
If the request fails, the `sl-error` event will be emitted. In this case, `event.detail.status` will contain the resulting HTTP status code of the request, e.g. 404 (not found).
```html
<sl-include src="/assets/examples/include.html"></sl-include>
<script>
const include = document.querySelector('sl-include');
include.addEventListener('sl-load', () => {
console.log('Success');
});
include.addEventListener('sl-error', event => {
console.log('Error', event.detail.status);
});
</script>
```
[component-metadata:sl-include]

View File

@@ -1,121 +0,0 @@
# Input
[component-header:sl-input]
Inputs collect data from the user.
```html preview
<sl-input></sl-input>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
?> Please refer to the section on [form control validation](/components/form?id=form-control-validation) to learn how to do client-side validation.
## Examples
### Placeholders
Use the `placeholder` attribute to add a placeholder.
```html preview
<sl-input placeholder="Type something"></sl-input>
```
### Clearable
Add the `clearable` prop to add a clear button when the input has content.
```html preview
<sl-input placeholder="Clearable" clearable></sl-input>
```
### Toggle Password
Add the `toggle-password` prop to add a toggle button that will show the password when activated.
```html preview
<sl-input type="password" placeholder="Password Toggle" size="small" toggle-password></sl-input>
<br>
<sl-input type="password" placeholder="Password Toggle" size="medium" toggle-password></sl-input>
<br>
<sl-input type="password" placeholder="Password Toggle" size="large" toggle-password></sl-input>
```
### Pill
Use the `pill` prop to give inputs rounded edges.
```html preview
<sl-input placeholder="Small" size="small" pill></sl-input>
<br>
<sl-input placeholder="Medium" size="medium" pill></sl-input>
<br>
<sl-input placeholder="Large" size="large" pill></sl-input>
```
### Disabled
Use the `disabled` attribute to disable an input.
```html preview
<sl-input placeholder="Disabled" size="small" disabled></sl-input>
<br>
<sl-input placeholder="Disabled" size="medium" disabled></sl-input>
<br>
<sl-input placeholder="Disabled" size="large" disabled></sl-input>
```
### Sizes
Use the `size` attribute to change an input's size.
```html preview
<sl-input placeholder="Small" size="small"></sl-input>
<br>
<sl-input placeholder="Medium" size="medium"></sl-input>
<br>
<sl-input placeholder="Large" size="large"></sl-input>
```
### Prefix & Suffix Icons
Use the `prefix` and `suffix` slots to add icons.
```html preview
<sl-input placeholder="Small" size="small">
<sl-icon name="tag" slot="prefix"></sl-icon>
<sl-icon name="gear" slot="suffix"></sl-icon>
</sl-input>
<br>
<sl-input placeholder="Medium" size="medium">
<sl-icon name="tag" slot="prefix"></sl-icon>
<sl-icon name="gear" slot="suffix"></sl-icon>
</sl-input>
<br>
<sl-input placeholder="Large" size="large">
<sl-icon name="tag" slot="prefix"></sl-icon>
<sl-icon name="gear" slot="suffix"></sl-icon>
</sl-input>
```
### Labels
Use the `label` attribute to give the input an accessible label. For labels that contain HTML, use the `label` slot instead.
```html preview
<sl-input label="What is your name?"></sl-input>
```
### Help Text
Add descriptive help text to an input with the `help-text` attribute. For help texts that contain HTML, use the `help-text` slot instead.
```html preview
<sl-input
label="Nickname"
help-text="What would you like people to call you?"
></sl-input>
```
[component-metadata:sl-input]

View File

@@ -1,22 +0,0 @@
# Menu Divider
[component-header:sl-menu-divider]
Menu dividers are used to visually group menu items.
```html preview
<sl-menu
style="max-width: 200px; border: solid 1px var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium);"
>
<sl-menu-item value="1">Option 1</sl-menu-item>
<sl-menu-item value="2">Option 2</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item value="3">Option 3</sl-menu-item>
<sl-menu-item value="4">Option 4</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item value="5">Option 5</sl-menu-item>
<sl-menu-item value="6">Option 6</sl-menu-item>
</sl-menu>
```
[component-metadata:sl-menu-divider]

View File

@@ -1,29 +0,0 @@
# Menu Item
[component-header:sl-menu-item]
Menu items provide options for the user to pick from in a menu.
```html preview
<sl-menu
style="max-width: 200px; border: solid 1px var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium);"
>
<sl-menu-item>Option 1</sl-menu-item>
<sl-menu-item>Option 2</sl-menu-item>
<sl-menu-item>Option 3</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item checked>Checked</sl-menu-item>
<sl-menu-item disabled>Disabled</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item>
Prefix Icon
<sl-icon slot="prefix" name="gift"></sl-icon>
</sl-menu-item>
<sl-menu-item>
Suffix Icon
<sl-icon slot="suffix" name="heart"></sl-icon>
</sl-menu-item>
</sl-menu>
```
[component-metadata:sl-menu-item]

View File

@@ -1,23 +0,0 @@
# Menu Label
[component-header:sl-menu-label]
Menu labels are used to describe a group of menu items.
```html preview
<sl-menu
style="max-width: 200px; border: solid 1px var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium);"
>
<sl-menu-label>Fruits</sl-menu-label>
<sl-menu-item value="apple">Apple</sl-menu-item>
<sl-menu-item value="banana">Banana</sl-menu-item>
<sl-menu-item value="orange">Orange</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-label>Vegetables</sl-menu-label>
<sl-menu-item value="broccoli">Broccoli</sl-menu-item>
<sl-menu-item value="carrot">Carrot</sl-menu-item>
<sl-menu-item value="zucchini">Zucchini</sl-menu-item>
</sl-menu>
```
[component-metadata:sl-menu-label]

View File

@@ -1,21 +0,0 @@
# Menu
[component-header:sl-menu]
Menus provide a list of options for the user to choose from.
Use [menu items](/components/menu-item.md), [menu dividers](/components/menu-divider.md), and [menu labels](/components/menu-label.md) to compose a menu.
```html preview
<sl-menu style="max-width: 200px; border: solid 1px var(--sl-panel-border-color); border-radius: var(--sl-border-radius-medium);">
<sl-menu-item value="undo">Undo</sl-menu-item>
<sl-menu-item value="redo">Redo</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item value="cut">Cut</sl-menu-item>
<sl-menu-item value="copy">Copy</sl-menu-item>
<sl-menu-item value="paste">Paste</sl-menu-item>
<sl-menu-item value="delete">Delete</sl-menu-item>
</sl-menu>
```
[component-metadata:sl-menu]

View File

@@ -1,60 +0,0 @@
# Progress Bar
[component-header:sl-progress-bar]
Progress bars are used to show the status of an ongoing operation.
```html preview
<sl-progress-bar percentage="50"></sl-progress-bar>
```
## Examples
### Custom Height
Use the `--height` custom property to set the progress bar's height.
```html preview
<sl-progress-bar percentage="50" style="--height: 6px;"></sl-progress-bar>
```
### Labels
Use the default slot to show a label.
```html preview
<sl-progress-bar percentage="50" class="progress-bar-labels">50%</sl-progress-bar>
<br>
<sl-button circle><sl-icon name="dash"></sl-icon></sl-button>
<sl-button circle><sl-icon name="plus"></sl-icon></sl-button>
<script>
const progressBar = document.querySelector('.progress-bar-labels');
const subtractButton = progressBar.nextElementSibling.nextElementSibling;
const addButton = subtractButton.nextElementSibling;
addButton.addEventListener('click', () => {
const percentage = Math.min(100, progressBar.percentage + 10);
progressBar.percentage = percentage;
progressBar.textContent = `${percentage}%`;
});
subtractButton.addEventListener('click', () => {
const percentage = Math.max(0, progressBar.percentage - 10)
progressBar.percentage = percentage;
progressBar.textContent = `${percentage}%`;
});
</script>
```
### Indeterminate
The `indeterminate` attribute can be used to inform the user that the operation is pending, but its status cannot currently be determined. In this state, `percentage` is ignored and the label, if present, will not be shown.
```html preview
<sl-progress-bar indeterminate></sl-progress-bar>
```
[component-metadata:sl-progress-bar]

View File

@@ -1,71 +0,0 @@
# Progress Ring
[component-header:sl-progress-ring]
Progress rings are used to show the progress of a determinate operation in a circular fashion.
```html preview
<sl-progress-ring percentage="50"></sl-progress-ring>
```
## Examples
### Size
Use the `size` attribute to set the diameter of the progress ring.
```html preview
<sl-progress-ring percentage="50" size="200"></sl-progress-ring>
```
### Stroke Width
Use the `stroke-width` attribute to set the width of the progress ring's indicator.
```html preview
<sl-progress-ring percentage="50" stroke-width="10"></sl-progress-ring>
```
### Colors
To change the color, use the `--track-color` and `--indicator-color` custom properties.
```html preview
<sl-progress-ring
percentage="50"
style="--track-color: #ffe2c6; --indicator-color: tomato;"
></sl-progress-ring>
```
### Labels
Use the default slot to show a label.
```html preview
<sl-progress-ring percentage="50" size="200" class="progress-ring-labels" style="margin-bottom: .5rem;">50%</sl-progress-ring>
<br>
<sl-button circle><sl-icon name="dash"></sl-icon></sl-button>
<sl-button circle><sl-icon name="plus"></sl-icon></sl-button>
<script>
const progressRing = document.querySelector('.progress-ring-labels');
const subtractButton = progressRing.nextElementSibling.nextElementSibling;
const addButton = subtractButton.nextElementSibling;
addButton.addEventListener('click', () => {
const percentage = Math.min(100, progressRing.percentage + 10);
progressRing.percentage = percentage;
progressRing.textContent = `${percentage}%`;
});
subtractButton.addEventListener('click', () => {
const percentage = Math.max(0, progressRing.percentage - 10)
progressRing.percentage = percentage;
progressRing.textContent = `${percentage}%`;
});
</script>
```
[component-metadata:sl-progress-ring]

View File

@@ -1,42 +0,0 @@
# Radio
[component-header:sl-radio]
Radios allow the user to select one option from a group of many.
```html preview
<sl-radio>Radio</sl-radio>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
## Examples
### Checked
Use the `checked` attribute to activate the radio.
```html preview
<sl-radio checked>Checked</sl-radio>
```
### Disabled
Use the `disabled` attribute to disable the radio.
```html preview
<sl-radio disabled>Disabled</sl-radio>
```
### Grouping Radios
Radios are grouped based on their `name` attribute and scoped to the nearest form.
```html preview
<sl-radio name="option" checked>Option 1</sl-radio><br>
<sl-radio name="option">Option 2</sl-radio><br>
<sl-radio name="option">Option 3</sl-radio><br>
<sl-radio name="option">Option 4</sl-radio>
```
[component-metadata:sl-radio]

View File

@@ -1,73 +0,0 @@
# Range
[component-header:sl-range]
Ranges allow the user to select a single value within a given range using a slider.
```html preview
<sl-range min="0" max="100" step="1"></sl-range>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
## Examples
### Disabled
Use the `disabled` prop to disable a slider.
```html preview
<sl-range min="0" max="100" step="1" disabled></sl-range>
```
### Tooltip Placement
By default, the tooltip is shown on top. Set `tooltip` to `bottom` to show it below the slider.
```html preview
<sl-range min="0" max="100" step="1" tooltip="bottom"></sl-range>
```
### Disable the Tooltip
To disable the tooltip, set `tooltip` to `none`.
```html preview
<sl-range min="0" max="100" step="1" tooltip="none"></sl-range>
```
### Custom Tooltip Formatter
You can change the tooltip's content by setting the `tooltipFormatter` prop to a function that accepts the range's value as an argument.
```html preview
<sl-range min="0" max="100" step="1" class="range-with-custom-formatter"></sl-range>
<script>
const range = document.querySelector('.range-with-custom-formatter');
range.tooltipFormatter = value => `Total - ${value}%`;
</script>
```
### Labels
Use the `label` attribute to give the range an accessible label. For labels that contain HTML, use the `label` slot instead.
```html preview
<sl-range label="Volume" min="0" max="100"></sl-input>
```
### Help Text
Add descriptive help text to a range with the `help-text` attribute. For help texts that contain HTML, use the `help-text` slot instead.
```html preview
<sl-range
label="Volume"
help-text="Controls the volume of the current song."
min="0"
max="100"
></sl-input>
```
[component-metadata:sl-range]

View File

@@ -1,79 +0,0 @@
# Rating
[component-header:sl-rating]
Ratings give users a way to quickly view and provide feedback.
```html preview
<sl-rating></sl-rating>
```
## Examples
### Maximum Value
Ratings are 0-5 by default. To change the maximum possible value, use the `max` attribute.
```html preview
<sl-rating max="3"></sl-rating>
```
### Precision
Use the `precision` attribute to let users select fractional ratings.
```html preview
<sl-rating precision=".5" value="2.5"></sl-rating>
```
## Symbol Sizes
Set the `--symbol-size` custom property to adjust the size.
```html preview
<sl-rating style="--symbol-size: 2rem;"></sl-rating>
```
### Readonly
Use the `readonly` attribute to display a rating that users can't change.
```html preview
<sl-rating readonly value="3"></sl-rating>
```
### Disabled
Use the `disable` attribute to disable the rating.
```html preview
<sl-rating disabled value="3"></sl-rating>
```
### Custom Icons
```html preview
<sl-rating class="rating-hearts" style="--symbol-color-active: #ff4136;"></sl-rating>
<script>
const rating = document.querySelector('.rating-hearts');
rating.getSymbol = () => '<sl-icon name="heart-fill"></sl-icon>';
</script>
```
### Value-based Icons
```html preview
<sl-rating class="rating-emojis"></sl-rating>
<script>
const rating = document.querySelector('.rating-emojis');
rating.symbol = (value) => {
const icons = ['emoji-angry', 'emoji-frown', 'emoji-expressionless', 'emoji-smile', 'emoji-laughing'];
return icons[value - 1];
};
</script>
```
[component-metadata:sl-rating]

View File

@@ -1,61 +0,0 @@
# Relative Time
[component-header:sl-relative-time]
Outputs a localized time phrase relative to the current date and time.
Localization is handled by the browser's [`Intl.RelativeTimeFormat` API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat). No language packs are required.
```html preview
<!-- Shoelace 2 release date 🎉 -->
<sl-relative-time date="2020-07-15T09:17:00-04:00"></sl-relative-time>
```
The `date` prop determines when the date/time is calculated from. It must be a string that [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) can interpret or a [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object set via JavaScript.
?> When using strings, avoid ambiguous dates such as `03/04/2020` which can be interpreted as March 4 or April 3 depending on the user's browser and locale. Instead, always use a valid [ISO 8601 date time string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#Date_Time_String_Format) to ensure the date will be parsed properly by all clients.
!> The `Intl.RelativeTimeFormat` API is available [in all major browsers](https://caniuse.com/mdn-javascript_builtins_intl_relativetimeformat), but it only became available to Safari in version 14. If you need to support Safari 13, you'll need to [use a polyfill](https://github.com/catamphetamine/relative-time-format).
## Examples
### Keeping Time in Sync
Use the `sync` attribute to update the displayed value automatically as time passes.
```html preview
<div class="relative-time-sync">
<sl-relative-time sync></sl-relative-time>
</div>
<script>
const container = document.querySelector('.relative-time-sync');
const relativeTime = container.querySelector('sl-relative-time');
relativeTime.date = new Date(new Date().getTime() - 60000);
</script>
```
### Formatting Styles
You can change how the time is displayed using the `format` attribute. Note that some locales may display the same values for `narrow` and `short` formats.
```html preview
<sl-relative-time date="2020-07-15T09:17:00-04:00" format="narrow"></sl-relative-time><br>
<sl-relative-time date="2020-07-15T09:17:00-04:00" format="short"></sl-relative-time><br>
<sl-relative-time date="2020-07-15T09:17:00-04:00" format="long"></sl-relative-time>
```
### Localization
Use the `locale` attribute to set the desired locale.
```html preview
English: <sl-relative-time date="2020-07-15T09:17:00-04:00" locale="en-US"></sl-relative-time><br>
Chinese: <sl-relative-time date="2020-07-15T09:17:00-04:00" locale="zh-CN"></sl-relative-time><br>
German: <sl-relative-time date="2020-07-15T09:17:00-04:00" locale="de"></sl-relative-time><br>
Greek: <sl-relative-time date="2020-07-15T09:17:00-04:00" locale="el"></sl-relative-time><br>
Russian: <sl-relative-time date="2020-07-15T09:17:00-04:00" locale="ru"></sl-relative-time>
```
[component-metadata:sl-relative-time]

View File

@@ -1,39 +0,0 @@
# Resize Observer
[component-header:sl-resize-observer]
Resize observers offer a thin, declarative interface to the [`ResizeObserver API`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).
The resize observer will report changes to the dimensions of the elements it wraps through the `sl-resize` event. When emitted, a collection of [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry) objects will be attached to `event.detail`, containing the target element and information about its dimensions.
```html preview
<div class="resize-observer-overview">
<sl-resize-observer>
<div>
Resize this box and watch the console 👉
</div>
</sl-resize-observer>
</div>
<script>
const container = document.querySelector('.resize-observer-overview');
const resizeObserver = container.querySelector('sl-resize-observer');
resizeObserver.addEventListener('sl-resize', event => {
console.log(event);
});
</script>
<style>
.resize-observer-overview div {
display: flex;
border: solid 2px var(--sl-input-border-color);
align-items: center;
justify-content: center;
text-align: center;
padding: 4rem 2rem;
}
</style>
```
[component-metadata:sl-resize-observer]

View File

@@ -1,27 +0,0 @@
# Responsive Embed
[component-header:sl-responsive-embed]
Displays embedded media in a responsive manner based on its aspect ratio.
You can embed any element of the `<iframe>`, `<embed>`, or `<object>` type. The default aspect ratio is `16:9`.
```html preview
<sl-responsive-embed>
<iframe src="https://player.vimeo.com/video/1053647?title=0&byline=0&portrait=0" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
</sl-responsive-embed>
```
## Examples
### Aspect Ratio
To set the aspect ratio, use the `aspect-ratio` attribute.
```html preview
<sl-responsive-embed aspect-ratio="4:3">
<iframe src="https://www.youtube.com/embed/mM5_T-F1Yn4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</sl-responsive-embed>
```
[component-metadata:sl-responsive-embed]

View File

@@ -1,191 +0,0 @@
# Select
[component-header:sl-select]
Selects allow you to choose one or more items from a dropdown menu.
```html preview
<sl-select>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item value="option-4">Option 4</sl-menu-item>
<sl-menu-item value="option-5">Option 5</sl-menu-item>
<sl-menu-item value="option-6">Option 6</sl-menu-item>
</sl-select>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
## Examples
### Placeholders
Use the `placeholder` attribute to add a placeholder.
```html preview
<sl-select placeholder="Select one">
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Clearable
Use the `clearable` attribute to make the control clearable.
```html preview
<sl-select placeholder="Clearable" clearable>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Pill
Use the `pill` prop to give selects rounded edges.
```html preview
<sl-select pill>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Disabled
Use the `disabled` prop to disable a select.
```html preview
<sl-select placeholder="Disabled" disabled>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Multiple
To allow multiple options to be selected, use the `multiple` attribute. It's a good practice to use `clearable` when this option is enabled. When using this option, `value` will be an array instead of a string.
```html preview
<sl-select placeholder="Select a few" multiple clearable>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-item value="option-4">Option 4</sl-menu-item>
<sl-menu-item value="option-5">Option 5</sl-menu-item>
<sl-menu-item value="option-6">Option 6</sl-menu-item>
</sl-select>
```
### Grouping Options
Options can be grouped visually using menu labels and menu dividers.
```html preview
<sl-select placeholder="Select one">
<sl-menu-label>Group 1</sl-menu-label>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
<sl-menu-divider></sl-menu-divider>
<sl-menu-label>Group 2</sl-menu-label>
<sl-menu-item value="option-4">Option 4</sl-menu-item>
<sl-menu-item value="option-5">Option 5</sl-menu-item>
<sl-menu-item value="option-6">Option 6</sl-menu-item>
</sl-select>
```
### Sizes
Use the `size` attribute to change a select's size.
```html preview
<sl-select placeholder="Small" size="small" multiple>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
<br>
<sl-select placeholder="Medium" size="medium" multiple>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
<br>
<sl-select placeholder="Large" size="large" multiple>
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Selecting Options Programmatically
The `value` prop is bound to the current selection. As the selection changes, so will the value. To programmatically manage the selection, update the `value` property.
```html preview
<div class="selecting-example">
<sl-select placeholder="">
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
<br>
<sl-button data-option="option-1">Set 1</sl-button>
<sl-button data-option="option-2">Set 2</sl-button>
<sl-button data-option="option-3">Set 3</sl-button>
</div>
<script>
const container = document.querySelector('.selecting-example');
const select = container.querySelector('sl-select');
[...container.querySelectorAll('sl-button')].map(button => {
button.addEventListener('click', () => {
select.value = button.dataset.option;
});
});
</script>
```
### Labels
Use the `label` attribute to give the select an accessible label. For labels that contain HTML, use the `label` slot instead.
```html preview
<sl-select label="Select one">
<sl-menu-item value="option-1">Option 1</sl-menu-item>
<sl-menu-item value="option-2">Option 2</sl-menu-item>
<sl-menu-item value="option-3">Option 3</sl-menu-item>
</sl-select>
```
### Help Text
Add descriptive help text to a select with the `help-text` attribute. For help texts that contain HTML, use the `help-text` slot instead.
```html preview
<sl-select
label="Experience"
help-text="Please tell us your skill level."
>
<sl-menu-item value="option-1">Novice</sl-menu-item>
<sl-menu-item value="option-2">Intermediate</sl-menu-item>
<sl-menu-item value="option-3">Advanced</sl-menu-item>
</sl-select>
```
[component-metadata:sl-select]

View File

@@ -1,204 +0,0 @@
# Skeleton
[component-header:sl-skeleton]
Skeletons are used to show where content will eventually be drawn.
These are simple containers for scaffolding layouts that mimic what users will see when content has finished loading. This prevents large areas of empty space during asynchronous operations.
Skeletons try not to be opinionated, as there are endless possibilities for designing layouts. Therefore, you'll likely use more than one skeleton to create the effect you want. If you find yourself using them frequently, consider creating a template that renders them with the desired arrangement and styles.
```html preview
<div class="skeleton-overview">
<header>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</header>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</div>
<style>
.skeleton-overview header {
display: flex;
align-items: center;
margin-bottom: 1rem;
}
.skeleton-overview header sl-skeleton:last-child {
flex: 0 0 auto;
width: 30%;
}
.skeleton-overview sl-skeleton {
margin-bottom: 1rem;
}
.skeleton-overview sl-skeleton:nth-child(1) {
float: left;
width: 3rem;
height: 3rem;
margin-right: 1rem;
vertical-align: middle;
}
.skeleton-overview sl-skeleton:nth-child(3) {
width: 95%;
}
.skeleton-overview sl-skeleton:nth-child(4) {
width: 80%;
}
</style>
```
## Examples
### Effects
The default effect is `sheen`, which animates a sheen horizontally across the skeleton. There's also `pulse`, which fades the skeleton in and out. To disable animations, use `none`. Effects are intentionally subtle, as they can be distracting otherwise.
```html preview
<div class="skeleton-effects">
<sl-skeleton effect="sheen"></sl-skeleton>
Sheen
<sl-skeleton effect="pulse"></sl-skeleton>
Pulse
<sl-skeleton effect="none"></sl-skeleton>
None
</div>
<style>
.skeleton-effects {
font-size: var(--sl-font-size-small);
}
.skeleton-effects sl-skeleton:not(:first-child) {
margin-top: 1rem;
}
</style>
```
### Paragraphs
Use multiple skeletons and some clever styles to simulate paragraphs.
```html preview
<div class="skeleton-paragraphs">
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</div>
<style>
.skeleton-paragraphs sl-skeleton {
margin-bottom: 1rem;
}
.skeleton-paragraphs sl-skeleton:nth-child(2) {
width: 95%;
}
.skeleton-paragraphs sl-skeleton:nth-child(4) {
width: 90%;
}
.skeleton-paragraphs sl-skeleton:last-child {
width: 50%;
}
</style>
```
### Avatars
Set a matching width and height to make a circle, square, or rounded avatar skeleton.
```html preview
<div class="skeleton-avatars">
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
<sl-skeleton></sl-skeleton>
</div>
<style>
.skeleton-avatars sl-skeleton {
display: inline-block;
width: 3rem;
height: 3rem;
margin-right: .5rem;
}
.skeleton-avatars sl-skeleton:nth-child(1) {
--border-radius: 0;
}
.skeleton-avatars sl-skeleton:nth-child(2) {
--border-radius: var(--sl-border-radius-medium);
}
</style>
```
### Custom Shapes
Use the `--border-radius` custom property to make circles, squares, and rectangles. For more complex shapes, you can apply `clip-path` to the `indicator` part. [Try Clippy](https://bennettfeely.com/clippy/) if you need help generating custom shapes.
```html preview
<div class="skeleton-shapes">
<sl-skeleton class="square"></sl-skeleton>
<sl-skeleton class="circle"></sl-skeleton>
<sl-skeleton class="triangle"></sl-skeleton>
<sl-skeleton class="cross"></sl-skeleton>
<sl-skeleton class="comment"></sl-skeleton>
</div>
<style>
.skeleton-shapes sl-skeleton {
display: inline-flex;
width: 50px;
height: 50px;
}
.skeleton-shapes .square::part(indicator) {
--border-radius: var(--sl-border-radius-medium);
}
.skeleton-shapes .circle::part(indicator) {
--border-radius: var(--sl-border-radius-circle);
}
.skeleton-shapes .triangle::part(indicator) {
--border-radius: 0;
clip-path: polygon(50% 0, 0 100%, 100% 100%);
}
.skeleton-shapes .cross::part(indicator) {
--border-radius: 0;
clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
}
.skeleton-shapes .comment::part(indicator) {
--border-radius: 0;
clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
}
.skeleton-shapes sl-skeleton:not(:last-child) {
margin-right: .5rem;
}
</style>
```
### Custom Colors
Set the `--color` and `--sheen-color` custom properties to adjust the skeleton's color.
```html preview
<sl-skeleton style="--color: tomato; --sheen-color: #ffb094;"></sl-skeleton>
```
[component-metadata:sl-skeleton]

View File

@@ -1,39 +0,0 @@
# Spinner
[component-header:sl-spinner]
Spinners are used to show the progress of an indeterminate operation.
```html preview
<sl-spinner></sl-spinner>
```
## Examples
### Size
Spinners are sized relative to the current font size. To change their size, set the `font-size` property on the spinner itself or on a parent element as shown below.
```html preview
<sl-spinner></sl-spinner>
<sl-spinner style="font-size: 2rem;"></sl-spinner>
<sl-spinner style="font-size: 3rem;"></sl-spinner>
```
### Stroke Width
The width of the spinner can be changed by setting the `--stroke-width` custom property.
```html preview
<sl-spinner style="font-size: 2rem; --stroke-width: 6px;"></sl-spinner>
```
### Color
The spinner's colors can be changed by setting the `--indicator-color` and `--track-color` custom properties.
```html preview
<sl-spinner style="font-size: 2rem; --indicator-color: tomato;"></sl-spinner>
```
[component-metadata:sl-spinner]

View File

@@ -1,39 +0,0 @@
# Switch
[component-header:sl-switch]
Switches allow the user to toggle an option on or off.
```html preview
<sl-switch>Switch</sl-switch>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
## Examples
### Checked
Use the `checked` attribute to activate the switch.
```html preview
<sl-switch checked>Checked</sl-switch>
```
### Disabled
Use the `disabled` attribute to disable the switch.
```html preview
<sl-switch disabled>Disabled</sl-switch>
```
### Custom Size
Use the available custom properties to make the switch a different size.
```html preview
<sl-switch style="--width: 80px; --height: 32px; --thumb-size: 26px;"></sl-switch>
```
[component-metadata:sl-switch]

View File

@@ -1,165 +0,0 @@
# Tab Group
[component-header:sl-tab-group]
Tab groups organize content into a container that shows one section at a time.
Tab groups make use of [tabs](/components/tab.md) and [tab panels](/components/tab-panel.md). Each tab must be slotted into the `nav` slot and its `panel` must refer to a tab panel of the same name.
```html preview
<sl-tab-group>
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
```
## Examples
### Tabs on Bottom
Tabs can be shown on the bottom by setting `placement` to `bottom`.
```html preview
<sl-tab-group placement="bottom">
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
```
### Tabs on Left
Tabs can be shown on the left by setting `placement` to `left`.
```html preview
<sl-tab-group placement="left">
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
```
### Tabs on Right
Tabs can be shown on the right by setting `placement` to `right`.
```html preview
<sl-tab-group placement="right">
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
```
### Closable Tabs
Add the `closable` prop to a tab to show a close button. This example shows how you can dynamically remove tabs from the DOM when the close button is activated.
```html preview
<sl-tab-group class="tabs-closable">
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="closable-1" closable>Closable 1</sl-tab>
<sl-tab slot="nav" panel="closable-2" closable>Closable 2</sl-tab>
<sl-tab slot="nav" panel="closable-3" closable>Closable 3</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="closable-1">This is the first closable tab panel.</sl-tab-panel>
<sl-tab-panel name="closable-2">This is the second closable tab panel.</sl-tab-panel>
<sl-tab-panel name="closable-3">This is the third closable tab panel.</sl-tab-panel>
</sl-tab-group>
<script>
const tabGroup = document.querySelector('.tabs-closable');
tabGroup.addEventListener('sl-close', async event => {
const tab = event.target;
const panel = tabGroup.querySelector(`sl-tab-panel[name="${tab.panel}"]`);
// Show the previous tab if the tab is currently active
if (tab.active) {
tabGroup.show(tab.previousElementSibling.panel);
}
// Remove the tab + panel
tab.remove();
panel.remove();
});
</script>
```
### Scrolling Tabs
When there are more tabs than horizontal space allows, the nav will be scrollable.
```html preview
<sl-tab-group>
<sl-tab slot="nav" panel="tab-1">Tab 1</sl-tab>
<sl-tab slot="nav" panel="tab-2">Tab 2</sl-tab>
<sl-tab slot="nav" panel="tab-3">Tab 3</sl-tab>
<sl-tab slot="nav" panel="tab-4">Tab 4</sl-tab>
<sl-tab slot="nav" panel="tab-5">Tab 5</sl-tab>
<sl-tab slot="nav" panel="tab-6">Tab 6</sl-tab>
<sl-tab slot="nav" panel="tab-7">Tab 7</sl-tab>
<sl-tab slot="nav" panel="tab-8">Tab 8</sl-tab>
<sl-tab slot="nav" panel="tab-9">Tab 9</sl-tab>
<sl-tab slot="nav" panel="tab-10">Tab 10</sl-tab>
<sl-tab slot="nav" panel="tab-11">Tab 11</sl-tab>
<sl-tab slot="nav" panel="tab-12">Tab 12</sl-tab>
<sl-tab slot="nav" panel="tab-13">Tab 13</sl-tab>
<sl-tab slot="nav" panel="tab-14">Tab 14</sl-tab>
<sl-tab slot="nav" panel="tab-15">Tab 15</sl-tab>
<sl-tab slot="nav" panel="tab-16">Tab 16</sl-tab>
<sl-tab slot="nav" panel="tab-17">Tab 17</sl-tab>
<sl-tab slot="nav" panel="tab-18">Tab 18</sl-tab>
<sl-tab slot="nav" panel="tab-19">Tab 19</sl-tab>
<sl-tab slot="nav" panel="tab-20">Tab 20</sl-tab>
<sl-tab-panel name="tab-1">Tab panel 1</sl-tab-panel>
<sl-tab-panel name="tab-2">Tab panel 2</sl-tab-panel>
<sl-tab-panel name="tab-3">Tab panel 3</sl-tab-panel>
<sl-tab-panel name="tab-4">Tab panel 4</sl-tab-panel>
<sl-tab-panel name="tab-5">Tab panel 5</sl-tab-panel>
<sl-tab-panel name="tab-6">Tab panel 6</sl-tab-panel>
<sl-tab-panel name="tab-7">Tab panel 7</sl-tab-panel>
<sl-tab-panel name="tab-8">Tab panel 8</sl-tab-panel>
<sl-tab-panel name="tab-9">Tab panel 9</sl-tab-panel>
<sl-tab-panel name="tab-10">Tab panel 10</sl-tab-panel>
<sl-tab-panel name="tab-11">Tab panel 11</sl-tab-panel>
<sl-tab-panel name="tab-12">Tab panel 12</sl-tab-panel>
<sl-tab-panel name="tab-13">Tab panel 13</sl-tab-panel>
<sl-tab-panel name="tab-14">Tab panel 14</sl-tab-panel>
<sl-tab-panel name="tab-15">Tab panel 15</sl-tab-panel>
<sl-tab-panel name="tab-16">Tab panel 16</sl-tab-panel>
<sl-tab-panel name="tab-17">Tab panel 17</sl-tab-panel>
<sl-tab-panel name="tab-18">Tab panel 18</sl-tab-panel>
<sl-tab-panel name="tab-19">Tab panel 19</sl-tab-panel>
<sl-tab-panel name="tab-20">Tab panel 20</sl-tab-panel>
</sl-tab-group>
```
[component-metadata:sl-tab-group]

View File

@@ -1,23 +0,0 @@
# Tab Panel
[component-header:sl-tab-panel]
Tab panels are used inside tab groups to display content.
```html preview
<sl-tab-group>
<sl-tab slot="nav" panel="general">General</sl-tab>
<sl-tab slot="nav" panel="custom">Custom</sl-tab>
<sl-tab slot="nav" panel="advanced">Advanced</sl-tab>
<sl-tab slot="nav" panel="disabled" disabled>Disabled</sl-tab>
<sl-tab-panel name="general">This is the general tab panel.</sl-tab-panel>
<sl-tab-panel name="custom">This is the custom tab panel.</sl-tab-panel>
<sl-tab-panel name="advanced">This is the advanced tab panel.</sl-tab-panel>
<sl-tab-panel name="disabled">This is a disabled tab panel.</sl-tab-panel>
</sl-tab-group>
```
?> Additional demonstrations can be found in the [tab group examples](/components/tab-group.md).
[component-metadata:sl-tab-panel]

View File

@@ -1,16 +0,0 @@
# Tab
[component-header:sl-tab]
Tabs are used inside tab groups to represent tab panels.
```html preview
<sl-tab>Tab</sl-tab>
<sl-tab active>Active</sl-tab>
<sl-tab closable>Closable</sl-tab>
<sl-tab disabled>Disabled</sl-tab>
```
?> Additional demonstrations can be found in the [tab group examples](/components/tab-group.md).
[component-metadata:sl-tab]

View File

@@ -1,65 +0,0 @@
# Tag
[component-header:sl-tag]
Tags are used as labels to organize things or to indicate a selection.
```html preview
<sl-tag type="primary">Primary</sl-tag>
<sl-tag type="success">Success</sl-tag>
<sl-tag type="info">Info</sl-tag>
<sl-tag type="warning">Warning</sl-tag>
<sl-tag type="danger">Danger</sl-tag>
```
## Examples
### Sizes
Use the `size` prop to change a tab's size.
```html preview
<sl-tag size="small">Small</sl-tag>
<sl-tag size="medium">Medium</sl-tag>
<sl-tag size="large">Large</sl-tag>
```
### Pill
Use the `pill` prop to give tabs rounded edges.
```html preview
<sl-tag size="small" pill>Small</sl-tag>
<sl-tag size="medium" pill>Medium</sl-tag>
<sl-tag size="large" pill>Large</sl-tag>
```
### Clearable
Use the `clearable` attribute to add a clear button to the tag.
```html preview
<div class="tags-clearable">
<sl-tag size="small" clearable>Small</sl-tag>
<sl-tag size="medium" clearable>Medium</sl-tag>
<sl-tag size="large" clearable>Large</sl-tag>
</div>
<script>
const div = document.querySelector('.tags-clearable');
div.addEventListener('sl-clear', event => {
const tag = event.target;
tag.style.opacity = '0';
setTimeout(() => tag.style.opacity = '1', 2000);
});
</script>
<style>
.tags-clearable sl-tag {
transition: var(--sl-transition-medium) opacity;
}
</style>
```
[component-metadata:sl-tag]

View File

@@ -1,89 +0,0 @@
# Textarea
[component-header:sl-textarea]
Textareas collect data from the user and allow multiple lines of text.
```html preview
<sl-textarea></sl-textarea>
```
?> This component doesn't work with standard forms. Use [`<sl-form>`](/components/form.md) instead.
?> Please refer to the section on [form control validation](/components/form?id=form-control-validation) to learn how to do client-side validation.
## Examples
### Rows
Use the `rows` attribute to change the number of text rows that get shown.
```html preview
<sl-textarea rows="2"></sl-textarea>
```
### Placeholders
Use the `placeholder` attribute to add a placeholder.
```html preview
<sl-textarea placeholder="Type something"></sl-textarea>
```
### Disabled
Use the `disabled` attribute to disable an input.
```html preview
<sl-textarea placeholder="Textarea" disabled></sl-textarea>
```
### Sizes
Use the `size` attribute to change a textarea's size.
```html preview
<sl-textarea placeholder="Small" size="small"></sl-textarea>
<br>
<sl-textarea placeholder="Medium" size="medium"></sl-textarea>
<br>
<sl-textarea placeholder="Large" size="large"></sl-textarea>
```
### Labels
Use the `label` attribute to give the textarea an accessible label. For labels that contain HTML, use the `label` slot instead.
```html preview
<sl-textarea label="Comments"></sl-textarea>
```
### Help Text
Add descriptive help text to a textarea with the `help-text` attribute. For help texts that contain HTML, use the `help-text` slot instead.
```html preview
<sl-textarea
label="Feedback"
help-text="Please tell us what you think."
>
</sl-textarea>
```
### Prevent Resizing
By default, textareas can be resized vertically by the user. To prevent resizing, set the `resize` attribute to `none`.
```html preview
<sl-textarea resize="none"></sl-textarea>
```
### Expand with Content
Textareas will automatically resize to expand to fit their content when `resize` is set to `auto`.
```html preview
<sl-textarea resize="auto"></sl-textarea>
```
[component-metadata:sl-textarea]

View File

@@ -1,177 +0,0 @@
# Tooltip
[component-header:sl-tooltip]
Tooltips display additional information based on a specific action.
A tooltip's target is its _first child element_, so you should only wrap one element inside of the tooltip. If you need the tooltip to show up for multiple elements, nest them inside a container first.
Tooltips use `display: contents` so they won't interfere with how elements are positioned in a flex or grid layout.
```html preview
<sl-tooltip content="This is a tooltip">
<sl-button>Hover Me</sl-button>
</sl-tooltip>
```
## Examples
### Placement
Use the `placement` attribute to set the preferred placement of the tooltip.
```html preview
<div class="tooltip-placement-example">
<div class="tooltip-placement-example-row">
<sl-tooltip content="top-start" placement="top-start">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="top" placement="top">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="top-end" placement="top-end">
<sl-button></sl-button>
</sl-tooltip>
</div>
<div class="tooltip-placement-example-row">
<sl-tooltip content="left-start" placement="left-start">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="right-start" placement="right-start" style="margin-left: 400px;">
<sl-button></sl-button>
</sl-tooltip>
</div>
<div class="tooltip-placement-example-row">
<sl-tooltip content="left" placement="left">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="right" placement="right">
<sl-button></sl-button>
</sl-tooltip>
</div>
<div class="tooltip-placement-example-row">
<sl-tooltip content="left-end" placement="left-end">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="right-end" placement="right-end">
<sl-button></sl-button>
</sl-tooltip>
</div>
<div class="tooltip-placement-example-row">
<sl-tooltip content="bottom-start" placement="bottom-start">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="bottom" placement="bottom">
<sl-button></sl-button>
</sl-tooltip>
<sl-tooltip content="bottom-end" placement="bottom-end">
<sl-button></sl-button>
</sl-tooltip>
</div>
</div>
<style>
.tooltip-placement-example {
width: 250px;
}
.tooltip-placement-example-row:after {
content: '';
display: table;
clear: both;
}
.tooltip-placement-example sl-button {
float: left;
width: 2.5rem;
margin-right: 0.25rem;
margin-bottom: 0.25rem;
}
.tooltip-placement-example [placement='top-start'] sl-button,
.tooltip-placement-example [placement='bottom-start'] sl-button {
margin-left: calc(40px + 0.25rem);
}
.tooltip-placement-example [placement^='right'] sl-button {
margin-left: calc((40px * 3) + (0.25rem * 3));
}
</style>
```
### Click Trigger
Set the `trigger` attribute to `click` to toggle the tooltip on click instead of hover.
```html preview
<sl-tooltip content="Click again to dismiss" trigger="click">
<sl-button>Click to Toggle</sl-button>
</sl-tooltip>
```
### Manual Trigger
Tooltips can be controller programmatically by setting the `trigger` attribute to `manual`. Use the `open` prop to control when the tooltip is shown.
```html preview
<sl-button style="margin-right: 4rem;">Toggle Manually</sl-button>
<sl-tooltip content="This is an avatar" trigger="manual" class="manual-tooltip">
<sl-avatar></sl-avatar>
</sl-tooltip>
<script>
const tooltip = document.querySelector('.manual-tooltip');
const toggle = tooltip.previousElementSibling;
toggle.addEventListener('click', () => (tooltip.open = !tooltip.open));
</script>
```
### Remove Arrows
You can control the size of tooltip arrows by overriding the `--sl-tooltip-arrow-size` design token.
```html preview
<div style="--sl-tooltip-arrow-size: 0;">
<sl-tooltip content="This is a tooltip">
<sl-button>Above</sl-button>
</sl-tooltip>
<sl-tooltip content="This is a tooltip" placement="bottom">
<sl-button>Below</sl-button>
</sl-tooltip>
</div>
```
To override it globally, set it in a root block in your stylesheet after the Shoelace stylesheet is loaded.
```css
:root {
--sl-tooltip-arrow-size: 0;
}
```
### HTML in Tooltips
Use the `content` slot to create tooltips with HTML content.
```html preview
<sl-tooltip>
<div slot="content">I'm not <strong>just</strong> a tooltip, I'm a <em>tooltip</em> with HTML!</div>
<sl-button>Hover me</sl-button>
</sl-tooltip>
```
[component-metadata:sl-tooltip]

View File

@@ -1,108 +0,0 @@
# Customizing
Shoelace components can be customized at a high level through design tokens. This gives you control over theme colors and general styling. For more advanced customizations, you can make use of component parts and custom properties to target individual components.
## Design Tokens
Shoelace makes use of several design tokens to provide a consistent appearance across components. You can customize them and use them in your own application with pure CSS — no preprocessor required.
Design tokens offer a high-level way to customize the library with minimal effort. There are no component-specific variables, however, as design tokens are intended to be generic and highly reusable. To customize an individual component, refer to the section entitled [Component parts](#component-parts).
Design tokens are CSS custom properties ("CSS variables") that are defined in the `:root` block of `themes/base.css`. This stylesheet is imported when you install Shoelace, so design tokens are available on your page at that point. Because design tokens are global, they're always prefixed with `--sl` to avoid collisions with other libraries.
To customize a design token, simply override it in your stylesheet using a `:root` block.
```css
:root {
/* Changes the primary color palette to purple */
--sl-color-primary-50: #faf5ff;
--sl-color-primary-100: #f3e8ff;
--sl-color-primary-200: #e9d5ff;
--sl-color-primary-300: #d8b4fe;
--sl-color-primary-400: #c084fc;
--sl-color-primary-500: #a855f7;
--sl-color-primary-600: #9333ea;
--sl-color-primary-700: #7e22ce;
--sl-color-primary-800: #6b21a8;
--sl-color-primary-900: #581c87;
}
```
Many design tokens are described further along in this documentation. For a complete list, refer to `themes/base.scss` in the project's [source code](https://github.com/shoelace-style/shoelace/blob/current/src/styles/shoelace.scss).
!> **Never modify variables directly in `themes/base.css`** because your changes will be overwritten when you upgrade the library. Even if you don't plan on upgrading, it's always better to override design tokens in your own stylesheet for better maintainability.
## Component Parts
Whereas design tokens offer a high-level way to customize the library, component parts offer a low-level way to customize individual components. Again, this is done with pure CSS — no preprocessor required.
Shoelace components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate their styles and behaviors. As a result, you can't simply target their internals with the usual CSS selectors. Instead, components expose "parts" that can be targeted with the [CSS part selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part), or `::part()`.
Here's an example that modifies buttons with the `tomato-button` class.
```html preview
<sl-button class="tomato-button">
Tomato Button
</sl-button>
<style>
.tomato-button::part(base) {
background: white;
border: solid 1px tomato;
}
.tomato-button::part(base):hover {
background: rgba(255, 99, 71, .1);
}
.tomato-button::part(base):active {
background: rgba(255, 99, 71, .2);
}
.tomato-button::part(base):focus {
box-shadow: 0 0 0 3px rgba(255, 99, 71, .33);
}
.tomato-button::part(label) {
color: tomato;
}
</style>
```
At first glance, this approach might seem a bit verbose or even limiting, but it comes with a few important advantages:
- Customizations can be made to components with explicit selectors, such as `::part(icon)`, rather than implicit selectors, such as `.button > div > span + .icon`, that are much more fragile.
- The internal structure of a component will likely change as it evolves. By exposing component parts through an API, the internals can be reworked without fear of breaking customizations as long as its parts remain intact.
- It encourages us to think more about how components are designed and how customizations should be allowed before users can take advantage of them. Once we opt a part into the component's API, it's guaranteed to be supported and can't be removed until a major version of the library is released.
Most (but not all) components expose parts. You can find them in each component's API documention under the "CSS Parts" section.
## Custom Properties
For convenience, some components expose CSS custom properties you can override. These are not design tokens, nor do they have the same `--sl-` prefix since they're scoped to a component.
You can set custom properties on a component in your stylesheet.
```css
sl-avatar {
--size: 6rem;
}
```
This will also work if you need to target a subset of components with a specific class.
```css
sl-avatar.your-class {
--size: 6rem;
}
```
Alternatively, you can set them inline directly on the element.
```html
<sl-avatar style="--size: 6rem;"></sl-avatar>
```
Not all components expose CSS custom properties. For those that do, they can be found in the component's API documentation.

View File

@@ -1,110 +0,0 @@
# Installation
You can use Shoelace via CDN or by installing it locally.
## CDN Installation (Recommended)
The easiest way to install Shoelace is with the CDN. Just add the following tags to your page.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/dist/themes/base.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/dist/shoelace.js"></script>
```
Now you can [start using Shoelace!](/getting-started/usage.md)
## Local Installation
If you don't want to use the CDN, you can install Shoelace locally with the following command.
```bash
npm install @shoelace-style/shoelace
```
It's up to you to make the source files available to your app. One way to do this is to create a route in your app called `/scripts/shoelace` that serves static files from `node_modules/@shoelace-style/shoelace`.
Once you've done that, add the following tags to your page. Make sure to update `href` and `src` so they point to the route you created.
```html
<link rel="stylesheet" href="/scripts/shoelace/dist/themes/base.css">
<script type="module" src="/scripts/shoelace/dist/shoelace.js"></script>
```
## Setting the Base Path
Some components rely on assets (icons, images, etc.) and Shoelace needs to know where they're located. For convenience, Shoelace will try to auto-detect the correct location based on the script you've loaded it from. This assumes assets are colocated with `shoelace.js` and will "just work" for most users.
However, if you're [cherry picking](#cherry-picking) or [bundling](#bundling) Shoelace, you'll need to set the base path. You can do this one of two ways. The following example assumes you're serving Shoelace's `dist` directory from `/scripts/shoelace`.
```html
<!-- Option 1: the data-shoelace attribute -->
<script src="bundle.js" data-shoelace="/scripts/shoelace"></script>
<!-- Option 2: the setBasePath() method -->
<script src="bundle.js"></script>
<script type="module">
import { setBasePath } from '/scripts/shoelace/dist/utilities/base-path.js';
setBasePath('/scripts/shoelace');
</script>
```
?> The library also exports a `getBasePath()` method you can use to reference assets.
## Cherry Picking
The previous approach is the _easiest_ way to load Shoelace, but easy isn't always efficient. You'll incur the full size of the library even if you only use a handful of components. This is convenient for prototyping, but may result in longer load times in production. To improve this, you can cherry pick the components you need.
Cherry picking can be done from your local install or [directly from the CDN](https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/). This will limit the number of files the browser has to download and reduce the amount of bytes being transferred. The disadvantage is that you need to load and register each component manually, including its dependencies.
Here's an example that loads only the button component and its dependencies. Again, we're assuming you're serving Shoelace's `dist` directory from `/scripts/shoelace`.
```html
<!-- The base stylesheet is always required -->
<link rel="stylesheet" href="/scripts/shoelace/dist/themes/base.css">
<script type="module" data-shoelace="/scripts/shoelace">
import SlButton from '/scripts/shoelace/dist/components/button/button.js';
import SlSpinner from '/scripts/shoelace/dist/components/spinner/spinner.js';
// <sl-button> and <sl-spinner> are ready to use!
</script>
```
If a component has dependencies, they'll be listed in the "Dependencies" section of its documentation. These are always Shoelace components, not third-party libraries. For example, `<sl-button>` requires you to load `<sl-spinner>` because it's used internally for its loading state.
!> Never cherry pick components or utilities from `shoelace.js` as this will cause the browser to load the entire library. Instead, cherry pick from specific modules as shown above.
!> You will see files named `chunk.[hash].js` in the `chunks` directory. Never import these files directly, as they are generated and change from version to version.
## Bundling
Shoelace is distributed as a collection of standard ES modules that [all modern browsers can understand](https://caniuse.com/es6-module). However, importing a lot of modules can result in a lot of HTTP requests and potentially longer load times. Using a CDN can alleviate this, but some users may wish to further optimize their imports with a bundler.
To use Shoelace with a bundler, first install Shoelace along with your bundler of choice.
```bash
npm install @shoelace-style/shoelace
```
Now it's time to configure your bundler. Configurations vary for each tool, but here are some examples to help you get started.
- [Example webpack config](https://github.com/shoelace-style/webpack-example/blob/master/webpack.config.js)
- [Example Rollup config](https://github.com/shoelace-style/rollup-example/blob/master/rollup.config.js)
Once your bundler is configured, you'll be able to import Shoelace components and utilities.
```js
import '@shoelace-style/shoelace/dist/themes/base.css';
import SlButton from '@shoelace-style/shoelace/dist/components/button/button.js';
import SlIcon from '@shoelace-style/shoelace/dist/components/icon/icon.js';
import SlInput from '@shoelace-style/shoelace/dist/components/input/input.js';
import SlRating from '@shoelace-style/shoelace/dist/components/rating/rating.js';
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js';
// Set the base path to the folder you copied Shoelace's assets to
setBasePath('/dist/shoelace');
// <sl-button>, <sl-icon>, <sl-input>, and <sl-rating> are ready to use!
```
!> Component modules include side effects for registration purposes. Because of this, importing directly from `@shoelace-style/shoelace` may result in a larger bundle size than necessary. For optimal tree shaking, always import components and utilities from their respective files as shown above.

View File

@@ -1,124 +0,0 @@
<div class="splash">
<div class="splash-start">
<img class="splash-logo" src="/assets/images/wordmark.svg" alt="Shoelace">
<p><strong>A forward-thinking library of web components.</strong></p>
<ul>
<li>Works with all frameworks 🧩</li>
<li>Works with CDNs 🚛</li>
<li>Fully customizable with CSS 🎨</li>
<li>Includes an official dark theme 🌛</li>
<li>Built with accessibility in mind ♿️</li>
<li>Open source 😸</li>
</ul>
<p>Designed in New Hampshire by <a href="https://twitter.com/claviska" rel="noopener" target="_blank">Cory LaViska</a>.</p>
</div>
<div class="splash-end">
<img class="splash-image" src="/assets/images/undraw-content-team.svg" alt="Cartoon of people assembling components while standing on a giant laptop.">
</div>
</div>
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@shoelace-style/shoelace/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@shoelace-style/shoelace)
[![npm](https://img.shields.io/npm/dw/@shoelace-style/shoelace?label=npm)](https://www.npmjs.com/package/@shoelace-style/shoelace)
[![License](https://img.shields.io/badge/license-MIT-232323.svg?style=flat)](https://github.com/shoelace-style/shoelace/blob/next/LICENSE.md)<br>
[![Discord](https://img.shields.io/badge/Discord-Join%20the%20chat-7289da.svg?style=flat&logo=discord)](https://discord.gg/mg8f26C)
[![Twitter](https://img.shields.io/badge/Twitter-Follow-00acee.svg?style=flat&logo=twitter)](https://twitter.com/shoelace_style)
[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-232323.svg?style=flat&logo=github)](https://github.com/sponsors/claviska)
## Quick Start
Add the following code to your page.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/dist/themes/base.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/dist/shoelace.js"></script>
```
Now you have access to all of Shoelace's components! Try adding a button:
```html
<sl-button>Click me</sl-button>
```
See the [installation instructions](getting-started/installation.md) for more details and other ways to install Shoelace.
## New to Web Components?
**TL;DR**  we finally have a way to create [our own HTML elements](https://html.spec.whatwg.org/multipage/custom-elements.html) and use them in any framework we want!
Thanks to the popularity of frameworks such as Angular, Vue, and React, component-driven development has become a part of our every day lives. Components help us encapsulate styles and behaviors into reusable building blocks. They make a lot of sense in terms of design, development, and testing.
Unfortunately, _framework-specific_ components fail us in a number of ways:
- You can only use them in the framework they're designed for 🔒
- Their lifespan is limited to that of the framework's ⏳
- New frameworks/versions can lead to breaking changes, requiring substantial effort to update components 😭
Web components solve these problems. They're [supported by all modern browsers](https://caniuse.com/#feat=custom-elementsv1), they're framework-agnostic, and they're [part of the standard](https://developer.mozilla.org/en-US/docs/Web/Web_Components), so we know they'll be supported for many years to come.
This is the technology that Shoelace is built on.
## What Problem Does This Solve?
Shoelace provides a collection of professionally designed, every day UI components built on a framework-agnostic technology. Why spend hundreds of hours (or more) building a design system from scratch? Why make a component library that only works with one framework?
With Shoelace, you can:
- Start building things faster (no need to roll your own buttons)
- Build multiple apps with different frameworks that all share the same UI
- Skip having to learn a new component library every time you switch frameworks
If your organization is looking to build a design system, [Shoelace will save you thousands of dollars](https://medium.com/eightshapes-llc/and-you-thought-buttons-were-easy-26eb5b5c1871).* All the foundational components you need are right here, ready to be customized for your brand. And since it's built on web standards, browsers will continue to support it for many years to come.
Whether you use Shoelace as a starting point for your organization's design system or for a fun personal project, there's no limit to what you can do with it.
<small>*Please consider giving back some of what you save by [supporting this project with a sponsorship](https://github.com/sponsors/claviska).</small>
## Browser Support
Shoelace is tested in the latest two versions of the following browsers.
<img src="/assets/images/chrome.png" alt="Chrome" width="64" height="64">
<img src="/assets/images/edge.png" alt="Edge" width="64" height="64">
<img src="/assets/images/firefox.png" alt="Firefox" width="64" height="64">
<img src="/assets/images/opera.png" alt="Opera" width="64" height="64">
<img src="/assets/images/safari.png" alt="Safari" width="64" height="64">
Critical bug fixes in earlier versions will be addressed based on their severity and impact.
If you need to support IE11 or pre-Chromium Edge, this library isn't for you. Although web components can (to some degree) be polyfilled for legacy browsers, supporting them is outside the scope of this project. If you're using Shoelace in such a browser, you're gonna have a bad time. ⛷
## License
Shoelace is designed in New Hampshire by [Cory LaViska](https://twitter.com/claviska). It's available under the terms of the MIT license.
Designing, developing, and supporting this library requires a lot of time, effort, and skill. I'd like to keep it open source so everyone can use it, but that doesn't provide me with any income.
**Therefore, if you're using my software to make a profit,** I respectfully ask that you help [fund its development](https://github.com/sponsors/claviska) by becoming a sponsor. There are multiple tiers to choose from with benefits at every level, including prioritized support, bug fixes, feature requests, and advertising.
👇 Your support is very much appreciated! 👇
<a class="repo-button repo-button--sponsor" href="https://github.com/sponsors/claviska" rel="noopener" target="_blank">
<sl-icon name="heart"></sl-icon> Become a sponsor
</a>
<a class="repo-button repo-button--github" href="https://github.com/shoelace-style/shoelace/stargazers" rel="noopener" target="_blank">
<sl-icon name="github"></sl-icon> <span class="github-star-count">Star</span>
</a>
<a class="repo-button repo-button--twitter" href="https://twitter.com/shoelace_style" rel="noopener" target="_blank">
<sl-icon name="twitter"></sl-icon> Follow
</a>
## Attribution
Special thanks to the following projects and individuals that helped make Shoelace possible.
- Components are built with [LitElement](https://lit-element.polymer-project.org/)
- Documentation is powered by [Docsify](https://docsify.js.org/)
- CDN services are provided by [jsDelivr](https://www.jsdelivr.com/)
- The default theme is based on color palettes from [Tailwind](https://tailwindcss.com/)
- Icons are courtesy of [Bootstrap Icons](https://icons.getbootstrap.com/)
- The homepage illustration is courtesy of [unDraw](https://undraw.co/)
- Positioning of menus, tooltips, et al is handled by [Popper.js](https://popper.js.org/)
- The animation component was inspired by [animatable-component](https://github.com/proyecto26/animatable-component)
- The Shoelace logo was designed with a single shoelace by [Adam K Olson](https://twitter.com/adamkolson)

View File

@@ -1,99 +0,0 @@
# Themes
Shoelace ships with a dark theme that complements the default light theme. You can even take things a step further by designing your own custom theme.
The default theme is included as part of `themse/base.css` and should always be loaded first, even if you want to use another theme exclusively. The default theme contains important base tokens and utilities that many components rely on.
## Dark Mode
To install the dark theme, add the following to the `<head>` section of your app.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/dist/themes/dark.css">
```
**Themes must be activated after importing!** You can do this by adding the `sl-theme-[name]` class to the `<body>` element.
```html
<body class="sl-theme-dark">
...
</body>
```
### Detecting the User's Color Scheme Preference
Shoelace doesn't try to auto-detect the user's light/dark mode preference. This should be done at the application level. As a best practice, to provide a dark theme in your app, you should:
- Check for [`prefers-color-scheme`](https://stackoverflow.com/a/57795495/567486) and use its value by default
- Allow the user to override the setting in your app
- Remember the user's preference and restore it on subsequent logins
Shoelace avoids using the `prefers-color-scheme` media query because not all apps support dark mode, and it would break things for the ones that don't.
## Creating a Theme
A theme is nothing more than a stylesheet that uses the Shoelace API to customize design tokens and/or components. To create a theme, you will need a decent understanding of CSS, including [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) and the [`::part` selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part).
The recommended way to create a theme is to piggyback on top of the default theme, adjusting design tokens and styling components as necessary to achieve the look you want. This makes your theme lightweight and "future proof", as upcoming versions of Shoelace may introduce new design tokens and components that your theme won't support initially. The default theme will account for these so components won't appear to be broken.
Technically, you can roll your own theme from scratch without using the default theme as a baseline, but that approach isn't recommended.
### Theme Classes
All theme classes must use the `sl-theme-{name}` convention, where `{name}` is a lowercase, hyphen-delimited value representing the name of your theme. For example, a theme called "Purple Power" would use the `sl-theme-purple-power` class.
Every selector in a theme must be scoped to the theme's class to ensure interoperability with other themes.
### Design Tokens
[Design tokens](/getting-started/customizing?id=design-tokens) give you a high-level way to customize Shoelace components. You can customize them in your theme as shown below.
```css
.sl-theme-purple-power {
--sl-color-primary-50: #faf5ff;
--sl-color-primary-100: #f3e8ff;
--sl-color-primary-200: #e9d5ff;
/* ... */
}
```
?> Avoid scoping design tokens to `:root`. You may notice that the default theme does this, but that's because it's not technically a theme — it's a set of design tokens and base styles that themes can use as a foundation to build upon.
### Components
To customize individual components, use the following syntax. Available "parts" can be found in the CSS Parts section of each component's documentation.
```css
.sl-theme-purple-power sl-button::part(base) {
/* your custom button styles here */
}
```
?> Pay special attention to each component's CSS Parts API. You almost always need to use a `::part` selector when theming components!
## Using a Custom Theme
If a theme adheres to the guidelines above, you can use it by importing the stylesheet and activating it with the `sl-theme-[name]` class.
```html
<head>
...
<link rel="stylesheet" href="path/to/purple-power.css">
</head>
<body class="sl-theme-purple-power">
...
</body>
```
If desired, you can import and activate more than one theme on the same page.
## Submitting a Theme
**I am very interested in showcasing well-designed themes that complement this library.** To submit a theme for review, please [open an issue](https://github.com/shoelace-style/shoelace/issues/new) on GitHub with the theme linked or attached. Once approved, your theme will be showcased on this page.
Please note the following requirements before submitting a theme.
- Themes must be complete and of high quality
- Themes must be available under an open source license
- Derivative works must be properly credited

View File

@@ -1,251 +0,0 @@
# Usage
Shoelace components are just regular HTML elements, or "custom elements" to be precise. You can use them like any other element. Each component has detailed documentation that describes its full API, including properties, events, methods, and more.
## Web Component Basics
### Properties
Many components have properties ("props") that can be set using attributes. For example, buttons accept a `size` attribute that dictates the button's size.
```html
<sl-button size="small">Click me</sl-button>
```
Some props are booleans, so they only have true/false values. To activate a boolean prop, add the corresponding attribute without a value.
```html
<sl-button disabled>Click me</sl-button>
```
In rare cases, a prop may require an array, an object, or a function. For example, to customize the color picker's list of preset swatches, you set the `swatches` prop to an array of colors. This can be done with JavaScript.
```html
<sl-color-picker></sl-color-picker>
<script>
const colorPicker = document.querySelector('sl-color-picker');
colorPicker.swatches = ['red', 'orange', 'yellow', 'green', 'blue', 'purple'];
</script>
```
Refer to a component's documentation for a complete list of its properties.
### Events
You can listen for standard events such as `click`, `mouseover`, etc. as you normally would. In addition, some components emit custom events. These work the same way as standard events, but are prefixed with `sl-` to prevent collisions with standard events and other libraries.
```html
<sl-checkbox>Check me</sl-checkbox>
<script>
const checkbox = document.querySelector('sl-checkbox');
checkbox.addEventListener('sl-change', event => {
console.log(event.target.checked ? 'checked' : 'not checked');
});
</script>
```
Refer to a component's documentation for a complete list of its custom events.
### Methods
Some components have methods you can call to trigger various behaviors. For example, you can set focus on a Shoelace input using the `setFocus()` method.
```html
<sl-input></sl-input>
<script>
const input = document.querySelector('sl-input');
input.setFocus();
</script>
```
Refer to a component's documentation for a complete list of its methods and their arguments.
### Slots
Many components use slots to accept content inside of them. The most common slot is the _default_ slot, which includes any content inside the component that doesn't have a `slot` attribute.
For example, a button's default slot is used to populate its label.
```html
<sl-button>Click me</sl-button>
```
Some components also have _named_ slots. A named slot can be populated by adding a child element with the appropriate `slot` attribute. Notice how the icon below has the `slot="prefix"` attribute? This tells the component to place the icon into its `prefix` slot.
```html
<sl-button>
<sl-icon slot="prefix" name="gear"></sl-icon>
Settings
</sl-button>
```
The location of a named slot doesn't matter. You can put it anywhere inside the component and the browser will move it to the right place automatically!
Refer to a component's documentation for a complete list of available slots.
### Don't Use Self-closing Tags
Custom elements cannot have self-closing tags. Similar to `<script>` and `<textarea>`, you must always include the full closing tag.
```html
<!-- Don't do this -->
<sl-input />
<!-- Always do this -->
<sl-input></sl-input>
```
### Differences from Native Elements
You might expect similarly named elements to share the same API as native HTML elements. This is not always the case. Shoelace components **are not** designed to be one-to-one replacements for their HTML counterparts.
For example, `<button>` and `<sl-button>` both have a `type` attribute, but it does different things (the former controls whether the button submits a form and the latter controls the button's appearance). Similarly, you can't call `focus()` on a Shoelace input — you need to use the component's `setFocus()` method instead. There are technical reasons for some of these design decisions that are outside the scope of this page.
?> **Don't make assumptions about a component's API!** To prevent unexpected behaviors, please take the time to review the documentation and make sure you understand what each property, method, and event is intended to do.
## Code Completion
### VS Code
Shoelace ships with a file called `vscode.html-custom-data.json` that can be used to describe its components to Visual Studio Code. This enables code completion for Shoelace components (also known as "code hinting" or "IntelliSense"). To enable it, you need to tell VS Code where the file is.
1. [Install Shoelace locally](/getting-started/installation.md#local-installation)
2. Create a folder called `.vscode` at the root of your project
3. Create a file inside the folder called `settings.json`
4. Add the following to the file
```js
{
"html.customData": ["./node_modules/@shoelace-style/shoelace/dist/vscode.html-custom-data.json"]
}
```
If `settings.json` already exists, simply add the above line to the root of the object. Note that you may need to restart VS Code for the changes to take affect.
### Other Editors
Most popular editors support custom code completion with a bit of configuration. Please [submit a feature request](https://github.com/shoelace-style/shoelace/issues/new/choose) for your editor of choice. PRs are also welcome!
## React
React [doesn't play nice](https://custom-elements-everywhere.com/#react) with custom elements — it's a bit finicky about props.
> React passes all data to Custom Elements in the form of HTML attributes. For primitive data this is fine, but the system breaks down when passing rich data, like objects or arrays. In these instances you end up with stringified values like `some-attr="[object Object]"` which can't actually be used.
Event handling can also be cumbersome.
> Because React implements its own synthetic event system, it cannot listen for DOM events coming from Custom Elements without the use of a workaround. Developers will need to reference their Custom Elements using a ref and manually attach event listeners with addEventListener. This makes working with Custom Elements cumbersome.
Fortunately, there's a utility that will wrap Shoelace components so you can use them as if they were React components. 👇
?> If you're starting a new project, consider using [Preact](https://preactjs.com/) as an alternative. It shares the same API as React and [handles custom elements quite well](https://custom-elements-everywhere.com/#preact).
### Wrapping Components
You can use [this utility](https://www.npmjs.com/package/@shoelace-style/react-wrapper) to wrap Shoelace components so they work like regular React components. To install it, use this command.
```bash
npm install @shoelace-style/react-wrapper
```
Now you can "import" Shoelace components as React components! Remember to [install Shoelace](/getting-started/installation.md) first, otherwise this won't work.
```js
import wrapCustomElement from '@shoelace-style/react-wrapper';
const ShoelaceButton = wrapCustomElement('sl-button');
return <ShoelaceButton type="primary">Click me</ShoelaceButton>;
```
A reference ("ref") to the underlying custom element is exposed through the `element` property so you can access it directly. This is useful for calling methods.
```jsx
<ShoelaceButton
ref={el => this.button = el}
onClick={() => this.button.element.current.removeFocus()}
>
Click me
</ShoelaceButton>
```
## Vue
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements. You just have to tell it to ignore Shoelace components. This is pretty easy because they all start with `sl-`.
```js
Vue.config.ignoredElements = [/^sl-/];
new Vue({ ... });
```
### Binding Complex Data
When binding complex data such as objects and arrays, use the `.prop` modifier to make Vue bind them as a property instead of an attribute.
```html
<sl-color-picker :swatches.prop="mySwatches" />
```
### Two-way Binding
One caveat is there's currently [no support for v-model on custom elements](https://github.com/vuejs/vue/issues/7830), but you can still achieve two-way binding manually.
```html
<!-- This doesn't work -->
<sl-input v-model="name">
<!-- This works, but it's a bit longer -->
<sl-input :value="name" @input="name = $event.target.value">
```
If that's too verbose, you can use a custom directive instead. 👇
### Using a Custom Directive
You can use [this utility](https://www.npmjs.com/package/@shoelace-style/vue-sl-model) to add a custom directive to Vue that will work just like `v-model` but for Shoelace components. To install it, use this command.
```bash
npm install @shoelace-style/vue-sl-model
```
Next, import the directive and enable it like this.
```js
import ShoelaceModelDirective from '@shoelace-style/vue-sl-model';
Vue.config.ignoredElements = [/^sl-/];
Vue.use(ShoelaceModelDirective);
// Your init here
new Vue({ ... });
```
Now you can use the `v-sl-model` directive to keep your data in sync!
```html
<sl-input v-sl-model="name">
```
## Angular
Angular [plays nice](https://custom-elements-everywhere.com/#angular) with custom elements. Just make sure to apply the custom elements schema as shown below.
```js
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule {}
```

View File

@@ -1,102 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Shoelace: A forward-thinking library of web components.</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="description"
content="Shoelace provides a collection of professionally designed, every day UI components built on a framework-agnostic technology."
/>
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta property="og:title" content="Shoelace" />
<meta
property="og:description"
content="Shoelace provides a collection of professionally designed, every day UI components built on a framework-agnostic technology."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://shoelace.style/" />
<meta property="og:image" content="https://shoelace.style/assets/images/og-image.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@shoelace_style" />
<meta name="twitter:creator" content="@claviska" />
<meta name="twitter:title" content="Shoelace" />
<meta
name="twitter:description"
content="Shoelace provides a collection of professionally designed, every day UI components built on a framework-agnostic technology."
/>
<meta name="twitter:image" content="https://shoelace.style/assets/images/twitter-card.png" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/themes/pure.css" />
<link rel="stylesheet" href="/assets/styles/docs.css" />
<link rel="stylesheet" href="/assets/styles/docs-dark.css" />
<link rel="stylesheet" href="/assets/styles/demos.css" />
<link rel="stylesheet" href="/assets/plugins/code-block/code-block.css" />
<link rel="stylesheet" href="/assets/plugins/theme/theme.css" />
<link rel="icon" href="/assets/images/logo.svg" type="image/x-icon" />
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/touch-icon.png" />
<!-- Import Shoelace -->
<link rel="stylesheet" href="/dist/themes/base.css" />
<link rel="stylesheet" href="/dist/themes/dark.css" />
<script type="module" src="/dist/shoelace.js"></script>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
},
auto2top: true,
copyCode: {
buttonText: 'Copy Code',
errorText: 'Failed to copy',
successText: 'Copied'
},
coverpage: false,
executeScript: true,
ga: 'UA-6412891-16',
homepage: '/getting-started/overview.md',
loadSidebar: true,
logo: '/assets/images/wordmark.svg',
maxLevel: 3,
subMaxLevel: 2,
name: 'Shoelace',
notFoundPage: '404.md',
pagination: {
previousText: 'Previous',
nextText: 'Next',
crossChapter: true,
crossChapterText: false
},
routerMode: location.port ? 'hash' : 'history',
search: {
maxAge: 86400000, // Expiration time, the default one day
paths: 'auto',
placeholder: 'Search',
noData: 'No Results',
depth: 3,
namespace: 'shoelace-docs'
},
themeColor: '#049dff'
};
</script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-copy-code@2"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-pagination@2/dist/docsify-pagination.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.19.0/components/prism-bash.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.19.0/components/prism-jsx.min.js"></script>
<script src="/assets/plugins/code-block/code-block.js"></script>
<script src="/assets/plugins/scroll-position/scroll-position.js"></script>
<script src="/assets/plugins/metadata/metadata.js"></script>
<script src="/assets/plugins/sidebar/sidebar.js"></script>
<script src="/assets/plugins/theme/theme.js"></script>
</body>
</html>

View File

@@ -1,460 +0,0 @@
# Changelog
Shoelace follows [Semantic Versioning](https://semver.org/). Breaking changes in components with the <sl-badge type="primary" pill>Stable</sl-badge> badge will not be accepted until the next major version. As such, all contributions must consider the project's roadmap and take this into consideration. Features that are deemed no longer necessary will be deprecated but not removed.
Components with the <sl-badge type="warning" pill>Experimental</sl-badge> badge should not be used in production. They are made available as release candidates for development and testing purposes. As such, changes to experimental components will not be subject to semantic versioning.
_During the beta period, these restrictions may be relaxed in the event of a mission-critical bug._ 🐛
## 2.0.0-beta.35
- Fixed a bug in `sl-animation` where `sl-cancel` and `sl-finish` events would never fire
- Fixed a bug where `sl-alert` wouldn't always transition properly
- Fixed a bug where using `sl-menu` inside a shadow root would break keyboard selections [#382](https://github.com/shoelace-style/shoelace/issues/382)
- Fixed a bug where toggling `multiple` in `sl-select` would lead to a stale display label
- Fixed a bug in `sl-tab-group` where changing `placement` could result in the active tab indicator being drawn a few pixels off
- Improved `@watch` decorator to run after update instead of during
- Updated `sl-menu-item` checked icon to `check` instead of `check2`
- Upgraded the status of `sl-resize-observer` from experimental to stable
## 2.0.0-beta.34
This release changes the way components are registered if you're [cherry picking](/getting-started/installation?id=cherry-picking) or [using a bundler](/getting-started/installation?id=bundling). This recommendation came from the LitElement team and simplifies Shoelace's dependency graph. It also eliminates the need to call a `register()` function before using each component.
From now on, importing a component will register it automatically. The caveat is that bundlers may not tree shake the library properly if you import from `@shoelace-style/shoelace`, so the recommendation is to import components and utilities from their corresponding files instead.
- 🚨 BREAKING: removed `all.shoelace.js` (use `shoelace.js` instead)
- 🚨 BREAKING: component modules now have a side effect, so bundlers may not tree shake properly when importing from `@shoelace-style/shoelace` (see the [installation page](/getting-started/installation?id=bundling) for more details and how to update)
- Added `sl-clear` event to `sl-select`
- Fixed a bug where dynamically changing menu items in `sl-select` would cause the display label to be blank [#374](https://github.com/shoelace-style/shoelace/discussions/374)
- Fixed a bug where setting the `value` attribute or property on `sl-input` and `sl-textarea` would trigger validation too soon
- Fixed the margin in `sl-menu-label` to align with menu items
- Fixed `autofocus` attributes in `sl-input` and `sl-textarea`
- Improved types for `autocapitalize` in `sl-input` and `sl-textarea`
- Reverted the custom `@tag` decorator in favor of `@customElement` to enable auto-registration
## 2.0.0-beta.33
- Fixed a bug where link buttons could have incorrect `target`, `download`, and `rel` props
- Fixed `aria-label` and `aria-labelledby` props in `sl-dialog` and `sl-drawer`
- Fixed `tabindex` prop in `sl-menu`
- Fixed a bug in `sl-select` where tags would always render as pills
- Fixed a bug in `sl-button` where calling `setFocus()` would throw an error
## 2.0.0-beta.32
- Added tag name maps so TypeScript can identify Shoelace elements [#371](https://github.com/shoelace-style/shoelace/pull/371)
- Fixed a bug where the active tab indicator wouldn't render properly on tabs styled with `flex-end` [#355](https://github.com/shoelace-style/shoelace/issues/355)
- Fixed a bug where `sl-change` wasn't emitted by `sl-checkbox` or `sl-switch` [#370](https://github.com/shoelace-style/shoelace/issues/370)
- Fixed a bug where some props weren't being watched correctly in `sl-alert` and `sl-color-picker`
- Improved `@watch` decorator so watch handlers don't run before the first render
- Removed guards that were added due to previous watch handler behavior
## 2.0.0-beta.31
- Add touch support to `sl-rating` [#362](https://github.com/shoelace-style/shoelace/pull/362)
- Fixed a bug where the `open` attribute on `sl-details` would prevent it from opening [#357](https://github.com/shoelace-style/shoelace/issues/357)
- Fixed event detail type parsing so component class names are shown instead of `default`
## 2.0.0-beta.30
- Fix default exports for all components so cherry picking works again [#365](https://github.com/shoelace-style/shoelace/issues/365)
- Revert FOUC base style because it interferes with some framework and custom element use cases
## 2.0.0-beta.29
**This release migrates component implementations from Shoemaker to LitElement.** Due to feedback from the community, Shoelace will rely on a more heavily tested library for component implementations. This gives you a more solid foundation and reduces my maintenance burden. Thank you for all your comments, concerns, and encouragement! Aside from that, everything else from beta.28 still applies plus the following.
- 🚨 BREAKING: removed the `symbol` prop from `sl-rating` and reverted to `getSymbol` for optimal flexibility
- Added `vscode.html-custom-data.json` to the build to support IntelliSense (see [the usage section](/getting-started/usage#code-completion) for details)
- Added a base style to prevent FOUC before components are defined
- Fixed bug where TypeScript types weren't being generated [#364](https://github.com/shoelace-style/shoelace/pull/364)
- Improved vertical padding in `sl-tooltip`
- Moved chunk files into a separate folder
- Reverted menu item active styles
- Updated esbuild to 0.8.54
## 2.0.0-beta.28
**This release includes a major under the hood overhaul of the library and how it's distributed.** Until now, Shoelace was developed with Stencil. This release moves to a lightweight tool called Shoemaker, a homegrown utility that provides declarative templating and data binding while reducing the boilerplate required for said features.
This change in tooling addresses a number of longstanding bugs and limitations. It also gives us more control over the library and build process while streamlining development and maintenance. Instead of two different distributions, Shoelace now offers a single, standards-compliant collection of ES modules. This may affect how you install and use the library, so please refer to the [installation page](/getting-started/installation) for details.
!> Due to the large number of internal changes, I would consider this update to be less stable than previous ones. If you're using Shoelace in a production app, consider holding off until the next beta to allow for more exhaustive testing from the community. Please report any bugs you find on the [issue tracker](https://github.com/shoelace-style/shoelace/issues).
The component API remains the same except for the changes noted below. Thanks for your patience as I work diligently to make Shoelace more stable and future-proof. 🙌
- 🚨 BREAKING: removed the custom elements bundle (you can import ES modules directly)
- 🚨 BREAKING: removed `getAnimationNames()` and `getEasingNames()` methods from `sl-animation` (you can import them from `utilities/animation.js` instead)
- 🚨 BREAKING: removed the `sl-icon-library` component since it required imperative initialization (you can import the `registerIconLibrary()` function from `utilities/icon-library.js` instead)
- 🚨 BREAKING: removed the experimental `sl-theme` component due to limitations (you should set the `sl-theme-[name]` class on the `<body>` instead)
- 🚨 BREAKING: moved the base stylesheet from `dist/shoelace.css` to `dist/themes/base.css`
- 🚨 BREAKING: moved `icons` into `assets/icons` to make future assets easier to colocate
- 🚨 BREAKING: changed `getSymbol` prop in `sl-rating` to `symbol` (it now accepts a string or a function that returns an icon name)
- 🚨 BREAKING: renamed `setAssetPath()` to `setBasePath()` and added the ability to set the library's base path with a `data-shoelace` attribute (`setBasePath()` is exported from `utilities/base-path.js`)
- Fixed `min` and `max` types in `sl-input` to allow numbers and strings [#330](https://github.com/shoelace-style/shoelace/issues/330)
- Fixed a bug where `sl-checkbox`, `sl-radio`, and `sl-switch` controls would shrink with long labels [#325](https://github.com/shoelace-style/shoelace/issues/325)
- Fixed a bug in `sl-select` where the dropdown menu wouldn't reposition when the box resized [#340](https://github.com/shoelace-style/shoelace/issues/340)
- Fixed a bug where ignoring clicks and clicking the overlay would prevent the escape key from closing the dialog/drawer [#344](https://github.com/shoelace-style/shoelace/pull/344)
- Removed the lazy loading dist (importing `shoelace.js` will load and register all components now)
- Switched from Stencil to Shoemaker
- Switched to a custom build powered by [esbuild](https://esbuild.github.io/)
- Updated to Bootstrap Icons 1.4.0
## 2.0.0-beta.27
- Added `handle-icon` slot to `sl-image-comparer` [#311](https://github.com/shoelace-style/shoelace/issues/311)
- Added `label` and `helpText` props and slots to `sl-range` [#318](https://github.com/shoelace-style/shoelace/issues/318)
- Added "Integrating with NextJS" tutorial to the docs, courtesy of [crutchcorn](https://github.com/crutchcorn)
- Added `content` slot to `sl-tooltip` [#322](https://github.com/shoelace-style/shoelace/pull/322)
- Fixed a bug in `sl-select` where removing a tag would toggle the dropdown
- Fixed a bug in `sl-input` and `sl-textarea` where the input might not exist when the value watcher is called [#313](https://github.com/shoelace-style/shoelace/issues/313)
- Fixed a bug in `sl-details` where hidden elements would receive focus when tabbing [#323](https://github.com/shoelace-style/shoelace/issues/323)
- Fixed a bug in `sl-icon` where `sl-error` would only be emitted for network failures [#326](https://github.com/shoelace-style/shoelace/pull/326)
- Reduced the default line-height for `sl-tooltip`
- Updated `sl-menu-item` focus styles
- Updated `sl-select` so tags will wrap when `multiple` is true
- Updated to Stencil 2.4.0
## 2.0.0-beta.26
- 🚨 BREAKING: Fixed animations bloat
- Removed ~400 baked-in Animista animations because they were causing ~200KB of bloat (they can still be used with custom keyframes)
- Reworked animations into a separate module ([`@shoelace-style/animations`](https://github.com/shoelace-style/animations)) so it's more maintainable and animations are sync with the latest version of animate.css
- Animation and easing names are now camelcase (e.g. `easeInOut` instead of `ease-in-out`)
- Added initial E2E tests [#169](https://github.com/shoelace-style/shoelace/pull/169)
- Added the `FocusOptions` argument to all components that have a `setFocus()` method
- Added `sl-initial-focus` event to `sl-dialog` and `sl-drawer` so focus can be customized to a specific element
- Added `close-button` part to `sl-tab` so the close button can be customized
- Added `scroll-button` part to `sl-tab-group` so the scroll buttons can be customized
- Fixed a bug where `sl-hide` would be emitted twice when closing an alert with `hide()`
- Fixed a bug in `sl-color-picker` where the toggle button was smaller than the preview button in Safari
- Fixed a bug in `sl-tab-group` where activating a nested tab group didn't work properly [#299](https://github.com/shoelace-style/shoelace/issues/299)
- Fixed a bug in `sl-tab-group` where removing tabs would throw an error
- Fixed a bug in `sl-alert`, `sl-dialog`, `sl-drawer`, `sl-select`, and `sl-tag` where the close button's base wasn't exported so it couldn't be styled
- Removed `text` type from `sl-badge` as it was erroneously copied and never had styles
- Updated `sl-tab-group` so the `active` prop is reflected to the attribute
- Updated the docs to show dependencies instead of dependents which is much more useful when working with the custom elements bundle
- Updated to Bootstrap Icons 1.3.0
## 2.0.0-beta.25
- 🚨 BREAKING: Reworked color tokens
- Theme colors are now inspired by Tailwind's professionally-designed color palette
- Color token variations now range from 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950
- Color token variations were inverted, e.g. 50 is lightest and 950 is darkest
- All component styles were adapted to use the new color tokens, but visual changes are subtle
- The dark theme was adapted use the new color tokens
- HSL is no longer used because it is not perceptually uniform (this may be revisited when all browsers support [LCH colors](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/))
- 🚨 BREAKING: Refactored `sl-select` to improve accessibility [#216](https://github.com/shoelace-style/shoelace/issues/216)
- Removed the internal `sl-input` because it was causing problems with a11y and virtual keyboards
- Removed `input`, `prefix` and `suffix` parts
- 🚨 BREAKING: Removed `copy-button` part from `sl-color-picker` since copying is now done by clicking the preview
- Added `getFormattedValue()` method to `sl-color-picker` so you can retrieve the current value in any format
- Added visual separators between solid buttons in `sl-button-group`
- Added `help-text` prop to `sl-input`, `sl-textarea`, and `sl-select`
- Fixed a bug where moving the mouse while `sl-dropdown` is closing would remove focus from the trigger
- Fixed a bug where `sl-menu-item` didn't set a default color in the dark theme
- Fixed a bug where `sl-color-picker` preview wouldn't update in Safari
- Fixed a bug where removing an icon's `name` or `src` wouldn't remove the previously rendered SVG [#285](https://github.com/shoelace-style/shoelace/issues/285)
- Fixed a bug where disabled link buttons didn't appear disabled
- Improved button spacings and added split button example
- Improved elevation tokens in dark theme
- Improved accessibility in `sl-tooltip` by allowing escape to dismiss it [#219](https://github.com/shoelace-style/shoelace/issues/219)
- Improved slot detection in `sl-card`, `sl-dialog`, and `sl-drawer`
- Made `@types/resize-observer-browser` a dependency so users don't have to install it manually
- Refactored internal label + help text logic into a functional component used by `sl-input`, `sl-textarea`, and `sl-select`
- Removed `sl-blur` and `sl-focus` events from `sl-menu` since menus can't have focus as of 2.0.0-beta.22
- Updated `sl-spinner` so the indicator is more obvious
- Updated to Bootstrap Icons 1.2.2
## 2.0.0-beta.24
- Added `sl-format-date` component
- Added `indeterminate` state to `sl-progress-bar` [#274](https://github.com/shoelace-style/shoelace/issues/274)
- Added `--track-color`, `--indicator-color`, and `--label-color` to `sl-progress-bar` [#276](https://github.com/shoelace-style/shoelace/issues/276)
- Added `allow-scripts` prop to `sl-include` [#280](https://github.com/shoelace-style/shoelace/issues/280)
- Fixed a bug where `sl-menu-item` color variable was incorrect [#272](https://github.com/shoelace-style/shoelace/issues/272)
- Fixed a bug where `sl-dialog` and `sl-drawer` would emit the `sl-hide` event twice [#275](https://github.com/shoelace-style/shoelace/issues/275)
- Fixed a bug where calling `event.preventDefault()` on certain form elements wouldn't prevent `sl-form` from submitting [#277](https://github.com/shoelace-style/shoelace/issues/277)
- Fixed drag handle orientation in `sl-image-comparer`
- Restyled `sl-spinner` so the track is visible and the indicator is smaller.
- Removed `resize-observer-polyfill` in favor of `@types/resize-observer-browser` since all target browsers support `ResizeObserver`
- Upgraded the status of `sl-form`, `sl-image-comparer`, and `sl-include` from experimental to stable
## 2.0.0-beta.23
- Added `sl-format-number` component
- Added `sl-relative-time` component
- Added `closable` prop to `sl-tab`
- Added experimental `sl-resize-observer` utility
- Added experimental `sl-theme` utility and updated theming documentation
- Fixed a bug where `sl-menu-item` wouldn't render properly in the dark theme
- Fixed a bug where `sl-select` would show an autocomplete menu
- Improved placeholder contrast in dark theme
- Updated to Boostrap Icons 1.1.0
- Updated to Stencil 2.3.0
## 2.0.0-beta.22
- 🚨 BREAKING: Refactored `sl-menu` and `sl-menu-item` to improve accessibility by using proper focus states [#217](https://github.com/shoelace-style/shoelace/issues/217)
- Moved `tabindex` from `sl-menu` to `sl-menu-item`
- Removed the `active` prop from `sl-menu-item` because synthetic focus states are bad for accessibility
- Removed the `sl-activate` and `sl-deactivate` events from `sl-menu-item` (listen for `focus` and `blur` instead)
- Updated `sl-select` so keyboard navigation still works
- Added `no-scroll-controls` prop to `sl-tab-group` [#253](https://github.com/shoelace-style/shoelace/issues/253)
- Fixed a bug where setting `open` initially wouldn't show `sl-dialog` or `sl-drawer` [#255](https://github.com/shoelace-style/shoelace/issues/255)
- Fixed a bug where `disabled` could be set when buttons are rendered as links
- Fixed a bug where hoisted dropdowns would render in the wrong position when placed inside `sl-dialog` [#252](https://github.com/shoelace-style/shoelace/issues/252)
- Fixed a bug where boolean aria attributes didn't explicitly set `true|false` string values in the DOM
- Fixed a bug where `aria-describedby` was never set on tooltip targets in `sl-tooltip`
- Fixed a bug where setting `position` on `sl-image-comparer` wouldn't update the divider's position
- Fixed a bug where the check icon was announced to screen readers in `sl-menu-item`
- Improved `sl-icon-button` accessibility by encouraging proper use of `label` and hiding the internal icon from screen readers [#220](https://github.com/shoelace-style/shoelace/issues/220)
- Improved `sl-dropdown` accessibility by attaching `aria-haspopup` and `aria-expanded` to the slotted trigger
- Refactored position logic to remove an unnecessary state variable in `sl-image-comparer`
- Refactored design tokens to use `rem` instead of `px` for input height and spacing [#221](https://github.com/shoelace-style/shoelace/issues/221)
- Removed `console.log` from modal utility
- Updated to Stencil 2.2.0
## 2.0.0-beta.21
- Added `label` slot to `sl-input`, `sl-select`, and `sl-textarea` [#248](https://github.com/shoelace-style/shoelace/issues/248)
- Added `label` slot to `sl-dialog` and `sl-drawer`
- Added experimental `sl-include` component
- Added status code to the `sl-error` event in `sl-icon`
- Fixed a bug where initial transitions didn't show in `sl-dialog` and `sl-drawer` [#247](https://github.com/shoelace-style/shoelace/issues/247)
- Fixed a bug where indeterminate checkboxes would maintain the indeterminate state when toggled
- Fixed a bug where concurrent active modals (i.e. dialog, drawer) would try to steal focus from each other
- Improved `sl-color-picker` grid and slider handles [#246](https://github.com/shoelace-style/shoelace/issues/246)
- Refactored `sl-icon` request logic and removed unused cache map
- Reworked show/hide logic in `sl-alert`, `sl-dialog`, and `sl-drawer` to not use reflow hacks and the `hidden` attribute
- Reworked slot logic in `sl-card`, `sl-dialog`, and `sl-drawer`
- Updated to Popper 2.5.3 to address a fixed position bug in Firefox
## 2.0.0-beta.20
- 🚨 BREAKING: Transformed all Shoelace events to lowercase ([details](#why-did-event-names-change))
- Added support for dropdowns and non-icon elements to `sl-input`
- Added `spellcheck` prop to `sl-input`
- Added `sl-icon-library` to allow custom icon library registration
- Added `library` prop to `sl-icon` and `sl-icon-button`
- Added "Integrating with Rails" tutorial to the docs, courtesy of [ParamagicDev](https://github.com/ParamagicDev)
- Fixed a bug where `sl-progress-ring` rendered incorrectly when zoomed in Safari [#227](https://github.com/shoelace-style/shoelace/issues/227)
- Fixed a bug where tabbing into slotted elements closes `sl-dropdown` when used in a shadow root [#223](https://github.com/shoelace-style/shoelace/issues/223)
- Fixed a bug where scroll anchoring caused undesirable scrolling when `sl-details` are grouped
### Why did event names change?
Shoelace events were updated to use a lowercase, kebab-style naming convention. Instead of event names such as `slChange` and `slAfterShow`, you'll need to use `sl-change` and `sl-after-show` now.
This change was necessary to address a critical issue in frameworks that use DOM templates with declarative event bindings such as `<sl-button @slChange="handler">`. Due to HTML's case-insensitivity, browsers translate attribute names to lowercase, turning `@slChange` into `@slchange`, making it impossible to listen to `slChange`.
While declarative event binding is a non-standard feature, not supporting it would make Shoelace much harder to use in popular frameworks. To accommodate those users and provide a better developer experience, we decided to change the naming convention while Shoelace is still in beta.
The following pages demonstrate why this change was necessary.
- [This Polymer FAQ from Custom Elements Everywhere](https://custom-elements-everywhere.com/#faq-polymer)
- [Vue's Event Names documentation](https://vuejs.org/v2/guide/components-custom-events.html#Event-Names)
## 2.0.0-beta.19
- Added `input`, `label`, `prefix`, `clear-button`, `suffix`, `help-text` exported parts to `sl-select` to make the input customizable
- Added toast notifications through the `toast()` method on `sl-alert`
- Fixed a bug where mouse events would bubble up when `sl-button` was disabled, causing tooltips to erroneously appear
- Fixed a bug where pressing space would open and immediately close `sl-dropdown` panels in Firefox
- Fixed a bug where `sl-tooltip` would throw an error on init
- Fixed a bug in custom keyframes animation example
- Refactored clear logic in `sl-input`
## 2.0.0-beta.18
- Added `name` and `invalid` prop to `sl-color-picker`
- Added support for form submission and validation to `sl-color-picker`
- Added touch support to demo resizers in the docs
- Added `sl-responsive-embed` component
- Fixed a bug where swapping an animated element wouldn't restart the animation in `sl-animation`
- Fixed a bug where the cursor was incorrect when `sl-select` was disabled
- Fixed a bug where `slblur` and `slfocus` were emitted twice in `sl-select`
- Fixed a bug where clicking on `sl-menu` wouldn't focus it
- Fixed a bug in the popover utility where `onAfterShow` would fire too soon
- Fixed a bug where `bottom` and `right` placements didn't render properly in `sl-tab-group`
- Improved keyboard logic in `sl-dropdown`, `sl-menu`, and `sl-select`
- Updated `sl-animation` to stable
- Updated to Stencil 2.0 (you may need to purge `node_modules` and run `npm install` after pulling)
- Updated entry points in `package.json` to reflect new filenames generated by Stencil 2
## 2.0.0-beta.17
- Added `minlength` and `spellcheck` attributes to `sl-textarea`
- Fixed a bug where clicking a tag in `sl-select` wouldn't toggle the menu
- Fixed a bug where options where `sl-select` options weren't always visible or scrollable
- Fixed a bug where setting `null` on `sl-input`, `sl-textarea`, or `sl-select` would throw an error
- Fixed a bug where `role` was on the wrong element and aria attribute weren't explicit in `sl-checkbox`, `sl-switch`, and `sl-radio`
- Fixed a bug where dynamically adding/removing a slot wouldn't work as expected in `sl-card`, `sl-dialog`, and `sl-drawer`
- Fixed a bug where the value wasn't updated and events weren't emitted when using `setRangeText` in `sl-input` and `sl-textarea`
- Optimized `hasSlot` utility by using a simpler selector
- Updated Bootstrap Icons to 1.0.0 with many icons redrawn and improved
- Updated contribution guidelines
**Form validation has been reworked and is much more powerful now!**
- The `invalid` prop now reflects the control's validity as determined by the browser's constraint validation API
- Added `required` to `sl-checkbox`, `sl-select`, and `sl-switch`
- Added `reportValidity()` and `setCustomValidity()` methods to all form controls
- Added validation checking for custom and native form controls to `sl-form`
- Added `novalidate` prop to `sl-form` to disable validation
- Removed the `valid` prop from all form controls
- Removed valid and invalid design tokens and related styles (you can use your own custom styles to achieve this)
## 2.0.0-beta.16
- Add `hoist` prop to `sl-color-picker`, `sl-dropdown`, and `sl-select` to work around panel clipping
- Add `sl-format-bytes` utility component
- Add `clearable` and `required` props to `sl-select`
- Add `slclear` event to `sl-input`
- Added keyboard support to the preview resizer in the docs
- Fixed a bug where the `aria-selected` state was incorrect in `sl-menu-item`
- Fixed a bug where custom properties applied to `sl-tooltip` didn't affect show/hide transitions
- Fixed a bug where `--sl-input-color-*` custom properties had no affect on `sl-input` and `sl-textarea`
- Refactored `sl-dropdown` and `sl-tooltip` to use positioner elements so panels/tooltips can be customized easier
## 2.0.0-beta.15
- Added `image-comparer` component
- Added `--width`, `--height`, and `--thumb-size` custom props to `sl-switch`
- Fixed an `aria-labelledby` attribute typo in a number of components
- Fixed a bug where the `change` event wasn't updating the value in `sl-input`
- Fixed a bug where `sl-color-picker` had the wrong border color in the dark theme
- Fixed a bug where `sl-menu-item` had the wrong color in dark mode when disabled
- Fixed a bug where WebKit's autocomplete styles made inputs looks broken
- Fixed a bug where aria labels were wrong in `sl-select`
- Fixed a bug where clicking the label wouldn't focus the control in `sl-select`
## 2.0.0-beta.14
- Added dark theme
- Added `--sl-panel-background-color` and `--sl-panel-border-color` tokens
- Added `--tabs-border-color` custom property to `sl-tab-group`
- Added `--track-color` custom property to `sl-range`
- Added `tag` part to `sl-select`
- Updated `package.json` so custom elements imports can be consumed from the root
- Fixed a bug where scrolling dialogs didn't resize properly in Safari
- Fixed a bug where `slshow` and `slhide` would be emitted twice in some components
- Fixed a bug where `custom-elements/index.d.ts` was broken due to an unclosed comment (fixed in Stencil 1.17.3)
- Fixed bug where inputs were not using border radius tokens
- Fixed a bug where the text color was being erroneously set in `sl-progress-ring`
- Fixed a bug where `sl-progress-bar` used the wrong part name internally for `indicator`
- Removed background color from `sl-menu`
- Updated to Stencil 1.17.3
## 2.0.0-beta.13
- Added `slactivate` and `sldeactivate` events to `sl-menu-item`
- Added experimental `sl-animation` component
- Added shields to documentation
- Fixed a bug where link buttons would have `type="button"`
- Fixed a bug where button groups with tooltips experienced an odd spacing issue in Safari
- Fixed a bug where scrolling in dropdowns/selects didn't work properly on Windows (special thanks to [Trendy](http://github.com/trendy) for helping troubleshoot!)
- Fixed a bug where selecting a menu item in a dropdown would cause Safari to scroll
- Fixed a bug where type to select wouldn't accept symbols
- Moved scrolling logic from `sl-menu` to `sl-dropdown`
## 2.0.0-beta.12
- Added support for `href`, `target`, and `download` to buttons
- Fixed a bug where buttons would have horizontal spacing in Safari
- Fixed a bug that caused an import resolution error when using Shoelace in a Stencil app
## 2.0.0-beta.11
- Added button group component
- Fixed icon button alignment
- Fixed a bug where focus visible observer wasn't removed from `sl-details`
- Replaced the deprecated `componentDidUnload` lifecycle method with `disconnectedCallback` to prevent issues with frameworks
## 2.0.0-beta.10
- Added community page to the docs
- Fixed a bug where many components would erroneously receive an `id` when using the custom elements bundle
- Fixed a bug where tab groups weren't scrollable with the mouse
## 2.0.0-beta.9
- Added the icon button component
- Added the skeleton component
- Added the `typeToSelect` method to menu so type-to-select behavior can be controlled externally
- Added the `pulse` prop to badge
- Fixed a bug where hovering over select showed the wrong cursor
- Fixed a bug where tabbing into a select control would highlight the label
- Fixed a bug where tabbing out of a select control wouldn't close it
- Fixed a bug where closing dropdowns wouldn't give focus back to the trigger
- Fixed a bug where type-to-select wasn't working after the first letter
- Fixed a bug where clicking on menu items and dividers would steal focus from the menu
- Fix a bug where the color picker wouldn't parse uppercase values
- Removed `noFooter` prop from dialog and drawer (slot detection is automatic, so the prop is not required)
- Removed `close-icon` slot from alert
- Replaced make-shift icon buttons with `sl-icon-button` in alert, dialog, drawer, and tag
- Updated Stencil to 1.17.1
- Switched to jsDelivr for better CDN performance
## 2.0.0-beta.8
- Added the card component
- Added `--focus-ring` custom property to tab
- Fixed a bug where range tooltips didn't appear on iOS
- Fixed constructor bindings so they don't break the custom elements bundle
- Fixed tag color contrast to be AA compliant
- Fixed a bug that made it difficult to vertically align rating
- Fixed a bug where dropdowns would always close on mousedown when inside a shadow root
- Made tag text colors AA compliant
- Promoted badge to stable
- Refactored `:host` variables and moved non-display props to base elements
- Refactored event handler bindings to occur in `connectedCallback` instead of the constructor
- Refactored scroll locking logic to use `Set` instead of an array
- Updated the custom elements bundle documentation and added bundler examples
- Upgraded Stencil to 1.17.0-0 (next) to fix custom elements bundle
## 2.0.0-beta.7
- Added links to version 1 resources to the docs
- Added rating component
- Fixed a bug where some build files were missing
- Fixed clearable tags demo
- Fixed touch icon size in docs
## 2.0.0-beta.6
- Enabled the `dist-custom-elements-bundle` output target
- Fixed a bug where nested form controls were ignored in `<sl-form>`
## 2.0.0-beta.5
- Fixed bug where `npm install` would fail due to postinstall script
- Removed unused dependency
## 2.0.0-beta.4
- Added `pill` variation to badges
- Fixed a bug where all badges had `pointer-events: none`
- Fixed `@since` props to show 2.0 instead of 1.0
- Fixed giant cursors in inputs in Safari
- Fixed color picker input width in Safari
- Fixed initial transitions for drawer, dialog, and popover consumers
- Fixed a bug where dialog, dropdown, and drawer would sometimes not transition in on the first open
- Fixed various documentation typos
## 2.0.0-beta.3
- Fix version in docs
- Remove custom elements bundle
## 2.0.0-beta.2
- Fix quick start and installation URLs
- Switch Docsify theme
- Update line heights tokens
## 2.0.0-beta.1
- Initial release

View File

@@ -1,41 +0,0 @@
# Community
Shoelace has a budding community of designers and developers that are building amazing things with web components. We'd love for you to become a part of it!
Please be respectful of other users and remember that Shoelace is an open source project. We'll try to help when we can, but there's no guarantee we'll be able solve your problem. Please manage your expectations and don't forget to contribute back to the conversation when you can!
## Discussion Forum
The [discussion forum](https://github.com/shoelace-style/shoelace/discussions) is open to anyone with a GitHub account. This is the best place to:
- Ask for help
- Share ideas and get feedback
- Show the community what you're working on
- Learn more about the project, its values, and its roadmap
<sl-button type="primary" href="https://github.com/shoelace-style/shoelace/discussions" target="_blank">
Join the Discussion
</sl-button>
## Community Chat
The [community chat](https://discord.gg/mg8f26C) is open to the public and powered by [Discord](https://discord.com/). This is a good place to:
- Ask for help
- Share ideas and get feedback
- Show the community what you're working on
- Chat live with other designers, developers, and Shoelace fans
<sl-button type="primary" href="https://discord.gg/mg8f26C" target="_blank">
Join the Chat
</sl-button>
## Twitter
Follow [@shoelace_style](https://twitter.com/shoelace_style) on Twitter for general updates and announcements about Shoelace. This is a great place to say "hi" or to share something you're working on. You're also welcome to follow [@claviska](https://twitter.com/claviska), the creator, for tweets about web components, web development, and life.
**Please avoid using Twitter for support questions.** The [discussion forum](https://github.com/shoelace-style/shoelace/discussions) is a much better place to share code snippets, screenshots, and other troubleshooting info. You'll have much better luck there, as more users will have a chance to help you.
<sl-button type="primary" href="https://twitter.com/shoelace_style" target="_blank">
Follow on Twitter
</sl-button>

View File

@@ -1,228 +0,0 @@
# Contributing
Shoelace is an open source project, meaning everyone can use it and contribute to its development. When you join our community, you'll find a friendly group of enthusiasts at all experience levels who are willing to chat about anything and everything related to Shoelace.
The easiest way to get started contributing is to join the [community chat](https://discord.gg/mg8f26C). This is where we hang out, discuss new ideas, ask for feedback, and more!
A common misconception about contributing to an open source project is that you need to know how to code. This simply isn't true. In fact, there are _many_ ways to contribute, and some of the most important contributions come from those who never write a single line of code. Here's a list of ways you can make a meaningful contribution to the project:
- Submitting well-written bug reports
- Submitting feature requests that are within the scope of the project
- Improving the documentation
- Responding to users that need help in the community chat or discussion forum
- Triaging issues on GitHub
- Being a developer advocate for the project
- Sponsoring the project financially
- Writing tests
- Sharing ideas
- And, of course, contributing code!
Please take a moment to review these guidelines to make the contribution process as easy as possible for both yourself and the project's maintainers.
## Using the Issue Tracker
The [issue tracker](https://github.com/shoelace-style/shoelace/issues) is for bug reports, feature requests, and pull requests.
- Please **do not** use the issue tracker for personal support requests. Use [the discussion forum](https://github.com/shoelace-style/shoelace/discussions/categories/help) instead.
- Please **do not** derail, hijack, or troll issues. Keep the discussion on topic and be respectful of others.
- Please **do not** post comments with "+1" or "👍". Use [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) instead.
- Please **do** use the issue tracker for feature requests, bug reports, and pull requests.
Issues that do not follow these guidelines are subject to closure. There simply aren't enough resources for the author and contributors to troubleshoot personal support requests.
### Feature Requests
Feature requests can be added using the issue tracker.
- Please **do** search for an existing request before suggesting a new feature.
- Please **do** use the "👍" reaction to vote for a feature.
- Please **do** share substantial use cases and perspective that support new features if they haven't already been mentioned.
- Please **do not** bump, spam, or ping contributors to prioritize your own feature.
If you would like your feature prioritized, please consider [sponsoring the project](https://github.com/sponsors/claviska).
### Bug Reports
A bug is _a demonstrable problem_ caused by code in the library. Bug reports are an important contribution to the quality of the project. When submitting a bug report, there are a few steps you can take to make sure your issues gets attention quickly.
- Please **do not** paste in large blocks of irrelevant code
- Please **do** search for an existing issue before creating a new one
- Please **do** explain the bug clearly
- Please **do** provide a minimal test case that demonstrates the bug (e.g. [jsfiddle.net](https://jsfiddle.net/) or [CodePen](https://codepen.io/))
- Please **do** provide additional information, when necessary, to replicate the bug
**A minimal test case is critical to a successful bug report.** It demonstrates that the bug exists in the library and not in surrounding code. Contributors should be able to understand the bug without studying your code, otherwise they'll probably move on to another bug.
If you would like your bug prioritized, please consider [sponsoring the project](https://github.com/sponsors/claviska).
### Pull Requests
To keep the project on track, please consider the following guidelines before submitting a PR.
- Please **do not** submit a PR without opening an issue first, especially for non-trivial changes. This may prevent you from doing work that won't be accepted for various reasons (e.g. someone is already working on it, it's not a good fit for the project, it needs additional planning, etc.)
- Please **do** make sure your PR clearly defines what you're changing. Even if you feel your changes are obvious, please explain them so other contributors can more easily review your works. PRs without detailed descriptions are subject to closure pending more details.
- Please **do** open your PR against the `next` branch.
- Please **do not** edit anything in `dist/`. These files are generated automatically, so you need to edit the source files instead.
The author reserves the right to reject any PR that's outside the scope of the project or doesn't meet code quality standards.
### Branches
`current` - This branch reflects the latest release and powers [shoelace.style](https://shoelace.style/).
`next` - This is the branch you should submit pull requests against. It reflects what's coming in the _next_ release, which can be previewed at [next.shoelace.style](https://next.shoelace.style/).
## Developing
To set up a local dev environment, [fork the repo](https://github.com/shoelace-style/shoelace/fork) on GitHub, clone it locally, and install its dependencies.
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/shoelace
cd shoelace
npm install
```
Once you've cloned the repo, run the following command to spin up the Shoelace dev server.
```bash
npm start
```
After the initial build, a browser will open automatically to a local version of the docs. The documentation is powered by Docsify, which uses raw markdown files to generate pages on the fly.
### Dev Sandbox
Component development occurs _within_ the local docs site. I've found that offering common variations _in the docs_ is more beneficial for users than segmenting demos and code examples into separate tools such as Storybook. This encourages more thorough documentation, streamlines development for maintainers, and simplifies how the project is built. It also reduces installation and startup times significantly.
There is currently no hot module reloading (HMR), as browsers don't provide a way to unregister custom elements. However, most changes to the source will reload the browser automatically. The exception is component metadata, which is generated by TypeDoc. TypeDoc takes a few seconds to run so, to prevent long reload delays, it only runs once at startup.
For more information about running and building the project locally, refer to `README.md` in the project's root.
## Best Practices
The following is a non-exhaustive list of conventions, patterns, and best practices we try to follow. As a contributor, we ask that you make a good faith effort to follow them as well. This ensures consistency and maintainability throughout the project.
If in doubt, use your best judgment and the maintainers will be happy to guide you during the code review process. If you'd like clarification on something before submitting a PR, feel free to reach out on the [community chat](https://discord.gg/mg8f26C).
?> This section can be a lot to digest in one sitting, so don't feel like you need to take it all in right now. Most contributors will be better off skimming this section and reviewing the relevant content as needed.
### Accessibility
Shoelace is built with accessibility in mind. Creating generic components that are fully accessible to users with varying capabilities across a multitude of circumstances is a daunting challenge. Oftentimes, the solution to an a11y problem is not written in black and white and, therefore, we may not get it right the first time around. There are, however, guidelines we can follow in our effort to make Shoelace an accessible foundation from which applications and websites can be built.
We take this commitment seriously, so please ensure your contributions have this goal in mind. If you need help with anything a11y-related, please [reach out to the community](/resources/community) for assistance. If you discover an accessibility concern within the library, please file a bug on the [issue tracker](https://github.com/shoelace-style/shoelace/issues).
It's important to remember that, although accessibility starts with foundational components, it doesn't end with them. It everyone's responsibility to encourage best practices and ensure we're providing an optimal experience for all of our users.
### Documentation
Maintaining good documentation can be a painstaking task, but poor documentation leads to frustration and makes the project less appealing to users. Fortunately, writing documentation for Shoelace is fast and easy!
Most of Shoelace's technical documentation is generated with JSDoc comments and TypeScript metadata from the source code. Every property, method, event, etc. is documented this way. In-code comments encourage contributors to keep the documentation up to date as changes occur so the docs are less likely to become stale. Refer to an existing component to see how JSDoc comments are used in Shoelace.
Instructions, code examples, and interactive demos are hand-curated to give users the best possible experience. Typically, the most relevant information is shown first and less common examples are shown towards the bottom. Edge cases and gotchas should be called out in context with tips or warnings.
The docs are powered by [Docsify](https://docsify.now.sh/). Check out `docs/_sidebar.md` and `docs/components/` to get an idea of how pages are structured and formatted. If you're creating a new component, it may help to use an existing component's markdown file as a template.
If you need help with documentation, feel free to reach out on the [community chat](https://discord.gg/mg8f26C).
### Code Formatting
Most code formatting is handled automatically by [Prettier](https://prettier.io/) via commit hooks. However, for the best experience, you should [install it in your editor](https://prettier.io/docs/en/editors.html) and enable format on save.
Please do not make any changes to `prettier.config.cjs` without consulting the maintainers.
### Composability
Components should be composable, meaning you can easily reuse them with and within other components. This reduces the overall size of the library, expedites feature development, and maintains a consistent user experience.
The `<sl-select>` component, for example, makes use of the dropdown, input, menu, and menu item components. Because it's offloading most of its functionality and styles to lower-level components, the select component remains lightweight and its appearance is consistent with other form controls and menus.
### Component Stucture
All components have a host element, which is a reference to the `<sl-*>` element itself. Make sure to always set the host element's `display` property to the appropriate value depending on your needs, as the default is `inline` per the custom element spec.
```css
:host {
display: block;
}
```
Aside from `display`, avoid setting styles on the host element when possible. The reason for this is that styles applied to the host element are not encapsulated. Instead, create a base element that wraps the component's internals and style that instead. This convention also makes it easier to use BEM in components, as the base element can serve as the "block" entity.
### Class Names
All components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM), so styles are completely encapsulated from the rest of the document. As a result, class names used _inside_ a component won't conflict with class names _outside_ the component, so we're free to name them anything we want.
Internally, each component uses the [BEM methodology](http://getbem.com/) for class names. There is no technical requirement to do this — it's purely the preference of the author to enforce consistency and clarity throughout components. As such, all contributions are expected to follow this pattern.
### Boolean Props
Boolean props should _always_ default to `false`, otherwise there's no way for the user to unset the, without JavaScript. To keep the API as friendly and consistent as possible, use a name like `noHeader` with a default value of `false` instead of `header` with a default value of `true`.
### Conditional Slots
When a component relies on the presence of slotted content to do something, don't assume its initial state is permanent. Slotted content can be added or removed any time and components must be aware of this. A good practice to manage this is:
- Add `@slotchange={this.handleSlotChange}` to the slots you want to watch
- Add a `handleSlotChange` method and use the `hasSlot` utility to update state variables for the the respective slot(s)
- Never conditionally render `<slot>` elements in a component — always use `hidden` so the slot remains in the DOM and the `slotchange` event can be captured
See the source of card, dialog, or drawer for examples.
### Custom Events
Components must only emit custom events, and all custom events must start with `sl-` as a namespace. For compatibility with frameworks that utilize DOM templates, custom events must have lowercase, kebab-style names. For example, use `sl-change` instead of `slChange`.
This convention avoids the problem of browsers lowercasing attributes, causing some frameworks to be unable to listen to them. This problem isn't specific to one framework, but [Vue's documentation](https://vuejs.org/v2/guide/components-custom-events.html#Event-Names) provides a good explanation of the problem.
### CSS Custom Properties
To expose custom properties as part of a component's API, scope them to the `:host` block and use the following syntax for comments so they appear in the generated docs. Do not use the `--sl-` prefix, as that is reserved for design tokens that live in the global scope.
```css
/**
* @prop --color: The component's text color.
* @prop --background-color: The component's background color.
*/
:host {
--color: white;
--background-color: tomato;
}
```
### When to use a prop vs. a CSS custom property
When designing a component's API, standard properties ("props") are generally used to change the _behavior_ of a component, whereas CSS custom properties ("CSS variables") are used to change the _appearance_ of a component. Remember that props can't respond to media queries, but CSS variables can.
There are some exceptions to this (e.g. when it significantly improves developer experience), but a good rule of thumbs is "will this need to change based on screen size?" If so, you probably want to use a CSS variable.
### When to use a CSS custom property vs. a CSS part
There are two ways to enable customizations for components. One way is with CSS custom properties ("CSS variables"), the other is with CSS parts ("parts").
CSS variables are scoped to the host element and can be reused throughout the component. A good example of a CSS variable would be `--border-width`, which might get reused throughout a component to ensure borders share the same width for all internal elements.
Parts let you target a specific element inside the component's shadow DOM but, by design, you can't target a part's children or siblings. You can _only_ customize the part itself. Use a part when you need to allow a single element inside the component to accept styles.
This convention can be relaxed when the developer experience is greatly improved by not following these suggestions.
### A Note About Sass
The Shoelace _source_ is developed using Sass for the convenience of nested selectors, imports, and tedious things such as color palette generation. By design, Sass variables, color functions, and other preprocessor-specific feaures are not used in the source and will not be accepted in a PR.
Consumers of the library should never need to worry about preprocessing the library.
### Form Controls
Form controls should support validation through the following conventions:
- All form controls must have an `invalid` prop that reflects their validity
- All form controls must have a `setCustomValidity()` method so the user can set a custom validation message
- All form controls must have a `reportValidity()` method that report their validity during form submission
- All form controls should mirror their native validation attributes such as `required`, `pattern`, `minlength`, `maxlength`, etc. when possible
- All form controls must be serialized by `<sl-form>`
### Positioning Popovers
Shoelace uses an internal popover utility for dropdowns, tooltips, etc. This is a light abstraction of Popper.js designed to make positioning and transitioning things easy and consistent throughout the library. When possible, use this utility instead of relying on Popper directly. See `src/utilities/popover.ts` for details.

View File

@@ -1,12 +0,0 @@
# Border Radius Tokens
Border radius tokens are used to give sharp edges a more subtle, rounded effect. They use rem units so they scale with the base font size. The pixel values displayed are based on a 16px font size.
| Token | Value | Example |
| ---------------------------- | -------------- | -------------------------------------------------------------------------------------------------------- |
| `--sl-border-radius-small` | 0.125rem (2px) | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-small);"></div> |
| `--sl-border-radius-medium` | 0.25rem (4px) | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-medium);"></div> |
| `--sl-border-radius-large` | 0.5rem (8px) | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-large);"></div> |
| `--sl-border-radius-x-large` | 1rem (16px) | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-x-large);"></div> |
| `--sl-border-radius-circle` | 50% | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-circle);"></div> |
| `--sl-border-radius-pill` | 9999px | <div class="border-radius-demo" style="border-radius: var(--sl-border-radius-pill); width: 6rem;"></div> |

View File

@@ -1,125 +0,0 @@
# Color Tokens
Color tokens are used to maintain consistent color use throughout your app.
## Theme Colors
Theme colors include primary, gray, success, info, warning, and danger. They are used extensively throughout the library to maintain a consistent appearance across components.
This will make all colors in the primary color palette various shades of purple.
```css
:root {
/* Changes the primary color palette to purple */
--sl-color-primary-50: #faf5ff;
--sl-color-primary-100: #f3e8ff;
--sl-color-primary-200: #e9d5ff;
--sl-color-primary-300: #d8b4fe;
--sl-color-primary-400: #c084fc;
--sl-color-primary-500: #a855f7;
--sl-color-primary-600: #9333ea;
--sl-color-primary-700: #7e22ce;
--sl-color-primary-800: #6b21a8;
--sl-color-primary-900: #581c87;
}
```
?> Although CSS lets you override custom properties on specific elements, these values _must_ be scoped to the `:root` block for the entire palette to be recalculated. [See this page for details.](https://stackoverflow.com/questions/52015737/css-scoped-custom-property-ignored-when-used-to-calculate-variable-in-outer-scop)
## Primary
| Token | Example |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `--sl-color-primary-50` | <div class="color-demo" style="background-color: var(--sl-color-primary-50);"></div> |
| `--sl-color-primary-100` | <div class="color-demo" style="background-color: var(--sl-color-primary-100);"></div> |
| `--sl-color-primary-200` | <div class="color-demo" style="background-color: var(--sl-color-primary-200);"></div> |
| `--sl-color-primary-300` | <div class="color-demo" style="background-color: var(--sl-color-primary-300);"></div> |
| `--sl-color-primary-400` | <div class="color-demo" style="background-color: var(--sl-color-primary-400);"></div> |
| `--sl-color-primary-500` | <div class="color-demo" style="background-color: var(--sl-color-primary-500);"></div> |
| `--sl-color-primary-600` | <div class="color-demo" style="background-color: var(--sl-color-primary-600);"></div> |
| `--sl-color-primary-700` | <div class="color-demo" style="background-color: var(--sl-color-primary-700);"></div> |
| `--sl-color-primary-800` | <div class="color-demo" style="background-color: var(--sl-color-primary-800);"></div> |
| `--sl-color-primary-900` | <div class="color-demo" style="background-color: var(--sl-color-primary-900);"></div> |
| `--sl-color-primary-950` | <div class="color-demo" style="background-color: var(--sl-color-primary-950);"></div> |
## Gray
| Token | Example |
| ------------------------ | ------------------------------------------------------------------------------- |
| `--sl-color-white` | <div class="color-demo" style="background-color: var(--sl-color-white);"></div> |
| `--sl-color-gray-50` | <div class="color-demo" style="background-color: var(--sl-color-gray-50);"></div> |
| `--sl-color-gray-100` | <div class="color-demo" style="background-color: var(--sl-color-gray-100);"></div> |
| `--sl-color-gray-200` | <div class="color-demo" style="background-color: var(--sl-color-gray-200);"></div> |
| `--sl-color-gray-300` | <div class="color-demo" style="background-color: var(--sl-color-gray-300);"></div> |
| `--sl-color-gray-400` | <div class="color-demo" style="background-color: var(--sl-color-gray-400);"></div> |
| `--sl-color-gray-500` | <div class="color-demo" style="background-color: var(--sl-color-gray-500);"></div> |
| `--sl-color-gray-600` | <div class="color-demo" style="background-color: var(--sl-color-gray-600);"></div> |
| `--sl-color-gray-700` | <div class="color-demo" style="background-color: var(--sl-color-gray-700);"></div> |
| `--sl-color-gray-800` | <div class="color-demo" style="background-color: var(--sl-color-gray-800);"></div> |
| `--sl-color-gray-900` | <div class="color-demo" style="background-color: var(--sl-color-gray-900);"></div> |
| `--sl-color-gray-950` | <div class="color-demo" style="background-color: var(--sl-color-gray-950);"></div> |
| `--sl-color-black` | <div class="color-demo" style="background-color: var(--sl-color-black);"></div> |
## Success
| Token | Example |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `--sl-color-success-50` | <div class="color-demo" style="background-color: var(--sl-color-success-50);"></div> |
| `--sl-color-success-100` | <div class="color-demo" style="background-color: var(--sl-color-success-100);"></div> |
| `--sl-color-success-200` | <div class="color-demo" style="background-color: var(--sl-color-success-200);"></div> |
| `--sl-color-success-300` | <div class="color-demo" style="background-color: var(--sl-color-success-300);"></div> |
| `--sl-color-success-400` | <div class="color-demo" style="background-color: var(--sl-color-success-400);"></div> |
| `--sl-color-success-500` | <div class="color-demo" style="background-color: var(--sl-color-success-500);"></div> |
| `--sl-color-success-600` | <div class="color-demo" style="background-color: var(--sl-color-success-600);"></div> |
| `--sl-color-success-700` | <div class="color-demo" style="background-color: var(--sl-color-success-700);"></div> |
| `--sl-color-success-800` | <div class="color-demo" style="background-color: var(--sl-color-success-800);"></div> |
| `--sl-color-success-900` | <div class="color-demo" style="background-color: var(--sl-color-success-900);"></div> |
| `--sl-color-success-950` | <div class="color-demo" style="background-color: var(--sl-color-success-950);"></div> |
## Info
| Token | Example |
| ------------------------ | ------------------------------------------------------------------------------- |
| `--sl-color-info-50` | <div class="color-demo" style="background-color: var(--sl-color-info-50);"></div> |
| `--sl-color-info-100` | <div class="color-demo" style="background-color: var(--sl-color-info-100);"></div> |
| `--sl-color-info-200` | <div class="color-demo" style="background-color: var(--sl-color-info-200);"></div> |
| `--sl-color-info-300` | <div class="color-demo" style="background-color: var(--sl-color-info-300);"></div> |
| `--sl-color-info-400` | <div class="color-demo" style="background-color: var(--sl-color-info-400);"></div> |
| `--sl-color-info-500` | <div class="color-demo" style="background-color: var(--sl-color-info-500);"></div> |
| `--sl-color-info-600` | <div class="color-demo" style="background-color: var(--sl-color-info-600);"></div> |
| `--sl-color-info-700` | <div class="color-demo" style="background-color: var(--sl-color-info-700);"></div> |
| `--sl-color-info-800` | <div class="color-demo" style="background-color: var(--sl-color-info-800);"></div> |
| `--sl-color-info-900` | <div class="color-demo" style="background-color: var(--sl-color-info-900);"></div> |
| `--sl-color-info-950` | <div class="color-demo" style="background-color: var(--sl-color-info-950);"></div> |
## Warning
| Token | Example |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `--sl-color-warning-50` | <div class="color-demo" style="background-color: var(--sl-color-warning-50);"></div> |
| `--sl-color-warning-100` | <div class="color-demo" style="background-color: var(--sl-color-warning-100);"></div> |
| `--sl-color-warning-200` | <div class="color-demo" style="background-color: var(--sl-color-warning-200);"></div> |
| `--sl-color-warning-300` | <div class="color-demo" style="background-color: var(--sl-color-warning-300);"></div> |
| `--sl-color-warning-400` | <div class="color-demo" style="background-color: var(--sl-color-warning-400);"></div> |
| `--sl-color-warning-500` | <div class="color-demo" style="background-color: var(--sl-color-warning-500);"></div> |
| `--sl-color-warning-600` | <div class="color-demo" style="background-color: var(--sl-color-warning-600);"></div> |
| `--sl-color-warning-700` | <div class="color-demo" style="background-color: var(--sl-color-warning-700);"></div> |
| `--sl-color-warning-800` | <div class="color-demo" style="background-color: var(--sl-color-warning-800);"></div> |
| `--sl-color-warning-900` | <div class="color-demo" style="background-color: var(--sl-color-warning-900);"></div> |
| `--sl-color-warning-950` | <div class="color-demo" style="background-color: var(--sl-color-warning-950);"></div> |
## Danger
| Token | Example |
| ------------------------ | ----------------------------------------------------------------------------------- |
| `--sl-color-danger-50` | <div class="color-demo" style="background-color: var(--sl-color-danger-50);"></div> |
| `--sl-color-danger-100` | <div class="color-demo" style="background-color: var(--sl-color-danger-100);"></div> |
| `--sl-color-danger-200` | <div class="color-demo" style="background-color: var(--sl-color-danger-200);"></div> |
| `--sl-color-danger-300` | <div class="color-demo" style="background-color: var(--sl-color-danger-300);"></div> |
| `--sl-color-danger-400` | <div class="color-demo" style="background-color: var(--sl-color-danger-400);"></div> |
| `--sl-color-danger-500` | <div class="color-demo" style="background-color: var(--sl-color-danger-500);"></div> |
| `--sl-color-danger-600` | <div class="color-demo" style="background-color: var(--sl-color-danger-600);"></div> |
| `--sl-color-danger-700` | <div class="color-demo" style="background-color: var(--sl-color-danger-700);"></div> |
| `--sl-color-danger-800` | <div class="color-demo" style="background-color: var(--sl-color-danger-800);"></div> |
| `--sl-color-danger-900` | <div class="color-demo" style="background-color: var(--sl-color-danger-900);"></div> |
| `--sl-color-danger-950` | <div class="color-demo" style="background-color: var(--sl-color-danger-950);"></div> |

View File

@@ -1,11 +0,0 @@
# Elevation Tokens
Elevation tokens are used to give elements the appearance of being raised off the page. Use them with the `box-shadow` property. These are especially useful for menus, popovers, and dialogs.
| Token | Example |
| --------------------- | -------------------------------------------------------------------------------- |
| `--sl-shadow-x-small` | <div class="elevation-demo" style="box-shadow: var(--sl-shadow-x-small);"></div> |
| `--sl-shadow-small` | <div class="elevation-demo" style="box-shadow: var(--sl-shadow-small);"></div> |
| `--sl-shadow-medium` | <div class="elevation-demo" style="box-shadow: var(--sl-shadow-medium);"></div> |
| `--sl-shadow-large` | <div class="elevation-demo" style="box-shadow: var(--sl-shadow-large);"></div> |
| `--sl-shadow-x-large` | <div class="elevation-demo" style="box-shadow: var(--sl-shadow-x-large);"></div> |

View File

@@ -1,16 +0,0 @@
# Spacing Tokens
Spacing tokens are used to provide consistent spacing between components and content throughout your app.
| Token | Value | Example |
| ------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------- |
| `--sl-spacing-xxx-small` | 0.125rem (2px) | <div class="spacing-demo" style="width: var(--sl-spacing-xxx-small); height: var(--sl-spacing-xxx-small);"></div> |
| `--sl-spacing-xx-small` | 0.25rem (4px) | <div class="spacing-demo" style="width: var(--sl-spacing-xx-small); height: var(--sl-spacing-xx-small);"></div> |
| `--sl-spacing-x-small` | 0.5rem (8px) | <div class="spacing-demo" style="width: var(--sl-spacing-x-small); height: var(--sl-spacing-x-small);"></div> |
| `--sl-spacing-small` | 0.75rem (12px) | <div class="spacing-demo" style="width: var(--sl-spacing-small); height: var(--sl-spacing-small);"></div> |
| `--sl-spacing-medium` | 1rem (16px) | <div class="spacing-demo" style="width: var(--sl-spacing-medium); height: var(--sl-spacing-medium);"></div> |
| `--sl-spacing-large` | 1.25rem (20px) | <div class="spacing-demo" style="width: var(--sl-spacing-large); height: var(--sl-spacing-large);"></div> |
| `--sl-spacing-x-large` | 1.75rem (28px) | <div class="spacing-demo" style="width: var(--sl-spacing-x-large); height: var(--sl-spacing-x-large);"></div> |
| `--sl-spacing-xx-large` | 2.25rem (36px) | <div class="spacing-demo" style="width: var(--sl-spacing-xx-large); height: var(--sl-spacing-xx-large);"></div> |
| `--sl-spacing-xxx-large` | 3rem (48px) | <div class="spacing-demo" style="width: var(--sl-spacing-xxx-large); height: var(--sl-spacing-xxx-large);"></div> |
| `--sl-spacing-xxxx-large` | 4.5rem (72px) | <div class="spacing-demo" style="width: var(--sl-spacing-xxxx-large); height: var(--sl-spacing-xxxx-large);"></div> |

View File

@@ -1,11 +0,0 @@
# Transition Tokens
Transition tokens are used to provide consistent transitions throughout your app.
| Token | Value | Example |
| ------------------------ | ------ | --------------------------------------------------------------------------------------------- |
| `--sl-transition-x-slow` | 1000ms | <div class="transition-demo" style="transition-duration: var(--sl-transition-x-slow);"></div> |
| `--sl-transition-slow` | 500ms | <div class="transition-demo" style="transition-duration: var(--sl-transition-slow);"></div> |
| `--sl-transition-medium` | 250ms | <div class="transition-demo" style="transition-duration: var(--sl-transition-medium);"></div> |
| `--sl-transition-fast` | 150ms | <div class="transition-demo" style="transition-duration: var(--sl-transition-fast);"></div> |
| `--sl-transition-x-fast` | 50ms | <div class="transition-demo" style="transition-duration: var(--sl-transition-x-fast);"></div> |

View File

@@ -1,54 +0,0 @@
# Typography Tokens
Typography tokens are used to maintain a consistent set of font styles throughout your app.
## Font Family
The default font stack is designed to be simple and highly available on as many devices as possible.
| Token | Value | Example |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `--sl-font-sans` | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' | <span style="font-family: var(--sl-font-sans)">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-serif` | Georgia, 'Times New Roman', serif | <span style="font-family: var(--sl-font-serif)">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-mono` | Menlo, Monaco, 'Courier New', monospace | <span style="font-family: var(--sl-font-mono)">The quick brown fox jumped over the lazy dog.</span> |
## Font Size
Font sizes use `rem` units so they scale with the base font size. The pixel values displayed are based on a 16px font size.
| Token | Value | Example |
| --------------------------- | --------------- | ----------------------------------------------------------------- |
| `--sl-font-size-xx-small` | 0.625rem (10px) | <span style="font-size: var(--sl-font-size-xx-small)">Aa</span> |
| `--sl-font-size-x-small` | 0.75rem (12px) | <span style="font-size: var(--sl-font-size-x-small)">Aa</span> |
| `--sl-font-size-small` | 0.875rem (14px) | <span style="font-size: var(--sl-font-size-small)">Aa</span> |
| `--sl-font-size-medium` | 1rem (16px) | <span style="font-size: var(--sl-font-size-medium)">Aa</span> |
| `--sl-font-size-large` | 1.25rem (20px) | <span style="font-size: var(--sl-font-size-large)">Aa</span> |
| `--sl-font-size-x-large` | 1.5rem (24px) | <span style="font-size: var(--sl-font-size-x-large)">Aa</span> |
| `--sl-font-size-xx-large` | 2.25rem (36px) | <span style="font-size: var(--sl-font-size-xx-large)">Aa</span> |
| `--sl-font-size-xxx-large` | 3rem (48px) | <span style="font-size: var(--sl-font-size-xxx-large)">Aa</span> |
| `--sl-font-size-xxxx-large` | 4.5rem (72px) | <span style="font-size: var(--sl-font-size-xxxx-large)">Aa</span> |
## Font Weight
| Token | Value | Example |
| --------------------------- | ----- | --------------------------------------------------------------------------------------------------------------- |
| `--sl-font-weight-light` | 300 | <span style="font-weight: var(--sl-font-weight-light);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-normal` | 400 | <span style="font-weight: var(--sl-font-weight-normal);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-semibold` | 500 | <span style="font-weight: var(--sl-font-weight-semibold);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-font-weight-bold` | 700 | <span style="font-weight: var(--sl-font-weight-bold);">The quick brown fox jumped over the lazy dog.</span> |
## Letter Spacing
| Token | Value | Example |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `--sl-letter-spacing-dense` | -0.015em | <span style="letter-spacing: var(--sl-letter-spacing-dense);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-letter-spacing-normal` | normal | <span style="letter-spacing: var(--sl-letter-spacing-normal);">The quick brown fox jumped over the lazy dog.</span> |
| `--sl-letter-spacing-loose` | 0.075em | <span style="letter-spacing: var(--sl-letter-spacing-loose);">The quick brown fox jumped over the lazy dog.</span> |
## Line Height
| Token | Value | Example |
| ------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--sl-line-height-dense` | 1.4 | <div style="line-height: var(--sl-line-height-dense);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |
| `--sl-line-height-normal` | 1.8 | <div style="line-height: var(--sl-line-height-normal);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |
| `--sl-line-height-loose` | 2.2 | <div style="line-height: var(--sl-line-height-loose);">The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.<br>The quick brown fox jumped over the lazy dog.</div> |

View File

@@ -1,11 +0,0 @@
# Z-Index Tokens
Z-indexes are used to stack components in a logical manner.
| Token | Value |
| ---------------------------- | ----- |
| `--sl-z-index-drawer` | 700 |
| `--sl-z-index-dialog` | 800 |
| `--sl-z-index-dropdown` | 900 |
| `--sl-z-index-alert-group` | 950 |
| `--sl-z-index-tooltip` | 1000 |

View File

@@ -1,134 +0,0 @@
# Integrating with NextJS
This page explains how to integrate Shoelace with a NextJS app. This is a community-maintained document. For questions about this integration, please [ask the community](/resources/community).
## Requirements
This integration has been tested with the following:
- Node >= 12.10
- NextJS >= 10.0.5
## Instructions
To get started using Shoelace with NextJS, the following packages must be installed.
```bash
yarn add @shoelace-style/shoelace @shoelace-style/react-wrapper copy-webpack-plugin
```
### Importing the Default Theme
The next step is to import Shoelace's default theme (stylesheet) in your `_app.js` file:
```css
@import '~@shoelace-style/shoelace/dist/themes/base';
```
### Defining Custom Elements
After importing the theme, you'll need to import the JavaScript files for Shoelace. However, this is a bit tricky to do in NextJS thanks to the SSR environment not having any of the required browser APIs to define endpoints.
We'll want to create a component that uses [React's `useLayoutEffect`](https://reactjs.org/docs/hooks-reference.html#uselayouteffect) to add in the custom components before the first render:
```javascript
function CustomEls({ URL }) {
// useRef to avoid re-renders
const customEls = useRef(false);
useLayoutEffect(() => {
if (customEls.current) {
return;
}
setBasePath(`${URL}/static/static`);
// Define the components you intend to use
customElements.define("sl-alert", SlAlert);
customElements.define("sl-button", SlButton);
// ...
customEls.current = true;
}, [URL, customEls]);
return null;
}
```
?> If we use `useEffect` instead of `useLayoutEffect`, the initial render will occur with the expected `sl-` props applied, but the subsequent render (caused by the `useEffect`) will remove those props as the custom components initialize. We _must_ use `useLayoutEffect` to have expected behavior
?> This will import all Shoelace components for convenience. To selectively import components, refer to the [Using webpack](/getting-started/installation?id=using-webpack) section of the docs.
You may be wondering where the `URL` property is coming from. We'll address that in the next few sections.
### Using Our New Component In Code
While we need to use `useLayoutEffect` for the initial render, NextJS will throw a warning at us for trying to use `useLayoutEffect` in SSR, which is disallowed. To fix this problem, we'll conditionally render the `CustomEls` component to only render in the browser
```javascript
function MyApp({ Component, pageProps, URL }) {
return (
<>
{process.browser && <CustomEls URL={URL} />}
<Component {...pageProps} />
</>
)
}
```
### Environmental Variable
However, to make `setBasePath()` work as-expected, we need to know where the file is hosted. To do this, we need to set [environmental variables](https://nextjs.org/docs/basic-features/environment-variables). Create a `.local.env` file and put the following inside:
```
BASE_URL="localhost:3000"
```
Then, modify your `MyApp` class in `_app.js` to pass this process environment into your render:
```javascript
MyApp.getInitialProps = async (context) => {
const URL = process.env.BASE_URL;
return {
URL,
};
};
```
?> You'll need to set this `BASE_URL` variable inside the build process of whatever local build or CI/CD you have. This will need to be an absolute URL, as a relative URL will cause shoelace to throw a warning
### webpack Config
Next we need to add Shoelace's assets to the final build output. To do this, modify `next.config.js` to look like this.
```javascript
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
webpack: (config) => {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: path.resolve(
__dirname,
"node_modules/@shoelace-style/shoelace/dist/assets"
),
to: path.resolve(__dirname, "static/assets"),
},
],
})
);
return config;
},
};
```
?> This will copy the files from `node_modules` into your `static` folder on every development serve or build. You may want to avoid commiting these into your repo. To do so, simply add `static/assets` into your `.gitignore` folder
## Additional Resources
- There is a third-party [example repo](https://github.com/crutchcorn/nextjs-shoelace-example), courtesy of [crutchcorn](https://github.com/crutchcorn) available to help you get started.

View File

@@ -1,98 +0,0 @@
# Integrating with Rails
This page explains how to integrate Shoelace with a Rails app. This is a community-maintained document. For questions about this integration, please [ask the community](/resources/community).
## Requirements
This integration has been tested with the following:
- Rails >= 6
- Node >= 12.10
- Webpacker >= 5
## Instructions
To get started using Shoelace with Rails, the following packages must be installed.
```bash
yarn add @shoelace-style/shoelace copy-webpack-plugin
```
### Importing the Default Theme
The next step is to import Shoelace's default theme (stylesheet) in `app/javascript/stylesheets/application.scss`.
```css
@import '~@shoelace-style/shoelace/dist/themes/base';
```
### Importing Required Scripts
After importing the theme, you'll need to import the JavaScript files for Shoelace. Add the following code to `app/javascript/packs/application.js`.
```js
import '../stylesheets/application.scss'
import { setBasePath, SlAlert, SlAnimation, SlButton, ... } from '@shoelace-style/shoelace'
// ...
const rootUrl = document.currentScript.src.replace(/\/packs.*$/, '')
// Path to the assets folder (should be independent from the current script source path
// to work correctly in different environments)
setBasePath(rootUrl + '/packs/js/')
```
### webpack Config
Next we need to add Shoelace's assets to the final build output. To do this, modify `config/webpack/environment.js` to look like this.
```js
const { environment } = require('@rails/webpacker')
// Shoelace config
const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')
// Add shoelace assets to webpack's build process
environment.plugins.append(
'CopyPlugin',
new CopyPlugin({
patterns: [
{
from: path.resolve(
__dirname,
'../../node_modules/@shoelace-style/shoelace/dist/assets'
),
to: path.resolve(__dirname, '../../public/packs/js/assets')
}
]
})
)
module.exports = environment
```
### Adding Pack Tags
The final step is to add the corresponding `pack_tags` to the page. You should have the following `tags` in the `<head>` section of `app/views/layouts/application.html.erb`.
```html
<!DOCTYPE html>
<html>
<head>
<!-- ... -->
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body><%= yield %></body>
</html>
```
Now you can start using Shoelace components with Rails!
## Additional Resources
- There is a third-party [example repo](https://github.com/ParamagicDev/rails-shoelace-example), courtesy of [ParamagicDev](https://github.com/ParamagicDev) available to help you get started.
- If you would like to avoid repeating this process, check out the associated [Railsbyte for Shoelace](https://railsbytes.com/templates/X8BsEb).

Some files were not shown because too many files have changed in this diff Show More