@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,1074 @@
1
+ "use client";
2
+ import { t as DocLink } from "./host-B6znjEgQ.js";
3
+ import { a as DocTable, 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 { Badge, StatusBadge, StatusRegistryProvider, Tooltip, normaliseStatus, statusRegistry } from "@orbitcommerce/constellation";
6
+ import { ClockIcon } from "@orbitcommerce/constellation/icons";
7
+ //#region src/pages/components/status-badge.tsx
8
+ function Preview() {
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: "status-badge-preview",
11
+ children: [
12
+ /* @__PURE__ */ jsx(StatusBadge, {
13
+ domain: "payment",
14
+ status: "paid"
15
+ }),
16
+ /* @__PURE__ */ jsx(StatusBadge, {
17
+ domain: "payment",
18
+ status: "awaiting_payment"
19
+ }),
20
+ /* @__PURE__ */ jsx(StatusBadge, {
21
+ domain: "payment",
22
+ status: "failed"
23
+ }),
24
+ /* @__PURE__ */ jsx(StatusBadge, {
25
+ domain: "fulfilment",
26
+ status: "unfulfilled"
27
+ }),
28
+ /* @__PURE__ */ jsx(StatusBadge, {
29
+ domain: "return",
30
+ status: "items_received"
31
+ }),
32
+ /* @__PURE__ */ jsx(StatusBadge, {
33
+ domain: "commission",
34
+ status: "approved"
35
+ })
36
+ ]
37
+ });
38
+ }
39
+ var TONES = [
40
+ "neutral",
41
+ "accent",
42
+ "positive",
43
+ "negative",
44
+ "warning",
45
+ "info"
46
+ ];
47
+ var capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
48
+ /** A registry with a host's own statuses, as the "Adding your own" section builds one. */
49
+ var hostRegistry = statusRegistry.extend({
50
+ hosting: {
51
+ running: "positive",
52
+ degraded: "warning",
53
+ stopped: {
54
+ tone: "neutral",
55
+ label: "Switched off"
56
+ }
57
+ },
58
+ payout: { processing: "info" }
59
+ });
60
+ /** What each domain is for, shown above its statuses in the reference. */
61
+ var DOMAIN_NOTES = {
62
+ generic: "Words that mean the same everywhere. Every other domain falls back to this list.",
63
+ order: "The order itself, and draft orders: a customer's Orders tab, company orders, the Drafts list.",
64
+ payment: "The payment status of an order. Money owed or moving back is amber.",
65
+ fulfilment: "Shipping an order, one parcel, and carrier tracking.",
66
+ return: "A return record, from request to completion.",
67
+ orderReturn: "How an order's returns add up on the orders list: Return requested, Returned.",
68
+ payout: "Money paid out to an affiliate, a partner or a merchant.",
69
+ commission: "An affiliate commission, from its hold window to payment.",
70
+ referral: "A store an affiliate referred.",
71
+ subscription: "A recurring plan: a store, agency or supplier plan, a plugin licence, a customer subscription.",
72
+ invoice: "A platform invoice.",
73
+ review: "Anything waiting for a decision: approvals, plugin and theme listings, registration requests.",
74
+ sync: "Runs, feeds and connections.",
75
+ purchaseOrder: "A purchase order, from the supplier's end or the merchant's.",
76
+ team: "A team member or an invitation.",
77
+ domain: "A store domain or a registered domain.",
78
+ store: "A store as an agency or partner sees it.",
79
+ devStore: "A development store, from build to handover.",
80
+ verification: "A VAT or tax number check.",
81
+ campaign: "A marketing campaign. Completed is red and paused blue, as the vendor dashboard draws them: see below.",
82
+ giftCard: "A gift card: expired is red, a spent one amber.",
83
+ discount: "A discount code: scheduled is blue, expired red."
84
+ };
85
+ function Reference() {
86
+ return /* @__PURE__ */ jsx("div", {
87
+ className: "status-ref",
88
+ children: statusRegistry.domains().map((domain) => /* @__PURE__ */ jsxs("div", {
89
+ className: "status-ref__domain",
90
+ id: `status-domain-${domain}`,
91
+ children: [
92
+ /* @__PURE__ */ jsx("h3", {
93
+ className: "status-ref__name",
94
+ children: /* @__PURE__ */ jsx("code", { children: domain })
95
+ }),
96
+ /* @__PURE__ */ jsx("p", {
97
+ className: "status-ref__note",
98
+ children: DOMAIN_NOTES[domain]
99
+ }),
100
+ /* @__PURE__ */ jsx("ul", {
101
+ className: "status-ref__list",
102
+ "aria-label": `${domain} statuses`,
103
+ children: statusRegistry.statuses(domain).map((s) => /* @__PURE__ */ jsxs("li", {
104
+ className: "status-ref__item",
105
+ children: [/* @__PURE__ */ jsx(StatusBadge, {
106
+ domain,
107
+ status: s.status,
108
+ title: s.status
109
+ }), normaliseStatus(s.label) !== s.status ? /* @__PURE__ */ jsx("code", {
110
+ className: "status-ref__key",
111
+ children: s.status
112
+ }) : null]
113
+ }, s.status))
114
+ })
115
+ ]
116
+ }, domain))
117
+ });
118
+ }
119
+ /** A status with the tone it had and the tone it has now, for the differences table. */
120
+ function Then({ tone, children }) {
121
+ return /* @__PURE__ */ jsxs("span", {
122
+ className: "status-diff",
123
+ children: [/* @__PURE__ */ jsx(Badge, {
124
+ tone,
125
+ variant: "outline",
126
+ children
127
+ }), /* @__PURE__ */ jsx("code", { children: tone })]
128
+ });
129
+ }
130
+ function Now({ domain, status, children }) {
131
+ return /* @__PURE__ */ jsxs("span", {
132
+ className: "status-diff",
133
+ children: [/* @__PURE__ */ jsx(StatusBadge, {
134
+ domain,
135
+ status,
136
+ children
137
+ }), /* @__PURE__ */ jsx("code", { children: statusRegistry.tone(domain, status) })]
138
+ });
139
+ }
140
+ /** A badge with the domain it reads, so a row of examples says what differs. */
141
+ function Captioned({ domain, children }) {
142
+ return /* @__PURE__ */ jsxs("span", {
143
+ className: "status-diff",
144
+ children: [children, /* @__PURE__ */ jsx("code", { children: domain })]
145
+ });
146
+ }
147
+ /** The states beside the tones: live, an icon, a link, no dot, a label too long for its column, and an outline at sm. */
148
+ function StateMatrix() {
149
+ return /* @__PURE__ */ jsxs("div", {
150
+ className: "status-matrix",
151
+ children: [/* @__PURE__ */ jsxs("div", {
152
+ className: "status-matrix__row",
153
+ children: [
154
+ /* @__PURE__ */ jsx(StatusBadge, {
155
+ domain: "generic",
156
+ status: "live",
157
+ pulse: true
158
+ }),
159
+ /* @__PURE__ */ jsx(StatusBadge, {
160
+ tone: "warning",
161
+ icon: /* @__PURE__ */ jsx(ClockIcon, {}),
162
+ children: "Due today"
163
+ }),
164
+ /* @__PURE__ */ jsx(StatusBadge, {
165
+ asChild: true,
166
+ domain: "subscription",
167
+ status: "trialing",
168
+ children: /* @__PURE__ */ jsx("a", {
169
+ href: "#both-themes",
170
+ children: "Trial ends in 3 days"
171
+ })
172
+ }),
173
+ /* @__PURE__ */ jsx(StatusBadge, {
174
+ domain: "payment",
175
+ status: "paid",
176
+ dot: false
177
+ })
178
+ ]
179
+ }), /* @__PURE__ */ jsxs("div", {
180
+ className: "status-matrix__row",
181
+ children: [/* @__PURE__ */ jsx("span", {
182
+ className: "status-badge-narrow",
183
+ children: /* @__PURE__ */ jsx(StatusBadge, {
184
+ domain: "orderReturn",
185
+ status: "requested",
186
+ tabIndex: 0,
187
+ children: "Return requested by the customer"
188
+ })
189
+ }), /* @__PURE__ */ jsx(StatusBadge, {
190
+ domain: "payment",
191
+ status: "refunded",
192
+ variant: "outline",
193
+ size: "sm"
194
+ })]
195
+ })]
196
+ });
197
+ }
198
+ function ToneMatrix() {
199
+ return /* @__PURE__ */ jsx("div", {
200
+ className: "status-matrix",
201
+ children: TONES.map((tone) => /* @__PURE__ */ jsxs("div", {
202
+ className: "status-matrix__row",
203
+ children: [
204
+ /* @__PURE__ */ jsx(StatusBadge, {
205
+ tone,
206
+ children: capitalise(tone)
207
+ }),
208
+ /* @__PURE__ */ jsx(StatusBadge, {
209
+ tone,
210
+ variant: "outline",
211
+ children: capitalise(tone)
212
+ }),
213
+ /* @__PURE__ */ jsx(StatusBadge, {
214
+ tone,
215
+ size: "sm",
216
+ children: capitalise(tone)
217
+ })
218
+ ]
219
+ }, tone))
220
+ });
221
+ }
222
+ function Page() {
223
+ return /* @__PURE__ */ jsxs(DocPage, {
224
+ title: "Status badge",
225
+ status: "new",
226
+ importNames: [
227
+ "StatusBadge",
228
+ "StatusRegistryProvider",
229
+ "statusRegistry"
230
+ ],
231
+ lead: "A badge for a status. Say which part of Orbit the status belongs to and what it is, and the kit picks the tone, so a refunded payment is the same colour on every page and in every dashboard.",
232
+ children: [
233
+ /* @__PURE__ */ jsxs(Section$1, {
234
+ id: "basics",
235
+ title: "Basics",
236
+ description: /* @__PURE__ */ jsxs("p", { children: [
237
+ "Pass the ",
238
+ /* @__PURE__ */ jsx("code", { children: "domain" }),
239
+ " a status belongs to and the ",
240
+ /* @__PURE__ */ jsx("code", { children: "status" }),
241
+ " as the API names it. The tone comes from the registry, the dot is always there (an icon can take its place), and with no children the status is written out in English. Spelling does not matter: ",
242
+ /* @__PURE__ */ jsx("code", { children: "PARTIALLY_PAID" }),
243
+ ", ",
244
+ /* @__PURE__ */ jsx("code", { children: "partially-paid" }),
245
+ " and",
246
+ " ",
247
+ /* @__PURE__ */ jsx("code", { children: "partiallyPaid" }),
248
+ " are one status, and so are ",
249
+ /* @__PURE__ */ jsx("code", { children: "canceled" }),
250
+ " and ",
251
+ /* @__PURE__ */ jsx("code", { children: "cancelled" }),
252
+ "."
253
+ ] }),
254
+ children: [
255
+ /* @__PURE__ */ jsx(Example, {
256
+ align: "start",
257
+ code: `
258
+ <StatusBadge domain="payment" status="paid" />
259
+ <StatusBadge domain="payment" status="awaiting_payment" />
260
+ <StatusBadge domain="payment" status="refunded" />
261
+ <StatusBadge domain="payment" status="failed" />
262
+ <StatusBadge domain="fulfilment" status="unfulfilled" />
263
+ <StatusBadge domain="fulfilment" status="partially_fulfilled" />
264
+ <StatusBadge domain="fulfilment" status="delivered" />`,
265
+ children: /* @__PURE__ */ jsxs("div", {
266
+ className: "status-badge-row",
267
+ children: [
268
+ /* @__PURE__ */ jsx(StatusBadge, {
269
+ domain: "payment",
270
+ status: "paid"
271
+ }),
272
+ /* @__PURE__ */ jsx(StatusBadge, {
273
+ domain: "payment",
274
+ status: "awaiting_payment"
275
+ }),
276
+ /* @__PURE__ */ jsx(StatusBadge, {
277
+ domain: "payment",
278
+ status: "refunded"
279
+ }),
280
+ /* @__PURE__ */ jsx(StatusBadge, {
281
+ domain: "payment",
282
+ status: "failed"
283
+ }),
284
+ /* @__PURE__ */ jsx(StatusBadge, {
285
+ domain: "fulfilment",
286
+ status: "unfulfilled"
287
+ }),
288
+ /* @__PURE__ */ jsx(StatusBadge, {
289
+ domain: "fulfilment",
290
+ status: "partially_fulfilled"
291
+ }),
292
+ /* @__PURE__ */ jsx(StatusBadge, {
293
+ domain: "fulfilment",
294
+ status: "delivered"
295
+ })
296
+ ]
297
+ })
298
+ }),
299
+ /* @__PURE__ */ jsx(SubSection, {
300
+ title: "In your own words",
301
+ description: /* @__PURE__ */ jsx("p", { children: "The registry decides the tone, never the words. Pass children and they are shown instead, which is how a dashboard translates a status or says it its own way. The tone still comes from the status." }),
302
+ children: /* @__PURE__ */ jsx(Example, {
303
+ align: "start",
304
+ code: `
305
+ <StatusBadge domain="payment" status="paid">Bezahlt</StatusBadge>
306
+ <StatusBadge domain="payment" status="awaiting_payment">Warten auf Zahlung</StatusBadge>
307
+ <StatusBadge domain="payout" status={payout.status}>{t(\`payouts.status.\${payout.status}\`)}</StatusBadge>`,
308
+ children: /* @__PURE__ */ jsxs("div", {
309
+ className: "status-badge-row",
310
+ children: [/* @__PURE__ */ jsx(StatusBadge, {
311
+ domain: "payment",
312
+ status: "paid",
313
+ children: "Bezahlt"
314
+ }), /* @__PURE__ */ jsx(StatusBadge, {
315
+ domain: "payment",
316
+ status: "awaiting_payment",
317
+ children: "Warten auf Zahlung"
318
+ })]
319
+ })
320
+ })
321
+ }),
322
+ /* @__PURE__ */ jsx(SubSection, {
323
+ title: "A tone with no status",
324
+ description: /* @__PURE__ */ jsxs("p", { children: [
325
+ "For a one-off that is not a status in any registry, pass the ",
326
+ /* @__PURE__ */ jsx("code", { children: "tone" }),
327
+ " and the words. A tone always wins over the lookup."
328
+ ] }),
329
+ children: /* @__PURE__ */ jsx(Example, {
330
+ align: "start",
331
+ code: `
332
+ <StatusBadge tone="negative">Late</StatusBadge>
333
+ <StatusBadge tone="warning">Due today</StatusBadge>
334
+ <StatusBadge tone="info" pulse>Syncing</StatusBadge>`,
335
+ children: /* @__PURE__ */ jsxs("div", {
336
+ className: "status-badge-row",
337
+ children: [
338
+ /* @__PURE__ */ jsx(StatusBadge, {
339
+ tone: "negative",
340
+ children: "Late"
341
+ }),
342
+ /* @__PURE__ */ jsx(StatusBadge, {
343
+ tone: "warning",
344
+ children: "Due today"
345
+ }),
346
+ /* @__PURE__ */ jsx(StatusBadge, {
347
+ tone: "info",
348
+ pulse: true,
349
+ children: "Syncing"
350
+ })
351
+ ]
352
+ })
353
+ })
354
+ })
355
+ ]
356
+ }),
357
+ /* @__PURE__ */ jsx(Section$1, {
358
+ id: "domains",
359
+ title: "Domains",
360
+ description: /* @__PURE__ */ jsxs("p", { children: [
361
+ "The same word can mean different things in different places, so a status is looked up in its ",
362
+ /* @__PURE__ */ jsx("code", { children: "domain" }),
363
+ " first, then in ",
364
+ /* @__PURE__ */ jsx("code", { children: "generic" }),
365
+ ", then it is ",
366
+ /* @__PURE__ */ jsx("code", { children: "neutral" }),
367
+ ". An approved review is good; an approved commission is only cleared for payout. A status the registry has never heard of is neutral and shown as written, never blank."
368
+ ] }),
369
+ children: /* @__PURE__ */ jsx(Example, {
370
+ align: "start",
371
+ code: `
372
+ <StatusBadge domain="review" status="approved" />
373
+ <StatusBadge domain="commission" status="approved" />
374
+
375
+ <StatusBadge domain="payment" status="pending" />
376
+ <StatusBadge domain="payout" status="pending" />
377
+
378
+ <StatusBadge domain="payment" status="chargeback_won" />`,
379
+ children: /* @__PURE__ */ jsxs("div", {
380
+ className: "status-badge-rows",
381
+ children: [
382
+ /* @__PURE__ */ jsxs("div", {
383
+ className: "status-badge-row",
384
+ children: [/* @__PURE__ */ jsx(Captioned, {
385
+ domain: "review",
386
+ children: /* @__PURE__ */ jsx(StatusBadge, {
387
+ domain: "review",
388
+ status: "approved"
389
+ })
390
+ }), /* @__PURE__ */ jsx(Captioned, {
391
+ domain: "commission",
392
+ children: /* @__PURE__ */ jsx(StatusBadge, {
393
+ domain: "commission",
394
+ status: "approved"
395
+ })
396
+ })]
397
+ }),
398
+ /* @__PURE__ */ jsxs("div", {
399
+ className: "status-badge-row",
400
+ children: [/* @__PURE__ */ jsx(Captioned, {
401
+ domain: "payment",
402
+ children: /* @__PURE__ */ jsx(StatusBadge, {
403
+ domain: "payment",
404
+ status: "pending"
405
+ })
406
+ }), /* @__PURE__ */ jsx(Captioned, {
407
+ domain: "payout",
408
+ children: /* @__PURE__ */ jsx(StatusBadge, {
409
+ domain: "payout",
410
+ status: "pending"
411
+ })
412
+ })]
413
+ }),
414
+ /* @__PURE__ */ jsx("div", {
415
+ className: "status-badge-row",
416
+ children: /* @__PURE__ */ jsx(Captioned, {
417
+ domain: "payment",
418
+ children: /* @__PURE__ */ jsx(StatusBadge, {
419
+ domain: "payment",
420
+ status: "chargeback_won"
421
+ })
422
+ })
423
+ })
424
+ ]
425
+ })
426
+ })
427
+ }),
428
+ /* @__PURE__ */ jsx(Section$1, {
429
+ id: "statuses",
430
+ title: "Every status",
431
+ description: /* @__PURE__ */ jsxs("p", { children: [
432
+ "This is the whole registry, drawn from it, so it cannot drift. Each domain also answers for every word in",
433
+ " ",
434
+ /* @__PURE__ */ jsx("code", { children: "generic" }),
435
+ " that it does not list itself. What you pass as ",
436
+ /* @__PURE__ */ jsx("code", { children: "status" }),
437
+ " is the label in lower case with underscores (\"Partially fulfilled\" is ",
438
+ /* @__PURE__ */ jsx("code", { children: "partially_fulfilled" }),
439
+ "); where it is not, the key is written beside the badge. Hover a badge to see its key. The words are only the English default."
440
+ ] }),
441
+ children: /* @__PURE__ */ jsx(Reference, {})
442
+ }),
443
+ /* @__PURE__ */ jsxs(Section$1, {
444
+ id: "differences",
445
+ title: "Where this differs from earlier guidance",
446
+ description: /* @__PURE__ */ jsxs("p", { children: [
447
+ "The tones are the ones the vendor dashboard draws today. Where that disagrees with what the",
448
+ " ",
449
+ /* @__PURE__ */ jsx(DocLink, {
450
+ to: "/components/badge#order-statuses",
451
+ children: "Badge"
452
+ }),
453
+ " page used to say, the vendor dashboard wins, because merchants already read its colours. Every difference is here."
454
+ ] }),
455
+ children: [
456
+ /* @__PURE__ */ jsx(SubSection, {
457
+ title: "From the Badge page",
458
+ children: /* @__PURE__ */ jsx(DocTable, {
459
+ columns: [
460
+ "Status",
461
+ "Badge page said",
462
+ "Now",
463
+ "Why"
464
+ ],
465
+ rows: [
466
+ [
467
+ "Refunded, Partially refunded",
468
+ /* @__PURE__ */ jsx(Then, {
469
+ tone: "negative",
470
+ children: "Refunded"
471
+ }, "a"),
472
+ /* @__PURE__ */ jsx(Now, {
473
+ domain: "payment",
474
+ status: "refunded"
475
+ }, "b"),
476
+ "Money moving back is amber on the orders list. The order itself is negative once it is refunded (order refunded)."
477
+ ],
478
+ [
479
+ "Disputed",
480
+ /* @__PURE__ */ jsx(Then, {
481
+ tone: "negative",
482
+ children: "Disputed"
483
+ }, "a"),
484
+ /* @__PURE__ */ jsx(Now, {
485
+ domain: "payment",
486
+ status: "disputed"
487
+ }, "b"),
488
+ "The orders list draws a chargeback amber: it needs a reply, and the money is not gone yet."
489
+ ],
490
+ [
491
+ "Unfulfilled",
492
+ /* @__PURE__ */ jsx(Then, {
493
+ tone: "warning",
494
+ children: "Unfulfilled"
495
+ }, "a"),
496
+ /* @__PURE__ */ jsx(Now, {
497
+ domain: "fulfilment",
498
+ status: "unfulfilled"
499
+ }, "b"),
500
+ "The orders list and a customer's Orders tab draw it quiet. The vendor dashboard's home page still draws it amber on its latest orders, and is due to follow the orders list. The home dashboard pattern on this site mirrors the home page as it is today."
501
+ ],
502
+ [
503
+ "Cancelled order",
504
+ /* @__PURE__ */ jsx(Then, {
505
+ tone: "neutral",
506
+ children: "Cancelled"
507
+ }, "a"),
508
+ /* @__PURE__ */ jsx(Now, {
509
+ domain: "order",
510
+ status: "canceled"
511
+ }, "b"),
512
+ "The orders list draws a cancelled order red in its payment column. A cancelled return, in contrast, is neutral."
513
+ ],
514
+ [
515
+ "Draft order",
516
+ /* @__PURE__ */ jsx(Then, {
517
+ tone: "neutral",
518
+ children: "Draft"
519
+ }, "a"),
520
+ /* @__PURE__ */ jsx(Now, {
521
+ domain: "order",
522
+ status: "draft"
523
+ }, "b"),
524
+ "A draft is work waiting: the customer Orders tab and the Drafts list draw it amber."
525
+ ],
526
+ [
527
+ "Special states",
528
+ /* @__PURE__ */ jsx(Then, {
529
+ tone: "neutral",
530
+ children: "Teal is not a status"
531
+ }, "a"),
532
+ /* @__PURE__ */ jsx(Now, {
533
+ domain: "orderReturn",
534
+ status: "returned"
535
+ }, "b"),
536
+ "The vendor dashboard codes a handful of states purple. Orbit has no purple, so they draw in the accent. See below."
537
+ ]
538
+ ]
539
+ })
540
+ }),
541
+ /* @__PURE__ */ jsx(SubSection, {
542
+ title: "Purple states are accent",
543
+ description: /* @__PURE__ */ jsxs("p", { children: [
544
+ "The old page said teal is never a status. In the vendor dashboard it is, for the few states that are neither good nor bad but worth noticing, which it first coded purple. The registry draws the two in its domains in the accent:",
545
+ " ",
546
+ /* @__PURE__ */ jsx(StatusBadge, {
547
+ domain: "orderReturn",
548
+ status: "returned"
549
+ }),
550
+ " on the orders list and",
551
+ " ",
552
+ /* @__PURE__ */ jsx(StatusBadge, {
553
+ domain: "return",
554
+ status: "items_received"
555
+ }),
556
+ " on a return. Others are drawn by the vendor dashboard only, among them an accepted quote, a clicked recovery email, a part-received stock transfer, an invited activity, the App actor, a theme release in alpha, a theme purchase, the live chat's AI-handled badge, a billing item's gifted-until chip and the Blocked booking, which its bookings area then re-tones to neutral. For those, pass ",
557
+ /* @__PURE__ */ jsx("code", { children: "tone=\"accent\"" }),
558
+ " or add them to your registry. A paid, live or fulfilled status is never accent."
559
+ ] })
560
+ }),
561
+ /* @__PURE__ */ jsx(SubSection, {
562
+ title: "Words drawn two ways",
563
+ description: /* @__PURE__ */ jsxs("p", { children: [
564
+ "The same word is drawn two ways in a few places, in the vendor dashboard itself or between it and another Orbit app. The registry follows the vendor dashboard where it has an answer and its more common reading where it has two, and a host that wants the other adds it with ",
565
+ /* @__PURE__ */ jsx("code", { children: "extend" }),
566
+ "."
567
+ ] }),
568
+ children: /* @__PURE__ */ jsx(DocTable, {
569
+ columns: [
570
+ "Status",
571
+ "The registry",
572
+ "The other reading"
573
+ ],
574
+ rows: [
575
+ [
576
+ "Past due",
577
+ /* @__PURE__ */ jsx(Now, {
578
+ domain: "subscription",
579
+ status: "past_due"
580
+ }, "a"),
581
+ "Amber on the store plan card. A customer's product subscription draws it red."
582
+ ],
583
+ [
584
+ "Processing",
585
+ /* @__PURE__ */ jsx(Now, {
586
+ domain: "order",
587
+ status: "processing"
588
+ }, "a"),
589
+ "Blue on a customer's Orders tab. Company orders draw it amber."
590
+ ],
591
+ [
592
+ "Shipped",
593
+ /* @__PURE__ */ jsx(Now, {
594
+ domain: "fulfilment",
595
+ status: "shipped"
596
+ }, "a"),
597
+ "Done as a fulfilment state (the home page, work done in batches). As an order status it is blue, in company orders."
598
+ ],
599
+ [
600
+ "Pending and processing payouts",
601
+ /* @__PURE__ */ jsx(Now, {
602
+ domain: "payout",
603
+ status: "processing"
604
+ }, "a"),
605
+ "Amber for affiliate, partner and merchant payouts. The vendor dashboard's shipping settlements, which are a bill and not a payout, draw pending and processing blue."
606
+ ],
607
+ [
608
+ "Plans and licences",
609
+ /* @__PURE__ */ jsx(Now, {
610
+ domain: "subscription",
611
+ status: "expired"
612
+ }, "a"),
613
+ "Expired and frozen are neutral and cancelled is red, as on the vendor dashboard's plan card. Some plan lists drew an expired plan amber, a cancelled one grey, a past due one red and an expired licence red."
614
+ ],
615
+ [
616
+ "Open invoice",
617
+ /* @__PURE__ */ jsx(Now, {
618
+ domain: "invoice",
619
+ status: "open"
620
+ }, "a"),
621
+ "Amber in the vendor dashboard. Some invoice lists drew it blue."
622
+ ],
623
+ [
624
+ "Expired invitation",
625
+ /* @__PURE__ */ jsx(Now, {
626
+ domain: "team",
627
+ status: "expired"
628
+ }, "a"),
629
+ "Red in the vendor dashboard. Some team lists drew it grey."
630
+ ],
631
+ [
632
+ "VAT number check",
633
+ /* @__PURE__ */ jsx(Now, {
634
+ domain: "verification",
635
+ status: "unverified"
636
+ }, "a"),
637
+ "Unverified is amber and Checking quiet in the vendor dashboard. Some screens drew them red and amber."
638
+ ],
639
+ [
640
+ "Suspended",
641
+ /* @__PURE__ */ jsx(Now, {
642
+ domain: "generic",
643
+ status: "suspended"
644
+ }, "a"),
645
+ "Red for a team member, and for a supplier or a plugin suspended by an administrator. The vendor dashboard draws a suspended company or plugin amber, and an affiliate account drew it grey."
646
+ ],
647
+ [
648
+ "Completed and paused campaigns",
649
+ /* @__PURE__ */ jsx(Now, {
650
+ domain: "campaign",
651
+ status: "completed"
652
+ }, "a"),
653
+ "The vendor dashboard's campaign lists draw a completed campaign red and a paused one blue, where completed is green and paused amber everywhere else. The registry follows the vendor dashboard, so a dashboard that adopts the badge matches today. Whether a finished campaign should read as a failure is a product decision, not a kit choice, and changing the answer is one line in the registry."
654
+ ],
655
+ [
656
+ "Expired gift cards and discounts",
657
+ /* @__PURE__ */ jsx(Now, {
658
+ domain: "giftCard",
659
+ status: "expired"
660
+ }, "a"),
661
+ "Red on the vendor dashboard's gift card and discount lists, and a spent gift card is amber. Expired is not a generic word, so a status with no domain draws neutral, as an expired subscription or referral does."
662
+ ],
663
+ [
664
+ "Archived order",
665
+ /* @__PURE__ */ jsx(Now, {
666
+ domain: "order",
667
+ status: "archived"
668
+ }, "a"),
669
+ "Amber, so an archived order stands out on the orders list. In the registry any other archived is neutral, but the vendor dashboard's product list draws an archived product red: add it to your registry if you show product status."
670
+ ]
671
+ ]
672
+ })
673
+ })
674
+ ]
675
+ }),
676
+ /* @__PURE__ */ jsxs(Section$1, {
677
+ id: "extending",
678
+ title: "Adding your own",
679
+ description: /* @__PURE__ */ jsxs("p", { children: [
680
+ "A host has statuses of its own. Add them with ",
681
+ /* @__PURE__ */ jsx("code", { children: "statusRegistry.extend" }),
682
+ ", which returns a new registry: the kit's list with yours on top. Add a whole domain, a status to one of the kit's, or change a tone. Build it once, at module scope, then hand it to the components below with a provider (or pass it as the ",
683
+ /* @__PURE__ */ jsx("code", { children: "registry" }),
684
+ " prop on one badge). The kit's own registry is never changed."
685
+ ] }),
686
+ children: [
687
+ /* @__PURE__ */ jsx(Example, {
688
+ align: "start",
689
+ code: `
690
+ import { StatusBadge, StatusRegistryProvider, statusRegistry } from '@orbitcommerce/constellation'
691
+
692
+ // Once, at module scope.
693
+ const registry = statusRegistry.extend({
694
+ hosting: {
695
+ running: 'positive',
696
+ degraded: 'warning',
697
+ stopped: { tone: 'neutral', label: 'Switched off' },
698
+ },
699
+ payout: { processing: 'info' }, // change one of the kit's
700
+ })
701
+
702
+ <StatusRegistryProvider registry={registry}>
703
+ <StatusBadge domain="hosting" status="degraded" />
704
+ <StatusBadge domain="hosting" status="stopped" />
705
+ <StatusBadge domain="payout" status="processing" />
706
+ </StatusRegistryProvider>`,
707
+ children: /* @__PURE__ */ jsx(StatusRegistryProvider, {
708
+ registry: hostRegistry,
709
+ children: /* @__PURE__ */ jsxs("div", {
710
+ className: "status-badge-row",
711
+ children: [
712
+ /* @__PURE__ */ jsx(StatusBadge, {
713
+ domain: "hosting",
714
+ status: "degraded"
715
+ }),
716
+ /* @__PURE__ */ jsx(StatusBadge, {
717
+ domain: "hosting",
718
+ status: "stopped"
719
+ }),
720
+ /* @__PURE__ */ jsx(StatusBadge, {
721
+ domain: "payout",
722
+ status: "processing"
723
+ })
724
+ ]
725
+ })
726
+ })
727
+ }),
728
+ /* @__PURE__ */ jsxs(Note, {
729
+ title: "Entries and labels",
730
+ children: [
731
+ "An entry is a tone, or ",
732
+ /* @__PURE__ */ jsx("code", { children: "{ tone, label }" }),
733
+ " when the key does not read well written out. Unknown tones throw as the registry is built, so a typo is found at start-up and not as a silently grey badge. Keys are stored in lower case with underscores; ",
734
+ /* @__PURE__ */ jsx("code", { children: "createStatusRegistry" }),
735
+ " builds a registry from nothing but your own statuses. Write the statuses inline, as above, or type them ",
736
+ /* @__PURE__ */ jsx("code", { children: "satisfies StatusDefinitions" }),
737
+ " if they live in a variable, so TypeScript reads each tone as a tone and not as a string."
738
+ ]
739
+ }),
740
+ /* @__PURE__ */ jsx(SubSection, {
741
+ title: "Without a badge",
742
+ description: /* @__PURE__ */ jsxs("p", { children: [
743
+ "The registry answers on its own, for a chart key, a timeline mark or anything else that wants the same colour for the same status. Pair the tone with a ",
744
+ /* @__PURE__ */ jsx(DocLink, {
745
+ to: "/components/status-dot",
746
+ children: "StatusDot"
747
+ }),
748
+ "."
749
+ ] }),
750
+ children: /* @__PURE__ */ jsx(Example, {
751
+ align: "start",
752
+ code: `
753
+ statusRegistry.tone('payment', 'refunded') // 'warning'
754
+ statusRegistry.label('payment', 'refunded') // 'Refunded'
755
+ statusRegistry.has('payment', 'active') // false: only generic knows it
756
+ statusRegistry.statuses('commission') // [{ status: 'pending', tone: 'warning', label: 'Pending' }, ...]`,
757
+ children: /* @__PURE__ */ jsxs("p", {
758
+ className: "status-badge-note",
759
+ children: [
760
+ /* @__PURE__ */ jsx("code", { children: "payment.refunded" }),
761
+ " is ",
762
+ statusRegistry.tone("payment", "refunded"),
763
+ "."
764
+ ]
765
+ })
766
+ })
767
+ })
768
+ ]
769
+ }),
770
+ /* @__PURE__ */ jsxs(Section$1, {
771
+ id: "variants",
772
+ title: "Size, icon and pulse",
773
+ description: /* @__PURE__ */ jsxs("p", { children: [
774
+ "A status badge is a ",
775
+ /* @__PURE__ */ jsx(DocLink, {
776
+ to: "/components/badge",
777
+ children: "Badge"
778
+ }),
779
+ " underneath and takes its options: ",
780
+ /* @__PURE__ */ jsx("code", { children: "sm" }),
781
+ " ",
782
+ "(18px) for dense rows, ",
783
+ /* @__PURE__ */ jsx("code", { children: "outline" }),
784
+ " for a quiet flag beside a status, an ",
785
+ /* @__PURE__ */ jsx("code", { children: "icon" }),
786
+ ", which takes the dot's place so the pill leads with one mark, and ",
787
+ /* @__PURE__ */ jsx("code", { children: "pulse" }),
788
+ " for a state that is live right now."
789
+ ] }),
790
+ children: [/* @__PURE__ */ jsx(Example, {
791
+ align: "start",
792
+ code: `
793
+ <StatusBadge domain="payment" status="paid" size="sm" />
794
+ <StatusBadge domain="payment" status="refunded" variant="outline" />
795
+ <StatusBadge tone="warning" icon={<ClockIcon />}>Due today</StatusBadge>
796
+ <StatusBadge domain="generic" status="live" pulse />
797
+ <StatusBadge domain="payment" status="paid" dot={false} />`,
798
+ children: /* @__PURE__ */ jsxs("div", {
799
+ className: "status-badge-row",
800
+ children: [
801
+ /* @__PURE__ */ jsx(StatusBadge, {
802
+ domain: "payment",
803
+ status: "paid",
804
+ size: "sm"
805
+ }),
806
+ /* @__PURE__ */ jsx(StatusBadge, {
807
+ domain: "payment",
808
+ status: "refunded",
809
+ variant: "outline"
810
+ }),
811
+ /* @__PURE__ */ jsx(StatusBadge, {
812
+ tone: "warning",
813
+ icon: /* @__PURE__ */ jsx(ClockIcon, {}),
814
+ children: "Due today"
815
+ }),
816
+ /* @__PURE__ */ jsx(StatusBadge, {
817
+ domain: "generic",
818
+ status: "live",
819
+ pulse: true
820
+ }),
821
+ /* @__PURE__ */ jsx(StatusBadge, {
822
+ domain: "payment",
823
+ status: "paid",
824
+ dot: false
825
+ })
826
+ ]
827
+ })
828
+ }), /* @__PURE__ */ jsx(Note, {
829
+ title: "Reduced motion",
830
+ children: "Under reduced motion the pulse stops sending rings and the dot breathes in place, so a live state still looks live."
831
+ })]
832
+ }),
833
+ /* @__PURE__ */ jsx(Section$1, {
834
+ id: "long-labels",
835
+ title: "Long labels and links",
836
+ description: /* @__PURE__ */ jsxs("p", { children: [
837
+ "A label too long for its column ends in an ellipsis at the pill's end and keeps its dot, so a column of mixed states never wraps. Size table status columns to hold the longest label whole, and put a",
838
+ " ",
839
+ /* @__PURE__ */ jsx(DocLink, {
840
+ to: "/components/tooltip",
841
+ children: "Tooltip"
842
+ }),
843
+ " on a badge that may be cut. As a link, pass the child with",
844
+ " ",
845
+ /* @__PURE__ */ jsx("code", { children: "asChild" }),
846
+ "."
847
+ ] }),
848
+ children: /* @__PURE__ */ jsxs(Example, {
849
+ align: "start",
850
+ code: `
851
+ <div style={{ width: 128 }}>
852
+ <Tooltip content="Return requested by the customer">
853
+ <StatusBadge domain="orderReturn" status="requested" tabIndex={0}>Return requested by the customer</StatusBadge>
854
+ </Tooltip>
855
+ </div>
856
+
857
+ <StatusBadge asChild domain="subscription" status="trialing">
858
+ <a href="/billing">Trial ends in 3 days</a>
859
+ </StatusBadge>`,
860
+ children: [/* @__PURE__ */ jsx("div", {
861
+ className: "status-badge-narrow",
862
+ children: /* @__PURE__ */ jsx(Tooltip, {
863
+ content: "Return requested by the customer",
864
+ children: /* @__PURE__ */ jsx(StatusBadge, {
865
+ domain: "orderReturn",
866
+ status: "requested",
867
+ tabIndex: 0,
868
+ children: "Return requested by the customer"
869
+ })
870
+ })
871
+ }), /* @__PURE__ */ jsx(StatusBadge, {
872
+ asChild: true,
873
+ domain: "subscription",
874
+ status: "trialing",
875
+ children: /* @__PURE__ */ jsx("a", {
876
+ href: "#long-labels",
877
+ children: "Trial ends in 3 days"
878
+ })
879
+ })]
880
+ })
881
+ }),
882
+ /* @__PURE__ */ jsx(Section$1, {
883
+ id: "both-themes",
884
+ title: "In both themes",
885
+ description: /* @__PURE__ */ jsxs("p", { children: [
886
+ "Every tone as a status badge, as an outline and at ",
887
+ /* @__PURE__ */ jsx("code", { children: "sm" }),
888
+ ", then live, with an icon, as a link, without a dot and with a label cut short, light and dark side by side. In dark the washes deepen and the hues lift, so the words still read as ink with a colour."
889
+ ] }),
890
+ children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsxs("div", {
891
+ className: "status-badge-stack",
892
+ children: [/* @__PURE__ */ jsx(ToneMatrix, {}), /* @__PURE__ */ jsx(StateMatrix, {})]
893
+ }) })
894
+ }),
895
+ /* @__PURE__ */ jsxs(Section$1, {
896
+ id: "guidelines",
897
+ title: "Guidelines",
898
+ children: [/* @__PURE__ */ jsx(DoDont, {
899
+ do: {
900
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(StatusBadge, {
901
+ domain: "payment",
902
+ status: "refunded"
903
+ }), /* @__PURE__ */ jsx(StatusBadge, {
904
+ domain: "payment",
905
+ status: "failed"
906
+ })] }),
907
+ caption: "Money moving back is amber, and a failed charge is red, on every page."
908
+ },
909
+ dont: {
910
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(StatusBadge, {
911
+ tone: "negative",
912
+ children: "Refunded"
913
+ }), /* @__PURE__ */ jsx(StatusBadge, {
914
+ tone: "warning",
915
+ children: "Failed"
916
+ })] }),
917
+ caption: "A tone picked for each page drifts. The same status ends up in three colours."
918
+ }
919
+ }), /* @__PURE__ */ jsx(Guidelines, { items: [
920
+ /* @__PURE__ */ jsxs(Fragment, { children: [
921
+ "Pass the status the API sends as ",
922
+ /* @__PURE__ */ jsx("code", { children: "status" }),
923
+ ", and translate with children. Do not map statuses to words and tones in your own component."
924
+ ] }),
925
+ "A status the registry lacks belongs in your registry, with extend, not in a local map beside the page.",
926
+ "One status per column. A row can carry a payment badge and a fulfilment badge, each in its own column.",
927
+ "Sentence case, one or two words. Never all caps.",
928
+ /* @__PURE__ */ jsxs(Fragment, { children: [
929
+ "Pulse only for live states. To filter by status, use a ",
930
+ /* @__PURE__ */ jsx(DocLink, {
931
+ to: "/components/chip",
932
+ children: "Chip"
933
+ }),
934
+ " or a segmented control: a badge is a label, not a control."
935
+ ] })
936
+ ] })]
937
+ }),
938
+ /* @__PURE__ */ jsx(Section$1, {
939
+ id: "accessibility",
940
+ title: "Accessibility",
941
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
942
+ "Renders a plain span. The words carry the status; the dot is hidden from assistive tech, and colour is never the only signal.",
943
+ "A label cut short by its column is still read in full by a screen reader. Give the badge a tooltip, and tabIndex 0 so keyboard users can reach it.",
944
+ "As a link (asChild) the badge is a link: it takes the focus ring and its name is the label.",
945
+ "The tones hold AA contrast in both themes. Under reduced motion the pulse breathes instead of transmitting."
946
+ ] })
947
+ }),
948
+ /* @__PURE__ */ jsxs(Section$1, {
949
+ id: "props",
950
+ title: "Props",
951
+ description: /* @__PURE__ */ jsx("p", { children: "Also accepts every native span attribute." }),
952
+ children: [/* @__PURE__ */ jsx(PropsTable, { rows: [
953
+ {
954
+ name: "status",
955
+ type: "string | null",
956
+ description: /* @__PURE__ */ jsx(Fragment, { children: "The status as the API names it. Looked up for its tone, and written out as the label when there are no children." })
957
+ },
958
+ {
959
+ name: "domain",
960
+ type: "StatusDomain",
961
+ default: "'generic'",
962
+ description: "Which part of the registry to read. See Every status."
963
+ },
964
+ {
965
+ name: "registry",
966
+ type: "StatusRegistry",
967
+ description: "A registry with the host's own statuses. Defaults to the nearest provider's, then the kit's."
968
+ },
969
+ {
970
+ name: "tone",
971
+ type: "'neutral' | 'accent' | 'positive' | 'negative' | 'warning' | 'info'",
972
+ description: "Wins over the lookup. For a one-off that is not a status in any registry."
973
+ },
974
+ {
975
+ name: "variant",
976
+ type: "'subtle' | 'outline'",
977
+ default: "'subtle'",
978
+ description: "A tinted pill, or a hairline ring for a quiet flag beside a status."
979
+ },
980
+ {
981
+ name: "size",
982
+ type: "'sm' | 'md'",
983
+ default: "'md'",
984
+ description: "18px with 11px text, or 22px with 12px text."
985
+ },
986
+ {
987
+ name: "dot",
988
+ type: "boolean",
989
+ default: "true, false with an icon",
990
+ description: "The tone dot before the label. A status always has a mark: the dot, unless turned off or an icon takes its place."
991
+ },
992
+ {
993
+ name: "pulse",
994
+ type: "boolean",
995
+ default: "false",
996
+ description: "The dot sends out a ring on a loop. Live states only. Implies dot."
997
+ },
998
+ {
999
+ name: "icon",
1000
+ type: "ReactNode",
1001
+ description: "Leading icon, in the dot's place. Decorative."
1002
+ },
1003
+ {
1004
+ name: "asChild",
1005
+ type: "boolean",
1006
+ default: "false",
1007
+ description: "Render the child element (a link or a button) as the badge, with its content as the label."
1008
+ },
1009
+ {
1010
+ name: "children",
1011
+ type: "ReactNode",
1012
+ description: "The label, translated. Defaults to the status written out in English."
1013
+ }
1014
+ ] }), /* @__PURE__ */ jsx(PropsTable, {
1015
+ title: "The registry",
1016
+ rows: [
1017
+ {
1018
+ name: "statusRegistry.tone(domain, status)",
1019
+ type: "StatusTone",
1020
+ description: "The tone: the domain, then generic, then neutral."
1021
+ },
1022
+ {
1023
+ name: "statusRegistry.label(domain, status)",
1024
+ type: "string",
1025
+ description: "The entry's label, or the status written out in sentence case with UK spelling."
1026
+ },
1027
+ {
1028
+ name: "statusRegistry.has(domain, status)",
1029
+ type: "boolean",
1030
+ description: "Whether the domain itself lists the status."
1031
+ },
1032
+ {
1033
+ name: "statusRegistry.domains()",
1034
+ type: "string[]",
1035
+ description: "Every domain, in the order they were declared."
1036
+ },
1037
+ {
1038
+ name: "statusRegistry.statuses(domain)",
1039
+ type: "StatusInfo[]",
1040
+ description: "The statuses a domain lists: key, tone and label."
1041
+ },
1042
+ {
1043
+ name: "statusRegistry.extend(extra)",
1044
+ type: "StatusRegistry",
1045
+ description: "A new registry with more statuses on top. The original is untouched."
1046
+ },
1047
+ {
1048
+ name: "useStatusRegistry()",
1049
+ type: "StatusRegistry",
1050
+ description: "The registry in force where it is called: the nearest StatusRegistryProvider's, or the kit's. StatusBadge, StatusDot and TimelineItem read it the same way."
1051
+ },
1052
+ {
1053
+ name: "createStatusRegistry(definitions)",
1054
+ type: "StatusRegistry",
1055
+ description: "A registry from nothing but the statuses you give it: none of the kit's."
1056
+ },
1057
+ {
1058
+ name: "normaliseStatus(status)",
1059
+ type: "string",
1060
+ description: "The key a status is stored under: lower case, underscores, cancelled spelled canceled."
1061
+ },
1062
+ {
1063
+ name: "humaniseStatus(status)",
1064
+ type: "string",
1065
+ description: "A key written out for people: awaiting_payment becomes Awaiting payment."
1066
+ }
1067
+ ]
1068
+ })]
1069
+ })
1070
+ ]
1071
+ });
1072
+ }
1073
+ //#endregion
1074
+ export { Page, Preview };