@f-ewald/components 1.38.0 → 1.40.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 +48 -0
- package/custom-elements.json +1052 -131
- package/dist/address-autocomplete.js +2 -2
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/app-shell.js +4 -4
- package/dist/app-shell.js.map +1 -1
- package/dist/app-sidebar.js +2 -2
- package/dist/app-sidebar.js.map +1 -1
- package/dist/audio-player.js +1 -1
- package/dist/audio-player.js.map +1 -1
- package/dist/autocomplete-input.js +2 -2
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/breadcrumb-nav.d.ts +69 -0
- package/dist/breadcrumb-nav.d.ts.map +1 -0
- package/dist/breadcrumb-nav.js +235 -0
- package/dist/breadcrumb-nav.js.map +1 -0
- package/dist/button-group.js +2 -2
- package/dist/button-group.js.map +1 -1
- package/dist/calendar-day.js +3 -3
- package/dist/calendar-day.js.map +1 -1
- package/dist/calendar-month.d.ts.map +1 -1
- package/dist/calendar-month.js +4 -1
- package/dist/calendar-month.js.map +1 -1
- package/dist/calendar-week.js +4 -4
- package/dist/calendar-week.js.map +1 -1
- package/dist/chat-message.js +1 -1
- package/dist/chat-message.js.map +1 -1
- package/dist/comment-composer.js +1 -1
- package/dist/comment-composer.js.map +1 -1
- package/dist/confirm-dialog.d.ts.map +1 -1
- package/dist/confirm-dialog.js +5 -2
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/content-divider.js +1 -1
- package/dist/content-divider.js.map +1 -1
- package/dist/cron-schedule.d.ts.map +1 -1
- package/dist/cron-schedule.js +6 -5
- package/dist/cron-schedule.js.map +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +3 -2
- package/dist/data-table.js.map +1 -1
- package/dist/dropdown-button.d.ts.map +1 -1
- package/dist/dropdown-button.js +4 -2
- package/dist/dropdown-button.js.map +1 -1
- package/dist/editable-text.js +1 -1
- package/dist/editable-text.js.map +1 -1
- package/dist/empty-state.d.ts +42 -0
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/empty-state.js +172 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/form-field.js +1 -1
- package/dist/form-field.js.map +1 -1
- package/dist/form-select.js +3 -3
- package/dist/form-select.js.map +1 -1
- package/dist/frame-box.js +1 -1
- package/dist/frame-box.js.map +1 -1
- package/dist/fullscreen-button.js +1 -1
- package/dist/fullscreen-button.js.map +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +2 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/kanban-card.js +1 -1
- package/dist/kanban-card.js.map +1 -1
- package/dist/kanban-column.js +3 -3
- package/dist/kanban-column.js.map +1 -1
- package/dist/kbd-hint.d.ts.map +1 -1
- package/dist/kbd-hint.js +2 -1
- package/dist/kbd-hint.js.map +1 -1
- package/dist/link-card.js +1 -1
- package/dist/link-card.js.map +1 -1
- package/dist/markdown-view.js +3 -3
- package/dist/markdown-view.js.map +1 -1
- package/dist/modal-dialog.js +1 -1
- package/dist/modal-dialog.js.map +1 -1
- package/dist/multi-select.js +5 -5
- package/dist/multi-select.js.map +1 -1
- package/dist/pagination-nav.d.ts.map +1 -1
- package/dist/pagination-nav.js +5 -1
- package/dist/pagination-nav.js.map +1 -1
- package/dist/photo-gallery.js +1 -1
- package/dist/photo-gallery.js.map +1 -1
- package/dist/popover-panel.d.ts.map +1 -1
- package/dist/popover-panel.js +4 -2
- package/dist/popover-panel.js.map +1 -1
- package/dist/progress-bar.d.ts.map +1 -1
- package/dist/progress-bar.js +1 -0
- package/dist/progress-bar.js.map +1 -1
- package/dist/radio-cards.js +1 -1
- package/dist/radio-cards.js.map +1 -1
- package/dist/radio-pills.js +1 -1
- package/dist/radio-pills.js.map +1 -1
- package/dist/reveal-button.js +1 -1
- package/dist/reveal-button.js.map +1 -1
- package/dist/scroll-to-bottom.js +1 -1
- package/dist/scroll-to-bottom.js.map +1 -1
- package/dist/scroll-to-top.js +1 -1
- package/dist/scroll-to-top.js.map +1 -1
- package/dist/skip-link.d.ts +30 -0
- package/dist/skip-link.d.ts.map +1 -0
- package/dist/skip-link.js +136 -0
- package/dist/skip-link.js.map +1 -0
- package/dist/slide-panel.js +1 -1
- package/dist/slide-panel.js.map +1 -1
- package/dist/spec-list.d.ts +49 -0
- package/dist/spec-list.d.ts.map +1 -0
- package/dist/spec-list.js +168 -0
- package/dist/spec-list.js.map +1 -0
- package/dist/stat-meter.d.ts.map +1 -1
- package/dist/stat-meter.js +1 -0
- package/dist/stat-meter.js.map +1 -1
- package/dist/tab-bar.js +1 -1
- package/dist/tab-bar.js.map +1 -1
- package/dist/text-area.js +1 -1
- package/dist/text-area.js.map +1 -1
- package/dist/tile-grid.js +1 -1
- package/dist/tile-grid.js.map +1 -1
- package/dist/tokens.css +42 -1
- package/dist/tokens.d.ts +50 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +132 -0
- package/dist/tokens.js.map +1 -1
- package/dist/tree-view.js +2 -2
- package/dist/tree-view.js.map +1 -1
- package/dist/ui-admonition.js +1 -1
- package/dist/ui-admonition.js.map +1 -1
- package/dist/ui-button.js +1 -1
- package/dist/ui-button.js.map +1 -1
- package/dist/ui-checkbox.d.ts +10 -1
- package/dist/ui-checkbox.d.ts.map +1 -1
- package/dist/ui-checkbox.js +11 -2
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/video-player.js +1 -1
- package/dist/video-player.js.map +1 -1
- package/dist/vote-control.d.ts +40 -0
- package/dist/vote-control.d.ts.map +1 -0
- package/dist/vote-control.js +311 -0
- package/dist/vote-control.js.map +1 -0
- package/docs/address-autocomplete.md +1 -0
- package/docs/app-shell.md +1 -0
- package/docs/app-sidebar.md +1 -0
- package/docs/audio-player.md +1 -0
- package/docs/autocomplete-input.md +1 -0
- package/docs/breadcrumb-nav.md +70 -0
- package/docs/button-group.md +1 -0
- package/docs/calendar-day.md +1 -0
- package/docs/calendar-month.md +1 -0
- package/docs/calendar-week.md +1 -0
- package/docs/chat-message.md +1 -0
- package/docs/comment-composer.md +1 -0
- package/docs/confirm-dialog.md +1 -0
- package/docs/content-divider.md +1 -0
- package/docs/cron-schedule.md +2 -0
- package/docs/data-table.md +2 -0
- package/docs/design-language.md +57 -5
- package/docs/dropdown-button.md +1 -0
- package/docs/editable-text.md +1 -0
- package/docs/empty-state.md +55 -0
- package/docs/form-field.md +1 -0
- package/docs/form-select.md +1 -0
- package/docs/frame-box.md +1 -0
- package/docs/fullscreen-button.md +1 -0
- package/docs/icons.md +1 -0
- package/docs/kanban-card.md +1 -0
- package/docs/kanban-column.md +1 -0
- package/docs/kbd-hint.md +1 -0
- package/docs/link-card.md +1 -0
- package/docs/markdown-view.md +1 -0
- package/docs/modal-dialog.md +1 -0
- package/docs/multi-select.md +1 -0
- package/docs/pagination-nav.md +2 -0
- package/docs/photo-gallery.md +1 -0
- package/docs/popover-panel.md +1 -0
- package/docs/progress-bar.md +1 -0
- package/docs/radio-cards.md +1 -0
- package/docs/radio-pills.md +1 -0
- package/docs/reveal-button.md +1 -0
- package/docs/scroll-to-bottom.md +1 -0
- package/docs/scroll-to-top.md +1 -0
- package/docs/skip-link.md +54 -0
- package/docs/slide-panel.md +1 -0
- package/docs/spec-list.md +71 -0
- package/docs/stat-meter.md +1 -0
- package/docs/tab-bar.md +1 -0
- package/docs/text-area.md +1 -0
- package/docs/tile-grid.md +1 -0
- package/docs/tree-view.md +1 -0
- package/docs/ui-admonition.md +1 -0
- package/docs/ui-button.md +1 -0
- package/docs/ui-checkbox.md +13 -2
- package/docs/video-player.md +1 -0
- package/docs/vote-control.md +73 -0
- package/llms.txt +210 -49
- package/package.json +1 -1
package/docs/cron-schedule.md
CHANGED
|
@@ -64,12 +64,14 @@ _None._
|
|
|
64
64
|
| Custom property |
|
|
65
65
|
| --- |
|
|
66
66
|
| `--ui-border` |
|
|
67
|
+
| `--ui-border-width` |
|
|
67
68
|
| `--ui-focus-ring` |
|
|
68
69
|
| `--ui-font` |
|
|
69
70
|
| `--ui-font-mono` |
|
|
70
71
|
| `--ui-font-size-sm` |
|
|
71
72
|
| `--ui-font-size-xs` |
|
|
72
73
|
| `--ui-font-weight-medium` |
|
|
74
|
+
| `--ui-label-transform` |
|
|
73
75
|
| `--ui-line-height-tight` |
|
|
74
76
|
| `--ui-primary` |
|
|
75
77
|
| `--ui-radius` |
|
package/docs/data-table.md
CHANGED
|
@@ -57,10 +57,12 @@ _None._
|
|
|
57
57
|
| Custom property |
|
|
58
58
|
| --- |
|
|
59
59
|
| `--ui-border` |
|
|
60
|
+
| `--ui-border-width` |
|
|
60
61
|
| `--ui-focus-ring` |
|
|
61
62
|
| `--ui-font` |
|
|
62
63
|
| `--ui-font-size-sm` |
|
|
63
64
|
| `--ui-font-weight-semibold` |
|
|
65
|
+
| `--ui-label-transform` |
|
|
64
66
|
| `--ui-surface-muted` |
|
|
65
67
|
| `--ui-text` |
|
|
66
68
|
| `--ui-text-muted` |
|
package/docs/design-language.md
CHANGED
|
@@ -23,15 +23,32 @@ defines the details used when creating or reviewing components.
|
|
|
23
23
|
fallback, and any newly introduced `--ui-*` usage must add/carry one too.
|
|
24
24
|
- Themes are single-valued and mutually exclusive, selected by `data-theme` on
|
|
25
25
|
`<html>`: `dark` and `light` force one of the two flat palettes, `gradient`
|
|
26
|
-
glosses buttons and toasts,
|
|
27
|
-
|
|
26
|
+
glosses buttons and toasts, `metro` squares corners and flattens shadows over
|
|
27
|
+
a blue accent, and `blueprint` restyles the palette as a monospace technical
|
|
28
|
+
spec sheet — ink on paper, one pure-blue accent, square corners, and
|
|
29
|
+
structure carried by 1.5px hairline rules instead of shadows. `dark` aside,
|
|
30
|
+
each is layered on the light palette and
|
|
28
31
|
must be excluded from `tokens.css`'s `prefers-color-scheme: dark` media query
|
|
29
32
|
— that selector outranks a bare `[data-theme]`, so a missing exclusion yields
|
|
30
33
|
a half-dark hybrid rather than an outright failure. Adding a theme therefore
|
|
31
34
|
means adding it to `lightThemes` in `generate-tokens-css.mjs`, which derives
|
|
32
35
|
both the block and the exclusion from that one list.
|
|
33
|
-
- Colors are the normal subject of a theme
|
|
34
|
-
|
|
36
|
+
- Colors are the normal subject of a theme. Three other axes are themeable, each
|
|
37
|
+
introduced by exactly one theme and each defaulting to the behavior that
|
|
38
|
+
predates it:
|
|
39
|
+
- **Shape** — `metro` and `blueprint` set every `--ui-radius*` to `0`.
|
|
40
|
+
- **Border weight** — `--ui-border-width` (`1px`), which `blueprint` takes to
|
|
41
|
+
`1.5px`. Every genuine surface or control border reads it; see "Borders"
|
|
42
|
+
below for what is deliberately excluded.
|
|
43
|
+
- **Label case** — `--ui-label-transform` (`none`), which `blueprint` takes to
|
|
44
|
+
`uppercase`, and `--ui-numeric` (`normal`), which it takes to
|
|
45
|
+
`tabular-nums`.
|
|
46
|
+
- **Type family** — `--ui-font` only. `blueprint` retargets it to a monospace
|
|
47
|
+
stack led by "Space Mono", which falls through to the system mono stack when
|
|
48
|
+
no webfont is loaded, so the theme still renders correctly with zero
|
|
49
|
+
external CSS.
|
|
50
|
+
Type *metrics* — size, weight, line height, tracking — are never themed in any
|
|
51
|
+
theme: they encode hierarchy rather than style.
|
|
35
52
|
- Semantic states use `primary`, `info`, `success`, `warning`, and `danger`.
|
|
36
53
|
- Foregrounds on solid semantic fills use `--ui-on-accent`.
|
|
37
54
|
- Elevated dark tooltips use `--ui-tooltip`; modal backdrops use
|
|
@@ -86,6 +103,20 @@ literal values are migrated onto them.
|
|
|
86
103
|
labels, and `--ui-line-height-normal` (1.5) for running body text.
|
|
87
104
|
- **Tracking:** `--ui-tracking-normal` (0) is the default; `--ui-tracking-wide`
|
|
88
105
|
(0.04em) is the single widened step for uppercase micro-labels.
|
|
106
|
+
- **Label case:** chrome micro-labels — the small, wide-tracked text that names
|
|
107
|
+
a region, a field, or a column (`spec-list` keys, `data-table` headers,
|
|
108
|
+
`stat-meter` and `cron-schedule` group labels) — carry
|
|
109
|
+
`text-transform: var(--ui-label-transform, none)` so a theme can set them in
|
|
110
|
+
caps. Never apply it to user-supplied content: shouting someone's data is not
|
|
111
|
+
a theme's decision, and `text-transform` is presentational, so the text still
|
|
112
|
+
copies out in its original casing. Components that are uppercase by design in
|
|
113
|
+
every theme (`frame-box`'s legend, `app-sidebar`'s section heading) keep a
|
|
114
|
+
literal `uppercase` — the token exists to *add* caps, not to remove them.
|
|
115
|
+
- **Numerals:** figures that change in place or stack into a column
|
|
116
|
+
(`pagination-nav`'s status, `progress-bar`'s value, `vote-control`'s score)
|
|
117
|
+
use `font-variant-numeric: var(--ui-numeric, normal)`. Readouts that must be
|
|
118
|
+
tabular in every theme — a ticking clock, a calendar grid — keep a literal
|
|
119
|
+
`tabular-nums` instead, since the token's default would undo them.
|
|
89
120
|
- **Exemptions:** SVG presentation attributes (`font-size="…"`,
|
|
90
121
|
`font-weight="…"`) can't take `var()` and stay literal at the token's
|
|
91
122
|
fallback value; `line-height: 0` used purely to collapse an inline
|
|
@@ -95,9 +126,30 @@ literal values are migrated onto them.
|
|
|
95
126
|
|
|
96
127
|
- `padding`, `margin`, and `gap` use literal multiples of `0.25rem`; spacing is
|
|
97
128
|
not tokenized. Convert CSS layout pixels to rems.
|
|
98
|
-
- Documented spacing exceptions:
|
|
129
|
+
- Documented spacing exceptions: SVG/canvas geometry, percentages,
|
|
99
130
|
aspect ratios, animation timing, proportional calculations derived from a
|
|
100
131
|
public size, `0.125rem` optical alignment nudges, and domain geometry.
|
|
132
|
+
|
|
133
|
+
### Borders
|
|
134
|
+
|
|
135
|
+
- A surface or control border goes through `--ui-border-width` (`1px`):
|
|
136
|
+
`border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);`. A
|
|
137
|
+
border is chrome, not layout, which is why it is tokenized while spacing is
|
|
138
|
+
not — under `blueprint` these rules do the work a shadow does elsewhere, and
|
|
139
|
+
at 1px they read as a faint table rather than as drawn structure.
|
|
140
|
+
- Three kinds of 1px border stay literal, by design:
|
|
141
|
+
- `@media (forced-colors: active)` borders (`1px solid CanvasText`), which
|
|
142
|
+
answer to the user's palette rather than to a theme.
|
|
143
|
+
- Data-mark geometry — `calendar-month`'s entry-footer rule is drawn in the
|
|
144
|
+
entry's own color and divides one mark's content.
|
|
145
|
+
- Decorative edges whose width is the effect: `range-slider`'s white thumb
|
|
146
|
+
ring, `tab-bar`'s 2px active underline.
|
|
147
|
+
- Anything with a fixed height or width *and* a themeable border must also set
|
|
148
|
+
`box-sizing: border-box`, or a heavier border pushes it past the shared `2rem`
|
|
149
|
+
control target.
|
|
150
|
+
|
|
151
|
+
### Radius
|
|
152
|
+
|
|
101
153
|
- Use `--ui-radius-sm` (`0.25rem` ≈ 4px) for controls, `--ui-radius`
|
|
102
154
|
(`0.5rem` ≈ 8px) for cards/dialogs/surfaces, and `--ui-radius-pill`
|
|
103
155
|
(`9999px`) / `--ui-radius-circle` (`50%`) for intentional pill and circle
|
package/docs/dropdown-button.md
CHANGED
package/docs/editable-text.md
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# `<empty-state>`
|
|
2
|
+
|
|
3
|
+
A centered placeholder for an empty list, an empty panel, or a zero-result
|
|
4
|
+
search: an optional leading glyph, a heading, a supporting line (or richer
|
|
5
|
+
slotted body), and an optional call-to-action row. Purely presentational —
|
|
6
|
+
it carries no interactive state of its own and no ARIA `role`; it is a
|
|
7
|
+
region of content, not a live status. Every optional part collapses
|
|
8
|
+
completely when absent, reserving no layout space.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import "@f-ewald/components/empty-state.js";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<empty-state heading="No results found" description="Try adjusting your search or filters.">
|
|
20
|
+
<span slot="icon">...</span>
|
|
21
|
+
<ui-button slot="actions" variant="primary">Clear filters</ui-button>
|
|
22
|
+
</empty-state>
|
|
23
|
+
<empty-state size="sm" heading="No pinned items"></empty-state>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Attributes / properties
|
|
27
|
+
|
|
28
|
+
| Property | Attribute | Type | Default | Description |
|
|
29
|
+
| --- | --- | --- | --- | --- |
|
|
30
|
+
| `heading` | `heading` | `string` | `""` | The primary line. |
|
|
31
|
+
| `description` | `description` | `string` | `""` | The supporting line under the heading. Omitted entirely when empty. |
|
|
32
|
+
| `size` | `size` | `"sm" | "md"` | `"md"` | `sm` for a small panel/sidebar, `md` (default) for a full page region. `md` matches the pre-`size` look exactly. |
|
|
33
|
+
|
|
34
|
+
## Events
|
|
35
|
+
|
|
36
|
+
_None._
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
|
|
40
|
+
_None._
|
|
41
|
+
|
|
42
|
+
## CSS custom properties
|
|
43
|
+
|
|
44
|
+
| Custom property |
|
|
45
|
+
| --- |
|
|
46
|
+
| `--ui-font` |
|
|
47
|
+
| `--ui-font-size` |
|
|
48
|
+
| `--ui-font-size-lg` |
|
|
49
|
+
| `--ui-font-size-sm` |
|
|
50
|
+
| `--ui-font-weight-regular` |
|
|
51
|
+
| `--ui-font-weight-semibold` |
|
|
52
|
+
| `--ui-line-height-normal` |
|
|
53
|
+
| `--ui-line-height-tight` |
|
|
54
|
+
| `--ui-text` |
|
|
55
|
+
| `--ui-text-muted` |
|
package/docs/form-field.md
CHANGED
package/docs/form-select.md
CHANGED
package/docs/frame-box.md
CHANGED
package/docs/icons.md
CHANGED
|
@@ -40,6 +40,7 @@ const icon = iconPencil(16); // 16px, defaults shown below if omitted
|
|
|
40
40
|
| `iconCpuChip` | 18px | System, hardware, or technical/processing content. |
|
|
41
41
|
| `iconCurrencyDollar` | 16px | Monetary values, pricing, or billing-related content. |
|
|
42
42
|
| `iconDocument` | 18px | A generic file/document icon, e.g. tile-grid's default file icon. |
|
|
43
|
+
| `iconEllipsisHorizontal` | 16px | Collapsed items in an inline sequence, e.g. breadcrumb-nav's truncated middle. |
|
|
43
44
|
| `iconEllipsisVertical` | 16px | An overflow ("kebab") menu trigger, e.g. dropdown-button's icon variant. |
|
|
44
45
|
| `iconExclamationCircle` | 16px | Error states, e.g. the error variant of toast-notification. |
|
|
45
46
|
| `iconExclamationTriangle` | 16px | Warning states, e.g. the warning variant of toast-notification. |
|
package/docs/kanban-card.md
CHANGED
package/docs/kanban-column.md
CHANGED
package/docs/kbd-hint.md
CHANGED
package/docs/link-card.md
CHANGED
package/docs/markdown-view.md
CHANGED
package/docs/modal-dialog.md
CHANGED
package/docs/multi-select.md
CHANGED
package/docs/pagination-nav.md
CHANGED
|
@@ -50,6 +50,7 @@ _None._
|
|
|
50
50
|
| Custom property |
|
|
51
51
|
| --- |
|
|
52
52
|
| `--ui-border` |
|
|
53
|
+
| `--ui-border-width` |
|
|
53
54
|
| `--ui-button-highlight` |
|
|
54
55
|
| `--ui-button-secondary-` |
|
|
55
56
|
| `--ui-button-secondary-background` |
|
|
@@ -62,6 +63,7 @@ _None._
|
|
|
62
63
|
| `--ui-font-size-sm` |
|
|
63
64
|
| `--ui-font-weight-medium` |
|
|
64
65
|
| `--ui-line-height-tight` |
|
|
66
|
+
| `--ui-numeric` |
|
|
65
67
|
| `--ui-radius-sm` |
|
|
66
68
|
| `--ui-surface-muted` |
|
|
67
69
|
| `--ui-text` |
|
package/docs/photo-gallery.md
CHANGED
package/docs/popover-panel.md
CHANGED
package/docs/progress-bar.md
CHANGED
package/docs/radio-cards.md
CHANGED
package/docs/radio-pills.md
CHANGED
package/docs/reveal-button.md
CHANGED
package/docs/scroll-to-bottom.md
CHANGED
package/docs/scroll-to-top.md
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# `<skip-link>`
|
|
2
|
+
|
|
3
|
+
"Skip to main content" bypass link — the package's first pure
|
|
4
|
+
accessibility-utility component. It renders a real `<a>` that stays
|
|
5
|
+
visually hidden (but in the focus order) until it receives keyboard focus,
|
|
6
|
+
then pins itself to the top-left of the viewport as a solid, high-contrast
|
|
7
|
+
block so a keyboard or screen-reader user can jump straight past repeated
|
|
8
|
+
page chrome to the main content. It needs no JavaScript beyond the element
|
|
9
|
+
upgrade — the anchor's native in-page navigation does the rest.
|
|
10
|
+
|
|
11
|
+
Place it as the very first focusable element on the page, before the app
|
|
12
|
+
chrome, and point `href` at the `id` of the main content region.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import "@f-ewald/components/skip-link.js";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<skip-link href="#main"></skip-link>
|
|
24
|
+
<skip-link href="#results" label="Jump to results"></skip-link>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Attributes / properties
|
|
28
|
+
|
|
29
|
+
| Property | Attribute | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- | --- |
|
|
31
|
+
| `href` | `href` | `string` | `"#main"` | The in-page target the link jumps to (the `id` of the main content region). |
|
|
32
|
+
| `label` | `label` | `string` | `"Skip to main content"` | Fallback link wording used when nothing is slotted. |
|
|
33
|
+
|
|
34
|
+
## Events
|
|
35
|
+
|
|
36
|
+
_None._
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
|
|
40
|
+
_None._
|
|
41
|
+
|
|
42
|
+
## CSS custom properties
|
|
43
|
+
|
|
44
|
+
| Custom property |
|
|
45
|
+
| --- |
|
|
46
|
+
| `--ui-focus-ring` |
|
|
47
|
+
| `--ui-font` |
|
|
48
|
+
| `--ui-font-size-sm` |
|
|
49
|
+
| `--ui-font-weight-medium` |
|
|
50
|
+
| `--ui-line-height-tight` |
|
|
51
|
+
| `--ui-on-accent` |
|
|
52
|
+
| `--ui-radius-sm` |
|
|
53
|
+
| `--ui-shadow` |
|
|
54
|
+
| `--ui-text` |
|
package/docs/slide-panel.md
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# `<spec-list>`
|
|
2
|
+
|
|
3
|
+
A key/value specification sheet — the "spec sheet" block on a product page:
|
|
4
|
+
an uppercase, muted, wide-tracked key column against a value column,
|
|
5
|
+
separated by hairline rules. It describes ONE record's attributes, which is
|
|
6
|
+
what sets it apart from `data-table` (many records, many columns, sorting);
|
|
7
|
+
`spec-list` is not tabular and renders a real `<dl>`/`<dt>`/`<dd>` structure.
|
|
8
|
+
|
|
9
|
+
Feed it the `items` array for the plain data path, or slot your own
|
|
10
|
+
`<div><dt>…</dt><dd>…</dd></div>` groups when a value needs a link, a
|
|
11
|
+
`status-pill`, or other markup. Slotted content takes precedence over
|
|
12
|
+
`items`; with neither, nothing is rendered.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import "@f-ewald/components/spec-list.js";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<spec-list caption="Specifications"></spec-list>
|
|
24
|
+
<script type="module">
|
|
25
|
+
document.querySelector("spec-list").items = [
|
|
26
|
+
{ label: "Material", value: "Anodized aluminum" },
|
|
27
|
+
{ label: "Weight", value: "1.2 kg" },
|
|
28
|
+
{ label: "Warranty", value: "2 years" },
|
|
29
|
+
];
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<!-- Or slot your own groups when a value needs a link, a status-pill, or other
|
|
33
|
+
markup. `dividers` defaults to true; turn it off via the property, since a
|
|
34
|
+
`dividers="false"` attribute still parses as a truthy boolean. -->
|
|
35
|
+
<spec-list layout="stacked" id="sheet">
|
|
36
|
+
<div><dt>Homepage</dt><dd><a href="https://example.com">example.com</a></dd></div>
|
|
37
|
+
</spec-list>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Attributes / properties
|
|
41
|
+
|
|
42
|
+
| Property | Attribute | Type | Default | Description |
|
|
43
|
+
| --- | --- | --- | --- | --- |
|
|
44
|
+
| `items` | `items` | `SpecListItem[]` | `[]` | The key/value rows for the data-driven path. Ignored when the default slot has content. |
|
|
45
|
+
| `layout` | `layout` | `"auto" | "stacked"` | `"auto"` | `auto` is the two-column grid that collapses to stacked below `48rem`; `stacked` forces the stacked form at every width. |
|
|
46
|
+
| `dividers` | `dividers` | `boolean` | `true` | Whether to draw a hairline rule between rows; `false` for a dense inline listing. |
|
|
47
|
+
| `caption` | `caption` | `string` | `""` | Optional accessible caption rendered above the list; no element or reserved space when empty. |
|
|
48
|
+
|
|
49
|
+
## Events
|
|
50
|
+
|
|
51
|
+
_None._
|
|
52
|
+
|
|
53
|
+
## Slots
|
|
54
|
+
|
|
55
|
+
_None._
|
|
56
|
+
|
|
57
|
+
## CSS custom properties
|
|
58
|
+
|
|
59
|
+
| Custom property |
|
|
60
|
+
| --- |
|
|
61
|
+
| `--ui-border` |
|
|
62
|
+
| `--ui-border-width` |
|
|
63
|
+
| `--ui-font` |
|
|
64
|
+
| `--ui-font-size` |
|
|
65
|
+
| `--ui-font-size-sm` |
|
|
66
|
+
| `--ui-font-weight-medium` |
|
|
67
|
+
| `--ui-label-transform` |
|
|
68
|
+
| `--ui-line-height-normal` |
|
|
69
|
+
| `--ui-text` |
|
|
70
|
+
| `--ui-text-muted` |
|
|
71
|
+
| `--ui-tracking-wide` |
|
package/docs/stat-meter.md
CHANGED
package/docs/tab-bar.md
CHANGED
package/docs/text-area.md
CHANGED
package/docs/tile-grid.md
CHANGED
package/docs/tree-view.md
CHANGED
package/docs/ui-admonition.md
CHANGED
package/docs/ui-button.md
CHANGED
package/docs/ui-checkbox.md
CHANGED
|
@@ -14,6 +14,13 @@ renders between the box and the label, inside the same clickable `<label>`
|
|
|
14
14
|
— for a row that pairs a checkbox with an icon/swatch and needs the whole
|
|
15
15
|
row, icon included, to stay one click target.
|
|
16
16
|
|
|
17
|
+
The label is the default slot, with the `label` property as its fallback.
|
|
18
|
+
Slot it instead of setting the property when it needs its own markup or
|
|
19
|
+
styling — a link, an emphasized word — since a property renders inside this
|
|
20
|
+
component's shadow DOM and cannot be reached from outside. Either way the
|
|
21
|
+
label sits inside the native `<label>`, so it stays clickable and still
|
|
22
|
+
names the checkbox for assistive technology.
|
|
23
|
+
|
|
17
24
|
## Install
|
|
18
25
|
|
|
19
26
|
```js
|
|
@@ -25,6 +32,8 @@ import "@f-ewald/components/ui-checkbox.js";
|
|
|
25
32
|
```html
|
|
26
33
|
<ui-checkbox label="Subscribe to updates"></ui-checkbox>
|
|
27
34
|
<ui-checkbox name="terms" label="I agree to the terms" required></ui-checkbox>
|
|
35
|
+
<!-- Slot the label when it needs its own markup; it overrides the property -->
|
|
36
|
+
<ui-checkbox name="beta">Enable <strong>beta</strong> features</ui-checkbox>
|
|
28
37
|
<!-- .icon is set programmatically (a pre-rendered TemplateResult), not an attribute -->
|
|
29
38
|
<ui-checkbox label="Show list view"></ui-checkbox>
|
|
30
39
|
```
|
|
@@ -38,7 +47,7 @@ import "@f-ewald/components/ui-checkbox.js";
|
|
|
38
47
|
| `disabled` | `disabled` | `boolean` | `false` | Disables interaction; merged with an ancestor `<fieldset disabled>`. |
|
|
39
48
|
| `required` | `required` | `boolean` | `false` | Marks the control invalid via `ElementInternals` while unchecked. |
|
|
40
49
|
| `name` | `name` | `string` | `""` | Form field name; submitted as `name=on` only while checked. |
|
|
41
|
-
| `label` | `label` | `string` | `""` | Visible label text rendered next to the box. |
|
|
50
|
+
| `label` | `label` | `string` | `""` | Visible label text rendered next to the box; overridden by the default slot. |
|
|
42
51
|
| `icon` | _(JS property only)_ | `TemplateResult | null` | `null` | Pre-rendered icon template displayed between the box and the label, e.g. `iconPencil(14)` from this package's icon set. |
|
|
43
52
|
| `iconSize` | `iconSize` | `number` | `14` | Square icon size in pixels — 14 (inline icon size) by default. |
|
|
44
53
|
|
|
@@ -50,7 +59,9 @@ import "@f-ewald/components/ui-checkbox.js";
|
|
|
50
59
|
|
|
51
60
|
## Slots
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
| Slot | Description |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `(default)` | The label, overriding the `label` property; for a label that needs its own markup or styling. |
|
|
54
65
|
|
|
55
66
|
## CSS custom properties
|
|
56
67
|
|