@f-ewald/components 1.0.0 → 1.0.3
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 +6 -0
- package/custom-elements.json +891 -22
- package/dist/address-autocomplete.d.ts +8 -0
- package/dist/address-autocomplete.d.ts.map +1 -1
- package/dist/address-autocomplete.js +165 -15
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/animate-confetti.d.ts +8 -5
- package/dist/animate-confetti.d.ts.map +1 -1
- package/dist/animate-confetti.js +46 -19
- package/dist/animate-confetti.js.map +1 -1
- package/dist/autocomplete-input.d.ts +8 -0
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-input.js +165 -15
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/calendar-month.d.ts.map +1 -1
- package/dist/calendar-month.js +27 -13
- package/dist/calendar-month.js.map +1 -1
- package/dist/calendar-year.d.ts.map +1 -1
- package/dist/calendar-year.js +11 -2
- package/dist/calendar-year.js.map +1 -1
- package/dist/chat-message.d.ts.map +1 -1
- package/dist/chat-message.js +77 -24
- package/dist/chat-message.js.map +1 -1
- package/dist/confirm-dialog.d.ts +8 -1
- package/dist/confirm-dialog.d.ts.map +1 -1
- package/dist/confirm-dialog.js +130 -18
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/copy-link-button.d.ts +2 -0
- package/dist/copy-link-button.d.ts.map +1 -1
- package/dist/copy-link-button.js +35 -3
- package/dist/copy-link-button.js.map +1 -1
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +83 -11
- package/dist/data-table.js.map +1 -1
- package/dist/distance-value.d.ts +0 -1
- package/dist/distance-value.d.ts.map +1 -1
- package/dist/distance-value.js +3 -8
- package/dist/distance-value.js.map +1 -1
- package/dist/distribution-chart.d.ts.map +1 -1
- package/dist/distribution-chart.js +54 -17
- package/dist/distribution-chart.js.map +1 -1
- package/dist/dropdown-button.d.ts.map +1 -1
- package/dist/dropdown-button.js +60 -11
- package/dist/dropdown-button.js.map +1 -1
- package/dist/editable-text.d.ts.map +1 -1
- package/dist/editable-text.js +46 -13
- package/dist/editable-text.js.map +1 -1
- package/dist/form-select.d.ts.map +1 -1
- package/dist/form-select.js +70 -22
- package/dist/form-select.js.map +1 -1
- package/dist/frame-box.d.ts.map +1 -1
- package/dist/frame-box.js +20 -12
- package/dist/frame-box.js.map +1 -1
- package/dist/icon-button.d.ts.map +1 -1
- package/dist/icon-button.js +11 -0
- package/dist/icon-button.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/kbd-hint.d.ts +30 -0
- package/dist/kbd-hint.d.ts.map +1 -0
- package/dist/kbd-hint.js +184 -0
- package/dist/kbd-hint.js.map +1 -0
- package/dist/live-timer.d.ts +0 -1
- package/dist/live-timer.d.ts.map +1 -1
- package/dist/live-timer.js +1 -6
- package/dist/live-timer.js.map +1 -1
- package/dist/map-circle.d.ts.map +1 -1
- package/dist/map-circle.js +16 -1
- package/dist/map-circle.js.map +1 -1
- package/dist/map-pin.d.ts.map +1 -1
- package/dist/map-pin.js +16 -1
- package/dist/map-pin.js.map +1 -1
- package/dist/percent-bar-chart.d.ts +3 -0
- package/dist/percent-bar-chart.d.ts.map +1 -1
- package/dist/percent-bar-chart.js +60 -4
- package/dist/percent-bar-chart.js.map +1 -1
- package/dist/photo-gallery.d.ts.map +1 -1
- package/dist/photo-gallery.js +12 -3
- package/dist/photo-gallery.js.map +1 -1
- package/dist/popover-panel.d.ts.map +1 -1
- package/dist/popover-panel.js +132 -23
- package/dist/popover-panel.js.map +1 -1
- package/dist/price-history-chart.d.ts.map +1 -1
- package/dist/price-history-chart.js +52 -18
- package/dist/price-history-chart.js.map +1 -1
- package/dist/radio-cards.d.ts +2 -0
- package/dist/radio-cards.d.ts.map +1 -1
- package/dist/radio-cards.js +51 -5
- package/dist/radio-cards.js.map +1 -1
- package/dist/radio-pills.d.ts +2 -0
- package/dist/radio-pills.d.ts.map +1 -1
- package/dist/radio-pills.js +46 -4
- package/dist/radio-pills.js.map +1 -1
- package/dist/relative-time.d.ts +0 -1
- package/dist/relative-time.d.ts.map +1 -1
- package/dist/relative-time.js +1 -6
- package/dist/relative-time.js.map +1 -1
- package/dist/reveal-button.d.ts +2 -0
- package/dist/reveal-button.d.ts.map +1 -1
- package/dist/reveal-button.js +42 -5
- package/dist/reveal-button.js.map +1 -1
- package/dist/roman-numeral.js +1 -1
- package/dist/roman-numeral.js.map +1 -1
- package/dist/slide-panel.d.ts +7 -3
- package/dist/slide-panel.d.ts.map +1 -1
- package/dist/slide-panel.js +95 -23
- package/dist/slide-panel.js.map +1 -1
- package/dist/stat-meter.d.ts.map +1 -1
- package/dist/stat-meter.js +17 -7
- package/dist/stat-meter.js.map +1 -1
- package/dist/status-pill.d.ts.map +1 -1
- package/dist/status-pill.js +26 -12
- package/dist/status-pill.js.map +1 -1
- package/dist/tile-grid.d.ts +8 -0
- package/dist/tile-grid.d.ts.map +1 -1
- package/dist/tile-grid.js +88 -12
- package/dist/tile-grid.js.map +1 -1
- package/dist/toast-notification.d.ts.map +1 -1
- package/dist/toast-notification.js +40 -11
- package/dist/toast-notification.js.map +1 -1
- package/dist/tokens.css +19 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +13 -0
- 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 +58 -9
- package/dist/ui-button.js.map +1 -1
- package/dist/user-avatar.d.ts.map +1 -1
- package/dist/user-avatar.js +18 -3
- package/dist/user-avatar.js.map +1 -1
- package/dist/utils/form.d.ts +3 -0
- package/dist/utils/form.d.ts.map +1 -0
- package/dist/utils/form.js +14 -0
- package/dist/utils/form.js.map +1 -0
- package/dist/utils/layer-stack.d.ts +9 -0
- package/dist/utils/layer-stack.d.ts.map +1 -0
- package/dist/utils/layer-stack.js +35 -0
- package/dist/utils/layer-stack.js.map +1 -0
- package/dist/weight-bar-chart.d.ts.map +1 -1
- package/dist/weight-bar-chart.js +27 -8
- package/dist/weight-bar-chart.js.map +1 -1
- package/docs/address-autocomplete.md +5 -0
- package/docs/autocomplete-input.md +5 -0
- package/docs/calendar-month.md +2 -0
- package/docs/chat-message.md +4 -0
- package/docs/confirm-dialog.md +2 -0
- package/docs/copy-link-button.md +2 -0
- package/docs/data-table.md +2 -0
- package/docs/design-language.md +149 -0
- package/docs/distribution-chart.md +4 -0
- package/docs/dropdown-button.md +1 -0
- package/docs/frame-box.md +2 -0
- package/docs/kbd-hint.md +42 -0
- package/docs/percent-bar-chart.md +4 -1
- package/docs/photo-gallery.md +1 -0
- package/docs/popover-panel.md +2 -0
- package/docs/price-history-chart.md +8 -1
- package/docs/radio-cards.md +2 -0
- package/docs/radio-pills.md +2 -0
- package/docs/reveal-button.md +3 -0
- package/docs/slide-panel.md +4 -2
- package/docs/status-pill.md +3 -0
- package/docs/tile-grid.md +10 -1
- package/docs/toast-notification.md +4 -1
- package/docs/ui-button.md +2 -0
- package/docs/user-avatar.md +1 -0
- package/llms.txt +59 -34
- package/package.json +5 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Component design language
|
|
2
|
+
|
|
3
|
+
This is the canonical visual, interaction, and accessibility contract for
|
|
4
|
+
`@f-ewald/components`. `CLAUDE.md` carries the short always-on rules; this file
|
|
5
|
+
defines the details used when creating or reviewing components.
|
|
6
|
+
|
|
7
|
+
## Principles
|
|
8
|
+
|
|
9
|
+
- Components are compact, calm, and content-first.
|
|
10
|
+
- Shared UI chrome uses design tokens; data-driven visuals may use consumer
|
|
11
|
+
colors when color conveys domain meaning.
|
|
12
|
+
- Every component works with no external CSS and follows inherited light/dark
|
|
13
|
+
tokens when a consumer supplies them.
|
|
14
|
+
- Native semantics and keyboard behavior come before custom ARIA.
|
|
15
|
+
- Pointer, keyboard, focus, disabled, loading, empty, error, and reduced-motion
|
|
16
|
+
states are part of the design—not optional polish.
|
|
17
|
+
|
|
18
|
+
## Tokens and colors
|
|
19
|
+
|
|
20
|
+
- Use `var(--ui-*, exact-fallback)` for reusable colors, fonts, radii, shadows,
|
|
21
|
+
and focus rings.
|
|
22
|
+
- Semantic states use `primary`, `info`, `success`, `warning`, and `danger`.
|
|
23
|
+
- Foregrounds on solid semantic fills use `--ui-on-accent`.
|
|
24
|
+
- Elevated dark tooltips use `--ui-tooltip`; modal backdrops use
|
|
25
|
+
`--ui-overlay` and are not interchangeable.
|
|
26
|
+
- Static chart axes, labels, grids, skeletons, and default series use tokenized
|
|
27
|
+
SVG CSS classes. Consumer/data-series colors remain data.
|
|
28
|
+
- Plain SVG presentation attributes may use literal token fallback values when
|
|
29
|
+
CSS variables are not practical. User-provided marker/chart colors are an
|
|
30
|
+
explicit exception.
|
|
31
|
+
- White map rings, image-overlay controls, avatar foregrounds, and celebratory
|
|
32
|
+
confetti may remain literal when their contrast is intentionally independent
|
|
33
|
+
of the surrounding theme.
|
|
34
|
+
|
|
35
|
+
## Typography
|
|
36
|
+
|
|
37
|
+
- Body/component text: `--ui-font-size` at regular weight.
|
|
38
|
+
- Compact controls/labels: `--ui-font-size-sm`, usually weight 500.
|
|
39
|
+
- Secondary details/keycaps: `--ui-font-size-xs`.
|
|
40
|
+
- Code/keycaps: `--ui-font-mono`.
|
|
41
|
+
- Section/title emphasis should normally use weight 600; reserve 700 for badges
|
|
42
|
+
or data emphasis.
|
|
43
|
+
|
|
44
|
+
## Spacing and geometry
|
|
45
|
+
|
|
46
|
+
- Layout spacing uses literal multiples of `0.25rem`; spacing is not tokenized.
|
|
47
|
+
- Convert CSS layout pixels to rems.
|
|
48
|
+
- Exceptions: 1px borders, SVG/canvas geometry, percentages, aspect ratios,
|
|
49
|
+
animation timing, and proportional calculations derived from a public size.
|
|
50
|
+
- Use `--ui-radius-sm` for controls, `--ui-radius` for cards/dialogs, and an
|
|
51
|
+
intentional full pill/circle radius only for pill/avatar/marker shapes.
|
|
52
|
+
- Compact controls must retain a clear hit target and must not reserve layout
|
|
53
|
+
space for optional content that is absent.
|
|
54
|
+
|
|
55
|
+
## Interaction states
|
|
56
|
+
|
|
57
|
+
- Interactive surfaces provide hover, active/selected, disabled, and
|
|
58
|
+
`:focus-visible` states.
|
|
59
|
+
- Focus uses `--ui-focus-ring` plus a real outline fallback in forced-colors.
|
|
60
|
+
- Disabled controls use native `disabled` where possible; otherwise use
|
|
61
|
+
`aria-disabled`, suppress activation, and retain understandable contrast.
|
|
62
|
+
- If a whole row/tile is clickable, it must have keyboard parity and must not
|
|
63
|
+
hijack nested interactive controls.
|
|
64
|
+
|
|
65
|
+
## Motion
|
|
66
|
+
|
|
67
|
+
- Keep transitions between 120ms and 250ms unless the behavior itself defines a
|
|
68
|
+
duration.
|
|
69
|
+
- Nonessential transitions and animations must be removed under
|
|
70
|
+
`prefers-reduced-motion: reduce`.
|
|
71
|
+
- Progress spinners may become static indicators in reduced motion.
|
|
72
|
+
- Components driven by timers must clean up on disconnect.
|
|
73
|
+
|
|
74
|
+
## Accessibility
|
|
75
|
+
|
|
76
|
+
- Prefer buttons, links, inputs, radios, and dialogs over clickable generic
|
|
77
|
+
elements.
|
|
78
|
+
- Custom comboboxes expose expanded state, controlled listbox, active option,
|
|
79
|
+
explicit selection, and no-results behavior.
|
|
80
|
+
- Modal/centered overlays expose a name, `role="dialog"`, `aria-modal`, initial
|
|
81
|
+
focus, Escape behavior, focus containment, and focus restoration.
|
|
82
|
+
- Collapsible controls expose `aria-expanded` and `aria-controls`.
|
|
83
|
+
- Charts expose a concise accessible data summary.
|
|
84
|
+
- Decorative icons/keycaps inside already-labelled controls are hidden from
|
|
85
|
+
assistive technology; standalone equivalents expose their own name.
|
|
86
|
+
- Do not create noisy live regions for per-second timers.
|
|
87
|
+
|
|
88
|
+
## Component exceptions
|
|
89
|
+
|
|
90
|
+
- Metadata-only tags may omit standalone playground sections and screenshots
|
|
91
|
+
when their full behavior is demonstrated through a parent:
|
|
92
|
+
`calendar-entry`, `gallery-item`, and `gallery-item-variant`.
|
|
93
|
+
- Styleless inline formatters may omit empty `static styles`/token imports:
|
|
94
|
+
`distance-value`, `live-timer`, `relative-time`, and `roman-numeral`.
|
|
95
|
+
- Domain visuals may deliberately diverge in geometry and data color, but their
|
|
96
|
+
surrounding typography, focus, motion, and accessibility still follow this
|
|
97
|
+
contract.
|
|
98
|
+
|
|
99
|
+
## Playground and documentation
|
|
100
|
+
|
|
101
|
+
- Visual/interactive nav links and complete sections are alphabetical and have
|
|
102
|
+
identical ID sets.
|
|
103
|
+
- Every visual section includes a live representative state and a copyable
|
|
104
|
+
usage example.
|
|
105
|
+
- Every public property/event/mode is exercised in its section or an explicitly
|
|
106
|
+
linked parent section.
|
|
107
|
+
- Public API changes update JSDoc, generated docs, `llms.txt`, README when
|
|
108
|
+
relevant, and the changelog.
|
|
109
|
+
|
|
110
|
+
## Validation tiers
|
|
111
|
+
|
|
112
|
+
1. Inner loop: `npm run typecheck` and all touched component specs in one
|
|
113
|
+
Playwright invocation.
|
|
114
|
+
2. Run docs once after APIs/JSDoc stabilize.
|
|
115
|
+
3. Run `npm run test:design` after token/catalog/state changes.
|
|
116
|
+
4. Run screenshots once after the full design batch.
|
|
117
|
+
5. Run the complete package/demo/Pages gate once at task completion.
|
|
118
|
+
6. Reviewer fixes rerun only affected specs/contracts, followed by one final
|
|
119
|
+
full gate.
|
|
120
|
+
|
|
121
|
+
Canonical screenshot baselines are generated by the **Generate visual
|
|
122
|
+
baselines** GitHub Actions workflow on the same amd64 runner image used by CI.
|
|
123
|
+
Run it manually, download the `visual-baselines-linux-amd64` artifact, review
|
|
124
|
+
the images, and replace `visual-tests/__screenshots__/`.
|
|
125
|
+
|
|
126
|
+
For local iteration, the pinned Playwright image provides a close
|
|
127
|
+
architecture-matched preview:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
docker run --platform linux/amd64 --rm --ipc=host \
|
|
131
|
+
-v "$PWD":/work -v /work/node_modules -w /work \
|
|
132
|
+
mcr.microsoft.com/playwright:v1.61.1-noble \
|
|
133
|
+
bash -lc "npm ci && npm run test:visual:update"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The architecture pin is required on Apple-silicon hosts, but installed fonts
|
|
137
|
+
still differ slightly from GitHub-hosted runners. Local Docker repeatability
|
|
138
|
+
does not replace the GitHub-generated baseline check. Run
|
|
139
|
+
`npm run test:visual` natively only when using a matching checked-in platform
|
|
140
|
+
baseline.
|
|
141
|
+
|
|
142
|
+
## Review checklist
|
|
143
|
+
|
|
144
|
+
- Shared tokens use exact fallbacks; data-color exceptions are intentional.
|
|
145
|
+
- Spacing follows the scale and optional content consumes no empty space.
|
|
146
|
+
- Light, dark, forced-colors, and reduced-motion states remain legible.
|
|
147
|
+
- Pointer and keyboard behavior are equivalent.
|
|
148
|
+
- Empty/error/loading/disabled/selected states are represented where relevant.
|
|
149
|
+
- The playground and tests demonstrate the changed public behavior.
|
package/docs/dropdown-button.md
CHANGED
package/docs/frame-box.md
CHANGED
package/docs/kbd-hint.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# `<kbd-hint>`
|
|
2
|
+
|
|
3
|
+
Renders a keyboard shortcut as one boxed keycap per `+`-separated token.
|
|
4
|
+
Modifier keys are platform-aware: `Mod` becomes Command on macOS and
|
|
5
|
+
Control elsewhere. Keycaps derive their presentation from `currentColor`,
|
|
6
|
+
so the hint works inside neutral and accent-colored controls.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import "@f-ewald/components/kbd-hint.js";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<kbd-hint keys="Mod+K"></kbd-hint>
|
|
18
|
+
<kbd-hint keys="Mod+Shift+Enter" platform="mac"></kbd-hint>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Attributes / properties
|
|
22
|
+
|
|
23
|
+
| Property | Attribute | Type | Default | Description |
|
|
24
|
+
| --- | --- | --- | --- | --- |
|
|
25
|
+
| `keys` | `keys` | `string` | `""` | Shortcut as case-insensitive, `+`-separated tokens, e.g. `"Mod+Enter"`. |
|
|
26
|
+
| `platform` | `platform` | `KbdPlatform` | `"auto"` | Platform override; `auto` detects macOS from the browser. |
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
_None._
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
|
|
34
|
+
_None._
|
|
35
|
+
|
|
36
|
+
## CSS custom properties
|
|
37
|
+
|
|
38
|
+
| Custom property |
|
|
39
|
+
| --- |
|
|
40
|
+
| `--ui-font-mono` |
|
|
41
|
+
| `--ui-font-size-xs` |
|
|
42
|
+
| `--ui-radius-sm` |
|
package/docs/photo-gallery.md
CHANGED
package/docs/popover-panel.md
CHANGED
|
@@ -59,8 +59,10 @@ import "@f-ewald/components/popover-panel.js";
|
|
|
59
59
|
| Custom property |
|
|
60
60
|
| --- |
|
|
61
61
|
| `--ui-border` |
|
|
62
|
+
| `--ui-focus-ring` |
|
|
62
63
|
| `--ui-font` |
|
|
63
64
|
| `--ui-font-size` |
|
|
65
|
+
| `--ui-overlay` |
|
|
64
66
|
| `--ui-radius` |
|
|
65
67
|
| `--ui-radius-sm` |
|
|
66
68
|
| `--ui-shadow-lg` |
|
package/docs/radio-cards.md
CHANGED
|
@@ -33,6 +33,7 @@ import "@f-ewald/components/radio-cards.js";
|
|
|
33
33
|
| --- | --- | --- | --- | --- |
|
|
34
34
|
| `options` | _(JS property only)_ | `RadioCardOption[]` | `[]` | Options to render, one card each. |
|
|
35
35
|
| `value` | `value` | `string` | `""` | Currently selected value. |
|
|
36
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables every native radio in the group. |
|
|
36
37
|
|
|
37
38
|
## Events
|
|
38
39
|
|
|
@@ -49,6 +50,7 @@ _None._
|
|
|
49
50
|
| Custom property |
|
|
50
51
|
| --- |
|
|
51
52
|
| `--ui-border` |
|
|
53
|
+
| `--ui-focus-ring` |
|
|
52
54
|
| `--ui-font` |
|
|
53
55
|
| `--ui-font-size-sm` |
|
|
54
56
|
| `--ui-primary` |
|
package/docs/radio-pills.md
CHANGED
|
@@ -33,6 +33,7 @@ import "@f-ewald/components/radio-pills.js";
|
|
|
33
33
|
| --- | --- | --- | --- | --- |
|
|
34
34
|
| `options` | _(JS property only)_ | `RadioPillOption[]` | `[]` | Options to render, one pill each. |
|
|
35
35
|
| `value` | `value` | `string` | `""` | Currently selected value. |
|
|
36
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables every native radio in the group. |
|
|
36
37
|
|
|
37
38
|
## Events
|
|
38
39
|
|
|
@@ -49,6 +50,7 @@ _None._
|
|
|
49
50
|
| Custom property |
|
|
50
51
|
| --- |
|
|
51
52
|
| `--ui-border` |
|
|
53
|
+
| `--ui-focus-ring` |
|
|
52
54
|
| `--ui-font` |
|
|
53
55
|
| `--ui-font-size-sm` |
|
|
54
56
|
| `--ui-primary` |
|
package/docs/reveal-button.md
CHANGED
|
@@ -21,6 +21,7 @@ import "@f-ewald/components/reveal-button.js";
|
|
|
21
21
|
| Property | Attribute | Type | Default | Description |
|
|
22
22
|
| --- | --- | --- | --- | --- |
|
|
23
23
|
| `label` | `label` | `string` | `"Reveal hidden content"` | Label shown on the button before it's clicked. |
|
|
24
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables revealing the slotted content. |
|
|
24
25
|
|
|
25
26
|
## Events
|
|
26
27
|
|
|
@@ -36,8 +37,10 @@ _None._
|
|
|
36
37
|
|
|
37
38
|
| Custom property |
|
|
38
39
|
| --- |
|
|
40
|
+
| `--ui-focus-ring` |
|
|
39
41
|
| `--ui-font` |
|
|
40
42
|
| `--ui-font-size` |
|
|
43
|
+
| `--ui-on-accent` |
|
|
41
44
|
| `--ui-primary` |
|
|
42
45
|
| `--ui-primary-hover` |
|
|
43
46
|
| `--ui-radius-sm` |
|
package/docs/slide-panel.md
CHANGED
|
@@ -4,8 +4,8 @@ Generic sliding panel shell. Handles positioning, open/close animation,
|
|
|
4
4
|
header chrome, and a close button. Body content is provided via the
|
|
5
5
|
default slot; the consumer controls its own padding and overflow.
|
|
6
6
|
|
|
7
|
-
Desktop:
|
|
8
|
-
Mobile (≤
|
|
7
|
+
Desktop: fixed right-side panel that slides from the right.
|
|
8
|
+
Mobile (≤48rem): bottom-sheet drawer (60vh) — reserved for future use.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
@@ -46,8 +46,10 @@ import "@f-ewald/components/slide-panel.js";
|
|
|
46
46
|
| Custom property |
|
|
47
47
|
| --- |
|
|
48
48
|
| `--ui-border` |
|
|
49
|
+
| `--ui-focus-ring` |
|
|
49
50
|
| `--ui-font` |
|
|
50
51
|
| `--ui-font-size` |
|
|
52
|
+
| `--ui-radius` |
|
|
51
53
|
| `--ui-radius-sm` |
|
|
52
54
|
| `--ui-shadow-lg` |
|
|
53
55
|
| `--ui-surface` |
|
package/docs/status-pill.md
CHANGED
package/docs/tile-grid.md
CHANGED
|
@@ -9,6 +9,12 @@ Optional `itemHref` makes whole tiles clickable (navigating via
|
|
|
9
9
|
`location.hash`), without hijacking clicks on nested interactive elements
|
|
10
10
|
(links/buttons) a tile's rendered content might contain.
|
|
11
11
|
|
|
12
|
+
Optional `fileIcon` prefixes each tile with a decorative Heroicons
|
|
13
|
+
"document" glyph, for grids whose items represent files — the icon never
|
|
14
|
+
carries its own accessible name since the rendered tile content (e.g. a
|
|
15
|
+
filename) already identifies the item. Off by default, so it consumes no
|
|
16
|
+
layout space or markup for grids of non-file items.
|
|
17
|
+
|
|
12
18
|
## Install
|
|
13
19
|
|
|
14
20
|
```js
|
|
@@ -18,7 +24,7 @@ import "@f-ewald/components/tile-grid.js";
|
|
|
18
24
|
## Usage
|
|
19
25
|
|
|
20
26
|
```html
|
|
21
|
-
<tile-grid></tile-grid>
|
|
27
|
+
<tile-grid file-icon></tile-grid>
|
|
22
28
|
<script type="module">
|
|
23
29
|
const grid = document.querySelector("tile-grid");
|
|
24
30
|
grid.items = [
|
|
@@ -37,6 +43,7 @@ import "@f-ewald/components/tile-grid.js";
|
|
|
37
43
|
| `itemKey` | _(JS property only)_ | `(item: unknown, index: number) => string | number` | `—` | Stable identity for `items[i]`, used as the repeat-directive key. Defaults to the item's index. |
|
|
38
44
|
| `renderTile` | _(JS property only)_ | `(item: unknown) => unknown` | `—` | Produces a tile's rendered content for `item`. Default: stringify. |
|
|
39
45
|
| `itemHref` | _(JS property only)_ | `((item: unknown) => string | null) | null` | `null` | When set, clicking a tile (outside any nested link/button) navigates to this hash. |
|
|
46
|
+
| `fileIcon` | `file-icon` | `boolean` | `false` | Prefixes each tile with a decorative "document" icon, for grids of file-like items. Off by default. |
|
|
40
47
|
|
|
41
48
|
## Events
|
|
42
49
|
|
|
@@ -51,8 +58,10 @@ _None._
|
|
|
51
58
|
| Custom property |
|
|
52
59
|
| --- |
|
|
53
60
|
| `--ui-border` |
|
|
61
|
+
| `--ui-focus-ring` |
|
|
54
62
|
| `--ui-font` |
|
|
55
63
|
| `--ui-font-size-sm` |
|
|
56
64
|
| `--ui-radius` |
|
|
57
65
|
| `--ui-surface-muted` |
|
|
58
66
|
| `--ui-text` |
|
|
67
|
+
| `--ui-text-muted` |
|
|
@@ -42,9 +42,12 @@ _None._
|
|
|
42
42
|
| Custom property |
|
|
43
43
|
| --- |
|
|
44
44
|
| `--ui-danger` |
|
|
45
|
+
| `--ui-focus-ring` |
|
|
45
46
|
| `--ui-font` |
|
|
46
47
|
| `--ui-font-size` |
|
|
47
|
-
| `--ui-
|
|
48
|
+
| `--ui-hover-overlay` |
|
|
49
|
+
| `--ui-info` |
|
|
50
|
+
| `--ui-on-accent` |
|
|
48
51
|
| `--ui-radius` |
|
|
49
52
|
| `--ui-radius-sm` |
|
|
50
53
|
| `--ui-shadow-lg` |
|
package/docs/ui-button.md
CHANGED