@f-ewald/components 1.39.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.
Files changed (192) hide show
  1. package/README.md +48 -0
  2. package/custom-elements.json +1046 -131
  3. package/dist/address-autocomplete.js +2 -2
  4. package/dist/address-autocomplete.js.map +1 -1
  5. package/dist/app-shell.js +4 -4
  6. package/dist/app-shell.js.map +1 -1
  7. package/dist/app-sidebar.js +2 -2
  8. package/dist/app-sidebar.js.map +1 -1
  9. package/dist/audio-player.js +1 -1
  10. package/dist/audio-player.js.map +1 -1
  11. package/dist/autocomplete-input.js +2 -2
  12. package/dist/autocomplete-input.js.map +1 -1
  13. package/dist/breadcrumb-nav.d.ts +69 -0
  14. package/dist/breadcrumb-nav.d.ts.map +1 -0
  15. package/dist/breadcrumb-nav.js +235 -0
  16. package/dist/breadcrumb-nav.js.map +1 -0
  17. package/dist/button-group.js +2 -2
  18. package/dist/button-group.js.map +1 -1
  19. package/dist/calendar-day.js +3 -3
  20. package/dist/calendar-day.js.map +1 -1
  21. package/dist/calendar-month.d.ts.map +1 -1
  22. package/dist/calendar-month.js +4 -1
  23. package/dist/calendar-month.js.map +1 -1
  24. package/dist/calendar-week.js +4 -4
  25. package/dist/calendar-week.js.map +1 -1
  26. package/dist/chat-message.js +1 -1
  27. package/dist/chat-message.js.map +1 -1
  28. package/dist/comment-composer.js +1 -1
  29. package/dist/comment-composer.js.map +1 -1
  30. package/dist/confirm-dialog.d.ts.map +1 -1
  31. package/dist/confirm-dialog.js +5 -2
  32. package/dist/confirm-dialog.js.map +1 -1
  33. package/dist/content-divider.js +1 -1
  34. package/dist/content-divider.js.map +1 -1
  35. package/dist/cron-schedule.d.ts.map +1 -1
  36. package/dist/cron-schedule.js +6 -5
  37. package/dist/cron-schedule.js.map +1 -1
  38. package/dist/data-table.d.ts.map +1 -1
  39. package/dist/data-table.js +3 -2
  40. package/dist/data-table.js.map +1 -1
  41. package/dist/dropdown-button.d.ts.map +1 -1
  42. package/dist/dropdown-button.js +4 -2
  43. package/dist/dropdown-button.js.map +1 -1
  44. package/dist/editable-text.js +1 -1
  45. package/dist/editable-text.js.map +1 -1
  46. package/dist/empty-state.d.ts +42 -0
  47. package/dist/empty-state.d.ts.map +1 -0
  48. package/dist/empty-state.js +172 -0
  49. package/dist/empty-state.js.map +1 -0
  50. package/dist/form-field.js +1 -1
  51. package/dist/form-field.js.map +1 -1
  52. package/dist/form-select.js +3 -3
  53. package/dist/form-select.js.map +1 -1
  54. package/dist/frame-box.js +1 -1
  55. package/dist/frame-box.js.map +1 -1
  56. package/dist/fullscreen-button.js +1 -1
  57. package/dist/fullscreen-button.js.map +1 -1
  58. package/dist/icons.d.ts +2 -0
  59. package/dist/icons.d.ts.map +1 -1
  60. package/dist/icons.js +2 -0
  61. package/dist/icons.js.map +1 -1
  62. package/dist/index.d.ts +6 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +6 -1
  65. package/dist/index.js.map +1 -1
  66. package/dist/kanban-card.js +1 -1
  67. package/dist/kanban-card.js.map +1 -1
  68. package/dist/kanban-column.js +3 -3
  69. package/dist/kanban-column.js.map +1 -1
  70. package/dist/kbd-hint.d.ts.map +1 -1
  71. package/dist/kbd-hint.js +2 -1
  72. package/dist/kbd-hint.js.map +1 -1
  73. package/dist/link-card.js +1 -1
  74. package/dist/link-card.js.map +1 -1
  75. package/dist/markdown-view.js +3 -3
  76. package/dist/markdown-view.js.map +1 -1
  77. package/dist/modal-dialog.js +1 -1
  78. package/dist/modal-dialog.js.map +1 -1
  79. package/dist/multi-select.js +5 -5
  80. package/dist/multi-select.js.map +1 -1
  81. package/dist/pagination-nav.d.ts.map +1 -1
  82. package/dist/pagination-nav.js +5 -1
  83. package/dist/pagination-nav.js.map +1 -1
  84. package/dist/photo-gallery.js +1 -1
  85. package/dist/photo-gallery.js.map +1 -1
  86. package/dist/popover-panel.d.ts.map +1 -1
  87. package/dist/popover-panel.js +4 -2
  88. package/dist/popover-panel.js.map +1 -1
  89. package/dist/progress-bar.d.ts.map +1 -1
  90. package/dist/progress-bar.js +1 -0
  91. package/dist/progress-bar.js.map +1 -1
  92. package/dist/radio-cards.js +1 -1
  93. package/dist/radio-cards.js.map +1 -1
  94. package/dist/radio-pills.js +1 -1
  95. package/dist/radio-pills.js.map +1 -1
  96. package/dist/reveal-button.js +1 -1
  97. package/dist/reveal-button.js.map +1 -1
  98. package/dist/scroll-to-bottom.js +1 -1
  99. package/dist/scroll-to-bottom.js.map +1 -1
  100. package/dist/scroll-to-top.js +1 -1
  101. package/dist/scroll-to-top.js.map +1 -1
  102. package/dist/skip-link.d.ts +30 -0
  103. package/dist/skip-link.d.ts.map +1 -0
  104. package/dist/skip-link.js +136 -0
  105. package/dist/skip-link.js.map +1 -0
  106. package/dist/slide-panel.js +1 -1
  107. package/dist/slide-panel.js.map +1 -1
  108. package/dist/spec-list.d.ts +49 -0
  109. package/dist/spec-list.d.ts.map +1 -0
  110. package/dist/spec-list.js +168 -0
  111. package/dist/spec-list.js.map +1 -0
  112. package/dist/stat-meter.d.ts.map +1 -1
  113. package/dist/stat-meter.js +1 -0
  114. package/dist/stat-meter.js.map +1 -1
  115. package/dist/tab-bar.js +1 -1
  116. package/dist/tab-bar.js.map +1 -1
  117. package/dist/text-area.js +1 -1
  118. package/dist/text-area.js.map +1 -1
  119. package/dist/tile-grid.js +1 -1
  120. package/dist/tile-grid.js.map +1 -1
  121. package/dist/tokens.css +42 -1
  122. package/dist/tokens.d.ts +50 -0
  123. package/dist/tokens.d.ts.map +1 -1
  124. package/dist/tokens.js +132 -0
  125. package/dist/tokens.js.map +1 -1
  126. package/dist/tree-view.js +2 -2
  127. package/dist/tree-view.js.map +1 -1
  128. package/dist/ui-admonition.js +1 -1
  129. package/dist/ui-admonition.js.map +1 -1
  130. package/dist/ui-button.js +1 -1
  131. package/dist/ui-button.js.map +1 -1
  132. package/dist/video-player.js +1 -1
  133. package/dist/video-player.js.map +1 -1
  134. package/dist/vote-control.d.ts +40 -0
  135. package/dist/vote-control.d.ts.map +1 -0
  136. package/dist/vote-control.js +311 -0
  137. package/dist/vote-control.js.map +1 -0
  138. package/docs/address-autocomplete.md +1 -0
  139. package/docs/app-shell.md +1 -0
  140. package/docs/app-sidebar.md +1 -0
  141. package/docs/audio-player.md +1 -0
  142. package/docs/autocomplete-input.md +1 -0
  143. package/docs/breadcrumb-nav.md +70 -0
  144. package/docs/button-group.md +1 -0
  145. package/docs/calendar-day.md +1 -0
  146. package/docs/calendar-month.md +1 -0
  147. package/docs/calendar-week.md +1 -0
  148. package/docs/chat-message.md +1 -0
  149. package/docs/comment-composer.md +1 -0
  150. package/docs/confirm-dialog.md +1 -0
  151. package/docs/content-divider.md +1 -0
  152. package/docs/cron-schedule.md +2 -0
  153. package/docs/data-table.md +2 -0
  154. package/docs/design-language.md +57 -5
  155. package/docs/dropdown-button.md +1 -0
  156. package/docs/editable-text.md +1 -0
  157. package/docs/empty-state.md +55 -0
  158. package/docs/form-field.md +1 -0
  159. package/docs/form-select.md +1 -0
  160. package/docs/frame-box.md +1 -0
  161. package/docs/fullscreen-button.md +1 -0
  162. package/docs/icons.md +1 -0
  163. package/docs/kanban-card.md +1 -0
  164. package/docs/kanban-column.md +1 -0
  165. package/docs/kbd-hint.md +1 -0
  166. package/docs/link-card.md +1 -0
  167. package/docs/markdown-view.md +1 -0
  168. package/docs/modal-dialog.md +1 -0
  169. package/docs/multi-select.md +1 -0
  170. package/docs/pagination-nav.md +2 -0
  171. package/docs/photo-gallery.md +1 -0
  172. package/docs/popover-panel.md +1 -0
  173. package/docs/progress-bar.md +1 -0
  174. package/docs/radio-cards.md +1 -0
  175. package/docs/radio-pills.md +1 -0
  176. package/docs/reveal-button.md +1 -0
  177. package/docs/scroll-to-bottom.md +1 -0
  178. package/docs/scroll-to-top.md +1 -0
  179. package/docs/skip-link.md +54 -0
  180. package/docs/slide-panel.md +1 -0
  181. package/docs/spec-list.md +71 -0
  182. package/docs/stat-meter.md +1 -0
  183. package/docs/tab-bar.md +1 -0
  184. package/docs/text-area.md +1 -0
  185. package/docs/tile-grid.md +1 -0
  186. package/docs/tree-view.md +1 -0
  187. package/docs/ui-admonition.md +1 -0
  188. package/docs/ui-button.md +1 -0
  189. package/docs/video-player.md +1 -0
  190. package/docs/vote-control.md +73 -0
  191. package/llms.txt +201 -49
  192. package/package.json +1 -1
@@ -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` |
@@ -66,6 +66,7 @@ _None._
66
66
  | Custom property |
67
67
  | --- |
68
68
  | `--ui-border` |
69
+ | `--ui-border-width` |
69
70
  | `--ui-danger` |
70
71
  | `--ui-focus-ring` |
71
72
  | `--ui-font` |
@@ -71,6 +71,7 @@ _None._
71
71
  | Custom property |
72
72
  | --- |
73
73
  | `--ui-border` |
74
+ | `--ui-border-width` |
74
75
  | `--ui-focus-ring` |
75
76
  | `--ui-font` |
76
77
  | `--ui-font-size` |
package/docs/frame-box.md CHANGED
@@ -38,6 +38,7 @@ _None._
38
38
  | Custom property |
39
39
  | --- |
40
40
  | `--ui-border` |
41
+ | `--ui-border-width` |
41
42
  | `--ui-font` |
42
43
  | `--ui-font-size-xs` |
43
44
  | `--ui-font-weight-semibold` |
@@ -53,6 +53,7 @@ _None._
53
53
  | Custom property |
54
54
  | --- |
55
55
  | `--ui-border` |
56
+ | `--ui-border-width` |
56
57
  | `--ui-button-highlight` |
57
58
  | `--ui-button-secondary-` |
58
59
  | `--ui-button-secondary-background` |
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. |
@@ -41,6 +41,7 @@ _None._
41
41
  | Custom property |
42
42
  | --- |
43
43
  | `--ui-border` |
44
+ | `--ui-border-width` |
44
45
  | `--ui-focus-ring` |
45
46
  | `--ui-font` |
46
47
  | `--ui-font-size` |
@@ -41,6 +41,7 @@ _None._
41
41
  | Custom property |
42
42
  | --- |
43
43
  | `--ui-border` |
44
+ | `--ui-border-width` |
44
45
  | `--ui-font` |
45
46
  | `--ui-font-size` |
46
47
  | `--ui-font-size-sm` |
package/docs/kbd-hint.md CHANGED
@@ -37,6 +37,7 @@ _None._
37
37
 
38
38
  | Custom property |
39
39
  | --- |
40
+ | `--ui-border-width` |
40
41
  | `--ui-font-mono` |
41
42
  | `--ui-font-size-xs` |
42
43
  | `--ui-line-height-glyph` |
package/docs/link-card.md CHANGED
@@ -48,6 +48,7 @@ _None._
48
48
  | Custom property |
49
49
  | --- |
50
50
  | `--ui-border` |
51
+ | `--ui-border-width` |
51
52
  | `--ui-danger` |
52
53
  | `--ui-focus-ring` |
53
54
  | `--ui-font` |
@@ -57,6 +57,7 @@ _None._
57
57
  | Custom property |
58
58
  | --- |
59
59
  | `--ui-border` |
60
+ | `--ui-border-width` |
60
61
  | `--ui-font` |
61
62
  | `--ui-font-mono` |
62
63
  | `--ui-font-size` |
@@ -51,6 +51,7 @@ import "@f-ewald/components/modal-dialog.js";
51
51
  | Custom property |
52
52
  | --- |
53
53
  | `--ui-border` |
54
+ | `--ui-border-width` |
54
55
  | `--ui-focus-ring` |
55
56
  | `--ui-font` |
56
57
  | `--ui-font-size-lg` |
@@ -103,6 +103,7 @@ _None._
103
103
  | Custom property |
104
104
  | --- |
105
105
  | `--ui-border` |
106
+ | `--ui-border-width` |
106
107
  | `--ui-danger` |
107
108
  | `--ui-focus-ring` |
108
109
  | `--ui-font` |
@@ -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` |
@@ -67,6 +67,7 @@ import "@f-ewald/components/photo-gallery.js";
67
67
  | Custom property |
68
68
  | --- |
69
69
  | `--ui-border` |
70
+ | `--ui-border-width` |
70
71
  | `--ui-focus-ring` |
71
72
  | `--ui-font` |
72
73
  | `--ui-font-size` |
@@ -59,6 +59,7 @@ import "@f-ewald/components/popover-panel.js";
59
59
  | Custom property |
60
60
  | --- |
61
61
  | `--ui-border` |
62
+ | `--ui-border-width` |
62
63
  | `--ui-focus-ring` |
63
64
  | `--ui-font` |
64
65
  | `--ui-font-size-lg` |
@@ -45,6 +45,7 @@ _None._
45
45
  | `--ui-button-accent` |
46
46
  | `--ui-font` |
47
47
  | `--ui-font-size-sm` |
48
+ | `--ui-numeric` |
48
49
  | `--ui-primary` |
49
50
  | `--ui-radius-sm` |
50
51
  | `--ui-surface-muted` |
@@ -73,6 +73,7 @@ _None._
73
73
  | Custom property |
74
74
  | --- |
75
75
  | `--ui-border` |
76
+ | `--ui-border-width` |
76
77
  | `--ui-button-accent` |
77
78
  | `--ui-button-highlight` |
78
79
  | `--ui-button-secondary-background` |
@@ -56,6 +56,7 @@ _None._
56
56
  | Custom property |
57
57
  | --- |
58
58
  | `--ui-border` |
59
+ | `--ui-border-width` |
59
60
  | `--ui-button-accent` |
60
61
  | `--ui-button-highlight` |
61
62
  | `--ui-button-secondary-surface-muted` |
@@ -40,6 +40,7 @@ _None._
40
40
 
41
41
  | Custom property |
42
42
  | --- |
43
+ | `--ui-border-width` |
43
44
  | `--ui-button-background` |
44
45
  | `--ui-button-background-active` |
45
46
  | `--ui-button-background-hover` |
@@ -63,6 +63,7 @@ _None._
63
63
  | Custom property |
64
64
  | --- |
65
65
  | `--ui-border` |
66
+ | `--ui-border-width` |
66
67
  | `--ui-button-highlight` |
67
68
  | `--ui-button-secondary-` |
68
69
  | `--ui-button-secondary-background` |
@@ -54,6 +54,7 @@ _None._
54
54
  | Custom property |
55
55
  | --- |
56
56
  | `--ui-border` |
57
+ | `--ui-border-width` |
57
58
  | `--ui-button-highlight` |
58
59
  | `--ui-button-secondary-` |
59
60
  | `--ui-button-secondary-background` |
@@ -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` |
@@ -46,6 +46,7 @@ import "@f-ewald/components/slide-panel.js";
46
46
  | Custom property |
47
47
  | --- |
48
48
  | `--ui-border` |
49
+ | `--ui-border-width` |
49
50
  | `--ui-focus-ring` |
50
51
  | `--ui-font` |
51
52
  | `--ui-font-size-lg` |
@@ -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` |
@@ -45,6 +45,7 @@ _None._
45
45
  | `--ui-font-size-sm` |
46
46
  | `--ui-font-weight-medium` |
47
47
  | `--ui-font-weight-semibold` |
48
+ | `--ui-label-transform` |
48
49
  | `--ui-radius-pill` |
49
50
  | `--ui-success` |
50
51
  | `--ui-surface-muted` |
package/docs/tab-bar.md CHANGED
@@ -52,6 +52,7 @@ import "@f-ewald/components/tab-bar.js";
52
52
  | Custom property |
53
53
  | --- |
54
54
  | `--ui-border` |
55
+ | `--ui-border-width` |
55
56
  | `--ui-focus-ring` |
56
57
  | `--ui-font` |
57
58
  | `--ui-font-size-sm` |
package/docs/text-area.md CHANGED
@@ -48,6 +48,7 @@ _None._
48
48
  | Custom property |
49
49
  | --- |
50
50
  | `--ui-border` |
51
+ | `--ui-border-width` |
51
52
  | `--ui-danger` |
52
53
  | `--ui-focus-ring` |
53
54
  | `--ui-font` |
package/docs/tile-grid.md CHANGED
@@ -58,6 +58,7 @@ _None._
58
58
  | Custom property |
59
59
  | --- |
60
60
  | `--ui-border` |
61
+ | `--ui-border-width` |
61
62
  | `--ui-focus-ring` |
62
63
  | `--ui-font` |
63
64
  | `--ui-font-size-sm` |
package/docs/tree-view.md CHANGED
@@ -66,6 +66,7 @@ _None._
66
66
  | Custom property |
67
67
  | --- |
68
68
  | `--ui-border` |
69
+ | `--ui-border-width` |
69
70
  | `--ui-focus-ring` |
70
71
  | `--ui-font` |
71
72
  | `--ui-font-size-sm` |
@@ -42,6 +42,7 @@ _None._
42
42
 
43
43
  | Custom property |
44
44
  | --- |
45
+ | `--ui-border-width` |
45
46
  | `--ui-danger` |
46
47
  | `--ui-font` |
47
48
  | `--ui-font-size-sm` |
package/docs/ui-button.md CHANGED
@@ -104,6 +104,7 @@ _None._
104
104
  | `--ui-ai-3` |
105
105
  | `--ui-ai-4` |
106
106
  | `--ui-border` |
107
+ | `--ui-border-width` |
107
108
  | `--ui-button-background` |
108
109
  | `--ui-button-background-active` |
109
110
  | `--ui-button-background-hover` |
@@ -51,6 +51,7 @@ _None._
51
51
  | Custom property |
52
52
  | --- |
53
53
  | `--ui-border` |
54
+ | `--ui-border-width` |
54
55
  | `--ui-danger` |
55
56
  | `--ui-font` |
56
57
  | `--ui-font-size-sm` |
@@ -0,0 +1,73 @@
1
+ # `<vote-control>`
2
+
3
+ An up/down vote widget with a live score readout — the "vote an entry up or
4
+ down toward a promotion threshold" pattern from a public register site,
5
+ where one member casts a single vote that can be changed or withdrawn at any
6
+ time. Two native `<button>`s flank a score; the button matching the user's
7
+ own cast `vote` reads as pressed (`aria-pressed`), and clicking it again
8
+ withdraws the vote. Set an optional `target` to render a thin progress meter
9
+ toward the promotion threshold beneath (vertical) or beside (horizontal) the
10
+ buttons.
11
+
12
+ ## Install
13
+
14
+ ```js
15
+ import "@f-ewald/components/vote-control.js";
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```html
21
+ <vote-control value="7" target="10" label="Vote for this entry"></vote-control>
22
+ <vote-control orientation="horizontal" value="42" target="50"></vote-control>
23
+ <vote-control value="3" disabled></vote-control>
24
+ ```
25
+
26
+ ## Attributes / properties
27
+
28
+ | Property | Attribute | Type | Default | Description |
29
+ | --- | --- | --- | --- | --- |
30
+ | `value` | `value` | `number` | `0` | The current net score shown between the buttons. |
31
+ | `vote` | `vote` | `"up" | "down" | null` | `null` | This user's own cast vote, or `null` if they have not voted. Reflected so CSS can style the pressed button. |
32
+ | `disabled` | `disabled` | `boolean` | `false` | Disables both buttons and dims the control. |
33
+ | `orientation` | `orientation` | `"vertical" | "horizontal"` | `"vertical"` | Layout — `vertical` is the compact stacked box (default); `horizontal` is the wide inline variant. |
34
+ | `target` | `target` | `number` | `0` | Promotion threshold. When > 0, a thin progress meter toward it renders; when 0 (default) no meter renders and no space is reserved for it. |
35
+ | `label` | `label` | `string` | `"Vote"` | Accessible label naming the vote group. |
36
+
37
+ ## Events
38
+
39
+ | Event | Description |
40
+ | --- | --- |
41
+ | `vote-change` | The user cast, switched, or withdrew their vote; detail: { vote: "up" | "down" | null, value: number }. |
42
+
43
+ ## Slots
44
+
45
+ _None._
46
+
47
+ ## CSS custom properties
48
+
49
+ | Custom property |
50
+ | --- |
51
+ | `--ui-border` |
52
+ | `--ui-border-width` |
53
+ | `--ui-button-accent` |
54
+ | `--ui-danger` |
55
+ | `--ui-focus-ring` |
56
+ | `--ui-font` |
57
+ | `--ui-font-size-lg` |
58
+ | `--ui-font-size-xs` |
59
+ | `--ui-font-weight-medium` |
60
+ | `--ui-font-weight-semibold` |
61
+ | `--ui-label-transform` |
62
+ | `--ui-line-height-tight` |
63
+ | `--ui-numeric` |
64
+ | `--ui-primary` |
65
+ | `--ui-radius` |
66
+ | `--ui-radius-pill` |
67
+ | `--ui-radius-sm` |
68
+ | `--ui-success` |
69
+ | `--ui-surface` |
70
+ | `--ui-surface-muted` |
71
+ | `--ui-text` |
72
+ | `--ui-text-muted` |
73
+ | `--ui-tracking-wide` |