@f-ewald/components 1.23.0 → 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 +7 -1
- package/custom-elements.json +1966 -643
- 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 +65 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +65 -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/mcp-server.js +39 -0
- package/dist/mcp-server.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 +75 -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 +224 -23
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# `<comment-composer>`
|
|
2
|
+
|
|
3
|
+
GitHub/Slack-style comment composer: a one-line text field that expands
|
|
4
|
+
into a multi-line textarea with a bottom-right Cancel/Submit footer
|
|
5
|
+
(`form-actions`) as soon as it's focused or clicked. Submitting fires
|
|
6
|
+
`submit` with the trimmed value, then clears the field and collapses back
|
|
7
|
+
to one line — it's meant for posting one comment at a time, not editing a
|
|
8
|
+
persistent value in place (see `editable-text` for that). Canceling (the
|
|
9
|
+
Cancel button or `Escape`) discards the draft and collapses without
|
|
10
|
+
firing `submit`. Clicking away (blur) does neither — the composer stays
|
|
11
|
+
expanded until the user explicitly submits or cancels. `Cmd`/`Ctrl`+`Enter`
|
|
12
|
+
submits from the textarea, matching `editable-text`'s multiline shortcut.
|
|
13
|
+
Purely token-styled (no bespoke colors), so it's themeable via the same
|
|
14
|
+
`--ui-*` custom properties as every other value-entry field.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import "@f-ewald/components/comment-composer.js";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<comment-composer placeholder="Add a comment…"></comment-composer>
|
|
26
|
+
<script type="module">
|
|
27
|
+
document.querySelector("comment-composer").addEventListener("submit", (e) => {
|
|
28
|
+
postComment(e.detail.value);
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Attributes / properties
|
|
34
|
+
|
|
35
|
+
| Property | Attribute | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- | --- |
|
|
37
|
+
| `value` | `value` | `string` | `""` | Committed value shown in the collapsed one-line field. |
|
|
38
|
+
| `placeholder` | `placeholder` | `string` | `"Add a comment…"` | Placeholder text shown when empty. |
|
|
39
|
+
| `label` | `label` | `string` | `"Comment"` | Accessible name applied to the input/textarea. |
|
|
40
|
+
| `rows` | `rows` | `number` | `4` | Visible row count once expanded. |
|
|
41
|
+
| `submitLabel` | `submit-label` | `string` | `"Submit"` | Label for the primary submit button. |
|
|
42
|
+
| `cancelLabel` | `cancel-label` | `string` | `"Cancel"` | Label for the secondary cancel button. |
|
|
43
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables the field entirely. |
|
|
44
|
+
|
|
45
|
+
## Events
|
|
46
|
+
|
|
47
|
+
| Event | Description |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `cancel` | User discarded the draft via the Cancel button or `Escape`. |
|
|
50
|
+
| `submit` | User submitted a non-empty comment; detail: `{ value: string }`. |
|
|
51
|
+
|
|
52
|
+
## Slots
|
|
53
|
+
|
|
54
|
+
_None._
|
|
55
|
+
|
|
56
|
+
## CSS custom properties
|
|
57
|
+
|
|
58
|
+
| Custom property |
|
|
59
|
+
| --- |
|
|
60
|
+
| `--ui-border` |
|
|
61
|
+
| `--ui-focus-ring` |
|
|
62
|
+
| `--ui-font` |
|
|
63
|
+
| `--ui-font-size` |
|
|
64
|
+
| `--ui-line-height-normal` |
|
|
65
|
+
| `--ui-radius` |
|
|
66
|
+
| `--ui-radius-sm` |
|
|
67
|
+
| `--ui-surface` |
|
|
68
|
+
| `--ui-text` |
|
package/docs/confirm-dialog.md
CHANGED
|
@@ -4,7 +4,8 @@ Reusable confirmation dialog: overlay + centered card with a slotted body,
|
|
|
4
4
|
an optional error line, and Cancel/Confirm actions. Instant `display:none`
|
|
5
5
|
→ `display:flex` toggle (no transitions). Fires `confirm`/`cancel`
|
|
6
6
|
(bubbling, composed) instead of owning any deletion logic itself —
|
|
7
|
-
callers stay in charge of the request.
|
|
7
|
+
callers stay in charge of the request. Set `size="sm"` for compact
|
|
8
|
+
actions one step below the default, matching `ui-button`'s `sm` size.
|
|
8
9
|
|
|
9
10
|
## Install
|
|
10
11
|
|
|
@@ -30,6 +31,7 @@ import "@f-ewald/components/confirm-dialog.js";
|
|
|
30
31
|
| `danger` | `danger` | `boolean` | `true` | Danger (red) vs. primary (indigo) styling for the confirm button. |
|
|
31
32
|
| `busy` | `busy` | `boolean` | `false` | Shows a spinner and disables both buttons while a request is in flight. |
|
|
32
33
|
| `error` | `error` | `string | null` | `null` | Inline error line shown below the body, or null for none. |
|
|
34
|
+
| `size` | `size` | `"sm" | "md"` | `"md"` | Size — `sm` reduces both action buttons' height/padding/font-size one step below the default. |
|
|
33
35
|
|
|
34
36
|
## Events
|
|
35
37
|
|
|
@@ -49,12 +51,28 @@ import "@f-ewald/components/confirm-dialog.js";
|
|
|
49
51
|
| Custom property |
|
|
50
52
|
| --- |
|
|
51
53
|
| `--ui-border` |
|
|
54
|
+
| `--ui-button-background` |
|
|
55
|
+
| `--ui-button-background-active` |
|
|
56
|
+
| `--ui-button-background-hover` |
|
|
57
|
+
| `--ui-button-border` |
|
|
58
|
+
| `--ui-button-danger-background` |
|
|
59
|
+
| `--ui-button-danger-background-active` |
|
|
60
|
+
| `--ui-button-danger-background-hover` |
|
|
61
|
+
| `--ui-button-danger-border` |
|
|
62
|
+
| `--ui-button-highlight` |
|
|
63
|
+
| `--ui-button-secondary-background` |
|
|
64
|
+
| `--ui-button-secondary-background-active` |
|
|
65
|
+
| `--ui-button-secondary-background-hover` |
|
|
66
|
+
| `--ui-button-secondary-border` |
|
|
67
|
+
| `--ui-button-secondary-border-hover` |
|
|
68
|
+
| `--ui-button-text-shadow` |
|
|
52
69
|
| `--ui-danger` |
|
|
53
70
|
| `--ui-danger-hover` |
|
|
54
71
|
| `--ui-focus-ring` |
|
|
55
72
|
| `--ui-font` |
|
|
56
73
|
| `--ui-font-size` |
|
|
57
74
|
| `--ui-font-size-sm` |
|
|
75
|
+
| `--ui-font-size-xs` |
|
|
58
76
|
| `--ui-font-weight-medium` |
|
|
59
77
|
| `--ui-line-height-normal` |
|
|
60
78
|
| `--ui-line-height-tight` |
|
package/docs/dropdown-button.md
CHANGED
|
@@ -10,7 +10,8 @@ primary-filled button with a label and a rotating chevron), `text-icon`
|
|
|
10
10
|
(the same, with `icon` ahead of the label), and `icon` (a borderless,
|
|
11
11
|
square, low-emphasis icon target in the style of `icon-button` — the
|
|
12
12
|
classic "three-dot"/overflow menu, where `label` becomes the accessible
|
|
13
|
-
name rather than visible text).
|
|
13
|
+
name rather than visible text). Set `size="sm"` for a compact trigger one
|
|
14
|
+
step below the default, matching `ui-button`'s `sm` size.
|
|
14
15
|
|
|
15
16
|
## Install
|
|
16
17
|
|
|
@@ -50,6 +51,7 @@ import "@f-ewald/components/dropdown-button.js";
|
|
|
50
51
|
| `disabled` | `disabled` | `boolean` | `false` | Disables the trigger, preventing the menu from opening. |
|
|
51
52
|
| `variant` | `variant` | `DropdownButtonVariant` | `"text"` | Trigger presentation: label only, icon only, or icon + label. |
|
|
52
53
|
| `icon` | _(JS property only)_ | `TemplateResult | null` | `null` | Icon template rendered by the `icon` and `text-icon` variants. |
|
|
54
|
+
| `size` | `size` | `"sm" | "md"` | `"md"` | Size — `sm` reduces the trigger's height/padding/font-size one step below the default. |
|
|
53
55
|
|
|
54
56
|
## Events
|
|
55
57
|
|
|
@@ -66,11 +68,18 @@ _None._
|
|
|
66
68
|
| Custom property |
|
|
67
69
|
| --- |
|
|
68
70
|
| `--ui-border` |
|
|
71
|
+
| `--ui-button-background` |
|
|
72
|
+
| `--ui-button-background-active` |
|
|
73
|
+
| `--ui-button-background-hover` |
|
|
74
|
+
| `--ui-button-border` |
|
|
75
|
+
| `--ui-button-highlight` |
|
|
76
|
+
| `--ui-button-text-shadow` |
|
|
69
77
|
| `--ui-danger` |
|
|
70
78
|
| `--ui-danger-hover` |
|
|
71
79
|
| `--ui-focus-ring` |
|
|
72
80
|
| `--ui-font` |
|
|
73
81
|
| `--ui-font-size-sm` |
|
|
82
|
+
| `--ui-font-size-xs` |
|
|
74
83
|
| `--ui-font-weight-medium` |
|
|
75
84
|
| `--ui-line-height-tight` |
|
|
76
85
|
| `--ui-on-accent` |
|
package/docs/icons.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Icon catalog
|
|
2
|
+
|
|
3
|
+
Every icon in `@f-ewald/components/icons.js`, generated from
|
|
4
|
+
`scripts/generate-icons.mjs` by `npm run icons`, with the intended use case
|
|
5
|
+
for each so consumers (including AI coding agents) pick a consistent icon for
|
|
6
|
+
a given situation instead of ad hoc choices. Each is a function taking an
|
|
7
|
+
optional `size` (pixels) and returning a Lit `TemplateResult`:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import { iconPencil } from "@f-ewald/components/icons.js";
|
|
11
|
+
|
|
12
|
+
const icon = iconPencil(16); // 16px, defaults shown below if omitted
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
| Icon | Default size | Use for |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `iconAcademicCap` | 18px | Education, learning, or certification-related content. |
|
|
18
|
+
| `iconArrowDownTray` | 16px | Download or export actions. |
|
|
19
|
+
| `iconArrowPath` | 12px | Refresh actions, or an animated busy/loading spinner. |
|
|
20
|
+
| `iconArrowRight` | 12px | "Continue" or forward-progressing actions, e.g. a compact next-step arrow. |
|
|
21
|
+
| `iconArrowRightOnRectangle` | 16px | Logout/sign-out actions. |
|
|
22
|
+
| `iconArrowsPointingIn` | 16px | "Exit fullscreen" actions; pair with iconArrowsPointingOut for entering fullscreen. |
|
|
23
|
+
| `iconArrowsPointingOut` | 16px | "Expand" or "view fullscreen" actions. |
|
|
24
|
+
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
25
|
+
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
26
|
+
| `iconBars3` | 18px | A hamburger menu toggle, e.g. collapsing or opening a sidebar/nav drawer. |
|
|
27
|
+
| `iconCalendar` | 16px | Dates, due dates, or calendar-related metadata. |
|
|
28
|
+
| `iconChatBubbleLeftRight` | 18px | Messaging, comments, or conversation-related content. |
|
|
29
|
+
| `iconCheckCircle` | 16px | Success states, confirmations, or a selected-item checkmark. |
|
|
30
|
+
| `iconChevronDown` | 16px | "Scroll to bottom", a downward disclosure, or an expanded tree/accordion indicator. |
|
|
31
|
+
| `iconChevronLeft` | 16px | "Previous" navigation, e.g. pagination or carousel back controls. |
|
|
32
|
+
| `iconChevronRight` | 16px | "Next" navigation, or a collapsed disclosure/submenu indicator. |
|
|
33
|
+
| `iconChevronUp` | 16px | "Scroll to top", or an expanded/upward disclosure control. |
|
|
34
|
+
| `iconClipboardDocumentList` | 18px | Task lists, checklists, or clipboard/notes content. |
|
|
35
|
+
| `iconClock` | 16px | Timestamps, durations, or time-related metadata. |
|
|
36
|
+
| `iconCodeBracketSquare` | 16px | Code snippets, developer tools, or technical/API content. |
|
|
37
|
+
| `iconCog` | 20px | Settings, preferences, or configuration entry points. |
|
|
38
|
+
| `iconComputerDesktop` | 16px | A "system/auto" theme option, or to represent a desktop device. |
|
|
39
|
+
| `iconCpuChip` | 18px | System, hardware, or technical/processing content. |
|
|
40
|
+
| `iconCurrencyDollar` | 16px | Monetary values, pricing, or billing-related content. |
|
|
41
|
+
| `iconDocument` | 18px | A generic file/document icon, e.g. tile-grid's default file icon. |
|
|
42
|
+
| `iconEllipsisVertical` | 16px | An overflow ("kebab") menu trigger, e.g. dropdown-button's icon variant. |
|
|
43
|
+
| `iconExclamationCircle` | 16px | Error states, e.g. the error variant of toast-notification. |
|
|
44
|
+
| `iconExclamationTriangle` | 16px | Warning states, e.g. the warning variant of toast-notification. |
|
|
45
|
+
| `iconEye` | 16px | "Show"/"preview" actions or a visible/reviewed state, e.g. password visibility or a review status. |
|
|
46
|
+
| `iconEyeSlash` | 16px | "Hide" actions or a hidden/masked state; pair with iconEye for the visible state. |
|
|
47
|
+
| `iconFolder` | 18px | Folders, directories, or grouped file content. |
|
|
48
|
+
| `iconHeart` | 16px | "Like"/"favorite" actions in their unselected state. |
|
|
49
|
+
| `iconHeartSolid` | 16px | "Like"/"favorite" actions in their selected/active state; pair with iconHeart for the unselected state. |
|
|
50
|
+
| `iconHome` | 16px | A primary navigation link to the app's home or dashboard. |
|
|
51
|
+
| `iconInfo` | 20px | Neutral informational messages, e.g. an info toast or status banner. |
|
|
52
|
+
| `iconLink` | 16px | Copy-link or hyperlink-related actions, e.g. copy-link-button. |
|
|
53
|
+
| `iconListBullet` | 18px | A list-view toggle, or to represent list-type content. |
|
|
54
|
+
| `iconMap` | 16px | A map-view toggle, or to represent map/geographic content. |
|
|
55
|
+
| `iconMapPin` | 16px | A location, address, or map marker. |
|
|
56
|
+
| `iconMoon` | 16px | A dark-theme toggle, or to represent night/dark mode. |
|
|
57
|
+
| `iconPause` | 18px | "Pause" transport actions, e.g. audio-player/video-player's playing state. |
|
|
58
|
+
| `iconPencil` | 16px | Edit actions, e.g. an edit icon-button or inline edit toggle. |
|
|
59
|
+
| `iconPlay` | 18px | "Play" transport actions, e.g. audio-player/video-player's paused state. |
|
|
60
|
+
| `iconPlus` | 16px | "Add new" actions, e.g. creating a new item or row. |
|
|
61
|
+
| `iconPuzzlePiece` | 18px | Plugins, integrations, or extensible/add-on features. |
|
|
62
|
+
| `iconQuestionMarkCircle` | 20px | Help, tooltips, or "learn more" affordances. |
|
|
63
|
+
| `iconQueueList` | 16px | Queues, backlogs, or ordered work-item lists. |
|
|
64
|
+
| `iconShieldCheck` | 16px | Verified, secure, or trusted states. |
|
|
65
|
+
| `iconShieldExclamation` | 16px | Security warnings, or at-risk/compromised states. |
|
|
66
|
+
| `iconSpeakerWave` | 18px | An unmuted volume control, e.g. audio-player/video-player's mute toggle. |
|
|
67
|
+
| `iconSpeakerXMark` | 18px | A muted volume state; pair with iconSpeakerWave for the unmuted state. |
|
|
68
|
+
| `iconSquares2x2` | 18px | A grid or kanban-view toggle, or to represent card/tile layouts. |
|
|
69
|
+
| `iconSun` | 16px | A light-theme toggle, or to represent daytime/light mode. |
|
|
70
|
+
| `iconTag` | 16px | Tags, labels, or categorical metadata. |
|
|
71
|
+
| `iconTrash` | 16px | Delete/remove actions, typically paired with a destructive/danger style. |
|
|
72
|
+
| `iconUserCircle` | 20px | A generic user/person fallback, e.g. user-avatar's icon fallback. |
|
|
73
|
+
| `iconUsers` | 18px | Teams, groups, or multi-user/collaboration content. |
|
|
74
|
+
| `iconWrenchScrewdriver` | 18px | Tools, maintenance, or build/configuration actions. |
|
|
75
|
+
| `iconX` | 18px | Close, dismiss, or clear (e.g. a modal, toast, or clearable input). |
|
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` |
|