Compare commits

...

1194 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
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
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
lindsaym-fa
c350614e8e touch up tooltip styles 2024-06-11 17:47: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
lindsaym-fa
9e93d178f9 bump up contrast of active rating symbols 2024-06-11 15:31:13 -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
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
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
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
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
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
lindsaym-fa
abc4c4a130 wrap up component groups doc 2024-06-03 12:12:34 -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
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
lindsaym-fa
b621f5c2d0 Merge branch 'next' into theming-boost 2024-05-29 11:24:49 -04:00
lindsaym-fa
fb34961fdf progress documenting and refactoring typography 2024-05-24 18:47:15 -04:00
lindsaym-fa
27ab7ee41b address color doc feedback 2024-05-24 15:26:08 -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
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
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
lindsaym-fa
08f39419a3 progress refactoring color properties 2024-05-21 17:57:38 -04:00
lindsaym-fa
da8e8ad1f6 more progress on color documentation 2024-05-20 18:44:45 -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
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
lindsaym-fa
1d05474b51 redesign checked radio buttons 2024-05-10 17:55:57 -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
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
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
1884 changed files with 59345 additions and 41128 deletions

View File

@@ -1,10 +0,0 @@
.cache
docs/dist
docs/search.json
docs/**/*.min.js
dist
examples
node_modules
src/react
scripts

View File

@@ -1,213 +0,0 @@
/* eslint-env node */
module.exports = {
plugins: [
'@typescript-eslint',
'wc',
'lit',
'lit-a11y',
'chai-expect',
'chai-friendly',
'import',
'sort-imports-es6-autofix'
],
extends: [
'eslint:recommended',
'plugin:wc/recommended',
'plugin:wc/best-practice',
'plugin:lit/recommended',
'plugin:lit-a11y/recommended'
],
env: {
es2021: true,
browser: true
},
parserOptions: {
sourceType: 'module'
},
overrides: [
{
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname
},
files: ['*.ts'],
rules: {
'default-param-last': 'off',
'@typescript-eslint/default-param-last': 'error',
'no-console': 'warn',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'no-implied-eval': 'off',
'no-invalid-this': 'off',
'no-shadow': 'off',
'no-throw-literal': 'off',
'no-unused-expressions': 'off',
'lit-a11y/no-autofocus': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-invalid-this': 'error',
'@typescript-eslint/no-throw-literal': 'error',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false
}
],
'@typescript-eslint/consistent-type-assertions': [
'warn',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never'
}
],
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
'@typescript-eslint/no-invalid-void-type': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unnecessary-qualifier': 'warn',
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/prefer-ts-expect-error': 'warn',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'warn',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/unified-signatures': 'warn',
'@typescript-eslint/array-type': 'warn',
'@typescript-eslint/consistent-type-definitions': ['warn', 'interface'],
'@typescript-eslint/member-delimiter-style': 'warn',
'@typescript-eslint/method-signature-style': 'warn',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/strict-boolean-expressions': 'off'
}
},
{
files: ['**/*.cjs'],
env: {
node: true
}
},
{
extends: ['plugin:chai-expect/recommended', 'plugin:chai-friendly/recommended'],
files: ['*.test.ts'],
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unused-expressions': 'off'
}
}
],
rules: {
'no-template-curly-in-string': 'error',
'array-callback-return': 'error',
'comma-dangle': 'off',
'consistent-return': 'error',
curly: 'off',
'default-param-last': 'error',
eqeqeq: 'error',
'lit-a11y/click-events-have-key-events': 'off',
'no-constructor-return': 'error',
'no-empty-function': 'warn',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-floating-decimal': 'error',
'no-implicit-coercion': 'off',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-return-assign': 'warn',
'no-script-url': 'error',
'no-self-compare': 'warn',
'no-sequences': 'warn',
'no-throw-literal': 'error',
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'warn',
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-useless-return': 'warn',
'prefer-promise-reject-errors': 'error',
radix: 'off',
'require-await': 'error',
'wrap-iife': ['warn', 'inside'],
'no-shadow': 'error',
'no-array-constructor': 'error',
'no-bitwise': 'error',
'no-multi-assign': 'warn',
'no-new-object': 'error',
'no-useless-computed-key': 'warn',
'no-useless-rename': 'warn',
'no-var': 'error',
'prefer-const': 'warn',
'prefer-numeric-literals': 'warn',
'prefer-object-spread': 'warn',
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'prefer-template': 'off',
'no-else-return': 'off',
'func-names': ['warn', 'never'],
'one-var': ['warn', 'never'],
'operator-assignment': 'warn',
'prefer-arrow-callback': 'warn',
'no-restricted-imports': [
'warn',
{
paths: [
{
name: '.',
message: 'Usage of local index imports is not allowed.'
},
{
name: './index',
message: 'Import from the source file instead.'
}
]
}
],
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
pattern: {
js: 'always',
ts: 'never'
}
}
],
'import/no-duplicates': 'warn',
'sort-imports-es6-autofix/sort-imports-es6': [
2,
{
ignoreCase: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
}
],
'wc/guard-super-call': 'off'
}
};

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

View File

@@ -1,30 +0,0 @@
# 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: Node.js CI
on:
push:
branches: [next]
pull_request:
branches: [next]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npx playwright install-deps
- run: npm ci
- run: npm run verify

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

15
.gitignore vendored
View File

@@ -1,11 +1,12 @@
_site
.cache
.DS_Store
package.json
package-lock.json
dist
docs/public/pagefind
dist/
dist-cdn/
node_modules
src/react
cdn
.astro
packages/**/*/src/react
cdn/
yarn.lock
_bundle_
/packages/webawesome-pro
/packages/webawesome-app

View File

@@ -1,28 +0,0 @@
tasks:
- init: npm install && npm run build
command: npm run start
ports:
- port: 3001
onOpen: ignore
- port: 4000-4999
onOpen: open-preview
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: true

View File

@@ -1,15 +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
cspell.json
dist
docs/search.json
src/components/icon/icons
src/react/index.ts
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.json
package-lock.json
tsconfig.json
cdn
_site
packages/**/*/_site
packages/webawesome/docs/assets/scripts/prism-downloaded.js

View File

@@ -3,7 +3,6 @@
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bierner.lit-html",
"bashmish.es6-string-css",
"streetsidesoftware.code-spell-checker"
]
}

View File

@@ -1,6 +1,7 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},

View File

@@ -2,4 +2,4 @@
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

@@ -11,11 +11,11 @@ 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)
---
@@ -25,15 +25,39 @@ Developers can use this documentation to learn how to build Web Awesome from sou
**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 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/).
### Understanding the Web Awesome monorepo
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
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/shoelace/fork) on GitHub, then clone it locally and install dependencies.
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
@@ -43,9 +67,10 @@ 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
```
@@ -56,23 +81,35 @@ This will spin up the dev server. After the initial build, a browser will open a
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
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
Web Awesome is available under the terms of the MIT license.
Web Awesome is available under the terms of the MIT license.

View File

@@ -5,6 +5,7 @@
"allowfullscreen",
"animationend",
"Animista",
"APG",
"apos",
"atrule",
"autocorrect",
@@ -14,17 +15,19 @@
"autoloading",
"autoplay",
"bezier",
"Blockquotes",
"boxicons",
"CACHEABLE",
"callout",
"callouts",
"cdndir",
"canvastext",
"chatbubble",
"checkmark",
"Clippy",
"codebases",
"codepen",
"colocated",
"colorjs",
"colour",
"combobox",
"Commonmark",
@@ -39,12 +42,15 @@
"crutchcorn",
"csspart",
"cssproperty",
"cssstate",
"datetime",
"describedby",
"Docsify",
"dogfood",
"dropdowns",
"easings",
"ecommerce",
"endfor",
"endraw",
"endregion",
"enterkeyhint",
@@ -55,6 +61,9 @@
"exportmaps",
"exportparts",
"fieldsets",
"focusin",
"focusout",
"fontawesome",
"formaction",
"formdata",
"formenctype",
@@ -63,6 +72,7 @@
"formtarget",
"FOUC",
"FOUCE",
"Frontmatter",
"fullscreen",
"gestern",
"giga",
@@ -71,6 +81,7 @@
"haspopup",
"heroicons",
"hexa",
"Hotwire",
"Iconoir",
"Iframes",
"iife",
@@ -79,9 +90,10 @@
"ionicons",
"jsDelivr",
"jsfiddle",
"jsonata",
"keydown",
"keyframes",
"keymaker",
"Konnor",
"Kool",
"labelledby",
"Laravel",
@@ -96,8 +108,10 @@
"Menlo",
"menuitemcheckbox",
"menuitemradio",
"metaframeworks",
"middlewares",
"minlength",
"minmax",
"monospace",
"mousedown",
"mousemove",
@@ -106,11 +120,12 @@
"multiselectable",
"nextjs",
"nocheck",
"noindex",
"noopener",
"noreferrer",
"novalidate",
"npmdir",
"Numberish",
"nums",
"oklab",
"oklch",
"onscrollend",
@@ -119,10 +134,13 @@
"peta",
"petabit",
"Preact",
"preconnect",
"prerendered",
"prismjs",
"progressbar",
"radiogroup",
"Railsbyte",
"referrerpolicy",
"remixicon",
"reregister",
"resizer",
@@ -139,25 +157,31 @@
"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",
@@ -178,9 +202,11 @@
"Vuejs",
"WCAG",
"webawesome",
"webawesomer",
"WEBP",
"Webpacker",
"xmark"
"xmark",
"zoomable"
],
"ignorePaths": [
"package.json",

View File

@@ -1,126 +0,0 @@
import { parse } from 'path';
import { markdown } from './_utils/markdown.js';
import { anchorHeadingsPlugin } from './_utils/anchor-headings.js';
import { codeExamplesPlugin } from './_utils/code-examples.js';
import { copyCodePlugin } from './_utils/copy-code.js';
import { currentLink } from './_utils/current-link.js';
import { highlightCodePlugin } from './_utils/highlight-code.js';
import { formatCodePlugin } from './_utils/format-code.js';
import { replaceTextPlugin } from './_utils/replace-text.js';
import { searchPlugin } from './_utils/search.js';
import { readFile } from 'fs/promises';
import { outlinePlugin } from './_utils/outline.js';
import { getComponents } from './_utils/manifest.js';
import process from 'process';
const packageData = JSON.parse(await readFile('./package.json', 'utf-8'));
const isDeveloping = process.argv.includes('--develop');
export default function (eleventyConfig) {
// Add template data
eleventyConfig.addGlobalData('package', packageData);
// Template filters - {{ content | filter }}
eleventyConfig.addFilter('inlineMarkdown', content => markdown.renderInline(content || ''));
eleventyConfig.addFilter('markdown', content => markdown.render(content || ''));
eleventyConfig.addFilter('stripExtension', string => parse(string).name);
eleventyConfig.addFilter('stripPrefix', content => content.replace(/^wa-/, ''));
eleventyConfig.addFilter('trimPipes', content => {
// Trims whitespace and pipes from the start and end of a string. Useful for CEM types, which can be pipe-delimited.
// With Prettier 3, this means a leading pipe will exist be present when the line wraps.
return typeof content === 'string' ? content.replace(/^(\s|\|)/g, '').replace(/(\s|\|)$/g, '') : content;
});
// Shortcodes - {% shortCode arg1, arg2 %}
eleventyConfig.addShortcode('cdnUrl', location => {
return (
`https://cdn.jsdelivr.net/npm/@shoelace-style/webawesome@${packageData.version}/` + location.replace(/^\//, '')
);
});
// Helpers
eleventyConfig.addNunjucksGlobal('getComponent', tagName => {
const component = getComponents().find(c => c.tagName === tagName);
if (!component) {
throw new Error(
`Unable to find "<${tagName}>". Make sure the file name is the same as the tag name (without prefix).`
);
}
return component;
});
// Use our own markdown instance
eleventyConfig.setLibrary('md', markdown);
// Add anchors to headings
eleventyConfig.addPlugin(anchorHeadingsPlugin({ container: '#content' }));
// Add an outline to the page
eleventyConfig.addPlugin(
outlinePlugin({
container: '#content',
target: '.outline-links',
selector: 'h2, h3',
ifEmpty: doc => {
doc.querySelector('#outline')?.remove();
}
})
);
// Add current link classes
eleventyConfig.addPlugin(currentLink());
// Add code examples for `<code class="example">` blocks
eleventyConfig.addPlugin(codeExamplesPlugin());
// Highlight code blocks with Prism
eleventyConfig.addPlugin(highlightCodePlugin());
// Add copy code buttons to code blocks
eleventyConfig.addPlugin(copyCodePlugin());
// Various text replacements
eleventyConfig.addPlugin(
replaceTextPlugin([
// Replace [issue:1234] with a link to the issue on GitHub
{
replace: /\[pr:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/pull/$1">#$1</a>'
},
// Replace [pr:1234] with a link to the pull request on GitHub
{
replace: /\[issue:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/issues/$1">#$1</a>'
},
// Replace [discuss:1234] with a link to the discussion on GitHub
{
replace: /\[discuss:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/discussions/$1">#$1</a>'
}
])
);
// Build the search index
eleventyConfig.addPlugin(
searchPlugin({
filename: '',
selectorsToIgnore: ['code.example'],
getContent: doc => doc.querySelector('#content')?.textContent ?? ''
})
);
// Production-only plugins
if (!isDeveloping) {
// Run Prettier on each file (prod only because it can be slow)
eleventyConfig.addPlugin(formatCodePlugin());
}
return {
dir: {
includes: '_includes',
layouts: '_layouts'
},
templateFormats: ['njk', 'md']
};
}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
<svg class="logo" xmlns="http://www.w3.org/2000/svg" width="277" height="211" viewBox="0 0 277 211"><g fill="none" fill-rule="evenodd"><path fill="#F6894C" d="M159.275,20.7541243 C159.275,28.4927904 155.035053,35.2422161 148.749528,38.8106604 L193.9,72.6391714 L238.157213,58.6776414 C236.43401,55.6537326 235.45,52.1547058 235.45,48.42629 C235.45,36.96411 244.751396,27.6721657 256.225,27.6721657 C267.698604,27.6721657 277,36.96411 277,48.42629 C277,59.8883646 267.698604,69.1804143 256.225,69.1804143 C255.131246,69.1804143 254.057541,69.0960801 253.00969,68.9332096 L204.251886,193.411571 C200.096886,204.019762 189.858966,211 178.45659,211 L98.5434095,211 C87.1410343,211 76.9031143,204.019762 72.7481143,193.411571 L23.990205,68.9332096 C22.9423008,69.0960801 21.8685432,69.1804143 20.775,69.1804143 C9.30129067,69.1804143 0,59.8883646 0,48.42629 C0,36.96411 9.30129067,27.6721657 20.775,27.6721657 C32.2487093,27.6721657 41.55,36.96411 41.55,48.42629 C41.55,52.1547058 40.5658322,55.6537326 38.842945,58.6776414 L83.1,72.6391714 L128.250472,38.8106604 C121.964947,35.2422161 117.725,28.4927904 117.725,20.7541243 C117.725,9.29194428 127.026396,0 138.5,0 C149.973604,0 159.275,9.29194428 159.275,20.7541243 Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -1,234 +0,0 @@
{# Getting started #}
<h2>Getting Started</h2>
<ul>
<li><a href="/docs/installation">Installation</a></li>
<li><a href="/docs/usage">Usage</a></li>
<li><a href="/docs/themes">Themes</a></li>
<li><a href="/docs/customizing">Customizing</a></li>
<li><a href="/docs/localization">Localization</a></li>
</ul>
{# Experimental #}
<h2>Experimental</h2>
<ul>
<li><a href="/docs/experimental/themer">Theme Builder</a></li>
<li><a href="/docs/experimental/style-guide">Style Guide</a></li>
<li><a href="/docs/experimental/form-validation">Form Validation Styles</a></li>
<li><a href="/docs/experimental/sandbox">Sandbox</a></li>
<li style="margin-top: .5rem;"><wa-switch id="theme-toggle">Dark mode</wa-switch></li>
<script type="module">
// Temporary dark toggle
const toggle = document.getElementById('theme-toggle');
toggle.checked = document.documentElement.classList.contains('wa-theme-default-dark');
toggle.addEventListener('wa-change', () => {
document.documentElement.classList.toggle('wa-theme-default-dark');
localStorage.setItem('theme', toggle.checked ? 'dark' : 'light');
});
</script>
</ul>
{# Resources #}
<h2>Resources</h2>
<ul>
<li><a href="https://github.com/shoelace-style/shoelace/discussions">Help &amp; Support</a></li>
<li><a href="/docs/resources/community">Community</a></li>
<li><a href="/docs/resources/accessibility">Accessibility</a></li>
<li><a href="/docs/resources/contributing">Contributing</a></li>
<li><a href="/docs/resources/changelog">Changelog</a></li>
</ul>
{# Components #}
<h2>Components</h2>
<ul>
<li>
<a href="/docs/components/animated-image">Animated Image</a>
</li>
<li>
<a href="/docs/components/animation">Animation</a>
</li>
<li>
<a href="/docs/components/avatar">Avatar</a>
</li>
<li>
<a href="/docs/components/badge">Badge</a>
</li>
<li>
<a href="/docs/components/breadcrumb">Breadcrumb</a>
<ul>
<li>
<a href="/docs/components/breadcrumb-item">Breadcrumb Item</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/button">Button</a>
</li>
<li>
<a href="/docs/components/button-group">Button Group</a>
</li>
<li>
<a href="/docs/components/callout">Callout</a>
</li>
<li>
<a href="/docs/components/card">Card</a>
</li>
<li>
<a href="/docs/components/carousel">Carousel</a>
<ul>
<li>
<a href="/docs/components/carousel-item">Carousel Item</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/checkbox">Checkbox</a>
</li>
<li>
<a href="/docs/components/color-picker">Color Picker</a>
</li>
<li>
<a href="/docs/components/copy-button">Copy Button</a>
</li>
<li>
<a href="/docs/components/details">Details</a>
</li>
<li>
<a href="/docs/components/dialog">Dialog</a>
</li>
<li>
<a href="/docs/components/divider">Divider</a>
</li>
<li>
<a href="/docs/components/drawer">Drawer</a>
</li>
<li>
<a href="/docs/components/dropdown">Dropdown</a>
</li>
<li>
<a href="/docs/components/format-bytes">Format Bytes</a>
</li>
<li>
<a href="/docs/components/format-date">Format Date</a>
</li>
<li>
<a href="/docs/components/format-number">Format Number</a>
</li>
<li>
<a href="/docs/components/icon">Icon</a>
</li>
<li>
<a href="/docs/components/icon-button">Icon Button</a>
</li>
<li>
<a href="/docs/components/image-comparer">Image Comparer</a>
</li>
<li>
<a href="/docs/components/include">Include</a>
</li>
<li>
<a href="/docs/components/input">Input</a>
</li>
<li>
<a href="/docs/components/menu">Menu</a>
<ul>
<li>
<a href="/docs/components/menu-item">Menu Item</a>
</li>
<li>
<a href="/docs/components/menu-label">Menu Label</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/mutation-observer">Mutation Observer</a>
</li>
<li>
<a href="/docs/components/option">Option</a>
</li>
<li>
<a href="/docs/components/page">Page</a>
</li>
<li>
<a href="/docs/components/popup">Popup</a>
</li>
<li>
<a href="/docs/components/progress-bar">Progress Bar</a>
</li>
<li>
<a href="/docs/components/progress-ring">Progress Ring</a>
</li>
<li>
<a href="/docs/components/qr-code">QR Code</a>
</li>
<li>
<a href="/docs/components/radio-group">Radio Group</a>
<ul>
<li>
<a href="/docs/components/radio">Radio</a>
</li>
<li>
<a href="/docs/components/radio-button">Radio Button</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/range">Range</a>
</li>
<li>
<a href="/docs/components/rating">Rating</a>
</li>
<li>
<a href="/docs/components/relative-time">Relative Time</a>
</li>
<li>
<a href="/docs/components/resize-observer">Resize Observer</a>
</li>
<li>
<a href="/docs/components/select">Select</a>
</li>
<li>
<a href="/docs/components/skeleton">Skeleton</a>
</li>
<li>
<a href="/docs/components/spinner">Spinner</a>
</li>
<li>
<a href="/docs/components/split-panel">Split Panel</a>
</li>
<li>
<a href="/docs/components/switch">Switch</a>
</li>
<li>
<a href="/docs/components/tab-group">Tab Group</a>
<ul>
<li>
<a href="/docs/components/tab">Tab</a>
</li>
<li>
<a href="/docs/components/tab-panel">Tab Panel</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/tag">Tag</a>
</li>
<li>
<a href="/docs/components/textarea">Textarea</a>
</li>
<li>
<a href="/docs/components/tooltip">Tooltip</a>
</li>
<li>
<a href="/docs/components/tree">Tree</a>
<ul>
<li>
<a href="/docs/components/tree-item">Tree Item</a>
</li>
</ul>
</li>
<li>
<a href="/docs/components/visually-hidden">Visually Hidden</a>
</li>
</ul>

View File

@@ -1,32 +0,0 @@
import { parse } from 'node-html-parser';
/**
* Eleventy plugin to add copy buttons to code blocks.
*/
export function copyCodePlugin(options = {}) {
options = {
container: 'body',
...options
};
return function (eleventyConfig) {
eleventyConfig.addTransform('copy-code', content => {
const doc = parse(content, { blockTextElements: { code: true } });
const container = doc.querySelector(options.container);
if (!container) {
return content;
}
// Look for code blocks
container.querySelectorAll('pre > code').forEach(code => {
const pre = code.closest('pre');
// Add a copy button (we set the copy data at runtime to reduce page bloat)
pre.innerHTML = `<wa-copy-button class="copy-button" hoist></wa-copy-button>` + pre.innerHTML;
});
return doc.toString();
});
};
}

View File

@@ -1,71 +0,0 @@
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { readFileSync } from 'fs';
const __dirname = dirname(fileURLToPath(import.meta.url));
const manifest = JSON.parse(readFileSync(resolve(__dirname, '../../dist/custom-elements.json'), 'utf-8'));
/**
* @returns Fetches components from custom-elements.json and returns them in more sane format.
*/
export function getComponents() {
const components = [];
manifest.modules?.forEach(module => {
module.declarations?.forEach(declaration => {
if (declaration.customElement) {
// Generate the dist path based on the src path and attach it to the component
declaration.path = module.path.replace(/^src\//, 'dist/').replace(/\.ts$/, '.js');
// Remove private members and those that lack a description
const members = declaration.members?.filter(member => member.description && member.privacy !== 'private');
const methods = members?.filter(prop => prop.kind === 'method' && prop.privacy !== 'private');
const properties = members?.filter(prop => {
// Look for a corresponding attribute
const attribute = declaration.attributes?.find(attr => attr.fieldName === prop.name);
if (attribute) {
prop.attribute = attribute.name || attribute.fieldName;
}
return prop.kind === 'field' && prop.privacy !== 'private';
});
components.push({
...declaration,
methods,
properties
});
}
});
});
// Build dependency graphs
components.forEach(component => {
const dependencies = [];
// Recursively fetch sub-dependencies
function getDependencies(tag) {
const cmp = components.find(c => c.tagName === tag);
if (!cmp || !Array.isArray(component.dependencies)) {
return;
}
cmp.dependencies?.forEach(dependentTag => {
if (!dependencies.includes(dependentTag)) {
dependencies.push(dependentTag);
}
getDependencies(dependentTag);
});
}
getDependencies(component.tagName);
component.dependencies = dependencies.sort();
});
// Sort by name
return components.sort((a, b) => {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
});
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -1 +0,0 @@
<svg class="logo" xmlns="http://www.w3.org/2000/svg" width="277" height="211" viewBox="0 0 277 211"><g fill="none" fill-rule="evenodd"><path fill="#F6894C" d="M159.275,20.7541243 C159.275,28.4927904 155.035053,35.2422161 148.749528,38.8106604 L193.9,72.6391714 L238.157213,58.6776414 C236.43401,55.6537326 235.45,52.1547058 235.45,48.42629 C235.45,36.96411 244.751396,27.6721657 256.225,27.6721657 C267.698604,27.6721657 277,36.96411 277,48.42629 C277,59.8883646 267.698604,69.1804143 256.225,69.1804143 C255.131246,69.1804143 254.057541,69.0960801 253.00969,68.9332096 L204.251886,193.411571 C200.096886,204.019762 189.858966,211 178.45659,211 L98.5434095,211 C87.1410343,211 76.9031143,204.019762 72.7481143,193.411571 L23.990205,68.9332096 C22.9423008,69.0960801 21.8685432,69.1804143 20.775,69.1804143 C9.30129067,69.1804143 0,59.8883646 0,48.42629 C0,36.96411 9.30129067,27.6721657 20.775,27.6721657 C32.2487093,27.6721657 41.55,36.96411 41.55,48.42629 C41.55,52.1547058 40.5658322,55.6537326 38.842945,58.6776414 L83.1,72.6391714 L128.250472,38.8106604 C121.964947,35.2422161 117.725,28.4927904 117.725,20.7541243 C117.725,9.29194428 127.026396,0 138.5,0 C149.973604,0 159.275,9.29194428 159.275,20.7541243 Z"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.3 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -1,57 +0,0 @@
document.addEventListener('click', event => {
const toggle = event.target?.closest('.code-example-toggle');
const pen = event.target?.closest('.code-example-pen');
// Toggle source
if (toggle) {
const codeExample = toggle.closest('.code-example');
const isOpen = !codeExample.classList.contains('open');
toggle.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
codeExample.classList.toggle('open', isOpen);
}
// Edit in CodePen
if (pen) {
const codeExample = pen.closest('.code-example');
const code = codeExample.querySelector('code');
const version = document.documentElement.dataset.version;
const html =
`<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/webawesome@${version}/dist/webawesome.loader.js"></script>` +
`\n\n` +
`${code.textContent}`;
const css = 'body {\n font: 16px sans-serif;\n padding: 1rem;\n}\n';
const js = '';
const form = document.createElement('form');
form.action = 'https://codepen.io/pen/define';
form.method = 'POST';
form.target = '_blank';
const data = {
title: '',
description: '',
tags: ['webawesome'],
editors: '1000',
head: '<meta name="viewport" content="width=device-width">',
html_classes: '',
css_external: '',
js_external: '',
js_module: true,
js_pre_processor: 'none',
html,
css,
js
};
const input = document.createElement('input');
input.type = 'hidden';
input.name = 'data';
input.value = JSON.stringify(data);
form.append(input);
document.documentElement.append(form);
form.submit();
form.remove();
}
});

View File

@@ -1,15 +0,0 @@
function setCopyValue() {
document.querySelectorAll('.copy-button').forEach(copyButton => {
const pre = copyButton.closest('pre');
const code = pre?.querySelector('code');
if (code) {
copyButton.value = code.textContent;
}
});
}
// Set data for all copy buttons when the page loads
setCopyValue();
document.addEventListener('turbo:load', setCopyValue);

View File

@@ -1,32 +0,0 @@
// Smooth links
document.addEventListener('click', event => {
const link = event.target.closest('a');
const id = (link?.hash ?? '').substr(1);
if (!link || link.getAttribute('data-smooth-link') === 'off') {
return;
}
if (id) {
const target = document.getElementById(id);
const headerHeight = document.querySelector('wa-page > header').clientHeight;
if (target) {
event.preventDefault();
window.scroll({
top: target.offsetTop - headerHeight,
behavior: 'smooth'
});
history.pushState(undefined, undefined, `#${id}`);
}
}
});
// Scroll classes
function updateScrollClass() {
document.body.classList.toggle('scrolled-down', window.scrollY >= 10);
}
window.addEventListener('scroll', updateScrollClass);
window.addEventListener('turbo:render', updateScrollClass);
updateScrollClass();

View File

@@ -1,35 +0,0 @@
import 'https://cdn.jsdelivr.net/npm/@hotwired/turbo@7.3.0/+esm';
if (!window.___turboScrollPositions___) {
window.___turboScrollPositions___ = {};
}
const positions = window.___turboScrollPositions___;
function saveScrollPosition() {
document.querySelectorAll('[data-remember-scroll]').forEach(el => {
if (el.id) {
positions[el.id] = {
top: el.scrollTop,
left: el.scrollLeft
};
} else {
console.warn(`Can't save scroll position for elements without an id.`, el);
}
});
}
function restoreScrollPosition(event) {
const el = event.detail?.newBody || document;
el.querySelectorAll('[data-remember-scroll]').forEach(el => {
if (positions[el.id]) {
el.scrollTop = positions[el.id].top;
el.scrollLeft = positions[el.id].left;
}
});
}
window.addEventListener('turbo:before-cache', saveScrollPosition);
window.addEventListener('turbo:before-render', restoreScrollPosition);
window.addEventListener('turbo:render', restoreScrollPosition);

View File

@@ -1,87 +0,0 @@
.code-example {
border: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
border-radius: var(--wa-corners-m);
color: var(--wa-color-text-normal);
margin-block-end: var(--wa-flow-spacing);
}
.code-example-preview {
padding: 2rem;
border-bottom: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
> :first-child {
margin-block-start: 0;
}
> :last-child {
margin-block-end: 0;
}
}
.code-example-source {
border-bottom: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
}
.code-example:not(.open) .code-example-source {
display: none;
}
.code-example.open .code-example-toggle wa-icon {
rotate: 180deg;
}
.code-example-source pre {
position: relative;
border-radius: 0;
margin: 0;
white-space: normal;
}
.code-example-source:not(:has(+ .code-example-buttons)) {
border-bottom: none;
pre {
border-bottom-right-radius: var(--wa-corners-m);
border-bottom-left-radius: var(--wa-corners-m);
}
}
.code-example-buttons {
display: flex;
align-items: stretch;
button {
all: unset;
flex: 1 0 auto;
font-size: 0.875rem;
color: var(--wa-color-text-quiet);
border-left: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
text-align: center;
padding: 0.5rem;
cursor: pointer;
&:first-of-type {
border-left: none;
border-bottom-left-radius: var(--wa-corners-m);
}
&:last-of-type {
border-bottom-right-radius: var(--wa-corners-m);
}
&:focus-visible {
outline: var(--wa-focus-ring);
}
}
.code-example-pen {
flex: 0 0 100px;
white-space: nowrap;
}
wa-icon {
width: 1em;
height: 1em;
vertical-align: -2px;
}
}

View File

@@ -1,28 +0,0 @@
.copy-button {
position: absolute;
top: 0.25rem;
right: 0.25rem;
font-family: var(--wa-font-family-body);
color: var(--wa-color-neutral-text-on-fill);
background-color: var(--wa-color-neutral-fill-subtle);
border-radius: var(--wa-corners-s);
padding: 0.25rem;
&:hover {
background-color: var(--wa-color-neutral-fill-highlight);
}
&:focus-visible {
outline: var(--wa-focus-ring);
}
}
@media (hover: hover) {
.copy-button:not(:focus-within) {
opacity: 0;
}
pre:hover > .copy-button {
opacity: 1;
}
}

View File

@@ -1,133 +0,0 @@
@import 'code-examples.css';
@import 'code-highlighter.css';
@import 'copy-code.css';
@import 'outline.css';
@import 'search.css';
wa-page[view='desktop'] [data-toggle-nav] {
display: none;
}
/* Header */
wa-page::part(header) {
background-color: var(--wa-color-surface-default);
border-bottom: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
}
wa-page > header {
flex: 1 1 auto;
display: flex;
align-items: center;
max-width: 1200px;
height: 60px;
padding-inline: 2rem;
svg {
width: auto;
max-height: 26px;
}
}
/* Navigation sidebar */
wa-page[view='desktop']::part(navigation) {
border-right: var(--wa-border-style) var(--wa-panel-border-width) var(--wa-color-neutral-border-subtle);
}
wa-page[view='desktop'] > #sidebar {
min-width: 320px;
padding: 2rem;
}
#sidebar,
#outline {
h2 {
font-size: 1.125rem;
margin-block-end: 0.5rem;
}
}
#sidebar nav {
padding-bottom: 1rem;
}
/* Main content */
wa-page > main {
max-width: 80ch;
padding: 2rem;
margin-inline: auto;
}
/* Current link */
#sidebar,
#outline {
.current {
font-weight: var(--wa-font-weight-heavy);
text-decoration-style: solid;
}
}
/* Anchor headings */
.anchor-heading a {
visibility: hidden;
text-decoration: none;
}
@media (hover: hover) {
.anchor-heading:hover a {
visibility: visible;
padding: 0 0.125em;
}
}
/* Callouts */
.callout {
display: flex;
gap: 1rem;
border: var(--wa-border-style) var(--wa-border-width-m);
border-radius: var(--wa-corners-m);
padding: 1rem;
margin-block-end: var(--wa-flow-spacing);
:first-child {
margin-block-start: 0;
}
:last-child {
margin-block-end: 0;
}
}
.callout-icon {
flex: 0 0 auto;
font-size: 1.5rem;
}
.callout-content {
flex: 1 1 auto;
}
.callout-info {
background-color: var(--wa-color-brand-fill-subtle);
border-color: var(--wa-color-brand-border-subtle);
.callout-icon {
color: var(--wa-color-brand-text-on-fill);
}
code {
background-color: var(--wa-color-brand-fill-highlight);
}
}
.callout-warning {
background-color: var(--wa-color-warning-fill-subtle);
border-color: var(--wa-color-warning-border-subtle);
.callout-icon {
color: var(--wa-color-warning-text-on-fill);
}
code {
background-color: var(--wa-color-warning-fill-highlight);
}
}

View File

@@ -1,88 +0,0 @@
---
title: Badge
description: Badges are used to draw attention and display statuses or counts.
layout: component.njk
---
```html {.example}
<wa-badge>Badge</wa-badge>
```
## Examples
### Variants
Set the `variant` attribute to change the badge's variant.
```html {.example}
<wa-badge variant="brand">Brand</wa-badge>
<wa-badge variant="success">Success</wa-badge>
<wa-badge variant="neutral">Neutral</wa-badge>
<wa-badge variant="warning">Warning</wa-badge>
<wa-badge variant="danger">Danger</wa-badge>
```
### Pill Badges
Use the `pill` attribute to give badges rounded edges.
```html {.example}
<wa-badge variant="brand" pill>Brand</wa-badge>
<wa-badge variant="success" pill>Success</wa-badge>
<wa-badge variant="neutral" pill>Neutral</wa-badge>
<wa-badge variant="warning" pill>Warning</wa-badge>
<wa-badge variant="danger" pill>Danger</wa-badge>
```
### Pulsating Badges
Use the `pulse` attribute to draw attention to the badge with a subtle animation.
```html {.example}
<div class="badge-pulse">
<wa-badge variant="brand" pill pulse>1</wa-badge>
<wa-badge variant="success" pill pulse>1</wa-badge>
<wa-badge variant="neutral" pill pulse>1</wa-badge>
<wa-badge variant="warning" pill pulse>1</wa-badge>
<wa-badge variant="danger" pill pulse>1</wa-badge>
</div>
<style>
.badge-pulse wa-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 {.example}
<wa-button>
Requests
<wa-badge pill>30</wa-badge>
</wa-button>
<wa-button style="margin-inline-start: 1rem;">
Warnings
<wa-badge variant="warning" pill>8</wa-badge>
</wa-button>
<wa-button style="margin-inline-start: 1rem;">
Errors
<wa-badge variant="danger" pill>6</wa-badge>
</wa-button>
```
### With Menu Items
When including badges in menu items, use the `suffix` slot to make sure they're aligned correctly.
```html {.example}
<wa-menu style="max-width: 240px;">
<wa-menu-label>Messages</wa-menu-label>
<wa-menu-item>Comments <wa-badge slot="suffix" variant="neutral" pill>4</wa-badge></wa-menu-item>
<wa-menu-item>Replies <wa-badge slot="suffix" variant="neutral" pill>12</wa-badge></wa-menu-item>
</wa-menu>
```

View File

@@ -1,66 +0,0 @@
---
title: Callout
description: Callouts are used to display important messages inline.
layout: component.njk
---
```html {.example}
<wa-callout>
<wa-icon slot="icon" name="circle-info" variant="regular"></wa-icon>
This is a standard callout. You can customize its content and even the icon.
</wa-callout>
```
## Examples
### Variants
Set the `variant` attribute to change the callout's variant.
```html {.example}
<wa-callout variant="brand">
<wa-icon slot="icon" name="circle-info" variant="regular"></wa-icon>
<strong>This is super informative</strong><br />
You can tell by how pretty the callout is.
</wa-callout>
<br />
<wa-callout variant="success">
<wa-icon slot="icon" name="circle-check" variant="regular"></wa-icon>
<strong>Your changes have been saved</strong><br />
You can safely exit the app now.
</wa-callout>
<br />
<wa-callout variant="neutral">
<wa-icon slot="icon" name="gear" variant="regular"></wa-icon>
<strong>Your settings have been updated</strong><br />
Settings will take effect on next login.
</wa-callout>
<br />
<wa-callout variant="warning">
<wa-icon slot="icon" name="triangle-exclamation" variant="regular"></wa-icon>
<strong>Your session has ended</strong><br />
Please login again to continue.
</wa-callout>
<br />
<wa-callout variant="danger">
<wa-icon slot="icon" name="circle-exclamation" variant="regular"></wa-icon>
<strong>Your account has been deleted</strong><br />
We're very sorry to see you go!
</wa-callout>
```
### Without Icons
Icons are optional. Simply omit the `icon` slot if you don't want them.
```html {.example}
<wa-callout variant="brand"> Nothing fancy here, just a simple callout. </wa-callout>
```

View File

@@ -1,141 +0,0 @@
---
title: Card
description: Cards can be used to group related subjects in a container.
layout: component.njk
---
```html {.example}
<wa-card with-image with-footer 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">
<wa-button variant="brand" pill>More Info</wa-button>
<wa-rating></wa-rating>
</div>
</wa-card>
<style>
.card-overview {
max-width: 300px;
}
.card-overview small {
color: var(--wa-color-text-quiet);
}
.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 {.example}
<wa-card class="card-basic">
This is just a basic card. No image, no header, and no footer. Just your content.
</wa-card>
<style>
.card-basic {
max-width: 300px;
}
</style>
```
### Card with Header
Headers can be used to display titles and more. Use the `with-header` attribute to add a header to the card.
```html {.example}
<wa-card with-header class="card-header">
<div slot="header">
Header Title
<wa-icon-button name="gear" variant="solid" label="Settings"></wa-icon-button>
</div>
This card has a header. You can put all sorts of things in it!
</wa-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 wa-icon-button {
font-size: var(--wa-font-size-m);
}
</style>
```
### Card with Footer
Footers can be used to display actions, summaries, or other relevant content. Use the `with-footer` attribute to add a footer to the card.
```html {.example}
<wa-card with-footer class="card-footer">
This card has a footer. You can put all sorts of things in it!
<div slot="footer">
<wa-rating></wa-rating>
<wa-button variant="brand">Preview</wa-button>
</div>
</wa-card>
<style>
.card-footer {
max-width: 300px;
}
.card-footer [slot='footer'] {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
```
### Images
Card images are displayed atop the card and will stretch to fit. Use the `with-image` attribute to add an image to the card.
```html {.example}
<wa-card with-image 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.
</wa-card>
<style>
.card-image {
max-width: 300px;
}
</style>
```

View File

@@ -1,79 +0,0 @@
---
title: Color Picker
description: Color pickers allow the user to select a color.
layout: component.njk
---
```html {.example}
<form>
<wa-color-picker required label="Select a color"></wa-color-picker>
<wa-button type="submit">Submit</wa-button>
</form>
```
:::info
This component works with standard `<form>` elements. Please refer to the section on [form controls](/getting-started/form-controls) to learn more about form submission and client-side validation.
:::
## Examples
### Initial Value
Use the `value` attribute to set an initial value for the color picker.
```html {.example}
<wa-color-picker value="#4a90e2" label="Select a color"></wa-color-picker>
```
### Opacity
Use the `opacity` attribute to enable the opacity slider. When this is enabled, the value will be displayed as HEXA, RGBA, HSLA, or HSVA based on `format`.
```html {.example}
<wa-color-picker value="#f5a623ff" opacity label="Select a color"></wa-color-picker>
```
### Formats
Set the color picker's format with the `format` attribute. Valid options include `hex`, `rgb`, `hsl`, and `hsv`. 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 {.example}
<wa-color-picker format="hex" value="#4a90e2" label="Select a color"></wa-color-picker>
<wa-color-picker format="rgb" value="rgb(80, 227, 194)" label="Select a color"></wa-color-picker>
<wa-color-picker format="hsl" value="hsl(290, 87%, 47%)" label="Select a color"></wa-color-picker>
<wa-color-picker format="hsv" value="hsv(55, 89%, 97%)" label="Select a color"></wa-color-picker>
```
### Swatches
Use the `swatches` attribute to add convenient presets to the color picker. Any format the color picker can parse is acceptable (including CSS color names), but each value must be separated by a semicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript.
```html {.example}
<wa-color-picker
label="Select a color"
swatches="
#d0021b; #f5a623; #f8e71c; #8b572a; #7ed321; #417505; #bd10e0; #9013fe;
#4a90e2; #50e3c2; #b8e986; #000; #444; #888; #ccc; #fff;
"
></wa-color-picker>
```
### Sizes
Use the `size` attribute to change the color picker's trigger size.
```html {.example}
<wa-color-picker size="small" label="Select a color"></wa-color-picker>
<wa-color-picker size="medium" label="Select a color"></wa-color-picker>
<wa-color-picker size="large" label="Select a color"></wa-color-picker>
```
### Inline
The color picker can be rendered inline instead of in a dropdown using the `inline` attribute.
```html {.example}
<wa-color-picker inline label="Select a color"></wa-color-picker>
```

View File

@@ -1,88 +0,0 @@
---
title: Details
description: Details show a brief summary and expand to show additional content.
layout: component.njk
---
<!-- cspell:dictionaries lorem-ipsum -->
```html {.example}
<wa-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.
</wa-details>
```
## Examples
### Disabled
Use the `disable` attribute to prevent the details from expanding.
```html {.example}
<wa-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.
</wa-details>
```
### Customizing the Summary Icon
Use the `expand-icon` and `collapse-icon` slots to change the expand and collapse icons, respectively. To disable the animation, override the `rotate` property on the `summary-icon` part as shown below.
```html {.example}
<wa-details summary="Toggle Me" class="custom-icons">
<wa-icon name="square-plus" slot="expand-icon" variant="regular"></wa-icon>
<wa-icon name="square-minus" slot="collapse-icon" variant="regular"></wa-icon>
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.
</wa-details>
<style>
wa-details.custom-icons::part(summary-icon) {
/* Disable the expand/collapse animation */
rotate: none;
}
</style>
```
### 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 `wa-show` event.
```html {.example}
<div class="details-group-example">
<wa-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.
</wa-details>
<wa-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.
</wa-details>
<wa-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.
</wa-details>
</div>
<script>
const container = document.querySelector('.details-group-example');
// Close all other details when one is shown
container.addEventListener('wa-show', event => {
if (event.target.localName === 'wa-details') {
[...container.querySelectorAll('wa-details')].map(details => (details.open = event.target === details));
}
});
</script>
<style>
.details-group-example wa-details:not(:last-of-type) {
margin-bottom: var(--wa-space-2xs);
}
</style>
```

View File

@@ -1,75 +0,0 @@
---
title: Icon Button
description: Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.
layout: component.njk
---
For a full list of icons that come bundled with Web Awesome, refer to the [icon component](/components/icon).
```html {.example}
<wa-icon-button name="gear" label="Settings"></wa-icon-button>
```
## Examples
### Sizes
Icon buttons inherit their parent element's `font-size`.
```html {.example}
<wa-icon-button name="pen-to-square" variant="solid" label="Edit" style="font-size: 1.5rem;"></wa-icon-button>
<wa-icon-button name="pen-to-square" variant="solid" label="Edit" style="font-size: 2rem;"></wa-icon-button>
<wa-icon-button name="pen-to-square" variant="solid" label="Edit" style="font-size: 2.5rem;"></wa-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 {.example}
<div class="icon-button-color">
<wa-icon-button name="bold" variant="solid" label="Bold"></wa-icon-button>
<wa-icon-button name="italic" variant="solid" label="Italic"></wa-icon-button>
<wa-icon-button name="underline" variant="solid" label="Underline"></wa-icon-button>
</div>
<style>
.icon-button-color wa-icon-button::part(base) {
color: #b00091;
}
.icon-button-color wa-icon-button::part(base):hover,
.icon-button-color wa-icon-button::part(base):focus {
color: #c913aa;
}
.icon-button-color wa-icon-button::part(base):active {
color: #960077;
}
</style>
```
### Link Buttons
Use the `href` attribute to convert the button to a link.
```html {.example}
<wa-icon-button name="gear" variant="solid" label="Settings" href="https://example.com" target="_blank"></wa-icon-button>
```
### Icon Button with Tooltip
Wrap a tooltip around an icon button to provide contextual information to the user.
```html {.example}
<wa-icon-button id="icon-button" name="gear" variant="solid" label="Settings"></wa-icon-button>
<wa-tooltip for="icon-button">Settings</wa-tooltip>
```
### Disabled
Use the `disabled` attribute to disable the icon button.
```html {.example}
<wa-icon-button name="gear" variant="solid" label="Settings" disabled></wa-icon-button>
```

View File

@@ -1,118 +0,0 @@
---
title: Page
description: Layouts offer an easy way to scaffold pages using minimal markup.
layout: 'component.njk'
---
The layout component is designed to power full webpages. It is flexible enough to handle most modern designs and includes a simple mechanism for handling desktop and mobile navigation.
A number of sections are available as part of the layout, most of which are optional. Content is added by [slotting elements](/getting-started/usage/#slots) into various locations.
This component _does not_ implement any [content sectioning](https://developer.mozilla.org/en-US/docs/Web/HTML/Element#content_sectioning) or "semantic elements" internally (such as `<main>`, `<header>`, `<footer>`, etc.). Instead, it is recommended that you slot in content sectioning elements wherever you feel they're appropriate.
## Layout Anatomy
This image depicts the layout's anatomy, including the default positions of each section. The labels represent the [named slots](#slots) you can use to populate them.
Most slots are optional. Slots that have no content will not be shown, allowing you to opt-in to just the sections of the layout you actually need.
![Screenshot of Layout Anatomy showing various slots](/assets/images/layout-anatomy.svg)
:::info
If you're not familiar with how slots work in HTML, you might want to [learn more about slots](/getting-started/usage/#slots) before using this component.
:::
## Sticky Sections
The following sections of the layout are "sticky" by default, meaning they remain in position as the user scrolls.
- `banner`
- `header`
- `sub-header`
- `aside`
- `menu`
This is often desirable, but you can change this behavior using the `disable-sticky` attribute. Use a space-delimited list of names to tell the layout which sections should not be sticky.
```html
<wa-page disable-sticky="header aside"> ... </wa-page>
```
## How to Apply Spacing to Your Layout
The layout component _does not_ apply spacing for you. You can apply the appropriate paddings or margins directly to the elements you slot in to fine tune your spacing needs.
TODO - add example here
When using `<wa-page>`, make sure to zero out all paddings and margins on `<html>` and `<body>`, otherwise you may see unexpected gaps. The following styles are highly recommended when using `<wa-page>`.
```css
html,
body {
min-height: 100%;
height: 100%;
padding: 0;
margin: 0;
}
```
## Skip To Content
The layout provides a "skip to content" link that's visually hidden until the user tabs into it. You don't have to do anything to configure this, unless you want to change the text displayed in the link. In that case, you can slot in your own text using the `skip-to-content` slot.
This example localizes the "skip to content" link for German users.
```html
<wa-page>
...
<span slot="skip-to-content">Zum Inhalt springen</span>
...
</wa-page>
```
## Responsiveness
The layout component tries not to have too many opinions in terms of responsive behaviors — you get to decide with your own CSS and media queries how your content responds! However, the navigation menu _does_ respond by collapsing on smaller screens. The breakpoint at which this occurs is 768px by default, but you can change it using the `mobile-breakpoint` attribute.
```html
<wa-page mobile-breakpoint="600"> ... </wa-page>
```
You can provide a button to toggle the navigation menu anywhere inside the layout by adding the `data-toggle-nav` attribute. (This _does not_ have to be a Web Awesome button.)
```html
<wa-page mobile-breakpoint="600">
...
<wa-button data-toggle-nav>Menu</wa-button>
...
</wa-page>
```
Alternatively, you can apply `nav-state="open"` and `nav-state="closed"` to the layout component to show and hide the navigation, respectively.
```html
<wa-page nav-state="open"> ... </wa-page>
```
## Providing Navigation Items
- TODO - example with navigation items
- TODO - example with`<h2>` and `<a>` as navigation items
## Examples
### Hero Layout
- TODO - Sticky header + main + footer
### Blog Layout
- TODO - Sticky header + main + aside + footer (blog)
### App Layout
- TODO - Menu + main, plus maybe headers and footers in each (app)
### Docs Layout
- TODO - Menu + main + aside + footer (docs)

View File

@@ -1,149 +0,0 @@
---
title: Radio Button
description: Radios buttons allow the user to select a single option from a group using a button-like control.
layout: component.njk
---
Radio buttons are designed to be used with [radio groups](/components/radio-group). When a radio button has focus, the arrow keys can be used to change the selected option just like standard radio controls.
```html {.example}
<wa-radio-group label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2">Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
```
## Examples
### Checked States
To set the initial value and checked state, use the `value` attribute on the containing radio group.
```html {.example}
<wa-radio-group label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2">Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
```
### Disabled
Use the `disabled` attribute to disable a radio button.
```html {.example}
<wa-radio-group label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2" disabled>Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
```
### Sizes
Use the `size` attribute to change a radio button's size.
```html {.example}
<wa-radio-group size="small" label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2">Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
<br />
<wa-radio-group size="medium" label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2">Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
<br />
<wa-radio-group size="large" label="Select an option" name="a" value="1">
<wa-radio-button value="1">Option 1</wa-radio-button>
<wa-radio-button value="2">Option 2</wa-radio-button>
<wa-radio-button value="3">Option 3</wa-radio-button>
</wa-radio-group>
```
### Pill Buttons
Use the `pill` attribute to give radio buttons rounded edges.
```html {.example}
<wa-radio-group size="small" label="Select an option" name="a" value="1">
<wa-radio-button pill value="1">Option 1</wa-radio-button>
<wa-radio-button pill value="2">Option 2</wa-radio-button>
<wa-radio-button pill value="3">Option 3</wa-radio-button>
</wa-radio-group>
<br />
<wa-radio-group size="medium" label="Select an option" name="a" value="1">
<wa-radio-button pill value="1">Option 1</wa-radio-button>
<wa-radio-button pill value="2">Option 2</wa-radio-button>
<wa-radio-button pill value="3">Option 3</wa-radio-button>
</wa-radio-group>
<br />
<wa-radio-group size="large" label="Select an option" name="a" value="1">
<wa-radio-button pill value="1">Option 1</wa-radio-button>
<wa-radio-button pill value="2">Option 2</wa-radio-button>
<wa-radio-button pill value="3">Option 3</wa-radio-button>
</wa-radio-group>
```
### Prefix and Suffix Icons
Use the `prefix` and `suffix` slots to add icons.
```html {.example}
<wa-radio-group label="Select an option" name="a" value="1">
<wa-radio-button value="1">
<wa-icon slot="prefix" name="archive" variant="solid"></wa-icon>
Option 1
</wa-radio-button>
<wa-radio-button value="2">
<wa-icon slot="suffix" name="bag-shopping" variant="solid"></wa-icon>
Option 2
</wa-radio-button>
<wa-radio-button value="3">
<wa-icon slot="prefix" name="gift" variant="solid"></wa-icon>
<wa-icon slot="suffix" name="shopping-cart" variant="solid"></wa-icon>
Option 3
</wa-radio-button>
</wa-radio-group>
```
### Buttons with Icons
You can omit button labels and use icons instead. Make sure to set a `label` attribute on each icon so screen readers will announce each option correctly.
```html {.example}
<wa-radio-group label="Select an option" name="a" value="neutral">
<wa-radio-button value="angry">
<wa-icon name="face-angry" variant="solid" label="Angry"></wa-icon>
</wa-radio-button>
<wa-radio-button value="sad">
<wa-icon name="face-frown" variant="solid" label="Sad"></wa-icon>
</wa-radio-button>
<wa-radio-button value="neutral">
<wa-icon name="face-meh" variant="solid" label="Neutral"></wa-icon>
</wa-radio-button>
<wa-radio-button value="happy">
<wa-icon name="face-smile" variant="solid" label="Happy"></wa-icon>
</wa-radio-button>
<wa-radio-button value="laughing">
<wa-icon name="face-laugh" variant="solid" label="Laughing"></wa-icon>
</wa-radio-button>
</wa-radio-group>
```

View File

@@ -1,63 +0,0 @@
---
title: Tag
description: Tags are used as labels to organize things or to indicate a selection.
layout: component.njk
---
```html {.example}
<wa-tag variant="brand">Brand</wa-tag>
<wa-tag variant="success">Success</wa-tag>
<wa-tag variant="neutral">Neutral</wa-tag>
<wa-tag variant="warning">Warning</wa-tag>
<wa-tag variant="danger">Danger</wa-tag>
```
## Examples
### Sizes
Use the `size` attribute to change a tab's size.
```html {.example}
<wa-tag size="small">Small</wa-tag>
<wa-tag size="medium">Medium</wa-tag>
<wa-tag size="large">Large</wa-tag>
```
### Pill
Use the `pill` attribute to give tabs rounded edges.
```html {.example}
<wa-tag size="small" pill>Small</wa-tag>
<wa-tag size="medium" pill>Medium</wa-tag>
<wa-tag size="large" pill>Large</wa-tag>
```
### Removable
Use the `removable` attribute to add a remove button to the tag.
```html {.example}
<div class="tags-removable">
<wa-tag size="small" removable>Small</wa-tag>
<wa-tag size="medium" removable>Medium</wa-tag>
<wa-tag size="large" removable>Large</wa-tag>
</div>
<script>
const div = document.querySelector('.tags-removable');
div.addEventListener('wa-remove', event => {
const tag = event.target;
tag.style.opacity = '0';
setTimeout(() => (tag.style.opacity = '1'), 2000);
});
</script>
<style>
.tags-removable wa-tag {
transition: var(--wa-transition-fast) opacity;
}
</style>
```

View File

@@ -1,45 +0,0 @@
---
title: Visually Hidden
description: The visually hidden utility makes content accessible to assistive devices without displaying it on the screen.
layout: component.njk
---
According to [The A11Y Project](https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/), "there are real world situations where visually hiding content may be appropriate, while the content should remain available to assistive technologies, such as screen readers. For instance, hiding a search field's label as a common magnifying glass icon is used in its stead."
Since visually hidden content can receive focus when tabbing, the element will become visible when something inside receives focus. This behavior is intentional, as sighted keyboard user won't be able to determine where the focus indicator is without it.
```html {.example}
<div style="min-height: 1.875rem;">
<wa-visually-hidden>
<a href="#">Skip to main content</a>
</wa-visually-hidden>
</div>
```
## Examples
### Links That Open in New Windows
In this example, the link will open a new window. Screen readers will announce "opens in a new window" even though the text content isn't visible to sighted users.
```html {.example}
<a href="https://example.com/" target="_blank">
Visit External Page
<wa-icon name="arrow-up-right-from-square" variant="regular"></wa-icon>
<wa-visually-hidden>opens in a new window</wa-visually-hidden>
</a>
```
### Content Conveyed By Context
Adding a label may seem redundant at times, but they're very helpful for unsighted users. Rather than omit them, you can provide context to unsighted users with visually hidden content that will be announced by assistive devices such as screen readers.
```html {.example}
<wa-card style="width: 100%; max-width: 360px;">
<header>
<wa-visually-hidden>Personal Info</wa-visually-hidden>
</header>
<wa-input label="Name" style="margin-bottom: .5rem;"></wa-input>
<wa-input label="Email" type="email"></wa-input>
</wa-card>
```

View File

@@ -1,109 +0,0 @@
---
title: Customizing
description: Learn how to customize Web Awesome through parts and custom properties.
layout: page.njk
---
Web Awesome 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 CSS parts and custom properties to target individual components.
## Design Tokens
Web Awesome 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 [CSS Parts](#css-parts).
Design tokens are accessed through CSS custom properties that are defined in your theme. Because design tokens live at the page level, they're prefixed with `--wa-` to avoid collisions with other libraries.
To customize a design token, simply override it in your stylesheet using a `:root` block. Here's an example that changes the primary theme to purple based on existing [color primitives](/tokens/color#primitives).
```css
:root {
/* Changes the primary theme color to purple using primitives */
--wa-color-primary-50: var(--wa-color-purple-50);
--wa-color-primary-100: var(--wa-color-purple-100);
--wa-color-primary-200: var(--wa-color-purple-200);
--wa-color-primary-300: var(--wa-color-purple-300);
--wa-color-primary-400: var(--wa-color-purple-400);
--wa-color-primary-500: var(--wa-color-purple-500);
--wa-color-primary-600: var(--wa-color-purple-600);
--wa-color-primary-700: var(--wa-color-purple-700);
--wa-color-primary-800: var(--wa-color-purple-800);
--wa-color-primary-900: var(--wa-color-purple-900);
--wa-color-primary-950: var(--wa-color-purple-950);
}
```
Many design tokens are described further along in this documentation. For a complete list, refer to `src/themes/default.css` in the project's [source code](https://github.com/shoelace-style/shoelace/blob/current/src/themes/default.css).
## CSS Parts
Whereas design tokens offer a high-level way to customize the library, CSS parts offer a low-level way to customize individual components. Again, this is done with pure CSS — no preprocessor required.
Web Awesome 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 {.example}
<wa-button class="tomato-button"> Tomato Button </wa-button>
<style>
.tomato-button::part(base) {
background: var(--wa-color-neutral-0);
border: solid 1px tomato;
}
.tomato-button::part(base):hover {
background: rgba(255, 99, 71, 0.1);
}
.tomato-button::part(base):active {
background: rgba(255, 99, 71, 0.2);
}
.tomato-button::part(base):focus-visible {
box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.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 CSS 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 documentation 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 `--wa-` prefix since they're scoped to a component.
You can set custom properties on a component in your stylesheet.
```css
wa-avatar {
--size: 6rem;
}
```
This will also work if you need to target a subset of components with a specific class.
```css
wa-avatar.your-class {
--size: 6rem;
}
```
Alternatively, you can set them inline directly on the element.
```html
<wa-avatar style="--size: 6rem;"></wa-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,4 +0,0 @@
---
title: Patterns
description: TODO
---

View File

@@ -1,166 +0,0 @@
---
title: Theming Sandbox
description: TODO
layout: page.njk
---
## Card
```html {.example}
<wa-card with-image 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">
<wa-button variant="brand" pill>More Info</wa-button>
<wa-rating></wa-rating>
</div>
</wa-card>
<style>
.card-overview {
max-width: 300px;
}
.card-overview small {
color: var(--wa-color-text-quiet);
}
.card-overview [slot='footer'] {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
```
## Alerts
```html {.example}
<wa-callout variant="brand">
<wa-icon slot="icon" name="circle-info" variant="regular"></wa-icon>
<strong>This is super informative</strong><br />
You can tell by how pretty the alert is.
</wa-callout>
<br />
<wa-callout variant="success">
<wa-icon slot="icon" name="circle-check" variant="regular"></wa-icon>
<strong>Your changes have been saved</strong><br />
You can safely exit the app now.
</wa-callout>
<br />
<wa-callout variant="neutral">
<wa-icon slot="icon" name="gear" variant="regular"></wa-icon>
<strong>Your settings have been updated</strong><br />
Settings will take affect on next login.
</wa-callout>
<br />
<wa-callout variant="warning">
<wa-icon slot="icon" name="triangle-exclamation" variant="regular"></wa-icon>
<strong>Your session has ended</strong><br />
Please login again to continue.
</wa-callout>
<br />
<wa-callout variant="danger">
<wa-icon slot="icon" name="circle-exclamation" variant="regular"></wa-icon>
<strong>Your account has been deleted</strong><br />
We're very sorry to see you go!
</wa-callout>
```
## Badges and Tags
```html {.example}
<wa-badge variant="brand">Brand</wa-badge>
<wa-badge variant="success">Success</wa-badge>
<wa-badge variant="neutral">Neutral</wa-badge>
<wa-badge variant="warning">Warning</wa-badge>
<wa-badge variant="danger">Danger</wa-badge>
<br />
<wa-tag variant="brand">Brand</wa-tag>
<wa-tag variant="success">Success</wa-tag>
<wa-tag variant="neutral">Neutral</wa-tag>
<wa-tag variant="warning">Warning</wa-tag>
<wa-tag variant="danger">Danger</wa-tag>
```
## Buttons
```html {.example}
<wa-button variant="brand">Brand</wa-button>
<wa-button variant="success">Success</wa-button>
<wa-button variant="neutral">Neutral</wa-button>
<wa-button variant="warning">Warning</wa-button>
<wa-button variant="danger">Danger</wa-button>
<br /><br />
<wa-button variant="brand" outline>Brand</wa-button>
<wa-button variant="success" outline>Success</wa-button>
<wa-button variant="neutral" outline>Neutral</wa-button>
<wa-button variant="warning" outline>Warning</wa-button>
<wa-button variant="danger" outline>Danger</wa-button>
<br /><br />
<wa-button variant="text">Brand</wa-button>
```
## Form controls
```html {.example}
<wa-checkbox>Unchecked</wa-checkbox>
<br />
<wa-checkbox checked>Checked</wa-checkbox>
<br /><br />
<wa-radio-group label="Radio" name="a" value="1">
<wa-radio value="1">Option 1</wa-radio>
<wa-radio value="2">Option 2</wa-radio>
<wa-radio value="3">Option 3</wa-radio>
</wa-radio-group>
<br />
<wa-switch>Switch off</wa-switch>
<br />
<wa-switch checked>Switch on</wa-switch>
<br /><br />
<wa-input label="Label" help-text="Super helpful and/or contextual content" placeholder="Placeholder"></wa-input>
<br />
<wa-select label="Select">
<wa-option value="option-1">Option 1</wa-option>
<wa-option value="option-2">Option 2</wa-option>
<wa-option value="option-3">Option 3</wa-option>
<wa-option value="option-4">Option 4</wa-option>
<wa-option value="option-5">Option 5</wa-option>
<wa-option value="option-6">Option 6</wa-option>
</wa-select>
```
## Progress
```html {.example}
<wa-progress-ring value="25" style="--indicator-width: 4px;"></wa-progress-ring>
<wa-progress-bar value="60"></wa-progress-bar>
<wa-spinner></wa-spinner>
```
## Shadows
```html {.example}
<style>
div.shadow {
border: 1px solid var(--wa-color-surface-border);
border-radius: var(--wa-corners-s);
display: inline-block;
height: 4rem;
margin-right: 2rem;
width: 4rem;
}
</style>
<div class="shadow" style="box-shadow: var(--wa-shadow-inset);"></div>
<div class="shadow" style="box-shadow: var(--wa-shadow-level-1);"></div>
<div class="shadow" style="box-shadow: var(--wa-shadow-level-2);"></div>
<div class="shadow" style="box-shadow: var(--wa-shadow-level-3);"></div>
```

View File

@@ -1,165 +0,0 @@
---
title: Style Guide
description: TODO
layout: page.njk
---
The styles shown below can be all yours by adding Web Awesome's applied stylesheet to your project.
---
## Typography
Vel risus commodo viverra maecenas accumsan lacus vel facilisis volutpat. Amet mauris commodo quis imperdiet. Bibendum ut tristique et egestas quis ipsum suspendisse. Sit amet nulla facilisi morbi tempus iaculis urna id volutpat.
Cras pulvinar mattis nunc sed blandit libero. Facilisis magna etiam tempor orci. Scelerisque eleifend donec pretium vulputate sapien nec. Donec et odio pellentesque diam volutpat commodo sed egestas egestas. Mauris rhoncus aenean vel elit scelerisque mauris pellentesque.
> What is a Web year now, about three months? And when people can browse around, discover new things, and download them fast, when we all have agents - then Web years could slip by before human beings can notice.
>
> — Tim Berners-Lee
## Inline Text
```html
Feugiat nisl pretium fusce id. Ipsum dolor sit amet consectetur adipiscing elit. Eget nunc lobortis mattis aliquam faucibus purus. Metus dictum at tempor commodo ullamcorper a lacus vestibulum. Urna condimentum mattis pellentesque id nibh tortor id.
```
<div class="docs-grid">
<p><strong>Bold</strong></p>
<p><em>Italics</em></p>
<p><u>Underline</u></p>
<p><del>Deleted</del></p>
<p><ins>Inserted</ins></p>
<p><s>Strike-through</s></p>
<p><small>Small</small></p>
<p><span>Text <sub>Sub</sub></span></p>
<p><span>Text <sup>Sup</sup></span></p>
<p><abbr title="Abbreviation">Abbr.</abbr></p>
<p><kbd>Keyboard</kbd></p>
<p><mark>Highlighted</mark></p>
<p><a href="#">Link text</a></p>
<p><code>Inline code</code></p>
</div>
## Lists
- List item 1
- List item 2
- List item 3
- Subitem a
- Subitem b
1. List item 1
2. List item 2
3. List item 3
- Subitem a
- Subitem b
## Headings
### Heading 3
Feugiat nisl pretium fusce id. Ipsum dolor sit amet consectetur adipiscing elit. Eget nunc lobortis mattis aliquam faucibus purus. Metus dictum at tempor commodo ullamcorper a lacus vestibulum. Urna condimentum mattis pellentesque id nibh tortor id.
#### Heading 4
Gravida arcu ac tortor dignissim convallis aenean. Pellentesque pulvinar pellentesque habitant morbi tristique senectus et. Ipsum nunc aliquet bibendum enim facilisis gravida neque. Donec adipiscing tristique risus nec feugiat in.
##### Heading 5
Enim diam vulputate ut pharetra sit. Enim facilisis gravida neque convallis a cras. Enim neque volutpat ac tincidunt vitae semper. Sed egestas egestas fringilla phasellus faucibus scelerisque eleifend donec pretium.
###### Heading 6
Tincidunt ornare massa eget egestas purus viverra accumsan in nisl. Facilisis mauris sit amet massa vitae. Nunc faucibus a pellentesque sit amet porttitor. Adipiscing tristique risus nec feugiat in fermentum.
## Details
Individual details look like this.
<details>
<summary>Tincidunt nunc pulvinar</summary>
<p>Ut lectus arcu bibendum at varius. Convallis a cras semper auctor neque vitae. Odio pellentesque diam volutpat commodo sed egestas. Amet dictum sit amet justo donec enim diam vulputate ut.</p>
</details>
Grouping them provides accordion-style functionality.
<details>
<summary>Enim diam</summary>
<p>Nunc faucibus a pellentesque sit amet porttitor. Adipiscing tristique risus nec feugiat in fermentum. Leo duis ut diam quam nulla porttitor massa id. Mauris nunc congue nisi vitae.</p>
</details>
<details>
<summary>Arcu non odio</summary>
<p>Sed libero enim sed faucibus turpis in eu mi bibendum. Nunc mi ipsum faucibus vitae aliquet nec. Ultricies tristique nulla aliquet enim tortor. Tellus at urna condimentum mattis pellentesque.</p>
</details>
<details>
<summary>Ut porttitor</summary>
<p>Eu facilisis sed odio morbi quis commodo odio aenean sed. Sit amet purus gravida quis blandit turpis cursus. Eu consequat ac felis donec et odio pellentesque diam volutpat.</p>
</details>
## Code Blocks
```
// do a thing
export function thing() {
return true;
}
```
## Images
![A gray kitten lays next to a toy](https://images.unsplash.com/photo-1620196244888-d31ff5bbf163?q=80&w=1000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)
## Tables
<table>
<caption>I'm just a table</caption>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
## Definition Lists
<dl>
<dt>Definition 1</dt>
<dd>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.</dd>
<dt>Definition 2</dt>
<dd>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</dd>
<dt>Definition 3</dt>
<dd>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</dd>
</dl>

View File

@@ -1,209 +0,0 @@
---
title: Installation
description: Choose the installation method that works best for you.
layout: page.njk
---
You can load Web Awesome via CDN or by installing it locally. If you're using a framework, make sure to check out the pages for [React](/frameworks/react), [Vue](/frameworks/vue), and [Angular](/frameworks/angular) for additional information.
## CDN Installation (Easiest)
<wa-tab-group>
<wa-tab slot="nav" panel="autoloader" active>Autoloader</wa-tab>
<wa-tab slot="nav" panel="traditional">Traditional Loader</wa-tab>
<wa-tab-panel name="autoloader">
The experimental autoloader is the easiest and most efficient way to use Web Awesome. A lightweight script watches the DOM for unregistered Web Awesome elements and lazy loads them for you — even if they're added dynamically.
While convenient, autoloading may lead to a [Flash of Undefined Custom Elements](https://www.abeautifulsite.net/posts/flash-of-undefined-custom-elements/). The linked article describes some ways to alleviate it.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/default.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/autoloader.js"></script>
```
</wa-tab-panel>
<wa-tab-panel name="traditional">
The traditional CDN loader registers all Web Awesome elements up front. Note that, if you're only using a handful of components, it will be much more efficient to stick with the autoloader. However, you can also [cherry pick](#cherry-picking) components if you want to load specific ones up front.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/default.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/autoloader.js" ></script>
```
</wa-tab-panel>
</wa-tab-group>
### Dark Theme
The code above will load the light theme. If you want to use the [dark theme](/getting-started/themes#dark-theme) instead, update the stylesheet as shown below and add `<html class="wa-theme-default-dark">` to your page.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/dark.css" />
```
### Light & Dark Theme
If you want to load the light or dark theme based on the user's `prefers-color-scheme` setting, use the stylesheets below. The `media` attributes ensure that only the user's preferred theme stylesheet loads and the `onload` attribute sets the appropriate [theme class](/getting-started/themes) on the `<html>` element.
```html
<link
rel="stylesheet"
media="(prefers-color-scheme:light)"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/default.css"
/>
<link
rel="stylesheet"
media="(prefers-color-scheme:dark)"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/dark.css"
onload="document.documentElement.classList.add('wa-theme-default-dark');"
/>
```
Now you can [start using Web Awesome!](/getting-started/usage)
## npm installation
If you don't want to use the CDN, you can install Web Awesome from npm 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 `/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="/shoelace/%NPMDIR%/themes/default.css" />
<script type="module" src="/shoelace/%NPMDIR%/autoloader.js"></script>
```
Alternatively, [you can use a bundler](#bundling).
:::info
For clarity, the docs will usually show imports from `@shoelace-style/shoelace`. If you're not using a module resolver or bundler, you'll need to adjust these paths to point to the folder Web Awesome is in.
:::
## Setting the Base Path
Some components rely on assets (icons, images, etc.) and Web Awesome needs to know where they're located. For convenience, Web Awesome will try to auto-detect the correct location based on the script you've loaded it from. This assumes assets are colocated with `autoloader.js` and will "just work" for most users.
However, if you're [cherry picking](#cherry-picking) or [bundling](#bundling) Web Awesome, you'll need to set the base path. You can do this one of two ways.
```html
<!-- Option 1: the data-webawesome attribute -->
<script src="bundle.js" data-webawesome="/path/to/web-awesome/%NPMDIR%"></script>
<!-- Option 2: the setBasePath() method -->
<script type="module">
import { setBasePath } from '/path/to/web-awesome/%NPMDIR%/webawesome.js';
setBasePath('/path/to/web-awesome/%NPMDIR%');
</script>
```
:::info
An easy way to make sure the base path is configured properly is to check if [icons](/components/icon) are loading.
:::
### Referencing Assets
Most of the magic behind assets is handled internally by Web Awesome, but if you need to reference the base path for any reason, the same module exports a function called `getBasePath()`. An optional string argument can be passed, allowing you to get the full path to any asset.
```html
<script type="module">
import { getBasePath, setBasePath } from '/path/to/web-awesome/%NPMDIR%/webawesome.js';
setBasePath('/path/to/assets');
// ...
// Get the base path, e.g. /path/to/assets
const basePath = getBasePath();
// Get the path to an asset, e.g. /path/to/assets/file.ext
const assetPath = getBasePath('file.ext');
</script>
```
## Setting a Kit Code
Font Awesome users can set their kit code to unlock Font Awesome Pro icons. You can provide it through the `data-fa-kit-code` attribute or by calling the `setKitCode()` method.
```html
<!-- Option 1: the data-fa-kit-code attribute -->
<script src="bundle.js" data-fa-kit-code="abc123"></script>
<!-- Option 2: the setKitCode() method -->
<script type="module">
import { setKitCode } from '/path/to/web-awesome/%NPMDIR%/webawesome.js';
setBasePath('/path/to/web-awesome/%NPMDIR%');
</script>
```
## Cherry Picking
Cherry picking can be done from [the CDN](#cdn-installation-easiest) or from [npm](#npm-installation). This approach will load only the components you need up front, while limiting the number of files the browser has to download. The disadvantage is that you need to import each individual component.
Here's an example that loads only the button component. Again, if you're not using a module resolver, you'll need to adjust the path to point to the folder Web Awesome is in.
```html
<link rel="stylesheet" href="/path/to/web-awesome/%NPMDIR%/themes/default.css" />
<script type="module" data-webawesome="/path/to/web-awesome/%NPMDIR%">
import '/path/to/web-awesome/%NPMDIR%/components/button/button.js';
// <wa-button> is ready to use!
</script>
```
You can copy and paste the code to import a component from the "Importing" section of the component's documentation. Note that some components have dependencies that are automatically imported when you cherry pick. If a component has dependencies, they will be listed in the "Dependencies" section of its docs.
:::warning
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
Web Awesome 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 Web Awesome with a bundler, first install Web Awesome along with your bundler of choice.
```bash
npm install @shoelace-style/webawesome
```
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 Web Awesome components and utilities.
```js
import '/path/to/web-awesome/%NPMDIR%/themes/default.css';
import '/path/to/web-awesome/%NPMDIR%/components/button/button.js';
import '/path/to/web-awesome/%NPMDIR%/components/icon/icon.js';
import '/path/to/web-awesome/%NPMDIR%/components/input/input.js';
import '/path/to/web-awesome/%NPMDIR%/components/rating/rating.js';
import { setBasePath } from '/path/to/web-awesome/%NPMDIR%/webawesome.js';
// Set the base path to the folder you copied Web Awesome's assets to
setBasePath('/path/to/web-awesome/%NPMDIR%');
// <wa-button>, <wa-icon>, <wa-input>, and <wa-rating> are ready to use!
```
## The difference between CDN and npm
You'll notice that the CDN links all start with `/%CDNDIR%/<path>` and npm imports use `/%NPMDIR%/<path>`. The `/%CDNDIR%` files are bundled separately from the `/%NPMDIR%` files. The `/%CDNDIR%` files come pre-bundled, which means all dependencies are inlined so you do not need to worry about loading additional libraries. The `/%NPMDIR%` files **DO NOT** come pre-bundled, allowing your bundler of choice to more efficiently deduplicate dependencies, resulting in smaller bundles and optimal code sharing.
TL;DR:
- `/path/to/web-awesome/%CDNDIR%` is for CDN users
- `/path/to/web-awesome/%NPMDIR%` is for npm users
This change was introduced in `v2.5.0` to address issues around installations from npm loading multiple versions of libraries (such as the Lit) that Web Awesome uses internally.

View File

@@ -1,4 +0,0 @@
---
title: App
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Blog
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Business
description: TODO
---

View File

@@ -1,717 +0,0 @@
---
title: E-commerce
description: TODO
layout: page.njk
---
TODO Page Description
## Examples
### Slide Over
```html {.example}
<wa-card class="card-header" style="width: 500px;">
<div slot="header">
<strong>Shopping Cart</strong>
<wa-icon-button name="close" variant="solid" label="Settings"></wa-icon-button>
</div>
<section class="cart-item">
<img src="https://source.unsplash.com/white-and-red-nike-air-force-1-high--iJgjj33eEk" alt="" width="300">
<div>
<div style="display:flex; justify-content: space-between; font-weight: 600;">
<span>AJ1</span>
<span>$170.00</span>
</div>
<div style="font-size: small;">Off-white Jordan One</div>
<div style="display:flex; justify-content: space-between; align-items: center;">
<span>Qty: 1</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<section class="cart-item">
<img src="https://source.unsplash.com/smiling-woman-in-black-and-white-print-t-shirt-VW5VjskNXZ8" alt="" width="300">
<div>
<div style="display:flex; justify-content: space-between; font-weight: 600;">
<span>The Trails</span>
<span>$35.00</span>
</div>
<div style="font-size: small;">50/50 Cotton Poly Blend</div>
<div style="display:flex; justify-content: space-between; align-items: center;">
<span>Qty: 1</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<section class="cart-item">
<img src="https://source.unsplash.com/man-standing-in-front-of-door-dG4Eb_oC5iM" alt="" width="300">
<div>
<div style="display:flex; justify-content: space-between; font-weight: 600;">
<span>Outcast</span>
<span>$27.00</span>
</div>
<div style="font-size: small;">100% Cotton</div>
<div style="display:flex; justify-content: space-between; align-items: center;">
<span>Qty: 1</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<div slot="footer">
<div style="display:flex; justify-content: space-between; font-weight: 600;">
<span>Subtotal</span>
<span>$232.00</span>
</div>
<div style="font-size: small; margin-bottom: 1rem;">Shipping and taxes calculated at checkout.</div>
<wa-button size="medium" variant="brand" style="width: 100%; margin-bottom: 1rem;">Medium</wa-button>
or <a href="#">Continue shopping <wa-icon-button name="arrow-right" variant="solid" label="Settings"></wa-icon-button></a>
</div>
</wa-card>
<style>
.card-header [slot='header'] {
display: flex;
align-items: center;
justify-content: space-between;
}
.card-header h3 {
margin: 0;
}
.card-header wa-icon-button {
font-size: var(--wa-font-size-m);
}
.cart-item {
display: flex;
gap: 2rem;
margin-bottom: 1rem;
&:not(:last-of-type) {
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
img {
width: 6rem;
flex-grow: 1;
}
div {
flex-grow: 11;
}
}
</style>
```
### Two Column Cart
```html {.example}
<div class="two-column">
<h1>Shopping Cart</h1>
<div class="first-column">
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/white-crew-neck-t-shirt-acn5ERAeSb4" alt="" width="300">
<div class="cart-item-info">
<div class="cart-item-meta">
<div>
<span style="font-size: larger">Classic</span>
<div>White - L</div>
<span style="font-size: larger">$15.00</span>
</div>
<wa-select placeholder="1">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
<wa-icon-button name="close" variant="solid" label="Settings"></wa-icon-button>
</div>
<div style="display: flex;justify-content: flex-start;align-items: baseline;">
<wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock
</div>
</div>
</section>
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/blue-and-white-checkered-dress-shirt-RqYTuWkTdEs" alt="" width="300">
<div class="cart-item-info">
<div class="cart-item-meta">
<div>
<span style="font-size: larger">Button Up</span>
<div>Blue - L</div>
<span style="font-size: larger">$20.00</span>
</div>
<wa-select placeholder="1">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
<wa-icon-button name="close" variant="solid" label="Settings"></wa-icon-button>
</div>
<div style="display: flex;justify-content: flex-start;align-items: baseline;">
<wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock
</div>
</div>
</section>
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/white-and-blue-cat-printed-crew-neck-t-shirt-fEt6Wd4t4j0" alt="" width="300">
<div class="cart-item-info">
<div class="cart-item-meta">
<div>
<span style="font-size: larger">Kitten</span>
<div>Egg - L</div>
<span style="font-size: larger">$20.00</span>
</div>
<wa-select placeholder="1">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
<wa-icon-button name="close" variant="solid" label="Settings"></wa-icon-button>
</div>
<div style="display: flex;justify-content: flex-start;align-items: baseline;">
<wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock
</div>
</div>
</section>
</div>
<wa-card class="card-header second-column">
<div slot="header">
Order Summary
</div>
<div style="display:flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem;">
<span>Subtotal</span>
<span>$55.00</span>
</div>
<div style="display:flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem;">
<span>Shipping</span>
<span>$5.00</span>
</div>
<div style="display:flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem;">
<span>Tax</span>
<span>$5.50</span>
</div>
<div style="display:flex; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem;">
<span>Order Total</span>
<span>$65.50</span>
</div>
<wa-button size="medium" variant="brand" style="width: 100%; margin-bottom: 1rem;">Checkout</wa-button>
</wa-card>
<style>
.two-column {
display: grid;
grid-template-columns: repeat(12, 1fr);
column-gap: 1rem;
.first-column {
grid-column: 1/8;
}
.second-column {
grid-column: 8/14
}
.cart-item {
display: grid;
grid-template-columns: 30% 61%;
column-gap: 0.5rem;
margin-bottom: 1rem;
&:not(:last-of-type) {
padding-bottom: 1rem;
border-bottom: 1px solid rgb(48, 50, 59);
}
}
.cart-item-meta {
display: grid;
grid-template-columns: 45% 35% 20%;
column-gap: 1rem;
}
h1 {
width: 100%;
grid-column: 1 / end;
}
}
</style>
</div>
```
### Single Column Cart
```html {.example}
<div class="single-column">
<h1>Shopping Cart</h1>
<div class="first-half half">
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/black-convertible-coupe-0CZwuZhiC84" alt="" >
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>Convertible</strong></span>
<span>$32.00</span>
</span>
<div>Eggplant</div>
<div style="display: flex;justify-content: space-between;align-items: baseline;">
<span><wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/blue-open-door-pickup-truck-BCKgFzJbwz4" alt="" >
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>Pickup</strong></span>
<span>$32.00</span>
</span>
<div>Sky Blue</div>
<div style="display: flex;justify-content: space-between;align-items: baseline;">
<span><wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<section class="cart-item">
<img class="cart-item-image" src="https://source.unsplash.com/red-and-white-volkswagen-t-2-scale-model-GlDRYsruYJ8" alt="" >
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>Volkswagon T2</strong></span>
<span>$32.00</span>
</span>
<div>Red/White</div>
<div style="display: flex;justify-content: space-between;align-items: baseline;">
<span><wa-icon name="check" style="color: green; margin-right: 0.5rem;"></wa-icon> In Stock</span>
<wa-button variant="text" size="small">Remove</wa-button>
</div>
</div>
</section>
<div slot="footer">
<div style="display:flex; justify-content: space-between; font-weight: 600;">
<span>Subtotal</span>
<span>$96.00</span>
</div>
<div style="font-size: small; margin-bottom: 1rem;">Shipping and taxes calculated at checkout.</div>
<wa-button size="medium" variant="brand" style="width: 100%; margin-bottom: 1rem;">Medium</wa-button>
or <a href="#">Continue shopping <wa-icon-button name="arrow-right" variant="solid" label="Settings"></wa-icon-button></a>
</div>
</div>
</div>
<style>
.single-column {
.cart-item {
display: grid;
grid-template-columns: repeat(12, 1fr);
column-gap: 1rem;
margin-bottom: 1rem;
&:not(:last-of-type) {
padding-bottom: 1rem;
border-bottom: 1px solid rgb(48, 50, 59);
}
img {
grid-column: 1/4;
width: 100%;
object-fit: cover;
height: 90px;
}
div {
grid-column: 4/-1;
align-content: center;
}
}
}
</style>
```
### Product Quickview
```html {.example}
<wa-card class="card-header">
<div slot="header">
<strong>Quickview</strong>
<wa-icon-button name="close" variant="solid" label="Settings"></wa-icon-button>
</div>
<div style="
display: grid;
grid-template-columns: 35% 65%;
grid-column-gap: 1rem;
">
<img class="cart-item-image" src="https://source.unsplash.com/white-crew-neck-t-shirt-acn5ERAeSb4" alt="" width="300">
<div>
<h3>Quality Cotton Tee</h3>
<span>$45.00</span>
<div style="display: flex;justify-content: space-between;">
<wa-rating label="Rating" precision="0.5" value="2.5"></wa-rating>
<a href="#">See all ratings</a>
</div>
<wa-radio-group label="Color" name="a" value="1" style="margin-bottom: 1rem">
<wa-radio-button value="1">White</wa-radio-button>
<wa-radio-button value="2">Gray</wa-radio-button>
<wa-radio-button value="3">Black</wa-radio-button>
</wa-radio-group>
<wa-radio-group label="Size" name="a" value="1" style="margin-bottom: 1rem">
<wa-radio-button value="1">Small</wa-radio-button>
<wa-radio-button value="2">Medium</wa-radio-button>
<wa-radio-button value="3">Large</wa-radio-button>
</wa-radio-group>
<wa-button size="medium" variant="brand" style="width: 100%; margin: 1rem 0;">Add to Cart</wa-button>
</div>
</div>
</wa-card>
```
### Product Review
```html {.example}
<div>
<div>
<h2>Customer Reviews</h2>
<div>
<wa-rating label="Rating" precision="0.5" value="2.5"></wa-rating> Based on 1624 reviews
</div>
<div style="margin-bottom: 2rem;">
<span><wa-progress-bar value="50"></wa-progress-bar></span>
<h3>Share your Thoughts</h3>
<p>If youve used this product, share your thoughts with other customers</p>
<wa-button size="medium">Write a Review</wa-button>
</div>
</div>
<div style="margin-top: 1rem;">
<div>
<div style="border-bottom: 1px solid #eee; margin-bottom: 1rem;">
<span style="display: flex; align-items: center;">
<wa-avatar image="https://source.unsplash.com/bman-wearing-henley-top-portrait-7YVZYZeITc8" label="man-wearing-henley" style="margin-right: 1rem;"></wa-avatar>
<span style="display: flex; flex-direction: column">Mark Henry <wa-rating label="Rating" precision="0.5" value="2.5"></wa-rating></span>
</span>
<p><em>I initially had my doubts, but once I got the widgets and played around with them, I became a believer.</em></p>
</div>
<div style="border-bottom: 1px solid #eee; margin-bottom: 1rem;">
<span style="display: flex; align-items: center;">
<wa-avatar image="https://source.unsplash.com/woman-wearing-black-crew-neck-shirt-3TLl_97HNJo" label="lady-in-turtleneck" style="margin-right: 1rem;"></wa-avatar>
<span style="display: flex; flex-direction: column">Liz Michaels <wa-rating label="Rating" precision="0.5" value="2.5"></wa-rating></span>
</span>
<p><em>I'd definitely but these again.</em></p>
</div>
<div style="border-bottom: 1px solid #eee; margin-bottom: 1rem;">
<span style="display: flex; align-items: center;">
<wa-avatar image="https://source.unsplash.com/man-with-index-finger-on-lips-RukI4qZGlQs" label="man-with-hair" style="margin-right: 1rem;"></wa-avatar>
<span style="display: flex; flex-direction: column">Todd Smith <wa-rating label="Rating" precision="0.5" value="2.5"></wa-rating></span>
</span>
<p><em>It was everything I wanted and more, would totally recommend.</em></p>
</div>
</div>
</div>
</div>
```
### Order History
```html {.example}
<div>
<h2>Order History</h2>
<p>Check the status of recent orders, manage returns, and download invoices.</p>
<div class="order-history-meta">
<span class="order-history-meta-item">
<strong>Order number</strong>
<span>WU88191111</span>
</span>
<span class="order-history-meta-item">
<strong>Date placed</strong>
<span>January 22, 2021</span>
</span>
<span class="order-history-meta-item">
<strong>Total amount</strong>
<span>$95.00</span>
</span>
<span style="display: grid;grid-template-columns: 1fr 1fr;column-gap: 1rem;">
<wa-button variant="neutral" outline>View Order</wa-button>
<wa-button variant="neutral" outline>View Invoice</wa-button>
</span>
</div>
<div>
<div class="order-history-list-item" style="align-items: center;">
<img class="cart-item-image" src="https://source.unsplash.com/beige-wooden-bar-stool-4kTbAMRAHtQ" alt="">
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>Kitchen Stool</strong></span>
<span><strong>$55.00</strong></span>
</span>
<p>TODO: add a description</p>
<span>
<a href="#">View Product</a> | <a href="#">Buy Again</a>
</span>
<br/>
<span>Out for Delivery</span>
</div>
</div>
<div class="order-history-list-item" style="margin-top: 1rem; align-items: center;">
<img class="cart-item-image" src="https://source.unsplash.com/green-succulent-in-teal-ceramic-vase-miziNqvJx5M" alt="">
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>Succulent</strong></span>
<span><strong>$5.00</strong></span>
</span>
<p>TODO: add a description</p>
<span>
<a href="#">View Product</a> | <a href="#">Buy Again</a>
</span>
<br/>
<span>Out for Delivery</span>
</div>
</div>
<div class="order-history-list-item" style="margin-top: 1rem; align-items: center;">
<img class="cart-item-image" src="https://source.unsplash.com/battercreek-coffee-pack-rsnzc-8dVs0" alt="">
<div>
<span style="display: flex;justify-content: space-between;">
<span><strong>French Roast</strong></span>
<span><strong>$35.00</strong></span>
</span>
<p>TODO: add a description</p>
<span>
<a href="#">View Product</a> | <a href="#">Buy Again</a>
</span>
<br/>
<span>Out for Delivery</span>
</div>
</div>
</div>
</div>
<style>
.order-history-meta {
display: flex;
justify-content: space-between;
margin-bottom: 1.5rem;
.order-history-meta-item {
display: flex;
flex-direction: column;
}
}
.order-history-list-item {
display: grid;
grid-template-columns: 18% 79%;
column-gap: 1rem;
border-bottom: 1px solid #eee;
padding-bottom: 1rem;
}
</style>
```
### Checkout
```html {.example}
<div class="checkout-form">
<div class="checkout-form-inputs">
<h4 class="full-row" style="margin-top: 0.5rem;">Contact Info</h4>
<wa-input type="email" label="Email Address" class="full-row"></wa-input>
<hr class="full-row" />
<h4 class="full-row" style="margin-top: 0.5rem;">Shipping Information</h4>
<wa-input label="First Name" class="first-half"></wa-input>
<wa-input label="Last Name" class="second-half" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Company" class="full-row" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Address" class="full-row" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="City" class="first-half" style="margin-top: 1.5rem;"></wa-input>
<wa-select label="Country" placeholder="Country" class="second-half" style="margin-top: 1.5rem;">
<wa-option value="option-1">Option 1</wa-option>
<wa-option value="option-2">Option 2</wa-option>
<wa-option value="option-3">Option 3</wa-option>
</wa-select>
<wa-input label="State" class="first-half" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Postal Code" class="second-half" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Phone" class=" full-row" style="margin-top: 1.5rem;"></wa-input>
<hr class="full-row" />
<wa-radio-group label="Delivery Method" help-text="Select an option that makes you proud." name="a" value="1" class="full-row" style="margin-top: 1.5rem;">
<wa-radio-button value="1">Standard</wa-radio-button>
<wa-radio-button value="2">Express</wa-radio-button>
</wa-radio-group>
<hr class="full-row" />
<h4 class="full-row" style="margin-top: 0.5rem;">Payment</h4>
<wa-radio-group label="Select an option" name="a" value="1" class="full-row" style="margin-top: 1.5rem;">
<wa-radio value="1">Credit Card</wa-radio>
<wa-radio value="3">Paypal</wa-radio>
</wa-radio-group>
<wa-input label="Card Number" class="full-row" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Name on Card" class="full-row" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="Expiration Date" class="first-half" style="margin-top: 1.5rem;"></wa-input>
<wa-input label="CVC" class="second-half" style="margin-top: 1.5rem;"></wa-input>
</div>
<div class="checkout-form-summary">
<h4>Order Summary</h4>
<wa-card class="card-basic">
<div class="summary-item">
<img src="https://source.unsplash.com/pair-of-white-and-orange-athletic-shoes-on-white-box-dwKiHoqqxk8">
<div class="summary-item-info">
<span style="display: flex; justify-content: space-between;">
<span class="item-heading">Dolce Runners</span>
<wa-icon-button name="trash" variant="solid" label="Settings"></wa-icon-button>
</span>
<span class="subtle">Cream/Seafoam</span>
<br />
<span class="subtle">12.5</span>
<span style="display:flex;justify-content: space-between; width: 100%;margin: 1rem 0 2rem;">
<span class="item-price">$0.00</span>
<wa-select placeholder="1" style="width: 70px; margin-left: auto">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
</span>
</div>
<hr style="grid-column: 1 / -1;">
</div>
<div class="summary-item">
<img src="https://source.unsplash.com/white-and-brown-nike-sneaker-LV_4qM5Gf9c">
<div class="summary-item-info">
<span style="display: flex; justify-content: space-between;">
<span class="item-heading">Dunk High</span>
<wa-icon-button name="trash" variant="solid" label="Settings"></wa-icon-button>
</span>
<span class="subtle">Sand/Amber/Black</span>
<br />
<span class="subtle">12.5</span>
<span style="display:flex;justify-content: space-between; width: 100%;margin: 1rem 0 2rem;">
<span class="item-price">$180.00</span>
<wa-select placeholder="1" style="width: 70px; margin-left: auto">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
</span>
</div>
<hr style="grid-column: 1 / -1;">
</div>
<div class="summary-item">
<img src="https://source.unsplash.com/black-and-white-new-balance-low-top-sneaker-6zO5VKogoZE">
<div class="summary-item-info">
<span style="display: flex; justify-content: space-between;">
<span class="item-heading">NB Runner</span>
<wa-icon-button name="trash" variant="solid" label="Settings"></wa-icon-button>
</span>
<span class="subtle">Forrest Green</span>
<br />
<span class="subtle">12.5</span>
<span style="display:flex;justify-content: space-between; width: 100%;margin: 1rem 0 2rem;">
<span class="item-price">$48.99</span>
<wa-select placeholder="1" style="width: 70px; margin-left: auto">
<wa-option value="option-1">1</wa-option>
<wa-option value="option-2">2</wa-option>
<wa-option value="option-3">3</wa-option>
</wa-select>
</span>
</div>
<hr style="grid-column: 1 / -1;">
</div>
<wa-button size="medium" variant="brand" style="width: 100%; margin-bottom: 1rem;">Confirm Order</wa-button>
</wa-card>
</div>
</div>
<style>
.checkout-form {
display: grid;
grid-template-columns: 1fr;
grid-column-gap: 1rem;
.checkout-form-inputs {
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-column-gap: 1rem;
}
.summary-item {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-column-gap: 1rem;
img {
grid-column: 1/4;
}
.summary-item-info {
grid-column: 4/12;
}
}
/* & hr {
border-width: 1px;
margin: 1rem 0;
} */
.subtle {
font-size: small;
}
.item-heading {
font-size: large:
}
/* Grid utilities */
.full-row {
grid-column: 1/-1
}
.first-half {
grid-column: 1/4
}
.second-half {
grid-column: 4/7
}
.first-third {
rid-column: 1/3
}
.second-third {
rid-column: 3/5
}
.last-third {
rid-column: 5/7
}
}
</style>
```

View File

@@ -1,4 +0,0 @@
---
title: Entertainment
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Membership
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: News
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Non-profit
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Portfolio
description: TODO
---

View File

@@ -1,4 +0,0 @@
---
title: Product Landing
description: TODO
---

File diff suppressed because it is too large Load Diff

View File

@@ -1,150 +0,0 @@
---
title: Themes
description: Everything you need to know about theming Web Awesome.
layout: page.njk
---
Web Awesome is designed to be highly customizable through pure CSS. Out of the box, you can choose from a light or dark theme. Alternatively, you can design your own theme.
A theme is nothing more than a stylesheet that uses the Web Awesome API to define design tokens and apply custom styles to 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).
:::info
For component developers, built-in themes are also available as JavaScript modules that export [Lit CSSResult](https://lit.dev/docs/api/styles/#CSSResult) objects. You can find them in `/%NPMDIR%/themes/*.styles.js`.
:::
## Theme Basics
All themes are scoped to classes using the `wa-theme-{name}` convention, where `{name}` is a lowercase, hyphen-delimited value representing the name of the theme. The included light and dark themes use `wa-theme-default-light` and `wa-theme-default-dark`, respectively. A custom theme called "Purple Power", for example, would use a class called `wa-theme-purple-power`
All selectors must be scoped to the theme's class to ensure interoperability with other themes. You should also scope them to `:host` so they can be imported and applied to custom element shadow roots.
```css
:host,
.wa-theme-purple-power {
/* ... */
}
```
### Activating Themes
To activate a theme, import it and apply the theme's class to the `<html>` element. This example imports and activates the built-in dark theme.
```html
<html class="wa-theme-default-dark">
<head>
<link rel="stylesheet" href="path/to/shoelace/%NPMDIR%/themes/dark.css" />
</head>
<body>
...
</body>
</html>
```
:::info
There is one exception to this rule — the light theme _does not_ need to be activated. For convenience, the light theme is scoped to `:root` and will be activated by default when imported.
:::
### Using Multiple Themes
You can activate themes on various containers throughout the page. This example uses the light theme with a dark-themed sidebar.
```html
<html>
<head>
<link rel="stylesheet" href="path/to/shoelace/%NPMDIR%/themes/default.css" />
<link rel="stylesheet" href="path/to/shoelace/%NPMDIR%/themes/dark.css" />
</head>
<body>
<nav class="wa-theme-default-dark">
<!-- dark-themed sidebar -->
</nav>
<!-- light-themed content -->
</body>
</html>
```
It's for this reason that themes must be scoped to specific classes.
## Creating Themes
There are two ways to create themes. The easiest way is to customize a built-in theme. The advanced way is to create a new theme from scratch. Which method you choose depends on your project's requirements and the amount of effort you're willing to commit to.
### Customizing a Built-in Theme
The easiest way to customize Web Awesome is to override one of the built-in themes. You can do this by importing the light or dark theme as-is, then creating a separate stylesheet that overrides [design tokens](/getting-started/customizing#design-tokens) and adds [component styles](/getting-started/customizing#component-parts) to your liking. You must import your theme _after_ the built-in theme.
If you're customizing the light theme, you should scope your styles to the following selectors.
```css
:root,
:host,
.wa-theme-default-light {
/* your custom styles here */
}
```
If you're customizing the dark theme, you should scope your styles to the following selectors.
```css
:host,
.wa-theme-default-dark {
/* your custom styles here */
}
```
By customizing a built-in theme, you'll maintain a smaller stylesheet containing only the changes you've made. Contrast this to [creating a new theme](#creating-a-new-theme), where you need to explicitly define every design token required by the library. This approach is more "future-proof," as new design tokens that emerge in subsequent versions of Web Awesome will be accounted for by the built-in theme.
While this approach is easier to maintain, the drawback is that your theme can't be activated independently — it's tied to the built-in theme you're extending.
### Creating a New Theme
Creating a new theme is more of an undertaking than [customizing an existing one](#customizing-a-built-in-theme). At a minimum, you must implement all of the required design tokens. The easiest way to do this is by "forking" one of the built-in themes and modifying it from there.
Start by changing the selector to match your theme's name. Assuming your new theme is called "Purple Power", your theme should be scoped like this.
```css
:host,
.wa-theme-purple-power {
/* your custom styles here */
}
```
By creating a new theme, you won't be relying on a built-in theme as a foundation. Because the theme is decoupled from the built-ins, you can activate it independently as an alternative to the built-ins. This is the recommended approach if you're looking to open source your theme for others to use.
You will, however, need to maintain your theme more carefully, as new versions of Web Awesome may introduce new design tokens that your theme won't have accounted for. Because of this, it's recommended that you clearly specify which version(s) of Web Awesome your theme is designed to work with and keep it up to date as new versions of Web Awesome are released.
## Dark Theme
The built-in dark theme uses an inverted color scale so, if you're using design tokens as intended, you'll get dark mode for free. While this isn't the same as a professionally curated dark theme, it provides an excellent baseline for one and you're encouraged to customize it depending on your needs.
The dark theme works by taking the light theme's [color tokens](/tokens/color) and "flipping" the scale so 100 becomes 900, 200 becomes 800, 300 becomes 700, etc. Next, the luminance of each primitive was fine-tuned to avoid true black, which is often undesirable in dark themes, and provide a richer experience. The result is a custom dark palette that complements the light theme and makes it easy to offer light and dark modes with minimal effort.
To install the dark theme, add the following to the `<head>` section of your page.
```html
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/themes/dark.css"
/>
```
To activate the theme, apply the `wa-theme-default-dark` class to the `<html>` element.
```html
<html class="wa-theme-default-dark">
...
</html>
```
### Detecting the User's Color Scheme Preference
Web Awesome 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
Web Awesome 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.

View File

@@ -1,240 +0,0 @@
---
title: Usage
description: Learn more about using custom elements.
layout: page.njk
---
Web Awesome components are just regular HTML elements, or [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_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.
If you're new to custom elements, often referred to as "web components," this section will familiarize you with how to use them.
## Attributes & Properties
Many components have properties that can be set using attributes. For example, buttons accept a `size` attribute that maps to the `size` property which dictates the button's size.
```html
<wa-button size="small">Click me</wa-button>
```
Some properties are boolean, so they only have true/false values. To activate a boolean property, add the corresponding attribute without a value.
```html
<wa-button disabled>Click me</wa-button>
```
In rare cases, a property 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` property to an array of colors. This must be done with JavaScript.
```html
<wa-color-picker></wa-color-picker>
<script>
const colorPicker = document.querySelector('wa-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. However, it's important to note that many events emitted within a component's shadow root will be [retargeted](https://dom.spec.whatwg.org/#retarget) to the host element. This may result in, for example, multiple `click` handlers executing even if the user clicks just once. Furthermore, `event.target` will point to the host element, making things even more confusing.
As a result, you should almost always listen for Web Awesome events instead. For example, instead of listening to `click` to determine when an `<wa-checkbox>` gets toggled, listen to `wa-change`.
```html
<wa-checkbox>Check me</wa-checkbox>
<script>
const checkbox = document.querySelector('wa-checkbox');
checkbox.addEventListener('wa-change', event => {
console.log(event.target.checked ? 'checked' : 'not checked');
});
</script>
```
All Web Awesome events are prefixed with `wa-` to prevent collisions with standard events and other libraries. Refer to a component's documentation for a complete list of its events.
## Methods
Some components have methods you can call to trigger various behaviors. For example, you can set focus on a Web Awesome input using the `focus()` method.
```html
<wa-input></wa-input>
<script>
const input = document.querySelector('wa-input');
input.focus();
</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
<wa-button>Click me</wa-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
<wa-button>
<wa-icon slot="prefix" name="gear" variant="solid"></wa-icon>
Settings
</wa-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 -->
<wa-input />
<!-- Always do this -->
<wa-input></wa-input>
```
## Differences from Native Elements
You might expect similarly named elements to share the same API as native HTML elements, but this is not always the case. Web Awesome components **are not** designed to be one-to-one replacements for their HTML counterparts. While they usually share the same API, there may be subtle differences.
For example, `<button>` and `<wa-button>` both have a `type` attribute, but the native one defaults to `submit` while the Web Awesome one defaults to `button` since this is a better default for most users.
:::info
**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 attribute, property, method, and event is intended to do.
:::
## Waiting for Components to Load
Web components are registered with JavaScript, so depending on how and when you load Web Awesome, you may notice a [Flash of Undefined Custom Elements (FOUCE)](https://www.abeautifulsite.net/posts/flash-of-undefined-custom-elements/) when the page loads. There are a couple ways to prevent this, both of which are described in the linked article.
One option is to use the [`:defined`](https://developer.mozilla.org/en-US/docs/Web/CSS/:defined) CSS pseudo-class to "hide" custom elements that haven't been registered yet. You can scope it to specific tags or you can hide all undefined custom elements as shown below.
```css
:not(:defined) {
visibility: hidden;
}
```
As soon as a custom element is registered, it will immediately appear with all of its styles, effectively eliminating FOUCE. Note the use of `visibility: hidden` instead of `display: none` to reduce shifting as elements are registered. The drawback to this approach is that custom elements can potentially appear one by one instead of all at the same time.
Another option is to use [`customElements.whenDefined()`](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined), which returns a promise that resolves when the specified element gets registered. You'll probably want to use it with [`Promise.allSettled()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled) in case an element fails to load for some reason.
A clever way to use this method is to hide the `<body>` with `opacity: 0` and add a class that fades it in as soon as all your custom elements are defined.
```html
<style>
body {
opacity: 0;
}
body.ready {
opacity: 1;
transition: 0.25s opacity;
}
</style>
<script type="module">
await Promise.allSettled([
customElements.whenDefined('wa-button'),
customElements.whenDefined('wa-card'),
customElements.whenDefined('wa-rating')
]);
// Button, card, and rating are registered now! Add
// the `ready` class so the UI fades in.
document.body.classList.add('ready');
</script>
```
## Component Rendering and Updating
Web Awesome components are built with [Lit](https://lit.dev/), a tiny library that makes authoring custom elements easier, more maintainable, and a lot of fun! As a Web Awesome user, here is some helpful information about rendering and updating you should probably be aware of.
To optimize performance and reduce re-renders, Lit batches component updates. This means changing multiple attributes or properties at the same time will result in just a single re-render. In most cases, this isn't an issue, but there may be times you'll need to wait for the component to update before continuing.
Consider this example. We're going to change the `checked` property of the checkbox and observe its corresponding `checked` attribute, which happens to reflect.
```js
const checkbox = document.querySelector('wa-checkbox');
checkbox.checked = true;
console.log(checkbox.hasAttribute('checked')); // false
```
Most developers will expect this to be `true` instead of `false`, but the component hasn't had a chance to re-render yet so the attribute doesn't exist when `hasAttribute()` is called. Since changes are batched, we need to wait for the update before proceeding. This can be done using the `updateComplete` property, which is available on all Lit-based components.
```js
const checkbox = document.querySelector('wa-checkbox');
checkbox.checked = true;
checkbox.updateComplete.then(() => {
console.log(checkbox.hasAttribute('checked')); // true
});
```
This time we see an empty string, which means the boolean attribute is now present!
:::info
Avoid using `setTimeout()` or `requestAnimationFrame()` in situations like this. They might work, but it's far more reliable to use `updateComplete` instead.
:::
## Code Completion
### VS Code
Web Awesome ships with a file called `vscode.html-custom-data.json` that can be used to describe it's custom elements to Visual Studio Code. This enables code completion for Web Awesome components (also known as "code hinting" or "IntelliSense"). To enable it, you need to tell VS Code where the file is.
1. [Install Web Awesome locally](/getting-started/installation#local-installation)
2. If it doesn't already exist, create a folder called `.vscode` at the root of your project
3. If it doesn't already exist, create a file inside that 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 effect.
### JetBrains IDEs
If you are using a [JetBrains IDE](https://www.jetbrains.com/) and you are installing Shoelace from NPM, the editor will automatically detect the `web-types.json` file from the package and you should immediately see component information in your editor.
If you are installing from the CDN, you can [download a local copy](https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace/dist/web-types.json) and add it to the root of your project. Be sure to add a reference to the `web-types.json` file in your `package.json` in order for your editor to properly detect it.
```json
{
...
"web-types": "./web-types.json"
...
}
```
If you are using types from multiple projects, you can add an array of references.
```json
{
...
"web-types": [
...,
"./web-types.json"
]
...
}
```
### 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!

View File

@@ -1,9 +0,0 @@
---
title: Web Awesome
description: Build better with Web Awesome, the open source library of web components from Font Awesome.
layout: page.njk
---
This is the homepage. It will soon look awesome. Until then, click the button. 👇
<wa-button variant="brand" href="/docs/components/button">Go somewhere</wa-button>

View File

@@ -1,5 +1,5 @@
export default {
'*.{js,ts,json,html,xml,css,scss,sass,md}': 'cspell --no-must-find-files',
'src/**/*.{js,ts}': 'eslint --max-warnings 0 --fix',
'*': 'prettier --write --ignore-unknown'
'*': 'prettier --write --ignore-unknown',
};

5836
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,143 +1,90 @@
{
"name": "@shoelace-style/shoelace",
"name": "@webawesome/monorepo",
"private": true,
"description": "A forward-thinking library of web components.",
"version": "2.8.0",
"homepage": "https://github.com/shoelace-style/shoelace",
"version": "3.0.0-alpha.13",
"homepage": "https://webawesome.com/",
"author": "Web Awesome",
"license": "MIT",
"customElements": "dist/custom-elements.json",
"web-types": "./dist/web-types.json",
"type": "module",
"types": "dist/webawesome.d.ts",
"jsdelivr": "./cdn/autoloader.js",
"exports": {
".": {
"types": "./dist/webawesome.d.ts",
"import": "./dist/webawesome.js"
},
"./dist/custom-elements.json": "./dist/custom-elements.json",
"./dist/webawesome.js": "./dist/webawesome.js",
"./dist/autoloader.js": "./dist/autoloader.js",
"./dist/themes/*": "./dist/themes/*",
"./dist/components/*": "./dist/components/*",
"./dist/utilities/*": "./dist/utilities/*",
"./dist/react": "./dist/react/index.js",
"./dist/react/*": "./dist/react/*",
"./dist/translations/*": "./dist/translations/*"
},
"files": [
"dist",
"cdn"
"workspaces": [
"packages/*"
],
"keywords": [
"web components",
"custom elements",
"components"
],
"repository": {
"type": "git",
"url": "git+https://github.com/shoelace-style/shoelace.git"
},
"bugs": {
"url": "https://github.com/shoelace-style/shoelace/issues"
},
"scripts": {
"start": "node scripts/build.js --develop",
"build": "node scripts/build.js",
"create": "plop --plopfile scripts/plop/plopfile.js",
"prepare": "npm i --ignore-scripts && npx playwright install",
"test": "web-test-runner --group default",
"test:component": "web-test-runner -- --watch --group",
"test:watch": "web-test-runner --watch --group default",
"lint": "eslint src --max-warnings 0",
"lint:fix": "eslint src --max-warnings 0 --fix",
"prettier": "prettier --check --log-level=warn .",
"prettier:fix": "prettier --write --log-level=warn .",
"spellcheck": "cspell \"**/*.{js,ts,json,html,css,md}\" --no-progress",
"verify": "npm run prettier && npm run lint && npm run build && npm run test",
"prepublishOnly": "npm run verify"
"check-updates": "npx npm-check-updates --interactive --format group",
"start": "cd packages/webawesome && npm run start",
"start:pro": "cd packages/webawesome-pro && npm run start"
},
"engines": {
"node": ">=14.17.0"
},
"dependencies": {
"@ctrl/tinycolor": "^4.0.2",
"@floating-ui/dom": "^1.5.3",
"@shoelace-style/animations": "^1.1.0",
"@shoelace-style/localize": "^3.1.2",
"composed-offset-position": "^0.0.4",
"lit": "^3.0.0",
"qr-creator": "^1.0.0"
},
"dependencies": {},
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.5",
"@custom-elements-manifest/analyzer": "^0.9.4",
"@lit/react": "^1.0.0",
"@11ty/eleventy": "3.0.0",
"@custom-elements-manifest/analyzer": "^0.10.4",
"@lit-labs/eleventy-plugin-lit": "^1.0.3",
"@lit-labs/testing": "^0.2.5",
"@lit/react": "^1.0.6",
"@open-wc/testing": "^3.2.0",
"@types/mocha": "^10.0.2",
"@types/mocha": "^10.0.10",
"@types/react": "^18.2.28",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.18.1",
"@web/test-runner": "^0.19.0",
"@web/test-runner-commands": "^0.9.0",
"@web/test-runner-playwright": "^0.11.0",
"browser-sync": "^2.29.3",
"chalk": "^5.3.0",
"change-case": "^4.1.2",
"chokidar": "^3.5.3",
"colorjs.io": "^0.6.0-alpha.1",
"command-line-args": "^5.2.1",
"comment-parser": "^1.4.0",
"comment-parser": "^1.4.1",
"cspell": "^6.18.1",
"custom-element-jet-brains-integration": "^1.4.0",
"custom-element-vs-code-integration": "^1.2.1",
"custom-element-vuejs-integration": "^1.0.0",
"custom-element-jet-brains-integration": "^1.6.2",
"custom-element-vs-code-integration": "^1.4.1",
"custom-element-vuejs-integration": "^1.3.3",
"del": "^7.1.0",
"download": "^8.0.0",
"esbuild": "^0.19.4",
"esbuild": "0.23.1",
"esbuild-plugin-replace": "^1.4.0",
"eslint": "^8.51.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-lit": "^1.9.1",
"eslint-plugin-lit-a11y": "^4.1.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"eslint-plugin-wc": "^2.0.4",
"front-matter": "^4.0.2",
"get-port": "^7.0.0",
"get-port": "^7.1.0",
"globby": "^13.2.2",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lunr": "^2.3.9",
"markdown-it": "^14.1.0",
"markdown-it-attrs": "^4.1.6",
"markdown-it-attrs": "^4.3.0",
"markdown-it-container": "^3.0.0",
"markdown-it-ins": "^3.0.1",
"markdown-it-kbd": "^2.2.2",
"markdown-it-mark": "^3.0.1",
"marked": "^11.1.0",
"node-html-parser": "^6.1.13",
"ora": "^8.0.1",
"npm-check-updates": "^17.1.11",
"ora": "^8.1.1",
"pascal-case": "^3.1.2",
"playwright": "^1.42.0",
"plop": "^4.0.0",
"prettier": "^3.0.3",
"playwright": "^1.49.1",
"plop": "^4.0.1",
"prettier": "^3.4.2",
"prettier-plugin-organize-imports": "^4.1.0",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"recursive-copy": "^2.0.14",
"sinon": "^16.1.0",
"source-map": "^0.7.4",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"user-agent-data-types": "^0.3.1",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"user-agent-data-types": "^0.4.2",
"uuid": "^9.0.1"
},
"overrides": {
"playwright": "^1.49.1"
},
"lint-staged": {
"*.{ts,js}": [
"eslint --max-warnings 0 --cache --fix",
"prettier --write"
]
}
}

4
packages/webawesome/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
_site
dist
dist-cdn
src/react

View File

@@ -1,13 +1,16 @@
import { customElementJetBrainsPlugin } from 'custom-element-jet-brains-integration';
import { customElementVsCodePlugin } from 'custom-element-vs-code-integration';
import { customElementVuejsPlugin } from 'custom-element-vuejs-integration';
// import { customElementVuejsPlugin } from 'custom-element-vuejs-integration';
import { parse } from 'comment-parser';
import { pascalCase } from 'pascal-case';
import fs from 'fs';
import * as path from 'node:path';
import { pascalCase } from 'pascal-case';
import * as url from 'url';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const packageData = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
const { name, description, version, author, homepage, license } = packageData;
const outdir = 'dist';
const outdir = 'dist-cdn';
function replace(string, terms) {
terms.forEach(({ from, to }) => {
@@ -28,7 +31,7 @@ export default {
name: 'wa-package-data',
packageLinkPhase({ customElementsManifest }) {
customElementsManifest.package = { name, description, version, author, homepage, license };
}
},
},
// Parse custom jsDoc tags
@@ -83,13 +86,13 @@ export default {
classDoc[t.tag].push({
name: t.name,
description: t.description,
type: t.type || undefined
type: t.type || undefined,
});
}
});
}
}
}
},
},
{
@@ -109,7 +112,7 @@ export default {
}
}
}
}
},
},
{
@@ -127,7 +130,7 @@ export default {
//
const terms = [
{ from: /^src\//, to: '' }, // Strip the src/ prefix
{ from: /\.(t|j)sx?$/, to: '.js' } // Convert .ts to .js
{ from: /\.(t|j)sx?$/, to: '.js' }, // Convert .ts to .js
];
mod.path = replace(mod.path, terms);
@@ -146,7 +149,7 @@ export default {
}
}
});
}
},
},
// Generate custom VS Code data
@@ -156,22 +159,22 @@ export default {
referencesTemplate: (_, tag) => [
{
name: 'Documentation',
url: `https://shoelace.style/components/${tag.replace('wa-', '')}`
}
]
url: `https://webawesome.com/docs/components/${tag.replace('wa-', '')}`,
},
],
}),
customElementJetBrainsPlugin({
outdir: './dist',
outdir: './dist-cdn',
excludeCss: true,
packageJson: false,
referencesTemplate: (_, tag) => {
return {
name: 'Documentation',
url: `https://shoelace.style/components/${tag.replace('wa-', '')}`
url: `https://webawesome.com/docs/components/${tag.replace('wa-', '')}`,
};
}
})
},
}),
//
// TODO - figure out why this broke when events were updated
@@ -181,5 +184,5 @@ export default {
// fileName: 'index.d.ts',
// componentTypePath: (_, tag) => `../../components/${tag.replace('wa-', '')}/${tag.replace('wa-', '')}.js`
// })
]
],
};

View File

@@ -0,0 +1,220 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import { anchorHeadingsPlugin } from './_utils/anchor-headings.js';
import { codeExamplesPlugin } from './_utils/code-examples.js';
import { copyCodePlugin } from './_utils/copy-code.js';
import { currentLink } from './_utils/current-link.js';
import { highlightCodePlugin } from './_utils/highlight-code.js';
import { markdown } from './_utils/markdown.js';
// import { formatCodePlugin } from './_utils/format-code.js';
// import litPlugin from '@lit-labs/eleventy-plugin-lit';
import { readFile } from 'fs/promises';
import nunjucks from 'nunjucks';
// import componentList from './_data/componentList.js';
import * as filters from './_utils/filters.js';
import { outlinePlugin } from './_utils/outline.js';
import { replaceTextPlugin } from './_utils/replace-text.js';
import { searchPlugin } from './_utils/search.js';
import process from 'process';
import * as url from 'url';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const packageData = JSON.parse(await readFile(path.join(__dirname, '..', 'package.json'), 'utf-8'));
const isDev = process.argv.includes('--develop');
const globalData = {
package: packageData,
layout: 'page.njk',
server: {
head: '',
loginOrAvatar: '',
flashes: '',
},
};
export default async function (eleventyConfig) {
/**
* If you plan to add or remove any of these extensions, make sure to let either Konnor or Cory know as these passthrough extensions
* will also need to be updated in the Web Awesome App.
*/
const passThroughExtensions = ['js', 'css', 'png', 'svg', 'jpg', 'mp4'];
const docsDir = path.join(process.env.BASE_DIR || '.', 'docs');
const passThrough = [...passThroughExtensions.map(ext => path.join(docsDir, '**/*.' + ext))];
/**
* This is the guard we use for now to make sure our final built files dont need a 2nd pass by the server. This keeps us able to still deploy the bare HTML files on Vercel until the app is ready.
*/
const serverBuild = process.env.WEBAWESOME_SERVER === 'true';
// Add template data
for (let name in globalData) {
eleventyConfig.addGlobalData(name, globalData[name]);
}
// Template filters - {{ content | filter }}
eleventyConfig.addFilter('inlineMarkdown', content => markdown.renderInline(content || ''));
eleventyConfig.addFilter('markdown', content => markdown.render(content || ''));
for (let name in filters) {
eleventyConfig.addFilter(name, filters[name]);
}
// Shortcodes - {% shortCode arg1, arg2 %}
eleventyConfig.addShortcode('cdnUrl', location => {
return `https://early.webawesome.com/webawesome@${packageData.version}/dist/` + (location || '').replace(/^\//, '');
});
// Turns `{% server "foo" %} into `{{ server.foo | safe }}` when the WEBAWESOME_SERVER variable is set to "true"
eleventyConfig.addShortcode('server', function (property) {
if (serverBuild) {
return `{{ server.${property} | safe }}`;
}
return '';
});
eleventyConfig.addTransform('second-nunjucks-transform', function NunjucksTransform(content) {
// For a server build, we expect a server to run the second transform.
if (serverBuild) {
return content;
}
// Only run the transform on files nunjucks would transform.
if (!this.page.inputPath.match(/.(md|html|njk)$/)) {
return content;
}
/** This largely mimics what an app would do and just stubs out what we don't care about. */
return nunjucks.renderString(content, {
// Stub the server EJS shortcodes.
server: {
head: '',
loginOrAvatar: '',
flashes: '',
},
});
});
// Paired shortcodes - {% shortCode %}content{% endShortCode %}
eleventyConfig.addPairedShortcode('markdown', content => markdown.render(content || ''));
// Helpers
// Use our own markdown instance
eleventyConfig.setLibrary('md', markdown);
// Add anchors to headings
eleventyConfig.addPlugin(anchorHeadingsPlugin({ container: '#content' }));
// Add an outline to the page
eleventyConfig.addPlugin(
outlinePlugin({
container: '#content',
target: '.outline-links',
selector: 'h2, h3',
ifEmpty: doc => {
doc.querySelector('#outline')?.remove();
},
}),
);
// Add current link classes
eleventyConfig.addPlugin(currentLink());
// Add code examples for `<code class="example">` blocks
eleventyConfig.addPlugin(codeExamplesPlugin());
// Highlight code blocks with Prism
eleventyConfig.addPlugin(highlightCodePlugin());
// Add copy code buttons to code blocks
eleventyConfig.addPlugin(copyCodePlugin);
// Various text replacements
eleventyConfig.addPlugin(
replaceTextPlugin([
{
replace: /\[version\]/gs,
replaceWith: packageData.version,
},
// Replace [issue:1234] with a link to the issue on GitHub
{
replace: /\[pr:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/pull/$1">#$1</a>',
},
// Replace [pr:1234] with a link to the pull request on GitHub
{
replace: /\[issue:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/issues/$1">#$1</a>',
},
// Replace [discuss:1234] with a link to the discussion on GitHub
{
replace: /\[discuss:([0-9]+)\]/gs,
replaceWith: '<a href="https://github.com/shoelace-style/webawesome/discussions/$1">#$1</a>',
},
]),
);
// Build the search index
eleventyConfig.addPlugin(
searchPlugin({
filename: '',
selectorsToIgnore: ['code.example'],
getContent: doc => doc.querySelector('#content')?.textContent ?? '',
}),
);
// Production-only plugins
//
// TODO - disabled because it takes about a minute to run now
//
// if (!isDev) {
// // Run Prettier on each file (prod only because it can be slow)
// eleventyConfig.addPlugin(formatCodePlugin());
// }
let assetsDir = path.join(process.env.BASE_DIR || 'docs', 'assets');
fs.cpSync(assetsDir, path.join(eleventyConfig.directories.output, 'assets'), { recursive: true });
for (let glob of passThrough) {
eleventyConfig.addPassthroughCopy(glob);
}
// // SSR plugin
// // Make sure this is the last thing, we don't want to run the risk of accidentally transforming shadow roots with the nunjucks 2nd transform.
// if (!isDev) {
// //
// // Problematic components in SSR land:
// // - animation (breaks on navigation + ssr with Turbo)
// // - mutation-observer (why SSR this?)
// // - resize-observer (why SSR this?)
// // - tooltip (why SSR this?)
// //
// const omittedModules = [];
// const componentModules = componentList
// .filter(component => !omittedModules.includes(component.tagName.split(/wa-/)[1]))
// .map(component => {
// const name = component.tagName.split(/wa-/)[1];
// const componentDirectory = process.env.UNBUNDLED_DIST_DIRECTORY || path.join('.', 'dist');
// return path.join(componentDirectory, 'components', name, `${name}.js`);
// });
//
// eleventyConfig.addPlugin(litPlugin, {
// mode: 'worker',
// componentModules,
// });
// }
}
export const config = {
markdownTemplateEngine: 'njk',
dir: {
input: 'docs',
includes: '_includes',
layouts: '_layouts',
},
templateFormats: ['njk', 'md'],
};

View File

@@ -1,7 +1,7 @@
---
title: Not Found
description: Sorry, I couldn't find that.
layout: page.njk
layout: page
permalink: 404.html
noindex: true
---

View File

@@ -0,0 +1,78 @@
/**
* @module components Fetches components from custom-elements.json and exposes them in a saner format.
*/
import { readFileSync } from 'fs';
import { dirname, join, resolve } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const customElementsJSON = process.env.DIST_DIR
? join(process.env.DIST_DIR, 'custom-elements.json')
: resolve(__dirname, '../../dist/custom-elements.json');
const manifest = JSON.parse(readFileSync(customElementsJSON), 'utf-8');
const components = manifest.modules.flatMap(module => {
return module.declarations
.filter(c => c?.customElement)
.map(declaration => {
// Generate the dist path based on the src path and attach it to the component
declaration.path = module.path.replace(/^src\//, 'dist/').replace(/\.ts$/, '.js');
// Remove private members and those that lack a description
const members = declaration.members?.filter(member => member.description && member.privacy !== 'private');
const methods = members?.filter(prop => prop.kind === 'method' && prop.privacy !== 'private');
const attributes = declaration.attributes ?? [];
const properties = members?.filter(prop => {
// Look for a corresponding attribute
const attribute = attributes?.find(attr => attr.fieldName === prop.name);
if (attribute) {
prop.attribute = attribute.name || attribute.fieldName;
}
return prop.kind === 'field' && prop.privacy !== 'private';
});
return {
...declaration,
slug: declaration.tagName.replace(/^wa-/, ''),
methods,
attributes,
properties,
};
});
});
// Build dependency graphs
components.forEach(component => {
const dependencies = [];
// Recursively fetch sub-dependencies
function getDependencies(tag) {
const cmp = components.find(c => c.tagName === tag);
if (!cmp || !Array.isArray(component.dependencies)) {
return;
}
cmp.dependencies?.forEach(dependentTag => {
if (!dependencies.includes(dependentTag)) {
dependencies.push(dependentTag);
}
getDependencies(dependentTag);
});
}
getDependencies(component.tagName);
component.dependencies = dependencies.sort();
});
// Sort by name
components.sort((a, b) => {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
});
export default components;

View File

@@ -0,0 +1,3 @@
import componentList from './componentList.js';
export default Object.fromEntries(componentList.map(component => [component.slug, component]));

View File

@@ -0,0 +1 @@
export { hueRanges as default } from '../assets/data/index.js';

View File

@@ -0,0 +1 @@
["red", "orange", "yellow", "green", "cyan", "blue", "indigo", "purple", "pink", "gray"]

View File

@@ -0,0 +1 @@
export { default as default } from '../../src/styles/color/scripts/palettes-analyzed.js';

View File

@@ -0,0 +1,62 @@
import fs from 'fs';
import path from 'path';
// import { inlined } from '../../dist/components/icon/library.wa.js';
const distDirectory = process.env.UNBUNDLED_DIST_DIRECTORY || path.join(path.resolve(), 'dist');
const THEME_DIR = path.join(distDirectory, 'styles', 'themes');
const themeFiles = fs.readdirSync(THEME_DIR).filter(file => file.endsWith('.css') && !file.endsWith('base.css'));
const declarationRegex = /^\s*--wa-(?<property>[a-z-]+)?:\s*(?<value>.+?)\s*(\/\*.+?\*\/)?\s*;$/gm;
const importRegex = /^\s*@import\s+url\(['"](?<path>.+?)['"]\);$/gm;
const themes = {};
for (const file of themeFiles) {
const id = file.replace('.css', '');
const { imports, declarations } = readCSSFile(file);
let theme = { palette: 'default', declarations, imports };
for (const url of imports) {
if (url.endsWith('/color.css')) {
// Color settings
const color = readCSSFile(url);
for (const colorUrl of color.imports) {
if (colorUrl.startsWith('../../color/')) {
// Color palette
theme.palette = getFileSlug(colorUrl);
} else if (colorUrl.startsWith('../../brand/')) {
// Brand color
theme.brand = getFileSlug(colorUrl);
}
}
} else if (url.endsWith('/dimension.css')) {
theme.dimension = true;
}
}
let icon = {};
icon.family = theme.declarations['icon-family'] ?? theme.default?.iconFamily ?? 'classic';
icon.variant = theme.declarations['icon-variant'] ?? theme.default?.iconVariant ?? 'solid';
theme.icons = icon;
theme.rounding = Number(theme.declarations['border-radius-scale'] ?? theme.default?.rounding ?? 1);
theme.spacing = Number(theme.declarations['space-scale'] ?? theme.default?.spacing ?? 1);
theme.borderWidth = Number(theme.declarations['border-width-scale'] ?? theme.default?.borderWidth ?? 1);
themes[id] = theme;
}
export default themes;
function readCSSFile(url) {
const contents = fs.readFileSync(path.join(THEME_DIR, url), 'utf8');
const imports = [...contents.matchAll(importRegex)].map(match => match.groups.path);
const declarations = Object.fromEntries(
[...contents.matchAll(declarationRegex)].map(match => [match.groups.property, match.groups.value]),
);
return { imports, declarations };
}
function getFileSlug(url) {
return url.split('/').pop().replace('.css', '');
}

View File

@@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en" data-fa-kit-code="b10bfbde90" data-cdn-url="{% cdnUrl %}" class="wa-cloak">
<head>
{% include 'head.njk' %}
<meta name="theme-color" content="#f36944">
<script type="module" src="/assets/scripts/code-examples.js"></script>
<script type="module" src="/assets/scripts/scroll.js"></script>
<script type="module" src="/assets/scripts/turbo.js"></script>
<script type="module" src="/assets/scripts/search.js"></script>
<script type="module" src="/assets/scripts/outline.js"></script>
{% if hasSidebar %}<script type="module" src="/assets/scripts/sidebar.js"></script>{% endif %}
{% if hasSidebar %}<script type="module" src="/assets/scripts/sidebar-tweaks.js"></script>{% endif %}
<script defer data-domain="backers.webawesome.com" src="https://plausible.io/js/script.js"></script>
{# Docs styles #}
<link rel="stylesheet" href="/assets/styles/docs.css" />
{% block head %}{% endblock %}
</head>
<body class="layout-{{ layout | stripExtension }}{{ ' page-wide' if wide }}">
<!-- use view="desktop" as default to reduce layout jank on desktop site. -->
<wa-page view="desktop" disable-navigation-toggle="" mobile-breakpoint="1140">
<header slot="header" class="wa-split">
{# Logo #}
<div id="docs-branding">
{# Nav toggle #}
<wa-button appearance="plain" size="small" data-toggle-nav>
<wa-icon name="bars" label="Toggle navigation"></wa-icon>
</wa-button>
<a href="/" aria-label="Web Awesome">
<span class="wa-desktop-only">{% include "logo.njk" %}</span>
<span class="wa-mobile-only">{% include "logo-simple.njk" %}</span>
</a>
<small id="version-number" class="wa-desktop-only">{{ package.version }}</small>
<wa-badge variant="warning" appearance="filled" class="wa-desktop-only">Alpha</wa-badge>
</div>
<div id="docs-toolbar" class="wa-cluster wa-gap-xs">
{# Desktop selectors #}
<div class="wa-desktop-only wa-cluster wa-gap-xs">
{% include "preset-theme-selector.njk" %}
{% include "color-scheme-selector.njk" %}
</div>
{# Search #}
<wa-button id="search-trigger" appearance="outlined" size="small" data-search>
<wa-icon slot="prefix" name="magnifying-glass"></wa-icon>
Search
<kbd slot="suffix" class="wa-desktop-only">/</kbd>
</wa-button>
{# Login #}
{% server "loginOrAvatar" %}
</div>
</header>
{# Sidebar #}
{% if hasSidebar %}
{# Mobile selectors #}
<div class="wa-mobile-only" slot="navigation-header">
<div class="wa-cluster wa-gap-xs">
{% include "preset-theme-selector.njk" %}
{% include "color-scheme-selector.njk" %}
</div>
</div>
<div slot="navigation" id="sidebar" class="docs-aside" data-remember-scroll>
{% include "sidebar.njk" %}
</div>
{% endif %}
{# Outline #}
{% if hasOutline %}
<aside slot="aside" id="outline" class="docs-aside">
<nav id="outline-standard" class="outline-links">
<h2><a href="#content">{{ title }}</a></h2>
</nav>
</aside>
{% endif %}
{# Main #}
<main id="content">
{# Expandable outline #}
{% if hasOutline %}
<nav id="outline-expandable">
<details class="outline-links">
<summary>On this page</summary>
</details>
</nav>
{% endif %}
<div id="flashes">{% server "flashes" %}</div>
{% block header %}
{% include 'breadcrumbs.njk' %}
<h1 class="title">{{ title }}</h1>
{% endblock %}
{% block content %}
{{ content | safe }}
{% endblock %}
{% block afterContent %}{% endblock %}
</main>
{% include 'search.njk' %}
</wa-page>
</body>
</html>

View File

@@ -0,0 +1,13 @@
{% set ancestors = page.url | ancestors %}
{% if ancestors.length > 0 %}
<wa-breadcrumb id="docs-breadcrumbs">
{% for ancestor in ancestors %}
{% if ancestor.page.url != "/" %}
<wa-breadcrumb-item href="{{ ancestor.page.url }}">{{ ancestor.data.title }}</wa-breadcrumb-item>
{% endif %}
{% endfor %}
<wa-breadcrumb-item>{# Current page #}</wa-breadcrumb-item>
</wa-breadcrumb>
{% else %}
{% endif %}

View File

@@ -0,0 +1,19 @@
{# Color scheme selector #}
<wa-select class="color-scheme-selector" appearance="filled" size="small" value="auto" pill title="Press \ to toggle">
<wa-icon class="only-light" slot="prefix" name="sun" variant="regular"></wa-icon>
<wa-icon class="only-dark" slot="prefix" name="moon" variant="regular"></wa-icon>
<wa-option value="light">
<wa-icon slot="prefix" name="sun" variant="regular"></wa-icon>
Light
</wa-option>
<wa-option value="dark">
<wa-icon slot="prefix" name="moon" variant="regular"></wa-icon>
Dark
</wa-option>
<wa-divider></wa-divider>
<wa-option value="auto">
<wa-icon class="only-light" slot="prefix" name="sun" variant="regular"></wa-icon>
<wa-icon class="only-dark" slot="prefix" name="moon" variant="regular"></wa-icon>
System
</wa-option>
</wa-select>

View File

@@ -0,0 +1,52 @@
<table class="colors wa-palette-{{ paletteId }} contrast-table" data-min-contrast="{{ minContrast }}">
<thead>
<tr>
<th></th>
{% for tint_bg in tints -%}
{% for tint_fg in tints | reverse -%}
{% if (tint_fg - tint_bg) | abs == difference %}
<th>{{ tint_fg }} on {{ tint_bg }}</th>
{% endif %}
{%- endfor -%}
{%- endfor %}
</tr>
</thead>
{% for hue in hues -%}
<tr data-hue="{{ hue }}">
<th>{{ hue | capitalize }}</th>
{% for tint_bg in tints -%}
{% set color_bg = palettes[paletteId][hue][tint_bg] %}
{% for tint_fg in tints | reverse -%}
{% set color_fg = palettes[paletteId][hue][tint_fg] %}
{% if (tint_fg - tint_bg) | abs == difference %}
{% set contrast_wcag = '' %}
{% if color_fg and color_bg -%}
{% set contrast_wcag = color_bg.contrast(color_fg, 'WCAG21') %}
{%- endif %}
<td v-for="contrast of [contrasts.{{ hue }}['{{ tint_bg }}']['{{ tint_fg }}']]"
data-tint-bg="{{ tint_bg }}" data-tint-fg="{{ tint_fg }}" data-original-contrast="{{ contrast_wcag }}">
<div v-content:number="contrast.value"
class="color swatch" :class="{
'value-up': contrast.value - contrast.original > 0.0001,
'value-down': contrast.original - contrast.value > 0.0001,
'contrast-fail': contrast.value < {{ minContrast }}
}"
style="--color: var(--wa-color-{{ hue }}-{{ tint_bg }}); color: var(--wa-color-{{ hue }}-{{ tint_fg }})"
:style="{
'--color': contrast.bgColor,
color: contrast.fgColor,
}"
>
{% if contrast_wcag %}
{{ contrast_wcag | number({maximumSignificantDigits: 2}) }}
{% else %}
{{ tint_fg }} on {{ tint_bg }}
{% endif %}
</div>
</td>
{% endif %}
{%- endfor -%}
{%- endfor -%}
</tr>
{%- endfor %}
</table>

View File

@@ -0,0 +1,18 @@
{# Cards for pages listed by category #}
<section id="grid" class="index-grid">
{% set groupedPages = allPages | groupPages(categories, page) %}
{% for category, pages in groupedPages -%}
{% if groupedPages.meta.groupCount > 1 and pages.length > 0 %}
<h2 class="index-category" id="{{ category | slugify }}">
{% if pages.meta.url %}<a href="{{ pages.meta.url }}">{{ pages.meta.title }}</a>
{% else %}
{{ pages.meta.title }}
{% endif %}
</h2>
{% endif %}
{%- for page in pages -%}
{% include "page-card.njk" %}
{%- endfor -%}
{%- endfor -%}
</section>

View File

@@ -0,0 +1,68 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ description }}">
{% if noindex or unlisted %}<meta name="robots" content="noindex">{% endif %}
<title>{{ title }}</title>
{# Dark mode #}
<script>
let colorScheme = localStorage.colorScheme;
let isDark = localStorage.colorScheme === "dark";
if (!colorScheme || colorScheme === "auto") {
isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
}
document.documentElement.classList.toggle('wa-dark', isDark);
</script>
<link rel="icon" href="/assets/images/webawesome-logo.svg" />
<link rel="apple-touch-icon" href="/assets/images/app-icon.png">
{# Scripts #}
{# Hydration stuff #}
<script src="/assets/scripts/hydration-errors.js"></script>
<link rel="stylesheet" href="/assets/styles/hydration-errors.css">
<link rel="preconnect" href="https://cdn.jsdelivr.net">
{# Internal components #}
<script type="module" src="/assets/components/scoped.js"></script>
{# Web Awesome #}
<script type="module" src="/dist/webawesome.loader.js"></script>
{# Fallback loading when using the free repo #}
<link rel="preconnect" href="https://early.webawesome.com">
<script type="module">
document.addEventListener("wa-discovery-complete", loadLayout)
function loadLayout () {
if (!customElements.get("wa-page")) {
import("https://early.webawesome.com/webawesome@3.0.0-alpha.13/dist/components/page/page.js")
.catch((e) => {
console.error(e)
// known errors with dual registration. This is only a thing in the free repo.
})
}
}
</script>
<script type="module" src="/assets/scripts/theme-picker.js"></script>
{# Preset Theme #}
{% if noTheme %}
{% elif forceTheme %}
<link id="theme-stylesheet" rel="stylesheet" id="theme-stylesheet" href="/dist/styles/themes/{{ forceTheme }}.css" render="blocking" fetchpriority="high" />
{% else %}
<noscript><link id="theme-stylesheet" rel="stylesheet" id="theme-stylesheet" href="/dist/styles/themes/default.css" render="blocking" fetchpriority="high" /></noscript>
<script>
{
let preset = localStorage.presetTheme ?? 'default';
let script = document.currentScript;
script.insertAdjacentHTML('beforebegin', `<link id="theme-stylesheet" rel="stylesheet" id="theme-stylesheet" href="/dist/styles/themes/${ preset }.css" render="blocking" fetchpriority="high" />`);
}
</script>
<script type="module" src="/assets/scripts/preset-theme-picker.js"></script>
{% endif %}
<link rel="stylesheet" href="/dist/styles/webawesome.css" />
{# Used by Web Awesome App to inject other assets into the head. #}
{% server "head" %}

View File

@@ -0,0 +1,18 @@
<wa-tab-group class="import-stylesheet-code">
<wa-tab panel="html">In HTML</wa-tab>
<wa-tab panel="css">In CSS</wa-tab>
<wa-tab-panel name="html">
Add the following code to the `<head>` of your page:
```html
<link rel="stylesheet" href="{% cdnUrl stylesheet %}" />
```
</wa-tab-panel>
<wa-tab-panel name="css">
Add the following code at the top of your CSS file:
```css
@import url('{% cdnUrl stylesheet %}');
```
</wa-tab-panel>
</wa-tab-group>

View File

@@ -0,0 +1,3 @@
<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.63 1.625C11.63 2.27911 11.2435 2.84296 10.6865 3.10064L14 6L17.2622 5.34755C17.0968 5.10642 17 4.81452 17 4.5C17 3.67157 17.6716 3 18.5 3C19.3284 3 20 3.67157 20 4.5C20 5.31157 19.3555 5.9726 18.5504 5.99917L15.0307 13.8207C14.7077 14.5384 13.9939 15 13.2068 15H6.79317C6.00615 15 5.29229 14.5384 4.96933 13.8207L1.44963 5.99917C0.64452 5.9726 0 5.31157 0 4.5C0 3.67157 0.671573 3 1.5 3C2.32843 3 3 3.67157 3 4.5C3 4.81452 2.9032 5.10642 2.73777 5.34755L6 6L9.31702 3.09761C8.76346 2.83855 8.38 2.27656 8.38 1.625C8.38 0.727537 9.10754 0 10.005 0C10.9025 0 11.63 0.727537 11.63 1.625Z" fill="var(--wa-brand-orange, #f36944)"/>
</svg>

After

Width:  |  Height:  |  Size: 742 B

View File

@@ -0,0 +1,13 @@
<svg width="105" height="16" viewBox="0 0 105 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M78.0517 11.8597C78.464 12.2456 79.2272 12.5 79.8675 12.5C81.0605 12.5 81.9903 11.8333 81.9903 10.693C81.9903 9.84215 81.4727 9.35093 80.5078 8.94743L79.8412 8.66674C79.4815 8.51762 79.3412 8.41235 79.3412 8.19306C79.3412 7.92991 79.5605 7.82465 79.8587 7.82465C80.169 7.82465 80.3376 7.95507 80.4921 8.07458C80.5297 8.1037 80.5665 8.1322 80.6043 8.15797C80.7359 8.25446 80.8675 8.28955 80.9903 8.28955C81.3236 8.28955 81.6657 8.00008 81.6657 7.61413C81.6657 7.47378 81.6219 7.31589 81.4903 7.16677C81.3499 7.0001 80.8587 6.49134 79.8412 6.50011C78.6921 6.50011 77.8149 7.17554 77.8149 8.2106C77.8149 9.02638 78.3588 9.55268 79.2798 9.95618L79.8763 10.2193C80.2798 10.3948 80.464 10.4825 80.464 10.7544C80.464 11.0351 80.271 11.1755 79.8675 11.1755C79.3642 11.1755 79.0247 10.8964 78.8489 10.752C78.8133 10.7228 78.7844 10.699 78.7623 10.6842C78.657 10.6141 78.5342 10.579 78.4202 10.579C78.0781 10.579 77.7535 10.8421 77.7447 11.2456C77.7447 11.4737 77.8588 11.6754 78.0517 11.8597Z" fill="currentColor"/>
<path d="M97.9115 7.2808C97.9115 6.83344 97.5957 6.50012 97.1572 6.50011C96.8502 6.50011 96.6396 6.64923 96.394 7.05274L94.9642 9.35094L93.5344 7.05274C93.2888 6.64923 93.0783 6.50011 92.7713 6.50011C92.3327 6.50011 92.0169 6.83344 92.0169 7.2808V11.7369C92.0169 12.1754 92.3415 12.5 92.7713 12.5C93.2011 12.5 93.5257 12.1754 93.5257 11.7369V9.71058L94.28 10.9123C94.4906 11.2456 94.6835 11.3772 94.9642 11.3772C95.2449 11.3772 95.4379 11.2456 95.6484 10.9123L96.4028 9.71058V11.7369C96.4028 12.1754 96.7273 12.5 97.1572 12.5C97.587 12.5 97.9115 12.1754 97.9115 11.7369L97.9115 7.2808Z" fill="currentColor"/>
<path d="M100.516 11.6316C100.516 12.0702 100.84 12.3947 101.279 12.3947L104.033 12.3947C104.428 12.3947 104.726 12.1053 104.726 11.7105C104.726 11.3246 104.437 11.0351 104.033 11.0351L102.024 11.0351V10.0264L103.235 10.0264C103.603 10.0264 103.875 9.75445 103.875 9.3948C103.875 9.03516 103.603 8.76324 103.235 8.76324L102.024 8.76324V7.96501L103.928 7.96501C104.323 7.96501 104.621 7.67554 104.621 7.28081C104.621 6.89485 104.331 6.60539 103.928 6.60539L101.279 6.60538C100.84 6.60538 100.516 6.92994 100.516 7.36853V11.6316Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.8778 6.50011C88.6322 6.50011 90.0094 7.82465 90.0094 9.50006C90.0094 11.1842 88.6322 12.5 86.8778 12.5C85.1235 12.5 83.7639 11.1842 83.7639 9.50006C83.7639 7.81588 85.1323 6.50011 86.8778 6.50011ZM86.8866 7.88605C85.948 7.88605 85.3077 8.54393 85.3077 9.50006C85.3077 10.4649 85.9393 11.1141 86.8866 11.1141C87.8164 11.1141 88.4655 10.4474 88.4655 9.50006C88.4655 8.56148 87.8076 7.88605 86.8866 7.88605Z" fill="currentColor"/>
<path d="M72.1721 12.3947C71.7335 12.3947 71.4089 12.0702 71.4089 11.6316V7.36852C71.4089 6.92993 71.7335 6.60538 72.1721 6.60538L74.8211 6.60538C75.2246 6.60538 75.5141 6.89485 75.5141 7.2808C75.5141 7.67553 75.2159 7.965 74.8211 7.965L72.9177 7.965V8.76323L74.1282 8.76323C74.4966 8.76323 74.7685 9.03515 74.7685 9.3948C74.7685 9.75444 74.4966 10.0264 74.1282 10.0264L72.9177 10.0264V11.0351L74.9264 11.0351C75.3299 11.0351 75.6194 11.3246 75.6194 11.7105C75.6194 12.1053 75.3211 12.3947 74.9264 12.3947L72.1721 12.3947Z" fill="currentColor"/>
<path d="M69.4429 7.23694C69.443 6.83344 69.1009 6.50012 68.6886 6.50012C68.364 6.50012 68.1009 6.68432 67.9868 7.00011L66.943 9.8597L65.9781 7.07028C65.8465 6.70187 65.5834 6.50011 65.2325 6.50011C64.8816 6.50011 64.6185 6.70187 64.4869 7.07028L63.522 9.8597L62.4694 6.97379C62.3641 6.67555 62.101 6.50011 61.7764 6.50011C61.3642 6.50011 61.0221 6.83344 61.0221 7.23694C61.0221 7.3422 61.0396 7.43869 61.101 7.57904L62.8115 11.9912C62.9343 12.3246 63.1799 12.5 63.5132 12.5C63.8378 12.5 64.0834 12.3246 64.2062 11.9912L65.2325 9.21059L66.2588 11.9912C66.3816 12.3246 66.6272 12.5 66.9518 12.5C67.2851 12.5 67.5307 12.3246 67.6535 11.9912L69.364 7.57904C69.4166 7.44747 69.4429 7.35098 69.4429 7.23694Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M60.0269 11.4123C60.0795 11.5439 60.1058 11.6755 60.1058 11.7807C60.1058 12.193 59.7901 12.5 59.3602 12.5C59.0357 12.5 58.7901 12.3158 58.6497 11.9561L58.5269 11.6491L56.4568 11.6491L56.334 11.9561C56.1936 12.3158 55.948 12.5 55.6235 12.5C55.1936 12.5 54.8779 12.193 54.8779 11.7807C54.8779 11.6755 54.9042 11.5439 54.9568 11.4123L56.7726 7.0001C56.9041 6.67555 57.1498 6.50011 57.4919 6.50011C57.834 6.50011 58.0796 6.67555 58.2111 7.00011L60.0269 11.4123ZM57.4919 8.74568L56.9041 10.4386L58.0796 10.4386L57.4919 8.74568Z" fill="currentColor"/>
<path d="M35.6665 6.50013C36.0788 6.50013 36.4209 6.83346 36.4209 7.23696C36.4209 7.35099 36.3946 7.44748 36.3419 7.57906L34.6314 11.9912C34.5086 12.3246 34.263 12.5 33.9297 12.5C33.6051 12.5 33.3595 12.3246 33.2367 11.9912L32.2104 9.2106L31.1841 11.9912C31.0613 12.3246 30.8157 12.5 30.4912 12.5C30.1578 12.5 29.9122 12.3246 29.7894 11.9912L28.0789 7.57906C28.0175 7.43871 28 7.34222 28 7.23696C28 6.83346 28.3421 6.50013 28.7544 6.50013C29.0789 6.50013 29.3421 6.67557 29.4473 6.97381L30.4999 9.85971L31.4648 7.07029C31.5964 6.70188 31.8596 6.50013 32.2104 6.50013C32.5613 6.50013 32.8245 6.70188 32.956 7.07029L33.9209 9.85971L34.9648 7.00012C35.0788 6.68434 35.3419 6.50013 35.6665 6.50013Z" fill="currentColor"/>
<path d="M38.3868 11.6316C38.3868 12.0702 38.7114 12.3947 39.15 12.3947H41.9043C42.299 12.3947 42.5973 12.1052 42.5973 11.7105C42.5973 11.3246 42.3078 11.0351 41.9043 11.0351H39.8956V10.0263H41.1061C41.4745 10.0263 41.7464 9.75442 41.7464 9.39478C41.7464 9.03514 41.4745 8.76321 41.1061 8.76321H39.8956V7.96498H41.799C42.1938 7.96498 42.492 7.67552 42.492 7.28079C42.492 6.89483 42.2025 6.60536 41.799 6.60536H39.15C38.7114 6.60536 38.3868 6.92992 38.3868 7.36851V11.6316Z" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.5021 10.6754C49.5021 10.0176 49.1425 9.53512 48.5372 9.28952C48.7653 9.03514 48.8881 8.70181 48.8881 8.31585C48.8881 7.31587 48.0723 6.60536 46.932 6.60536H45.6075C45.1689 6.60536 44.8443 6.92992 44.8443 7.36851V11.6316C44.8443 12.0702 45.1689 12.3947 45.6075 12.3947H47.546C48.6776 12.3947 49.5021 11.6754 49.5021 10.6754ZM46.2917 7.87727H46.8355C47.1864 7.87727 47.4145 8.07024 47.4145 8.38603C47.4145 8.70181 47.1864 8.89479 46.8355 8.89479H46.2917V7.87727ZM48.0285 10.614C48.0285 10.9386 47.818 11.1228 47.4496 11.1228H46.2917V10.1053H47.4496C47.818 10.1053 48.0285 10.2895 48.0285 10.614Z" fill="currentColor"/>
<path d="M11.63 1.625C11.63 2.27911 11.2435 2.84296 10.6865 3.10064L14 6L17.2622 5.34755C17.0968 5.10642 17 4.81452 17 4.5C17 3.67157 17.6716 3 18.5 3C19.3284 3 20 3.67157 20 4.5C20 5.31157 19.3555 5.9726 18.5504 5.99917L15.0307 13.8207C14.7077 14.5384 13.9939 15 13.2068 15H6.79317C6.00615 15 5.29229 14.5384 4.96933 13.8207L1.44963 5.99917C0.64452 5.9726 0 5.31157 0 4.5C0 3.67157 0.671573 3 1.5 3C2.32843 3 3 3.67157 3 4.5C3 4.81452 2.9032 5.10642 2.73777 5.34755L6 6L9.31702 3.09761C8.76346 2.83855 8.38 2.27656 8.38 1.625C8.38 0.727537 9.10754 0 10.005 0C10.9025 0 11.63 0.727537 11.63 1.625Z" fill="var(--wa-brand-orange, #F36944)"/>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -0,0 +1,13 @@
{%- if not page.data.unlisted -%}
{% if page.url %}<a href="{{ page.url }}"{{ page.data.keywords | attr('data-keywords') }}>{% endif %}
<wa-card with-header>
<div slot="header">
{% include "svgs/" + (page.data.icon or "thumbnail-placeholder") + ".njk" ignore missing %}
</div>
<span class="page-name">{{ page.data.title }}</span>
{% if pageSubtitle -%}
<div class="wa-caption-s">{{ pageSubtitle }}</div>
{%- endif %}
</wa-card>
{% if page.url %}</a>{% endif %}
{% endif %}

View File

@@ -0,0 +1,25 @@
<div id="page_slots_demo">
<link rel="stylesheet" href="/docs/components/page/demo.css">
{% set slots = components.page.slots %}
<fieldset id="page_slots_fieldset">
<legend>Slots</legend>
<div class="options">
{% for slot in slots %}
{% if (slot.name != "skip-to-content") and (slot.name != "navigation-toggle-icon") %}
<wa-checkbox name="slot" value="{{ slot.name }}" {{ 'checked' if slot.name != "menu" and slot.name != 'navigation-toggle' | safe}} class="{{ 'default' if not slot.name }}"
data-description="{{ slot.description | inlineMarkdown }}" title="{{ slot.description | inlineMarkdown | striptags | safe }}">
{{ slot.name or "(default)" }}
</wa-checkbox>
{% endif %}
{% endfor %}
</div>
</fieldset>
<wa-zoomable-frame srcdoc="" zoom="0.5" id="page_slots_iframe"></wa-zoomable-frame>
</div>
<script type="module">
const cacheBust = new Date().toString()
import(`/docs/components/page/demo.js?${cacheBust}`)
</script>

View File

@@ -0,0 +1,9 @@
{# Preset theme selector #}
<wa-select appearance="filled" size="small" value="default" pill class="preset-theme-selector">
<wa-icon slot="prefix" name="paintbrush" variant="regular"></wa-icon>
{% for theme in collections.theme | sort %}
<wa-option value="{{ theme.page.fileSlug }}">
{{ theme.data.title }}
</wa-option>
{% endfor %}
</wa-select>

View File

@@ -1,4 +1,4 @@
<wa-dialog id="site-search" no-header>
<wa-dialog id="site-search" without-header light-dismiss>
<div id="site-search-container">
{# Header #}
<header>
@@ -6,9 +6,9 @@
<wa-input
id="site-search-input"
type="search"
filled
appearance="filled"
size="large"
clearable
with-clear
placeholder="Search"
autofocus
autocomplete="off"

View File

@@ -0,0 +1,414 @@
{# Getting started #}
<h2>Getting Started</h2>
<ul>
<li><a href="/docs/">Installation</a></li>
<li><a href="/docs/usage">Usage</a></li>
<li><a href="/docs/customizing">Customizing</a></li>
<li><a href="/docs/form-controls">Form Controls</a></li>
<li><a href="/docs/localization">Localization</a></li>
</ul>
{# Resources #}
<h2>Resources</h2>
<ul>
<li><a href="https://github.com/shoelace-style/webawesome-alpha/discussions" target="_blank">Help &amp; Support</a></li>
<li><a href="/docs/resources/community">Community</a></li>
<li><a href="/docs/resources/accessibility">Accessibility</a></li>
<li><a href="/docs/resources/browser-support">Browser Support</a></li>
<li><a href="/docs/resources/contributing">Contributing</a></li>
<li><a href="/docs/resources/changelog">Changelog</a></li>
<li><a href="/docs/resources/visual-tests">Visual Tests</a></li>
</ul>
<!-- Themes -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/themes/" title="Overview">
Themes
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li><a href="/docs/themes/default/">Default</a></li>
<li><a href="/docs/themes/shoelace/">Shoelace</a></li>
<li><a href="/docs/themes/awesome/">Awesome</a></li>
<li>
<a href="/docs/themes/active/">Active</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/brutalist/">Brutalist</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/glossy/">Glossy</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/matter/">Matter</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/mellow/">Mellow</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/playful/">Playful</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/premium/">Premium</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/tailspin/">Tailspin</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/themes/custom/">Custom</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li><a href="/docs/themes/creating/">Creating Themes</a></li>
</ul>
</wa-details>
<!-- Components -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/components/" title="Overview">
Components
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li>
<a href="/docs/components/page/">Page</a>
<wa-icon name="flask" aria-hidden="true"></wa-icon>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li><a href="/docs/components/animated-image/">Animated Image</a></li>
<li><a href="/docs/components/animation/">Animation</a></li>
<li><a href="/docs/components/avatar/">Avatar</a></li>
<li><a href="/docs/components/badge/">Badge</a></li>
<li>
<a href="/docs/components/breadcrumb/">Breadcrumb</a>
<ul>
<li><a href="/docs/components/breadcrumb-item/">Breadcrumb Item</a></li>
</ul>
</li>
<li><a href="/docs/components/button/">Button</a></li>
<li><a href="/docs/components/button-group/">Button Group</a></li>
<li><a href="/docs/components/callout/">Callout</a></li>
<li><a href="/docs/components/card/">Card</a></li>
<li>
<a href="/docs/components/carousel/">Carousel</a>
<wa-icon name="flask" aria-hidden="true"></wa-icon>
<ul>
<li>
<a href="/docs/components/carousel-item/">Carousel Item</a>
<wa-icon name="flask" aria-hidden="true"></wa-icon>
</li>
</ul>
</li>
<li><a href="/docs/components/checkbox/">Checkbox</a></li>
<li><a href="/docs/components/color-picker/">Color Picker</a></li>
<li><a href="/docs/components/comparison/">Comparison</a></li>
<li>
<a href="/docs/components/copy-button/">Copy Button</a>
<wa-icon name="flask" aria-hidden="true"></wa-icon>
</li>
<li><a href="/docs/components/details/">Details</a></li>
<li><a href="/docs/components/dialog/">Dialog</a></li>
<li><a href="/docs/components/divider/">Divider</a></li>
<li><a href="/docs/components/drawer/">Drawer</a></li>
<li><a href="/docs/components/dropdown/">Dropdown</a></li>
<li><a href="/docs/components/format-bytes/">Format Bytes</a></li>
<li><a href="/docs/components/format-date/">Format Date</a></li>
<li><a href="/docs/components/format-number/">Format Number</a></li>
<li><a href="/docs/components/icon/">Icon</a></li>
<li><a href="/docs/components/include/">Include</a></li>
<li><a href="/docs/components/input/">Input</a></li>
<li>
<a href="/docs/components/menu/">Menu</a>
<ul>
<li><a href="/docs/components/menu-item/">Menu Item</a></li>
<li><a href="/docs/components/menu-label/">Menu Label</a></li>
</ul>
</li>
<li><a href="/docs/components/mutation-observer/">Mutation Observer</a></li>
<li><a href="/docs/components/popover/">Popover</a></li>
<li><a href="/docs/components/popup/">Popup</a></li>
<li><a href="/docs/components/progress-bar/">Progress Bar</a></li>
<li><a href="/docs/components/progress-ring/">Progress Ring</a></li>
<li><a href="/docs/components/qr-code/">QR Code</a></li>
<li>
<a href="/docs/components/radio-group/">Radio Group</a>
<ul>
<li><a href="/docs/components/radio/">Radio</a></li>
</ul>
</li>
<li><a href="/docs/components/rating/">Rating</a></li>
<li><a href="/docs/components/relative-time/">Relative Time</a></li>
<li><a href="/docs/components/resize-observer/">Resize Observer</a></li>
<li><a href="/docs/components/scroller/">Scroller</a></li>
<li>
<a href="/docs/components/select/">Select</a>
<ul>
<li><a href="/docs/components/option/">Option</a></li>
</ul>
</li>
<li><a href="/docs/components/skeleton/">Skeleton</a></li>
<li><a href="/docs/components/slider/">Slider</a></li>
<li><a href="/docs/components/spinner/">Spinner</a></li>
<li><a href="/docs/components/split-panel/">Split Panel</a></li>
<li><a href="/docs/components/switch/">Switch</a></li>
<li>
<a href="/docs/components/tab-group/">Tab Group</a>
<ul>
<li><a href="/docs/components/tab/">Tab</a></li>
<li><a href="/docs/components/tab-panel/">Tab Panel</a></li>
</ul>
</li>
<li><a href="/docs/components/tag/">Tag</a></li>
<li><a href="/docs/components/textarea/">Textarea</a></li>
<li><a href="/docs/components/tooltip/">Tooltip</a></li>
<li><a href="/docs/components/tree/">Tree</a></li>
<li><a href="/docs/components/tree-item/">Tree Item</a></li>
<li><a href="/docs/components/zoomable-frame">Zoomable Frame</a></li>
{# PLOP_NEW_COMPONENT_PLACEHOLDER #}
</ul>
</wa-details>
<!-- Style utilities -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/utilities/" title="Overview">
Style Utilities
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li><a href="/docs/utilities/native/">Native Styles</a></li>
<li><a href="/docs/utilities/color/">Color</a></li>
<li><a href="/docs/utilities/fouce/">Reducing FOUCE</a></li>
<li><a href="/docs/utilities/rounding/">Rounding</a></li>
<li><a href="/docs/utilities/text/">Text</a></li>
<li><a href="/docs/utilities/visually-hidden/">Visually Hidden</a></li>
</ul>
</wa-details>
<!-- Layout -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/layout/" title="Overview">
Layout
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li><a href="/docs/utilities/align-items/">Align Items</a></li>
<li><a href="/docs/utilities/gap/">Gap</a></li>
<li><a href="/docs/utilities/cluster/">Cluster</a></li>
<li><a href="/docs/utilities/flank/">Flank</a></li>
<li><a href="/docs/utilities/frame/">Frame</a></li>
<li><a href="/docs/utilities/grid/">Grid</a></li>
<li><a href="/docs/utilities/split/">Split</a></li>
<li><a href="/docs/utilities/stack/">Stack</a></li>
<li>
<a href="/docs/components/page/">Page</a>
<wa-icon name="flask" aria-hidden="true"></wa-icon>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
</ul>
</wa-details>
<!-- Patterns -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/patterns/" title="Overview">
Patterns
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li>
<a href="/docs/patterns/app/">App</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
<ul>
<li>
<a href="/docs/patterns/app/action-panel/">Action Panel</a>
</li>
<li>
<a href="/docs/patterns/app/activity-log/">Activity Log</a>
</li>
<li>
<a href="/docs/patterns/app/comments/">Comments</a>
</li>
<li>
<a href="/docs/patterns/app/data-display/">Data Display</a>
</li>
<li>
<a href="/docs/patterns/app/description-list/">Description List</a>
</li>
<li>
<a href="/docs/patterns/app/empty-state/">Empty State</a>
</li>
<li>
<a href="/docs/patterns/app/faq/">FAQ</a>
</li>
<li>
<a href="/docs/patterns/app/grid-list/">Grid List</a>
</li>
<li>
<a href="/docs/patterns/app/leaderboard/">Leaderboard</a>
</li>
<li>
<a href="/docs/patterns/app/pagination/">Pagination</a>
</li>
<li>
<a href="/docs/patterns/app/permissions/">Permissions</a>
</li>
<li>
<a href="/docs/patterns/app/pricing/">Pricing</a>
</li>
</ul>
</li>
<li>
<a href="/docs/patterns/blog-news/">Blog &amp; News</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
<ul>
<li>
<a href="/docs/patterns/blog-news/call-to-action/">Call To Action</a>
</li>
<li>
<a href="/docs/patterns/blog-news/category-list/">Category List</a>
</li>
<li>
<a href="/docs/patterns/blog-news/featured-post/">Featured Post</a>
</li>
<li>
<a href="/docs/patterns/blog-news/footer/">Footer</a>
</li>
<li>
<a href="/docs/patterns/blog-news/newsletter/">Newsletter</a>
</li>
<li>
<a href="/docs/patterns/blog-news/paywall/">Paywall</a>
</li>
<li>
<a href="/docs/patterns/blog-news/post-footer/">Post Footer</a>
</li>
<li>
<a href="/docs/patterns/blog-news/post-header/">Post Header</a>
</li>
<li>
<a href="/docs/patterns/blog-news/post-list/">Post List</a>
</li>
<li>
<a href="/docs/patterns/blog-news/login/">Sign Up &amp; Login</a>
</li>
<li>
<a href="/docs/patterns/blog-news/social-share/">Social Share</a>
</li>
</ul>
</li>
<li>
<a href="/docs/patterns/ecommerce/">Ecommerce</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
<ul>
<li>
<a href="/docs/patterns/ecommerce/category-filter/">Category Filter</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/category-preview/">Category Preview</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/checkout-form/">Checkout Form</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/incentives/">Incentives</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/order-history/">Order History</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/order-summary/">Order Summary</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/product-list/">Product Lists</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/product-overview/">Product Overview</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/product-preview/">Product Preview</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/review/">Product Reviews</a>
</li>
<li>
<a href="/docs/patterns/ecommerce/shopping-cart/">Shopping Cart</a>
</li>
</ul>
</li>
</ul>
</wa-details>
<!-- Color palettes -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/palettes/" title="Overview">
Color Palettes
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li><a href="/docs/palettes/default/">Default</a></li>
<li>
<a href="/docs/palettes/anodized/">Anodized</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li><a href="/docs/palettes/bright/">Bright</a></li>
<li>
<a href="/docs/palettes/elegant/">Elegant</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/palettes/mild/">Mild</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/palettes/natural/">Natural</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li>
<a href="/docs/palettes/rudimentary/">Rudimentary</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
<li><a href="/docs/palettes/shoelace/">Shoelace</a></li>
<li>
<a href="/docs/palettes/vogue/">Vogue</a>
<wa-badge class="pro" appearance="accent" attention="none">PRO</wa-badge>
</li>
</ul>
</wa-details>
<!-- Design tokens -->
<wa-details appearance="outlined">
<h2 slot="summary">
<a href="/docs/tokens/" title="Overview">
Design Tokens
<wa-icon name="grid-2" aria-hidden="true"></wa-icon>
</a>
</h2>
<ul>
<li><a href="/docs/tokens/borders/">Borders</a></li>
<li><a href="/docs/tokens/color/">Color</a></li>
<li><a href="/docs/tokens/focus/">Focus</a></li>
<li><a href="/docs/tokens/shadows/">Shadows</a></li>
<li><a href="/docs/tokens/space/">Space</a></li>
<li><a href="/docs/tokens/transitions/">Transitions</a></li>
<li><a href="/docs/tokens/typography/">Typography</a></li>
<li><a href="/docs/tokens/component-groups/">Component Groups</a></li>
</ul>
</wa-details>

View File

@@ -0,0 +1,20 @@
{% if since -%}
<wa-badge variant="neutral">Since {{ since }}</wa-badge>
{% endif -%}
{%- if status %}
{%- if status == "experimental" %}
<wa-badge variant="warning">
<wa-icon name="flask"></wa-icon>
Experimental
</wa-badge>
{%- elif status == "stable" %}
<wa-badge variant="brand">Stable</wa-badge>
{%- else %}
<wa-badge>{{ status}}</wa-badge>
{%- endif -%}
{%- endif %}
{%- if isPro %}
<wa-badge class="pro">PRO</wa-badge>
{%- endif -%}

View File

@@ -0,0 +1,8 @@
<svg width="96" height="57" viewBox="0 0 96 57" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1H84C90.0751 1 95 5.92487 95 12V45C95 51.0751 90.0751 56 84 56H12C5.92487 56 1 51.0751 1 45V12C1 5.92487 5.92487 1 12 1Z" fill="white" stroke="#E4E5E9" stroke-width="2"/>
<rect x="7" y="39" width="50" height="11" rx="4" fill="#4895FD"/>
<rect x="7" y="8" width="41" height="5" fill="#616D8A"/>
<rect x="7" y="19.75" width="76" height="3" fill="#D9D9D9"/>
<rect x="7" y="25" width="76" height="3" fill="#D9D9D9"/>
<rect x="7" y="32" width="76" height="3" fill="#D9D9D9"/>
</svg>

After

Width:  |  Height:  |  Size: 587 B

View File

@@ -0,0 +1,4 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1H52C58.0751 1 63 5.92487 63 12V52C63 58.0751 58.0751 63 52 63H12C5.92487 63 1 58.0751 1 52V12C1 5.92487 5.92487 1 12 1Z" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M20 32C20 27.7344 22.25 23.7969 26 21.6406C29.7031 19.4844 34.25 19.4844 38 21.6406C41.7031 23.7969 44 27.7344 44 32C44 36.3125 41.7031 40.25 38 42.4062C34.25 44.5625 29.7031 44.5625 26 42.4062C22.25 40.25 20 36.3125 20 32ZM28.8125 26.9375C28.4375 27.125 28.25 27.5 28.25 27.875V36.125C28.25 36.5469 28.4375 36.9219 28.8125 37.1094C29.1406 37.3438 29.6094 37.2969 29.9375 37.1094L36.6875 32.9844C37.0156 32.75 37.25 32.4219 37.25 32C37.25 31.625 37.0156 31.25 36.6875 31.0625L29.9375 26.9375C29.6094 26.7031 29.1406 26.7031 28.8125 26.8906V26.9375Z" fill="var(--wa-color-brand-fill-loud)"/>
</svg>

After

Width:  |  Height:  |  Size: 936 B

View File

@@ -0,0 +1,3 @@
<svg width="74" height="26" viewBox="0 0 74 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 13C5 9 15.4 1 25 1C37 1 45.25 10.75 45.25 16C45.25 21.25 43 25 37 25C31 25 28.75 21.25 28.75 16C28.75 10.75 37 1 49 1C58.6 1 69 9 73 13M73 13V7M73 13H67" stroke="var(--wa-color-neutral-border-loud)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 380 B

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="24" r="23" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M24 23.75C22.0234 23.75 20.2188 22.7188 19.2305 21C18.2422 19.3242 18.2422 17.2188 19.2305 15.5C20.2188 13.8242 22.0234 12.75 24 12.75C25.9336 12.75 27.7383 13.8242 28.7266 15.5C29.7148 17.2188 29.7148 19.3242 28.7266 21C27.7383 22.7188 25.9336 23.75 24 23.75ZM22.0234 25.8125H25.9336C30.1875 25.8125 33.625 29.25 33.625 33.5039C33.625 34.1914 33.0234 34.75 32.3359 34.75H15.6211C14.9336 34.75 14.375 34.1914 14.375 33.5039C14.375 29.25 17.7695 25.8125 22.0234 25.8125Z" fill="var(--wa-color-neutral-on-quiet)"/>
</svg>

After

Width:  |  Height:  |  Size: 754 B

View File

@@ -0,0 +1,6 @@
<svg width="66" height="66" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 11H44C50.0751 11 55 15.9249 55 22V54C55 60.0751 50.0751 65 44 65H12C5.92487 65 1 60.0751 1 54V22C1 15.9249 5.92487 11 12 11Z" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M61 1H31C28.7909 1 27 2.79086 27 5V15C27 17.2091 28.7909 19 31 19H61C63.2091 19 65 17.2091 65 15V5C65 2.79086 63.2091 1 61 1Z" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M61 1H31C28.7909 1 27 2.79086 27 5V15C27 17.2091 28.7909 19 31 19H61C63.2091 19 65 17.2091 65 15V5C65 2.79086 63.2091 1 61 1Z" stroke="var(--wa-color-surface-default)" stroke-width="2"/>
<path d="M34.7281 6.53125C34.9156 6.46875 35.15 6.53125 35.275 6.6875L39.4 11.625V7C39.4 6.73438 39.6187 6.5 39.9 6.5C40.1656 6.5 40.4 6.73438 40.4 7V13C40.4 13.2188 40.2594 13.4062 40.0562 13.4844C39.8687 13.5469 39.65 13.4844 39.5094 13.3281L35.4 8.39062V13C35.4 13.2812 35.1656 13.5 34.9 13.5C34.6187 13.5 34.4 13.2812 34.4 13V7C34.4 6.79688 34.525 6.60938 34.7281 6.53125ZM43 6.5H46.5C46.7656 6.5 47 6.73438 47 7C47 7.28125 46.7656 7.5 46.5 7.5H43V9.5H45.5C45.7656 9.5 46 9.73438 46 10C46 10.2812 45.7656 10.5 45.5 10.5H43V12.5H46.5C46.7656 12.5 47 12.7344 47 13C47 13.2812 46.7656 13.5 46.5 13.5H43C42.4375 13.5 42 13.0625 42 12.5V10V7.5C42 6.95312 42.4375 6.5 43 6.5ZM48.9125 6.53125C49.1781 6.4375 49.4594 6.57812 49.5687 6.82812L51.2875 11.4219L52.6156 6.85938C52.6781 6.65625 52.8656 6.5 53.1 6.5C53.3187 6.5 53.5062 6.65625 53.5687 6.85938L54.8969 11.4219L56.6312 6.82812C56.725 6.57812 57.0062 6.4375 57.2719 6.54688C57.5219 6.64062 57.6625 6.92188 57.5531 7.1875L55.3031 13.1875C55.2406 13.3906 55.0375 13.5156 54.8187 13.5C54.6 13.5 54.4281 13.3594 54.3656 13.1406L53.1 8.79688L51.8187 13.1406C51.7562 13.3594 51.5687 13.5 51.3656 13.5C51.1469 13.5156 50.9437 13.3906 50.8812 13.1875L48.6312 7.1875C48.5219 6.92188 48.6625 6.64062 48.9125 6.53125Z" fill="var(--wa-color-brand-on-loud)"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,7 @@
<svg width="112" height="13" viewBox="0 0 112 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.7266 6.5C13.7266 6.92188 13.375 7.25 12.9766 7.25H12.2266L12.25 11C12.25 11.0703 12.25 11.1406 12.25 11.1875V11.5625C12.25 12.1016 11.8281 12.5 11.3125 12.5H10.9375C10.8906 12.5 10.8672 12.5 10.8438 12.5C10.8203 12.5 10.7734 12.5 10.75 12.5H10H9.4375C8.89844 12.5 8.5 12.1016 8.5 11.5625V11V9.5C8.5 9.10156 8.14844 8.75 7.75 8.75H6.25C5.82812 8.75 5.5 9.10156 5.5 9.5V11V11.5625C5.5 12.1016 5.07812 12.5 4.5625 12.5H4H3.25C3.20312 12.5 3.17969 12.5 3.13281 12.5C3.10938 12.5 3.08594 12.5 3.0625 12.5H2.6875C2.14844 12.5 1.75 12.1016 1.75 11.5625V8.9375C1.75 8.9375 1.75 8.91406 1.75 8.89062V7.25H1C0.578125 7.25 0.25 6.92188 0.25 6.5C0.25 6.28906 0.320312 6.10156 0.484375 5.9375L6.48438 0.6875C6.64844 0.523438 6.83594 0.5 7 0.5C7.16406 0.5 7.35156 0.546875 7.49219 0.664062L13.4688 5.9375C13.6562 6.10156 13.75 6.28906 13.7266 6.5Z" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M29.5156 5.98438C29.8203 6.26562 29.8203 6.75781 29.5156 7.03906L25.0156 11.5391C24.7344 11.8438 24.2422 11.8438 23.9609 11.5391C23.6562 11.2578 23.6562 10.7656 23.9609 10.4844L27.9219 6.5L23.9609 2.53906C23.6562 2.25781 23.6562 1.76562 23.9609 1.48438C24.2422 1.17969 24.7344 1.17969 25.0156 1.48438L29.5156 5.98438Z" fill="var(--wa-color-neutral-on-quiet)"/>
<rect x="38" y="4" width="25" height="4" rx="2" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M78.5156 5.98438C78.8203 6.26562 78.8203 6.75781 78.5156 7.03906L74.0156 11.5391C73.7344 11.8438 73.2422 11.8438 72.9609 11.5391C72.6562 11.2578 72.6562 10.7656 72.9609 10.4844L76.9219 6.5L72.9609 2.53906C72.6562 2.25781 72.6562 1.76562 72.9609 1.48438C73.2422 1.17969 73.7344 1.17969 74.0156 1.48438L78.5156 5.98438Z" fill="var(--wa-color-neutral-on-quiet)"/>
<rect x="87" y="4" width="25" height="4" rx="2" fill="var(--wa-color-neutral-border-loud)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,7 @@
<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 6C0 2.68629 2.68629 0 6 0H32V32H6C2.68629 32 0 29.3137 0 26V6Z" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M16.75 12.375V15.75H20.125C20.5234 15.75 20.875 16.1016 20.875 16.5C20.875 16.9219 20.5234 17.25 20.125 17.25H16.75V20.625C16.75 21.0469 16.3984 21.375 16 21.375C15.5781 21.375 15.25 21.0469 15.25 20.625V17.25H11.875C11.4531 17.25 11.125 16.9219 11.125 16.5C11.125 16.1016 11.4531 15.75 11.875 15.75H15.25V12.375C15.25 11.9766 15.5781 11.625 16 11.625C16.3984 11.625 16.75 11.9766 16.75 12.375Z" fill="var(--wa-color-brand-on-loud)"/>
<path d="M32 0H58C61.3137 0 64 2.68629 64 6V26C64 29.3137 61.3137 32 58 32H32V0Z" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M52.875 16.5C52.875 16.9219 52.5234 17.25 52.125 17.25H43.875C43.4531 17.25 43.125 16.9219 43.125 16.5C43.125 16.1016 43.4531 15.75 43.875 15.75H52.125C52.5234 15.75 52.875 16.1016 52.875 16.5Z" fill="var(--wa-color-brand-on-loud)"/>
<line x1="32.5" x2="32.5" y2="32" stroke="var(--wa-color-brand-on-quiet)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,4 @@
<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 6C0 2.68629 2.68629 0 6 0H58C61.3137 0 64 2.68629 64 6V26C64 29.3137 61.3137 32 58 32H6C2.68629 32 0 29.3137 0 26V6Z" fill="var(--wa-color-brand-fill-loud)"/>
<path d="M12.375 13.125C12.375 12.4414 12.9219 11.875 13.625 11.875H15.5C17.2188 11.875 18.625 13.2812 18.625 15C18.625 16.7383 17.2188 18.125 15.5 18.125H13.625V20C13.625 20.3516 13.332 20.625 13 20.625C12.6484 20.625 12.375 20.3516 12.375 20V17.5V13.125ZM13.625 16.875H15.5C16.5352 16.875 17.375 16.0352 17.375 15C17.375 13.9648 16.5352 13.125 15.5 13.125H13.625V16.875ZM21.875 11.875H24.0625C25.6055 11.875 26.875 13.1445 26.875 14.6875C26.875 15.8789 26.1328 16.8945 25.1172 17.3047L26.7578 19.6484C26.9531 19.9414 26.875 20.332 26.6016 20.5273C26.3086 20.7227 25.918 20.6445 25.7227 20.3711L23.7305 17.5H21.875V20C21.875 20.3516 21.582 20.625 21.25 20.625C20.8984 20.625 20.625 20.3516 20.625 20V16.875V13.125C20.625 12.4414 21.1719 11.875 21.875 11.875ZM24.0625 16.25C24.9219 16.25 25.625 15.5664 25.625 14.6875C25.625 13.8281 24.9219 13.125 24.0625 13.125H21.875V16.25H24.0625ZM30.125 11.875H34.5C34.832 11.875 35.125 12.168 35.125 12.5C35.125 12.8516 34.832 13.125 34.5 13.125H30.125V15.625H33.25C33.582 15.625 33.875 15.918 33.875 16.25C33.875 16.6016 33.582 16.875 33.25 16.875H30.125V19.375H34.5C34.832 19.375 35.125 19.668 35.125 20C35.125 20.3516 34.832 20.625 34.5 20.625H30.125C29.4219 20.625 28.875 20.0781 28.875 19.375V16.25V13.125C28.875 12.4414 29.4219 11.875 30.125 11.875ZM39.0586 13.3203C38.668 13.4766 38.4531 13.75 38.3945 14.082C38.3359 14.3555 38.375 14.5312 38.4336 14.668C38.4922 14.7852 38.5898 14.9023 38.7461 15.0195C39.1367 15.293 39.7031 15.4492 40.4062 15.6641C40.4258 15.6641 40.4453 15.6641 40.4648 15.6836C41.1094 15.8594 41.8711 16.0742 42.4375 16.4648C42.75 16.6797 43.0234 16.9727 43.1992 17.3438C43.375 17.7344 43.4141 18.1641 43.3164 18.6523C43.1797 19.4727 42.6328 20.0391 41.9297 20.3516C41.2266 20.6445 40.3672 20.7031 39.5078 20.5664C39.0391 20.4883 38.2773 20.2344 37.7891 20.0586C37.6914 20.0391 37.6133 20 37.5352 19.9805C37.2227 19.8633 37.0469 19.5117 37.1445 19.1797C37.2617 18.8672 37.6133 18.6914 37.9453 18.7891C38.043 18.8281 38.1406 18.8477 38.2578 18.8867C38.7461 19.0625 39.3516 19.2773 39.7031 19.3359C40.4258 19.4336 41.0117 19.375 41.4219 19.1992C41.832 19.0234 42.0273 18.7695 42.0859 18.4375C42.1445 18.1641 42.1055 17.9688 42.0469 17.8516C42.0078 17.7344 41.8906 17.6172 41.7344 17.5C41.3438 17.2266 40.7773 17.0703 40.0742 16.8555C40.0547 16.8555 40.0352 16.8555 40.0156 16.8359C39.3711 16.6602 38.6094 16.4453 38.043 16.0547C37.7305 15.8398 37.457 15.5469 37.2812 15.1758C37.125 14.7852 37.0859 14.3555 37.1641 13.8672L37.7695 13.9844L37.1641 13.8672C37.3008 13.0469 37.8477 12.4805 38.5508 12.168C39.2539 11.875 40.1133 11.8164 40.9727 11.9531C41.2266 11.9922 42.0078 12.1484 42.2812 12.2266C42.6133 12.3047 42.8086 12.6562 42.7109 12.9883C42.6328 13.3203 42.2812 13.5156 41.9492 13.418C41.7344 13.3594 41.0117 13.2227 40.7773 13.1836L40.875 12.5781L40.7773 13.1836C40.0547 13.0859 39.4688 13.1445 39.0586 13.3203ZM47.3086 13.3203C46.918 13.4766 46.7031 13.75 46.6445 14.082C46.5859 14.3555 46.625 14.5312 46.6836 14.668C46.7422 14.7852 46.8398 14.9023 46.9961 15.0195C47.3867 15.293 47.9531 15.4492 48.6562 15.6641C48.6758 15.6641 48.6953 15.6641 48.7148 15.6836C49.3594 15.8594 50.1211 16.0742 50.6875 16.4648C51 16.6797 51.2734 16.9727 51.4492 17.3438C51.625 17.7344 51.6641 18.1641 51.5664 18.6523C51.4297 19.4727 50.8828 20.0391 50.1797 20.3516C49.4766 20.6445 48.6172 20.7031 47.7578 20.5664C47.2891 20.4883 46.5273 20.2344 46.0391 20.0586C45.9414 20.0391 45.8633 20 45.7852 19.9805C45.4727 19.8633 45.2969 19.5117 45.3945 19.1797C45.5117 18.8672 45.8633 18.6914 46.1953 18.7891C46.293 18.8281 46.3906 18.8477 46.5078 18.8867C46.9961 19.0625 47.6016 19.2773 47.9531 19.3359C48.6758 19.4336 49.2617 19.375 49.6719 19.1992C50.082 19.0234 50.2773 18.7695 50.3359 18.4375C50.3945 18.1641 50.3555 17.9688 50.2969 17.8516C50.2578 17.7344 50.1406 17.6172 49.9844 17.5C49.5938 17.2266 49.0273 17.0703 48.3242 16.8555C48.3047 16.8555 48.2852 16.8555 48.2656 16.8359C47.6211 16.6602 46.8594 16.4453 46.293 16.0547C45.9805 15.8398 45.707 15.5469 45.5312 15.1758C45.375 14.7852 45.3359 14.3555 45.4141 13.8672L46.0195 13.9844L45.4141 13.8672C45.5508 13.0469 46.0977 12.4805 46.8008 12.168C47.5039 11.875 48.3633 11.8164 49.2227 11.9531C49.4766 11.9922 50.2578 12.1484 50.5312 12.2266C50.8633 12.3047 51.0586 12.6562 50.9609 12.9883C50.8828 13.3203 50.5312 13.5156 50.1992 13.418C49.9844 13.3594 49.2617 13.2227 49.0273 13.1836L49.125 12.5781L49.0273 13.1836C48.3047 13.0859 47.7188 13.1445 47.3086 13.3203Z" fill="var(--wa-color-brand-on-loud)"/>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,3 @@
<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M63 6.32811V61.3125C63 66.375 56.6719 68.9062 53.2969 65.25L49.9219 61.7344C43.7344 55.2656 35.7188 51.1875 27 50.0625V64.125C27 68.4844 23.3438 72 19.125 72H16.875C12.5156 72 9 68.4844 9 64.125V49.5C3.9375 49.5 0 45.5625 0 40.5V27C0 22.0781 3.9375 18 9 18H20.1094L24.1875 17.8594C34.0312 17.2969 43.1719 13.0781 49.9219 5.90624L53.2969 2.39061C56.6719 -1.26564 63 1.12499 63 6.32811ZM22.5 49.6406L20.1094 49.5H13.5V64.125C13.5 66.0937 14.9062 67.5 16.875 67.5H19.125C20.9531 67.5 22.5 66.0937 22.5 64.125V49.6406ZM56.5312 5.48436L53.1562 8.99999C47.25 15.1875 39.6562 19.5469 31.5 21.375V46.2656C39.6562 48.0937 47.25 52.3125 53.1562 58.6406L56.5312 62.1562C57.2344 62.8594 58.5 62.2969 58.5 61.3125V6.32811C58.5 5.20311 57.2344 4.78124 56.5312 5.48436ZM27 22.0781C26.1562 22.2187 25.3125 22.3594 24.4688 22.3594L20.25 22.5H9C6.46875 22.5 4.5 24.6094 4.5 27V40.5C4.5 43.0312 6.46875 45 9 45H20.25L24.4688 45.2812C25.3125 45.4219 26.1562 45.4219 27 45.5625V22.0781ZM69.75 27C70.875 27 72 28.125 72 29.25V38.25C72 39.5156 70.875 40.5 69.75 40.5C68.4844 40.5 67.5 39.5156 67.5 38.25V29.25C67.5 28.125 68.4844 27 69.75 27Z" fill="var(--wa-color-neutral-on-quiet"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,6 @@
<svg width="112" height="40" viewBox="0 0 112 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1H100C106.075 1 111 5.92487 111 12V28C111 34.0751 106.075 39 100 39H12C5.92487 39 1 34.0751 1 28V12C1 5.92487 5.92487 1 12 1Z" fill="var(--wa-color-warning-fill-quiet)"/>
<path d="M12 1H100C106.075 1 111 5.92487 111 12V28C111 34.0751 106.075 39 100 39H12C5.92487 39 1 34.0751 1 28V12C1 5.92487 5.92487 1 12 1Z" stroke="var(--wa-color-warning-border-quiet)" stroke-width="2"/>
<path d="M20 13C20.4375 13 20.8438 13.25 21.0625 13.625L27.8125 25.125C28.0312 25.5312 28.0312 26 27.8125 26.375C27.5938 26.7812 27.1875 27 26.75 27H13.25C12.7812 27 12.375 26.7812 12.1562 26.375C11.9375 26 11.9375 25.5312 12.1562 25.125L18.9062 13.625C19.125 13.25 19.5312 13 20 13ZM20 17C19.5625 17 19.25 17.3438 19.25 17.75V21.25C19.25 21.6875 19.5625 22 20 22C20.4062 22 20.75 21.6875 20.75 21.25V17.75C20.75 17.3438 20.4062 17 20 17ZM21 24C21 23.4688 20.5312 23 20 23C19.4375 23 19 23.4688 19 24C19 24.5625 19.4375 25 20 25C20.5312 25 21 24.5625 21 24Z" fill="var(--wa-color-warning-on-quiet)"/>
<rect x="36" y="18" width="64" height="4" rx="2" fill="var(--wa-color-warning-on-quiet)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,10 @@
<svg width="64" height="72" viewBox="0 0 64 72" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1H52C58.0751 1 63 5.92487 63 12V60C63 66.0751 58.0751 71 52 71H12C5.92487 71 1 66.0751 1 60V12C1 5.92487 5.92487 1 12 1Z" fill="var(--wa-color-surface-default)"/>
<path d="M12 1H52C58.0751 1 63 5.92487 63 12V60C63 66.0751 58.0751 71 52 71H12C5.92487 71 1 66.0751 1 60V12C1 5.92487 5.92487 1 12 1Z" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M52 1H12C5.92487 1 1 5.92487 1 12V35H63V12C63 5.92487 58.0751 1 52 1Z" fill="var(--wa-color-neutral-fill-quiet)"/>
<path d="M52 1H12C5.92487 1 1 5.92487 1 12V35H63V12C63 5.92487 58.0751 1 52 1Z" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M16 25.3222L21.3333 19.9889L26.6667 25.3222L37.3333 13.5222L48 25.3222" stroke="var(--wa-color-neutral-on-quiet)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M23.8889 14.2333C23.8889 15.6447 22.7448 16.7889 21.3334 16.7889C19.922 16.7889 18.7778 15.6447 18.7778 14.2333C18.7778 12.8219 19.922 11.6778 21.3334 11.6778C22.7448 11.6778 23.8889 12.8219 23.8889 14.2333Z" stroke="var(--wa-color-neutral-on-quiet)" stroke-width="2"/>
<rect x="12" y="44" width="40" height="4" rx="2" fill="var(--wa-color-neutral-border-loud)"/>
<rect x="12" y="56" width="40" height="4" rx="2" fill="var(--wa-color-neutral-border-loud)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,7 @@
<svg width="130" height="48" viewBox="0 0 130 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.21094 23.9844L5.71094 19.4844C5.99219 19.1797 6.48438 19.1797 6.76562 19.4844C7.07031 19.7656 7.07031 20.2578 6.76562 20.5391L2.80469 24.5L6.76562 28.4844C7.07031 28.7656 7.07031 29.2578 6.76562 29.5391C6.48438 29.8438 5.99219 29.8438 5.71094 29.5391L1.21094 25.0391C0.90625 24.7578 0.90625 24.2656 1.21094 23.9844Z" fill="var(--wa-color-neutral-on-quiet)"/>
<path d="M25 1H33C39.0751 1 44 5.92487 44 12V36C44 42.0751 39.0751 47 33 47H25C18.9249 47 14 42.0751 14 36V12C14 5.92487 18.9249 1 25 1Z" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M61 1H69C75.0751 1 80 5.92487 80 12V36C80 42.0751 75.0751 47 69 47H61C54.9249 47 50 42.0751 50 36V12C50 5.92487 54.9249 1 61 1Z" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M97 1H105C111.075 1 116 5.92487 116 12V36C116 42.0751 111.075 47 105 47H97C90.9249 47 86 42.0751 86 36V12C86 5.92487 90.9249 1 97 1Z" fill="var(--wa-color-surface-default)" stroke="var(--wa-color-surface-border)" stroke-width="2"/>
<path d="M128.766 23.9844C129.07 24.2656 129.07 24.7578 128.766 25.0391L124.266 29.5391C123.984 29.8438 123.492 29.8438 123.211 29.5391C122.906 29.2578 122.906 28.7656 123.211 28.4844L127.172 24.5L123.211 20.5391C122.906 20.2578 122.906 19.7656 123.211 19.4844C123.492 19.1797 123.984 19.1797 124.266 19.4844L128.766 23.9844Z" fill="var(--wa-color-neutral-on-quiet)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

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