@orbitcommerce/constellation-docs 1.0.0 → 1.2.1

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 (235) hide show
  1. package/dist/docs.css +14764 -2237
  2. package/dist/index.js +2 -2
  3. package/dist/pages/{Playground-CNbBbErC.js → Playground-Mk1yIWXb.js} +2 -2
  4. package/dist/pages/_address-data-L9BR499w.js +161 -0
  5. package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
  6. package/dist/pages/_card-art-0be5ncyV.js +18 -0
  7. package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
  8. package/dist/pages/{_figures-data-BDmScEny.js → _figures-data-DaDvB7Nm.js} +5 -5
  9. package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
  10. package/dist/pages/{_overlays-specimens-Dpn6oiyH.js → _overlays-specimens-bawR331Z.js} +33 -23
  11. package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
  12. package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
  13. package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
  14. package/dist/pages/address-block-BvxQWBTy.js +403 -0
  15. package/dist/pages/address-fields-CwSqro3W.js +277 -0
  16. package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
  17. package/dist/pages/{alert-BD4e6QTh.js → alert-D3i7xZTU.js} +195 -50
  18. package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
  19. package/dist/pages/{app-shell-KbA-nRqZ.js → app-shell-D4hdlHps.js} +133 -54
  20. package/dist/pages/{area-chart-B91dLcGo.js → area-chart-BEWFwiB2.js} +183 -27
  21. package/dist/pages/{avatar-DPPHXJAu.js → avatar-BFEqQViw.js} +194 -12
  22. package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
  23. package/dist/pages/{badge-C9JR0thI.js → badge-0-PyMrih.js} +441 -135
  24. package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
  25. package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
  26. package/dist/pages/board-card-D2tZY_mU.js +415 -0
  27. package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
  28. package/dist/pages/{button-D3V912P4.js → button-DAyfssDY.js} +276 -79
  29. package/dist/pages/{calendar-DSDZ9nRH.js → calendar-Ds7KsgSI.js} +69 -17
  30. package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
  31. package/dist/pages/card-CXZ3V1d4.js +1612 -0
  32. package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
  33. package/dist/pages/chart-legend-B20AbakD.js +724 -0
  34. package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
  35. package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
  36. package/dist/pages/checklist-card-DEyykVFS.js +783 -0
  37. package/dist/pages/chip-Ck-o3Ui6.js +839 -0
  38. package/dist/pages/chip-list-k1LxXuCi.js +414 -0
  39. package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
  40. package/dist/pages/coachmark-Be2ghobT.js +366 -0
  41. package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
  42. package/dist/pages/collab-field-CfqqK7d2.js +696 -0
  43. package/dist/pages/color-field-CZpfcA-A.js +1127 -0
  44. package/dist/pages/{colour-BwuO8xAv.js → colour-q2ntvI0w.js} +496 -20
  45. package/dist/pages/column-mapper-TsTG39cl.js +502 -0
  46. package/dist/pages/combobox-DvK2j5tI.js +1334 -0
  47. package/dist/pages/{command-palette-xAD7fOg6.js → command-palette-CJ7uBA04.js} +201 -58
  48. package/dist/pages/comment-box-CDSGYhr5.js +346 -0
  49. package/dist/pages/composer-D4B0NgpA.js +689 -0
  50. package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
  51. package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
  52. package/dist/pages/context-menu-F9DV30ia.js +487 -0
  53. package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
  54. package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
  55. package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
  56. package/dist/pages/date-input-GOW067EB.js +956 -0
  57. package/dist/pages/{date-picker-BYSa816m.js → date-picker-GdBciR99.js} +186 -38
  58. package/dist/pages/date-time-BLKCXtVZ.js +678 -0
  59. package/dist/pages/{delta-CtAo0eIM.js → delta-CNAGv8JY.js} +266 -61
  60. package/dist/pages/description-list-BPeXn1eW.js +1268 -0
  61. package/dist/pages/device-switcher-BCaN99c1.js +554 -0
  62. package/dist/pages/dialog-CRpkRC98.js +3164 -0
  63. package/dist/pages/{docs-BNOb7AqR.js → docs-lM2UBSir.js} +20 -15
  64. package/dist/pages/doodle-nzkqi2UI.js +201 -0
  65. package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
  66. package/dist/pages/drill-menu-cskH5mol.js +490 -0
  67. package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
  68. package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
  69. package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
  70. package/dist/pages/empty-state-4U2txFpI.js +1113 -0
  71. package/dist/pages/facet-filters-McbBeY9e.js +353 -0
  72. package/dist/pages/figure-D-HF5vCj.js +563 -0
  73. package/dist/pages/figure-strip-hg7txTc3.js +1381 -0
  74. package/dist/pages/{figure-tabs-CoPFzzKz.js → figure-tabs-QOeQMY6N.js} +153 -35
  75. package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
  76. package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
  77. package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
  78. package/dist/pages/form-grid-BfWCVlie.js +692 -0
  79. package/dist/pages/gallery-BBk2EOri.js +453 -0
  80. package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
  81. package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
  82. package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
  83. package/dist/pages/heatmap-BohgIcNk.js +507 -0
  84. package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
  85. package/dist/pages/{home-dashboard-CFQwDtC9.js → home-dashboard-CxPmvduE.js} +21 -18
  86. package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
  87. package/dist/pages/hosted-field-BLh-53AE.js +208 -0
  88. package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
  89. package/dist/pages/{icon-button-C9eSVPPW.js → icon-button-Bu4Gj5sy.js} +370 -31
  90. package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
  91. package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
  92. package/dist/pages/{icons-sxkTs5Ob.js → icons-CJ9Aar3d.js} +315 -52
  93. package/dist/pages/image-cropper-NyougqLH.js +466 -0
  94. package/dist/pages/image-field-7knBv4mJ.js +567 -0
  95. package/dist/pages/import-result-CmTtGXW_.js +486 -0
  96. package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
  97. package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
  98. package/dist/pages/input-CzLCzfyx.js +2372 -0
  99. package/dist/pages/{installation-DpsX8G_n.js → installation-DRUWNVHP.js} +112 -29
  100. package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
  101. package/dist/pages/kanban-Dy9sPAI0.js +740 -0
  102. package/dist/pages/{kbd-cNfDoikz.js → kbd-UNj4zqxn.js} +15 -14
  103. package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
  104. package/dist/pages/line-chart-CntWxeMF.js +1117 -0
  105. package/dist/pages/link-CXqvAg9z.js +689 -0
  106. package/dist/pages/link-picker-BMFGCC67.js +478 -0
  107. package/dist/pages/link-row-x8yaUuWc.js +595 -0
  108. package/dist/pages/{live-globe-ClvLn9Lb.js → live-globe-95ROMhGQ.js} +191 -47
  109. package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
  110. package/dist/pages/loading-state-BNbCo51C.js +556 -0
  111. package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
  112. package/dist/pages/{logo-BfGF1Pq9.js → logo-D3a3QGKJ.js} +13 -13
  113. package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
  114. package/dist/pages/markdown-Ied72vMT.js +237 -0
  115. package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
  116. package/dist/pages/media-banner-DkStCia0.js +233 -0
  117. package/dist/pages/{menu-by2sgQ09.js → menu-NrLYKqKp.js} +623 -109
  118. package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
  119. package/dist/pages/meta-line-D5p2TycR.js +371 -0
  120. package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
  121. package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
  122. package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
  123. package/dist/pages/{motion-BvTGc2Dk.js → motion-CrXtiBvA.js} +20 -10
  124. package/dist/pages/number-input-CuyMZg18.js +968 -0
  125. package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
  126. package/dist/pages/{orbit-spinner-Dil1Z3Oy.js → orbit-spinner-Dxv5qAhr.js} +30 -14
  127. package/dist/pages/otp-input-CVRoX1mw.js +591 -0
  128. package/dist/pages/{overview-BPEbZQ6g.js → overview-BSfEqHY8.js} +4 -4
  129. package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
  130. package/dist/pages/{pagination-BBUnGvv5.js → pagination-C1EgVtW4.js} +74 -29
  131. package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
  132. package/dist/pages/password-field-DHEQKyUC.js +912 -0
  133. package/dist/pages/person-cell-BmjbADBz.js +564 -0
  134. package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
  135. package/dist/pages/plan-card-DRaA6RuB.js +621 -0
  136. package/dist/pages/plan-card-DtloWvMh.js +258 -0
  137. package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
  138. package/dist/pages/plan-grid-BCPvtP8J.js +251 -0
  139. package/dist/pages/point-list-BbPmZjsm.js +222 -0
  140. package/dist/pages/{popover-Db1gLDpb.js → popover-C3Oar9D5.js} +76 -14
  141. package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
  142. package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
  143. package/dist/pages/price-CRBLoa9h.js +604 -0
  144. package/dist/pages/{principles-CeAIOIdt.js → principles-pnDyfHpK.js} +9 -9
  145. package/dist/pages/print-page-BkLv6bW8.js +513 -0
  146. package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
  147. package/dist/pages/progress-CP_awmo4.js +904 -0
  148. package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
  149. package/dist/pages/{radio-group-CkdBWWfG.js → radio-group-CbiibLwn.js} +581 -18
  150. package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
  151. package/dist/pages/rating-CweKN2SX.js +471 -0
  152. package/dist/pages/record-layout-DUP_X0RL.js +719 -0
  153. package/dist/pages/record-pager-y9D7JFgb.js +278 -0
  154. package/dist/pages/registry-CNR7zpf7.js +594 -0
  155. package/dist/pages/{release-Dvo684UJ.js → release-DYBCY7jm.js} +4 -1
  156. package/dist/pages/repeater-BRZYKRQa.js +1351 -0
  157. package/dist/pages/reply-feedback-BDnHprla.js +192 -0
  158. package/dist/pages/reveal-BygENBbL.js +460 -0
  159. package/dist/pages/rich-text-DOFQZEpT.js +156 -0
  160. package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
  161. package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
  162. package/dist/pages/{rolling-number-qmvH84Mq.js → rolling-number-GR3Cyfpz.js} +12 -12
  163. package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
  164. package/dist/pages/rule-list-DTCmIMpT.js +648 -0
  165. package/dist/pages/save-status-B5KkyMZP.js +378 -0
  166. package/dist/pages/schedule-YycI95O1.js +243 -0
  167. package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
  168. package/dist/pages/{search-field-BN7MWGQ4.js → search-field-D1uG7R6A.js} +15 -15
  169. package/dist/pages/search-menu-DMuXyUUW.js +580 -0
  170. package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
  171. package/dist/pages/section-rail-BtTCETS5.js +637 -0
  172. package/dist/pages/section-v2Pubup9.js +639 -0
  173. package/dist/pages/{segmented-control-CTbIpRBW.js → segmented-control-D-FB1K1T.js} +450 -37
  174. package/dist/pages/{select-DguELoRR.js → select-DZ43NpOm.js} +22 -17
  175. package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
  176. package/dist/pages/{separator-CPZub9pv.js → separator-CFwqRvfO.js} +99 -22
  177. package/dist/pages/serp-preview-BGwORjmo.js +346 -0
  178. package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
  179. package/dist/pages/{shape-DKvA0YKr.js → shape-DzniHAVT.js} +10 -10
  180. package/dist/pages/share-list-D4wgBxKN.js +926 -0
  181. package/dist/pages/side-panel-CCtkrZjs.js +811 -0
  182. package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
  183. package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
  184. package/dist/pages/skip-link-BxznhSkz.js +252 -0
  185. package/dist/pages/slider-CAoPURKD.js +774 -0
  186. package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
  187. package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
  188. package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
  189. package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
  190. package/dist/pages/{sparkline-DMMYGbHn.js → sparkline-D3aavCly.js} +301 -22
  191. package/dist/pages/split-bar-DYgZnFID.js +414 -0
  192. package/dist/pages/split-button-Be08-VI-.js +335 -0
  193. package/dist/pages/split-pane-lSNZgTKt.js +523 -0
  194. package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
  195. package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
  196. package/dist/pages/status-dot-D99gAGsV.js +567 -0
  197. package/dist/pages/stepper-CxKTbEA-.js +1093 -0
  198. package/dist/pages/success-mark-CqFTOBEu.js +142 -0
  199. package/dist/pages/swatch-H_kNvHuC.js +565 -0
  200. package/dist/pages/{switch-B-Qe4kcT.js → switch-C93K6j9h.js} +151 -51
  201. package/dist/pages/table-mq_pNXza.js +3232 -0
  202. package/dist/pages/{tabs-B4M-usCV.js → tabs-Cf4MZ8Fq.js} +257 -21
  203. package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
  204. package/dist/pages/task-card-Dv0sR1-w.js +295 -0
  205. package/dist/pages/{textarea-fTuUZRQb.js → textarea-CCM-SnGN.js} +271 -15
  206. package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
  207. package/dist/pages/time-input-CA9-uZAa.js +442 -0
  208. package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
  209. package/dist/pages/timeline-BsMUTlpR.js +1798 -0
  210. package/dist/pages/{toast-CKP03zjy.js → toast-zXLRiMRT.js} +240 -25
  211. package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
  212. package/dist/pages/toolbar-B9l_fHKy.js +754 -0
  213. package/dist/pages/{tooltip-CBYil3kt.js → tooltip-LHtCUkF-.js} +162 -33
  214. package/dist/pages/translation-field-CTRXiF2N.js +251 -0
  215. package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
  216. package/dist/pages/tree-select-DU1qXHy_.js +492 -0
  217. package/dist/pages/tree-view-g_RjLtAb.js +739 -0
  218. package/dist/pages/{typography-PCbg8Bhg.js → typography-BSijtiRl.js} +153 -12
  219. package/dist/pages/unit-input-Dml4fjmK.js +659 -0
  220. package/dist/pages/upload-rules-yozEzSah.js +419 -0
  221. package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
  222. package/dist/pages/value-change-CnubDKyO.js +489 -0
  223. package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
  224. package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
  225. package/dist/pages/working-status-CENemSsw.js +389 -0
  226. package/manifest.json +10989 -1108
  227. package/package.json +3 -3
  228. package/dist/pages/card-DUggbis3.js +0 -659
  229. package/dist/pages/checkbox-DwimQaK3.js +0 -365
  230. package/dist/pages/dialog-BRAf4LMh.js +0 -1451
  231. package/dist/pages/empty-state-C-mLrXW2.js +0 -417
  232. package/dist/pages/input-KF9Gkawf.js +0 -1093
  233. package/dist/pages/registry-CroHzK9I.js +0 -244
  234. package/dist/pages/skeleton-DLuBhP46.js +0 -561
  235. package/dist/pages/table-AMoODng4.js +0 -607
@@ -0,0 +1,1036 @@
1
+ "use client";
2
+ import { t as DocLink } from "./host-B6znjEgQ.js";
3
+ import { d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Badge, IconButton, IconTile, Menu, MenuContent, MenuItem, MenuSeparator, MenuTrigger } from "@orbitcommerce/constellation";
6
+ import { CreditCardIcon, DotsThreeIcon, KeyIcon, PencilSimpleIcon, ShieldCheckIcon, TrashIcon, TruckIcon } from "@orbitcommerce/constellation/icons";
7
+ //#region src/pages/components/accordion.tsx
8
+ function Preview() {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ className: "accordion-preview",
11
+ children: /* @__PURE__ */ jsxs(Accordion, {
12
+ size: "sm",
13
+ defaultValue: "orders",
14
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
15
+ value: "orders",
16
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
17
+ title: "Orders sync",
18
+ description: "Last used today"
19
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Syncing every order to your warehouse." })]
20
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
21
+ value: "stock",
22
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
23
+ title: "Stock webhook",
24
+ description: "Last used 3 days ago"
25
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Tell your systems when stock runs low." })]
26
+ })]
27
+ })
28
+ });
29
+ }
30
+ /** The header's actions: a menu that stays open on its own and never opens the section. */
31
+ function ActionsMenu({ name }) {
32
+ return /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, {
33
+ asChild: true,
34
+ children: /* @__PURE__ */ jsx(IconButton, {
35
+ label: `More actions for ${name}`,
36
+ size: "sm",
37
+ children: /* @__PURE__ */ jsx(DotsThreeIcon, { weight: "bold" })
38
+ })
39
+ }), /* @__PURE__ */ jsxs(MenuContent, {
40
+ align: "end",
41
+ children: [
42
+ /* @__PURE__ */ jsx(MenuItem, {
43
+ icon: /* @__PURE__ */ jsx(PencilSimpleIcon, {}),
44
+ children: "Rename"
45
+ }),
46
+ /* @__PURE__ */ jsx(MenuItem, {
47
+ icon: /* @__PURE__ */ jsx(KeyIcon, {}),
48
+ children: "Copy key prefix"
49
+ }),
50
+ /* @__PURE__ */ jsx(MenuSeparator, {}),
51
+ /* @__PURE__ */ jsx(MenuItem, {
52
+ icon: /* @__PURE__ */ jsx(TrashIcon, {}),
53
+ tone: "critical",
54
+ children: "Delete"
55
+ })
56
+ ]
57
+ })] });
58
+ }
59
+ function Basics() {
60
+ return /* @__PURE__ */ jsxs(Accordion, {
61
+ defaultValue: "tax",
62
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
63
+ value: "tax",
64
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
65
+ title: "Tax zones",
66
+ description: "Where this rate applies"
67
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "United Kingdom, Ireland and the Isle of Man." })]
68
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
69
+ value: "shipping",
70
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
71
+ title: "Shipping",
72
+ description: "How orders leave the warehouse"
73
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Tracked 48 by default, with Special Delivery on request." })]
74
+ })]
75
+ });
76
+ }
77
+ function ListVariant() {
78
+ return /* @__PURE__ */ jsxs(Accordion, {
79
+ variant: "list",
80
+ defaultValue: "orders",
81
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
82
+ value: "orders",
83
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
84
+ title: "Orders sync",
85
+ description: "Created 3 October, last used today"
86
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Orders are sent to the warehouse within a minute." })]
87
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
88
+ value: "stock",
89
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
90
+ title: "Stock webhook",
91
+ description: "Created 28 September"
92
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "A notice whenever a variant falls below five." })]
93
+ })]
94
+ });
95
+ }
96
+ function PlainVariant() {
97
+ return /* @__PURE__ */ jsxs(Accordion, {
98
+ variant: "plain",
99
+ defaultValue: "returns",
100
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
101
+ value: "returns",
102
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
103
+ title: "Returns policy",
104
+ description: "Updated 3 October"
105
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Most items can be returned within 30 days of delivery." })]
106
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
107
+ value: "shipping",
108
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
109
+ title: "Shipping policy",
110
+ description: "Updated 9 October"
111
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Orders placed before 2pm leave the same day." })]
112
+ })]
113
+ });
114
+ }
115
+ function FlushPanel() {
116
+ return /* @__PURE__ */ jsx(Accordion, {
117
+ variant: "list",
118
+ defaultValue: "zones",
119
+ children: /* @__PURE__ */ jsxs(AccordionItem, {
120
+ value: "zones",
121
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
122
+ title: "Delivery zones",
123
+ description: "Three zones, priced by weight"
124
+ }), /* @__PURE__ */ jsx(AccordionContent, {
125
+ flush: true,
126
+ children: /* @__PURE__ */ jsxs("ul", {
127
+ className: "accordion-list",
128
+ role: "list",
129
+ children: [
130
+ /* @__PURE__ */ jsx("li", {
131
+ className: "accordion-list__row",
132
+ children: "Zone 1: United Kingdom"
133
+ }),
134
+ /* @__PURE__ */ jsx("li", {
135
+ className: "accordion-list__row",
136
+ children: "Zone 2: Ireland"
137
+ }),
138
+ /* @__PURE__ */ jsx("li", {
139
+ className: "accordion-list__row",
140
+ children: "Zone 3: Europe"
141
+ })
142
+ ]
143
+ })
144
+ })]
145
+ })
146
+ });
147
+ }
148
+ function MultipleOpen() {
149
+ return /* @__PURE__ */ jsxs(Accordion, {
150
+ type: "multiple",
151
+ defaultValue: ["tax", "shipping"],
152
+ children: [
153
+ /* @__PURE__ */ jsxs(AccordionItem, {
154
+ value: "tax",
155
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
156
+ title: "Tax zones",
157
+ description: "Where this rate applies"
158
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "United Kingdom, Ireland and the Isle of Man." })]
159
+ }),
160
+ /* @__PURE__ */ jsxs(AccordionItem, {
161
+ value: "shipping",
162
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
163
+ title: "Shipping",
164
+ description: "How orders leave the warehouse"
165
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Tracked 48 by default." })]
166
+ }),
167
+ /* @__PURE__ */ jsxs(AccordionItem, {
168
+ value: "payment",
169
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
170
+ title: "Payment methods",
171
+ description: "Cards, wallets and bank transfer"
172
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Card and wallet payments settle in two working days." })]
173
+ })
174
+ ]
175
+ });
176
+ }
177
+ function NotCollapsible() {
178
+ return /* @__PURE__ */ jsxs(Accordion, {
179
+ defaultValue: "plan",
180
+ collapsible: false,
181
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
182
+ value: "plan",
183
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
184
+ title: "Your plan",
185
+ description: "Growth, billed monthly"
186
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Your plan cannot be closed while you are on this step." })]
187
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
188
+ value: "addons",
189
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
190
+ title: "Add-ons",
191
+ description: "Backups and extra seats"
192
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Add-ons are billed with your plan." })]
193
+ })]
194
+ });
195
+ }
196
+ /** The full header. With `actions`, the first item carries its menu as well. */
197
+ function Header({ actions = false }) {
198
+ return /* @__PURE__ */ jsxs(Accordion, {
199
+ defaultValue: "fulfilment",
200
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
201
+ value: "fulfilment",
202
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
203
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(TruckIcon, {}) }),
204
+ title: "Fulfilment",
205
+ description: "Picks, packs and ships orders",
206
+ badges: /* @__PURE__ */ jsx(Badge, {
207
+ size: "sm",
208
+ tone: "positive",
209
+ children: "Active"
210
+ }),
211
+ meta: "14 permissions",
212
+ actions: actions ? /* @__PURE__ */ jsx(ActionsMenu, { name: "Fulfilment" }) : void 0
213
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Anyone with this role can mark an order as shipped." })]
214
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
215
+ value: "billing",
216
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
217
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(CreditCardIcon, {}) }),
218
+ title: "Billing",
219
+ description: "Invoices and payment methods",
220
+ meta: "3 permissions"
221
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Only the store owner can change the payment method." })]
222
+ })]
223
+ });
224
+ }
225
+ function ChevronStart() {
226
+ return /* @__PURE__ */ jsxs(Accordion, {
227
+ variant: "list",
228
+ chevron: "start",
229
+ defaultValue: "stock",
230
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
231
+ value: "stock",
232
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
233
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(ShieldCheckIcon, {}) }),
234
+ title: "Stock alerts",
235
+ description: "A notice when a variant runs low"
236
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Alerts are sent to the email on your account." })]
237
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
238
+ value: "keys",
239
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
240
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(KeyIcon, {}) }),
241
+ title: "API keys",
242
+ description: "Read orders from another system"
243
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Keys can be revoked at any time." })]
244
+ })]
245
+ });
246
+ }
247
+ function DisabledItems() {
248
+ return /* @__PURE__ */ jsxs(Accordion, {
249
+ defaultValue: "fulfilment",
250
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
251
+ value: "fulfilment",
252
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
253
+ title: "Fulfilment",
254
+ description: "Picks, packs and ships orders",
255
+ meta: "14 permissions"
256
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Anyone with this role can mark an order as shipped." })]
257
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
258
+ value: "legacy",
259
+ disabled: true,
260
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
261
+ title: "Legacy import",
262
+ description: "Kept for the archive, not in use",
263
+ meta: "2 permissions"
264
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "This role has been replaced by the importer." })]
265
+ })]
266
+ });
267
+ }
268
+ function Sizes() {
269
+ return /* @__PURE__ */ jsxs("div", {
270
+ className: "accordion-sizes",
271
+ children: [/* @__PURE__ */ jsxs("div", {
272
+ className: "accordion-labelled",
273
+ children: [/* @__PURE__ */ jsx("span", {
274
+ className: "accordion-label",
275
+ children: "sm"
276
+ }), /* @__PURE__ */ jsx(Accordion, {
277
+ size: "sm",
278
+ defaultValue: "a",
279
+ children: /* @__PURE__ */ jsxs(AccordionItem, {
280
+ value: "a",
281
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
282
+ title: "Orders sync",
283
+ description: "Last used today"
284
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Orders are sent within a minute." })]
285
+ })
286
+ })]
287
+ }), /* @__PURE__ */ jsxs("div", {
288
+ className: "accordion-labelled",
289
+ children: [/* @__PURE__ */ jsx("span", {
290
+ className: "accordion-label",
291
+ children: "md"
292
+ }), /* @__PURE__ */ jsx(Accordion, {
293
+ size: "md",
294
+ defaultValue: "a",
295
+ children: /* @__PURE__ */ jsxs(AccordionItem, {
296
+ value: "a",
297
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
298
+ title: "Orders sync",
299
+ description: "Last used today"
300
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Orders are sent within a minute." })]
301
+ })
302
+ })]
303
+ })]
304
+ });
305
+ }
306
+ function Nested() {
307
+ return /* @__PURE__ */ jsxs(Accordion, {
308
+ defaultValue: "shipping",
309
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
310
+ value: "shipping",
311
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
312
+ title: "Shipping",
313
+ description: "Rates by zone"
314
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: /* @__PURE__ */ jsxs(Accordion, {
315
+ variant: "plain",
316
+ defaultValue: "zone-1",
317
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
318
+ value: "zone-1",
319
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
320
+ title: "Zone 1",
321
+ description: "United Kingdom"
322
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "£3.95, free over £50." })]
323
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
324
+ value: "zone-2",
325
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
326
+ title: "Zone 2",
327
+ description: "Ireland"
328
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "£6.95 on every order." })]
329
+ })]
330
+ }) })]
331
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
332
+ value: "returns",
333
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
334
+ title: "Returns",
335
+ description: "How long customers have"
336
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "30 days from delivery for most items." })]
337
+ })]
338
+ });
339
+ }
340
+ function Everything() {
341
+ return /* @__PURE__ */ jsxs(Accordion, {
342
+ defaultValue: "fulfilment",
343
+ children: [
344
+ /* @__PURE__ */ jsxs(AccordionItem, {
345
+ value: "fulfilment",
346
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
347
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(TruckIcon, {}) }),
348
+ title: "Fulfilment",
349
+ description: "Picks, packs and ships orders",
350
+ badges: /* @__PURE__ */ jsx(Badge, {
351
+ size: "sm",
352
+ tone: "positive",
353
+ children: "Active"
354
+ }),
355
+ meta: "14 permissions",
356
+ actions: /* @__PURE__ */ jsx(ActionsMenu, { name: "Fulfilment" })
357
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Anyone with this role can mark an order as shipped." })]
358
+ }),
359
+ /* @__PURE__ */ jsxs(AccordionItem, {
360
+ value: "billing",
361
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
362
+ icon: /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(CreditCardIcon, {}) }),
363
+ title: "Billing",
364
+ description: "Invoices and payment methods",
365
+ meta: "3 permissions"
366
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Only the store owner can change the payment method." })]
367
+ }),
368
+ /* @__PURE__ */ jsxs(AccordionItem, {
369
+ value: "import",
370
+ disabled: true,
371
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
372
+ title: "Legacy import",
373
+ description: "Not in use",
374
+ meta: "2 permissions"
375
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Replaced by the importer." })]
376
+ })
377
+ ]
378
+ });
379
+ }
380
+ function Page() {
381
+ return /* @__PURE__ */ jsxs(DocPage, {
382
+ title: "Accordion",
383
+ status: "new",
384
+ importNames: [
385
+ "Accordion",
386
+ "AccordionItem",
387
+ "AccordionTrigger",
388
+ "AccordionContent"
389
+ ],
390
+ lead: "Expandable sections of a page: a header that is its own toggle and a panel that stays mounted while it is closed. Reach for it for settings that are grouped, for an order's detail that folds away, or for a form in stages. The panel stays mounted, so a field someone is part-way through keeps what they typed while the section is shut.",
391
+ children: [
392
+ /* @__PURE__ */ jsxs(Section$1, {
393
+ id: "basics",
394
+ title: "Basics",
395
+ description: /* @__PURE__ */ jsxs("p", { children: [
396
+ "An ",
397
+ /* @__PURE__ */ jsx("code", { children: "Accordion" }),
398
+ " holds ",
399
+ /* @__PURE__ */ jsx("code", { children: "AccordionItem" }),
400
+ "s. Each item has an",
401
+ " ",
402
+ /* @__PURE__ */ jsx("code", { children: "AccordionTrigger" }),
403
+ " (the whole header, which opens and closes the section) and an",
404
+ " ",
405
+ /* @__PURE__ */ jsx("code", { children: "AccordionContent" }),
406
+ " (the panel). The header is one button, stretched over the whole row, so a click or Enter anywhere on it, its title, its description or the space beside them, opens the section. One section is open at a time by default; give it a ",
407
+ /* @__PURE__ */ jsx("code", { children: "defaultValue" }),
408
+ " to open one at first."
409
+ ] }),
410
+ children: [/* @__PURE__ */ jsx(Example, {
411
+ align: "fill",
412
+ code: `
413
+ <Accordion defaultValue="tax">
414
+ <AccordionItem value="tax">
415
+ <AccordionTrigger title="Tax zones" description="Where this rate applies" />
416
+ <AccordionContent>United Kingdom, Ireland and the Isle of Man.</AccordionContent>
417
+ </AccordionItem>
418
+ <AccordionItem value="shipping">
419
+ <AccordionTrigger title="Shipping" description="How orders leave the warehouse" />
420
+ <AccordionContent>Tracked 48 by default, with Special Delivery on request.</AccordionContent>
421
+ </AccordionItem>
422
+ </Accordion>`,
423
+ children: /* @__PURE__ */ jsx("div", {
424
+ className: "accordion-stage",
425
+ children: /* @__PURE__ */ jsx(Basics, {})
426
+ })
427
+ }), /* @__PURE__ */ jsxs(Note, {
428
+ title: "When not to reach for it",
429
+ children: [
430
+ "An accordion hides something on purpose, so do not use it to shorten a page that would read better open. If the reader needs every section at once (a checkout's totals, a page's key figures), leave the content on the page. For a list of things that each lead somewhere, use a ",
431
+ /* @__PURE__ */ jsx(DocLink, {
432
+ to: "/components/row-list",
433
+ children: "row list"
434
+ }),
435
+ ". For a group of choices, use a ",
436
+ /* @__PURE__ */ jsx(DocLink, {
437
+ to: "/components/checkbox",
438
+ children: "checkbox group"
439
+ }),
440
+ " or a",
441
+ " ",
442
+ /* @__PURE__ */ jsx(DocLink, {
443
+ to: "/components/radio-group",
444
+ children: "radio group"
445
+ }),
446
+ "."
447
+ ]
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ jsxs(Section$1, {
451
+ id: "variants",
452
+ title: "Variants",
453
+ description: /* @__PURE__ */ jsxs("p", { children: [
454
+ /* @__PURE__ */ jsx("code", { children: "card" }),
455
+ " is the default: each section its own hairline card, 16px corners and an 8px gap between them.",
456
+ " ",
457
+ /* @__PURE__ */ jsx("code", { children: "list" }),
458
+ " is one framed list with a hairline between the rows. ",
459
+ /* @__PURE__ */ jsx("code", { children: "plain" }),
460
+ " has no frame, only a hairline between the sections: a small disclosure in a page, or a group inside a",
461
+ " ",
462
+ /* @__PURE__ */ jsx(DocLink, {
463
+ to: "/components/card",
464
+ children: "Card"
465
+ }),
466
+ " whose own padding is the margin. Its titles and panels line up with the content around them, with no padding of their own at the sides, and its focus ring stands 8px out from the words."
467
+ ] }),
468
+ children: [
469
+ /* @__PURE__ */ jsx(SubSection, {
470
+ title: "Card (default)",
471
+ children: /* @__PURE__ */ jsx(Example, {
472
+ align: "fill",
473
+ code: `
474
+ <Accordion defaultValue="tax">
475
+ <AccordionItem value="tax">
476
+ <AccordionTrigger title="Tax zones" description="Where this rate applies" />
477
+ <AccordionContent>…</AccordionContent>
478
+ </AccordionItem>
479
+ …
480
+ </Accordion>`,
481
+ children: /* @__PURE__ */ jsx("div", {
482
+ className: "accordion-stage",
483
+ children: /* @__PURE__ */ jsx(Basics, {})
484
+ })
485
+ })
486
+ }),
487
+ /* @__PURE__ */ jsx(SubSection, {
488
+ title: "List",
489
+ children: /* @__PURE__ */ jsx(Example, {
490
+ align: "fill",
491
+ code: `
492
+ <Accordion variant="list" defaultValue="orders">
493
+ <AccordionItem value="orders">
494
+ <AccordionTrigger title="Orders sync" description="Created 3 October, last used today" />
495
+ <AccordionContent>Orders are sent to the warehouse within a minute.</AccordionContent>
496
+ </AccordionItem>
497
+ …
498
+ </Accordion>`,
499
+ children: /* @__PURE__ */ jsx("div", {
500
+ className: "accordion-stage",
501
+ children: /* @__PURE__ */ jsx(ListVariant, {})
502
+ })
503
+ })
504
+ }),
505
+ /* @__PURE__ */ jsx(SubSection, {
506
+ title: "Plain, inside a card or a page",
507
+ children: /* @__PURE__ */ jsx(Example, {
508
+ align: "fill",
509
+ code: `
510
+ <Accordion variant="plain" defaultValue="returns">
511
+ <AccordionItem value="returns">
512
+ <AccordionTrigger title="Returns policy" description="Updated 3 October" />
513
+ <AccordionContent>Most items can be returned within 30 days of delivery.</AccordionContent>
514
+ </AccordionItem>
515
+ …
516
+ </Accordion>`,
517
+ children: /* @__PURE__ */ jsx("div", {
518
+ className: "accordion-stage",
519
+ children: /* @__PURE__ */ jsx(PlainVariant, {})
520
+ })
521
+ })
522
+ }),
523
+ /* @__PURE__ */ jsxs(SubSection, {
524
+ title: "Flush panels",
525
+ children: [/* @__PURE__ */ jsx(Example, {
526
+ align: "fill",
527
+ code: `
528
+ <AccordionItem value="zones">
529
+ <AccordionTrigger title="Delivery zones" description="Three zones, priced by weight" />
530
+ <AccordionContent flush>
531
+ <ul role="list">…</ul>
532
+ </AccordionContent>
533
+ </AccordionItem>`,
534
+ children: /* @__PURE__ */ jsx("div", {
535
+ className: "accordion-stage",
536
+ children: /* @__PURE__ */ jsx(FlushPanel, {})
537
+ })
538
+ }), /* @__PURE__ */ jsxs(Note, {
539
+ title: "Flush",
540
+ children: [
541
+ "The panel pads itself by the accordion's size. ",
542
+ /* @__PURE__ */ jsx("code", { children: "flush" }),
543
+ " removes that padding, for a table or a list that runs edge to edge inside the card."
544
+ ]
545
+ })]
546
+ })
547
+ ]
548
+ }),
549
+ /* @__PURE__ */ jsxs(Section$1, {
550
+ id: "open",
551
+ title: "One open, or several",
552
+ description: /* @__PURE__ */ jsxs("p", { children: [
553
+ "By default the accordion is ",
554
+ /* @__PURE__ */ jsx("code", { children: "single" }),
555
+ ": opening a section closes the one that was open, and",
556
+ " ",
557
+ /* @__PURE__ */ jsx("code", { children: "collapsible" }),
558
+ " (on by default) lets the open section be closed again. ",
559
+ /* @__PURE__ */ jsx("code", { children: "type=\"multiple\"" }),
560
+ " lets any number stay open."
561
+ ] }),
562
+ children: [/* @__PURE__ */ jsx(SubSection, {
563
+ title: "Any number open",
564
+ children: /* @__PURE__ */ jsx(Example, {
565
+ align: "fill",
566
+ code: `
567
+ <Accordion type="multiple" defaultValue={['tax', 'shipping']}>
568
+ <AccordionItem value="tax">…</AccordionItem>
569
+ <AccordionItem value="shipping">…</AccordionItem>
570
+ <AccordionItem value="payment">…</AccordionItem>
571
+ </Accordion>`,
572
+ children: /* @__PURE__ */ jsx("div", {
573
+ className: "accordion-stage",
574
+ children: /* @__PURE__ */ jsx(MultipleOpen, {})
575
+ })
576
+ })
577
+ }), /* @__PURE__ */ jsxs(SubSection, {
578
+ title: "The open section cannot be closed",
579
+ children: [/* @__PURE__ */ jsx(Example, {
580
+ align: "fill",
581
+ code: `
582
+ <Accordion defaultValue="plan" collapsible={false}>
583
+ <AccordionItem value="plan">
584
+ <AccordionTrigger title="Your plan" description="Growth, billed monthly" />
585
+ <AccordionContent>…</AccordionContent>
586
+ </AccordionItem>
587
+ …
588
+ </Accordion>`,
589
+ children: /* @__PURE__ */ jsx("div", {
590
+ className: "accordion-stage",
591
+ children: /* @__PURE__ */ jsx(NotCollapsible, {})
592
+ })
593
+ }), /* @__PURE__ */ jsxs(Note, {
594
+ title: "collapsible={false}",
595
+ children: [
596
+ "With ",
597
+ /* @__PURE__ */ jsxs("code", { children: ["collapsible=", "{false}"] }),
598
+ " the open trigger carries ",
599
+ /* @__PURE__ */ jsx("code", { children: "aria-disabled" }),
600
+ " and pressing it leaves the section open. Another section still opens in its place. Use it where a step must stay open, never to trap someone."
601
+ ]
602
+ })]
603
+ })]
604
+ }),
605
+ /* @__PURE__ */ jsxs(Section$1, {
606
+ id: "header",
607
+ title: "The header",
608
+ description: /* @__PURE__ */ jsxs("p", { children: [
609
+ "The header is a title, with a quiet description under it, an optional mark before the words, badges after them and a figure before the actions. Only the title is the button: the icon, the description, the badges and the figure are drawn under its overlay, so they are words, not controls. Put controls in ",
610
+ /* @__PURE__ */ jsx("code", { children: "actions" }),
611
+ ". Where the header is narrow the badges and the figure wrap under the title, and the actions and the chevron keep the first line."
612
+ ] }),
613
+ children: [/* @__PURE__ */ jsx(SubSection, {
614
+ title: "Icon, description, badges and a figure",
615
+ children: /* @__PURE__ */ jsx(Example, {
616
+ align: "fill",
617
+ code: `
618
+ <AccordionTrigger
619
+ icon={<IconTile><TruckIcon /></IconTile>}
620
+ title="Fulfilment"
621
+ description="Picks, packs and ships orders"
622
+ badges={<Badge size="sm" tone="positive">Active</Badge>}
623
+ meta="14 permissions"
624
+ />
625
+ `,
626
+ children: /* @__PURE__ */ jsx("div", {
627
+ className: "accordion-stage",
628
+ children: /* @__PURE__ */ jsx(Header, {})
629
+ })
630
+ })
631
+ }), /* @__PURE__ */ jsxs(SubSection, {
632
+ title: "Actions that never open the section",
633
+ children: [/* @__PURE__ */ jsx(Example, {
634
+ align: "fill",
635
+ code: `
636
+ <AccordionTrigger
637
+ icon={<IconTile><TruckIcon /></IconTile>}
638
+ title="Fulfilment"
639
+ description="Picks, packs and ships orders"
640
+ badges={<Badge size="sm" tone="positive">Active</Badge>}
641
+ meta="14 permissions"
642
+ actions={
643
+ <Menu>
644
+ <MenuTrigger asChild>
645
+ <IconButton label="More actions for Fulfilment" size="sm"><DotsThreeIcon weight="bold" /></IconButton>
646
+ </MenuTrigger>
647
+ <MenuContent align="end">
648
+ <MenuItem icon={<PencilSimpleIcon />}>Rename</MenuItem>
649
+ <MenuItem icon={<KeyIcon />}>Copy key prefix</MenuItem>
650
+ <MenuSeparator />
651
+ <MenuItem icon={<TrashIcon />} tone="critical">Delete</MenuItem>
652
+ </MenuContent>
653
+ </Menu>
654
+ }
655
+ />
656
+ `,
657
+ children: /* @__PURE__ */ jsx("div", {
658
+ className: "accordion-stage",
659
+ children: /* @__PURE__ */ jsx(Header, { actions: true })
660
+ })
661
+ }), /* @__PURE__ */ jsxs(Note, {
662
+ title: "Actions sit beside the button, never inside it",
663
+ children: [
664
+ "A control in ",
665
+ /* @__PURE__ */ jsx("code", { children: "actions" }),
666
+ " sits above the trigger's overlay, so pressing it does its own thing and the section stays as it is. The rest of the header still opens the section: a menu button on a header is not a way to open it, so say what the section holds in its title."
667
+ ]
668
+ })]
669
+ })]
670
+ }),
671
+ /* @__PURE__ */ jsxs(Section$1, {
672
+ id: "states",
673
+ title: "States, chevron and sizes",
674
+ description: /* @__PURE__ */ jsxs("p", { children: [
675
+ "One item can be switched off with ",
676
+ /* @__PURE__ */ jsx("code", { children: "disabled" }),
677
+ ", or the whole accordion with ",
678
+ /* @__PURE__ */ jsx("code", { children: "disabled" }),
679
+ " on the root. ",
680
+ /* @__PURE__ */ jsx("code", { children: "chevron=\"start\"" }),
681
+ " moves the chevron before the mark, and ",
682
+ /* @__PURE__ */ jsx("code", { children: "size" }),
683
+ " sets the header and panel padding: ",
684
+ /* @__PURE__ */ jsx("code", { children: "md" }),
685
+ " (default) 12px by 16px, ",
686
+ /* @__PURE__ */ jsx("code", { children: "sm" }),
687
+ " 10px by 14px."
688
+ ] }),
689
+ children: [
690
+ /* @__PURE__ */ jsxs(SubSection, {
691
+ title: "A switched-off item",
692
+ children: [/* @__PURE__ */ jsx(Example, {
693
+ align: "fill",
694
+ code: `
695
+ <Accordion defaultValue="fulfilment">
696
+ <AccordionItem value="fulfilment">
697
+ <AccordionTrigger title="Fulfilment" description="Picks, packs and ships orders" meta="14 permissions" />
698
+ <AccordionContent>…</AccordionContent>
699
+ </AccordionItem>
700
+ <AccordionItem value="legacy" disabled>
701
+ <AccordionTrigger title="Legacy import" description="Kept for the archive, not in use" meta="2 permissions" />
702
+ <AccordionContent>…</AccordionContent>
703
+ </AccordionItem>
704
+ </Accordion>`,
705
+ children: /* @__PURE__ */ jsx("div", {
706
+ className: "accordion-stage",
707
+ children: /* @__PURE__ */ jsx(DisabledItems, {})
708
+ })
709
+ }), /* @__PURE__ */ jsxs(Note, {
710
+ title: "The whole accordion off",
711
+ children: [
712
+ /* @__PURE__ */ jsx("code", { children: "disabled" }),
713
+ " on the ",
714
+ /* @__PURE__ */ jsx("code", { children: "Accordion" }),
715
+ " switches off every trigger at once. A disabled trigger is skipped by Tab, so use it for a form that is still loading, not for content that is merely quiet."
716
+ ]
717
+ })]
718
+ }),
719
+ /* @__PURE__ */ jsx(SubSection, {
720
+ title: "Chevron first",
721
+ children: /* @__PURE__ */ jsx(Example, {
722
+ align: "fill",
723
+ code: `
724
+ <Accordion variant="list" chevron="start" defaultValue="stock">
725
+ <AccordionItem value="stock">
726
+ <AccordionTrigger icon={<IconTile><ShieldCheckIcon /></IconTile>} title="Stock alerts" description="A notice when a variant runs low" />
727
+ <AccordionContent>…</AccordionContent>
728
+ </AccordionItem>
729
+ …
730
+ </Accordion>`,
731
+ children: /* @__PURE__ */ jsx("div", {
732
+ className: "accordion-stage",
733
+ children: /* @__PURE__ */ jsx(ChevronStart, {})
734
+ })
735
+ })
736
+ }),
737
+ /* @__PURE__ */ jsx(SubSection, {
738
+ title: "Sizes",
739
+ children: /* @__PURE__ */ jsx(Example, {
740
+ align: "fill",
741
+ code: `
742
+ <Accordion size="sm">…</Accordion>
743
+ <Accordion size="md">…</Accordion>`,
744
+ children: /* @__PURE__ */ jsx(Sizes, {})
745
+ })
746
+ })
747
+ ]
748
+ }),
749
+ /* @__PURE__ */ jsx(Section$1, {
750
+ id: "nesting",
751
+ title: "Nesting",
752
+ description: /* @__PURE__ */ jsx("p", { children: "An accordion can sit inside another's panel. Arrow keys move focus between the triggers of the accordion that holds focus, and never step into a nested one, so the two stay separate in the keyboard as well as on the page. Use it sparingly: two levels are usually enough." }),
753
+ children: /* @__PURE__ */ jsx(Example, {
754
+ align: "fill",
755
+ code: `
756
+ <Accordion defaultValue="shipping">
757
+ <AccordionItem value="shipping">
758
+ <AccordionTrigger title="Shipping" description="Rates by zone" />
759
+ <AccordionContent>
760
+ <Accordion variant="plain" defaultValue="zone-1">
761
+ <AccordionItem value="zone-1">
762
+ <AccordionTrigger title="Zone 1" description="United Kingdom" />
763
+ <AccordionContent>£3.95, free over £50.</AccordionContent>
764
+ </AccordionItem>
765
+ …
766
+ </Accordion>
767
+ </AccordionContent>
768
+ </AccordionItem>
769
+ …
770
+ </Accordion>`,
771
+ children: /* @__PURE__ */ jsx("div", {
772
+ className: "accordion-stage",
773
+ children: /* @__PURE__ */ jsx(Nested, {})
774
+ })
775
+ })
776
+ }),
777
+ /* @__PURE__ */ jsx(Section$1, {
778
+ id: "both-themes",
779
+ title: "In both themes",
780
+ description: /* @__PURE__ */ jsx("p", { children: "A header with a mark, badges, a figure and actions, an open panel and a switched-off item, light and dark side by side. Point at a header, or tab to it, to see the wash and the focus ring." }),
781
+ children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsx("div", {
782
+ className: "accordion-theme",
783
+ children: /* @__PURE__ */ jsx(Everything, {})
784
+ }) })
785
+ }),
786
+ /* @__PURE__ */ jsx(Section$1, {
787
+ id: "accessibility",
788
+ title: "Accessibility",
789
+ description: /* @__PURE__ */ jsxs("p", { children: [
790
+ "Each trigger is a real button inside a heading, so a screen reader can move by heading as well as by button. The heading level is ",
791
+ /* @__PURE__ */ jsx("code", { children: "3" }),
792
+ " by default; set ",
793
+ /* @__PURE__ */ jsx("code", { children: "headingLevel" }),
794
+ " to fit the page it sits on."
795
+ ] }),
796
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
797
+ /* @__PURE__ */ jsx(Fragment, { children: "The title is the trigger's accessible name, and the description is read after it. Keep the title to the section's name and put the explanation in the description." }),
798
+ /* @__PURE__ */ jsxs(Fragment, { children: [
799
+ "A trigger says ",
800
+ /* @__PURE__ */ jsx("code", { children: "aria-expanded" }),
801
+ " and points at its panel with ",
802
+ /* @__PURE__ */ jsx("code", { children: "aria-controls" }),
803
+ "; the panel is a",
804
+ " ",
805
+ /* @__PURE__ */ jsx("code", { children: "role=\"region\"" }),
806
+ " named by the trigger."
807
+ ] }),
808
+ /* @__PURE__ */ jsxs(Fragment, { children: [
809
+ "The panel stays mounted while closed and is hidden with ",
810
+ /* @__PURE__ */ jsx("code", { children: "inert" }),
811
+ " and ",
812
+ /* @__PURE__ */ jsx("code", { children: "visibility" }),
813
+ ", so its controls are out of the tab order and out of the accessibility tree, and a field inside keeps what was typed."
814
+ ] }),
815
+ /* @__PURE__ */ jsx(Fragment, { children: "Keyboard: Enter or Space on a trigger opens and closes it (a button's own behaviour). ArrowDown and ArrowUp move between this accordion's triggers, Home and End jump to the first and last; disabled triggers are skipped. Arrow keys stay inside the accordion that holds focus, so a nested one is not crossed." }),
816
+ /* @__PURE__ */ jsxs(Fragment, { children: [
817
+ "With ",
818
+ /* @__PURE__ */ jsxs("code", { children: ["collapsible=", "{false}"] }),
819
+ " the open trigger carries ",
820
+ /* @__PURE__ */ jsx("code", { children: "aria-disabled" }),
821
+ ", and pressing it leaves the section open."
822
+ ] }),
823
+ /* @__PURE__ */ jsxs(Fragment, { children: [
824
+ "Anything in ",
825
+ /* @__PURE__ */ jsx("code", { children: "icon" }),
826
+ ", ",
827
+ /* @__PURE__ */ jsx("code", { children: "description" }),
828
+ ", ",
829
+ /* @__PURE__ */ jsx("code", { children: "badges" }),
830
+ " or ",
831
+ /* @__PURE__ */ jsx("code", { children: "meta" }),
832
+ " sits under the trigger's overlay, so a pointer cannot press it: put controls in ",
833
+ /* @__PURE__ */ jsx("code", { children: "actions" }),
834
+ ", where they sit above the overlay and are separate stops after the trigger."
835
+ ] })
836
+ ] })
837
+ }),
838
+ /* @__PURE__ */ jsxs(Section$1, {
839
+ id: "guidelines",
840
+ title: "Guidelines",
841
+ children: [/* @__PURE__ */ jsx(DoDont, {
842
+ do: {
843
+ children: /* @__PURE__ */ jsx("div", {
844
+ className: "accordion-dd",
845
+ children: /* @__PURE__ */ jsxs(Accordion, {
846
+ size: "sm",
847
+ defaultValue: "a",
848
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
849
+ value: "a",
850
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
851
+ title: "Tax zones",
852
+ description: "Where this rate applies"
853
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "United Kingdom and Ireland." })]
854
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
855
+ value: "b",
856
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
857
+ title: "Shipping",
858
+ description: "How orders leave the warehouse"
859
+ }), /* @__PURE__ */ jsx(AccordionContent, { children: "Tracked 48 by default." })]
860
+ })]
861
+ })
862
+ }),
863
+ caption: "Sections that fold away, with a name and a line of explanation each."
864
+ },
865
+ dont: {
866
+ children: /* @__PURE__ */ jsx("div", {
867
+ className: "accordion-dd",
868
+ children: /* @__PURE__ */ jsxs(Accordion, {
869
+ size: "sm",
870
+ defaultValue: "a",
871
+ children: [/* @__PURE__ */ jsxs(AccordionItem, {
872
+ value: "a",
873
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, { title: "Click here" }), /* @__PURE__ */ jsx(AccordionContent, { children: "United Kingdom and Ireland." })]
874
+ }), /* @__PURE__ */ jsxs(AccordionItem, {
875
+ value: "b",
876
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, { title: "More" }), /* @__PURE__ */ jsx(AccordionContent, { children: "Tracked 48 by default." })]
877
+ })]
878
+ })
879
+ }),
880
+ caption: "A vague title. The header has to say what the panel holds, closed as well as open."
881
+ }
882
+ }), /* @__PURE__ */ jsx(Guidelines, { items: [
883
+ "Use an accordion for sections a reader opens one at a time. Do not fold away the few lines that carry the point of the page.",
884
+ "Keep each title to the section name and each description to one line. If a section needs three lines to name, it is not one section.",
885
+ "At most one level of nesting. Two accordions inside one another are hard to hold in the head.",
886
+ "Put a control in actions, never in the header at large: the header is the toggle.",
887
+ "Say why an item is switched off in its description. A switched-off trigger alone is a dead end.",
888
+ "A single section that opens and closes is a disclosure, and the same component carries it: use plain for one, card for several."
889
+ ] })]
890
+ }),
891
+ /* @__PURE__ */ jsxs(Section$1, {
892
+ id: "props",
893
+ title: "Props",
894
+ description: /* @__PURE__ */ jsx("p", { children: "Accordion, AccordionItem, AccordionTrigger and AccordionContent, typed from their interfaces. Each also accepts the native attributes of the element it draws." }),
895
+ children: [
896
+ /* @__PURE__ */ jsx(PropsTable, {
897
+ title: "Accordion",
898
+ rows: [
899
+ {
900
+ name: "type",
901
+ type: "'single' | 'multiple'",
902
+ default: "'single'",
903
+ description: "One section open at a time, or any number."
904
+ },
905
+ {
906
+ name: "variant",
907
+ type: "'card' | 'list' | 'plain'",
908
+ default: "'card'",
909
+ description: "Each section its own card, one framed list, or no frame with a hairline between sections."
910
+ },
911
+ {
912
+ name: "size",
913
+ type: "'md' | 'sm'",
914
+ default: "'md'",
915
+ description: "Header and panel padding: 12px by 16px, or 10px by 14px."
916
+ },
917
+ {
918
+ name: "chevron",
919
+ type: "'end' | 'start'",
920
+ default: "'end'",
921
+ description: "Where the chevron sits: after the actions, or before the icon."
922
+ },
923
+ {
924
+ name: "headingLevel",
925
+ type: "2 | 3 | 4 | 5 | 6",
926
+ default: "3",
927
+ description: "Which heading the trigger sits in."
928
+ },
929
+ {
930
+ name: "disabled",
931
+ type: "boolean",
932
+ default: "false",
933
+ description: "Switches off every trigger in the accordion."
934
+ },
935
+ {
936
+ name: "collapsible",
937
+ type: "boolean",
938
+ default: "true",
939
+ description: "Whether the open section can be closed again. Single only."
940
+ },
941
+ {
942
+ name: "value",
943
+ type: "string | string[]",
944
+ description: "The open value or values, for a controlled accordion."
945
+ },
946
+ {
947
+ name: "defaultValue",
948
+ type: "string | string[]",
949
+ description: "The section or sections open at first, when it is not controlled."
950
+ },
951
+ {
952
+ name: "onValueChange",
953
+ type: "(value) => void",
954
+ description: "Called with the next value (a string, or undefined when nothing is open) or, with multiple, the next array."
955
+ }
956
+ ]
957
+ }),
958
+ /* @__PURE__ */ jsx(PropsTable, {
959
+ title: "AccordionItem",
960
+ rows: [
961
+ {
962
+ name: "value",
963
+ type: "string",
964
+ required: true,
965
+ description: "What opens this section, matched against the accordion value and defaultValue."
966
+ },
967
+ {
968
+ name: "disabled",
969
+ type: "boolean",
970
+ default: "false",
971
+ description: "Switches off this section."
972
+ },
973
+ {
974
+ name: "children",
975
+ type: "ReactNode",
976
+ description: "An AccordionTrigger and the AccordionContent it opens."
977
+ }
978
+ ]
979
+ }),
980
+ /* @__PURE__ */ jsx(PropsTable, {
981
+ title: "AccordionTrigger",
982
+ rows: [
983
+ {
984
+ name: "title",
985
+ type: "ReactNode",
986
+ required: true,
987
+ description: "The section name. It is the trigger accessible name, and the whole header toggles."
988
+ },
989
+ {
990
+ name: "description",
991
+ type: "ReactNode",
992
+ description: "The quiet line under the title. Read after the name."
993
+ },
994
+ {
995
+ name: "icon",
996
+ type: "ReactNode",
997
+ description: "A mark before the words: an IconTile, an icon. Decorative."
998
+ },
999
+ {
1000
+ name: "badges",
1001
+ type: "ReactNode",
1002
+ description: "Badges after the title. Under the overlay, so a pointer cannot press them."
1003
+ },
1004
+ {
1005
+ name: "meta",
1006
+ type: "ReactNode",
1007
+ description: "A quiet figure before the actions, such as a count. Under the overlay, so not for controls."
1008
+ },
1009
+ {
1010
+ name: "actions",
1011
+ type: "ReactNode",
1012
+ description: "Controls at the end of the header. Above the overlay, so they do not open the section."
1013
+ }
1014
+ ]
1015
+ }),
1016
+ /* @__PURE__ */ jsx(PropsTable, {
1017
+ title: "AccordionContent",
1018
+ rows: [{
1019
+ name: "flush",
1020
+ type: "boolean",
1021
+ default: "false",
1022
+ description: "Removes the panel padding, for a table or a list that runs edge to edge."
1023
+ }, {
1024
+ name: "children",
1025
+ type: "ReactNode",
1026
+ description: "The panel content. It stays mounted while the section is closed."
1027
+ }]
1028
+ })
1029
+ ]
1030
+ }),
1031
+ /* @__PURE__ */ jsx(Fragment, {})
1032
+ ]
1033
+ });
1034
+ }
1035
+ //#endregion
1036
+ export { Page, Preview };