@f-ewald/components 1.23.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/custom-elements.json +1847 -596
- package/dist/address-autocomplete.d.ts.map +1 -1
- package/dist/address-autocomplete.js +7 -3
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/audio-player.d.ts +53 -0
- package/dist/audio-player.d.ts.map +1 -0
- package/dist/audio-player.js +267 -0
- package/dist/audio-player.js.map +1 -0
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-input.js +7 -3
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/button-group.d.ts +12 -1
- package/dist/button-group.d.ts.map +1 -1
- package/dist/button-group.js +35 -3
- package/dist/button-group.js.map +1 -1
- package/dist/comment-composer.d.ts +54 -0
- package/dist/comment-composer.d.ts.map +1 -0
- package/dist/comment-composer.js +244 -0
- package/dist/comment-composer.js.map +1 -0
- package/dist/confirm-dialog.d.ts +4 -1
- package/dist/confirm-dialog.d.ts.map +1 -1
- package/dist/confirm-dialog.js +47 -9
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/dropdown-button.d.ts +4 -1
- package/dist/dropdown-button.d.ts.map +1 -1
- package/dist/dropdown-button.js +29 -3
- package/dist/dropdown-button.js.map +1 -1
- package/dist/icons.d.ts +10 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +10 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/page-header.d.ts +8 -3
- package/dist/page-header.d.ts.map +1 -1
- package/dist/page-header.js +33 -12
- package/dist/page-header.js.map +1 -1
- package/dist/pagination-nav.d.ts +7 -0
- package/dist/pagination-nav.d.ts.map +1 -1
- package/dist/pagination-nav.js +19 -4
- package/dist/pagination-nav.js.map +1 -1
- package/dist/radio-cards.d.ts +6 -0
- package/dist/radio-cards.d.ts.map +1 -1
- package/dist/radio-cards.js +13 -3
- package/dist/radio-cards.js.map +1 -1
- package/dist/radio-pills.d.ts +6 -0
- package/dist/radio-pills.d.ts.map +1 -1
- package/dist/radio-pills.js +13 -3
- package/dist/radio-pills.js.map +1 -1
- package/dist/range-slider.d.ts.map +1 -1
- package/dist/range-slider.js +11 -7
- package/dist/range-slider.js.map +1 -1
- package/dist/reveal-button.d.ts +5 -1
- package/dist/reveal-button.d.ts.map +1 -1
- package/dist/reveal-button.js +26 -4
- package/dist/reveal-button.js.map +1 -1
- package/dist/tokens.css +17 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +56 -0
- package/dist/tokens.js.map +1 -1
- package/dist/ui-button.d.ts +16 -0
- package/dist/ui-button.d.ts.map +1 -1
- package/dist/ui-button.js +48 -7
- package/dist/ui-button.js.map +1 -1
- package/dist/utils/duration.d.ts +8 -0
- package/dist/utils/duration.d.ts.map +1 -1
- package/dist/utils/duration.js +18 -0
- package/dist/utils/duration.js.map +1 -1
- package/dist/utils/transport-controls.d.ts +11 -0
- package/dist/utils/transport-controls.d.ts.map +1 -0
- package/dist/utils/transport-controls.js +113 -0
- package/dist/utils/transport-controls.js.map +1 -0
- package/dist/video-player.d.ts +60 -0
- package/dist/video-player.d.ts.map +1 -0
- package/dist/video-player.js +324 -0
- package/dist/video-player.js.map +1 -0
- package/docs/audio-player.md +60 -0
- package/docs/button-group.md +18 -1
- package/docs/comment-composer.md +68 -0
- package/docs/confirm-dialog.md +19 -1
- package/docs/dropdown-button.md +10 -1
- package/docs/icons.md +5 -0
- package/docs/page-header.md +11 -4
- package/docs/pagination-nav.md +14 -0
- package/docs/radio-cards.md +9 -0
- package/docs/radio-pills.md +9 -0
- package/docs/range-slider.md +3 -0
- package/docs/reveal-button.md +11 -1
- package/docs/ui-button.md +32 -0
- package/docs/video-player.md +59 -0
- package/llms.txt +162 -23
- package/package.json +1 -1
package/docs/page-header.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# `<page-header>`
|
|
2
2
|
|
|
3
3
|
Page title block for the top of a dashboard view: an optional breadcrumb
|
|
4
|
-
trail, the page heading
|
|
5
|
-
|
|
6
|
-
the
|
|
4
|
+
trail, the page heading with a right-aligned cluster of page-level actions
|
|
5
|
+
beside it, and an optional description of what the page is for underneath.
|
|
6
|
+
The actions sit in the title row rather than beside the whole block, so a
|
|
7
|
+
longer or wrapping description never moves them. It only lays these out —
|
|
8
|
+
the breadcrumb links and action buttons are entirely the consumer's, so it
|
|
9
|
+
stays framework- and router-agnostic.
|
|
7
10
|
|
|
8
11
|
## Install
|
|
9
12
|
|
|
@@ -14,7 +17,7 @@ import "@f-ewald/components/page-header.js";
|
|
|
14
17
|
## Usage
|
|
15
18
|
|
|
16
19
|
```html
|
|
17
|
-
<page-header heading="Team members">
|
|
20
|
+
<page-header heading="Team members" description="Everyone with access to this workspace.">
|
|
18
21
|
<nav slot="breadcrumb" aria-label="Breadcrumb">Home / Settings / Members</nav>
|
|
19
22
|
<ui-button slot="actions" variant="primary">Invite</ui-button>
|
|
20
23
|
</page-header>
|
|
@@ -25,6 +28,7 @@ import "@f-ewald/components/page-header.js";
|
|
|
25
28
|
| Property | Attribute | Type | Default | Description |
|
|
26
29
|
| --- | --- | --- | --- | --- |
|
|
27
30
|
| `heading` | `heading` | `string` | `""` | The page heading text. |
|
|
31
|
+
| `description` | `description` | `string` | `""` | Optional supporting line under the heading, explaining what the page does. |
|
|
28
32
|
|
|
29
33
|
## Events
|
|
30
34
|
|
|
@@ -39,9 +43,12 @@ _None._
|
|
|
39
43
|
| Custom property |
|
|
40
44
|
| --- |
|
|
41
45
|
| `--ui-font` |
|
|
46
|
+
| `--ui-font-size` |
|
|
42
47
|
| `--ui-font-size-lg` |
|
|
43
48
|
| `--ui-font-size-sm` |
|
|
49
|
+
| `--ui-font-weight-regular` |
|
|
44
50
|
| `--ui-font-weight-semibold` |
|
|
51
|
+
| `--ui-line-height-normal` |
|
|
45
52
|
| `--ui-line-height-tight` |
|
|
46
53
|
| `--ui-text` |
|
|
47
54
|
| `--ui-text-muted` |
|
package/docs/pagination-nav.md
CHANGED
|
@@ -9,6 +9,13 @@ around a "Page N of M" status. It owns no data — the consumer sets
|
|
|
9
9
|
Previous is disabled on the first page and next on the last; neither fires an
|
|
10
10
|
event when there is nowhere to go.
|
|
11
11
|
|
|
12
|
+
The prev/next buttons are treated as `ui-button`'s `secondary` variant:
|
|
13
|
+
they read the same shared `--ui-button-secondary-*`/`--ui-button-highlight`
|
|
14
|
+
tokens (and `--ui-button-secondary-surface-muted` for hover, since — like
|
|
15
|
+
`button-group`'s unchecked segments — they already paint
|
|
16
|
+
`--ui-surface-muted` on hover by default), so a gradient theme applies
|
|
17
|
+
consistently here too.
|
|
18
|
+
|
|
12
19
|
## Install
|
|
13
20
|
|
|
14
21
|
```js
|
|
@@ -43,6 +50,13 @@ _None._
|
|
|
43
50
|
| Custom property |
|
|
44
51
|
| --- |
|
|
45
52
|
| `--ui-border` |
|
|
53
|
+
| `--ui-button-highlight` |
|
|
54
|
+
| `--ui-button-secondary-` |
|
|
55
|
+
| `--ui-button-secondary-background` |
|
|
56
|
+
| `--ui-button-secondary-background-active` |
|
|
57
|
+
| `--ui-button-secondary-border` |
|
|
58
|
+
| `--ui-button-secondary-border-hover` |
|
|
59
|
+
| `--ui-button-secondary-surface-muted` |
|
|
46
60
|
| `--ui-focus-ring` |
|
|
47
61
|
| `--ui-font` |
|
|
48
62
|
| `--ui-font-size-sm` |
|
package/docs/radio-cards.md
CHANGED
|
@@ -6,6 +6,12 @@ description matters. For many short, same-shaped options (a color swatch,
|
|
|
6
6
|
a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
7
7
|
keyboard/a11y and fires `change` rather than relying on form submission.
|
|
8
8
|
|
|
9
|
+
The selected card's border/radio dot read `--ui-button-accent` (a solid
|
|
10
|
+
stand-in, since `border-color`/`accent-color` can't render a gradient),
|
|
11
|
+
and its background reads the shared `--ui-button-secondary-surface-muted`
|
|
12
|
+
plus `--ui-button-highlight`, so a gradient theme tints it consistently
|
|
13
|
+
with `button-group`/`pagination-nav`'s equivalents.
|
|
14
|
+
|
|
9
15
|
## Install
|
|
10
16
|
|
|
11
17
|
```js
|
|
@@ -50,6 +56,9 @@ _None._
|
|
|
50
56
|
| Custom property |
|
|
51
57
|
| --- |
|
|
52
58
|
| `--ui-border` |
|
|
59
|
+
| `--ui-button-accent` |
|
|
60
|
+
| `--ui-button-highlight` |
|
|
61
|
+
| `--ui-button-secondary-surface-muted` |
|
|
53
62
|
| `--ui-focus-ring` |
|
|
54
63
|
| `--ui-font` |
|
|
55
64
|
| `--ui-font-size-sm` |
|
package/docs/radio-pills.md
CHANGED
|
@@ -6,6 +6,12 @@ choices where a description matters, use `radio-cards` instead. Wraps
|
|
|
6
6
|
native radio inputs for keyboard/a11y and fires `change` rather than
|
|
7
7
|
relying on form submission.
|
|
8
8
|
|
|
9
|
+
The selected pill's border/radio dot read `--ui-button-accent` (a solid
|
|
10
|
+
stand-in, since `border-color`/`accent-color` can't render a gradient),
|
|
11
|
+
and its background reads the shared `--ui-button-secondary-surface-muted`
|
|
12
|
+
plus `--ui-button-highlight`, so a gradient theme tints it consistently
|
|
13
|
+
with `button-group`/`pagination-nav`'s equivalents.
|
|
14
|
+
|
|
9
15
|
## Install
|
|
10
16
|
|
|
11
17
|
```js
|
|
@@ -50,6 +56,9 @@ _None._
|
|
|
50
56
|
| Custom property |
|
|
51
57
|
| --- |
|
|
52
58
|
| `--ui-border` |
|
|
59
|
+
| `--ui-button-accent` |
|
|
60
|
+
| `--ui-button-highlight` |
|
|
61
|
+
| `--ui-button-secondary-surface-muted` |
|
|
53
62
|
| `--ui-focus-ring` |
|
|
54
63
|
| `--ui-font` |
|
|
55
64
|
| `--ui-font-size-sm` |
|
package/docs/range-slider.md
CHANGED
package/docs/reveal-button.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# `<reveal-button>`
|
|
2
2
|
|
|
3
|
-
Button that reveals hidden slotted content when clicked.
|
|
3
|
+
Button that reveals hidden slotted content when clicked. Set `size="sm"`
|
|
4
|
+
for a compact button one step below the default, matching `ui-button`'s
|
|
5
|
+
`sm` size.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -22,6 +24,7 @@ import "@f-ewald/components/reveal-button.js";
|
|
|
22
24
|
| --- | --- | --- | --- | --- |
|
|
23
25
|
| `label` | `label` | `string` | `"Reveal hidden content"` | Label shown on the button before it's clicked. |
|
|
24
26
|
| `disabled` | `disabled` | `boolean` | `false` | Disables revealing the slotted content. |
|
|
27
|
+
| `size` | `size` | `"sm" | "md"` | `"md"` | Size — `sm` reduces the button's height/padding/font-size one step below the default. |
|
|
25
28
|
|
|
26
29
|
## Events
|
|
27
30
|
|
|
@@ -37,9 +40,16 @@ _None._
|
|
|
37
40
|
|
|
38
41
|
| Custom property |
|
|
39
42
|
| --- |
|
|
43
|
+
| `--ui-button-background` |
|
|
44
|
+
| `--ui-button-background-active` |
|
|
45
|
+
| `--ui-button-background-hover` |
|
|
46
|
+
| `--ui-button-border` |
|
|
47
|
+
| `--ui-button-highlight` |
|
|
48
|
+
| `--ui-button-text-shadow` |
|
|
40
49
|
| `--ui-focus-ring` |
|
|
41
50
|
| `--ui-font` |
|
|
42
51
|
| `--ui-font-size-sm` |
|
|
52
|
+
| `--ui-font-size-xs` |
|
|
43
53
|
| `--ui-font-weight-medium` |
|
|
44
54
|
| `--ui-line-height-tight` |
|
|
45
55
|
| `--ui-on-accent` |
|
package/docs/ui-button.md
CHANGED
|
@@ -13,6 +13,22 @@ cross into from an ancestor light-DOM `<form>`. `type="submit"`/`"reset"`
|
|
|
13
13
|
is instead wired through `ElementInternals.form` — the same mechanism
|
|
14
14
|
`address-autocomplete` uses to associate with an ancestor form.
|
|
15
15
|
|
|
16
|
+
`primary`/`danger` backgrounds read `--ui-button-background`/
|
|
17
|
+
`--ui-button-danger-background` (and their `-hover`/`-active`
|
|
18
|
+
counterparts), which default to the flat `--ui-primary`/`--ui-danger`
|
|
19
|
+
tokens unchanged — so `--ui-primary`/`--ui-danger` stay the single source
|
|
20
|
+
of truth for every other component. A consumer can override just these
|
|
21
|
+
button-specific tokens with a `linear-gradient(...)` to opt every
|
|
22
|
+
`ui-button` into a gradient look without touching component markup,
|
|
23
|
+
pairing it with `--ui-button-border`/`--ui-button-danger-border` (default
|
|
24
|
+
`transparent`) for a defining edge a shade darker than the gradient's dark
|
|
25
|
+
stop, and setting the `-active` variant's stops in reverse for a
|
|
26
|
+
pressed/"indented" look while the button is held down. `secondary`'s
|
|
27
|
+
background/border read the equivalent `--ui-button-secondary-*` tokens
|
|
28
|
+
(shared with `confirm-dialog`'s Cancel button), defaulting to today's
|
|
29
|
+
transparent/bordered look, so it can be themed into a matching (e.g.
|
|
30
|
+
white-to-gray) gradient too.
|
|
31
|
+
|
|
16
32
|
## Install
|
|
17
33
|
|
|
18
34
|
```js
|
|
@@ -57,6 +73,22 @@ _None._
|
|
|
57
73
|
| Custom property |
|
|
58
74
|
| --- |
|
|
59
75
|
| `--ui-border` |
|
|
76
|
+
| `--ui-button-background` |
|
|
77
|
+
| `--ui-button-background-active` |
|
|
78
|
+
| `--ui-button-background-hover` |
|
|
79
|
+
| `--ui-button-border` |
|
|
80
|
+
| `--ui-button-danger-background` |
|
|
81
|
+
| `--ui-button-danger-background-active` |
|
|
82
|
+
| `--ui-button-danger-background-hover` |
|
|
83
|
+
| `--ui-button-danger-border` |
|
|
84
|
+
| `--ui-button-highlight` |
|
|
85
|
+
| `--ui-button-secondary-` |
|
|
86
|
+
| `--ui-button-secondary-background` |
|
|
87
|
+
| `--ui-button-secondary-background-active` |
|
|
88
|
+
| `--ui-button-secondary-background-hover` |
|
|
89
|
+
| `--ui-button-secondary-border` |
|
|
90
|
+
| `--ui-button-secondary-border-hover` |
|
|
91
|
+
| `--ui-button-text-shadow` |
|
|
60
92
|
| `--ui-danger` |
|
|
61
93
|
| `--ui-danger-hover` |
|
|
62
94
|
| `--ui-focus-ring` |
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# `<video-player>`
|
|
2
|
+
|
|
3
|
+
Video player wrapping a native `<video>` element (native `controls`
|
|
4
|
+
disabled) with the same tokenized transport bar as `audio-player` — a
|
|
5
|
+
play/pause `icon-button`, elapsed/total time, a seekable progress bar, a
|
|
6
|
+
mute toggle + volume slider — plus a fullscreen toggle. The control bar
|
|
7
|
+
sits in a persistent strip under the video frame rather than a
|
|
8
|
+
hover-reveal overlay, so it stays usable for keyboard/touch input without
|
|
9
|
+
a pointer hover state.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import "@f-ewald/components/video-player.js";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<video-player
|
|
21
|
+
src="/clip.mp4"
|
|
22
|
+
poster="/clip-poster.jpg"
|
|
23
|
+
label="Episode 12"
|
|
24
|
+
></video-player>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Attributes / properties
|
|
28
|
+
|
|
29
|
+
| Property | Attribute | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- | --- |
|
|
31
|
+
| `src` | `src` | `string` | `""` | URL of the video file to play. |
|
|
32
|
+
| `poster` | `poster` | `string` | `""` | Poster image shown before playback starts. |
|
|
33
|
+
| `label` | `label` | `string` | `"Video player"` | Accessible name for the player, e.g. a video title. |
|
|
34
|
+
| `loop` | `loop` | `boolean` | `false` | Loops playback once it reaches the end. |
|
|
35
|
+
| `preload` | `preload` | `"none" | "metadata" | "auto"` | `"metadata"` | Native `<video preload>` hint. |
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
|
|
39
|
+
| Event | Description |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `play` | The video started playing. |
|
|
42
|
+
| `pause` | The video was paused. |
|
|
43
|
+
| `ended` | Playback reached the end. |
|
|
44
|
+
|
|
45
|
+
## Slots
|
|
46
|
+
|
|
47
|
+
_None._
|
|
48
|
+
|
|
49
|
+
## CSS custom properties
|
|
50
|
+
|
|
51
|
+
| Custom property |
|
|
52
|
+
| --- |
|
|
53
|
+
| `--ui-border` |
|
|
54
|
+
| `--ui-danger` |
|
|
55
|
+
| `--ui-font` |
|
|
56
|
+
| `--ui-font-size-sm` |
|
|
57
|
+
| `--ui-radius` |
|
|
58
|
+
| `--ui-surface` |
|
|
59
|
+
| `--ui-text-muted` |
|
package/llms.txt
CHANGED
|
@@ -28,6 +28,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
28
28
|
| `iconArrowPath` | 12px | Refresh actions, or an animated busy/loading spinner. |
|
|
29
29
|
| `iconArrowRight` | 12px | "Continue" or forward-progressing actions, e.g. a compact next-step arrow. |
|
|
30
30
|
| `iconArrowRightOnRectangle` | 16px | Logout/sign-out actions. |
|
|
31
|
+
| `iconArrowsPointingIn` | 16px | "Exit fullscreen" actions; pair with iconArrowsPointingOut for entering fullscreen. |
|
|
31
32
|
| `iconArrowsPointingOut` | 16px | "Expand" or "view fullscreen" actions. |
|
|
32
33
|
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
33
34
|
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
@@ -62,13 +63,17 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
62
63
|
| `iconMap` | 16px | A map-view toggle, or to represent map/geographic content. |
|
|
63
64
|
| `iconMapPin` | 16px | A location, address, or map marker. |
|
|
64
65
|
| `iconMoon` | 16px | A dark-theme toggle, or to represent night/dark mode. |
|
|
66
|
+
| `iconPause` | 18px | "Pause" transport actions, e.g. audio-player/video-player's playing state. |
|
|
65
67
|
| `iconPencil` | 16px | Edit actions, e.g. an edit icon-button or inline edit toggle. |
|
|
68
|
+
| `iconPlay` | 18px | "Play" transport actions, e.g. audio-player/video-player's paused state. |
|
|
66
69
|
| `iconPlus` | 16px | "Add new" actions, e.g. creating a new item or row. |
|
|
67
70
|
| `iconPuzzlePiece` | 18px | Plugins, integrations, or extensible/add-on features. |
|
|
68
71
|
| `iconQuestionMarkCircle` | 20px | Help, tooltips, or "learn more" affordances. |
|
|
69
72
|
| `iconQueueList` | 16px | Queues, backlogs, or ordered work-item lists. |
|
|
70
73
|
| `iconShieldCheck` | 16px | Verified, secure, or trusted states. |
|
|
71
74
|
| `iconShieldExclamation` | 16px | Security warnings, or at-risk/compromised states. |
|
|
75
|
+
| `iconSpeakerWave` | 18px | An unmuted volume control, e.g. audio-player/video-player's mute toggle. |
|
|
76
|
+
| `iconSpeakerXMark` | 18px | A muted volume state; pair with iconSpeakerWave for the unmuted state. |
|
|
72
77
|
| `iconSquares2x2` | 18px | A grid or kanban-view toggle, or to represent card/tile layouts. |
|
|
73
78
|
| `iconSun` | 16px | A light-theme toggle, or to represent daytime/light mode. |
|
|
74
79
|
| `iconTag` | 16px | Tags, labels, or categorical metadata. |
|
|
@@ -235,6 +240,33 @@ Example:
|
|
|
235
240
|
</app-sidebar>
|
|
236
241
|
```
|
|
237
242
|
|
|
243
|
+
## <audio-player>
|
|
244
|
+
|
|
245
|
+
Compact audio player wrapping a native `<audio>` element (kept off-screen
|
|
246
|
+
for its decoding/playback engine and free `timeupdate`/`loadedmetadata`
|
|
247
|
+
events) behind a tokenized transport bar: a play/pause `icon-button`,
|
|
248
|
+
elapsed/total time, a seekable progress bar, and a mute toggle + volume
|
|
249
|
+
slider. The seek/volume sliders are native `<input type="range">`
|
|
250
|
+
elements (see `utils/transport-controls.ts`) for free keyboard and
|
|
251
|
+
pointer support, per this package's "native semantics before custom ARIA"
|
|
252
|
+
rule.
|
|
253
|
+
|
|
254
|
+
Import: `import "@f-ewald/components/audio-player.js";`
|
|
255
|
+
|
|
256
|
+
Properties: `src` (attribute `src`) : string, default ""; `label` (attribute `label`) : string, default "Audio player"; `loop` (attribute `loop`) : boolean, default false; `preload` (attribute `preload`) : "none" | "metadata" | "auto", default "metadata"
|
|
257
|
+
Events: `play`, `pause`, `ended`
|
|
258
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface`, `--ui-text-muted`
|
|
259
|
+
|
|
260
|
+
Example:
|
|
261
|
+
```html
|
|
262
|
+
<audio-player src="/episode-12.mp3" label="Episode 12"></audio-player>
|
|
263
|
+
<script type="module">
|
|
264
|
+
document.querySelector("audio-player").addEventListener("ended", () => {
|
|
265
|
+
console.log("playback finished");
|
|
266
|
+
});
|
|
267
|
+
</script>
|
|
268
|
+
```
|
|
269
|
+
|
|
238
270
|
## <auto-scroll>
|
|
239
271
|
|
|
240
272
|
Wraps arbitrary slotted content (e.g. `timeline-container`) and keeps it
|
|
@@ -320,13 +352,22 @@ choices (a view switcher, a theme picker) where the *currently selected*
|
|
|
320
352
|
option should read as visually "pressed," not just checked. For many
|
|
321
353
|
short, individually pill-shaped choices, use `radio-pills` instead. Wraps
|
|
322
354
|
native radio inputs for keyboard/a11y and fires `change` rather than
|
|
323
|
-
relying on form submission.
|
|
355
|
+
relying on form submission. Set `size="sm"` for a compact strip one step
|
|
356
|
+
below the default, matching `ui-button`'s `sm` size.
|
|
357
|
+
|
|
358
|
+
The checked segment reads `--ui-button-background`/`-hover`/`-active`,
|
|
359
|
+
same as `ui-button`'s `primary` variant. Unchecked segments are treated as
|
|
360
|
+
`ui-button`'s `secondary` variant: they read the shared
|
|
361
|
+
`--ui-button-secondary-background`/`-active` (rest/pressed) so a gradient
|
|
362
|
+
theme applies consistently, but use the shared `--ui-button-secondary-surface-muted`
|
|
363
|
+
(also used by `pagination-nav`) for hover, since — unlike `secondary` — an
|
|
364
|
+
unchecked segment already paints `--ui-surface-muted` on hover by default.
|
|
324
365
|
|
|
325
366
|
Import: `import "@f-ewald/components/button-group.js";`
|
|
326
367
|
|
|
327
|
-
Properties: `options` (JS property only) : ButtonGroupOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false; `iconOnly` (attribute `icon-only`) : boolean, default false
|
|
368
|
+
Properties: `options` (JS property only) : ButtonGroupOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false; `iconOnly` (attribute `icon-only`) : boolean, default false; `size` (attribute `size`) : "sm" | "md", default "md"
|
|
328
369
|
Events: `change`
|
|
329
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`
|
|
370
|
+
CSS custom properties: `--ui-border`, `--ui-button-background`, `--ui-button-highlight`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-surface-muted`, `--ui-button-text-shadow`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`
|
|
330
371
|
|
|
331
372
|
Example:
|
|
332
373
|
```html
|
|
@@ -490,19 +531,51 @@ Example:
|
|
|
490
531
|
</chat-message>
|
|
491
532
|
```
|
|
492
533
|
|
|
534
|
+
## <comment-composer>
|
|
535
|
+
|
|
536
|
+
GitHub/Slack-style comment composer: a one-line text field that expands
|
|
537
|
+
into a multi-line textarea with a bottom-right Cancel/Submit footer
|
|
538
|
+
(`form-actions`) as soon as it's focused or clicked. Submitting fires
|
|
539
|
+
`submit` with the trimmed value, then clears the field and collapses back
|
|
540
|
+
to one line — it's meant for posting one comment at a time, not editing a
|
|
541
|
+
persistent value in place (see `editable-text` for that). Canceling (the
|
|
542
|
+
Cancel button or `Escape`) discards the draft and collapses without
|
|
543
|
+
firing `submit`. Clicking away (blur) does neither — the composer stays
|
|
544
|
+
expanded until the user explicitly submits or cancels. `Cmd`/`Ctrl`+`Enter`
|
|
545
|
+
submits from the textarea, matching `editable-text`'s multiline shortcut.
|
|
546
|
+
Purely token-styled (no bespoke colors), so it's themeable via the same
|
|
547
|
+
`--ui-*` custom properties as every other value-entry field.
|
|
548
|
+
|
|
549
|
+
Import: `import "@f-ewald/components/comment-composer.js";`
|
|
550
|
+
|
|
551
|
+
Properties: `value` (attribute `value`) : string, default ""; `placeholder` (attribute `placeholder`) : string, default "Add a comment…"; `label` (attribute `label`) : string, default "Comment"; `rows` (attribute `rows`) : number, default 4; `submitLabel` (attribute `submit-label`) : string, default "Submit"; `cancelLabel` (attribute `cancel-label`) : string, default "Cancel"; `disabled` (attribute `disabled`) : boolean, default false
|
|
552
|
+
Events: `cancel`, `submit`
|
|
553
|
+
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-line-height-normal`, `--ui-radius`, `--ui-radius-sm`, `--ui-surface`, `--ui-text`
|
|
554
|
+
|
|
555
|
+
Example:
|
|
556
|
+
```html
|
|
557
|
+
<comment-composer placeholder="Add a comment…"></comment-composer>
|
|
558
|
+
<script type="module">
|
|
559
|
+
document.querySelector("comment-composer").addEventListener("submit", (e) => {
|
|
560
|
+
postComment(e.detail.value);
|
|
561
|
+
});
|
|
562
|
+
</script>
|
|
563
|
+
```
|
|
564
|
+
|
|
493
565
|
## <confirm-dialog>
|
|
494
566
|
|
|
495
567
|
Reusable confirmation dialog: overlay + centered card with a slotted body,
|
|
496
568
|
an optional error line, and Cancel/Confirm actions. Instant `display:none`
|
|
497
569
|
→ `display:flex` toggle (no transitions). Fires `confirm`/`cancel`
|
|
498
570
|
(bubbling, composed) instead of owning any deletion logic itself —
|
|
499
|
-
callers stay in charge of the request.
|
|
571
|
+
callers stay in charge of the request. Set `size="sm"` for compact
|
|
572
|
+
actions one step below the default, matching `ui-button`'s `sm` size.
|
|
500
573
|
|
|
501
574
|
Import: `import "@f-ewald/components/confirm-dialog.js";`
|
|
502
575
|
|
|
503
|
-
Properties: `open` (attribute `open`) : boolean, default false; `confirmLabel` (attribute `confirm-label`) : string, default "Delete"; `cancelLabel` (attribute `cancel-label`) : string, default "Cancel"; `danger` (attribute `danger`) : boolean, default true; `busy` (attribute `busy`) : boolean, default false; `error` (attribute `error`) : string | null, default null
|
|
576
|
+
Properties: `open` (attribute `open`) : boolean, default false; `confirmLabel` (attribute `confirm-label`) : string, default "Delete"; `cancelLabel` (attribute `cancel-label`) : string, default "Cancel"; `danger` (attribute `danger`) : boolean, default true; `busy` (attribute `busy`) : boolean, default false; `error` (attribute `error`) : string | null, default null; `size` (attribute `size`) : "sm" | "md", default "md"
|
|
504
577
|
Events: `confirm`, `cancel`
|
|
505
|
-
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-overlay`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
578
|
+
CSS custom properties: `--ui-border`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-highlight`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-overlay`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
506
579
|
|
|
507
580
|
Example:
|
|
508
581
|
```html
|
|
@@ -647,13 +720,14 @@ primary-filled button with a label and a rotating chevron), `text-icon`
|
|
|
647
720
|
(the same, with `icon` ahead of the label), and `icon` (a borderless,
|
|
648
721
|
square, low-emphasis icon target in the style of `icon-button` — the
|
|
649
722
|
classic "three-dot"/overflow menu, where `label` becomes the accessible
|
|
650
|
-
name rather than visible text).
|
|
723
|
+
name rather than visible text). Set `size="sm"` for a compact trigger one
|
|
724
|
+
step below the default, matching `ui-button`'s `sm` size.
|
|
651
725
|
|
|
652
726
|
Import: `import "@f-ewald/components/dropdown-button.js";`
|
|
653
727
|
|
|
654
|
-
Properties: `label` (attribute `label`) : string, default ""; `options` (JS property only) : DropdownOption[], default []; `disabled` (attribute `disabled`) : boolean, default false; `variant` (attribute `variant`) : DropdownButtonVariant, default "text"; `icon` (JS property only) : TemplateResult | null, default null
|
|
728
|
+
Properties: `label` (attribute `label`) : string, default ""; `options` (JS property only) : DropdownOption[], default []; `disabled` (attribute `disabled`) : boolean, default false; `variant` (attribute `variant`) : DropdownButtonVariant, default "text"; `icon` (JS property only) : TemplateResult | null, default null; `size` (attribute `size`) : "sm" | "md", default "md"
|
|
655
729
|
Events: `select`
|
|
656
|
-
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
730
|
+
CSS custom properties: `--ui-border`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-highlight`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
657
731
|
|
|
658
732
|
Example:
|
|
659
733
|
```html
|
|
@@ -1360,19 +1434,22 @@ Example:
|
|
|
1360
1434
|
## <page-header>
|
|
1361
1435
|
|
|
1362
1436
|
Page title block for the top of a dashboard view: an optional breadcrumb
|
|
1363
|
-
trail, the page heading
|
|
1364
|
-
|
|
1365
|
-
the
|
|
1437
|
+
trail, the page heading with a right-aligned cluster of page-level actions
|
|
1438
|
+
beside it, and an optional description of what the page is for underneath.
|
|
1439
|
+
The actions sit in the title row rather than beside the whole block, so a
|
|
1440
|
+
longer or wrapping description never moves them. It only lays these out —
|
|
1441
|
+
the breadcrumb links and action buttons are entirely the consumer's, so it
|
|
1442
|
+
stays framework- and router-agnostic.
|
|
1366
1443
|
|
|
1367
1444
|
Import: `import "@f-ewald/components/page-header.js";`
|
|
1368
1445
|
|
|
1369
|
-
Properties: `heading` (attribute `heading`) : string, default ""
|
|
1446
|
+
Properties: `heading` (attribute `heading`) : string, default ""; `description` (attribute `description`) : string, default ""
|
|
1370
1447
|
Events: none
|
|
1371
|
-
CSS custom properties: `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-semibold`, `--ui-line-height-tight`, `--ui-text`, `--ui-text-muted`
|
|
1448
|
+
CSS custom properties: `--ui-font`, `--ui-font-size`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-text`, `--ui-text-muted`
|
|
1372
1449
|
|
|
1373
1450
|
Example:
|
|
1374
1451
|
```html
|
|
1375
|
-
<page-header heading="Team members">
|
|
1452
|
+
<page-header heading="Team members" description="Everyone with access to this workspace.">
|
|
1376
1453
|
<nav slot="breadcrumb" aria-label="Breadcrumb">Home / Settings / Members</nav>
|
|
1377
1454
|
<ui-button slot="actions" variant="primary">Invite</ui-button>
|
|
1378
1455
|
</page-header>
|
|
@@ -1389,11 +1466,18 @@ around a "Page N of M" status. It owns no data — the consumer sets
|
|
|
1389
1466
|
Previous is disabled on the first page and next on the last; neither fires an
|
|
1390
1467
|
event when there is nowhere to go.
|
|
1391
1468
|
|
|
1469
|
+
The prev/next buttons are treated as `ui-button`'s `secondary` variant:
|
|
1470
|
+
they read the same shared `--ui-button-secondary-*`/`--ui-button-highlight`
|
|
1471
|
+
tokens (and `--ui-button-secondary-surface-muted` for hover, since — like
|
|
1472
|
+
`button-group`'s unchecked segments — they already paint
|
|
1473
|
+
`--ui-surface-muted` on hover by default), so a gradient theme applies
|
|
1474
|
+
consistently here too.
|
|
1475
|
+
|
|
1392
1476
|
Import: `import "@f-ewald/components/pagination-nav.js";`
|
|
1393
1477
|
|
|
1394
1478
|
Properties: `currentPage` (attribute `current-page`) : number, default 1; `totalPages` (attribute `total-pages`) : number, default 1
|
|
1395
1479
|
Events: `page-change`
|
|
1396
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1480
|
+
CSS custom properties: `--ui-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1397
1481
|
|
|
1398
1482
|
Example:
|
|
1399
1483
|
```html
|
|
@@ -1534,11 +1618,17 @@ description matters. For many short, same-shaped options (a color swatch,
|
|
|
1534
1618
|
a basemap style), use `radio-pills` instead. Wraps native radio inputs for
|
|
1535
1619
|
keyboard/a11y and fires `change` rather than relying on form submission.
|
|
1536
1620
|
|
|
1621
|
+
The selected card's border/radio dot read `--ui-button-accent` (a solid
|
|
1622
|
+
stand-in, since `border-color`/`accent-color` can't render a gradient),
|
|
1623
|
+
and its background reads the shared `--ui-button-secondary-surface-muted`
|
|
1624
|
+
plus `--ui-button-highlight`, so a gradient theme tints it consistently
|
|
1625
|
+
with `button-group`/`pagination-nav`'s equivalents.
|
|
1626
|
+
|
|
1537
1627
|
Import: `import "@f-ewald/components/radio-cards.js";`
|
|
1538
1628
|
|
|
1539
1629
|
Properties: `options` (JS property only) : RadioCardOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
|
|
1540
1630
|
Events: `change`
|
|
1541
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1631
|
+
CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1542
1632
|
|
|
1543
1633
|
Example:
|
|
1544
1634
|
```html
|
|
@@ -1562,11 +1652,17 @@ choices where a description matters, use `radio-cards` instead. Wraps
|
|
|
1562
1652
|
native radio inputs for keyboard/a11y and fires `change` rather than
|
|
1563
1653
|
relying on form submission.
|
|
1564
1654
|
|
|
1655
|
+
The selected pill's border/radio dot read `--ui-button-accent` (a solid
|
|
1656
|
+
stand-in, since `border-color`/`accent-color` can't render a gradient),
|
|
1657
|
+
and its background reads the shared `--ui-button-secondary-surface-muted`
|
|
1658
|
+
plus `--ui-button-highlight`, so a gradient theme tints it consistently
|
|
1659
|
+
with `button-group`/`pagination-nav`'s equivalents.
|
|
1660
|
+
|
|
1565
1661
|
Import: `import "@f-ewald/components/radio-pills.js";`
|
|
1566
1662
|
|
|
1567
1663
|
Properties: `options` (JS property only) : RadioPillOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
|
|
1568
1664
|
Events: `change`
|
|
1569
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-surface-muted`, `--ui-text`
|
|
1665
|
+
CSS custom properties: `--ui-border`, `--ui-button-accent`, `--ui-button-highlight`, `--ui-button-secondary-surface-muted`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-surface-muted`, `--ui-text`
|
|
1570
1666
|
|
|
1571
1667
|
Example:
|
|
1572
1668
|
```html
|
|
@@ -1597,7 +1693,7 @@ Import: `import "@f-ewald/components/range-slider.js";`
|
|
|
1597
1693
|
|
|
1598
1694
|
Properties: `min` (attribute `min`) : number, default 0; `max` (attribute `max`) : number, default 100; `step` (attribute `step`) : number, default 1; `value` (attribute `value`) : number, default 0; `disabled` (attribute `disabled`) : boolean, default false; `name` (attribute `name`) : string, default ""
|
|
1599
1695
|
Events: `input`, `change`
|
|
1600
|
-
CSS custom properties: `--ui-focus-ring`, `--ui-primary`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`
|
|
1696
|
+
CSS custom properties: `--ui-button-accent`, `--ui-button-background`, `--ui-button-highlight`, `--ui-focus-ring`, `--ui-primary`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`
|
|
1601
1697
|
|
|
1602
1698
|
Example:
|
|
1603
1699
|
```html
|
|
@@ -1630,13 +1726,15 @@ Example:
|
|
|
1630
1726
|
|
|
1631
1727
|
## <reveal-button>
|
|
1632
1728
|
|
|
1633
|
-
Button that reveals hidden slotted content when clicked.
|
|
1729
|
+
Button that reveals hidden slotted content when clicked. Set `size="sm"`
|
|
1730
|
+
for a compact button one step below the default, matching `ui-button`'s
|
|
1731
|
+
`sm` size.
|
|
1634
1732
|
|
|
1635
1733
|
Import: `import "@f-ewald/components/reveal-button.js";`
|
|
1636
1734
|
|
|
1637
|
-
Properties: `label` (attribute `label`) : string, default "Reveal hidden content"; `disabled` (attribute `disabled`) : boolean, default false
|
|
1735
|
+
Properties: `label` (attribute `label`) : string, default "Reveal hidden content"; `disabled` (attribute `disabled`) : boolean, default false; `size` (attribute `size`) : "sm" | "md", default "md"
|
|
1638
1736
|
Events: none
|
|
1639
|
-
CSS custom properties: `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`
|
|
1737
|
+
CSS custom properties: `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-highlight`, `--ui-button-text-shadow`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`
|
|
1640
1738
|
|
|
1641
1739
|
Example:
|
|
1642
1740
|
```html
|
|
@@ -2101,11 +2199,27 @@ cross into from an ancestor light-DOM `<form>`. `type="submit"`/`"reset"`
|
|
|
2101
2199
|
is instead wired through `ElementInternals.form` — the same mechanism
|
|
2102
2200
|
`address-autocomplete` uses to associate with an ancestor form.
|
|
2103
2201
|
|
|
2202
|
+
`primary`/`danger` backgrounds read `--ui-button-background`/
|
|
2203
|
+
`--ui-button-danger-background` (and their `-hover`/`-active`
|
|
2204
|
+
counterparts), which default to the flat `--ui-primary`/`--ui-danger`
|
|
2205
|
+
tokens unchanged — so `--ui-primary`/`--ui-danger` stay the single source
|
|
2206
|
+
of truth for every other component. A consumer can override just these
|
|
2207
|
+
button-specific tokens with a `linear-gradient(...)` to opt every
|
|
2208
|
+
`ui-button` into a gradient look without touching component markup,
|
|
2209
|
+
pairing it with `--ui-button-border`/`--ui-button-danger-border` (default
|
|
2210
|
+
`transparent`) for a defining edge a shade darker than the gradient's dark
|
|
2211
|
+
stop, and setting the `-active` variant's stops in reverse for a
|
|
2212
|
+
pressed/"indented" look while the button is held down. `secondary`'s
|
|
2213
|
+
background/border read the equivalent `--ui-button-secondary-*` tokens
|
|
2214
|
+
(shared with `confirm-dialog`'s Cancel button), defaulting to today's
|
|
2215
|
+
transparent/bordered look, so it can be themed into a matching (e.g.
|
|
2216
|
+
white-to-gray) gradient too.
|
|
2217
|
+
|
|
2104
2218
|
Import: `import "@f-ewald/components/ui-button.js";`
|
|
2105
2219
|
|
|
2106
2220
|
Properties: `variant` (attribute `variant`) : ButtonVariant, default "primary"; `size` (attribute `size`) : "sm" | "md", default "md"; `href` (attribute `href`) : string | null, default null; `type` (attribute `type`) : "button" | "submit" | "reset", default "button"; `disabled` (attribute `disabled`) : boolean, default false; `busy` (attribute `busy`) : boolean, default false
|
|
2107
2221
|
Events: none
|
|
2108
|
-
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
|
|
2222
|
+
CSS custom properties: `--ui-border`, `--ui-button-background`, `--ui-button-background-active`, `--ui-button-background-hover`, `--ui-button-border`, `--ui-button-danger-background`, `--ui-button-danger-background-active`, `--ui-button-danger-background-hover`, `--ui-button-danger-border`, `--ui-button-highlight`, `--ui-button-secondary-`, `--ui-button-secondary-background`, `--ui-button-secondary-background-active`, `--ui-button-secondary-background-hover`, `--ui-button-secondary-border`, `--ui-button-secondary-border-hover`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-danger-hover`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-on-accent`, `--ui-primary`, `--ui-primary-hover`, `--ui-radius-sm`, `--ui-text`, `--ui-text-muted`
|
|
2109
2223
|
|
|
2110
2224
|
Example:
|
|
2111
2225
|
```html
|
|
@@ -2166,6 +2280,31 @@ Example:
|
|
|
2166
2280
|
<user-avatar src="https://example.com/photo.jpg" name="Freddy" size="40"></user-avatar>
|
|
2167
2281
|
```
|
|
2168
2282
|
|
|
2283
|
+
## <video-player>
|
|
2284
|
+
|
|
2285
|
+
Video player wrapping a native `<video>` element (native `controls`
|
|
2286
|
+
disabled) with the same tokenized transport bar as `audio-player` — a
|
|
2287
|
+
play/pause `icon-button`, elapsed/total time, a seekable progress bar, a
|
|
2288
|
+
mute toggle + volume slider — plus a fullscreen toggle. The control bar
|
|
2289
|
+
sits in a persistent strip under the video frame rather than a
|
|
2290
|
+
hover-reveal overlay, so it stays usable for keyboard/touch input without
|
|
2291
|
+
a pointer hover state.
|
|
2292
|
+
|
|
2293
|
+
Import: `import "@f-ewald/components/video-player.js";`
|
|
2294
|
+
|
|
2295
|
+
Properties: `src` (attribute `src`) : string, default ""; `poster` (attribute `poster`) : string, default ""; `label` (attribute `label`) : string, default "Video player"; `loop` (attribute `loop`) : boolean, default false; `preload` (attribute `preload`) : "none" | "metadata" | "auto", default "metadata"
|
|
2296
|
+
Events: `play`, `pause`, `ended`
|
|
2297
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface`, `--ui-text-muted`
|
|
2298
|
+
|
|
2299
|
+
Example:
|
|
2300
|
+
```html
|
|
2301
|
+
<video-player
|
|
2302
|
+
src="/clip.mp4"
|
|
2303
|
+
poster="/clip-poster.jpg"
|
|
2304
|
+
label="Episode 12"
|
|
2305
|
+
></video-player>
|
|
2306
|
+
```
|
|
2307
|
+
|
|
2169
2308
|
## <weight-bar-chart>
|
|
2170
2309
|
|
|
2171
2310
|
Sorted horizontal bar chart of labeled weights (normalized fractions
|