@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,904 @@
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 { useState } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Alert, Badge, Button, Link, Progress, SegmentedControl, progressTone } from "@orbitcommerce/constellation";
7
+ //#region src/pages/components/progress.tsx
8
+ function Preview() {
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: "progress-preview",
11
+ children: [
12
+ /* @__PURE__ */ jsx(Progress, {
13
+ label: "Import",
14
+ valueLabel: true,
15
+ size: "sm",
16
+ value: 72
17
+ }),
18
+ /* @__PURE__ */ jsx(Progress, {
19
+ label: "Storage",
20
+ valueLabel: "42 of 50 GB",
21
+ value: 42,
22
+ max: 50,
23
+ thresholds: true
24
+ }),
25
+ /* @__PURE__ */ jsx(Progress, {
26
+ label: "Setup",
27
+ valueLabel: "100%",
28
+ value: 100,
29
+ tone: "positive",
30
+ size: "sm"
31
+ })
32
+ ]
33
+ });
34
+ }
35
+ /** One bar that fills when you press the button, so the glide to a new value can be seen. */
36
+ function Advance() {
37
+ const [value, setValue] = useState(42);
38
+ return /* @__PURE__ */ jsxs("div", {
39
+ className: "progress-demo",
40
+ children: [/* @__PURE__ */ jsx(Progress, {
41
+ label: "Importing products",
42
+ valueLabel: true,
43
+ size: "md",
44
+ value
45
+ }), /* @__PURE__ */ jsxs("div", {
46
+ className: "progress-demo__row",
47
+ children: [/* @__PURE__ */ jsx(Button, {
48
+ size: "sm",
49
+ variant: "secondary",
50
+ onClick: () => setValue((now) => Math.min(100, now + 15)),
51
+ disabled: value >= 100,
52
+ children: "Add 15%"
53
+ }), /* @__PURE__ */ jsx(Button, {
54
+ size: "sm",
55
+ variant: "ghost",
56
+ onClick: () => setValue(0),
57
+ disabled: value === 0,
58
+ children: "Reset"
59
+ })]
60
+ })]
61
+ });
62
+ }
63
+ var TONES = [
64
+ "accent",
65
+ "neutral",
66
+ "positive",
67
+ "warning",
68
+ "negative",
69
+ "info"
70
+ ];
71
+ var capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
72
+ /** What a plan allows and what a store has used, as the settings page shows it. */
73
+ var METERS = [
74
+ {
75
+ key: "products",
76
+ label: "Products",
77
+ used: 37,
78
+ limit: 100,
79
+ unit: "products"
80
+ },
81
+ {
82
+ key: "storage",
83
+ label: "Storage",
84
+ used: 42.5,
85
+ limit: 50,
86
+ unit: "GB"
87
+ },
88
+ {
89
+ key: "staff",
90
+ label: "Staff accounts",
91
+ used: 5,
92
+ limit: 5,
93
+ unit: "accounts"
94
+ }
95
+ ];
96
+ function badgeFor(used, limit) {
97
+ const tone = progressTone(used, limit);
98
+ if (tone === "negative") return /* @__PURE__ */ jsx(Badge, {
99
+ tone: "negative",
100
+ size: "sm",
101
+ children: "Limit reached"
102
+ });
103
+ if (tone === "warning") return /* @__PURE__ */ jsx(Badge, {
104
+ tone: "warning",
105
+ size: "sm",
106
+ children: "Approaching limit"
107
+ });
108
+ return null;
109
+ }
110
+ function UsageMeters() {
111
+ return /* @__PURE__ */ jsx("div", {
112
+ className: "progress-demo__stack",
113
+ children: METERS.map((meter) => /* @__PURE__ */ jsxs("div", {
114
+ className: "progress-demo__usage",
115
+ children: [/* @__PURE__ */ jsx(Progress, {
116
+ label: meter.label,
117
+ valueLabel: `${meter.used} of ${meter.limit} ${meter.unit}`,
118
+ value: meter.used,
119
+ max: meter.limit,
120
+ thresholds: true
121
+ }), /* @__PURE__ */ jsx("span", {
122
+ className: "progress-demo__badge",
123
+ children: badgeFor(meter.used, meter.limit)
124
+ })]
125
+ }, meter.key))
126
+ });
127
+ }
128
+ function Processing() {
129
+ const [phase, setPhase] = useState("processing");
130
+ return /* @__PURE__ */ jsxs("div", {
131
+ className: "progress-demo",
132
+ children: [/* @__PURE__ */ jsx(SegmentedControl, {
133
+ "aria-label": "Phase",
134
+ size: "sm",
135
+ value: phase,
136
+ onValueChange: setPhase,
137
+ options: [
138
+ {
139
+ value: "uploading",
140
+ label: "Uploading"
141
+ },
142
+ {
143
+ value: "processing",
144
+ label: "Processing"
145
+ },
146
+ {
147
+ value: "done",
148
+ label: "Done"
149
+ }
150
+ ]
151
+ }), /* @__PURE__ */ jsx("div", {
152
+ className: "progress-demo__column",
153
+ children: /* @__PURE__ */ jsx(Progress, {
154
+ label: "oak-side-table-photos.zip",
155
+ valueLabel: phase === "uploading" ? true : phase === "done" ? "Done" : "Processing on the server",
156
+ value: phase === "uploading" ? 64 : phase === "done" ? 100 : void 0,
157
+ tone: phase === "done" ? "positive" : "accent",
158
+ valueText: phase === "processing" ? "Processing on the server" : void 0,
159
+ size: "sm"
160
+ })
161
+ })]
162
+ });
163
+ }
164
+ var STRENGTH = [
165
+ {
166
+ level: 1,
167
+ label: "Very weak",
168
+ tone: "negative"
169
+ },
170
+ {
171
+ level: 2,
172
+ label: "Weak",
173
+ tone: "negative"
174
+ },
175
+ {
176
+ level: 3,
177
+ label: "Fair",
178
+ tone: "warning"
179
+ },
180
+ {
181
+ level: 4,
182
+ label: "Strong",
183
+ tone: "positive"
184
+ },
185
+ {
186
+ level: 5,
187
+ label: "Very strong",
188
+ tone: "positive"
189
+ }
190
+ ];
191
+ function Matrix() {
192
+ return /* @__PURE__ */ jsxs("div", {
193
+ className: "progress-demo__matrix",
194
+ children: [
195
+ TONES.map((tone) => /* @__PURE__ */ jsx(Progress, {
196
+ label: capitalise(tone),
197
+ valueLabel: true,
198
+ value: 64,
199
+ tone
200
+ }, tone)),
201
+ /* @__PURE__ */ jsx(Progress, {
202
+ label: "Small",
203
+ valueLabel: true,
204
+ size: "sm",
205
+ value: 30
206
+ }),
207
+ /* @__PURE__ */ jsx(Progress, {
208
+ label: "Large",
209
+ valueLabel: true,
210
+ size: "lg",
211
+ value: 70
212
+ }),
213
+ /* @__PURE__ */ jsx(Progress, {
214
+ label: "Storage",
215
+ valueLabel: "42.5 of 50 GB",
216
+ description: "Resets on 1 November",
217
+ value: 42.5,
218
+ max: 50,
219
+ thresholds: true
220
+ }),
221
+ /* @__PURE__ */ jsx(Progress, {
222
+ label: "Staff accounts",
223
+ valueLabel: "5 of 5 accounts",
224
+ value: 5,
225
+ max: 5,
226
+ thresholds: true
227
+ }),
228
+ /* @__PURE__ */ jsx(Progress, {
229
+ label: "Processing",
230
+ valueLabel: "Processing on the server"
231
+ }),
232
+ /* @__PURE__ */ jsx(Progress, {
233
+ label: "Not measured",
234
+ valueLabel: "Not measured",
235
+ value: 0,
236
+ tone: "neutral",
237
+ valueText: "Not measured"
238
+ }),
239
+ /* @__PURE__ */ jsx(Progress, {
240
+ "aria-label": "No label",
241
+ value: 55
242
+ })
243
+ ]
244
+ });
245
+ }
246
+ var code = (value) => /* @__PURE__ */ jsx("code", { children: value });
247
+ function Page() {
248
+ return /* @__PURE__ */ jsxs(DocPage, {
249
+ title: "Progress",
250
+ status: "new",
251
+ importNames: ["Progress", "progressTone"],
252
+ lead: "A thin bar for how far along something is (an upload, an import, a setup guide) or how full something is (storage, a plan's allowance). One component for every bar and usage meter in a dashboard: a pill track, a pill fill, and a name and a value a screen reader can read.",
253
+ children: [
254
+ /* @__PURE__ */ jsxs(Section$1, {
255
+ id: "basics",
256
+ title: "Basics",
257
+ description: /* @__PURE__ */ jsxs("p", { children: [
258
+ "Give it a ",
259
+ /* @__PURE__ */ jsx("code", { children: "value" }),
260
+ " out of ",
261
+ /* @__PURE__ */ jsx("code", { children: "max" }),
262
+ " (100 unless you say) and a ",
263
+ /* @__PURE__ */ jsx("code", { children: "label" }),
264
+ ". ",
265
+ /* @__PURE__ */ jsx("code", { children: "valueLabel" }),
266
+ " writes the figure at the end of the label's line: ",
267
+ /* @__PURE__ */ jsx("code", { children: "true" }),
268
+ " for the percentage, or any text (\"37 of 100 products\"). The bar glides to a new value; press the button to see it."
269
+ ] }),
270
+ children: [/* @__PURE__ */ jsx(Example, {
271
+ align: "fill",
272
+ code: `
273
+ <Progress label="Importing products" valueLabel value={42} />
274
+
275
+ // Out of something other than 100:
276
+ <Progress label="Setup" valueLabel="3 of 7 tasks" value={3} max={7} />`,
277
+ children: /* @__PURE__ */ jsx("div", {
278
+ className: "progress-demo__column",
279
+ children: /* @__PURE__ */ jsx(Advance, {})
280
+ })
281
+ }), /* @__PURE__ */ jsxs(Note, {
282
+ title: "Always name it",
283
+ children: [
284
+ "A bar with no name is a bar a screen reader cannot describe, so it is a type error: pass a visible ",
285
+ /* @__PURE__ */ jsx("code", { children: "label" }),
286
+ ", an",
287
+ " ",
288
+ /* @__PURE__ */ jsx("code", { children: "aria-label" }),
289
+ " when the words are elsewhere, or an ",
290
+ /* @__PURE__ */ jsx("code", { children: "aria-labelledby" }),
291
+ ". The figure and the description are optional; the name is not."
292
+ ]
293
+ })]
294
+ }),
295
+ /* @__PURE__ */ jsx(Section$1, {
296
+ id: "sizes",
297
+ title: "Sizes",
298
+ description: /* @__PURE__ */ jsxs("p", { children: [
299
+ /* @__PURE__ */ jsx("code", { children: "md" }),
300
+ " (default) is 6px, the thickness of the vendor dashboard's usage meters. ",
301
+ /* @__PURE__ */ jsx("code", { children: "sm" }),
302
+ " is 4px, for the thin readiness and step lines that sit between text. ",
303
+ /* @__PURE__ */ jsx("code", { children: "lg" }),
304
+ " is 8px, for a bar that is the point of its card."
305
+ ] }),
306
+ children: /* @__PURE__ */ jsx(Example, {
307
+ align: "fill",
308
+ code: `
309
+ <Progress label="Small" valueLabel size="sm" value={30} />
310
+ <Progress label="Medium" valueLabel size="md" value={60} />
311
+ <Progress label="Large" valueLabel size="lg" value={90} />`,
312
+ children: /* @__PURE__ */ jsxs("div", {
313
+ className: "progress-demo__column progress-demo__stack",
314
+ children: [
315
+ /* @__PURE__ */ jsx(Progress, {
316
+ label: "Small, 4px",
317
+ valueLabel: true,
318
+ size: "sm",
319
+ value: 30
320
+ }),
321
+ /* @__PURE__ */ jsx(Progress, {
322
+ label: "Medium, 6px",
323
+ valueLabel: true,
324
+ size: "md",
325
+ value: 60
326
+ }),
327
+ /* @__PURE__ */ jsx(Progress, {
328
+ label: "Large, 8px",
329
+ valueLabel: true,
330
+ size: "lg",
331
+ value: 90
332
+ })
333
+ ]
334
+ })
335
+ })
336
+ }),
337
+ /* @__PURE__ */ jsx(Section$1, {
338
+ id: "tone",
339
+ title: "Tone",
340
+ description: /* @__PURE__ */ jsxs("p", { children: [
341
+ "The fill is the ",
342
+ /* @__PURE__ */ jsx("code", { children: "accent" }),
343
+ " by default. ",
344
+ /* @__PURE__ */ jsx("code", { children: "positive" }),
345
+ " is done, ",
346
+ /* @__PURE__ */ jsx("code", { children: "warning" }),
347
+ " and ",
348
+ /* @__PURE__ */ jsx("code", { children: "negative" }),
349
+ " are a bar that is nearly full or has failed, ",
350
+ /* @__PURE__ */ jsx("code", { children: "neutral" }),
351
+ " is a bar with nothing to show, and ",
352
+ /* @__PURE__ */ jsx("code", { children: "info" }),
353
+ " is a note. Only the bar takes the colour: the words stay ink."
354
+ ] }),
355
+ children: /* @__PURE__ */ jsx(Example, {
356
+ align: "fill",
357
+ code: `<Progress label="Uploaded" valueLabel value={100} tone="positive" />
358
+ <Progress label="Failed" valueLabel value={64} tone="negative" />`,
359
+ children: /* @__PURE__ */ jsx("div", {
360
+ className: "progress-demo__column progress-demo__stack",
361
+ children: TONES.map((tone) => /* @__PURE__ */ jsx(Progress, {
362
+ label: capitalise(tone),
363
+ valueLabel: true,
364
+ value: 64,
365
+ tone,
366
+ size: "sm"
367
+ }, tone))
368
+ })
369
+ })
370
+ }),
371
+ /* @__PURE__ */ jsxs(Section$1, {
372
+ id: "usage",
373
+ title: "Usage meters",
374
+ description: /* @__PURE__ */ jsxs("p", { children: [
375
+ "For a meter, where fuller is worse, add ",
376
+ /* @__PURE__ */ jsx("code", { children: "thresholds" }),
377
+ ": the bar turns ",
378
+ /* @__PURE__ */ jsx("code", { children: "warning" }),
379
+ " from 80% and",
380
+ " ",
381
+ /* @__PURE__ */ jsx("code", { children: "negative" }),
382
+ " at 100%, the same everywhere in a product. Pass ",
383
+ /* @__PURE__ */ jsx("code", { children: "{ warning, negative }" }),
384
+ " for other numbers. ",
385
+ /* @__PURE__ */ jsx("code", { children: "progressTone(used, limit)" }),
386
+ " is the same rule as a function, so a badge beside the meter (\"Approaching limit\", \"Limit reached\") never disagrees with the bar. An allowance with no limit draws no bar at all: say \"Unlimited\" and stop. A step you leave ",
387
+ /* @__PURE__ */ jsx("code", { children: "undefined" }),
388
+ " (an optional prop passed on) keeps its 80 or 100."
389
+ ] }),
390
+ children: [
391
+ /* @__PURE__ */ jsx(Example, {
392
+ align: "fill",
393
+ code: `
394
+ <Progress label="Products" valueLabel="37 of 100 products" value={37} max={100} thresholds />
395
+ <Progress label="Storage" valueLabel="42.5 of 50 GB" value={42.5} max={50} thresholds />
396
+ <Progress label="Staff accounts" valueLabel="5 of 5 accounts" value={5} max={5} thresholds />
397
+
398
+ // The same rule for a badge:
399
+ progressTone(42.5, 50) // 'warning'`,
400
+ children: /* @__PURE__ */ jsx("div", {
401
+ className: "progress-demo__column",
402
+ children: /* @__PURE__ */ jsx(UsageMeters, {})
403
+ })
404
+ }),
405
+ /* @__PURE__ */ jsxs(Note, {
406
+ title: "The bar and the function default opposite ways",
407
+ children: [
408
+ "The bar applies no thresholds unless you ask (",
409
+ /* @__PURE__ */ jsx("code", { children: "thresholds" }),
410
+ "), because most progress is not a warning. The function applies them unless you pass ",
411
+ /* @__PURE__ */ jsx("code", { children: "thresholds: false" }),
412
+ ". A badge beside a meter must be given the same intent as the meter: a meter with ",
413
+ /* @__PURE__ */ jsx("code", { children: "thresholds" }),
414
+ " and a badge from ",
415
+ /* @__PURE__ */ jsx("code", { children: "progressTone(used, limit)" }),
416
+ " agree; a meter without it and that badge do not, and the page shows \"Approaching limit\" over an accent bar."
417
+ ]
418
+ }),
419
+ /* @__PURE__ */ jsxs(Note, {
420
+ title: "Fuller is not always worse",
421
+ children: [
422
+ "An upload at 85% is not a warning, so ",
423
+ /* @__PURE__ */ jsx("code", { children: "thresholds" }),
424
+ " is off by default. Turn it on for meters of an allowance, a quota or a limit."
425
+ ]
426
+ })
427
+ ]
428
+ }),
429
+ /* @__PURE__ */ jsx(Section$1, {
430
+ id: "unlimited",
431
+ title: "No limit",
432
+ description: /* @__PURE__ */ jsxs("p", { children: [
433
+ /* @__PURE__ */ jsxs("code", { children: ["max=", "{null}"] }),
434
+ " is a meter with no limit: a plan with unlimited seats or stores. The track is informational, in the hairline's tone and with no fill, the thresholds never apply, and ",
435
+ /* @__PURE__ */ jsx("code", { children: "valueLabel" }),
436
+ " and what a screen reader hears say the count against no limit (\"3 of unlimited\", your words with ",
437
+ /* @__PURE__ */ jsx("code", { children: "unlimitedLabel" }),
438
+ "). A meter that is full can carry an ",
439
+ /* @__PURE__ */ jsx("code", { children: "action" }),
440
+ " at the end of its line, such as the link to a bigger plan."
441
+ ] }),
442
+ children: /* @__PURE__ */ jsx(Example, {
443
+ align: "fill",
444
+ code: `
445
+ <Progress label="Seats" valueLabel value={3} max={null} description="Your agency plan has no seat limit." />
446
+
447
+ <Progress
448
+ label="Stores"
449
+ valueLabel="10 of 10"
450
+ value={10}
451
+ max={10}
452
+ thresholds
453
+ description="Every store slot is in use."
454
+ action={<Link href="/billing" size="xs" tone="ink">Upgrade</Link>}
455
+ />`,
456
+ children: /* @__PURE__ */ jsxs("div", {
457
+ className: "progress-demo__stack",
458
+ children: [/* @__PURE__ */ jsx(Progress, {
459
+ label: "Seats",
460
+ valueLabel: true,
461
+ value: 3,
462
+ max: null,
463
+ description: "Your agency plan has no seat limit."
464
+ }), /* @__PURE__ */ jsx(Progress, {
465
+ label: "Stores",
466
+ valueLabel: "10 of 10",
467
+ value: 10,
468
+ max: 10,
469
+ thresholds: true,
470
+ description: "Every store slot is in use.",
471
+ action: /* @__PURE__ */ jsx(Link, {
472
+ href: "#unlimited",
473
+ size: "xs",
474
+ tone: "ink",
475
+ children: "Upgrade"
476
+ })
477
+ })]
478
+ })
479
+ })
480
+ }),
481
+ /* @__PURE__ */ jsx(Section$1, {
482
+ id: "indeterminate",
483
+ title: "Indeterminate",
484
+ description: /* @__PURE__ */ jsxs("p", { children: [
485
+ "Leave out ",
486
+ /* @__PURE__ */ jsx("code", { children: "value" }),
487
+ " when you cannot say how far along it is: a server processing a file it has fully received, a job with no progress report. A segment sweeps along the track, and a screen reader hears no number. Under reduced motion the whole bar pulses softly instead."
488
+ ] }),
489
+ children: /* @__PURE__ */ jsx(Example, {
490
+ align: "fill",
491
+ code: `
492
+ <Progress label="oak-side-table-photos.zip" valueLabel={isProcessing ? 'Processing on the server' : true} value={isProcessing ? undefined : percent} />`,
493
+ children: /* @__PURE__ */ jsx(Processing, {})
494
+ })
495
+ }),
496
+ /* @__PURE__ */ jsx(Section$1, {
497
+ id: "words",
498
+ title: "Words for a screen reader",
499
+ description: /* @__PURE__ */ jsxs("p", { children: [
500
+ "The progressbar announces its value from ",
501
+ /* @__PURE__ */ jsx("code", { children: "valueText" }),
502
+ ": \"37 of 100 products\", \"Not measured\". It defaults to your",
503
+ " ",
504
+ /* @__PURE__ */ jsx("code", { children: "valueLabel" }),
505
+ " when that is a plain string, and to the percentage otherwise, so a figure made of elements needs a",
506
+ " ",
507
+ /* @__PURE__ */ jsx("code", { children: "valueText" }),
508
+ " of its own. The visible figure is hidden from assistive tech, so it is not read twice. A bar with no measurement is a bar with a value of 0, a neutral tone and a ",
509
+ /* @__PURE__ */ jsx("code", { children: "valueText" }),
510
+ " that says so."
511
+ ] }),
512
+ children: /* @__PURE__ */ jsx(Example, {
513
+ align: "fill",
514
+ code: `
515
+ <Progress label="Bandwidth" valueLabel="Not measured" value={0} tone="neutral" valueText="Not measured" description="Not measured since 9 October" />
516
+
517
+ <Progress aria-label="Storage" valueText="12.4 of 50 GB used" value={12.4} max={50} />`,
518
+ children: /* @__PURE__ */ jsxs("div", {
519
+ className: "progress-demo__column progress-demo__stack",
520
+ children: [/* @__PURE__ */ jsx(Progress, {
521
+ label: "Bandwidth",
522
+ valueLabel: "Not measured",
523
+ value: 0,
524
+ tone: "neutral",
525
+ valueText: "Not measured",
526
+ description: "Not measured since 9 October"
527
+ }), /* @__PURE__ */ jsx(Progress, {
528
+ "aria-label": "Storage",
529
+ valueText: "12.4 of 50 GB used",
530
+ value: 12.4,
531
+ max: 50,
532
+ description: "12.4 of 50 GB used"
533
+ })]
534
+ })
535
+ })
536
+ }),
537
+ /* @__PURE__ */ jsxs(Section$1, {
538
+ id: "recipes",
539
+ title: "Recipes",
540
+ description: /* @__PURE__ */ jsx("p", { children: "The bars a dashboard hand-builds today, as this component." }),
541
+ children: [
542
+ /* @__PURE__ */ jsx(SubSection, {
543
+ title: "Step 2 of 4",
544
+ description: /* @__PURE__ */ jsx("p", { children: "A wizard's place in it. The label says the step and the figure says how much of the journey is done." }),
545
+ children: /* @__PURE__ */ jsx(Example, {
546
+ align: "fill",
547
+ code: `<Progress size="sm" label="Step 2 of 4" valueLabel="50% complete" value={2} max={4} />`,
548
+ children: /* @__PURE__ */ jsx("div", {
549
+ className: "progress-demo__column",
550
+ children: /* @__PURE__ */ jsx(Progress, {
551
+ size: "sm",
552
+ label: "Step 2 of 4",
553
+ valueLabel: "50% complete",
554
+ value: 2,
555
+ max: 4
556
+ })
557
+ })
558
+ })
559
+ }),
560
+ /* @__PURE__ */ jsx(SubSection, {
561
+ title: "An upload",
562
+ description: /* @__PURE__ */ jsx("p", { children: "The file's name as the label and the percentage as the figure; the tone says how it ended." }),
563
+ children: /* @__PURE__ */ jsx(Example, {
564
+ align: "fill",
565
+ code: `
566
+ <Progress size="sm" label="oak-side-table.jpg" valueLabel value={62} />
567
+ <Progress size="sm" label="brass-hook.jpg" valueLabel="Uploaded" value={100} tone="positive" />
568
+ <Progress size="sm" label="linen-cushion.jpg" valueLabel="Failed" value={38} tone="negative" />`,
569
+ children: /* @__PURE__ */ jsxs("div", {
570
+ className: "progress-demo__column progress-demo__stack",
571
+ children: [
572
+ /* @__PURE__ */ jsx(Progress, {
573
+ size: "sm",
574
+ label: "oak-side-table.jpg",
575
+ valueLabel: true,
576
+ value: 62
577
+ }),
578
+ /* @__PURE__ */ jsx(Progress, {
579
+ size: "sm",
580
+ label: "brass-hook.jpg",
581
+ valueLabel: "Uploaded",
582
+ value: 100,
583
+ tone: "positive"
584
+ }),
585
+ /* @__PURE__ */ jsx(Progress, {
586
+ size: "sm",
587
+ label: "linen-cushion.jpg",
588
+ valueLabel: "Failed",
589
+ value: 38,
590
+ tone: "negative"
591
+ })
592
+ ]
593
+ })
594
+ })
595
+ }),
596
+ /* @__PURE__ */ jsx(SubSection, {
597
+ title: "Password strength",
598
+ description: /* @__PURE__ */ jsx("p", { children: "Five levels of one bar. The level is the value, the words are the figure, the tone follows the level." }),
599
+ children: /* @__PURE__ */ jsx(Example, {
600
+ align: "fill",
601
+ code: `<Progress size="md" label="Password strength" valueLabel="Fair" value={3} max={5} tone="warning" />`,
602
+ children: /* @__PURE__ */ jsx("div", {
603
+ className: "progress-demo__column progress-demo__stack",
604
+ children: STRENGTH.filter((each) => each.level === 1 || each.level === 3 || each.level === 5).map((each) => /* @__PURE__ */ jsx(Progress, {
605
+ label: "Password strength",
606
+ valueLabel: each.label,
607
+ value: each.level,
608
+ max: 5,
609
+ tone: each.tone
610
+ }, each.level))
611
+ })
612
+ })
613
+ }),
614
+ /* @__PURE__ */ jsx(SubSection, {
615
+ title: "In a notice",
616
+ description: /* @__PURE__ */ jsx("p", { children: "A bar with no label, inside an alert that already says what it is about." }),
617
+ children: /* @__PURE__ */ jsx(Example, {
618
+ align: "fill",
619
+ code: `
620
+ <Alert tone="warning">
621
+ You have used 94% of your storage.
622
+ <Progress aria-label="Storage used" size="sm" value={94} thresholds tone="warning" />
623
+ </Alert>`,
624
+ children: /* @__PURE__ */ jsx("div", {
625
+ className: "progress-demo__column",
626
+ children: /* @__PURE__ */ jsxs(Alert, {
627
+ tone: "warning",
628
+ children: ["You have used 94% of your storage.", /* @__PURE__ */ jsx("div", {
629
+ className: "progress-demo__in-notice",
630
+ children: /* @__PURE__ */ jsx(Progress, {
631
+ "aria-label": "Storage used",
632
+ size: "sm",
633
+ value: 94,
634
+ thresholds: true,
635
+ tone: "warning"
636
+ })
637
+ })]
638
+ })
639
+ })
640
+ })
641
+ })
642
+ ]
643
+ }),
644
+ /* @__PURE__ */ jsx(Section$1, {
645
+ id: "both-themes",
646
+ title: "In both themes",
647
+ description: /* @__PURE__ */ jsx("p", { children: "Every tone, the three thicknesses, a meter at a limit, an indeterminate bar, a bar with nothing to measure and one with no label." }),
648
+ children: /* @__PURE__ */ jsx(ThemePair, {
649
+ align: "fill",
650
+ children: /* @__PURE__ */ jsx(Matrix, {})
651
+ })
652
+ }),
653
+ /* @__PURE__ */ jsxs(Section$1, {
654
+ id: "guidelines",
655
+ title: "Guidelines",
656
+ children: [
657
+ /* @__PURE__ */ jsx(DoDont, {
658
+ do: {
659
+ children: /* @__PURE__ */ jsx("div", {
660
+ className: "progress-demo__dodont",
661
+ children: /* @__PURE__ */ jsx(Progress, {
662
+ label: "Storage",
663
+ valueLabel: "50 of 50 GB",
664
+ value: 50,
665
+ max: 50,
666
+ thresholds: true
667
+ })
668
+ }),
669
+ caption: "The words stay ink. The bar carries the strain, and a badge beside it can say what it means."
670
+ },
671
+ dont: {
672
+ children: /* @__PURE__ */ jsx("div", {
673
+ className: "progress-demo__dodont progress-demo__red",
674
+ children: /* @__PURE__ */ jsx(Progress, {
675
+ label: "Storage",
676
+ valueLabel: "50 of 50 GB",
677
+ value: 50,
678
+ max: 50,
679
+ thresholds: true
680
+ })
681
+ }),
682
+ caption: "Red words as well as a red bar. The colour is said twice, and the number is harder to read."
683
+ }
684
+ }),
685
+ /* @__PURE__ */ jsx(DocTable, {
686
+ columns: ["Reach for", "When"],
687
+ rows: [
688
+ [code("Progress"), "How far along, or how full, with a number: an upload, an import, a plan allowance."],
689
+ [/* @__PURE__ */ jsx(DocLink, {
690
+ to: "/components/progress-ring",
691
+ children: "ProgressRing"
692
+ }), "The same, as a circle, where there is no room for a bar: a sidebar entry, a card head."],
693
+ [/* @__PURE__ */ jsx(DocLink, {
694
+ to: "/components/status-checklist",
695
+ children: "StatusChecklist"
696
+ }), "The steps behind the number, each with its own state."],
697
+ [/* @__PURE__ */ jsx(DocLink, {
698
+ to: "/components/orbit-spinner",
699
+ children: "OrbitSpinner"
700
+ }), "A short wait with nothing to measure, where a bar would sit still."]
701
+ ]
702
+ }),
703
+ /* @__PURE__ */ jsx(Guidelines, { items: [
704
+ "Show a bar for something that takes more than a second or two. Anything shorter should just finish.",
705
+ "Name what it measures (\"Storage\", \"Importing products\"). The figure says how much of it.",
706
+ "Keep the figure in ink and let the bar change colour. A badge beside the meter can say what the colour means.",
707
+ "Draw no bar for an allowance with no limit. Say \"Unlimited\".",
708
+ "When a job has no percentage, leave out the value rather than inventing one."
709
+ ] })
710
+ ]
711
+ }),
712
+ /* @__PURE__ */ jsx(Section$1, {
713
+ id: "accessibility",
714
+ title: "Accessibility",
715
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
716
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
717
+ "The bar is a ",
718
+ /* @__PURE__ */ jsx("code", { children: "role=\"progressbar\"" }),
719
+ " with ",
720
+ /* @__PURE__ */ jsx("code", { children: "aria-valuemin" }),
721
+ ", ",
722
+ /* @__PURE__ */ jsx("code", { children: "aria-valuemax" }),
723
+ " and",
724
+ " ",
725
+ /* @__PURE__ */ jsx("code", { children: "aria-valuenow" }),
726
+ ", named by its label (or by ",
727
+ /* @__PURE__ */ jsx("code", { children: "aria-label" }),
728
+ "). A value past the maximum is held at the maximum for the ARIA value and spoken as it is in ",
729
+ /* @__PURE__ */ jsx("code", { children: "aria-valuetext" }),
730
+ "."
731
+ ] }),
732
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
733
+ /* @__PURE__ */ jsx("code", { children: "aria-valuetext" }),
734
+ " is your ",
735
+ /* @__PURE__ */ jsx("code", { children: "valueText" }),
736
+ ", else your ",
737
+ /* @__PURE__ */ jsx("code", { children: "valueLabel" }),
738
+ " when that is a string, else the percentage: \"37 of 100 products\" rather than \"37%\". The visible figure is hidden from assistive tech so it is not read twice."
739
+ ] }),
740
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
741
+ "Without a ",
742
+ /* @__PURE__ */ jsx("code", { children: "value" }),
743
+ " the bar has no ",
744
+ /* @__PURE__ */ jsx("code", { children: "aria-valuenow" }),
745
+ ", which is how a progressbar says it is indeterminate. Give it a ",
746
+ /* @__PURE__ */ jsx("code", { children: "valueText" }),
747
+ " (\"Processing\") to say what is happening."
748
+ ] }),
749
+ "A description under the bar describes it (aria-describedby), so \"Resets on 1 November\" is read with the value.",
750
+ "A change in tone is not the only sign: say what it means in the figure or a badge (\"Limit reached\"). In forced colours the track gets an edge and every tone draws in the highlight colour.",
751
+ "Every tone is at least 3.6:1 against the empty track in light (warning aside: its light amber is 2.6:1, so a strained bar says so in its figure or a badge too) and 3.8:1 in dark. The empty track is a quiet 1.3:1 against the page, on the canvas, a sunken well and a raised panel alike: the figure carries the number, so the bar is never the only way to read it.",
752
+ "The bar does not announce its changes. For a long job, tell a screen reader when it ends with a toast or a live region of your own.",
753
+ "Under reduced motion the fill jumps to its value and an indeterminate bar pulses instead of sweeping."
754
+ ] })
755
+ }),
756
+ /* @__PURE__ */ jsx(Section$1, {
757
+ id: "differences",
758
+ title: "Where it differs from the vendor dashboard",
759
+ description: /* @__PURE__ */ jsx("p", { children: "The usage meter is the vendor dashboard's: 6px, a quiet track, an accent fill, the 80 and 100 rule, ink words. These are the places the kit chooses differently." }),
760
+ children: /* @__PURE__ */ jsx(DocTable, {
761
+ columns: [
762
+ "Where",
763
+ "Vendor dashboard",
764
+ "Kit"
765
+ ],
766
+ rows: [
767
+ [
768
+ "A name and a value",
769
+ "Most bars are unlabelled divs. Only the AI usage meter and one Radix upload tile are progressbars.",
770
+ "Every bar is a progressbar with its value and its name."
771
+ ],
772
+ [
773
+ "The 80 and 100 rule",
774
+ "Written four times, in four files, with raw hex fills in two of them.",
775
+ "One rule, in the component and in progressTone, drawn in the tokens."
776
+ ],
777
+ [
778
+ "Thickness",
779
+ "Four, six, eight and ten pixels, by page.",
780
+ "Three sizes: 4, 6 (default) and 8."
781
+ ],
782
+ [
783
+ "The track",
784
+ "A solid muted grey, which all but vanishes on a sunken well and on a raised panel in dark.",
785
+ "The progress ring's translucent track, which holds on every surface, so a bar and a ring match."
786
+ ],
787
+ [
788
+ "Fill speed",
789
+ "The usage bar moves in 150ms; the Radix bar in 660ms.",
790
+ "One speed: 320ms on the kit's ease-out."
791
+ ],
792
+ [
793
+ "No percentage",
794
+ "A spinner takes its place.",
795
+ "An indeterminate bar, the same component."
796
+ ],
797
+ [
798
+ "Neutral",
799
+ "Not drawn: the bar is accent, amber or red.",
800
+ "A neutral tone, for a bar with nothing to measure."
801
+ ],
802
+ [
803
+ "Quiet until 80%",
804
+ "The Nebula usage line says nothing until a limit is near.",
805
+ "Not built: draw the meter when you want it drawn."
806
+ ],
807
+ [
808
+ "On a scrim",
809
+ "An upload tile draws its bar and percentage in white on a dark overlay.",
810
+ "Not built: the bar is for a surface. Lay your own over an image."
811
+ ]
812
+ ]
813
+ })
814
+ }),
815
+ /* @__PURE__ */ jsxs(Section$1, {
816
+ id: "props",
817
+ title: "Props",
818
+ description: /* @__PURE__ */ jsx("p", { children: "Also accepts every native div attribute. The name, description and labelledby go on the bar itself." }),
819
+ children: [/* @__PURE__ */ jsx(PropsTable, { rows: [
820
+ {
821
+ name: "value",
822
+ type: "number | null",
823
+ description: "How far along it is, from 0 to max. Leave it out for an indeterminate bar. A value past max fills the bar and reads as it is. A number sent as a string (\"42.50\", a decimal from a database) is read as the number; text that is not one is no value."
824
+ },
825
+ {
826
+ name: "max",
827
+ type: "number | null",
828
+ default: "100",
829
+ description: "What value counts up to: 100 for a percentage, or 7 for \"3 of 7 tasks\". A max that is not a positive, finite number (0, a negative, NaN, Infinity) is read as 100, so the value is a percentage: for a limit of nothing, say so in words (valueLabel, valueText) and pick the tone. null is no limit: the track with no fill, and \"3 of unlimited\"."
830
+ },
831
+ {
832
+ name: "unlimitedLabel",
833
+ type: "(value: number) => string",
834
+ default: "\"3 of unlimited\"",
835
+ description: "The words of a meter with no limit."
836
+ },
837
+ {
838
+ name: "action",
839
+ type: "ReactNode",
840
+ description: "A control at the end of the line under the bar: an Upgrade link on a full meter."
841
+ },
842
+ {
843
+ name: "tone",
844
+ type: "'neutral' | 'accent' | 'positive' | 'warning' | 'negative' | 'info'",
845
+ default: "'accent'",
846
+ description: "The fill. The words stay ink."
847
+ },
848
+ {
849
+ name: "thresholds",
850
+ type: "boolean | { warning?: number; negative?: number }",
851
+ default: "false",
852
+ description: "Turns the tone from how full the bar is: warning from 80%, negative from 100%. For usage meters."
853
+ },
854
+ {
855
+ name: "size",
856
+ type: "'sm' | 'md' | 'lg'",
857
+ default: "'md'",
858
+ description: "The bar's thickness: 4px, 6px or 8px."
859
+ },
860
+ {
861
+ name: "label",
862
+ type: "ReactNode",
863
+ description: "What the bar measures, above it. Names the bar. The bar needs this, an aria-label or an aria-labelledby."
864
+ },
865
+ {
866
+ name: "valueLabel",
867
+ type: "ReactNode | boolean",
868
+ description: "The figure at the end of the label's line. true writes the percentage. Hidden from assistive tech."
869
+ },
870
+ {
871
+ name: "valueText",
872
+ type: "string",
873
+ description: "What a screen reader hears for the value. Defaults to a string valueLabel, else the percentage."
874
+ },
875
+ {
876
+ name: "description",
877
+ type: "ReactNode",
878
+ description: "A quiet line under the bar. Describes the bar to a screen reader."
879
+ },
880
+ {
881
+ name: "aria-label",
882
+ type: "string",
883
+ description: "Names the bar when there is no visible label."
884
+ },
885
+ {
886
+ name: "aria-labelledby",
887
+ type: "string",
888
+ description: "Names the bar from text elsewhere on the page."
889
+ },
890
+ {
891
+ name: "aria-describedby",
892
+ type: "string",
893
+ description: "Ids of other elements that describe the bar. Kept beside the description's own, so both are read."
894
+ }
895
+ ] }), /* @__PURE__ */ jsx(DocTable, {
896
+ columns: ["Function", "Does"],
897
+ rows: [[code("progressTone(value, max = 100, { thresholds = true, tone = \"accent\" })"), "The tone a bar draws in at this fill: the base tone, warning from 80% and negative from 100% (or your numbers; a step left undefined keeps its default). A negative base stays negative. It applies the thresholds unless you turn them off, where the bar does not: see above. A max that is not a positive number is read as 100, as the bar reads it."]]
898
+ })]
899
+ })
900
+ ]
901
+ });
902
+ }
903
+ //#endregion
904
+ export { Page, Preview };