@phcdevworks/spectre-components 1.20.0 → 1.21.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 (350) hide show
  1. package/README.md +672 -49
  2. package/dist/accordion-item.cjs +540 -0
  3. package/dist/accordion-item.cjs.map +1 -0
  4. package/dist/accordion-item.d.cts +59 -0
  5. package/dist/accordion-item.d.ts +59 -0
  6. package/dist/accordion-item.js +537 -0
  7. package/dist/accordion-item.js.map +1 -0
  8. package/dist/accordion.cjs +468 -0
  9. package/dist/accordion.cjs.map +1 -0
  10. package/dist/accordion.d.cts +38 -0
  11. package/dist/accordion.d.ts +38 -0
  12. package/dist/accordion.js +465 -0
  13. package/dist/accordion.js.map +1 -0
  14. package/dist/alert.cjs +166 -65
  15. package/dist/alert.cjs.map +1 -1
  16. package/dist/alert.d.cts +41 -8
  17. package/dist/alert.d.ts +41 -8
  18. package/dist/alert.js +168 -67
  19. package/dist/alert.js.map +1 -1
  20. package/dist/avatar.cjs +27 -1
  21. package/dist/avatar.cjs.map +1 -1
  22. package/dist/avatar.d.cts +19 -3
  23. package/dist/avatar.d.ts +19 -3
  24. package/dist/avatar.js +27 -1
  25. package/dist/avatar.js.map +1 -1
  26. package/dist/badge.cjs +35 -2
  27. package/dist/badge.cjs.map +1 -1
  28. package/dist/badge.d.cts +31 -3
  29. package/dist/badge.d.ts +31 -3
  30. package/dist/badge.js +35 -2
  31. package/dist/badge.js.map +1 -1
  32. package/dist/breadcrumb.cjs +464 -0
  33. package/dist/breadcrumb.cjs.map +1 -0
  34. package/dist/breadcrumb.d.cts +32 -0
  35. package/dist/breadcrumb.d.ts +32 -0
  36. package/dist/breadcrumb.js +461 -0
  37. package/dist/breadcrumb.js.map +1 -0
  38. package/dist/button.cjs +32 -2
  39. package/dist/button.cjs.map +1 -1
  40. package/dist/button.d.cts +19 -3
  41. package/dist/button.d.ts +19 -3
  42. package/dist/button.js +32 -2
  43. package/dist/button.js.map +1 -1
  44. package/dist/card-bleed.cjs +458 -0
  45. package/dist/card-bleed.cjs.map +1 -0
  46. package/dist/card-bleed.d.cts +37 -0
  47. package/dist/card-bleed.d.ts +37 -0
  48. package/dist/card-bleed.js +455 -0
  49. package/dist/card-bleed.js.map +1 -0
  50. package/dist/card.cjs +27 -1
  51. package/dist/card.cjs.map +1 -1
  52. package/dist/card.d.cts +19 -3
  53. package/dist/card.d.ts +19 -3
  54. package/dist/card.js +27 -1
  55. package/dist/card.js.map +1 -1
  56. package/dist/carousel.cjs +655 -0
  57. package/dist/carousel.cjs.map +1 -0
  58. package/dist/carousel.d.cts +79 -0
  59. package/dist/carousel.d.ts +79 -0
  60. package/dist/carousel.js +652 -0
  61. package/dist/carousel.js.map +1 -0
  62. package/dist/checkbox.cjs +3 -1
  63. package/dist/checkbox.cjs.map +1 -1
  64. package/dist/checkbox.js +3 -1
  65. package/dist/checkbox.js.map +1 -1
  66. package/dist/choice-card.cjs +524 -0
  67. package/dist/choice-card.cjs.map +1 -0
  68. package/dist/choice-card.d.cts +81 -0
  69. package/dist/choice-card.d.ts +81 -0
  70. package/dist/choice-card.js +521 -0
  71. package/dist/choice-card.js.map +1 -0
  72. package/dist/container.cjs +23 -6
  73. package/dist/container.cjs.map +1 -1
  74. package/dist/container.d.cts +9 -3
  75. package/dist/container.d.ts +9 -3
  76. package/dist/container.js +23 -7
  77. package/dist/container.js.map +1 -1
  78. package/dist/datepicker.cjs +580 -0
  79. package/dist/datepicker.cjs.map +1 -0
  80. package/dist/datepicker.d.cts +78 -0
  81. package/dist/datepicker.d.ts +78 -0
  82. package/dist/datepicker.js +577 -0
  83. package/dist/datepicker.js.map +1 -0
  84. package/dist/dom-CX9bgbcQ.d.cts +3 -0
  85. package/dist/dom-CX9bgbcQ.d.ts +3 -0
  86. package/dist/dropdown.cjs +24 -0
  87. package/dist/dropdown.cjs.map +1 -1
  88. package/dist/dropdown.d.cts +3 -2
  89. package/dist/dropdown.d.ts +3 -2
  90. package/dist/dropdown.js +25 -1
  91. package/dist/dropdown.js.map +1 -1
  92. package/dist/external-auth-button.cjs +494 -0
  93. package/dist/external-auth-button.cjs.map +1 -0
  94. package/dist/external-auth-button.d.cts +71 -0
  95. package/dist/external-auth-button.d.ts +71 -0
  96. package/dist/external-auth-button.js +491 -0
  97. package/dist/external-auth-button.js.map +1 -0
  98. package/dist/fieldset.cjs +3 -1
  99. package/dist/fieldset.cjs.map +1 -1
  100. package/dist/fieldset.js +3 -1
  101. package/dist/fieldset.js.map +1 -1
  102. package/dist/file-input.cjs +371 -0
  103. package/dist/file-input.cjs.map +1 -0
  104. package/dist/file-input.d.cts +96 -0
  105. package/dist/file-input.d.ts +96 -0
  106. package/dist/file-input.js +367 -0
  107. package/dist/file-input.js.map +1 -0
  108. package/dist/footer-chip.cjs +22 -2
  109. package/dist/footer-chip.cjs.map +1 -1
  110. package/dist/footer-chip.d.cts +12 -1
  111. package/dist/footer-chip.d.ts +12 -1
  112. package/dist/footer-chip.js +22 -2
  113. package/dist/footer-chip.js.map +1 -1
  114. package/dist/footer-link.cjs +19 -1
  115. package/dist/footer-link.cjs.map +1 -1
  116. package/dist/footer-link.d.cts +12 -1
  117. package/dist/footer-link.d.ts +12 -1
  118. package/dist/footer-link.js +19 -1
  119. package/dist/footer-link.js.map +1 -1
  120. package/dist/footer.cjs +30 -1
  121. package/dist/footer.cjs.map +1 -1
  122. package/dist/footer.d.cts +2 -1
  123. package/dist/footer.d.ts +2 -1
  124. package/dist/footer.js +31 -2
  125. package/dist/footer.js.map +1 -1
  126. package/dist/{form-DpPtizpY.d.cts → form-CVO7mlDa.d.cts} +38 -9
  127. package/dist/{form-DpPtizpY.d.ts → form-CVO7mlDa.d.ts} +38 -9
  128. package/dist/grid.cjs +35 -1
  129. package/dist/grid.cjs.map +1 -1
  130. package/dist/grid.d.cts +9 -3
  131. package/dist/grid.d.ts +9 -3
  132. package/dist/grid.js +35 -2
  133. package/dist/grid.js.map +1 -1
  134. package/dist/icon-box.cjs +27 -1
  135. package/dist/icon-box.cjs.map +1 -1
  136. package/dist/icon-box.d.cts +19 -3
  137. package/dist/icon-box.d.ts +19 -3
  138. package/dist/icon-box.js +27 -1
  139. package/dist/icon-box.js.map +1 -1
  140. package/dist/index.cjs +3654 -107
  141. package/dist/index.cjs.map +1 -1
  142. package/dist/index.d.cts +26 -1
  143. package/dist/index.d.ts +26 -1
  144. package/dist/index.js +3594 -110
  145. package/dist/index.js.map +1 -1
  146. package/dist/input-group.cjs +471 -0
  147. package/dist/input-group.cjs.map +1 -0
  148. package/dist/input-group.d.cts +31 -0
  149. package/dist/input-group.d.ts +31 -0
  150. package/dist/input-group.js +468 -0
  151. package/dist/input-group.js.map +1 -0
  152. package/dist/input.cjs +96 -4
  153. package/dist/input.cjs.map +1 -1
  154. package/dist/input.d.cts +45 -6
  155. package/dist/input.d.ts +45 -6
  156. package/dist/input.js +98 -6
  157. package/dist/input.js.map +1 -1
  158. package/dist/label.cjs +3 -1
  159. package/dist/label.cjs.map +1 -1
  160. package/dist/label.js +3 -1
  161. package/dist/label.js.map +1 -1
  162. package/dist/list-group-item.cjs +367 -0
  163. package/dist/list-group-item.cjs.map +1 -0
  164. package/dist/list-group-item.d.cts +73 -0
  165. package/dist/list-group-item.d.ts +73 -0
  166. package/dist/list-group-item.js +364 -0
  167. package/dist/list-group-item.js.map +1 -0
  168. package/dist/list-group.cjs +610 -0
  169. package/dist/list-group.cjs.map +1 -0
  170. package/dist/list-group.d.cts +58 -0
  171. package/dist/list-group.d.ts +58 -0
  172. package/dist/list-group.js +607 -0
  173. package/dist/list-group.js.map +1 -0
  174. package/dist/modal.cjs +38 -35
  175. package/dist/modal.cjs.map +1 -1
  176. package/dist/modal.d.cts +1 -3
  177. package/dist/modal.d.ts +1 -3
  178. package/dist/modal.js +38 -35
  179. package/dist/modal.js.map +1 -1
  180. package/dist/nav-item.cjs +107 -4
  181. package/dist/nav-item.cjs.map +1 -1
  182. package/dist/nav-item.d.cts +52 -2
  183. package/dist/nav-item.d.ts +52 -2
  184. package/dist/nav-item.js +108 -5
  185. package/dist/nav-item.js.map +1 -1
  186. package/dist/nav.cjs +25 -1
  187. package/dist/nav.cjs.map +1 -1
  188. package/dist/nav.d.cts +2 -1
  189. package/dist/nav.d.ts +2 -1
  190. package/dist/nav.js +26 -2
  191. package/dist/nav.js.map +1 -1
  192. package/dist/offcanvas.cjs +621 -0
  193. package/dist/offcanvas.cjs.map +1 -0
  194. package/dist/offcanvas.d.cts +61 -0
  195. package/dist/offcanvas.d.ts +61 -0
  196. package/dist/offcanvas.js +617 -0
  197. package/dist/offcanvas.js.map +1 -0
  198. package/dist/pagination.cjs +452 -0
  199. package/dist/pagination.cjs.map +1 -0
  200. package/dist/pagination.d.cts +69 -0
  201. package/dist/pagination.d.ts +69 -0
  202. package/dist/pagination.js +448 -0
  203. package/dist/pagination.js.map +1 -0
  204. package/dist/popover.cjs +534 -0
  205. package/dist/popover.cjs.map +1 -0
  206. package/dist/popover.d.cts +59 -0
  207. package/dist/popover.d.ts +59 -0
  208. package/dist/popover.js +530 -0
  209. package/dist/popover.js.map +1 -0
  210. package/dist/pricing-card.cjs +121 -64
  211. package/dist/pricing-card.cjs.map +1 -1
  212. package/dist/pricing-card.d.cts +21 -7
  213. package/dist/pricing-card.d.ts +21 -7
  214. package/dist/pricing-card.js +122 -65
  215. package/dist/pricing-card.js.map +1 -1
  216. package/dist/progress.cjs +403 -0
  217. package/dist/progress.cjs.map +1 -0
  218. package/dist/progress.d.cts +70 -0
  219. package/dist/progress.d.ts +70 -0
  220. package/dist/progress.js +398 -0
  221. package/dist/progress.js.map +1 -0
  222. package/dist/prose.cjs +425 -0
  223. package/dist/prose.cjs.map +1 -0
  224. package/dist/prose.d.cts +21 -0
  225. package/dist/prose.d.ts +21 -0
  226. package/dist/prose.js +422 -0
  227. package/dist/prose.js.map +1 -0
  228. package/dist/radio.cjs +3 -1
  229. package/dist/radio.cjs.map +1 -1
  230. package/dist/radio.js +3 -1
  231. package/dist/radio.js.map +1 -1
  232. package/dist/range.cjs +381 -0
  233. package/dist/range.cjs.map +1 -0
  234. package/dist/range.d.cts +76 -0
  235. package/dist/range.d.ts +76 -0
  236. package/dist/range.js +378 -0
  237. package/dist/range.js.map +1 -0
  238. package/dist/rating.cjs +33 -0
  239. package/dist/rating.cjs.map +1 -1
  240. package/dist/rating.d.cts +38 -3
  241. package/dist/rating.d.ts +38 -3
  242. package/dist/rating.js +33 -0
  243. package/dist/rating.js.map +1 -1
  244. package/dist/section.cjs +27 -3
  245. package/dist/section.cjs.map +1 -1
  246. package/dist/section.d.cts +16 -1
  247. package/dist/section.d.ts +16 -1
  248. package/dist/section.js +27 -4
  249. package/dist/section.js.map +1 -1
  250. package/dist/select.cjs +6 -1
  251. package/dist/select.cjs.map +1 -1
  252. package/dist/select.d.cts +7 -1
  253. package/dist/select.d.ts +7 -1
  254. package/dist/select.js +6 -1
  255. package/dist/select.js.map +1 -1
  256. package/dist/sidebar-link.cjs +19 -1
  257. package/dist/sidebar-link.cjs.map +1 -1
  258. package/dist/sidebar-link.d.cts +13 -2
  259. package/dist/sidebar-link.d.ts +13 -2
  260. package/dist/sidebar-link.js +19 -1
  261. package/dist/sidebar-link.js.map +1 -1
  262. package/dist/sidebar-toggle.cjs +3 -1
  263. package/dist/sidebar-toggle.cjs.map +1 -1
  264. package/dist/sidebar-toggle.js +3 -1
  265. package/dist/sidebar-toggle.js.map +1 -1
  266. package/dist/sidebar.cjs +33 -1
  267. package/dist/sidebar.cjs.map +1 -1
  268. package/dist/sidebar.d.cts +1 -0
  269. package/dist/sidebar.d.ts +1 -0
  270. package/dist/sidebar.js +34 -2
  271. package/dist/sidebar.js.map +1 -1
  272. package/dist/spinner.cjs +2 -1
  273. package/dist/spinner.cjs.map +1 -1
  274. package/dist/spinner.d.cts +2 -2
  275. package/dist/spinner.d.ts +2 -2
  276. package/dist/spinner.js +2 -1
  277. package/dist/spinner.js.map +1 -1
  278. package/dist/stack.cjs +4 -2
  279. package/dist/stack.cjs.map +1 -1
  280. package/dist/stack.d.cts +2 -2
  281. package/dist/stack.d.ts +2 -2
  282. package/dist/stack.js +4 -2
  283. package/dist/stack.js.map +1 -1
  284. package/dist/states-Bgzwu_XZ.d.cts +9 -0
  285. package/dist/states-Bgzwu_XZ.d.ts +9 -0
  286. package/dist/stepper.cjs +495 -0
  287. package/dist/stepper.cjs.map +1 -0
  288. package/dist/stepper.d.cts +40 -0
  289. package/dist/stepper.d.ts +40 -0
  290. package/dist/stepper.js +491 -0
  291. package/dist/stepper.js.map +1 -0
  292. package/dist/switch.cjs +492 -0
  293. package/dist/switch.cjs.map +1 -0
  294. package/dist/switch.d.cts +82 -0
  295. package/dist/switch.d.ts +82 -0
  296. package/dist/switch.js +488 -0
  297. package/dist/switch.js.map +1 -0
  298. package/dist/tab-panel.cjs +465 -0
  299. package/dist/tab-panel.cjs.map +1 -0
  300. package/dist/tab-panel.d.cts +48 -0
  301. package/dist/tab-panel.d.ts +48 -0
  302. package/dist/tab-panel.js +462 -0
  303. package/dist/tab-panel.js.map +1 -0
  304. package/dist/table.cjs +506 -0
  305. package/dist/table.cjs.map +1 -0
  306. package/dist/table.d.cts +54 -0
  307. package/dist/table.d.ts +54 -0
  308. package/dist/table.js +501 -0
  309. package/dist/table.js.map +1 -0
  310. package/dist/tabs.cjs +596 -0
  311. package/dist/tabs.cjs.map +1 -0
  312. package/dist/tabs.d.cts +65 -0
  313. package/dist/tabs.d.ts +65 -0
  314. package/dist/tabs.js +592 -0
  315. package/dist/tabs.js.map +1 -0
  316. package/dist/tag.cjs +27 -1
  317. package/dist/tag.cjs.map +1 -1
  318. package/dist/tag.d.cts +19 -3
  319. package/dist/tag.d.ts +19 -3
  320. package/dist/tag.js +27 -1
  321. package/dist/tag.js.map +1 -1
  322. package/dist/testimonial.cjs +130 -64
  323. package/dist/testimonial.cjs.map +1 -1
  324. package/dist/testimonial.d.cts +23 -8
  325. package/dist/testimonial.d.ts +23 -8
  326. package/dist/testimonial.js +131 -65
  327. package/dist/testimonial.js.map +1 -1
  328. package/dist/text.cjs +65 -6
  329. package/dist/text.cjs.map +1 -1
  330. package/dist/text.d.cts +24 -3
  331. package/dist/text.d.ts +24 -3
  332. package/dist/text.js +64 -8
  333. package/dist/text.js.map +1 -1
  334. package/dist/textarea.cjs +3 -0
  335. package/dist/textarea.cjs.map +1 -1
  336. package/dist/textarea.d.cts +7 -1
  337. package/dist/textarea.d.ts +7 -1
  338. package/dist/textarea.js +3 -0
  339. package/dist/textarea.js.map +1 -1
  340. package/dist/toast.cjs +2 -1
  341. package/dist/toast.cjs.map +1 -1
  342. package/dist/toast.d.cts +2 -2
  343. package/dist/toast.d.ts +2 -2
  344. package/dist/toast.js +2 -1
  345. package/dist/toast.js.map +1 -1
  346. package/dist/tooltip.cjs.map +1 -1
  347. package/dist/tooltip.d.cts +2 -2
  348. package/dist/tooltip.d.ts +2 -2
  349. package/dist/tooltip.js.map +1 -1
  350. package/package.json +126 -11
package/README.md CHANGED
@@ -16,7 +16,7 @@ consume Spectre without a framework-specific adapter.
16
16
  | Project team | `project-design` |
17
17
  | Repository role | Spectre L3a Lit web component layer |
18
18
  | Package/artifact | `@phcdevworks/spectre-components` |
19
- | Current version/status | 1.20.0 |
19
+ | Current version/status | 1.21.0 |
20
20
 
21
21
  ## Standard Workflow
22
22
 
@@ -36,6 +36,7 @@ consume Spectre without a framework-specific adapter.
36
36
  | Codex | [CODEX.md](CODEX.md) |
37
37
  | Copilot | [COPILOT.md](COPILOT.md) |
38
38
  | Jules | [JULES.md](JULES.md) |
39
+ | Grok | [GROK.md](GROK.md) |
39
40
  | Roadmap | [ROADMAP.md](ROADMAP.md) |
40
41
  | Todo | [TODO.md](TODO.md) |
41
42
  | Changelog | [CHANGELOG.md](CHANGELOG.md) |
@@ -702,22 +703,28 @@ recipe.
702
703
 
703
704
  **Attributes**
704
705
 
705
- | Attribute | Type | Default | Description |
706
- | ------------------------- | ------------------------------------------------- | ------- | ------------------------------- |
707
- | `variant` | `info \| success \| warning \| danger \| neutral` | `info` | Visual style |
708
- | `size` | `sm \| md \| lg` | `md` | Alert size |
709
- | `dismissed` | boolean | `false` | Dismissed visual state |
710
- | `disabled` | boolean | `false` | Disabled visual state |
711
- | `loading` | boolean | `false` | Busy visual state |
712
- | `full-width` | boolean | `false` | Spans full container width |
713
- | `id` / `title` / `aria-*` | string | — | Forwarded to the native `<div>` |
714
-
715
- **Content projection** — children become the alert content.
706
+ | Attribute | Type | Default | Description |
707
+ | ------------------------- | ---------------------------------------------------------- | --------- | ----------------------------------------------- |
708
+ | `variant` | `info \| success \| warning \| danger \| neutral \| brand` | `info` | Visual style |
709
+ | `size` | `sm \| md \| lg` | `md` | Alert size |
710
+ | `dismissible` | boolean | `false` | Renders a close button that dismisses the alert |
711
+ | `dismiss-label` | string | `Dismiss` | Accessible name of the close button |
712
+ | `dismissed` | boolean | `false` | Dismissed (hidden) state |
713
+ | `disabled` | boolean | `false` | Disabled visual state |
714
+ | `loading` | boolean | `false` | Busy visual state |
715
+ | `full-width` | boolean | `false` | Spans full container width |
716
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native `<div>` |
717
+
718
+ **Content projection** — an element with `slot="icon"` renders in the leading
719
+ icon slot, colored by the variant; all other children become the alert content.
716
720
 
717
721
  **Accessibility** — renders `role="alert"` and reflects the `loading` state to
718
722
  `aria-busy`.
719
723
 
720
- **Internal target** — `[data-sp-alert-native]` selects the native `<div>`.
724
+ **Events** — `sp-dismiss` (bubbling) when the close button dismisses the alert.
725
+
726
+ **Internal targets** — `[data-sp-alert-native]` selects the native `<div>`;
727
+ `[data-sp-alert-dismiss]` selects the close button.
721
728
 
722
729
  ---
723
730
 
@@ -1333,6 +1340,577 @@ switches with `level` while the recipe call and styling stay the same.
1333
1340
  **Internal target** — `[data-sp-text-native]` selects the rendered native
1334
1341
  element.
1335
1342
 
1343
+ ---
1344
+
1345
+ ### sp-tabs / sp-tab-panel
1346
+
1347
+ Renders an ARIA tablist from its `sp-tab-panel` children, backed by the Spectre
1348
+ tabs recipes. Each panel supplies its tab's label; `sp-tabs` renders the tab
1349
+ buttons and owns selection.
1350
+
1351
+ ```html
1352
+ <sp-tabs aria-label="Account settings">
1353
+ <sp-tab-panel label="Profile">Profile settings</sp-tab-panel>
1354
+ <sp-tab-panel label="Security">Security settings</sp-tab-panel>
1355
+ </sp-tabs>
1356
+ ```
1357
+
1358
+ **`sp-tabs` attributes**
1359
+
1360
+ | Attribute | Type | Default | Description |
1361
+ | ---------------- | -------------- | ------- | ------------------------------------------------------------------------------- |
1362
+ | `selected-index` | number | `0` | Selected panel; a disabled or missing panel falls back to the first enabled one |
1363
+ | `variant` | `line \| pill` | `line` | Indicator-edge or segmented-control treatment |
1364
+ | `vertical` | boolean | `false` | Places the tab list beside the panels |
1365
+ | `full-width` | boolean | `false` | Tabs share the list width equally |
1366
+ | `aria-label` | string | — | Forwarded to the tablist |
1367
+ | `id` / `title` | string | — | Forwarded to the tabs container |
1368
+
1369
+ **`sp-tab-panel` attributes**
1370
+
1371
+ | Attribute | Type | Default | Description |
1372
+ | -------------- | ------- | ------- | --------------------------------------------------------------- |
1373
+ | `label` | string | — | Tab button text |
1374
+ | `disabled` | boolean | `false` | Disables the tab |
1375
+ | `selected` | boolean | `false` | Reflects selection; set by the parent `sp-tabs`, not by authors |
1376
+ | `id` / `title` | string | — | Forwarded to the native `role="tabpanel"` element |
1377
+
1378
+ **Behavior** — follows the WAI-ARIA tabs pattern with automatic activation:
1379
+ roving `tabindex`, `ArrowLeft`/`ArrowRight` (`ArrowUp`/`ArrowDown` when
1380
+ `vertical`), `Home`, and `End`, skipping disabled tabs.
1381
+
1382
+ **Events** — `sp-change` (bubbling) with `detail: { index }` when the user
1383
+ selects a tab.
1384
+
1385
+ **Internal targets** — `[data-sp-tabs-native]` selects the tabs container,
1386
+ `[data-sp-tabs-tab]` each tab button, and `[data-sp-tab-panel-native]` each
1387
+ panel.
1388
+
1389
+ ---
1390
+
1391
+ ### sp-accordion / sp-accordion-item
1392
+
1393
+ Renders a stack of disclosure items backed by the Spectre accordion recipes.
1394
+
1395
+ ```html
1396
+ <sp-accordion>
1397
+ <sp-accordion-item label="Shipping" open>Ships in 2 days.</sp-accordion-item>
1398
+ <sp-accordion-item label="Returns">30 day returns.</sp-accordion-item>
1399
+ </sp-accordion>
1400
+ ```
1401
+
1402
+ **`sp-accordion` attributes**
1403
+
1404
+ | Attribute | Type | Default | Description |
1405
+ | -------------- | ------- | ------- | --------------------------------------------------------------------- |
1406
+ | `flush` | boolean | `false` | Drops the outer border and radius |
1407
+ | `multiple` | boolean | `false` | Lets several items stay open; otherwise opening one closes the others |
1408
+ | `id` / `title` | string | — | Forwarded to the accordion container |
1409
+
1410
+ **`sp-accordion-item` attributes**
1411
+
1412
+ | Attribute | Type | Default | Description |
1413
+ | ------------------------- | ------- | ------- | ------------------------------ |
1414
+ | `label` | string | — | Header text |
1415
+ | `open` | boolean | `false` | Expanded state |
1416
+ | `disabled` | boolean | `false` | Prevents toggling |
1417
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the header button |
1418
+
1419
+ **Content projection** — an element with `slot="header"` replaces the `label`
1420
+ text in the header; all other children become the panel content.
1421
+
1422
+ **Accessibility** — the header is a native `<button>` with `aria-expanded` and
1423
+ `aria-controls`; the panel is a `role="region"` labelled by its header.
1424
+
1425
+ **Events** — `sp-open` and `sp-close` (bubbling) from the item when the user
1426
+ toggles it. The single-open behavior responds to user toggles only; setting
1427
+ `open` programmatically does not close sibling items.
1428
+
1429
+ **Host classes** — the item host carries the `sp-accordion__item` recipe
1430
+ classes (author classes are preserved) so the recipe's divider between sibling
1431
+ items applies.
1432
+
1433
+ **Internal targets** — `[data-sp-accordion-native]`,
1434
+ `[data-sp-accordion-item-header]`, `[data-sp-accordion-item-panel]`.
1435
+
1436
+ ---
1437
+
1438
+ ### sp-breadcrumb
1439
+
1440
+ Renders a `<nav>` breadcrumb trail backed by the Spectre breadcrumb recipes.
1441
+ Each child element becomes one item; the last one is the current page.
1442
+
1443
+ ```html
1444
+ <sp-breadcrumb>
1445
+ <a href="/">Home</a>
1446
+ <a href="/library">Library</a>
1447
+ <span>Data</span>
1448
+ </sp-breadcrumb>
1449
+ ```
1450
+
1451
+ | Attribute | Type | Default | Description |
1452
+ | -------------- | ------ | ------------ | --------------------------------------------------------------------- |
1453
+ | `separator` | string | — | Replaces the built-in `/` with a decorative (`aria-hidden`) separator |
1454
+ | `aria-label` | string | `Breadcrumb` | Forwarded to the `<nav>` |
1455
+ | `id` / `title` | string | — | Forwarded to the `<nav>` |
1456
+
1457
+ **Accessibility** — renders `<nav>` › `<ol>` › `<li>`; the last item gets
1458
+ `aria-current="page"`. Projected `<a>` children receive the
1459
+ `sp-breadcrumb__link` class.
1460
+
1461
+ **Internal target** — `[data-sp-breadcrumb-native]` selects the `<nav>`.
1462
+
1463
+ ---
1464
+
1465
+ ### sp-list-group / sp-list-group-item
1466
+
1467
+ Renders a list group backed by the Spectre list-group recipes. Each
1468
+ `sp-list-group-item` becomes a native row: a `<li>` when every item is static,
1469
+ or an `<a>` (with `href`), `<button>` (with `interactive`), or `<div>`
1470
+ otherwise.
1471
+
1472
+ ```html
1473
+ <sp-list-group aria-label="Mailboxes">
1474
+ <sp-list-group-item href="/inbox" active>Inbox</sp-list-group-item>
1475
+ <sp-list-group-item interactive>Archive</sp-list-group-item>
1476
+ </sp-list-group>
1477
+ ```
1478
+
1479
+ **`sp-list-group` attributes**
1480
+
1481
+ | Attribute | Type | Default | Description |
1482
+ | ------------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------------- |
1483
+ | `flush` | boolean | `false` | Drops the outer border and radius |
1484
+ | `horizontal` | boolean | `false` | Lays rows out in a row |
1485
+ | `accent` | `top \| right \| bottom \| left` | — | Optional decorative edge-rail |
1486
+ | `accent-color` | `neutral \| brand \| info \| success \| warning \| danger \| cta` | `brand` | Accent rail color; only applied with `accent` |
1487
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the list container |
1488
+
1489
+ **`sp-list-group-item` attributes**
1490
+
1491
+ | Attribute | Type | Default | Description |
1492
+ | ----------------------------- | ------- | ------- | -------------------------------------------------- |
1493
+ | `href` | string | — | Renders the row as a link |
1494
+ | `target` | string | — | Link target |
1495
+ | `interactive` | boolean | `false` | Renders the row as a button |
1496
+ | `active` | boolean | `false` | Current item; sets `aria-current="true"` |
1497
+ | `selected` | boolean | `false` | Subtle checked tint, distinct from `active` |
1498
+ | `disabled` | boolean | `false` | Disables a button row; removes a link row's `href` |
1499
+ | `id` / `title` / `aria-label` | string | — | Forwarded to the rendered row |
1500
+
1501
+ **Content projection** — the item host (`display: contents`) moves inside the
1502
+ rendered row, so its children, including later edits, render in place. Use the
1503
+ `sp-list-group__heading` / `sp-list-group__text` classes for two-line rows.
1504
+
1505
+ **Events** — `sp-select` (bubbling) from the item when a link or button row is
1506
+ activated.
1507
+
1508
+ **Internal targets** — `[data-sp-list-group-native]` selects the list
1509
+ container, `[data-sp-list-group-row]` each row.
1510
+
1511
+ ---
1512
+
1513
+ ### sp-offcanvas
1514
+
1515
+ Renders a slide-in dialog panel and backdrop backed by the Spectre offcanvas
1516
+ recipes.
1517
+
1518
+ | Attribute | Type | Default | Description |
1519
+ | ------------------------- | ------------------------------- | ------- | ------------------------------------------ |
1520
+ | `open` | boolean | `false` | Open/closed state |
1521
+ | `placement` | `start \| end \| top \| bottom` | `start` | Viewport edge the panel slides in from |
1522
+ | `label` | string | — | Header title; also labels the dialog |
1523
+ | `close-label` | string | `Close` | Accessible name of the header close button |
1524
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native dialog element |
1525
+
1526
+ **Content projection** — `slot="header"` replaces the `label` title,
1527
+ `slot="footer"` fills the footer region, and all other children become the
1528
+ body.
1529
+
1530
+ **Behavior** — while open: traps `Tab`/`Shift+Tab` focus, closes on `Esc`, the
1531
+ close button, or a backdrop click, focuses the first focusable element once
1532
+ the panel is visible, and restores focus on close. The closed panel is `inert`.
1533
+
1534
+ **Events** — `sp-close` (bubbling) when the user closes it.
1535
+
1536
+ **Internal targets** — `[data-sp-offcanvas-native]` (dialog),
1537
+ `[data-sp-offcanvas-backdrop]`, `[data-sp-offcanvas-close]`.
1538
+
1539
+ ---
1540
+
1541
+ ### sp-carousel
1542
+
1543
+ Renders a slide carousel backed by the Spectre carousel recipes. Each child
1544
+ element becomes one slide. The viewport is a native scroll-snap track, so it
1545
+ stays swipeable without script.
1546
+
1547
+ ```html
1548
+ <sp-carousel aria-label="Featured work">
1549
+ <img alt="Project one" src="one.jpg" />
1550
+ <img alt="Project two" src="two.jpg" />
1551
+ </sp-carousel>
1552
+ ```
1553
+
1554
+ | Attribute | Type | Default | Description |
1555
+ | ----------------- | ------- | ---------------- | ----------------------------------------------- |
1556
+ | `index` | number | `0` | Active slide |
1557
+ | `fade` | boolean | `false` | Cross-fades instead of scroll-snapping |
1558
+ | `loop` | boolean | `false` | Wraps from the last slide to the first and back |
1559
+ | `hide-controls` | boolean | `false` | Hides the previous/next buttons |
1560
+ | `hide-indicators` | boolean | `false` | Hides the slide indicators |
1561
+ | `previous-label` | string | `Previous slide` | Accessible name of the previous button |
1562
+ | `next-label` | string | `Next slide` | Accessible name of the next button |
1563
+ | `aria-label` | string | `Carousel` | Forwarded to the carousel region |
1564
+ | `id` / `title` | string | — | Forwarded to the carousel region |
1565
+
1566
+ **Accessibility** — follows the WAI-ARIA carousel pattern: a
1567
+ `role="region"` with `aria-roledescription="carousel"`, slides as
1568
+ `role="group"` with `aria-roledescription="slide"` and an "n of N" label, and a
1569
+ polite live region. `ArrowLeft`/`ArrowRight` move between slides. There is no
1570
+ autoplay.
1571
+
1572
+ **Events** — `sp-change` (bubbling) with `detail: { index }` when the user
1573
+ changes slides, including by swiping.
1574
+
1575
+ **Internal targets** — `[data-sp-carousel-native]`,
1576
+ `[data-sp-carousel-viewport]`, `[data-sp-carousel-slide]`,
1577
+ `[data-sp-carousel-prev]`, `[data-sp-carousel-next]`,
1578
+ `[data-sp-carousel-indicator]`.
1579
+
1580
+ ---
1581
+
1582
+ ### sp-table
1583
+
1584
+ Styles an authored `<table>` with the Spectre table recipes and wraps it in the
1585
+ horizontal-scroll wrapper. The table must be authored inside the component,
1586
+ because the HTML parser drops table parts outside a `<table>`.
1587
+
1588
+ ```html
1589
+ <sp-table striped aria-label="Team members">
1590
+ <table>
1591
+ <thead><tr><th scope="col">Name</th></tr></thead>
1592
+ <tbody><tr><td>Ada</td></tr></tbody>
1593
+ </table>
1594
+ </sp-table>
1595
+ ```
1596
+
1597
+ | Attribute | Type | Default | Description |
1598
+ | -------------------------------- | ---------- | ------- | ----------------------------------------------------- |
1599
+ | `size` | `sm \| md` | `md` | Cell density |
1600
+ | `striped` | boolean | `false` | Tints alternating body rows |
1601
+ | `hoverable` | boolean | `false` | Tints body rows under the pointer |
1602
+ | `bordered` | boolean | `false` | Borders every cell |
1603
+ | `aria-label` / `aria-labelledby` | string | — | Makes the wrapper a focusable, labelled scroll region |
1604
+ | `id` / `title` | string | — | Forwarded to the wrapper |
1605
+
1606
+ Recipe classes are added to the authored `<table>` alongside its own classes.
1607
+ For contextual rows, use `aria-selected="true"` or the
1608
+ `sp-table__row--{neutral|info|success|warning|danger|selected}` classes.
1609
+
1610
+ **Internal target** — `[data-sp-table-native]` selects the wrapper.
1611
+
1612
+ ---
1613
+
1614
+ ### sp-pagination
1615
+
1616
+ Renders page navigation backed by the Spectre pagination recipes.
1617
+
1618
+ ```html
1619
+ <sp-pagination total="20" page="3"></sp-pagination>
1620
+ <sp-pagination total="20" href-template="/posts?page={page}"></sp-pagination>
1621
+ ```
1622
+
1623
+ | Attribute | Type | Default | Description |
1624
+ | ---------------- | ---------------- | ------------ | ------------------------------------------------------------- |
1625
+ | `page` | number | `1` | Current page, clamped to `1…total` |
1626
+ | `total` | number | `1` | Page count |
1627
+ | `siblings` | number | `1` | Pages shown either side of the current one before an ellipsis |
1628
+ | `size` | `sm \| md \| lg` | `md` | Item size |
1629
+ | `href-template` | string | — | Renders links; `{page}` is replaced with the page number |
1630
+ | `previous-label` | string | `Previous` | Previous control text |
1631
+ | `next-label` | string | `Next` | Next control text |
1632
+ | `aria-label` | string | `Pagination` | Forwarded to the `<nav>` |
1633
+ | `id` / `title` | string | — | Forwarded to the `<nav>` |
1634
+
1635
+ **Accessibility** — the current page has `aria-current="page"`, page items are
1636
+ labelled "Page N", and boundary controls are disabled (`aria-disabled` without
1637
+ `href` in link mode).
1638
+
1639
+ **Events** — `sp-change` (bubbling) with `detail: { page }` when the user picks
1640
+ a page. In link mode the browser still follows the link.
1641
+
1642
+ **Internal target** — `[data-sp-pagination-native]` selects the `<nav>`.
1643
+
1644
+ ---
1645
+
1646
+ ### sp-stepper
1647
+
1648
+ Renders a progress stepper backed by the Spectre stepper recipes. Each child
1649
+ element becomes one step label.
1650
+
1651
+ ```html
1652
+ <sp-stepper aria-label="Checkout" current="1">
1653
+ <span>Cart</span>
1654
+ <span>Shipping</span>
1655
+ <span>Payment</span>
1656
+ </sp-stepper>
1657
+ ```
1658
+
1659
+ | Attribute | Type | Default | Description |
1660
+ | ------------------------- | ------------------------ | ------------ | ------------------------------------------------------- |
1661
+ | `current` | number | `0` | Active step; earlier steps are done, later ones pending |
1662
+ | `orientation` | `horizontal \| vertical` | `horizontal` | Layout direction |
1663
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native `<ol>` |
1664
+
1665
+ **Accessibility** — renders an `<ol>`; the active step has
1666
+ `aria-current="step"`. Done steps show a check mark, others their number.
1667
+ Setting `current` to the step count marks every step done.
1668
+
1669
+ **Internal target** — `[data-sp-stepper-native]` selects the `<ol>`.
1670
+
1671
+ ---
1672
+
1673
+ ### sp-switch
1674
+
1675
+ Renders a native `<input type="checkbox" role="switch">` inside a `<label>`,
1676
+ backed by the Spectre switch recipe. It submits with its form like a checkbox.
1677
+
1678
+ | Attribute | Type | Default | Description |
1679
+ | ------------------------- | ---------------- | ------- | -------------------------------------------- |
1680
+ | `checked` | boolean | `false` | On/off state; follows user toggles |
1681
+ | `size` | `sm \| md \| lg` | `md` | Track size |
1682
+ | `label` | string | — | Visible label when no children are projected |
1683
+ | `name` / `value` / `form` | string | — | Native form participation (`value` is `on`) |
1684
+ | `disabled` / `required` | boolean | `false` | Native constraints |
1685
+ | `focused` | boolean | `false` | Forced focus look (see Shared Conventions) |
1686
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native input |
1687
+
1688
+ **Content projection** — children become the label text.
1689
+
1690
+ ---
1691
+
1692
+ ### sp-range
1693
+
1694
+ Renders a native `<input type="range">` backed by the Spectre range recipe. It
1695
+ mirrors the value into `--sp-component-range-value` so WebKit/Blink paint the
1696
+ filled track.
1697
+
1698
+ | Attribute | Type | Default | Description |
1699
+ | ------------------------- | ------- | ----------------- | ----------------------------------- |
1700
+ | `value` | number | `50` | Current value, clamped to `min…max` |
1701
+ | `min` / `max` / `step` | number | `0` / `100` / `1` | Native range bounds |
1702
+ | `name` / `form` | string | — | Native form participation |
1703
+ | `disabled` / `focused` | boolean | `false` | Disabled state / forced focus look |
1704
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native input |
1705
+
1706
+ ---
1707
+
1708
+ ### sp-file-input
1709
+
1710
+ Renders a native `<input type="file">` backed by the Spectre file-input recipe,
1711
+ which styles the browser's file selector button. The `files` getter returns the
1712
+ native `FileList`.
1713
+
1714
+ | Attribute | Type | Default | Description |
1715
+ | ------------------------------------- | ---------------- | ------- | ---------------------------------- |
1716
+ | `size` | `sm \| md \| lg` | `md` | Control size |
1717
+ | `invalid` / `success` | boolean | `false` | Validation state (`invalid` wins) |
1718
+ | `accept` / `multiple` / `required` | string / boolean | — | Native file constraints |
1719
+ | `name` / `form` | string | — | Native form participation |
1720
+ | `full-width` / `disabled` / `focused` | boolean | `false` | Width, disabled, forced focus look |
1721
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the native input |
1722
+
1723
+ ---
1724
+
1725
+ ### sp-input-group
1726
+
1727
+ Fuses addons and native controls into one bordered control, backed by the
1728
+ Spectre input-group recipes. The recipe styles its *direct* children, so the
1729
+ group takes native `<input>`, `<select>`, `<button>`, and file inputs rather
1730
+ than `sp-*` wrappers. Controls without an `sp-*` class get their recipe class
1731
+ (buttons use the `secondary` variant). Children marked `slot="addon"` become
1732
+ addons. Authored order is preserved.
1733
+
1734
+ ```html
1735
+ <sp-input-group aria-label="Handle">
1736
+ <span slot="addon">@</span>
1737
+ <input aria-label="Username" />
1738
+ <button type="button">Check</button>
1739
+ </sp-input-group>
1740
+ ```
1741
+
1742
+ | Attribute | Type | Default | Description |
1743
+ | ------------------------- | ------- | ------- | --------------------------------------- |
1744
+ | `disabled` | boolean | `false` | Disabled look for the whole group |
1745
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the `role="group"` wrapper |
1746
+
1747
+ ---
1748
+
1749
+ ### sp-choice-card
1750
+
1751
+ Renders a whole-card option: a `<label>` wrapping a native radio or checkbox,
1752
+ backed by the Spectre choice-card recipe. Selection, focus, and disabled styling
1753
+ follow the native input. Radio cards that share a `name` keep their `checked`
1754
+ properties in sync.
1755
+
1756
+ | Attribute | Type | Default | Description |
1757
+ | ------------------------- | ------------------- | ------- | ----------------------------- |
1758
+ | `type` | `radio \| checkbox` | `radio` | Native input type |
1759
+ | `checked` | boolean | `false` | Selection state |
1760
+ | `name` / `value` / `form` | string | — | Native form participation |
1761
+ | `disabled` / `required` | boolean | `false` | Native constraints |
1762
+ | `hovered` / `focused` | boolean | `false` | Forced looks |
1763
+ | `id` / `aria-describedby` | string | — | Forwarded to the native input |
1764
+
1765
+ **Content projection** — children become the card content (the input's label).
1766
+
1767
+ ---
1768
+
1769
+ ### sp-progress
1770
+
1771
+ Renders a `role="progressbar"` track and fill backed by the Spectre progress
1772
+ recipes.
1773
+
1774
+ | Attribute | Type | Default | Description |
1775
+ | ------------------------- | ---------------------------------------------------------- | ----------- | --------------------------------------------- |
1776
+ | `value` / `max` | number | `0` / `100` | Progress, clamped to `0…max` |
1777
+ | `variant` | `brand \| neutral \| info \| success \| warning \| danger` | `brand` | Fill color role |
1778
+ | `size` | `sm \| md \| lg` | `md` | Track height |
1779
+ | `indeterminate` | boolean | `false` | Animated sweep; omits `aria-valuenow` |
1780
+ | `label` | string | — | Visible label above the track; labels the bar |
1781
+ | `value-text` | string | — | `aria-valuetext` (e.g. "3 of 8 files") |
1782
+ | `id` / `title` / `aria-*` | string | — | Forwarded to the track |
1783
+
1784
+ ---
1785
+
1786
+ ### sp-popover
1787
+
1788
+ A click-toggled, non-modal `role="dialog"` anchored to its trigger, backed by
1789
+ the Spectre popover recipes. Unlike `sp-tooltip` it stays open for interaction.
1790
+
1791
+ | Attribute | Type | Default | Description |
1792
+ | --------------- | -------------------------------- | -------------- | --------------------------------------------- |
1793
+ | `open` | boolean | `false` | Open state |
1794
+ | `placement` | `top \| bottom \| left \| right` | `bottom` | Side the panel opens on |
1795
+ | `label` | string | — | Header title; also labels the dialog |
1796
+ | `trigger-label` | string | `Show details` | Trigger text when no `slot="trigger"` content |
1797
+ | `id` / `title` | string | — | Forwarded to the dialog panel |
1798
+
1799
+ **Content projection** — `slot="trigger"` fills the trigger button,
1800
+ `slot="header"` replaces the `label` title, other children fill the body.
1801
+
1802
+ **Behavior** — the trigger toggles it (`aria-expanded`/`aria-controls`); `Esc`
1803
+ closes it and refocuses the trigger; an outside click closes it. Without a
1804
+ header the dialog is labelled by its trigger.
1805
+
1806
+ **Events** — `sp-open` and `sp-close` (bubbling).
1807
+
1808
+ ---
1809
+
1810
+ ### sp-datepicker
1811
+
1812
+ Renders an inline calendar backed by the Spectre datepicker and day recipes.
1813
+ Values are local ISO dates (`YYYY-MM-DD`), with no time-zone shift.
1814
+
1815
+ | Attribute | Type | Default | Description |
1816
+ | ------------------------------- | ------ | ------------------------------- | ---------------------------------------------- |
1817
+ | `value` | string | — | Selected date; malformed dates are dropped |
1818
+ | `min` / `max` | string | — | Selectable range; days outside it are disabled |
1819
+ | `week-start` | number | `0` | First weekday (`0` Sunday … `6` Saturday) |
1820
+ | `locale` | string | browser locale | Month, weekday, and day-label formatting |
1821
+ | `name` | string | — | Submits the value through a hidden input |
1822
+ | `previous-label` / `next-label` | string | `Previous month` / `Next month` | Month button labels |
1823
+ | `aria-label` | string | month title | Labels the calendar group |
1824
+
1825
+ **Accessibility** — every day is a button labelled with its full date,
1826
+ `aria-pressed` on the selected day and `aria-current="date"` on today. One day
1827
+ is the tab stop (roving `tabindex`). Arrows move by day and week, `Home`/`End`
1828
+ go to the week's start and end, and `PageUp`/`PageDown` change the month
1829
+ (`Shift` for a year). The month title is a polite live region.
1830
+
1831
+ **Events** — `sp-change` (bubbling) with `detail: { value }`.
1832
+
1833
+ ---
1834
+
1835
+ ### sp-external-auth-button
1836
+
1837
+ One neutral button treatment for every third-party sign-in provider, backed by
1838
+ the Spectre external-auth-button recipes. It deliberately carries no provider
1839
+ colors. Put the provider logo in `slot="icon"` and the label in the default
1840
+ slot.
1841
+
1842
+ | Attribute | Type | Default | Description |
1843
+ | ------------------------------------- | ------------------ | -------- | ---------------------------------- |
1844
+ | `href` | string | — | Renders a link instead of a button |
1845
+ | `type` | `button \| submit` | `button` | Native button type |
1846
+ | `full-width` / `disabled` / `loading` | boolean | `false` | Width, disabled, busy states |
1847
+ | `hovered` / `focused` / `active` | boolean | `false` | Forced looks |
1848
+ | `id` / `title` / `aria-label` | string | — | Forwarded to the native element |
1849
+
1850
+ ---
1851
+
1852
+ ### sp-card-bleed
1853
+
1854
+ A band inside `sp-card` (usually media) that runs flush through the card's
1855
+ padding, backed by `getCardBleedClasses`.
1856
+
1857
+ | Attribute | Type | Default | Description |
1858
+ | --------- | ------------------------------------------------- | ------- | ----------------------------------------------------- |
1859
+ | `edges` | space-separated `top right bottom left`, or `all` | — | Edges to bleed through |
1860
+ | `padded` | `sm \| md \| lg`, or bare | — | The card padding step being escaped (bare means `md`) |
1861
+
1862
+ ---
1863
+
1864
+ ### sp-prose
1865
+
1866
+ Wraps authored long-form HTML (headings, lists, code, quotes, rules) in the
1867
+ Spectre prose surface. An `aria-label` also makes it a labelled region.
1868
+
1869
+ ---
1870
+
1871
+ ### Shared conventions (spectre-ui 5.3.0 parity)
1872
+
1873
+ **Forced interaction states** — components whose recipe supports them accept
1874
+ `hovered`, `focused`, and `active` booleans (`hovered`/`focused` only where the
1875
+ recipe has no pressed state). They force the look for documentation, previews,
1876
+ and visual tests; real interaction is still styled by native pseudo-classes.
1877
+ Where a component already uses `active` to mean "current" (`sp-footer-link`,
1878
+ `sp-sidebar-link`, `sp-list-group-item`, `sp-nav-item`), it keeps that meaning.
1879
+
1880
+ **Part markers** — class-only recipe parts are applied in place to authored
1881
+ elements that opt in with a `slot` marker, keeping authored order. Nothing is
1882
+ styled by tag name.
1883
+
1884
+ | Component | Markers |
1885
+ | ----------------------------------- | -------------------------------------------------------------------- |
1886
+ | `sp-footer` | `heading`, `text`, `muted`, `links`, `divider` (any depth) |
1887
+ | `sp-nav` | `links` |
1888
+ | `sp-sidebar` | `header`; `group` on a `<details>` (its `<summary>` is styled) |
1889
+ | `sp-dropdown` / `sp-nav-item` menus | `item`, `header`, `divider` |
1890
+ | `sp-list-group-item` | `heading`, `text` |
1891
+ | `sp-carousel` slides | `caption` (inside a slide) |
1892
+ | `sp-table` rows | `data-variant="neutral\|info\|success\|warning\|danger"` on a `<tr>` |
1893
+
1894
+ **Additions to existing components**
1895
+
1896
+ | Component | Added |
1897
+ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
1898
+ | `sp-button` | `warning`, `link`, `light`, `dark` variants |
1899
+ | `sp-badge` | `brand` variant, `dot` notification mode, `interactive` |
1900
+ | `sp-spinner` / `sp-toast` | `inverse` / `neutral` variants |
1901
+ | `sp-alert` | `interactive` |
1902
+ | `sp-rating` | `interactive`, `pill`, `full-width` |
1903
+ | `sp-text` | `onSurface*` variants; `preset="heading \| display \| lead"` with `heading-level` (`h1`–`h6`, defaults to the element level) and `display-level` (`1`–`6`) |
1904
+ | `sp-container` | `padding` (`sm \| md \| lg`); `max-width` gains `none` and `wide` |
1905
+ | `sp-section` | `spacing` and `gap` (`sm \| md \| lg`) |
1906
+ | `sp-stack` | `basis="none"` |
1907
+ | `sp-grid` | `col-start` (`1`–`12`, or per-breakpoint JSON like `span`) |
1908
+ | `sp-nav-item` | `active` (current page, `aria-current`), `disabled`, and dropdown `viewport`, `full-width`, `accent`/`accent-color` |
1909
+ | `sp-input` | `label`, `helper-text`, `error-message` (wraps the input only when set; an error sets the error state and `aria-invalid`) |
1910
+ | `sp-select` / `sp-textarea` | `focused` |
1911
+ | `sp-pricing-card` | `badge`, `price`, `description`, `header`, `footer` slots |
1912
+ | `sp-testimonial` | `quote`, `author-image`, `author-name`, `author-title` slots |
1913
+
1336
1914
  ## Package Exports / API Surface
1337
1915
 
1338
1916
  ### Root — `@phcdevworks/spectre-components`
@@ -1408,46 +1986,91 @@ defineSpectreComponents() // registers all sp-* elements
1408
1986
  `SpectreDropdownProps`, `SpectreModalProps`, `SpectreToastProps`,
1409
1987
  `SpectreTooltipProps`
1410
1988
 
1989
+ **Broad component inventory**: `defineSpectreTabs`, `defineSpectreTabPanel`,
1990
+ `defineSpectreAccordion`, `defineSpectreAccordionItem`,
1991
+ `defineSpectreBreadcrumb`, `defineSpectreListGroup`,
1992
+ `defineSpectreListGroupItem`, `defineSpectreOffcanvas`,
1993
+ `defineSpectreCarousel`, `defineSpectreTable`, `defineSpectrePagination`,
1994
+ `defineSpectreStepper`; their element classes and `*Props` interfaces; and
1995
+ `spectreTabsVariants`, `spectreOffcanvasPlacements`, `spectreTableSizes`,
1996
+ `spectrePaginationSizes`, `spectreStepperOrientations` with the matching
1997
+ `SpectreTabsVariant`, `SpectreOffcanvasPlacement`, `SpectreTableSize`,
1998
+ `SpectrePaginationSize`, and `SpectreStepperOrientation` types
1999
+
2000
+ **spectre-ui 5.3.0 parity**: `defineSpectreSwitch`, `defineSpectreRange`,
2001
+ `defineSpectreFileInput`, `defineSpectreInputGroup`, `defineSpectreChoiceCard`,
2002
+ `defineSpectreProgress`, `defineSpectrePopover`, `defineSpectreDatepicker`,
2003
+ `defineSpectreExternalAuthButton`, `defineSpectreCardBleed`,
2004
+ `defineSpectreProse`; their element classes and `*Props` interfaces; and
2005
+ `spectreProgressVariants`, `spectreProgressSizes`, `spectreSwitchSizes`,
2006
+ `spectreFileInputSizes`, `spectrePopoverPlacements`, `spectreContainerPaddings`,
2007
+ `spectreSectionSpacings`, `spectreGridColStarts`, `spectreTableRowVariants`,
2008
+ `spectreTextPresets`, `spectreHeadingLevels`, `spectreDisplayLevels` with their
2009
+ matching types
2010
+
1411
2011
  ### Subpath entry points
1412
2012
 
1413
2013
  Each entry point registers only that component and exports only its surface:
1414
2014
 
1415
- | Entry point | Registers | Key exports |
1416
- | -------------------- | ------------------- | ---------------------------------------------------------------------------------------- |
1417
- | `.../button` | `sp-button` | `defineSpectreButton`, `SpectreButtonElement`, button constants and types |
1418
- | `.../input` | `sp-input` | `defineSpectreInput`, `SpectreInputElement`, input constants and types |
1419
- | `.../textarea` | `sp-textarea` | `defineSpectreTextarea`, `SpectreTextareaElement`, `SpectreTextareaProps` |
1420
- | `.../select` | `sp-select` | `defineSpectreSelect`, `SpectreSelectElement`, `SpectreSelectProps` |
1421
- | `.../checkbox` | `sp-checkbox` | `defineSpectreCheckbox`, `SpectreCheckboxElement`, `SpectreCheckboxProps` |
1422
- | `.../radio` | `sp-radio` | `defineSpectreRadio`, `SpectreRadioElement`, `SpectreRadioProps` |
1423
- | `.../label` | `sp-label` | `defineSpectreLabel`, `SpectreLabelElement`, `SpectreLabelProps` |
1424
- | `.../fieldset` | `sp-fieldset` | `defineSpectreFieldset`, `SpectreFieldsetElement`, `SpectreFieldsetProps` |
1425
- | `.../badge` | `sp-badge` | `defineSpectreBadge`, `SpectreBadgeElement`, badge constants and types |
1426
- | `.../card` | `sp-card` | `defineSpectreCard`, `SpectreCardElement`, card constants and types |
1427
- | `.../icon-box` | `sp-icon-box` | `defineSpectreIconBox`, `SpectreIconBoxElement`, icon-box constants and types |
1428
- | `.../rating` | `sp-rating` | `defineSpectreRating`, `SpectreRatingElement`, rating constants and types |
1429
- | `.../testimonial` | `sp-testimonial` | `defineSpectreTestimonial`, `SpectreTestimonialElement`, testimonial constants and types |
1430
- | `.../alert` | `sp-alert` | `defineSpectreAlert`, `SpectreAlertElement`, alert constants and types |
1431
- | `.../avatar` | `sp-avatar` | `defineSpectreAvatar`, `SpectreAvatarElement`, avatar constants and types |
1432
- | `.../spinner` | `sp-spinner` | `defineSpectreSpinner`, `SpectreSpinnerElement`, spinner constants and types |
1433
- | `.../tag` | `sp-tag` | `defineSpectreTag`, `SpectreTagElement`, tag constants and types |
1434
- | `.../pricing-card` | `sp-pricing-card` | `defineSpectrePricingCard`, `SpectrePricingCardElement`, `SpectrePricingCardProps` |
1435
- | `.../container` | `sp-container` | `defineSpectreContainer`, `SpectreContainerElement`, container constants and types |
1436
- | `.../grid` | `sp-grid` | `defineSpectreGrid`, `SpectreGridElement`, grid constants and types |
1437
- | `.../section` | `sp-section` | `defineSpectreSection`, `SpectreSectionElement`, `SpectreSectionProps` |
1438
- | `.../stack` | `sp-stack` | `defineSpectreStack`, `SpectreStackElement`, stack constants and types |
1439
- | `.../nav` | `sp-nav` | `defineSpectreNav`, `SpectreNavElement`, `SpectreNavProps` |
1440
- | `.../nav-item` | `sp-nav-item` | `defineSpectreNavItem`, `SpectreNavItemElement`, `SpectreNavItemProps` |
1441
- | `.../sidebar` | `sp-sidebar` | `defineSpectreSidebar`, `SpectreSidebarElement`, `SpectreSidebarProps` |
1442
- | `.../sidebar-link` | `sp-sidebar-link` | `defineSpectreSidebarLink`, `SpectreSidebarLinkElement`, `SpectreSidebarLinkProps` |
1443
- | `.../sidebar-toggle` | `sp-sidebar-toggle` | `defineSpectreSidebarToggle`, `SpectreSidebarToggleElement`, `SpectreSidebarToggleProps` |
1444
- | `.../dropdown` | `sp-dropdown` | `defineSpectreDropdown`, `SpectreDropdownElement`, dropdown constants and types |
1445
- | `.../footer` | `sp-footer` | `defineSpectreFooter`, `SpectreFooterElement`, `SpectreFooterProps` |
1446
- | `.../footer-link` | `sp-footer-link` | `defineSpectreFooterLink`, `SpectreFooterLinkElement`, `SpectreFooterLinkProps` |
1447
- | `.../footer-chip` | `sp-footer-chip` | `defineSpectreFooterChip`, `SpectreFooterChipElement`, `SpectreFooterChipProps` |
1448
- | `.../modal` | `sp-modal` | `defineSpectreModal`, `SpectreModalElement`, `SpectreModalProps` |
1449
- | `.../toast` | `sp-toast` | `defineSpectreToast`, `SpectreToastElement`, toast constants and types |
1450
- | `.../tooltip` | `sp-tooltip` | `defineSpectreTooltip`, `SpectreTooltipElement`, tooltip constants and types |
2015
+ | Entry point | Registers | Key exports |
2016
+ | -------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------- |
2017
+ | `.../button` | `sp-button` | `defineSpectreButton`, `SpectreButtonElement`, button constants and types |
2018
+ | `.../input` | `sp-input` | `defineSpectreInput`, `SpectreInputElement`, input constants and types |
2019
+ | `.../textarea` | `sp-textarea` | `defineSpectreTextarea`, `SpectreTextareaElement`, `SpectreTextareaProps` |
2020
+ | `.../select` | `sp-select` | `defineSpectreSelect`, `SpectreSelectElement`, `SpectreSelectProps` |
2021
+ | `.../checkbox` | `sp-checkbox` | `defineSpectreCheckbox`, `SpectreCheckboxElement`, `SpectreCheckboxProps` |
2022
+ | `.../radio` | `sp-radio` | `defineSpectreRadio`, `SpectreRadioElement`, `SpectreRadioProps` |
2023
+ | `.../label` | `sp-label` | `defineSpectreLabel`, `SpectreLabelElement`, `SpectreLabelProps` |
2024
+ | `.../fieldset` | `sp-fieldset` | `defineSpectreFieldset`, `SpectreFieldsetElement`, `SpectreFieldsetProps` |
2025
+ | `.../badge` | `sp-badge` | `defineSpectreBadge`, `SpectreBadgeElement`, badge constants and types |
2026
+ | `.../card` | `sp-card` | `defineSpectreCard`, `SpectreCardElement`, card constants and types |
2027
+ | `.../icon-box` | `sp-icon-box` | `defineSpectreIconBox`, `SpectreIconBoxElement`, icon-box constants and types |
2028
+ | `.../rating` | `sp-rating` | `defineSpectreRating`, `SpectreRatingElement`, rating constants and types |
2029
+ | `.../testimonial` | `sp-testimonial` | `defineSpectreTestimonial`, `SpectreTestimonialElement`, testimonial constants and types |
2030
+ | `.../alert` | `sp-alert` | `defineSpectreAlert`, `SpectreAlertElement`, alert constants and types |
2031
+ | `.../avatar` | `sp-avatar` | `defineSpectreAvatar`, `SpectreAvatarElement`, avatar constants and types |
2032
+ | `.../spinner` | `sp-spinner` | `defineSpectreSpinner`, `SpectreSpinnerElement`, spinner constants and types |
2033
+ | `.../tag` | `sp-tag` | `defineSpectreTag`, `SpectreTagElement`, tag constants and types |
2034
+ | `.../pricing-card` | `sp-pricing-card` | `defineSpectrePricingCard`, `SpectrePricingCardElement`, `SpectrePricingCardProps` |
2035
+ | `.../container` | `sp-container` | `defineSpectreContainer`, `SpectreContainerElement`, container constants and types |
2036
+ | `.../grid` | `sp-grid` | `defineSpectreGrid`, `SpectreGridElement`, grid constants and types |
2037
+ | `.../section` | `sp-section` | `defineSpectreSection`, `SpectreSectionElement`, `SpectreSectionProps` |
2038
+ | `.../stack` | `sp-stack` | `defineSpectreStack`, `SpectreStackElement`, stack constants and types |
2039
+ | `.../nav` | `sp-nav` | `defineSpectreNav`, `SpectreNavElement`, `SpectreNavProps` |
2040
+ | `.../nav-item` | `sp-nav-item` | `defineSpectreNavItem`, `SpectreNavItemElement`, `SpectreNavItemProps` |
2041
+ | `.../sidebar` | `sp-sidebar` | `defineSpectreSidebar`, `SpectreSidebarElement`, `SpectreSidebarProps` |
2042
+ | `.../sidebar-link` | `sp-sidebar-link` | `defineSpectreSidebarLink`, `SpectreSidebarLinkElement`, `SpectreSidebarLinkProps` |
2043
+ | `.../sidebar-toggle` | `sp-sidebar-toggle` | `defineSpectreSidebarToggle`, `SpectreSidebarToggleElement`, `SpectreSidebarToggleProps` |
2044
+ | `.../dropdown` | `sp-dropdown` | `defineSpectreDropdown`, `SpectreDropdownElement`, dropdown constants and types |
2045
+ | `.../footer` | `sp-footer` | `defineSpectreFooter`, `SpectreFooterElement`, `SpectreFooterProps` |
2046
+ | `.../footer-link` | `sp-footer-link` | `defineSpectreFooterLink`, `SpectreFooterLinkElement`, `SpectreFooterLinkProps` |
2047
+ | `.../footer-chip` | `sp-footer-chip` | `defineSpectreFooterChip`, `SpectreFooterChipElement`, `SpectreFooterChipProps` |
2048
+ | `.../modal` | `sp-modal` | `defineSpectreModal`, `SpectreModalElement`, `SpectreModalProps` |
2049
+ | `.../toast` | `sp-toast` | `defineSpectreToast`, `SpectreToastElement`, toast constants and types |
2050
+ | `.../tooltip` | `sp-tooltip` | `defineSpectreTooltip`, `SpectreTooltipElement`, tooltip constants and types |
2051
+ | `.../tabs` | `sp-tabs` | `defineSpectreTabs`, `SpectreTabsElement`, tabs constants and types |
2052
+ | `.../tab-panel` | `sp-tab-panel` | `defineSpectreTabPanel`, `SpectreTabPanelElement`, `SpectreTabPanelProps` |
2053
+ | `.../accordion` | `sp-accordion` | `defineSpectreAccordion`, `SpectreAccordionElement`, `SpectreAccordionProps` |
2054
+ | `.../accordion-item` | `sp-accordion-item` | `defineSpectreAccordionItem`, `SpectreAccordionItemElement`, `SpectreAccordionItemProps` |
2055
+ | `.../breadcrumb` | `sp-breadcrumb` | `defineSpectreBreadcrumb`, `SpectreBreadcrumbElement`, `SpectreBreadcrumbProps` |
2056
+ | `.../list-group` | `sp-list-group` | `defineSpectreListGroup`, `SpectreListGroupElement`, `SpectreListGroupProps` |
2057
+ | `.../list-group-item` | `sp-list-group-item` | `defineSpectreListGroupItem`, `SpectreListGroupItemElement`, `SpectreListGroupItemProps` |
2058
+ | `.../offcanvas` | `sp-offcanvas` | `defineSpectreOffcanvas`, `SpectreOffcanvasElement`, offcanvas constants and types |
2059
+ | `.../carousel` | `sp-carousel` | `defineSpectreCarousel`, `SpectreCarouselElement`, `SpectreCarouselProps` |
2060
+ | `.../table` | `sp-table` | `defineSpectreTable`, `SpectreTableElement`, table constants and types |
2061
+ | `.../pagination` | `sp-pagination` | `defineSpectrePagination`, `SpectrePaginationElement`, pagination constants and types |
2062
+ | `.../stepper` | `sp-stepper` | `defineSpectreStepper`, `SpectreStepperElement`, stepper constants and types |
2063
+ | `.../card-bleed` | `sp-card-bleed` | `defineSpectreCardBleed`, `SpectreCardBleedElement`, `SpectreCardBleedProps` |
2064
+ | `.../prose` | `sp-prose` | `defineSpectreProse`, `SpectreProseElement`, `SpectreProseProps` |
2065
+ | `.../progress` | `sp-progress` | `defineSpectreProgress`, `SpectreProgressElement`, progress constants and types |
2066
+ | `.../switch` | `sp-switch` | `defineSpectreSwitch`, `SpectreSwitchElement`, switch constants and types |
2067
+ | `.../range` | `sp-range` | `defineSpectreRange`, `SpectreRangeElement`, `SpectreRangeProps` |
2068
+ | `.../file-input` | `sp-file-input` | `defineSpectreFileInput`, `SpectreFileInputElement`, file-input constants and types |
2069
+ | `.../external-auth-button` | `sp-external-auth-button` | `defineSpectreExternalAuthButton`, `SpectreExternalAuthButtonElement`, `SpectreExternalAuthButtonProps` |
2070
+ | `.../choice-card` | `sp-choice-card` | `defineSpectreChoiceCard`, `SpectreChoiceCardElement`, `SpectreChoiceCardProps` |
2071
+ | `.../input-group` | `sp-input-group` | `defineSpectreInputGroup`, `SpectreInputGroupElement`, `SpectreInputGroupProps` |
2072
+ | `.../popover` | `sp-popover` | `defineSpectrePopover`, `SpectrePopoverElement`, popover constants and types |
2073
+ | `.../datepicker` | `sp-datepicker` | `defineSpectreDatepicker`, `SpectreDatepickerElement`, `SpectreDatepickerProps` |
1451
2074
 
1452
2075
  Size constants are shared between input, textarea, and select. Import
1453
2076
  `spectreInputSizes` / `SpectreInputSize` from `.../input` when needed alongside