@f-ewald/components 1.23.1 → 1.25.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.
Files changed (96) hide show
  1. package/README.md +13 -0
  2. package/custom-elements.json +1882 -595
  3. package/dist/address-autocomplete.d.ts.map +1 -1
  4. package/dist/address-autocomplete.js +7 -3
  5. package/dist/address-autocomplete.js.map +1 -1
  6. package/dist/audio-player.d.ts +53 -0
  7. package/dist/audio-player.d.ts.map +1 -0
  8. package/dist/audio-player.js +267 -0
  9. package/dist/audio-player.js.map +1 -0
  10. package/dist/autocomplete-input.d.ts.map +1 -1
  11. package/dist/autocomplete-input.js +7 -3
  12. package/dist/autocomplete-input.js.map +1 -1
  13. package/dist/button-group.d.ts +12 -1
  14. package/dist/button-group.d.ts.map +1 -1
  15. package/dist/button-group.js +35 -3
  16. package/dist/button-group.js.map +1 -1
  17. package/dist/comment-composer.d.ts +54 -0
  18. package/dist/comment-composer.d.ts.map +1 -0
  19. package/dist/comment-composer.js +244 -0
  20. package/dist/comment-composer.js.map +1 -0
  21. package/dist/confirm-dialog.d.ts +4 -1
  22. package/dist/confirm-dialog.d.ts.map +1 -1
  23. package/dist/confirm-dialog.js +47 -9
  24. package/dist/confirm-dialog.js.map +1 -1
  25. package/dist/dropdown-button.d.ts +4 -1
  26. package/dist/dropdown-button.d.ts.map +1 -1
  27. package/dist/dropdown-button.js +29 -3
  28. package/dist/dropdown-button.js.map +1 -1
  29. package/dist/icons.d.ts +12 -0
  30. package/dist/icons.d.ts.map +1 -1
  31. package/dist/icons.js +12 -0
  32. package/dist/icons.js.map +1 -1
  33. package/dist/index.d.ts +4 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +4 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/page-header.d.ts +8 -3
  38. package/dist/page-header.d.ts.map +1 -1
  39. package/dist/page-header.js +33 -12
  40. package/dist/page-header.js.map +1 -1
  41. package/dist/pagination-nav.d.ts +7 -0
  42. package/dist/pagination-nav.d.ts.map +1 -1
  43. package/dist/pagination-nav.js +19 -4
  44. package/dist/pagination-nav.js.map +1 -1
  45. package/dist/radio-cards.d.ts +6 -0
  46. package/dist/radio-cards.d.ts.map +1 -1
  47. package/dist/radio-cards.js +13 -3
  48. package/dist/radio-cards.js.map +1 -1
  49. package/dist/radio-pills.d.ts +6 -0
  50. package/dist/radio-pills.d.ts.map +1 -1
  51. package/dist/radio-pills.js +13 -3
  52. package/dist/radio-pills.js.map +1 -1
  53. package/dist/range-slider.d.ts.map +1 -1
  54. package/dist/range-slider.js +11 -7
  55. package/dist/range-slider.js.map +1 -1
  56. package/dist/reveal-button.d.ts +5 -1
  57. package/dist/reveal-button.d.ts.map +1 -1
  58. package/dist/reveal-button.js +26 -4
  59. package/dist/reveal-button.js.map +1 -1
  60. package/dist/tokens.css +38 -1
  61. package/dist/tokens.d.ts +16 -0
  62. package/dist/tokens.d.ts.map +1 -1
  63. package/dist/tokens.js +93 -0
  64. package/dist/tokens.js.map +1 -1
  65. package/dist/ui-button.d.ts +18 -0
  66. package/dist/ui-button.d.ts.map +1 -1
  67. package/dist/ui-button.js +50 -7
  68. package/dist/ui-button.js.map +1 -1
  69. package/dist/utils/duration.d.ts +8 -0
  70. package/dist/utils/duration.d.ts.map +1 -1
  71. package/dist/utils/duration.js +18 -0
  72. package/dist/utils/duration.js.map +1 -1
  73. package/dist/utils/transport-controls.d.ts +11 -0
  74. package/dist/utils/transport-controls.d.ts.map +1 -0
  75. package/dist/utils/transport-controls.js +113 -0
  76. package/dist/utils/transport-controls.js.map +1 -0
  77. package/dist/video-player.d.ts +60 -0
  78. package/dist/video-player.d.ts.map +1 -0
  79. package/dist/video-player.js +324 -0
  80. package/dist/video-player.js.map +1 -0
  81. package/docs/audio-player.md +60 -0
  82. package/docs/button-group.md +18 -1
  83. package/docs/comment-composer.md +68 -0
  84. package/docs/confirm-dialog.md +19 -1
  85. package/docs/dropdown-button.md +10 -1
  86. package/docs/icons.md +6 -0
  87. package/docs/page-header.md +11 -4
  88. package/docs/pagination-nav.md +14 -0
  89. package/docs/radio-cards.md +9 -0
  90. package/docs/radio-pills.md +9 -0
  91. package/docs/range-slider.md +3 -0
  92. package/docs/reveal-button.md +11 -1
  93. package/docs/ui-button.md +34 -0
  94. package/docs/video-player.md +59 -0
  95. package/llms.txt +165 -23
  96. package/package.json +1 -1
@@ -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, and a right-aligned cluster of page-level actions.
5
- It only lays these out — the breadcrumb links and action buttons are entirely
6
- the consumer's, so it stays framework- and router-agnostic.
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` |
@@ -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` |
@@ -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` |
@@ -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` |
@@ -52,6 +52,9 @@ _None._
52
52
 
53
53
  | Custom property |
54
54
  | --- |
55
+ | `--ui-button-accent` |
56
+ | `--ui-button-background` |
57
+ | `--ui-button-highlight` |
55
58
  | `--ui-focus-ring` |
56
59
  | `--ui-primary` |
57
60
  | `--ui-surface` |
@@ -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,24 @@ 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
+ `gradientTokenValues` in `tokens.ts` ships exactly this, wired up via
24
+ `data-theme="gradient"` (see `tokens.css`'s "Gradient theme" section) —
25
+ pairing it with `--ui-button-border`/`--ui-button-danger-border` (default
26
+ `transparent`) for a defining edge a shade darker than the gradient's dark
27
+ stop, and setting the `-active` variant's stops in reverse for a
28
+ pressed/"indented" look while the button is held down. `secondary`'s
29
+ background/border read the equivalent `--ui-button-secondary-*` tokens
30
+ (shared with `confirm-dialog`'s Cancel button), defaulting to today's
31
+ transparent/bordered look, so it can be themed into a matching (e.g.
32
+ white-to-gray) gradient too.
33
+
16
34
  ## Install
17
35
 
18
36
  ```js
@@ -57,6 +75,22 @@ _None._
57
75
  | Custom property |
58
76
  | --- |
59
77
  | `--ui-border` |
78
+ | `--ui-button-background` |
79
+ | `--ui-button-background-active` |
80
+ | `--ui-button-background-hover` |
81
+ | `--ui-button-border` |
82
+ | `--ui-button-danger-background` |
83
+ | `--ui-button-danger-background-active` |
84
+ | `--ui-button-danger-background-hover` |
85
+ | `--ui-button-danger-border` |
86
+ | `--ui-button-highlight` |
87
+ | `--ui-button-secondary-` |
88
+ | `--ui-button-secondary-background` |
89
+ | `--ui-button-secondary-background-active` |
90
+ | `--ui-button-secondary-background-hover` |
91
+ | `--ui-button-secondary-border` |
92
+ | `--ui-button-secondary-border-hover` |
93
+ | `--ui-button-text-shadow` |
60
94
  | `--ui-danger` |
61
95
  | `--ui-danger-hover` |
62
96
  | `--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,18 @@ 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
+ | `iconSparkles` | 16px | A gradient-theme toggle, or to represent a decorative/enhanced visual style. |
76
+ | `iconSpeakerWave` | 18px | An unmuted volume control, e.g. audio-player/video-player's mute toggle. |
77
+ | `iconSpeakerXMark` | 18px | A muted volume state; pair with iconSpeakerWave for the unmuted state. |
72
78
  | `iconSquares2x2` | 18px | A grid or kanban-view toggle, or to represent card/tile layouts. |
73
79
  | `iconSun` | 16px | A light-theme toggle, or to represent daytime/light mode. |
74
80
  | `iconTag` | 16px | Tags, labels, or categorical metadata. |
@@ -235,6 +241,33 @@ Example:
235
241
  </app-sidebar>
236
242
  ```
237
243
 
244
+ ## <audio-player>
245
+
246
+ Compact audio player wrapping a native `<audio>` element (kept off-screen
247
+ for its decoding/playback engine and free `timeupdate`/`loadedmetadata`
248
+ events) behind a tokenized transport bar: a play/pause `icon-button`,
249
+ elapsed/total time, a seekable progress bar, and a mute toggle + volume
250
+ slider. The seek/volume sliders are native `<input type="range">`
251
+ elements (see `utils/transport-controls.ts`) for free keyboard and
252
+ pointer support, per this package's "native semantics before custom ARIA"
253
+ rule.
254
+
255
+ Import: `import "@f-ewald/components/audio-player.js";`
256
+
257
+ 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"
258
+ Events: `play`, `pause`, `ended`
259
+ CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface`, `--ui-text-muted`
260
+
261
+ Example:
262
+ ```html
263
+ <audio-player src="/episode-12.mp3" label="Episode 12"></audio-player>
264
+ <script type="module">
265
+ document.querySelector("audio-player").addEventListener("ended", () => {
266
+ console.log("playback finished");
267
+ });
268
+ </script>
269
+ ```
270
+
238
271
  ## <auto-scroll>
239
272
 
240
273
  Wraps arbitrary slotted content (e.g. `timeline-container`) and keeps it
@@ -320,13 +353,22 @@ choices (a view switcher, a theme picker) where the *currently selected*
320
353
  option should read as visually "pressed," not just checked. For many
321
354
  short, individually pill-shaped choices, use `radio-pills` instead. Wraps
322
355
  native radio inputs for keyboard/a11y and fires `change` rather than
323
- relying on form submission.
356
+ relying on form submission. Set `size="sm"` for a compact strip one step
357
+ below the default, matching `ui-button`'s `sm` size.
358
+
359
+ The checked segment reads `--ui-button-background`/`-hover`/`-active`,
360
+ same as `ui-button`'s `primary` variant. Unchecked segments are treated as
361
+ `ui-button`'s `secondary` variant: they read the shared
362
+ `--ui-button-secondary-background`/`-active` (rest/pressed) so a gradient
363
+ theme applies consistently, but use the shared `--ui-button-secondary-surface-muted`
364
+ (also used by `pagination-nav`) for hover, since — unlike `secondary` — an
365
+ unchecked segment already paints `--ui-surface-muted` on hover by default.
324
366
 
325
367
  Import: `import "@f-ewald/components/button-group.js";`
326
368
 
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
369
+ 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
370
  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`
371
+ 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
372
 
331
373
  Example:
332
374
  ```html
@@ -490,19 +532,51 @@ Example:
490
532
  </chat-message>
491
533
  ```
492
534
 
535
+ ## <comment-composer>
536
+
537
+ GitHub/Slack-style comment composer: a one-line text field that expands
538
+ into a multi-line textarea with a bottom-right Cancel/Submit footer
539
+ (`form-actions`) as soon as it's focused or clicked. Submitting fires
540
+ `submit` with the trimmed value, then clears the field and collapses back
541
+ to one line — it's meant for posting one comment at a time, not editing a
542
+ persistent value in place (see `editable-text` for that). Canceling (the
543
+ Cancel button or `Escape`) discards the draft and collapses without
544
+ firing `submit`. Clicking away (blur) does neither — the composer stays
545
+ expanded until the user explicitly submits or cancels. `Cmd`/`Ctrl`+`Enter`
546
+ submits from the textarea, matching `editable-text`'s multiline shortcut.
547
+ Purely token-styled (no bespoke colors), so it's themeable via the same
548
+ `--ui-*` custom properties as every other value-entry field.
549
+
550
+ Import: `import "@f-ewald/components/comment-composer.js";`
551
+
552
+ 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
553
+ Events: `cancel`, `submit`
554
+ 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`
555
+
556
+ Example:
557
+ ```html
558
+ <comment-composer placeholder="Add a comment…"></comment-composer>
559
+ <script type="module">
560
+ document.querySelector("comment-composer").addEventListener("submit", (e) => {
561
+ postComment(e.detail.value);
562
+ });
563
+ </script>
564
+ ```
565
+
493
566
  ## <confirm-dialog>
494
567
 
495
568
  Reusable confirmation dialog: overlay + centered card with a slotted body,
496
569
  an optional error line, and Cancel/Confirm actions. Instant `display:none`
497
570
  → `display:flex` toggle (no transitions). Fires `confirm`/`cancel`
498
571
  (bubbling, composed) instead of owning any deletion logic itself —
499
- callers stay in charge of the request.
572
+ callers stay in charge of the request. Set `size="sm"` for compact
573
+ actions one step below the default, matching `ui-button`'s `sm` size.
500
574
 
501
575
  Import: `import "@f-ewald/components/confirm-dialog.js";`
502
576
 
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
577
+ 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
578
  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`
579
+ 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
580
 
507
581
  Example:
508
582
  ```html
@@ -647,13 +721,14 @@ primary-filled button with a label and a rotating chevron), `text-icon`
647
721
  (the same, with `icon` ahead of the label), and `icon` (a borderless,
648
722
  square, low-emphasis icon target in the style of `icon-button` — the
649
723
  classic "three-dot"/overflow menu, where `label` becomes the accessible
650
- name rather than visible text).
724
+ name rather than visible text). Set `size="sm"` for a compact trigger one
725
+ step below the default, matching `ui-button`'s `sm` size.
651
726
 
652
727
  Import: `import "@f-ewald/components/dropdown-button.js";`
653
728
 
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
729
+ 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
730
  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`
731
+ 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
732
 
658
733
  Example:
659
734
  ```html
@@ -1360,19 +1435,22 @@ Example:
1360
1435
  ## <page-header>
1361
1436
 
1362
1437
  Page title block for the top of a dashboard view: an optional breadcrumb
1363
- trail, the page heading, and a right-aligned cluster of page-level actions.
1364
- It only lays these out — the breadcrumb links and action buttons are entirely
1365
- the consumer's, so it stays framework- and router-agnostic.
1438
+ trail, the page heading with a right-aligned cluster of page-level actions
1439
+ beside it, and an optional description of what the page is for underneath.
1440
+ The actions sit in the title row rather than beside the whole block, so a
1441
+ longer or wrapping description never moves them. It only lays these out —
1442
+ the breadcrumb links and action buttons are entirely the consumer's, so it
1443
+ stays framework- and router-agnostic.
1366
1444
 
1367
1445
  Import: `import "@f-ewald/components/page-header.js";`
1368
1446
 
1369
- Properties: `heading` (attribute `heading`) : string, default ""
1447
+ Properties: `heading` (attribute `heading`) : string, default ""; `description` (attribute `description`) : string, default ""
1370
1448
  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`
1449
+ 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
1450
 
1373
1451
  Example:
1374
1452
  ```html
1375
- <page-header heading="Team members">
1453
+ <page-header heading="Team members" description="Everyone with access to this workspace.">
1376
1454
  <nav slot="breadcrumb" aria-label="Breadcrumb">Home / Settings / Members</nav>
1377
1455
  <ui-button slot="actions" variant="primary">Invite</ui-button>
1378
1456
  </page-header>
@@ -1389,11 +1467,18 @@ around a "Page N of M" status. It owns no data — the consumer sets
1389
1467
  Previous is disabled on the first page and next on the last; neither fires an
1390
1468
  event when there is nowhere to go.
1391
1469
 
1470
+ The prev/next buttons are treated as `ui-button`'s `secondary` variant:
1471
+ they read the same shared `--ui-button-secondary-*`/`--ui-button-highlight`
1472
+ tokens (and `--ui-button-secondary-surface-muted` for hover, since — like
1473
+ `button-group`'s unchecked segments — they already paint
1474
+ `--ui-surface-muted` on hover by default), so a gradient theme applies
1475
+ consistently here too.
1476
+
1392
1477
  Import: `import "@f-ewald/components/pagination-nav.js";`
1393
1478
 
1394
1479
  Properties: `currentPage` (attribute `current-page`) : number, default 1; `totalPages` (attribute `total-pages`) : number, default 1
1395
1480
  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`
1481
+ 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
1482
 
1398
1483
  Example:
1399
1484
  ```html
@@ -1534,11 +1619,17 @@ description matters. For many short, same-shaped options (a color swatch,
1534
1619
  a basemap style), use `radio-pills` instead. Wraps native radio inputs for
1535
1620
  keyboard/a11y and fires `change` rather than relying on form submission.
1536
1621
 
1622
+ The selected card's border/radio dot read `--ui-button-accent` (a solid
1623
+ stand-in, since `border-color`/`accent-color` can't render a gradient),
1624
+ and its background reads the shared `--ui-button-secondary-surface-muted`
1625
+ plus `--ui-button-highlight`, so a gradient theme tints it consistently
1626
+ with `button-group`/`pagination-nav`'s equivalents.
1627
+
1537
1628
  Import: `import "@f-ewald/components/radio-cards.js";`
1538
1629
 
1539
1630
  Properties: `options` (JS property only) : RadioCardOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
1540
1631
  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`
1632
+ 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
1633
 
1543
1634
  Example:
1544
1635
  ```html
@@ -1562,11 +1653,17 @@ choices where a description matters, use `radio-cards` instead. Wraps
1562
1653
  native radio inputs for keyboard/a11y and fires `change` rather than
1563
1654
  relying on form submission.
1564
1655
 
1656
+ The selected pill's border/radio dot read `--ui-button-accent` (a solid
1657
+ stand-in, since `border-color`/`accent-color` can't render a gradient),
1658
+ and its background reads the shared `--ui-button-secondary-surface-muted`
1659
+ plus `--ui-button-highlight`, so a gradient theme tints it consistently
1660
+ with `button-group`/`pagination-nav`'s equivalents.
1661
+
1565
1662
  Import: `import "@f-ewald/components/radio-pills.js";`
1566
1663
 
1567
1664
  Properties: `options` (JS property only) : RadioPillOption[], default []; `value` (attribute `value`) : string, default ""; `disabled` (attribute `disabled`) : boolean, default false
1568
1665
  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`
1666
+ 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
1667
 
1571
1668
  Example:
1572
1669
  ```html
@@ -1597,7 +1694,7 @@ Import: `import "@f-ewald/components/range-slider.js";`
1597
1694
 
1598
1695
  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
1696
  Events: `input`, `change`
1600
- CSS custom properties: `--ui-focus-ring`, `--ui-primary`, `--ui-surface`, `--ui-surface-muted`, `--ui-text-muted`
1697
+ 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
1698
 
1602
1699
  Example:
1603
1700
  ```html
@@ -1630,13 +1727,15 @@ Example:
1630
1727
 
1631
1728
  ## <reveal-button>
1632
1729
 
1633
- Button that reveals hidden slotted content when clicked.
1730
+ Button that reveals hidden slotted content when clicked. Set `size="sm"`
1731
+ for a compact button one step below the default, matching `ui-button`'s
1732
+ `sm` size.
1634
1733
 
1635
1734
  Import: `import "@f-ewald/components/reveal-button.js";`
1636
1735
 
1637
- Properties: `label` (attribute `label`) : string, default "Reveal hidden content"; `disabled` (attribute `disabled`) : boolean, default false
1736
+ Properties: `label` (attribute `label`) : string, default "Reveal hidden content"; `disabled` (attribute `disabled`) : boolean, default false; `size` (attribute `size`) : "sm" | "md", default "md"
1638
1737
  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`
1738
+ 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
1739
 
1641
1740
  Example:
1642
1741
  ```html
@@ -2101,11 +2200,29 @@ cross into from an ancestor light-DOM `<form>`. `type="submit"`/`"reset"`
2101
2200
  is instead wired through `ElementInternals.form` — the same mechanism
2102
2201
  `address-autocomplete` uses to associate with an ancestor form.
2103
2202
 
2203
+ `primary`/`danger` backgrounds read `--ui-button-background`/
2204
+ `--ui-button-danger-background` (and their `-hover`/`-active`
2205
+ counterparts), which default to the flat `--ui-primary`/`--ui-danger`
2206
+ tokens unchanged — so `--ui-primary`/`--ui-danger` stay the single source
2207
+ of truth for every other component. A consumer can override just these
2208
+ button-specific tokens with a `linear-gradient(...)` to opt every
2209
+ `ui-button` into a gradient look without touching component markup —
2210
+ `gradientTokenValues` in `tokens.ts` ships exactly this, wired up via
2211
+ `data-theme="gradient"` (see `tokens.css`'s "Gradient theme" section) —
2212
+ pairing it with `--ui-button-border`/`--ui-button-danger-border` (default
2213
+ `transparent`) for a defining edge a shade darker than the gradient's dark
2214
+ stop, and setting the `-active` variant's stops in reverse for a
2215
+ pressed/"indented" look while the button is held down. `secondary`'s
2216
+ background/border read the equivalent `--ui-button-secondary-*` tokens
2217
+ (shared with `confirm-dialog`'s Cancel button), defaulting to today's
2218
+ transparent/bordered look, so it can be themed into a matching (e.g.
2219
+ white-to-gray) gradient too.
2220
+
2104
2221
  Import: `import "@f-ewald/components/ui-button.js";`
2105
2222
 
2106
2223
  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
2224
  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`
2225
+ 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
2226
 
2110
2227
  Example:
2111
2228
  ```html
@@ -2166,6 +2283,31 @@ Example:
2166
2283
  <user-avatar src="https://example.com/photo.jpg" name="Freddy" size="40"></user-avatar>
2167
2284
  ```
2168
2285
 
2286
+ ## <video-player>
2287
+
2288
+ Video player wrapping a native `<video>` element (native `controls`
2289
+ disabled) with the same tokenized transport bar as `audio-player` — a
2290
+ play/pause `icon-button`, elapsed/total time, a seekable progress bar, a
2291
+ mute toggle + volume slider — plus a fullscreen toggle. The control bar
2292
+ sits in a persistent strip under the video frame rather than a
2293
+ hover-reveal overlay, so it stays usable for keyboard/touch input without
2294
+ a pointer hover state.
2295
+
2296
+ Import: `import "@f-ewald/components/video-player.js";`
2297
+
2298
+ 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"
2299
+ Events: `play`, `pause`, `ended`
2300
+ CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-radius`, `--ui-surface`, `--ui-text-muted`
2301
+
2302
+ Example:
2303
+ ```html
2304
+ <video-player
2305
+ src="/clip.mp4"
2306
+ poster="/clip-poster.jpg"
2307
+ label="Episode 12"
2308
+ ></video-player>
2309
+ ```
2310
+
2169
2311
  ## <weight-bar-chart>
2170
2312
 
2171
2313
  Sorted horizontal bar chart of labeled weights (normalized fractions
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.23.1",
4
+ "version": "1.25.0",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",