@orbitcommerce/constellation-docs 0.0.0-stage → 1.2.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 (232) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +6 -2
  3. package/dist/docs.css +20787 -0
  4. package/dist/index.d.ts +33 -0
  5. package/dist/index.js +308 -0
  6. package/dist/pages/Playground-Mk1yIWXb.js +129 -0
  7. package/dist/pages/_address-data-L9BR499w.js +161 -0
  8. package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
  9. package/dist/pages/_card-art-0be5ncyV.js +18 -0
  10. package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
  11. package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
  12. package/dist/pages/_foundations-blXWyYh8.js +30 -0
  13. package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
  14. package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
  15. package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
  16. package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
  17. package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
  18. package/dist/pages/address-block-BZOOOPA9.js +368 -0
  19. package/dist/pages/address-fields-CwSqro3W.js +277 -0
  20. package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
  21. package/dist/pages/alert-D3i7xZTU.js +914 -0
  22. package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
  23. package/dist/pages/app-shell-D4hdlHps.js +1558 -0
  24. package/dist/pages/area-chart-BEWFwiB2.js +718 -0
  25. package/dist/pages/avatar-BFEqQViw.js +895 -0
  26. package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
  27. package/dist/pages/badge-0-PyMrih.js +1035 -0
  28. package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
  29. package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
  30. package/dist/pages/board-card-D2tZY_mU.js +415 -0
  31. package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
  32. package/dist/pages/button-DAyfssDY.js +715 -0
  33. package/dist/pages/calendar-Ds7KsgSI.js +682 -0
  34. package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
  35. package/dist/pages/card-CQEM1_wc.js +1567 -0
  36. package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
  37. package/dist/pages/chart-legend-B20AbakD.js +724 -0
  38. package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
  39. package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
  40. package/dist/pages/checklist-card-DEyykVFS.js +783 -0
  41. package/dist/pages/chip-Ck-o3Ui6.js +839 -0
  42. package/dist/pages/chip-list-k1LxXuCi.js +414 -0
  43. package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
  44. package/dist/pages/coachmark-Be2ghobT.js +366 -0
  45. package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
  46. package/dist/pages/collab-field-CfqqK7d2.js +696 -0
  47. package/dist/pages/color-field-CZpfcA-A.js +1127 -0
  48. package/dist/pages/colour-q2ntvI0w.js +1974 -0
  49. package/dist/pages/column-mapper-TsTG39cl.js +502 -0
  50. package/dist/pages/combobox-DvK2j5tI.js +1334 -0
  51. package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
  52. package/dist/pages/comment-box-CDSGYhr5.js +346 -0
  53. package/dist/pages/composer-D4B0NgpA.js +689 -0
  54. package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
  55. package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
  56. package/dist/pages/context-menu-F9DV30ia.js +487 -0
  57. package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
  58. package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
  59. package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
  60. package/dist/pages/date-input-GOW067EB.js +956 -0
  61. package/dist/pages/date-picker-GdBciR99.js +1569 -0
  62. package/dist/pages/date-time-BLKCXtVZ.js +678 -0
  63. package/dist/pages/delta-CNAGv8JY.js +779 -0
  64. package/dist/pages/description-list-BPeXn1eW.js +1268 -0
  65. package/dist/pages/device-switcher-BCaN99c1.js +554 -0
  66. package/dist/pages/dialog-CRpkRC98.js +3164 -0
  67. package/dist/pages/docs-lM2UBSir.js +520 -0
  68. package/dist/pages/doodle-nzkqi2UI.js +201 -0
  69. package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
  70. package/dist/pages/drill-menu-cskH5mol.js +490 -0
  71. package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
  72. package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
  73. package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
  74. package/dist/pages/empty-state-4U2txFpI.js +1113 -0
  75. package/dist/pages/facet-filters-McbBeY9e.js +353 -0
  76. package/dist/pages/figure-D-HF5vCj.js +563 -0
  77. package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
  78. package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
  79. package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
  80. package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
  81. package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
  82. package/dist/pages/form-grid-BfWCVlie.js +692 -0
  83. package/dist/pages/gallery-BBk2EOri.js +453 -0
  84. package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
  85. package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
  86. package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
  87. package/dist/pages/heatmap-BohgIcNk.js +507 -0
  88. package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
  89. package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
  90. package/dist/pages/host-B6znjEgQ.js +109 -0
  91. package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
  92. package/dist/pages/hosted-field-BLh-53AE.js +208 -0
  93. package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
  94. package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
  95. package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
  96. package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
  97. package/dist/pages/icons-CJ9Aar3d.js +736 -0
  98. package/dist/pages/image-cropper-NyougqLH.js +466 -0
  99. package/dist/pages/image-field-7knBv4mJ.js +567 -0
  100. package/dist/pages/import-result-CmTtGXW_.js +486 -0
  101. package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
  102. package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
  103. package/dist/pages/input-CzLCzfyx.js +2372 -0
  104. package/dist/pages/installation-C3UcpQJT.js +528 -0
  105. package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
  106. package/dist/pages/kanban-Dy9sPAI0.js +740 -0
  107. package/dist/pages/kbd-UNj4zqxn.js +545 -0
  108. package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
  109. package/dist/pages/line-chart-CntWxeMF.js +1117 -0
  110. package/dist/pages/link-CXqvAg9z.js +689 -0
  111. package/dist/pages/link-picker-BMFGCC67.js +478 -0
  112. package/dist/pages/link-row-x8yaUuWc.js +595 -0
  113. package/dist/pages/live-globe-95ROMhGQ.js +715 -0
  114. package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
  115. package/dist/pages/loading-state-BNbCo51C.js +556 -0
  116. package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
  117. package/dist/pages/logo-B38rnzoq.js +571 -0
  118. package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
  119. package/dist/pages/markdown-Ied72vMT.js +237 -0
  120. package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
  121. package/dist/pages/media-banner-DkStCia0.js +233 -0
  122. package/dist/pages/menu-NrLYKqKp.js +2132 -0
  123. package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
  124. package/dist/pages/meta-line-D5p2TycR.js +371 -0
  125. package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
  126. package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
  127. package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
  128. package/dist/pages/motion-CrXtiBvA.js +865 -0
  129. package/dist/pages/number-input-CuyMZg18.js +968 -0
  130. package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
  131. package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
  132. package/dist/pages/otp-input-CVRoX1mw.js +591 -0
  133. package/dist/pages/overview-LA9XRhZc.js +130 -0
  134. package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
  135. package/dist/pages/pagination-C1EgVtW4.js +294 -0
  136. package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
  137. package/dist/pages/password-field-DHEQKyUC.js +912 -0
  138. package/dist/pages/person-cell-BmjbADBz.js +564 -0
  139. package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
  140. package/dist/pages/plan-card-DRaA6RuB.js +621 -0
  141. package/dist/pages/plan-card-DtloWvMh.js +258 -0
  142. package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
  143. package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
  144. package/dist/pages/point-list-BbPmZjsm.js +222 -0
  145. package/dist/pages/popover-C3Oar9D5.js +1198 -0
  146. package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
  147. package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
  148. package/dist/pages/price-CRBLoa9h.js +604 -0
  149. package/dist/pages/principles-pnDyfHpK.js +483 -0
  150. package/dist/pages/print-page-BkLv6bW8.js +513 -0
  151. package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
  152. package/dist/pages/progress-CP_awmo4.js +904 -0
  153. package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
  154. package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
  155. package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
  156. package/dist/pages/rating-CweKN2SX.js +471 -0
  157. package/dist/pages/record-layout-DUP_X0RL.js +719 -0
  158. package/dist/pages/record-pager-y9D7JFgb.js +278 -0
  159. package/dist/pages/registry-BZg-xAbi.js +594 -0
  160. package/dist/pages/release-Cs6tl16C.js +16 -0
  161. package/dist/pages/repeater-BRZYKRQa.js +1351 -0
  162. package/dist/pages/reply-feedback-BDnHprla.js +192 -0
  163. package/dist/pages/reveal-BygENBbL.js +460 -0
  164. package/dist/pages/rich-text-DOFQZEpT.js +156 -0
  165. package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
  166. package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
  167. package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
  168. package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
  169. package/dist/pages/rule-list-DTCmIMpT.js +648 -0
  170. package/dist/pages/save-status-B5KkyMZP.js +378 -0
  171. package/dist/pages/schedule-YycI95O1.js +243 -0
  172. package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
  173. package/dist/pages/search-field-D1uG7R6A.js +693 -0
  174. package/dist/pages/search-menu-DMuXyUUW.js +580 -0
  175. package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
  176. package/dist/pages/section-rail-BtTCETS5.js +637 -0
  177. package/dist/pages/section-v2Pubup9.js +639 -0
  178. package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
  179. package/dist/pages/select-DZ43NpOm.js +1434 -0
  180. package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
  181. package/dist/pages/separator-CFwqRvfO.js +428 -0
  182. package/dist/pages/serp-preview-BGwORjmo.js +346 -0
  183. package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
  184. package/dist/pages/shape-DzniHAVT.js +627 -0
  185. package/dist/pages/share-list-D4wgBxKN.js +926 -0
  186. package/dist/pages/side-panel-CCtkrZjs.js +811 -0
  187. package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
  188. package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
  189. package/dist/pages/skip-link-BxznhSkz.js +252 -0
  190. package/dist/pages/slider-CAoPURKD.js +774 -0
  191. package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
  192. package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
  193. package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
  194. package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
  195. package/dist/pages/sparkline-D3aavCly.js +947 -0
  196. package/dist/pages/split-bar-DYgZnFID.js +414 -0
  197. package/dist/pages/split-button-Be08-VI-.js +335 -0
  198. package/dist/pages/split-pane-lSNZgTKt.js +523 -0
  199. package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
  200. package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
  201. package/dist/pages/status-dot-D99gAGsV.js +567 -0
  202. package/dist/pages/stepper-CxKTbEA-.js +1093 -0
  203. package/dist/pages/success-mark-CqFTOBEu.js +142 -0
  204. package/dist/pages/swatch-H_kNvHuC.js +565 -0
  205. package/dist/pages/switch-C93K6j9h.js +617 -0
  206. package/dist/pages/table-CL0vomno.js +3225 -0
  207. package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
  208. package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
  209. package/dist/pages/task-card-Dv0sR1-w.js +295 -0
  210. package/dist/pages/textarea-CCM-SnGN.js +949 -0
  211. package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
  212. package/dist/pages/time-input-CA9-uZAa.js +442 -0
  213. package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
  214. package/dist/pages/timeline-BsMUTlpR.js +1798 -0
  215. package/dist/pages/toast-zXLRiMRT.js +1391 -0
  216. package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
  217. package/dist/pages/toolbar-B9l_fHKy.js +754 -0
  218. package/dist/pages/tooltip-LHtCUkF-.js +826 -0
  219. package/dist/pages/translation-field-CTRXiF2N.js +251 -0
  220. package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
  221. package/dist/pages/tree-select-DU1qXHy_.js +492 -0
  222. package/dist/pages/tree-view-g_RjLtAb.js +739 -0
  223. package/dist/pages/typography-BSijtiRl.js +876 -0
  224. package/dist/pages/unit-input-Dml4fjmK.js +659 -0
  225. package/dist/pages/upload-rules-yozEzSah.js +419 -0
  226. package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
  227. package/dist/pages/value-change-CnubDKyO.js +489 -0
  228. package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
  229. package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
  230. package/dist/pages/working-status-CENemSsw.js +389 -0
  231. package/manifest.json +13001 -0
  232. package/package.json +35 -4
@@ -0,0 +1,1152 @@
1
+ "use client";
2
+ import { t as DocLink } from "./host-B6znjEgQ.js";
3
+ import { a as DocTable, d as Section$1, i as DocPage, m as ThemePair, o as Example, p as SubSection, r as DoDont, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
4
+ import { useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Alert, Badge, Button, Card, Progress, SegmentedControl, StatusChecklist } from "@orbitcommerce/constellation";
7
+ //#region src/pages/components/status-checklist.tsx
8
+ var Add = (label, size = "sm") => /* @__PURE__ */ jsx(Button, {
9
+ size,
10
+ variant: "secondary",
11
+ children: label
12
+ });
13
+ /** What a new store still has to do, as a setup guide lists it. */
14
+ var STEPS = [
15
+ {
16
+ key: "product",
17
+ status: "done",
18
+ title: "Add your first product",
19
+ description: "27 products are on sale."
20
+ },
21
+ {
22
+ key: "stripe",
23
+ status: "done",
24
+ title: "Connect Stripe so you can be paid"
25
+ },
26
+ {
27
+ key: "logo",
28
+ status: "todo",
29
+ title: "Add your logo",
30
+ description: "It appears on your invoices and emails.",
31
+ action: Add("Add logo")
32
+ },
33
+ {
34
+ key: "delivery",
35
+ status: "todo",
36
+ title: "Set up delivery",
37
+ description: "Choose where you deliver and what it costs.",
38
+ action: Add("Set up delivery")
39
+ },
40
+ {
41
+ key: "domain",
42
+ status: "neutral",
43
+ title: "Connect a domain",
44
+ badge: /* @__PURE__ */ jsx(Badge, {
45
+ size: "sm",
46
+ variant: "outline",
47
+ children: "Optional"
48
+ }),
49
+ description: "Your store stays at its free address until you do."
50
+ }
51
+ ];
52
+ /** A readiness list, compact: what a listing still needs before it can be submitted. */
53
+ var READINESS = [
54
+ {
55
+ key: "name",
56
+ status: "done",
57
+ title: "A name and a description"
58
+ },
59
+ {
60
+ key: "screens",
61
+ status: "done",
62
+ title: "Three screenshots"
63
+ },
64
+ {
65
+ key: "support",
66
+ status: "todo",
67
+ title: "A support email",
68
+ description: "Merchants write to this if something goes wrong.",
69
+ action: Add("Fix", "xs")
70
+ },
71
+ {
72
+ key: "privacy",
73
+ status: "todo",
74
+ title: "A privacy policy link",
75
+ action: Add("Fix", "xs")
76
+ },
77
+ {
78
+ key: "video",
79
+ status: "neutral",
80
+ title: "A demo video",
81
+ badge: /* @__PURE__ */ jsx(Badge, {
82
+ size: "sm",
83
+ variant: "outline",
84
+ children: "Optional"
85
+ })
86
+ }
87
+ ];
88
+ /** The results of checks, as a store's email authentication reports them. */
89
+ var RECORDS = [
90
+ {
91
+ key: "spf",
92
+ status: "done",
93
+ title: "SPF record",
94
+ description: "Found at hollinlane.example."
95
+ },
96
+ {
97
+ key: "dkim",
98
+ status: "warn",
99
+ title: "DKIM record",
100
+ description: "Found, but the key is shorter than 2048 bits."
101
+ },
102
+ {
103
+ key: "dmarc",
104
+ status: "fail",
105
+ title: "DMARC record",
106
+ description: "No record found at _dmarc.hollinlane.example."
107
+ },
108
+ {
109
+ key: "return",
110
+ status: "neutral",
111
+ title: "Custom return path",
112
+ description: "Optional. Not set."
113
+ }
114
+ ];
115
+ var STATUSES = [
116
+ {
117
+ key: "done",
118
+ status: "done",
119
+ title: "Done",
120
+ description: "It is finished, or it passed."
121
+ },
122
+ {
123
+ key: "todo",
124
+ status: "todo",
125
+ title: "To do",
126
+ description: "It is waiting for someone."
127
+ },
128
+ {
129
+ key: "warn",
130
+ status: "warn",
131
+ title: "Needs attention",
132
+ description: "It works, but something is off."
133
+ },
134
+ {
135
+ key: "fail",
136
+ status: "fail",
137
+ title: "Failed",
138
+ description: "It did not pass, or it is broken."
139
+ },
140
+ {
141
+ key: "neutral",
142
+ status: "neutral",
143
+ title: "Not required",
144
+ description: "Optional, skipped or not relevant."
145
+ }
146
+ ];
147
+ function Preview() {
148
+ return /* @__PURE__ */ jsx(StatusChecklist, {
149
+ "aria-label": "Setup",
150
+ size: "sm",
151
+ style: { width: 200 },
152
+ items: [
153
+ {
154
+ key: "a",
155
+ status: "done",
156
+ title: "Add a product"
157
+ },
158
+ {
159
+ key: "b",
160
+ status: "todo",
161
+ title: "Add your logo"
162
+ },
163
+ {
164
+ key: "c",
165
+ status: "warn",
166
+ title: "Check your VAT number"
167
+ },
168
+ {
169
+ key: "d",
170
+ status: "fail",
171
+ title: "Connect a domain"
172
+ }
173
+ ]
174
+ });
175
+ }
176
+ function Columns() {
177
+ const [width, setWidth] = useState("wide");
178
+ const px = {
179
+ wide: "100%",
180
+ medium: "560px",
181
+ narrow: "340px"
182
+ }[width];
183
+ return /* @__PURE__ */ jsxs("div", {
184
+ className: "status-checklist-demo",
185
+ children: [/* @__PURE__ */ jsx(SegmentedControl, {
186
+ "aria-label": "Container width",
187
+ size: "sm",
188
+ value: width,
189
+ onValueChange: setWidth,
190
+ options: [
191
+ {
192
+ value: "wide",
193
+ label: "Wide"
194
+ },
195
+ {
196
+ value: "medium",
197
+ label: "560px"
198
+ },
199
+ {
200
+ value: "narrow",
201
+ label: "340px"
202
+ }
203
+ ]
204
+ }), /* @__PURE__ */ jsx("div", {
205
+ className: "status-checklist-demo__frame",
206
+ style: { width: px },
207
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
208
+ "aria-label": "Readiness",
209
+ size: "sm",
210
+ minColumnWidth: 240,
211
+ items: READINESS.map(({ action: _action, ...item }) => item)
212
+ })
213
+ })]
214
+ });
215
+ }
216
+ function Readiness() {
217
+ return /* @__PURE__ */ jsxs(Card, {
218
+ padding: "md",
219
+ className: "status-checklist-demo__card",
220
+ children: [
221
+ /* @__PURE__ */ jsx(Progress, {
222
+ label: "Ready to submit",
223
+ valueLabel: "2 of 5 ready",
224
+ value: 2,
225
+ max: 5
226
+ }),
227
+ /* @__PURE__ */ jsx("div", { className: "status-checklist-demo__gap" }),
228
+ /* @__PURE__ */ jsx(StatusChecklist, {
229
+ "aria-label": "Readiness",
230
+ size: "sm",
231
+ items: READINESS
232
+ })
233
+ ]
234
+ });
235
+ }
236
+ function Matrix() {
237
+ return /* @__PURE__ */ jsxs("div", {
238
+ className: "status-checklist-demo__matrix",
239
+ children: [
240
+ /* @__PURE__ */ jsx(StatusChecklist, {
241
+ "aria-label": "Steps",
242
+ items: STEPS.slice(1, 4)
243
+ }),
244
+ /* @__PURE__ */ jsx(StatusChecklist, {
245
+ "aria-label": "Compact steps",
246
+ size: "sm",
247
+ items: READINESS
248
+ }),
249
+ /* @__PURE__ */ jsx(StatusChecklist, {
250
+ "aria-label": "Signals",
251
+ variant: "signals",
252
+ items: RECORDS
253
+ }),
254
+ /* @__PURE__ */ jsx(StatusChecklist, {
255
+ "aria-label": "Compact signals",
256
+ variant: "signals",
257
+ size: "sm",
258
+ items: RECORDS
259
+ }),
260
+ /* @__PURE__ */ jsx(StatusChecklist, {
261
+ "aria-label": "Columns",
262
+ size: "sm",
263
+ minColumnWidth: 150,
264
+ dividers: true,
265
+ items: STATUSES.slice(0, 4).map(({ description: _description, ...item }) => item)
266
+ })
267
+ ]
268
+ });
269
+ }
270
+ /** Rows that open something, with an action on one of them that does not open the row. */
271
+ function Linked() {
272
+ const [note, setNote] = useState("");
273
+ return /* @__PURE__ */ jsxs("div", {
274
+ className: "status-checklist-demo__column",
275
+ children: [/* @__PURE__ */ jsx(StatusChecklist, {
276
+ "aria-label": "Set up your store",
277
+ items: [
278
+ {
279
+ key: "product",
280
+ status: "done",
281
+ title: "Add your first product",
282
+ description: "27 products are on sale.",
283
+ href: "#links"
284
+ },
285
+ {
286
+ key: "stripe",
287
+ status: "todo",
288
+ title: "Connect Stripe so you can be paid",
289
+ href: "#links"
290
+ },
291
+ {
292
+ key: "logo",
293
+ status: "todo",
294
+ title: "Add your logo",
295
+ description: "It appears on your invoices and emails.",
296
+ href: "#links",
297
+ action: /* @__PURE__ */ jsx(Button, {
298
+ size: "xs",
299
+ variant: "secondary",
300
+ onClick: () => setNote("Skipped the logo. The row link did not open."),
301
+ children: "Skip"
302
+ })
303
+ }
304
+ ]
305
+ }), /* @__PURE__ */ jsx("p", {
306
+ className: "status-checklist-demo__note",
307
+ "aria-live": "polite",
308
+ children: note
309
+ })]
310
+ });
311
+ }
312
+ /** The current step: the first not done by default, or the key you name. */
313
+ function Current() {
314
+ const [current, setCurrent] = useState("auto");
315
+ return /* @__PURE__ */ jsxs("div", {
316
+ className: "status-checklist-demo",
317
+ children: [/* @__PURE__ */ jsx(SegmentedControl, {
318
+ "aria-label": "Current step",
319
+ size: "sm",
320
+ value: current,
321
+ onValueChange: setCurrent,
322
+ options: [{
323
+ value: "auto",
324
+ label: "Auto"
325
+ }, {
326
+ value: "delivery",
327
+ label: "Set up delivery"
328
+ }]
329
+ }), /* @__PURE__ */ jsx("div", {
330
+ className: "status-checklist-demo__column",
331
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
332
+ "aria-label": "Set up your store",
333
+ current,
334
+ items: STEPS
335
+ })
336
+ })]
337
+ });
338
+ }
339
+ var code = (value) => /* @__PURE__ */ jsx("code", { children: value });
340
+ /** An assistant task's steps: one done with its result, one under way, one skipped and one still to come. */
341
+ var TASK_STEPS = [
342
+ {
343
+ key: "scan",
344
+ status: "done",
345
+ title: "Scan 48 pages",
346
+ result: "12 pages have no meta description and 3 share a title with another page."
347
+ },
348
+ {
349
+ key: "write",
350
+ status: "running",
351
+ title: "Write meta descriptions"
352
+ },
353
+ {
354
+ key: "images",
355
+ status: "skipped",
356
+ title: "Compress product images",
357
+ description: "Already under 200 KB each."
358
+ },
359
+ {
360
+ key: "publish",
361
+ status: "todo",
362
+ title: "Publish the changes"
363
+ }
364
+ ];
365
+ /** A review checklist with a check still waiting, one that failed, and an optional item. */
366
+ var REVIEW = [
367
+ {
368
+ key: "spf",
369
+ status: "checking",
370
+ title: "SPF record"
371
+ },
372
+ {
373
+ key: "dkim",
374
+ status: "fail",
375
+ title: "DKIM record",
376
+ error: "No DKIM record found for mail.harbourdesk.example."
377
+ },
378
+ {
379
+ key: "dmarc",
380
+ status: "optional",
381
+ title: "DMARC policy",
382
+ description: "Not needed to send, but it helps your emails land."
383
+ },
384
+ {
385
+ key: "mx",
386
+ status: "neutral",
387
+ title: "MX record",
388
+ description: "Not used: this domain does not receive mail."
389
+ }
390
+ ];
391
+ /** A theme's readiness in parts, with rows that run their fix. */
392
+ function ReadinessInParts() {
393
+ const [ran, setRan] = useState(null);
394
+ return /* @__PURE__ */ jsxs("div", {
395
+ className: "status-checklist-demo__column",
396
+ children: [/* @__PURE__ */ jsx(StatusChecklist, {
397
+ "aria-label": "Readiness",
398
+ size: "sm",
399
+ sections: [{
400
+ key: "content",
401
+ label: "Content",
402
+ items: [{
403
+ key: "titles",
404
+ status: "done",
405
+ title: "Every page has a title"
406
+ }, {
407
+ key: "alt",
408
+ status: "warn",
409
+ title: "4 images have no alt text",
410
+ onClick: () => setRan("alt text"),
411
+ description: "Press to fix"
412
+ }]
413
+ }, {
414
+ key: "payments",
415
+ label: "Payments",
416
+ items: [{
417
+ key: "stripe",
418
+ status: "checking",
419
+ title: "Stripe account"
420
+ }, {
421
+ key: "bank",
422
+ status: "optional",
423
+ title: "Pay by bank transfer",
424
+ onClick: () => setRan("bank transfer")
425
+ }]
426
+ }]
427
+ }), /* @__PURE__ */ jsx("p", {
428
+ className: "status-checklist-demo__note",
429
+ "aria-live": "polite",
430
+ children: ran ? `Opened the fix for ${ran}.` : "Press a row that has a fix."
431
+ })]
432
+ });
433
+ }
434
+ function Page() {
435
+ return /* @__PURE__ */ jsxs(DocPage, {
436
+ title: "Status checklist",
437
+ status: "new",
438
+ importNames: ["StatusChecklist"],
439
+ lead: "Rows that each say where one thing stands: a glyph, a title, a line of detail and sometimes an action. Setup steps, a readiness list and the results of checks are all this. The state is data, never a click.",
440
+ children: [
441
+ /* @__PURE__ */ jsx(Section$1, {
442
+ id: "steps",
443
+ title: "Steps",
444
+ description: /* @__PURE__ */ jsxs("p", { children: [
445
+ "The default: circled glyphs, a bold title, a line of detail and an ",
446
+ /* @__PURE__ */ jsx("code", { children: "action" }),
447
+ " under it, with a hairline between rows. Each item has a ",
448
+ /* @__PURE__ */ jsx("code", { children: "status" }),
449
+ " (",
450
+ /* @__PURE__ */ jsx("code", { children: "done" }),
451
+ ", ",
452
+ /* @__PURE__ */ jsx("code", { children: "todo" }),
453
+ ", ",
454
+ /* @__PURE__ */ jsx("code", { children: "warn" }),
455
+ ", ",
456
+ /* @__PURE__ */ jsx("code", { children: "fail" }),
457
+ " or",
458
+ " ",
459
+ /* @__PURE__ */ jsx("code", { children: "neutral" }),
460
+ "), a ",
461
+ /* @__PURE__ */ jsx("code", { children: "title" }),
462
+ ", and optionally a ",
463
+ /* @__PURE__ */ jsx("code", { children: "description" }),
464
+ ", a ",
465
+ /* @__PURE__ */ jsx("code", { children: "badge" }),
466
+ " and an",
467
+ " ",
468
+ /* @__PURE__ */ jsx("code", { children: "action" }),
469
+ ". Name the list with ",
470
+ /* @__PURE__ */ jsx("code", { children: "aria-label" }),
471
+ "."
472
+ ] }),
473
+ children: /* @__PURE__ */ jsx(Example, {
474
+ align: "fill",
475
+ code: `
476
+ <StatusChecklist
477
+ aria-label="Set up your store"
478
+ items={[
479
+ { key: 'product', status: 'done', title: 'Add your first product', description: '27 products are on sale.' },
480
+ { key: 'logo', status: 'todo', title: 'Add your logo', description: 'It appears on your invoices and emails.', action: <Button size="sm" variant="secondary">Add logo</Button> },
481
+ { key: 'domain', status: 'neutral', title: 'Connect a domain', badge: <Badge size="sm" variant="outline">Optional</Badge> },
482
+ ]}
483
+ />`,
484
+ children: /* @__PURE__ */ jsx("div", {
485
+ className: "status-checklist-demo__column",
486
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
487
+ "aria-label": "Set up your store",
488
+ items: STEPS
489
+ })
490
+ })
491
+ })
492
+ }),
493
+ /* @__PURE__ */ jsx(Section$1, {
494
+ id: "statuses",
495
+ title: "Statuses",
496
+ description: /* @__PURE__ */ jsx("p", { children: "Five states, each told by its shape as well as its colour: a check, a hollow circle, a triangle, a cross and a minus. A screen reader hears each as a word (\"Done\", \"To do\", \"Needs attention\", \"Failed\", \"Not required\"); the words are yours to replace (see Words, below). The glyphs themselves are fixed on purpose: their shapes are what keeps a state from being told by colour alone, so a host cannot swap them for ones that look alike." }),
497
+ children: /* @__PURE__ */ jsx(Example, {
498
+ align: "fill",
499
+ code: `{ key: 'logo', status: 'todo', title: 'Add your logo' }`,
500
+ children: /* @__PURE__ */ jsxs("div", {
501
+ className: "status-checklist-demo__pair",
502
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
503
+ className: "status-checklist-demo__caption",
504
+ children: "Steps"
505
+ }), /* @__PURE__ */ jsx(StatusChecklist, {
506
+ "aria-label": "Statuses, steps",
507
+ items: STATUSES,
508
+ dividers: false
509
+ })] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
510
+ className: "status-checklist-demo__caption",
511
+ children: "Signals"
512
+ }), /* @__PURE__ */ jsx(StatusChecklist, {
513
+ "aria-label": "Statuses, signals",
514
+ variant: "signals",
515
+ items: STATUSES
516
+ })] })]
517
+ })
518
+ })
519
+ }),
520
+ /* @__PURE__ */ jsx(Section$1, {
521
+ id: "compact",
522
+ title: "Compact steps",
523
+ description: /* @__PURE__ */ jsxs("p", { children: [
524
+ /* @__PURE__ */ jsx("code", { children: "size=\"sm\"" }),
525
+ " is for a card or a list of many rows: a 16px glyph, no rules, a quiet detail line, the title at 500 until it is done, and the ",
526
+ /* @__PURE__ */ jsx("code", { children: "action" }),
527
+ " at the end of the row (use a ",
528
+ /* @__PURE__ */ jsx("code", { children: "size=\"xs\"" }),
529
+ " button there). Pair it with a ",
530
+ /* @__PURE__ */ jsx(DocLink, {
531
+ to: "/components/progress",
532
+ children: "Progress"
533
+ }),
534
+ " ",
535
+ "for how many are done."
536
+ ] }),
537
+ children: /* @__PURE__ */ jsx(Example, {
538
+ align: "fill",
539
+ code: `
540
+ <Card>
541
+ <Progress label="Ready to submit" valueLabel="2 of 5 ready" value={2} max={5} />
542
+ <StatusChecklist aria-label="Readiness" size="sm" items={items} />
543
+ </Card>`,
544
+ children: /* @__PURE__ */ jsx("div", {
545
+ className: "status-checklist-demo__column",
546
+ children: /* @__PURE__ */ jsx(Readiness, {})
547
+ })
548
+ })
549
+ }),
550
+ /* @__PURE__ */ jsx(Section$1, {
551
+ id: "signals",
552
+ title: "Signals",
553
+ description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "variant=\"signals\"" }), " is for the results of checks: bare glyphs, small type, no rules. A title says what was checked and the description says what was found."] }),
554
+ children: /* @__PURE__ */ jsx(Example, {
555
+ align: "fill",
556
+ code: `
557
+ <StatusChecklist
558
+ aria-label="Email authentication"
559
+ variant="signals"
560
+ items={[
561
+ { key: 'spf', status: 'done', title: 'SPF record', description: 'Found at hollinlane.example.' },
562
+ { key: 'dkim', status: 'warn', title: 'DKIM record', description: 'Found, but the key is shorter than 2048 bits.' },
563
+ { key: 'dmarc', status: 'fail', title: 'DMARC record', description: 'No record found at _dmarc.hollinlane.example.' },
564
+ ]}
565
+ />`,
566
+ children: /* @__PURE__ */ jsx("div", {
567
+ className: "status-checklist-demo__column",
568
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
569
+ "aria-label": "Email authentication",
570
+ variant: "signals",
571
+ items: RECORDS
572
+ })
573
+ })
574
+ })
575
+ }),
576
+ /* @__PURE__ */ jsx(Section$1, {
577
+ id: "columns",
578
+ title: "Columns",
579
+ description: /* @__PURE__ */ jsxs("p", { children: [
580
+ "A long list reads better in columns. ",
581
+ /* @__PURE__ */ jsx("code", { children: "minColumnWidth" }),
582
+ " flows the rows into as many columns as fit, each at least that wide (a number is px): one column on a phone and two on a desk, with no media query. It follows the width of the list, not the window. Change the width below."
583
+ ] }),
584
+ children: /* @__PURE__ */ jsx(Example, {
585
+ align: "fill",
586
+ code: `<StatusChecklist size="sm" minColumnWidth={240} items={items} />`,
587
+ children: /* @__PURE__ */ jsx(Columns, {})
588
+ })
589
+ }),
590
+ /* @__PURE__ */ jsxs(Section$1, {
591
+ id: "links",
592
+ title: "Rows that link",
593
+ description: /* @__PURE__ */ jsxs("p", { children: [
594
+ "A row with an ",
595
+ /* @__PURE__ */ jsx("code", { children: "href" }),
596
+ " draws its title as a link that covers the whole row: the row tints on hover and the ring is drawn round it, so a press anywhere opens it. A row's ",
597
+ /* @__PURE__ */ jsx("code", { children: "action" }),
598
+ " sits above that link, so a control there is pressed on its own and never opens the row: press Skip below and the row does not open. A ",
599
+ /* @__PURE__ */ jsx("code", { children: "_blank" }),
600
+ " target also sets",
601
+ " ",
602
+ /* @__PURE__ */ jsx("code", { children: "rel=\"noopener noreferrer\"" }),
603
+ " unless you give a ",
604
+ /* @__PURE__ */ jsx("code", { children: "rel" }),
605
+ "."
606
+ ] }),
607
+ children: [/* @__PURE__ */ jsx(Example, {
608
+ align: "fill",
609
+ code: `
610
+ <StatusChecklist
611
+ aria-label="Set up your store"
612
+ items={[
613
+ { key: 'product', status: 'done', title: 'Add your first product', description: '27 products are on sale.', href: '/products' },
614
+ { key: 'stripe', status: 'todo', title: 'Connect Stripe so you can be paid', href: '/settings/payments' },
615
+ { key: 'logo', status: 'todo', title: 'Add your logo', href: '/settings/branding', action: <Button size="xs" variant="secondary">Skip</Button> },
616
+ ]}
617
+ />`,
618
+ children: /* @__PURE__ */ jsx(Linked, {})
619
+ }), /* @__PURE__ */ jsx(SubSection, {
620
+ title: "With your router",
621
+ description: /* @__PURE__ */ jsxs("p", { children: [
622
+ "In an app with a router, pass ",
623
+ /* @__PURE__ */ jsx("code", { children: "renderLink" }),
624
+ ": it is called for each row that has an ",
625
+ /* @__PURE__ */ jsx("code", { children: "href" }),
626
+ " with the link's props (the address as ",
627
+ /* @__PURE__ */ jsx("code", { children: "href" }),
628
+ ", and ",
629
+ /* @__PURE__ */ jsx("code", { children: "target" }),
630
+ ", ",
631
+ /* @__PURE__ */ jsx("code", { children: "rel" }),
632
+ ", ",
633
+ /* @__PURE__ */ jsx("code", { children: "className" }),
634
+ ",",
635
+ " ",
636
+ /* @__PURE__ */ jsx("code", { children: "aria-current" }),
637
+ " and the words as ",
638
+ /* @__PURE__ */ jsx("code", { children: "children" }),
639
+ ") and returns the one element that is the title. Put every prop on it."
640
+ ] }),
641
+ children: /* @__PURE__ */ jsx(Example, {
642
+ align: "fill",
643
+ code: `
644
+ <StatusChecklist
645
+ aria-label="Set up your store"
646
+ renderLink={({ href, ...props }) => <Link to={href} {...props} />}
647
+ items={[
648
+ { key: 'product', status: 'done', title: 'Add your first product', href: '/products' },
649
+ { key: 'stripe', status: 'todo', title: 'Connect Stripe so you can be paid', href: '/settings/payments' },
650
+ ]}
651
+ />`,
652
+ children: /* @__PURE__ */ jsx("div", {
653
+ className: "status-checklist-demo__column",
654
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
655
+ "aria-label": "Set up your store",
656
+ renderLink: ({ href, ...props }) => /* @__PURE__ */ jsx(DocLink, {
657
+ to: href,
658
+ ...props
659
+ }),
660
+ items: [{
661
+ key: "product",
662
+ status: "done",
663
+ title: "Add your first product",
664
+ href: "/components/progress"
665
+ }, {
666
+ key: "stripe",
667
+ status: "todo",
668
+ title: "Connect Stripe so you can be paid",
669
+ href: "/components/progress"
670
+ }]
671
+ })
672
+ })
673
+ })
674
+ })]
675
+ }),
676
+ /* @__PURE__ */ jsx(Section$1, {
677
+ id: "work",
678
+ title: "Running, checking, skipped and optional",
679
+ description: /* @__PURE__ */ jsxs("p", { children: [
680
+ "Four more statuses for work that runs and checks that wait. ",
681
+ /* @__PURE__ */ jsx("code", { children: "running" }),
682
+ " (a step under way) and",
683
+ " ",
684
+ /* @__PURE__ */ jsx("code", { children: "checking" }),
685
+ " (a check still waiting on its answer) draw the kit's spinner at the glyph's size.",
686
+ " ",
687
+ /* @__PURE__ */ jsx("code", { children: "skipped" }),
688
+ " is a prohibit sign, a step passed over, and ",
689
+ /* @__PURE__ */ jsx("code", { children: "optional" }),
690
+ " a dashed circle, something not needed to go on: each its own shape, apart from ",
691
+ /* @__PURE__ */ jsx("code", { children: "neutral" }),
692
+ "'s minus. Under the detail a row can carry its",
693
+ " ",
694
+ /* @__PURE__ */ jsx("code", { children: "result" }),
695
+ ", cut after two lines, and its ",
696
+ /* @__PURE__ */ jsx("code", { children: "error" }),
697
+ ", in the negative tone."
698
+ ] }),
699
+ children: /* @__PURE__ */ jsx(Example, {
700
+ align: "fill",
701
+ code: `
702
+ <StatusChecklist
703
+ variant="signals"
704
+ aria-label="Steps"
705
+ items={[
706
+ { key: 'scan', status: 'done', title: 'Scan 48 pages', result: '12 pages have no meta description and 3 share a title.' },
707
+ { key: 'write', status: 'running', title: 'Write meta descriptions' },
708
+ { key: 'images', status: 'skipped', title: 'Compress product images', description: 'Already under 200 KB each.' },
709
+ { key: 'publish', status: 'todo', title: 'Publish the changes' },
710
+ ]}
711
+ />
712
+
713
+ <StatusChecklist
714
+ aria-label="Domain checks"
715
+ items={[
716
+ { key: 'spf', status: 'checking', title: 'SPF record' },
717
+ { key: 'dkim', status: 'fail', title: 'DKIM record', error: 'No DKIM record found for mail.harbourdesk.example.' },
718
+ { key: 'dmarc', status: 'optional', title: 'DMARC policy', description: 'Not needed to send, but it helps your emails land.' },
719
+ { key: 'mx', status: 'neutral', title: 'MX record', description: 'Not used: this domain does not receive mail.' },
720
+ ]}
721
+ />`,
722
+ children: /* @__PURE__ */ jsxs("div", {
723
+ className: "status-checklist-demo__pair",
724
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
725
+ className: "status-checklist-demo__caption",
726
+ children: "A task's steps"
727
+ }), /* @__PURE__ */ jsx(StatusChecklist, {
728
+ variant: "signals",
729
+ "aria-label": "Steps",
730
+ items: TASK_STEPS
731
+ })] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
732
+ className: "status-checklist-demo__caption",
733
+ children: "Checks"
734
+ }), /* @__PURE__ */ jsx(StatusChecklist, {
735
+ "aria-label": "Domain checks",
736
+ items: REVIEW
737
+ })] })]
738
+ })
739
+ })
740
+ }),
741
+ /* @__PURE__ */ jsx(Section$1, {
742
+ id: "sections",
743
+ title: "Sections and rows that run an action",
744
+ description: /* @__PURE__ */ jsxs("p", { children: [
745
+ /* @__PURE__ */ jsx("code", { children: "sections" }),
746
+ " splits one checklist into parts, each under a heading that names its own list of rows; the current step is found across them. A row with ",
747
+ /* @__PURE__ */ jsx("code", { children: "onClick" }),
748
+ " is a button over the whole row, for a row that runs something (opens its fix) rather than going somewhere, and its ",
749
+ /* @__PURE__ */ jsx("code", { children: "action" }),
750
+ " stays its own."
751
+ ] }),
752
+ children: /* @__PURE__ */ jsx(Example, {
753
+ align: "fill",
754
+ code: `
755
+ <StatusChecklist
756
+ aria-label="Readiness"
757
+ size="sm"
758
+ sections={[
759
+ {
760
+ key: 'content',
761
+ label: 'Content',
762
+ items: [
763
+ { key: 'titles', status: 'done', title: 'Every page has a title' },
764
+ { key: 'alt', status: 'warn', title: '4 images have no alt text', description: 'Press to fix', onClick: openAltFix },
765
+ ],
766
+ },
767
+ {
768
+ key: 'payments',
769
+ label: 'Payments',
770
+ items: [
771
+ { key: 'stripe', status: 'checking', title: 'Stripe account' },
772
+ { key: 'bank', status: 'optional', title: 'Pay by bank transfer', onClick: openBankTransfer },
773
+ ],
774
+ },
775
+ ]}
776
+ />`,
777
+ children: /* @__PURE__ */ jsx(ReadinessInParts, {})
778
+ })
779
+ }),
780
+ /* @__PURE__ */ jsx(Section$1, {
781
+ id: "current",
782
+ title: "The current step",
783
+ description: /* @__PURE__ */ jsxs("p", { children: [
784
+ "One row can be the current step: the next one to do. By default (",
785
+ /* @__PURE__ */ jsx("code", { children: "current=\"auto\"" }),
786
+ ") it is the first row that is not",
787
+ " ",
788
+ /* @__PURE__ */ jsx("code", { children: "done" }),
789
+ "; name a key when the order differs. The row is marked ",
790
+ /* @__PURE__ */ jsx("code", { children: "data-current" }),
791
+ ", its title says",
792
+ " ",
793
+ /* @__PURE__ */ jsx("code", { children: "aria-current=\"step\"" }),
794
+ ", its glyph is drawn in the accent with a ring of it (a warning or a failure keeps its own colour), and in the compact size and the signals its title steps up to 600. Change it below."
795
+ ] }),
796
+ children: /* @__PURE__ */ jsx(Example, {
797
+ align: "fill",
798
+ code: `<StatusChecklist current="delivery" items={steps} />`,
799
+ children: /* @__PURE__ */ jsx(Current, {})
800
+ })
801
+ }),
802
+ /* @__PURE__ */ jsx(Section$1, {
803
+ id: "words",
804
+ title: "Words",
805
+ description: /* @__PURE__ */ jsxs("p", { children: [
806
+ "The kit has no locale files, so each status has an English word for a screen reader, and you can replace them all at once with",
807
+ " ",
808
+ /* @__PURE__ */ jsx("code", { children: "labels" }),
809
+ ", or one row with ",
810
+ /* @__PURE__ */ jsx("code", { children: "statusLabel" }),
811
+ " (\"Verified\", \"Expired\")."
812
+ ] }),
813
+ children: /* @__PURE__ */ jsx(Example, {
814
+ align: "fill",
815
+ code: `
816
+ <StatusChecklist
817
+ aria-label="Configuration du magasin"
818
+ labels={{ done: 'Terminé', todo: 'À faire', warn: 'À vérifier', fail: 'Échec', neutral: 'Sans objet' }}
819
+ items={items}
820
+ />`,
821
+ children: /* @__PURE__ */ jsx("div", {
822
+ className: "status-checklist-demo__column",
823
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
824
+ "aria-label": "Configuration du magasin",
825
+ size: "sm",
826
+ labels: {
827
+ done: "Terminé",
828
+ todo: "À faire",
829
+ warn: "À vérifier",
830
+ fail: "Échec",
831
+ neutral: "Sans objet"
832
+ },
833
+ items: [
834
+ {
835
+ key: "a",
836
+ status: "done",
837
+ title: "Ajoutez votre premier produit"
838
+ },
839
+ {
840
+ key: "b",
841
+ status: "todo",
842
+ title: "Ajoutez votre logo",
843
+ description: "Il apparaît sur vos factures et vos e-mails."
844
+ },
845
+ {
846
+ key: "c",
847
+ status: "neutral",
848
+ title: "Connectez un domaine"
849
+ }
850
+ ]
851
+ })
852
+ })
853
+ })
854
+ }),
855
+ /* @__PURE__ */ jsx(Section$1, {
856
+ id: "when-it-cannot-load",
857
+ title: "When the list cannot load",
858
+ description: /* @__PURE__ */ jsx("p", { children: "A list that failed to load is not a list of unticked rows. Showing every step as \"to do\" tells a merchant they have not done what they have, so draw the error in its place." }),
859
+ children: /* @__PURE__ */ jsx(DoDont, {
860
+ do: {
861
+ children: /* @__PURE__ */ jsx("div", {
862
+ className: "status-checklist-demo__dodont",
863
+ children: /* @__PURE__ */ jsx(Alert, {
864
+ tone: "critical",
865
+ actions: /* @__PURE__ */ jsx(Button, {
866
+ size: "sm",
867
+ variant: "secondary",
868
+ children: "Retry"
869
+ }),
870
+ children: "Couldn’t load your setup steps."
871
+ })
872
+ }),
873
+ caption: "An error where the list would be, with a way to try again."
874
+ },
875
+ dont: {
876
+ children: /* @__PURE__ */ jsx("div", {
877
+ className: "status-checklist-demo__dodont",
878
+ children: /* @__PURE__ */ jsx(StatusChecklist, {
879
+ "aria-label": "Setup",
880
+ size: "sm",
881
+ items: [
882
+ {
883
+ key: "a",
884
+ status: "todo",
885
+ title: "Add your first product"
886
+ },
887
+ {
888
+ key: "b",
889
+ status: "todo",
890
+ title: "Connect Stripe"
891
+ },
892
+ {
893
+ key: "c",
894
+ status: "todo",
895
+ title: "Add your logo"
896
+ }
897
+ ]
898
+ })
899
+ }),
900
+ caption: "Every row to do, because the data did not arrive. It is wrong, and it looks right."
901
+ }
902
+ })
903
+ }),
904
+ /* @__PURE__ */ jsx(Section$1, {
905
+ id: "both-themes",
906
+ title: "In both themes",
907
+ description: /* @__PURE__ */ jsx("p", { children: "Steps, compact steps, signals, compact signals and a list in columns, with every status, light and dark." }),
908
+ children: /* @__PURE__ */ jsx(ThemePair, {
909
+ align: "fill",
910
+ children: /* @__PURE__ */ jsx(Matrix, {})
911
+ })
912
+ }),
913
+ /* @__PURE__ */ jsxs(Section$1, {
914
+ id: "guidelines",
915
+ title: "Guidelines",
916
+ children: [/* @__PURE__ */ jsx(DocTable, {
917
+ columns: ["Reach for", "When"],
918
+ rows: [
919
+ [code("StatusChecklist"), "Several things, each with its own state: setup steps, a readiness list, the results of checks."],
920
+ [/* @__PURE__ */ jsx(DocLink, {
921
+ to: "/components/progress",
922
+ children: "Progress"
923
+ }), "How many are done, as a bar. Put it above the list."],
924
+ [/* @__PURE__ */ jsx(DocLink, {
925
+ to: "/components/progress-ring",
926
+ children: "ProgressRing"
927
+ }), "How many are done, as a ring, in the head of a card."],
928
+ [/* @__PURE__ */ jsx(DocLink, {
929
+ to: "/components/description-list",
930
+ children: "DescriptionList"
931
+ }), "Facts that have no state: a label and its value."],
932
+ [/* @__PURE__ */ jsx(DocLink, {
933
+ to: "/components/status-badge",
934
+ children: "StatusBadge"
935
+ }), "One state for one record, in a table cell or a heading."]
936
+ ]
937
+ }), /* @__PURE__ */ jsx(Guidelines, { items: [
938
+ "Derive each status from data. A row is never ticked by clicking it.",
939
+ "Write each title as the thing to do or the thing checked, in sentence case: \"Connect Stripe so you can be paid\", \"SPF record\".",
940
+ "Put what to do about a problem in the description, and the button that does it in the action.",
941
+ "Mark what is optional with a badge and the neutral status, so it never holds the list open.",
942
+ "Keep the order of the steps the order they should be done in."
943
+ ] })]
944
+ }),
945
+ /* @__PURE__ */ jsx(Section$1, {
946
+ id: "accessibility",
947
+ title: "Accessibility",
948
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
949
+ "It is a list, named with aria-label, so a screen reader hears how many rows there are.",
950
+ "Each glyph is a named picture (\"Done\", \"Needs attention\"), so the state is read with its row and is not told by colour alone: the shapes differ too.",
951
+ "The drawing inside a glyph is hidden from assistive tech: the glyph is the picture, and the label is its name.",
952
+ "The title and the description are ordinary text, and the action is a control you give it, so it has its own name and keyboard behaviour.",
953
+ "A row with an href is a link named by its title, covering the whole row; its action is a separate control above the link, so the two are reached and pressed on their own.",
954
+ "The current step says aria-current=\"step\" on its title (the link when there is one) and is marked data-current, so a screen reader is told which step is the one to do next, not only by colour.",
955
+ "A list with no rows draws nothing, not an empty list, and never throws on rows that have not arrived (items={query.data} while it loads): show a skeleton or a load error in its place."
956
+ ] })
957
+ }),
958
+ /* @__PURE__ */ jsx(Section$1, {
959
+ id: "differences",
960
+ title: "Where it differs from the vendor dashboard",
961
+ description: /* @__PURE__ */ jsx("p", { children: "The spacing, weights and colours are the vendor dashboard's setup steps and risk signals. These are the places the kit chooses differently." }),
962
+ children: /* @__PURE__ */ jsx(DocTable, {
963
+ columns: [
964
+ "Where",
965
+ "Vendor dashboard",
966
+ "Kit"
967
+ ],
968
+ rows: [
969
+ [
970
+ "The glyph of a step",
971
+ "24px, the icon library's default size, 2px below the first line.",
972
+ "20px, level with the middle of the first line."
973
+ ],
974
+ [
975
+ "A step still to do",
976
+ "A circle in the faintest grey, fg-4: 2.6:1 against the white page, under the 3:1 a graphic needs.",
977
+ "The same circle in fg-3: 5.5:1 on the white page and 5.9:1 on the dark one. Its shape and its name carry the state too."
978
+ ],
979
+ [
980
+ "The glyph of a signal",
981
+ "15px, 2px below the top of its first line (a margin written for a 20px line).",
982
+ "15px, centred on its 16px line."
983
+ ],
984
+ [
985
+ "A compact list",
986
+ "Not drawn: the other Orbit apps each write their own.",
987
+ "A 16px glyph, no rules, a quiet detail line and the action at the end of the row."
988
+ ],
989
+ [
990
+ "Facts that are not statuses",
991
+ "Icon-led lines (the conversion summary: a bag, a clock) share the markup of the signals.",
992
+ "Not built: a line with its own icon is a description list or plain text, not a state."
993
+ ],
994
+ [
995
+ "The glyph's name",
996
+ "None on the steps; a hidden word on one list.",
997
+ "Every glyph is a named picture."
998
+ ],
999
+ [
1000
+ "The set",
1001
+ "Three lists, three markups.",
1002
+ "One list with two variants and two sizes."
1003
+ ],
1004
+ [
1005
+ "Whole-row links",
1006
+ "The setup card stretches a link over the row, with its action above the link.",
1007
+ "The same: a row with an href stretches its title over the row, and its action stays pressable above it."
1008
+ ],
1009
+ [
1010
+ "The current step",
1011
+ "The setup card rings the next task's glyph and promotes its button.",
1012
+ "The row is marked data-current, its title says aria-current=\"step\", and its glyph takes the accent ring."
1013
+ ]
1014
+ ]
1015
+ })
1016
+ }),
1017
+ /* @__PURE__ */ jsxs(Section$1, {
1018
+ id: "props",
1019
+ title: "Props",
1020
+ description: /* @__PURE__ */ jsxs("p", { children: [
1021
+ "Also accepts every native ",
1022
+ /* @__PURE__ */ jsx("code", { children: "ul" }),
1023
+ " attribute."
1024
+ ] }),
1025
+ children: [/* @__PURE__ */ jsx(PropsTable, { rows: [
1026
+ {
1027
+ name: "items",
1028
+ type: "StatusChecklistItem[]",
1029
+ description: "The rows, top to bottom. A list with no rows draws nothing."
1030
+ },
1031
+ {
1032
+ name: "sections",
1033
+ type: "StatusChecklistSection[]",
1034
+ description: "{ key, label, items }: the rows in parts, each under a heading that names its list. Wins over items."
1035
+ },
1036
+ {
1037
+ name: "variant",
1038
+ type: "'steps' | 'signals'",
1039
+ default: "'steps'",
1040
+ description: "Circled glyphs for steps and readiness lists, or bare glyphs and small type for the results of checks."
1041
+ },
1042
+ {
1043
+ name: "size",
1044
+ type: "'md' | 'sm'",
1045
+ default: "'md'",
1046
+ description: "Roomy, or compact for a card: a 16px glyph, the action at the end of the row."
1047
+ },
1048
+ {
1049
+ name: "dividers",
1050
+ type: "boolean",
1051
+ default: "true for roomy steps",
1052
+ description: "A hairline between rows."
1053
+ },
1054
+ {
1055
+ name: "minColumnWidth",
1056
+ type: "number | string",
1057
+ description: "Flows the rows into as many columns as fit, each at least this wide. A number is px."
1058
+ },
1059
+ {
1060
+ name: "labels",
1061
+ type: "Partial<Record<ChecklistStatus, string>>",
1062
+ description: "Your words for the glyphs, as a screen reader hears them."
1063
+ },
1064
+ {
1065
+ name: "current",
1066
+ type: "string | 'auto'",
1067
+ description: "Which row is the current step: a key, or 'auto' for the first row not done. Default none. The row is marked data-current and its title says aria-current=\"step\"."
1068
+ },
1069
+ {
1070
+ name: "renderLink",
1071
+ type: "(props: StatusChecklistLinkProps, item: StatusChecklistItem) => ReactElement",
1072
+ description: "Draws a row that has an href with your router's link. Receives the link's props and the item, and returns the one element that is the title."
1073
+ }
1074
+ ] }), /* @__PURE__ */ jsx(PropsTable, {
1075
+ title: "Each item",
1076
+ rows: [
1077
+ {
1078
+ name: "key",
1079
+ type: "string",
1080
+ required: true,
1081
+ description: "Identifies the row: the React key."
1082
+ },
1083
+ {
1084
+ name: "status",
1085
+ type: "'done' | 'todo' | 'warn' | 'fail' | 'neutral' | 'running' | 'checking' | 'skipped' | 'optional'",
1086
+ required: true,
1087
+ description: "Where this stands. Derive it from data."
1088
+ },
1089
+ {
1090
+ name: "result",
1091
+ type: "ReactNode",
1092
+ description: "What a step came back with: a quiet line under the detail, cut after two lines."
1093
+ },
1094
+ {
1095
+ name: "error",
1096
+ type: "ReactNode",
1097
+ description: "Why it failed: a line in the negative tone."
1098
+ },
1099
+ {
1100
+ name: "onClick",
1101
+ type: "(event) => void",
1102
+ description: "Makes the title a button over the whole row, for a row that runs an action. A row with an href stays a link."
1103
+ },
1104
+ {
1105
+ name: "title",
1106
+ type: "ReactNode",
1107
+ required: true,
1108
+ description: "What the row is about."
1109
+ },
1110
+ {
1111
+ name: "description",
1112
+ type: "ReactNode",
1113
+ description: "A line under the title: what to do, or what was found."
1114
+ },
1115
+ {
1116
+ name: "badge",
1117
+ type: "ReactNode",
1118
+ description: "A small badge after the title: \"Optional\"."
1119
+ },
1120
+ {
1121
+ name: "action",
1122
+ type: "ReactNode",
1123
+ description: "A control for the row. Under the detail in the roomy size, at the end of the row in the compact one."
1124
+ },
1125
+ {
1126
+ name: "statusLabel",
1127
+ type: "string",
1128
+ description: "What a screen reader hears for this row's glyph, when the default for its status will not do."
1129
+ },
1130
+ {
1131
+ name: "href",
1132
+ type: "string",
1133
+ description: "Makes the row's title a link that covers the whole row. The action stays pressable above it."
1134
+ },
1135
+ {
1136
+ name: "target",
1137
+ type: "string",
1138
+ description: "With href: where to open it. _blank also sets rel=\"noopener noreferrer\" unless you give a rel."
1139
+ },
1140
+ {
1141
+ name: "rel",
1142
+ type: "string",
1143
+ description: "With href: its rel. Replaces the noopener noreferrer a _blank target would set."
1144
+ }
1145
+ ]
1146
+ })]
1147
+ })
1148
+ ]
1149
+ });
1150
+ }
1151
+ //#endregion
1152
+ export { Page, Preview };