@f-ewald/components 1.25.0 → 1.27.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 -3
- package/custom-elements.json +1390 -181
- package/dist/calendar-day.d.ts +33 -0
- package/dist/calendar-day.d.ts.map +1 -0
- package/dist/calendar-day.js +280 -0
- package/dist/calendar-day.js.map +1 -0
- package/dist/calendar-timeline-base.d.ts +43 -0
- package/dist/calendar-timeline-base.d.ts.map +1 -0
- package/dist/calendar-timeline-base.js +113 -0
- package/dist/calendar-timeline-base.js.map +1 -0
- package/dist/calendar-week.d.ts +37 -0
- package/dist/calendar-week.d.ts.map +1 -0
- package/dist/calendar-week.js +315 -0
- package/dist/calendar-week.js.map +1 -0
- package/dist/comment-composer.d.ts +15 -1
- package/dist/comment-composer.d.ts.map +1 -1
- package/dist/comment-composer.js +25 -3
- package/dist/comment-composer.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/modal-dialog.d.ts +49 -0
- package/dist/modal-dialog.d.ts.map +1 -0
- package/dist/modal-dialog.js +287 -0
- package/dist/modal-dialog.js.map +1 -0
- package/dist/toast-notification.d.ts +14 -0
- package/dist/toast-notification.d.ts.map +1 -1
- package/dist/toast-notification.js +23 -8
- package/dist/toast-notification.js.map +1 -1
- package/dist/tokens.css +15 -3
- package/dist/tokens.d.ts +9 -8
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +43 -15
- package/dist/tokens.js.map +1 -1
- package/dist/ui-button.d.ts +2 -0
- package/dist/ui-button.d.ts.map +1 -1
- package/dist/ui-button.js +9 -1
- package/dist/ui-button.js.map +1 -1
- package/dist/utils/calendar.d.ts +41 -0
- package/dist/utils/calendar.d.ts.map +1 -1
- package/dist/utils/calendar.js +74 -0
- package/dist/utils/calendar.js.map +1 -1
- package/docs/calendar-day.md +70 -0
- package/docs/calendar-week.md +69 -0
- package/docs/comment-composer.md +5 -1
- package/docs/modal-dialog.md +66 -0
- package/docs/toast-notification.md +23 -0
- package/docs/ui-button.md +1 -0
- package/llms.txt +108 -3
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `<calendar-week>`
|
|
2
|
+
|
|
3
|
+
Sunday-through-Saturday week rendered as one shared hourly time grid — the
|
|
4
|
+
seven-day sibling of `calendar-day`. Unlike `calendar-year` composing 12
|
|
5
|
+
`calendar-month` children, this is its own independent 7-column layout
|
|
6
|
+
(not 7 nested `<calendar-day>` elements): a single hour gutter is drawn
|
|
7
|
+
once, and multi-day/all-day entries span the days they cover as one
|
|
8
|
+
continuous bar in a shared all-day band, since lanes for that band are
|
|
9
|
+
assigned once across the whole visible week (unlike `calendar-month`'s
|
|
10
|
+
documented per-instance lane limitation). Timed entries stack into
|
|
11
|
+
side-by-side columns independently per day, same as `calendar-day`.
|
|
12
|
+
Read-only.
|
|
13
|
+
|
|
14
|
+
Shares its slotted-entry observation, resolution, and hover/focus
|
|
15
|
+
interaction sync with `calendar-day` via `CalendarTimelineBase`.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import "@f-ewald/components/calendar-week.js";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<calendar-week date="2026-07-15">
|
|
27
|
+
<calendar-entry start="2026-07-13" end="2026-07-15" label="Offsite" color="primary" href="#offsite"></calendar-entry>
|
|
28
|
+
<calendar-entry start="2026-07-14T09:00" end="2026-07-14T09:30" label="Standup" color="info"></calendar-entry>
|
|
29
|
+
<calendar-entry start="2026-07-16T14:00" end="2026-07-16T15:00" label="Customer demo" color="success"></calendar-entry>
|
|
30
|
+
</calendar-week>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Attributes / properties
|
|
34
|
+
|
|
35
|
+
| Property | Attribute | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- | --- |
|
|
37
|
+
| `date` | `date` | `string` | `—` | Any date within the displayed week (`"YYYY-MM-DD"`) — the week runs Sunday through Saturday. |
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
_None._
|
|
42
|
+
|
|
43
|
+
## Slots
|
|
44
|
+
|
|
45
|
+
| Slot | Description |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `(default)` | Declarative `calendar-entry` elements to render for this week. |
|
|
48
|
+
|
|
49
|
+
## CSS custom properties
|
|
50
|
+
|
|
51
|
+
| Custom property |
|
|
52
|
+
| --- |
|
|
53
|
+
| `--ui-border` |
|
|
54
|
+
| `--ui-danger` |
|
|
55
|
+
| `--ui-focus-ring` |
|
|
56
|
+
| `--ui-font` |
|
|
57
|
+
| `--ui-font-size-lg` |
|
|
58
|
+
| `--ui-font-size-sm` |
|
|
59
|
+
| `--ui-font-weight-medium` |
|
|
60
|
+
| `--ui-font-weight-semibold` |
|
|
61
|
+
| `--ui-hover-overlay` |
|
|
62
|
+
| `--ui-info` |
|
|
63
|
+
| `--ui-primary` |
|
|
64
|
+
| `--ui-radius-sm` |
|
|
65
|
+
| `--ui-success` |
|
|
66
|
+
| `--ui-surface` |
|
|
67
|
+
| `--ui-text` |
|
|
68
|
+
| `--ui-text-muted` |
|
|
69
|
+
| `--ui-warning` |
|
package/docs/comment-composer.md
CHANGED
|
@@ -9,7 +9,11 @@ persistent value in place (see `editable-text` for that). Canceling (the
|
|
|
9
9
|
Cancel button or `Escape`) discards the draft and collapses without
|
|
10
10
|
firing `submit`. Clicking away (blur) does neither — the composer stays
|
|
11
11
|
expanded until the user explicitly submits or cancels. `Cmd`/`Ctrl`+`Enter`
|
|
12
|
-
submits from the textarea, matching `editable-text`'s multiline shortcut
|
|
12
|
+
submits from the textarea, matching `editable-text`'s multiline shortcut —
|
|
13
|
+
the Submit button always shows a `kbd-hint` for it, so the shortcut is
|
|
14
|
+
discoverable rather than a hidden power-user feature. Calling the standard
|
|
15
|
+
`.focus()` method expands the composer (if collapsed) and focuses its
|
|
16
|
+
field, for an ancestor that wants to drive it programmatically.
|
|
13
17
|
Purely token-styled (no bespoke colors), so it's themeable via the same
|
|
14
18
|
`--ui-*` custom properties as every other value-entry field.
|
|
15
19
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# `<modal-dialog>`
|
|
2
|
+
|
|
3
|
+
Generic centered modal-dialog shell: overlay + card with header chrome, a
|
|
4
|
+
close button, and an arbitrary slotted body — the modal sibling to
|
|
5
|
+
`slide-panel` (fixed-edge) and `popover-panel` (anchored). Unlike
|
|
6
|
+
`confirm-dialog`, it has no baked-in actions; the consumer supplies the
|
|
7
|
+
body content (a form, a read-only viewer, a table) and any footer buttons
|
|
8
|
+
itself. Instant `display:none` → `display:flex` toggle, no transition.
|
|
9
|
+
Traps focus, closes on Escape, and restores focus to the trigger on
|
|
10
|
+
close, stacking correctly against other open `confirm-dialog`/
|
|
11
|
+
`slide-panel`/`popover-panel`/`modal-dialog` layers.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import "@f-ewald/components/modal-dialog.js";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<modal-dialog open heading="Changelog" dismissible>
|
|
23
|
+
Dialog body content goes here.
|
|
24
|
+
</modal-dialog>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Attributes / properties
|
|
28
|
+
|
|
29
|
+
| Property | Attribute | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- | --- |
|
|
31
|
+
| `open` | `open` | `boolean` | `false` | Whether the dialog is visible. |
|
|
32
|
+
| `heading` | `heading` | `string` | `""` | Title text shown in the dialog header (overridable via slot="title"). |
|
|
33
|
+
| `size` | `size` | `ModalDialogSize` | `"default"` | `"lg"` widens the dialog to 60rem for content like tables; `"default"` is 25rem; `"fullscreen"` covers the entire viewport edge-to-edge with no border-radius or overlay padding. |
|
|
34
|
+
| `dismissible` | `dismissible` | `boolean` | `false` | When true, clicking the backdrop also closes the dialog (off by default — safe for forms with unsaved input). |
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Event | Description |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `panel-close` | User clicked the close (✕) button, pressed Escape, or (when `dismissible`) clicked the backdrop. |
|
|
41
|
+
|
|
42
|
+
## Slots
|
|
43
|
+
|
|
44
|
+
| Slot | Description |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `(default)` | Dialog body content. |
|
|
47
|
+
| `title` | Overrides the header title text (falls back to the `heading` property). |
|
|
48
|
+
|
|
49
|
+
## CSS custom properties
|
|
50
|
+
|
|
51
|
+
| Custom property |
|
|
52
|
+
| --- |
|
|
53
|
+
| `--ui-border` |
|
|
54
|
+
| `--ui-focus-ring` |
|
|
55
|
+
| `--ui-font` |
|
|
56
|
+
| `--ui-font-size-lg` |
|
|
57
|
+
| `--ui-font-weight-semibold` |
|
|
58
|
+
| `--ui-line-height-tight` |
|
|
59
|
+
| `--ui-overlay` |
|
|
60
|
+
| `--ui-radius` |
|
|
61
|
+
| `--ui-radius-sm` |
|
|
62
|
+
| `--ui-shadow-lg` |
|
|
63
|
+
| `--ui-surface` |
|
|
64
|
+
| `--ui-surface-muted` |
|
|
65
|
+
| `--ui-text` |
|
|
66
|
+
| `--ui-text-muted` |
|
|
@@ -14,6 +14,20 @@ circle, info → information circle, warning → exclamation triangle). Each toa
|
|
|
14
14
|
auto-dismisses after `duration` ms and can also be dismissed via its ✕
|
|
15
15
|
button. Appears/disappears instantly — no slide/fade transitions.
|
|
16
16
|
|
|
17
|
+
Each variant's background reads a dedicated `--ui-toast-*-background` hook
|
|
18
|
+
(`success`/`error`/`info`/`warning`), which defaults to the flat
|
|
19
|
+
`--ui-success`/`--ui-danger`/`--ui-info`/`--ui-warning` tokens unchanged —
|
|
20
|
+
so those stay the single source of truth for every other component. A
|
|
21
|
+
consumer can override just these toast-specific tokens with a
|
|
22
|
+
`linear-gradient(...)` to opt every toast into a gradient look without
|
|
23
|
+
touching component markup — `gradientTokenValues` in `tokens.ts` ships
|
|
24
|
+
exactly this, wired up via `data-theme="gradient"` (see `tokens.css`'s
|
|
25
|
+
"Gradient theme" section), the same mechanism `ui-button` uses.
|
|
26
|
+
`--ui-toast-highlight` (a glossy top-edge box-shadow, layered onto the
|
|
27
|
+
existing elevation shadow) and `--ui-toast-text-shadow` (legibility
|
|
28
|
+
against the gradient's lighter stop) round out the effect, mirroring
|
|
29
|
+
`ui-button`'s `--ui-button-highlight`/`--ui-button-text-shadow`.
|
|
30
|
+
|
|
17
31
|
## Install
|
|
18
32
|
|
|
19
33
|
```js
|
|
@@ -46,6 +60,8 @@ _None._
|
|
|
46
60
|
|
|
47
61
|
| Custom property |
|
|
48
62
|
| --- |
|
|
63
|
+
| `--ui-button-highlight` |
|
|
64
|
+
| `--ui-button-text-shadow` |
|
|
49
65
|
| `--ui-danger` |
|
|
50
66
|
| `--ui-focus-ring` |
|
|
51
67
|
| `--ui-font` |
|
|
@@ -63,4 +79,11 @@ _None._
|
|
|
63
79
|
| `--ui-shadow-lg` |
|
|
64
80
|
| `--ui-success` |
|
|
65
81
|
| `--ui-text` |
|
|
82
|
+
| `--ui-toast-` |
|
|
83
|
+
| `--ui-toast-error-background` |
|
|
84
|
+
| `--ui-toast-highlight` |
|
|
85
|
+
| `--ui-toast-info-background` |
|
|
86
|
+
| `--ui-toast-success-background` |
|
|
87
|
+
| `--ui-toast-text-shadow` |
|
|
88
|
+
| `--ui-toast-warning-background` |
|
|
66
89
|
| `--ui-warning` |
|
package/docs/ui-button.md
CHANGED
|
@@ -54,6 +54,7 @@ import "@f-ewald/components/ui-button.js";
|
|
|
54
54
|
| --- | --- | --- | --- | --- |
|
|
55
55
|
| `variant` | `variant` | `ButtonVariant` | `"primary"` | Visual weight. |
|
|
56
56
|
| `size` | `size` | `"sm" | "md"` | `"md"` | Size — `sm` reduces height/padding/font-size one step below the default. |
|
|
57
|
+
| `pill` | `pill` | `boolean` | `false` | Renders fully rounded (pill-shaped) corners instead of the default `--ui-radius-sm`. |
|
|
57
58
|
| `href` | `href` | `string | null` | `null` | Renders an `<a href="...">` instead of a `<button>` when set. |
|
|
58
59
|
| `type` | `type` | `"button" | "submit" | "reset"` | `"button"` | Native button `type`. Ignored when `href` is set. |
|
|
59
60
|
| `disabled` | `disabled` | `boolean` | `false` | Disables the control and dims it. |
|
package/llms.txt
CHANGED
|
@@ -384,6 +384,37 @@ Example:
|
|
|
384
384
|
</script>
|
|
385
385
|
```
|
|
386
386
|
|
|
387
|
+
## <calendar-day>
|
|
388
|
+
|
|
389
|
+
A single day rendered as an hourly time grid — a Google-Calendar-style
|
|
390
|
+
view distinct from `calendar-month`'s whole-day table. Declarative
|
|
391
|
+
`calendar-entry` children with a time-of-day in `start`/`end` (e.g.
|
|
392
|
+
`start="2026-03-05T09:00"`) render as positioned/sized blocks; entries
|
|
393
|
+
with only a date (no time) render in an all-day band above the grid.
|
|
394
|
+
Overlapping timed entries stack into side-by-side columns; overlapping
|
|
395
|
+
all-day/multi-day entries stack into lanes, same as `calendar-month`.
|
|
396
|
+
Read-only.
|
|
397
|
+
|
|
398
|
+
Shares its slotted-entry observation, resolution, and hover/focus
|
|
399
|
+
interaction sync with `calendar-week` via `CalendarTimelineBase`.
|
|
400
|
+
|
|
401
|
+
Import: `import "@f-ewald/components/calendar-day.js";`
|
|
402
|
+
|
|
403
|
+
Properties: `date` (attribute `date`) : string, default —
|
|
404
|
+
Events: none
|
|
405
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
|
|
406
|
+
|
|
407
|
+
Example:
|
|
408
|
+
```html
|
|
409
|
+
<calendar-day date="2026-07-15">
|
|
410
|
+
<calendar-entry start="2026-07-15" end="2026-07-15" label="Company holiday" color="neutral"></calendar-entry>
|
|
411
|
+
<calendar-entry start="2026-07-15T09:00" end="2026-07-15T09:30" label="Standup" color="info"></calendar-entry>
|
|
412
|
+
<calendar-entry start="2026-07-15T09:15" end="2026-07-15T10:00" label="Design review" color="primary" href="#review">
|
|
413
|
+
<span slot="detail">Walk through the new onboarding flow</span>
|
|
414
|
+
</calendar-entry>
|
|
415
|
+
</calendar-day>
|
|
416
|
+
```
|
|
417
|
+
|
|
387
418
|
## <calendar-entry>
|
|
388
419
|
|
|
389
420
|
Declarative metadata for one calendar event, consumed by a parent
|
|
@@ -451,6 +482,37 @@ Example:
|
|
|
451
482
|
</calendar-month>
|
|
452
483
|
```
|
|
453
484
|
|
|
485
|
+
## <calendar-week>
|
|
486
|
+
|
|
487
|
+
Sunday-through-Saturday week rendered as one shared hourly time grid — the
|
|
488
|
+
seven-day sibling of `calendar-day`. Unlike `calendar-year` composing 12
|
|
489
|
+
`calendar-month` children, this is its own independent 7-column layout
|
|
490
|
+
(not 7 nested `<calendar-day>` elements): a single hour gutter is drawn
|
|
491
|
+
once, and multi-day/all-day entries span the days they cover as one
|
|
492
|
+
continuous bar in a shared all-day band, since lanes for that band are
|
|
493
|
+
assigned once across the whole visible week (unlike `calendar-month`'s
|
|
494
|
+
documented per-instance lane limitation). Timed entries stack into
|
|
495
|
+
side-by-side columns independently per day, same as `calendar-day`.
|
|
496
|
+
Read-only.
|
|
497
|
+
|
|
498
|
+
Shares its slotted-entry observation, resolution, and hover/focus
|
|
499
|
+
interaction sync with `calendar-day` via `CalendarTimelineBase`.
|
|
500
|
+
|
|
501
|
+
Import: `import "@f-ewald/components/calendar-week.js";`
|
|
502
|
+
|
|
503
|
+
Properties: `date` (attribute `date`) : string, default —
|
|
504
|
+
Events: none
|
|
505
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-size-sm`, `--ui-font-weight-medium`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-primary`, `--ui-radius-sm`, `--ui-success`, `--ui-surface`, `--ui-text`, `--ui-text-muted`, `--ui-warning`
|
|
506
|
+
|
|
507
|
+
Example:
|
|
508
|
+
```html
|
|
509
|
+
<calendar-week date="2026-07-15">
|
|
510
|
+
<calendar-entry start="2026-07-13" end="2026-07-15" label="Offsite" color="primary" href="#offsite"></calendar-entry>
|
|
511
|
+
<calendar-entry start="2026-07-14T09:00" end="2026-07-14T09:30" label="Standup" color="info"></calendar-entry>
|
|
512
|
+
<calendar-entry start="2026-07-16T14:00" end="2026-07-16T15:00" label="Customer demo" color="success"></calendar-entry>
|
|
513
|
+
</calendar-week>
|
|
514
|
+
```
|
|
515
|
+
|
|
454
516
|
## <calendar-year>
|
|
455
517
|
|
|
456
518
|
A full year of `calendar-month` blocks, generated from declarative
|
|
@@ -543,7 +605,11 @@ persistent value in place (see `editable-text` for that). Canceling (the
|
|
|
543
605
|
Cancel button or `Escape`) discards the draft and collapses without
|
|
544
606
|
firing `submit`. Clicking away (blur) does neither — the composer stays
|
|
545
607
|
expanded until the user explicitly submits or cancels. `Cmd`/`Ctrl`+`Enter`
|
|
546
|
-
submits from the textarea, matching `editable-text`'s multiline shortcut
|
|
608
|
+
submits from the textarea, matching `editable-text`'s multiline shortcut —
|
|
609
|
+
the Submit button always shows a `kbd-hint` for it, so the shortcut is
|
|
610
|
+
discoverable rather than a hidden power-user feature. Calling the standard
|
|
611
|
+
`.focus()` method expands the composer (if collapsed) and focuses its
|
|
612
|
+
field, for an ancestor that wants to drive it programmatically.
|
|
547
613
|
Purely token-styled (no bespoke colors), so it's themeable via the same
|
|
548
614
|
`--ui-*` custom properties as every other value-entry field.
|
|
549
615
|
|
|
@@ -1360,6 +1426,31 @@ See the [changelog](#markdown-view) for details.`;
|
|
|
1360
1426
|
</script>
|
|
1361
1427
|
```
|
|
1362
1428
|
|
|
1429
|
+
## <modal-dialog>
|
|
1430
|
+
|
|
1431
|
+
Generic centered modal-dialog shell: overlay + card with header chrome, a
|
|
1432
|
+
close button, and an arbitrary slotted body — the modal sibling to
|
|
1433
|
+
`slide-panel` (fixed-edge) and `popover-panel` (anchored). Unlike
|
|
1434
|
+
`confirm-dialog`, it has no baked-in actions; the consumer supplies the
|
|
1435
|
+
body content (a form, a read-only viewer, a table) and any footer buttons
|
|
1436
|
+
itself. Instant `display:none` → `display:flex` toggle, no transition.
|
|
1437
|
+
Traps focus, closes on Escape, and restores focus to the trigger on
|
|
1438
|
+
close, stacking correctly against other open `confirm-dialog`/
|
|
1439
|
+
`slide-panel`/`popover-panel`/`modal-dialog` layers.
|
|
1440
|
+
|
|
1441
|
+
Import: `import "@f-ewald/components/modal-dialog.js";`
|
|
1442
|
+
|
|
1443
|
+
Properties: `open` (attribute `open`) : boolean, default false; `heading` (attribute `heading`) : string, default ""; `size` (attribute `size`) : ModalDialogSize, default "default"; `dismissible` (attribute `dismissible`) : boolean, default false
|
|
1444
|
+
Events: `panel-close`
|
|
1445
|
+
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-lg`, `--ui-font-weight-semibold`, `--ui-line-height-tight`, `--ui-overlay`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1446
|
+
|
|
1447
|
+
Example:
|
|
1448
|
+
```html
|
|
1449
|
+
<modal-dialog open heading="Changelog" dismissible>
|
|
1450
|
+
Dialog body content goes here.
|
|
1451
|
+
</modal-dialog>
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1363
1454
|
## <multi-select>
|
|
1364
1455
|
|
|
1365
1456
|
A form-associated multi-select: a trigger showing a compact summary of the
|
|
@@ -2127,11 +2218,25 @@ circle, info → information circle, warning → exclamation triangle). Each toa
|
|
|
2127
2218
|
auto-dismisses after `duration` ms and can also be dismissed via its ✕
|
|
2128
2219
|
button. Appears/disappears instantly — no slide/fade transitions.
|
|
2129
2220
|
|
|
2221
|
+
Each variant's background reads a dedicated `--ui-toast-*-background` hook
|
|
2222
|
+
(`success`/`error`/`info`/`warning`), which defaults to the flat
|
|
2223
|
+
`--ui-success`/`--ui-danger`/`--ui-info`/`--ui-warning` tokens unchanged —
|
|
2224
|
+
so those stay the single source of truth for every other component. A
|
|
2225
|
+
consumer can override just these toast-specific tokens with a
|
|
2226
|
+
`linear-gradient(...)` to opt every toast into a gradient look without
|
|
2227
|
+
touching component markup — `gradientTokenValues` in `tokens.ts` ships
|
|
2228
|
+
exactly this, wired up via `data-theme="gradient"` (see `tokens.css`'s
|
|
2229
|
+
"Gradient theme" section), the same mechanism `ui-button` uses.
|
|
2230
|
+
`--ui-toast-highlight` (a glossy top-edge box-shadow, layered onto the
|
|
2231
|
+
existing elevation shadow) and `--ui-toast-text-shadow` (legibility
|
|
2232
|
+
against the gradient's lighter stop) round out the effect, mirroring
|
|
2233
|
+
`ui-button`'s `--ui-button-highlight`/`--ui-button-text-shadow`.
|
|
2234
|
+
|
|
2130
2235
|
Import: `import "@f-ewald/components/toast-notification.js";`
|
|
2131
2236
|
|
|
2132
2237
|
Properties: none
|
|
2133
2238
|
Events: none
|
|
2134
|
-
CSS custom properties: `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-glyph`, `--ui-line-height-normal`, `--ui-on-accent`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-success`, `--ui-text`, `--ui-warning`
|
|
2239
|
+
CSS custom properties: `--ui-button-highlight`, `--ui-button-text-shadow`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-weight-regular`, `--ui-font-weight-semibold`, `--ui-hover-overlay`, `--ui-info`, `--ui-line-height-glyph`, `--ui-line-height-normal`, `--ui-on-accent`, `--ui-radius`, `--ui-radius-sm`, `--ui-shadow-lg`, `--ui-success`, `--ui-text`, `--ui-toast-`, `--ui-toast-error-background`, `--ui-toast-highlight`, `--ui-toast-info-background`, `--ui-toast-success-background`, `--ui-toast-text-shadow`, `--ui-toast-warning-background`, `--ui-warning`
|
|
2135
2240
|
|
|
2136
2241
|
Example:
|
|
2137
2242
|
```html
|
|
@@ -2220,7 +2325,7 @@ white-to-gray) gradient too.
|
|
|
2220
2325
|
|
|
2221
2326
|
Import: `import "@f-ewald/components/ui-button.js";`
|
|
2222
2327
|
|
|
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
|
|
2328
|
+
Properties: `variant` (attribute `variant`) : ButtonVariant, default "primary"; `size` (attribute `size`) : "sm" | "md", default "md"; `pill` (attribute `pill`) : boolean, default false; `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
|
|
2224
2329
|
Events: none
|
|
2225
2330
|
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`
|
|
2226
2331
|
|