@f-ewald/components 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +6 -0
  2. package/custom-elements.json +891 -22
  3. package/dist/address-autocomplete.d.ts +8 -0
  4. package/dist/address-autocomplete.d.ts.map +1 -1
  5. package/dist/address-autocomplete.js +165 -15
  6. package/dist/address-autocomplete.js.map +1 -1
  7. package/dist/animate-confetti.d.ts +8 -5
  8. package/dist/animate-confetti.d.ts.map +1 -1
  9. package/dist/animate-confetti.js +46 -19
  10. package/dist/animate-confetti.js.map +1 -1
  11. package/dist/autocomplete-input.d.ts +8 -0
  12. package/dist/autocomplete-input.d.ts.map +1 -1
  13. package/dist/autocomplete-input.js +165 -15
  14. package/dist/autocomplete-input.js.map +1 -1
  15. package/dist/calendar-month.d.ts.map +1 -1
  16. package/dist/calendar-month.js +27 -13
  17. package/dist/calendar-month.js.map +1 -1
  18. package/dist/calendar-year.d.ts.map +1 -1
  19. package/dist/calendar-year.js +11 -2
  20. package/dist/calendar-year.js.map +1 -1
  21. package/dist/chat-message.d.ts.map +1 -1
  22. package/dist/chat-message.js +77 -24
  23. package/dist/chat-message.js.map +1 -1
  24. package/dist/confirm-dialog.d.ts +8 -1
  25. package/dist/confirm-dialog.d.ts.map +1 -1
  26. package/dist/confirm-dialog.js +130 -18
  27. package/dist/confirm-dialog.js.map +1 -1
  28. package/dist/copy-link-button.d.ts +2 -0
  29. package/dist/copy-link-button.d.ts.map +1 -1
  30. package/dist/copy-link-button.js +35 -3
  31. package/dist/copy-link-button.js.map +1 -1
  32. package/dist/data-table.d.ts +2 -0
  33. package/dist/data-table.d.ts.map +1 -1
  34. package/dist/data-table.js +83 -11
  35. package/dist/data-table.js.map +1 -1
  36. package/dist/distance-value.d.ts +0 -1
  37. package/dist/distance-value.d.ts.map +1 -1
  38. package/dist/distance-value.js +3 -8
  39. package/dist/distance-value.js.map +1 -1
  40. package/dist/distribution-chart.d.ts.map +1 -1
  41. package/dist/distribution-chart.js +54 -17
  42. package/dist/distribution-chart.js.map +1 -1
  43. package/dist/dropdown-button.d.ts.map +1 -1
  44. package/dist/dropdown-button.js +60 -11
  45. package/dist/dropdown-button.js.map +1 -1
  46. package/dist/editable-text.d.ts.map +1 -1
  47. package/dist/editable-text.js +46 -13
  48. package/dist/editable-text.js.map +1 -1
  49. package/dist/form-select.d.ts.map +1 -1
  50. package/dist/form-select.js +70 -22
  51. package/dist/form-select.js.map +1 -1
  52. package/dist/frame-box.d.ts.map +1 -1
  53. package/dist/frame-box.js +20 -12
  54. package/dist/frame-box.js.map +1 -1
  55. package/dist/icon-button.d.ts.map +1 -1
  56. package/dist/icon-button.js +11 -0
  57. package/dist/icon-button.js.map +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/kbd-hint.d.ts +30 -0
  63. package/dist/kbd-hint.d.ts.map +1 -0
  64. package/dist/kbd-hint.js +184 -0
  65. package/dist/kbd-hint.js.map +1 -0
  66. package/dist/live-timer.d.ts +0 -1
  67. package/dist/live-timer.d.ts.map +1 -1
  68. package/dist/live-timer.js +1 -6
  69. package/dist/live-timer.js.map +1 -1
  70. package/dist/map-circle.d.ts.map +1 -1
  71. package/dist/map-circle.js +16 -1
  72. package/dist/map-circle.js.map +1 -1
  73. package/dist/map-pin.d.ts.map +1 -1
  74. package/dist/map-pin.js +16 -1
  75. package/dist/map-pin.js.map +1 -1
  76. package/dist/percent-bar-chart.d.ts +3 -0
  77. package/dist/percent-bar-chart.d.ts.map +1 -1
  78. package/dist/percent-bar-chart.js +60 -4
  79. package/dist/percent-bar-chart.js.map +1 -1
  80. package/dist/photo-gallery.d.ts.map +1 -1
  81. package/dist/photo-gallery.js +12 -3
  82. package/dist/photo-gallery.js.map +1 -1
  83. package/dist/popover-panel.d.ts.map +1 -1
  84. package/dist/popover-panel.js +132 -23
  85. package/dist/popover-panel.js.map +1 -1
  86. package/dist/price-history-chart.d.ts.map +1 -1
  87. package/dist/price-history-chart.js +52 -18
  88. package/dist/price-history-chart.js.map +1 -1
  89. package/dist/radio-cards.d.ts +2 -0
  90. package/dist/radio-cards.d.ts.map +1 -1
  91. package/dist/radio-cards.js +51 -5
  92. package/dist/radio-cards.js.map +1 -1
  93. package/dist/radio-pills.d.ts +2 -0
  94. package/dist/radio-pills.d.ts.map +1 -1
  95. package/dist/radio-pills.js +46 -4
  96. package/dist/radio-pills.js.map +1 -1
  97. package/dist/relative-time.d.ts +0 -1
  98. package/dist/relative-time.d.ts.map +1 -1
  99. package/dist/relative-time.js +1 -6
  100. package/dist/relative-time.js.map +1 -1
  101. package/dist/reveal-button.d.ts +2 -0
  102. package/dist/reveal-button.d.ts.map +1 -1
  103. package/dist/reveal-button.js +42 -5
  104. package/dist/reveal-button.js.map +1 -1
  105. package/dist/roman-numeral.js +1 -1
  106. package/dist/roman-numeral.js.map +1 -1
  107. package/dist/slide-panel.d.ts +7 -3
  108. package/dist/slide-panel.d.ts.map +1 -1
  109. package/dist/slide-panel.js +95 -23
  110. package/dist/slide-panel.js.map +1 -1
  111. package/dist/stat-meter.d.ts.map +1 -1
  112. package/dist/stat-meter.js +17 -7
  113. package/dist/stat-meter.js.map +1 -1
  114. package/dist/status-pill.d.ts.map +1 -1
  115. package/dist/status-pill.js +26 -12
  116. package/dist/status-pill.js.map +1 -1
  117. package/dist/tile-grid.d.ts +8 -0
  118. package/dist/tile-grid.d.ts.map +1 -1
  119. package/dist/tile-grid.js +88 -12
  120. package/dist/tile-grid.js.map +1 -1
  121. package/dist/toast-notification.d.ts.map +1 -1
  122. package/dist/toast-notification.js +40 -11
  123. package/dist/toast-notification.js.map +1 -1
  124. package/dist/tokens.css +19 -0
  125. package/dist/tokens.d.ts.map +1 -1
  126. package/dist/tokens.js +13 -0
  127. package/dist/tokens.js.map +1 -1
  128. package/dist/ui-button.d.ts +2 -0
  129. package/dist/ui-button.d.ts.map +1 -1
  130. package/dist/ui-button.js +58 -9
  131. package/dist/ui-button.js.map +1 -1
  132. package/dist/user-avatar.d.ts.map +1 -1
  133. package/dist/user-avatar.js +18 -3
  134. package/dist/user-avatar.js.map +1 -1
  135. package/dist/utils/form.d.ts +3 -0
  136. package/dist/utils/form.d.ts.map +1 -0
  137. package/dist/utils/form.js +14 -0
  138. package/dist/utils/form.js.map +1 -0
  139. package/dist/utils/layer-stack.d.ts +9 -0
  140. package/dist/utils/layer-stack.d.ts.map +1 -0
  141. package/dist/utils/layer-stack.js +35 -0
  142. package/dist/utils/layer-stack.js.map +1 -0
  143. package/dist/weight-bar-chart.d.ts.map +1 -1
  144. package/dist/weight-bar-chart.js +27 -8
  145. package/dist/weight-bar-chart.js.map +1 -1
  146. package/docs/address-autocomplete.md +5 -0
  147. package/docs/autocomplete-input.md +5 -0
  148. package/docs/calendar-month.md +2 -0
  149. package/docs/chat-message.md +4 -0
  150. package/docs/confirm-dialog.md +2 -0
  151. package/docs/copy-link-button.md +2 -0
  152. package/docs/data-table.md +2 -0
  153. package/docs/design-language.md +149 -0
  154. package/docs/distribution-chart.md +4 -0
  155. package/docs/dropdown-button.md +1 -0
  156. package/docs/frame-box.md +2 -0
  157. package/docs/kbd-hint.md +42 -0
  158. package/docs/percent-bar-chart.md +4 -1
  159. package/docs/photo-gallery.md +1 -0
  160. package/docs/popover-panel.md +2 -0
  161. package/docs/price-history-chart.md +8 -1
  162. package/docs/radio-cards.md +2 -0
  163. package/docs/radio-pills.md +2 -0
  164. package/docs/reveal-button.md +3 -0
  165. package/docs/slide-panel.md +4 -2
  166. package/docs/status-pill.md +3 -0
  167. package/docs/tile-grid.md +10 -1
  168. package/docs/toast-notification.md +4 -1
  169. package/docs/ui-button.md +2 -0
  170. package/docs/user-avatar.md +1 -0
  171. package/llms.txt +59 -34
  172. 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.
@@ -45,7 +45,11 @@ _None._
45
45
 
46
46
  | Custom property |
47
47
  | --- |
48
+ | `--ui-border` |
48
49
  | `--ui-danger` |
50
+ | `--ui-font` |
49
51
  | `--ui-font-size-sm` |
52
+ | `--ui-primary` |
50
53
  | `--ui-radius-sm` |
54
+ | `--ui-surface-muted` |
51
55
  | `--ui-text-muted` |
@@ -52,6 +52,7 @@ _None._
52
52
  | `--ui-focus-ring` |
53
53
  | `--ui-font` |
54
54
  | `--ui-font-size-sm` |
55
+ | `--ui-on-accent` |
55
56
  | `--ui-primary` |
56
57
  | `--ui-primary-hover` |
57
58
  | `--ui-radius-sm` |
package/docs/frame-box.md CHANGED
@@ -38,6 +38,8 @@ _None._
38
38
  | Custom property |
39
39
  | --- |
40
40
  | `--ui-border` |
41
+ | `--ui-font` |
42
+ | `--ui-font-size-xs` |
41
43
  | `--ui-radius-sm` |
42
44
  | `--ui-surface` |
43
45
  | `--ui-text-muted` |
@@ -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` |
@@ -37,4 +37,7 @@ _None._
37
37
 
38
38
  ## CSS custom properties
39
39
 
40
- _None._
40
+ | Custom property |
41
+ | --- |
42
+ | `--ui-font` |
43
+ | `--ui-text-muted` |
@@ -67,6 +67,7 @@ import "@f-ewald/components/photo-gallery.js";
67
67
  | `--ui-font` |
68
68
  | `--ui-font-size` |
69
69
  | `--ui-font-size-sm` |
70
+ | `--ui-on-accent` |
70
71
  | `--ui-overlay` |
71
72
  | `--ui-primary` |
72
73
  | `--ui-radius` |
@@ -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` |
@@ -41,4 +41,11 @@ _None._
41
41
 
42
42
  ## CSS custom properties
43
43
 
44
- _None._
44
+ | Custom property |
45
+ | --- |
46
+ | `--ui-border` |
47
+ | `--ui-font` |
48
+ | `--ui-on-accent` |
49
+ | `--ui-primary` |
50
+ | `--ui-text-muted` |
51
+ | `--ui-tooltip` |
@@ -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` |
@@ -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` |
@@ -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` |
@@ -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: 300 px fixed right-side panel that slides from the right.
8
- Mobile (≤768px): bottom-sheet drawer (60vh) — reserved for future use.
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` |
@@ -38,6 +38,9 @@ _None._
38
38
  | --- |
39
39
  | `--ui-danger` |
40
40
  | `--ui-font` |
41
+ | `--ui-font-size-sm` |
42
+ | `--ui-info` |
41
43
  | `--ui-primary` |
42
44
  | `--ui-success` |
43
45
  | `--ui-text-muted` |
46
+ | `--ui-warning` |
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-primary` |
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
@@ -58,8 +58,10 @@ _None._
58
58
  | `--ui-border` |
59
59
  | `--ui-danger` |
60
60
  | `--ui-danger-hover` |
61
+ | `--ui-focus-ring` |
61
62
  | `--ui-font` |
62
63
  | `--ui-font-size-sm` |
64
+ | `--ui-on-accent` |
63
65
  | `--ui-primary` |
64
66
  | `--ui-primary-hover` |
65
67
  | `--ui-radius-sm` |
@@ -39,4 +39,5 @@ _None._
39
39
  | Custom property |
40
40
  | --- |
41
41
  | `--ui-font` |
42
+ | `--ui-on-accent` |
42
43
  | `--ui-primary` |