@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,1295 @@
1
+ "use client";
2
+ 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";
3
+ import { a as MenuSheet, c as SpecimenFrame, r as MenuRow } from "./_overlays-specimens-bawR331Z.js";
4
+ import { useRef, useState } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { AddFilter, Button, Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, DialogTrigger, FilterDateEditor, FilterOptionList, FilterPill, FilterRangeEditor, FilterTextEditor, SearchField, dateFormatter } from "@orbitcommerce/constellation";
7
+ //#region src/pages/components/filter-pill.tsx
8
+ /**
9
+ * The pill's own markup, with the state drawn by a class of this page (`filter-pill.css`, "stills"). A live pill would
10
+ * have to be hovered, focused or open to look like this, and a still cannot be.
11
+ */
12
+ function PillStill({ state, name }) {
13
+ return /* @__PURE__ */ jsxs("div", {
14
+ className: "filter-pill-still",
15
+ children: [/* @__PURE__ */ jsx("span", {
16
+ className: "filter-pill-still__name",
17
+ children: name
18
+ }), /* @__PURE__ */ jsxs("div", {
19
+ className: "o-filter-pill",
20
+ "data-open": state === "open" ? "" : void 0,
21
+ "data-still": state,
22
+ children: [
23
+ /* @__PURE__ */ jsx("span", {
24
+ className: "o-filter-pill__label",
25
+ children: /* @__PURE__ */ jsx("span", {
26
+ className: "o-filter-pill__label-text",
27
+ children: "Created"
28
+ })
29
+ }),
30
+ /* @__PURE__ */ jsx("span", {
31
+ className: "o-filter-pill__operator",
32
+ children: "is"
33
+ }),
34
+ /* @__PURE__ */ jsx("button", {
35
+ type: "button",
36
+ className: "o-filter-pill__value",
37
+ "data-state": state === "open" ? "open" : void 0,
38
+ tabIndex: -1,
39
+ children: /* @__PURE__ */ jsx("span", {
40
+ className: "o-filter-pill__text",
41
+ children: "1 to 30 Sep 2026"
42
+ })
43
+ }),
44
+ /* @__PURE__ */ jsx("button", {
45
+ type: "button",
46
+ className: "o-filter-pill__remove",
47
+ "aria-label": "Remove",
48
+ tabIndex: -1,
49
+ children: /* @__PURE__ */ jsx("svg", {
50
+ viewBox: "0 0 16 16",
51
+ "aria-hidden": "true",
52
+ children: /* @__PURE__ */ jsx("path", { d: "M5 5l6 6M11 5l-6 6" })
53
+ })
54
+ })
55
+ ]
56
+ })]
57
+ });
58
+ }
59
+ var PAYMENT = [
60
+ {
61
+ value: "paid",
62
+ label: "Paid"
63
+ },
64
+ {
65
+ value: "unpaid",
66
+ label: "Unpaid"
67
+ },
68
+ {
69
+ value: "refunded",
70
+ label: "Refunded"
71
+ },
72
+ {
73
+ value: "partial",
74
+ label: "Partially refunded"
75
+ },
76
+ {
77
+ value: "void",
78
+ label: "Void"
79
+ }
80
+ ];
81
+ var FULFILMENT = [
82
+ {
83
+ value: "unfulfilled",
84
+ label: "Unfulfilled"
85
+ },
86
+ {
87
+ value: "partial",
88
+ label: "Partially fulfilled"
89
+ },
90
+ {
91
+ value: "fulfilled",
92
+ label: "Fulfilled"
93
+ }
94
+ ];
95
+ var CHANNEL = [
96
+ {
97
+ value: "online",
98
+ label: "Online store"
99
+ },
100
+ {
101
+ value: "pos",
102
+ label: "In person"
103
+ },
104
+ {
105
+ value: "draft",
106
+ label: "Draft order"
107
+ }
108
+ ];
109
+ var COUNTRIES = [
110
+ "United Kingdom",
111
+ "Ireland",
112
+ "France",
113
+ "Germany",
114
+ "Spain",
115
+ "Italy",
116
+ "Portugal",
117
+ "Netherlands",
118
+ "Belgium",
119
+ "Sweden"
120
+ ].map((name) => ({
121
+ value: name.toLowerCase().replace(/ /g, "-"),
122
+ label: name
123
+ }));
124
+ var TOTAL_PICKS = [
125
+ {
126
+ value: "0-50",
127
+ label: "Under £50"
128
+ },
129
+ {
130
+ value: "50-200",
131
+ label: "£50 to £200"
132
+ },
133
+ {
134
+ value: "200+",
135
+ label: "Over £200"
136
+ }
137
+ ];
138
+ var TODAY = new Date(2026, 9, 12);
139
+ /** "Paid", "Paid, Unpaid", "Paid, Unpaid, +1 more...": the value as the page words it. */
140
+ function summarise(values, options) {
141
+ if (!values.length) return "Select...";
142
+ const labels = values.map((value) => String(options.find((option) => option.value === value)?.label ?? value));
143
+ return labels.length <= 2 ? labels.join(", ") : `${labels.slice(0, 2).join(", ")}, +${labels.length - 2} more...`;
144
+ }
145
+ var formatDay = (date) => dateFormatter("en-GB", {
146
+ day: "numeric",
147
+ month: "short",
148
+ year: "numeric"
149
+ }).format(date);
150
+ /**
151
+ * "1 to 30 Sep 2026", "28 Sep to 4 Oct 2026", "29 Dec 2025 to 4 Jan 2026": a range of days as the page words it, with
152
+ * "to" as the range editor's picks and the DateRangePicker say it, and the month and year once when the ends share them.
153
+ */
154
+ function formatDays(from, to) {
155
+ const sameYear = from.getFullYear() === to.getFullYear();
156
+ return `${sameYear && from.getMonth() === to.getMonth() ? String(from.getDate()) : dateFormatter("en-GB", sameYear ? {
157
+ day: "numeric",
158
+ month: "short"
159
+ } : {
160
+ day: "numeric",
161
+ month: "short",
162
+ year: "numeric"
163
+ }).format(from)} to ${formatDay(to)}`;
164
+ }
165
+ function PaymentPill({ onRemove, defaultOpen }) {
166
+ const [value, setValue] = useState(["paid", "unpaid"]);
167
+ return /* @__PURE__ */ jsx(FilterPill, {
168
+ label: "Payment",
169
+ operator: "in",
170
+ value: summarise(value, PAYMENT),
171
+ onRemove: onRemove ?? (() => {}),
172
+ removeLabel: "Remove payment filter",
173
+ defaultOpen,
174
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
175
+ options: PAYMENT,
176
+ value,
177
+ onValueChange: setValue
178
+ })
179
+ });
180
+ }
181
+ function FulfilmentPill({ onRemove, defaultOpen }) {
182
+ const [value, setValue] = useState(["unfulfilled"]);
183
+ return /* @__PURE__ */ jsx(FilterPill, {
184
+ label: "Fulfilment",
185
+ operator: "is",
186
+ value: summarise(value, FULFILMENT),
187
+ onRemove,
188
+ removeLabel: "Remove fulfilment filter",
189
+ defaultOpen,
190
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
191
+ mode: "single",
192
+ options: FULFILMENT,
193
+ value,
194
+ onValueChange: setValue
195
+ })
196
+ });
197
+ }
198
+ function ChannelPill({ onRemove, defaultOpen }) {
199
+ const [value, setValue] = useState(["online"]);
200
+ return /* @__PURE__ */ jsx(FilterPill, {
201
+ label: "Channel",
202
+ operator: "is",
203
+ value: summarise(value, CHANNEL),
204
+ onRemove,
205
+ removeLabel: "Remove channel filter",
206
+ defaultOpen,
207
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
208
+ mode: "radio",
209
+ options: CHANNEL,
210
+ value,
211
+ onValueChange: setValue
212
+ })
213
+ });
214
+ }
215
+ function CountryPill({ onRemove, defaultOpen }) {
216
+ const [value, setValue] = useState(["ireland"]);
217
+ return /* @__PURE__ */ jsx(FilterPill, {
218
+ label: "Country",
219
+ operator: "in",
220
+ value: summarise(value, COUNTRIES),
221
+ onRemove,
222
+ removeLabel: "Remove country filter",
223
+ defaultOpen,
224
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
225
+ options: COUNTRIES,
226
+ value,
227
+ onValueChange: setValue
228
+ })
229
+ });
230
+ }
231
+ var AGENTS = [
232
+ {
233
+ value: "priya",
234
+ label: "Priya Shah",
235
+ hint: "priya@harbourdesk.co.uk",
236
+ count: 14
237
+ },
238
+ {
239
+ value: "tom",
240
+ label: "Tom Reid",
241
+ hint: "tom@ardenworkspace.co.uk",
242
+ count: 3
243
+ },
244
+ {
245
+ value: "amara",
246
+ label: "Amara Okafor",
247
+ hint: "amara@fenwickinteriors.co.uk",
248
+ count: 0
249
+ }
250
+ ];
251
+ function AgentPill({ onRemove }) {
252
+ const [value, setValue] = useState(["priya"]);
253
+ const words = value[0] === "" ? "Unassigned" : summarise(value, AGENTS);
254
+ return /* @__PURE__ */ jsx(FilterPill, {
255
+ label: "Agent",
256
+ operator: "is",
257
+ value: words,
258
+ onRemove,
259
+ removeLabel: "Remove agent filter",
260
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
261
+ mode: "single",
262
+ options: AGENTS,
263
+ none: { label: "Unassigned" },
264
+ value,
265
+ onValueChange: setValue,
266
+ searchable: true
267
+ })
268
+ });
269
+ }
270
+ function BrandPill({ onRemove }) {
271
+ const [brands, setBrands] = useState([{
272
+ value: "arden",
273
+ label: "Arden"
274
+ }, {
275
+ value: "fenwick",
276
+ label: "Fenwick"
277
+ }]);
278
+ const [value, setValue] = useState([]);
279
+ return /* @__PURE__ */ jsx(FilterPill, {
280
+ label: "Brand",
281
+ operator: "in",
282
+ value: summarise(value, brands) || "Select...",
283
+ onRemove,
284
+ removeLabel: "Remove brand filter",
285
+ children: /* @__PURE__ */ jsx(FilterOptionList, {
286
+ options: brands,
287
+ value,
288
+ onValueChange: setValue,
289
+ onCreate: async (name) => {
290
+ await new Promise((resolve) => setTimeout(resolve, 900));
291
+ const id = name.toLowerCase().replace(/\W+/g, "-");
292
+ setBrands((all) => [...all, {
293
+ value: id,
294
+ label: name
295
+ }]);
296
+ setValue((all) => [...all, id]);
297
+ }
298
+ })
299
+ });
300
+ }
301
+ function CustomerPill({ onRemove, defaultOpen }) {
302
+ const [text, setText] = useState("Priya");
303
+ return /* @__PURE__ */ jsx(FilterPill, {
304
+ label: "Customer",
305
+ operator: "contains",
306
+ value: text || "Type to search...",
307
+ onRemove,
308
+ removeLabel: "Remove customer filter",
309
+ defaultOpen,
310
+ children: /* @__PURE__ */ jsx(FilterTextEditor, {
311
+ value: text,
312
+ onApply: setText
313
+ })
314
+ });
315
+ }
316
+ function TotalPill({ onRemove, defaultOpen }) {
317
+ const [range, setRange] = useState({
318
+ min: 10,
319
+ max: 500
320
+ });
321
+ const pick = (value) => {
322
+ const [low = "0", high] = value.split(/[-+]/);
323
+ setRange({
324
+ min: Number(low),
325
+ max: high ? Number(high) : 1e3
326
+ });
327
+ };
328
+ return /* @__PURE__ */ jsx(FilterPill, {
329
+ label: "Total",
330
+ operator: "between",
331
+ value: `£${range.min} to £${range.max}`,
332
+ onRemove,
333
+ removeLabel: "Remove total filter",
334
+ defaultOpen,
335
+ children: /* @__PURE__ */ jsx(FilterRangeEditor, {
336
+ min: 0,
337
+ max: 1e3,
338
+ step: 10,
339
+ value: range,
340
+ onApply: setRange,
341
+ options: TOTAL_PICKS,
342
+ onPick: pick,
343
+ note: "Values in £",
344
+ formatValue: (n) => `£${n}`
345
+ })
346
+ });
347
+ }
348
+ function CreatedPill({ onRemove, defaultOpen }) {
349
+ const [days, setDays] = useState({
350
+ from: new Date(2026, 8, 1),
351
+ to: new Date(2026, 8, 30)
352
+ });
353
+ return /* @__PURE__ */ jsx(FilterPill, {
354
+ label: "Created",
355
+ operator: "is",
356
+ value: formatDays(days.from, days.to),
357
+ onRemove,
358
+ removeLabel: "Remove created filter",
359
+ defaultOpen,
360
+ children: /* @__PURE__ */ jsx(FilterDateEditor, {
361
+ value: days,
362
+ onApply: setDays,
363
+ maxValue: TODAY
364
+ })
365
+ });
366
+ }
367
+ var FILTERS = [
368
+ {
369
+ value: "payment",
370
+ label: "Payment"
371
+ },
372
+ {
373
+ value: "fulfilment",
374
+ label: "Fulfilment"
375
+ },
376
+ {
377
+ value: "channel",
378
+ label: "Channel"
379
+ },
380
+ {
381
+ value: "country",
382
+ label: "Country"
383
+ },
384
+ {
385
+ value: "customer",
386
+ label: "Customer"
387
+ },
388
+ {
389
+ value: "total",
390
+ label: "Total"
391
+ },
392
+ {
393
+ value: "created",
394
+ label: "Created"
395
+ }
396
+ ];
397
+ /** A toolbar row as a list page builds it: Add filter first, the pills, Clear all, and the search at the end. */
398
+ function ToolbarDemo() {
399
+ const [applied, setApplied] = useState([
400
+ "payment",
401
+ "fulfilment",
402
+ "created"
403
+ ]);
404
+ const [fresh, setFresh] = useState(null);
405
+ const row = useRef(null);
406
+ const remove = (key) => () => setApplied((list) => list.filter((each) => each !== key));
407
+ const clearAll = () => {
408
+ setApplied([]);
409
+ requestAnimationFrame(() => row.current?.querySelector("button")?.focus());
410
+ };
411
+ const has = (key) => applied.includes(key);
412
+ const opens = (key) => fresh === key;
413
+ return /* @__PURE__ */ jsxs("div", {
414
+ className: "filter-pill-bar",
415
+ children: [/* @__PURE__ */ jsxs("div", {
416
+ className: "filter-pill-bar__filters",
417
+ ref: row,
418
+ children: [
419
+ /* @__PURE__ */ jsx(AddFilter, {
420
+ filters: FILTERS,
421
+ applied,
422
+ onAdd: (key) => {
423
+ setApplied((list) => [...list, key]);
424
+ setFresh(key);
425
+ }
426
+ }),
427
+ has("payment") ? /* @__PURE__ */ jsx(PaymentPill, {
428
+ onRemove: remove("payment"),
429
+ defaultOpen: opens("payment")
430
+ }) : null,
431
+ has("fulfilment") ? /* @__PURE__ */ jsx(FulfilmentPill, {
432
+ onRemove: remove("fulfilment"),
433
+ defaultOpen: opens("fulfilment")
434
+ }) : null,
435
+ has("channel") ? /* @__PURE__ */ jsx(ChannelPill, {
436
+ onRemove: remove("channel"),
437
+ defaultOpen: opens("channel")
438
+ }) : null,
439
+ has("country") ? /* @__PURE__ */ jsx(CountryPill, {
440
+ onRemove: remove("country"),
441
+ defaultOpen: opens("country")
442
+ }) : null,
443
+ has("customer") ? /* @__PURE__ */ jsx(CustomerPill, {
444
+ onRemove: remove("customer"),
445
+ defaultOpen: opens("customer")
446
+ }) : null,
447
+ has("total") ? /* @__PURE__ */ jsx(TotalPill, {
448
+ onRemove: remove("total"),
449
+ defaultOpen: opens("total")
450
+ }) : null,
451
+ has("created") ? /* @__PURE__ */ jsx(CreatedPill, {
452
+ onRemove: remove("created"),
453
+ defaultOpen: opens("created")
454
+ }) : null,
455
+ applied.length ? /* @__PURE__ */ jsx(Button, {
456
+ variant: "ghost",
457
+ size: "sm",
458
+ onClick: clearAll,
459
+ children: "Clear all"
460
+ }) : null
461
+ ]
462
+ }), /* @__PURE__ */ jsx("div", {
463
+ className: "filter-pill-bar__search",
464
+ children: /* @__PURE__ */ jsx(SearchField, {
465
+ size: "sm",
466
+ "aria-label": "Search orders",
467
+ placeholder: "Search orders"
468
+ })
469
+ })]
470
+ });
471
+ }
472
+ function SheetStill({ width, children }) {
473
+ return /* @__PURE__ */ jsx(SpecimenFrame, { children: /* @__PURE__ */ jsx("div", {
474
+ className: "o-popover o-filter-pill__sheet",
475
+ "data-padding": "none",
476
+ style: { width },
477
+ children: /* @__PURE__ */ jsx("div", {
478
+ className: "o-filter-pill__body",
479
+ children
480
+ })
481
+ }) });
482
+ }
483
+ function InDialog() {
484
+ return /* @__PURE__ */ jsxs(Dialog, { children: [/* @__PURE__ */ jsx(DialogTrigger, {
485
+ asChild: true,
486
+ children: /* @__PURE__ */ jsx(Button, { children: "Choose products" })
487
+ }), /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Choose products" }) }), /* @__PURE__ */ jsx(DialogBody, { children: /* @__PURE__ */ jsx("div", {
488
+ className: "filter-pill-bar__filters",
489
+ children: /* @__PURE__ */ jsx(PaymentPill, {})
490
+ }) })] })] });
491
+ }
492
+ function Preview() {
493
+ return /* @__PURE__ */ jsx(SpecimenFrame, { children: /* @__PURE__ */ jsxs("div", {
494
+ className: "filter-pill-preview",
495
+ children: [/* @__PURE__ */ jsx(FilterPill, {
496
+ label: "Payment",
497
+ operator: "in",
498
+ value: "Paid, Unpaid",
499
+ onRemove: () => {}
500
+ }), /* @__PURE__ */ jsx(FilterPill, {
501
+ label: "Created",
502
+ operator: "is",
503
+ value: "1 to 30 Sep 2026",
504
+ onRemove: () => {}
505
+ })]
506
+ }) });
507
+ }
508
+ function Page() {
509
+ return /* @__PURE__ */ jsxs(DocPage, {
510
+ title: "Filter pill",
511
+ status: "new",
512
+ importNames: [
513
+ "FilterPill",
514
+ "FilterOptionList",
515
+ "FilterTextEditor",
516
+ "FilterRangeEditor",
517
+ "FilterDateEditor",
518
+ "AddFilter"
519
+ ],
520
+ lead: "A filter that is on, drawn as a pill in a list's toolbar: its name, how it matches, its value and a cross. The value opens a sheet to change it in. The pill shows and opens; the page owns the value and chooses the editor.",
521
+ children: [
522
+ /* @__PURE__ */ jsxs(Section$1, {
523
+ id: "toolbar",
524
+ title: "In a toolbar",
525
+ description: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", { children: "Add filter comes first in the row, then a pill for each filter that is on, then Clear all, with the search at the end. A filter switching on adds a pill after the button, so nothing moves under the pointer, and the pill opens its sheet as it arrives: the person chose the filter to set it. Every pill here is live: open its value, change it, remove it, and add it back from Add filter." }), /* @__PURE__ */ jsx("p", { children: "The pill is 30px tall, the height of a small button, so the row lines up. When the row runs out of room the pills wrap, a long value ends in an ellipsis, and in a very short row the name gives way after the value does, so the cross is never pushed out." })] }),
526
+ children: [/* @__PURE__ */ jsx(Example, {
527
+ align: "fill",
528
+ minHeight: 240,
529
+ code: `
530
+ const row = useRef<HTMLDivElement>(null)
531
+ // Clear all takes the pills away, and itself with them: hand focus to Add filter, not to the top of the page.
532
+ const clearAll = () => {
533
+ setApplied([])
534
+ requestAnimationFrame(() => row.current?.querySelector('button')?.focus())
535
+ }
536
+
537
+ <div ref={row}>
538
+ <AddFilter filters={filters} applied={applied} onAdd={(key) => setApplied([...applied, key])} />
539
+ <FilterPill
540
+ label="Payment"
541
+ operator="in"
542
+ value={summarise(value, options)} // "Paid, Unpaid, +1 more..."
543
+ onRemove={() => remove('payment')}
544
+ removeLabel="Remove payment filter"
545
+ >
546
+ <FilterOptionList options={options} value={value} onValueChange={setValue} />
547
+ </FilterPill>
548
+ <Button variant="ghost" size="sm" onClick={clearAll}>Clear all</Button>
549
+ </div>
550
+ <SearchField size="sm" aria-label="Search orders" placeholder="Search orders" />`,
551
+ children: /* @__PURE__ */ jsx(ToolbarDemo, {})
552
+ }), /* @__PURE__ */ jsx(Note, {
553
+ title: "The page owns the value",
554
+ children: /* @__PURE__ */ jsxs("p", { children: [
555
+ "The pill takes the value as text and an editor as its children, and says nothing about how the filter is stored or sent to the server. Word the value yourself (",
556
+ /* @__PURE__ */ jsx("code", { children: "Paid, Unpaid, +1 more..." }),
557
+ ", ",
558
+ /* @__PURE__ */ jsx("code", { children: "£10 to £500" }),
559
+ ") and keep the filter in whatever shape your API takes."
560
+ ] })
561
+ })]
562
+ }),
563
+ /* @__PURE__ */ jsxs(Section$1, {
564
+ id: "editors",
565
+ title: "Editors",
566
+ description: /* @__PURE__ */ jsxs("p", { children: [
567
+ "The sheet holds an editor. Four are included for the usual filters, and a page can put its own in. A list of choices applies as you choose and stays open. The text and range editors apply on a button and stay open too, so a value can be adjusted and applied again, as in the vendor dashboard; the date editor closes once a day is applied, as the vendor's does. ",
568
+ /* @__PURE__ */ jsx("code", { children: "closeOnApply" }),
569
+ " turns either behaviour round."
570
+ ] }),
571
+ children: [
572
+ /* @__PURE__ */ jsx(SubSection, {
573
+ title: "FilterOptionList",
574
+ description: /* @__PURE__ */ jsxs("p", { children: [
575
+ "A list to choose from, in rows like the menus'. ",
576
+ /* @__PURE__ */ jsx("code", { children: "multiple" }),
577
+ " ticks several, ",
578
+ /* @__PURE__ */ jsx("code", { children: "single" }),
579
+ " marks one with a check at the end, and ",
580
+ /* @__PURE__ */ jsx("code", { children: "radio" }),
581
+ " draws radios. A search box appears when there are more than eight options (or with ",
582
+ /* @__PURE__ */ jsx("code", { children: "searchable" }),
583
+ "), and the arrow keys move between rows."
584
+ ] }),
585
+ children: /* @__PURE__ */ jsx(Example, {
586
+ align: "start",
587
+ minHeight: 300,
588
+ code: `
589
+ <FilterPill label="Payment" operator="in" value="Paid, Unpaid" onRemove={remove}>
590
+ <FilterOptionList options={options} value={value} onValueChange={setValue} />
591
+ </FilterPill>
592
+
593
+ <FilterPill label="Fulfilment" operator="is" value="Unfulfilled" onRemove={remove}>
594
+ <FilterOptionList mode="single" options={options} value={value} onValueChange={setValue} />
595
+ </FilterPill>
596
+
597
+ <FilterPill label="Channel" operator="is" value="Online store" onRemove={remove}>
598
+ <FilterOptionList mode="radio" options={options} value={value} onValueChange={setValue} />
599
+ </FilterPill>
600
+
601
+ <FilterPill label="Country" operator="in" value="Ireland" onRemove={remove}>
602
+ <FilterOptionList options={countries} value={value} onValueChange={setValue} /> {/* ten options: searchable */}
603
+ </FilterPill>`,
604
+ children: /* @__PURE__ */ jsxs("div", {
605
+ className: "filter-pill-row",
606
+ children: [
607
+ /* @__PURE__ */ jsx(PaymentPill, {}),
608
+ /* @__PURE__ */ jsx(FulfilmentPill, { onRemove: () => {} }),
609
+ /* @__PURE__ */ jsx(ChannelPill, { onRemove: () => {} }),
610
+ /* @__PURE__ */ jsx(CountryPill, { onRemove: () => {} })
611
+ ]
612
+ })
613
+ })
614
+ }),
615
+ /* @__PURE__ */ jsx(SubSection, {
616
+ title: "Counts, hints, None and creating",
617
+ description: /* @__PURE__ */ jsxs("p", { children: [
618
+ "An option can carry a ",
619
+ /* @__PURE__ */ jsx("code", { children: "count" }),
620
+ " of the records it holds and a ",
621
+ /* @__PURE__ */ jsx("code", { children: "hint" }),
622
+ " (an email beside a name), both quiet at the end of its row; the label keeps its room and the hint gives way first, and the search matches the hint too. ",
623
+ /* @__PURE__ */ jsx("code", { children: "none" }),
624
+ " heads the list with a row for records with no value, its own value",
625
+ " ",
626
+ /* @__PURE__ */ jsx("code", { children: "''" }),
627
+ " unless you give one. ",
628
+ /* @__PURE__ */ jsx("code", { children: "onCreate" }),
629
+ " offers to create what was searched for once no option reads it exactly: a promise holds the row busy, then the search clears and the new option shows. Search the brands for a name that is not there."
630
+ ] }),
631
+ children: /* @__PURE__ */ jsx(Example, {
632
+ align: "start",
633
+ minHeight: 300,
634
+ code: `
635
+ const agents = [
636
+ { value: 'priya', label: 'Priya Shah', hint: 'priya@harbourdesk.co.uk', count: 14 },
637
+ { value: 'tom', label: 'Tom Reid', hint: 'tom@ardenworkspace.co.uk', count: 3 },
638
+ ]
639
+
640
+ <FilterOptionList mode="single" options={agents} none={{ label: 'Unassigned' }} value={value} onValueChange={setValue} />
641
+
642
+ <FilterOptionList
643
+ options={brands}
644
+ value={value}
645
+ onValueChange={setValue}
646
+ onCreate={async (name) => {
647
+ const brand = await createBrand(name)
648
+ setValue([...value, brand.id])
649
+ }}
650
+ />`,
651
+ children: /* @__PURE__ */ jsxs("div", {
652
+ className: "filter-pill-row",
653
+ children: [/* @__PURE__ */ jsx(AgentPill, { onRemove: () => {} }), /* @__PURE__ */ jsx(BrandPill, { onRemove: () => {} })]
654
+ })
655
+ })
656
+ }),
657
+ /* @__PURE__ */ jsx(Fragment$1, {}),
658
+ /* @__PURE__ */ jsx(SubSection, {
659
+ title: "FilterTextEditor",
660
+ description: /* @__PURE__ */ jsxs("p", { children: [
661
+ "For a filter that matches text (",
662
+ /* @__PURE__ */ jsx("code", { children: "contains" }),
663
+ "). The field has focus when the sheet opens; Enter or the button applies, and the sheet stays open (pass ",
664
+ /* @__PURE__ */ jsx("code", { children: "closeOnApply" }),
665
+ " to close it)."
666
+ ] }),
667
+ children: /* @__PURE__ */ jsx(Example, {
668
+ align: "start",
669
+ minHeight: 200,
670
+ code: `
671
+ <FilterPill label="Customer" operator="contains" value={text} onRemove={remove}>
672
+ <FilterTextEditor value={text} onApply={setText} placeholder="Name or email" />
673
+ </FilterPill>`,
674
+ children: /* @__PURE__ */ jsx("div", {
675
+ className: "filter-pill-row",
676
+ children: /* @__PURE__ */ jsx(CustomerPill, { onRemove: () => {} })
677
+ })
678
+ })
679
+ }),
680
+ /* @__PURE__ */ jsx(SubSection, {
681
+ title: "FilterRangeEditor",
682
+ description: /* @__PURE__ */ jsxs("p", { children: [
683
+ "For a number between a lowest and a highest (",
684
+ /* @__PURE__ */ jsx("code", { children: "between" }),
685
+ "): optional quick picks, a two-thumb slider, then the two numbers. The slider and the fields move together: a thumb writes its field and a number typed moves its thumb, and ",
686
+ /* @__PURE__ */ jsx("code", { children: "formatValue" }),
687
+ " writes the thumbs' values as the fields read (\"£250\"). What is typed is kept inside ",
688
+ /* @__PURE__ */ jsx("code", { children: "min" }),
689
+ " and ",
690
+ /* @__PURE__ */ jsx("code", { children: "max" }),
691
+ ", the lowest first, and an empty field takes its bound. Apply and the quick picks leave the sheet open. ",
692
+ /* @__PURE__ */ jsxs("code", { children: ["slider=", "{false}"] }),
693
+ " keeps the fields alone."
694
+ ] }),
695
+ children: /* @__PURE__ */ jsx(Example, {
696
+ align: "start",
697
+ minHeight: 340,
698
+ code: `
699
+ <FilterPill label="Total" operator="between" value="£10 to £500" onRemove={remove}>
700
+ <FilterRangeEditor
701
+ min={0}
702
+ max={1000}
703
+ value={range} // { min: 10, max: 500 }
704
+ onApply={setRange}
705
+ options={[{ value: '0-50', label: 'Under £50' }]}
706
+ onPick={applyPick}
707
+ note="Values in £"
708
+ formatValue={(n) => \`£\${n}\`}
709
+ />
710
+ </FilterPill>`,
711
+ children: /* @__PURE__ */ jsx("div", {
712
+ className: "filter-pill-row",
713
+ children: /* @__PURE__ */ jsx(TotalPill, { onRemove: () => {} })
714
+ })
715
+ })
716
+ }),
717
+ /* @__PURE__ */ jsx(SubSection, {
718
+ title: "FilterDateEditor",
719
+ description: /* @__PURE__ */ jsxs("p", { children: [
720
+ "The calendar picks a first and a last day, with Apply under it, which closes the sheet. Apply waits for a day, and one day picked is that day alone. Pass ",
721
+ /* @__PURE__ */ jsx("code", { children: "maxValue" }),
722
+ " to rule out days that have not happened. Days are local dates: the page turns them into whatever its API reads."
723
+ ] }),
724
+ children: /* @__PURE__ */ jsx(Example, {
725
+ align: "start",
726
+ minHeight: 420,
727
+ code: `
728
+ <FilterPill label="Created" operator="is" value="1 to 30 Sep 2026" onRemove={remove}>
729
+ <FilterDateEditor value={days} onApply={setDays} maxValue={new Date()} />
730
+ </FilterPill>`,
731
+ children: /* @__PURE__ */ jsx("div", {
732
+ className: "filter-pill-row",
733
+ children: /* @__PURE__ */ jsx(CreatedPill, { onRemove: () => {} })
734
+ })
735
+ })
736
+ })
737
+ ]
738
+ }),
739
+ /* @__PURE__ */ jsx(Section$1, {
740
+ id: "add-filter",
741
+ title: "Add filter",
742
+ description: /* @__PURE__ */ jsxs("p", { children: [
743
+ "The button that starts a filter. It opens a menu of the filters the list has that are not on, and tells the page which one was chosen once the menu has closed and focus has gone back to the button. So a page can open the new pill's sheet at once (",
744
+ /* @__PURE__ */ jsx("code", { children: "defaultOpen" }),
745
+ ", or ",
746
+ /* @__PURE__ */ jsx("code", { children: "open" }),
747
+ ") and it stays open. With every filter on the menu says so; with no filters at all there is no button."
748
+ ] }),
749
+ children: /* @__PURE__ */ jsx(Example, {
750
+ align: "start",
751
+ minHeight: 220,
752
+ code: `
753
+ <AddFilter
754
+ filters={[{ value: 'payment', label: 'Payment' }, { value: 'channel', label: 'Channel' }]}
755
+ applied={['channel']}
756
+ onAdd={(key) => addFilter(key)}
757
+ />
758
+
759
+ <AddFilter filters={filters} applied={allOfThem} onAdd={addFilter} emptyLabel="All filters added" />`,
760
+ children: /* @__PURE__ */ jsxs("div", {
761
+ className: "filter-pill-row",
762
+ children: [/* @__PURE__ */ jsx(AddFilter, {
763
+ filters: FILTERS.slice(0, 3),
764
+ applied: ["channel"],
765
+ onAdd: () => {}
766
+ }), /* @__PURE__ */ jsx(AddFilter, {
767
+ filters: FILTERS.slice(0, 2),
768
+ applied: ["payment", "fulfilment"],
769
+ onAdd: () => {},
770
+ children: "Nothing left to add"
771
+ })]
772
+ })
773
+ })
774
+ }),
775
+ /* @__PURE__ */ jsxs(Section$1, {
776
+ id: "sheets",
777
+ title: "Every editor in both themes",
778
+ description: /* @__PURE__ */ jsx("p", { children: "The sheet is the popover's: a raised 14px surface with 6px of padding, and rows of 34px with 9px corners. Each editor, the Add filter menu and the pill's own states are drawn open below, in both themes, from the real components' classes." }),
779
+ children: [
780
+ /* @__PURE__ */ jsx(SubSection, {
781
+ title: "Choices",
782
+ children: /* @__PURE__ */ jsx(ThemePair, {
783
+ align: "start",
784
+ minHeight: 300,
785
+ children: /* @__PURE__ */ jsxs("div", {
786
+ className: "filter-pill-stills",
787
+ children: [
788
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterOptionList, {
789
+ options: PAYMENT.slice(0, 4),
790
+ value: ["paid", "refunded"],
791
+ "aria-label": "Several"
792
+ }) }),
793
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterOptionList, {
794
+ mode: "single",
795
+ options: FULFILMENT,
796
+ value: ["partial"],
797
+ "aria-label": "One"
798
+ }) }),
799
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterOptionList, {
800
+ mode: "radio",
801
+ options: CHANNEL,
802
+ value: ["online"],
803
+ "aria-label": "Radios"
804
+ }) }),
805
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterOptionList, {
806
+ options: COUNTRIES,
807
+ value: ["ireland"],
808
+ "aria-label": "Searchable"
809
+ }) }),
810
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterOptionList, {
811
+ options: [],
812
+ "aria-label": "Empty"
813
+ }) })
814
+ ]
815
+ })
816
+ })
817
+ }),
818
+ /* @__PURE__ */ jsx(SubSection, {
819
+ title: "Words, numbers and days",
820
+ children: /* @__PURE__ */ jsx(ThemePair, {
821
+ align: "start",
822
+ minHeight: 420,
823
+ children: /* @__PURE__ */ jsxs("div", {
824
+ className: "filter-pill-stills",
825
+ children: [
826
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterTextEditor, {
827
+ value: "Priya",
828
+ onApply: () => {}
829
+ }) }),
830
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterRangeEditor, {
831
+ min: 0,
832
+ max: 1e3,
833
+ value: {
834
+ min: 10,
835
+ max: 500
836
+ },
837
+ onApply: () => {},
838
+ options: TOTAL_PICKS,
839
+ note: "Values in £"
840
+ }) }),
841
+ /* @__PURE__ */ jsx(SheetStill, { children: /* @__PURE__ */ jsx(FilterDateEditor, {
842
+ value: {
843
+ from: new Date(2026, 8, 1),
844
+ to: new Date(2026, 8, 30)
845
+ },
846
+ maxValue: TODAY,
847
+ onApply: () => {}
848
+ }) })
849
+ ]
850
+ })
851
+ })
852
+ }),
853
+ /* @__PURE__ */ jsx(SubSection, {
854
+ title: "Add filter's menu",
855
+ children: /* @__PURE__ */ jsx(ThemePair, {
856
+ align: "start",
857
+ minHeight: 200,
858
+ children: /* @__PURE__ */ jsx(SpecimenFrame, { children: /* @__PURE__ */ jsxs(MenuSheet, {
859
+ width: 220,
860
+ children: [
861
+ /* @__PURE__ */ jsx(MenuRow, {
862
+ highlighted: true,
863
+ children: "Payment status"
864
+ }),
865
+ /* @__PURE__ */ jsx(MenuRow, { children: "Channel" }),
866
+ /* @__PURE__ */ jsx(MenuRow, { children: "Total" })
867
+ ]
868
+ }) })
869
+ })
870
+ }),
871
+ /* @__PURE__ */ jsxs(SubSection, {
872
+ title: "The pill",
873
+ children: [
874
+ /* @__PURE__ */ jsx(ThemePair, {
875
+ align: "start",
876
+ minHeight: 120,
877
+ children: /* @__PURE__ */ jsxs("div", {
878
+ className: "filter-pill-row",
879
+ children: [
880
+ /* @__PURE__ */ jsx(FilterPill, {
881
+ label: "Payment",
882
+ operator: "in",
883
+ value: "Paid, Unpaid",
884
+ onRemove: () => {}
885
+ }),
886
+ /* @__PURE__ */ jsx(FilterPill, {
887
+ label: "Archived",
888
+ value: "Hidden"
889
+ }),
890
+ /* @__PURE__ */ jsx("div", {
891
+ style: {
892
+ width: 240,
893
+ maxWidth: "100%"
894
+ },
895
+ children: /* @__PURE__ */ jsx(FilterPill, {
896
+ label: "Customer",
897
+ operator: "contains",
898
+ value: "A very long name that does not fit the row",
899
+ onRemove: () => {}
900
+ })
901
+ })
902
+ ]
903
+ })
904
+ }),
905
+ /* @__PURE__ */ jsx("p", {
906
+ className: "filter-pill-caption",
907
+ children: "The states a page cannot hold still, drawn from the pill's own markup (a live pill would have to be hovered, focused or open): hovered (the value takes a tint), focused from the keyboard (a ring round the whole pill, and a tint on the part that has focus) and open (its sheet is up)."
908
+ }),
909
+ /* @__PURE__ */ jsx(ThemePair, {
910
+ align: "start",
911
+ minHeight: 80,
912
+ children: /* @__PURE__ */ jsxs("div", {
913
+ className: "filter-pill-stills",
914
+ children: [
915
+ /* @__PURE__ */ jsx(PillStill, {
916
+ state: "hover",
917
+ name: "Hovered"
918
+ }),
919
+ /* @__PURE__ */ jsx(PillStill, {
920
+ state: "focus",
921
+ name: "Focused"
922
+ }),
923
+ /* @__PURE__ */ jsx(PillStill, {
924
+ state: "open",
925
+ name: "Open"
926
+ })
927
+ ]
928
+ })
929
+ })
930
+ ]
931
+ })
932
+ ]
933
+ }),
934
+ /* @__PURE__ */ jsx(Section$1, {
935
+ id: "dialogs",
936
+ title: "Inside a dialog",
937
+ description: /* @__PURE__ */ jsxs("p", { children: [
938
+ "A modal dialog keeps focus and the pointer to itself, so a sheet portalled to the page would be swallowed. A pill inside a kit ",
939
+ /* @__PURE__ */ jsx("code", { children: "Dialog" }),
940
+ " or ",
941
+ /* @__PURE__ */ jsx("code", { children: "Sheet" }),
942
+ " opens its sheet in that dialog's own layer by itself, so it stays inside the focus trap and its list scrolls under the wheel: there is nothing to pass. Only a dialog that is not the kit's needs ",
943
+ /* @__PURE__ */ jsx("code", { children: "container" }),
944
+ ", set to that dialog's content element."
945
+ ] }),
946
+ children: /* @__PURE__ */ jsx(Example, {
947
+ minHeight: 200,
948
+ code: `
949
+ <DialogContent>
950
+ <FilterPill label="Payment" operator="in" value="Paid" onRemove={remove}>
951
+ <FilterOptionList options={options} value={value} onValueChange={setValue} />
952
+ </FilterPill>
953
+ </DialogContent>`,
954
+ children: /* @__PURE__ */ jsx(InDialog, {})
955
+ })
956
+ }),
957
+ /* @__PURE__ */ jsx(Section$1, {
958
+ id: "vendor",
959
+ title: "Where this differs from the vendor dashboard",
960
+ description: /* @__PURE__ */ jsxs("p", { children: [
961
+ "The pill looks as the vendor dashboard's does, to the pixel. Apply behaves as its does too: the text and range editors (and the range's quick picks) leave the sheet open, and the date editor closes it; set",
962
+ " ",
963
+ /* @__PURE__ */ jsx("code", { children: "closeOnApply" }),
964
+ " on an editor to turn either round. What differs is below, so a page ported from the vendor's knows what changes."
965
+ ] }),
966
+ children: /* @__PURE__ */ jsx(DocTable, {
967
+ columns: [
968
+ "",
969
+ "Vendor dashboard",
970
+ "Constellation"
971
+ ],
972
+ rows: [
973
+ [
974
+ "Opening the sheet from the keyboard",
975
+ "Focus stays on the value: one Tab goes to the cross and the sheet closes, so its choices cannot be reached from the keyboard at all.",
976
+ "Focus moves into the sheet: the search or text field, else the chosen row, else the first. Escape closes it and puts focus back on the value. A click on the value shows no ring on a row; opening from the keyboard does."
977
+ ],
978
+ [
979
+ "Several choices",
980
+ "Toggle buttons marked pressed, with a decorative box.",
981
+ "Native checkboxes in labelled rows: each is a checkbox to a screen reader, and a click anywhere on the row ticks it."
982
+ ],
983
+ [
984
+ "Searching a long list",
985
+ "A plain small field, with a magnifier at its end.",
986
+ "The kit's search field: a clear button, and Escape clears the query before a second Escape closes the sheet."
987
+ ],
988
+ [
989
+ "A range",
990
+ "A two-handled slider above the two fields.",
991
+ "The slider, the two fields and the quick picks: the slider for a rough range by pointer or arrow keys, the fields for an exact one."
992
+ ],
993
+ [
994
+ "The names a screen reader reads",
995
+ "The cross is \"Remove filter\" on every pill, and the value button reads only its value.",
996
+ "The value reads \"Payment status in Paid, Unpaid\", and the cross \"Remove filter Payment status\" unless you give removeLabel."
997
+ ],
998
+ [
999
+ "After a filter is removed",
1000
+ "Nothing manages focus: it is lost with the pill.",
1001
+ "Focus goes to the control before the pill in its row (the Add filter button, or the pill before), else the one after."
1002
+ ],
1003
+ [
1004
+ "The row at mid widths (the dashboards' ListToolbar)",
1005
+ "The filters take whatever the tools leave, so between 641 and about 1100px of canvas a run of pills stacks one to a line beside the search and tools.",
1006
+ "The filters ask for 24rem first: pills wrap beside the tools when there is room, and the tools drop onto a line of their own under the filters when there is not."
1007
+ ]
1008
+ ]
1009
+ })
1010
+ }),
1011
+ /* @__PURE__ */ jsx(Section$1, {
1012
+ id: "keyboard",
1013
+ title: "Keyboard",
1014
+ children: /* @__PURE__ */ jsx(DocTable, {
1015
+ columns: ["Key", "What it does"],
1016
+ rows: [
1017
+ ["Tab", "Moves between the value and the cross of each pill, and into the open sheet."],
1018
+ ["Enter or Space", "On the value: opens the sheet, with focus on its search or text field, the chosen row, or the first row. On a row: chooses it. On the cross: removes the filter, and focus goes to the control before it."],
1019
+ ["Arrow keys, Home, End", "In a list of choices: move between rows, from the first press (focus starts on a row). Down from the search box goes to the first row."],
1020
+ ["Enter", "In the text and range fields: applies."],
1021
+ ["Escape", "Closes the sheet and puts focus back on the value. In the search box it clears the query first."]
1022
+ ]
1023
+ })
1024
+ }),
1025
+ /* @__PURE__ */ jsxs(Section$1, {
1026
+ id: "guidelines",
1027
+ title: "Guidelines",
1028
+ children: [/* @__PURE__ */ jsx(DoDont, {
1029
+ do: {
1030
+ children: /* @__PURE__ */ jsx("div", {
1031
+ className: "filter-pill-row",
1032
+ children: /* @__PURE__ */ jsx(FilterPill, {
1033
+ label: "Payment",
1034
+ operator: "in",
1035
+ value: "Paid, Unpaid, +1 more...",
1036
+ onRemove: () => {}
1037
+ })
1038
+ }),
1039
+ caption: "Say the value in words a person would, and fold a long list into two names and a count."
1040
+ },
1041
+ dont: {
1042
+ children: /* @__PURE__ */ jsx("div", {
1043
+ className: "filter-pill-row",
1044
+ children: /* @__PURE__ */ jsx(FilterPill, {
1045
+ label: "paymentStatus",
1046
+ operator: "=",
1047
+ value: "paid,unpaid,refunded,partial",
1048
+ onRemove: () => {}
1049
+ })
1050
+ }),
1051
+ caption: "Do not show the field name, a symbol or the API value."
1052
+ }
1053
+ }), /* @__PURE__ */ jsx(Guidelines, { items: [
1054
+ "Put Add filter first in the row and the pills after it, so a filter switching on never moves what is under the pointer.",
1055
+ "Name each cross for its filter (\"Remove payment filter\") when you can say it better than the default, which reads \"Remove filter\" and the pill's name.",
1056
+ "Open the pill the person has just added (defaultOpen, or open). AddFilter reports its choice after its menu has closed, so the sheet is not dismissed by the menu giving focus back.",
1057
+ "Use the operator word that is true: \"is\" for one value, \"in\" for several, \"contains\" for text, \"between\" for a range.",
1058
+ "Choices apply as they are made; a text, range or date filter applies on its button. Do not mix the two in one sheet. The text and range sheets stay open after Apply and the date sheet closes, as the vendor's do.",
1059
+ "Keep Add filter first in the row: when a pill is removed with the keyboard, focus goes to the control before it.",
1060
+ "A filter that cannot change (a view fixed by the page) is a pill with no editor and no cross."
1061
+ ] })]
1062
+ }),
1063
+ /* @__PURE__ */ jsx(Section$1, {
1064
+ id: "accessibility",
1065
+ title: "Accessibility",
1066
+ children: /* @__PURE__ */ jsx(Guidelines, { items: [
1067
+ /* @__PURE__ */ jsxs(Fragment$1, { children: [
1068
+ "The pill is a ",
1069
+ /* @__PURE__ */ jsx("code", { children: "group" }),
1070
+ " named by its label (or by an ",
1071
+ /* @__PURE__ */ jsx("code", { children: "aria-label" }),
1072
+ " you give it). The value is a button that opens a dialog, named for what it changes: \"Payment in Paid, Unpaid\". The sheet is named by the filter (\"Payment\") unless you give ",
1073
+ /* @__PURE__ */ jsx("code", { children: "editorLabel" }),
1074
+ "."
1075
+ ] }),
1076
+ "Opening the sheet moves focus to its search or text field, its chosen row, or its first row, so Tab, the arrow keys and Escape work there; Escape puts focus back on the value. A click on the value shows no focus ring on a row; opening from the keyboard does.",
1077
+ "The cross is named \"Remove filter\" and then its pill (\"Remove filter Payment\"), or by removeLabel when you give one. It is a real button and keeps its place in the Tab order. Removing a filter with the keyboard moves focus to the control before the pill, not to the page.",
1078
+ "Several choices are native checkboxes in labelled rows; one choice is a row of toggle buttons marked pressed; radios are the RadioGroup. A search box is a search field with its own name, and what it leaves is said in a polite status as you type: \"2 results available\", or \"Nothing matches\" and what was typed.",
1079
+ "A choice that is off dims its words but keeps its place and its name, so the list reads the same; it is skipped by the arrow keys.",
1080
+ "Keyboard focus rings the whole pill, in teal, and tints the part that has it. The operator and the label are text and are read as part of the group.",
1081
+ "The state of a filter is always in words: \"Paid, Unpaid\" says what the filter is without colour."
1082
+ ] })
1083
+ }),
1084
+ /* @__PURE__ */ jsxs(Section$1, {
1085
+ id: "props",
1086
+ title: "Props",
1087
+ children: [
1088
+ /* @__PURE__ */ jsx(PropsTable, {
1089
+ title: "FilterPill",
1090
+ rows: [
1091
+ {
1092
+ name: "label",
1093
+ type: "ReactNode",
1094
+ required: true,
1095
+ description: "The filter's name: \"Payment\". Also names the group and, unless editorLabel is set, the sheet."
1096
+ },
1097
+ {
1098
+ name: "operator",
1099
+ type: "ReactNode",
1100
+ description: "How the value matches, as a word: \"is\", \"in\", \"contains\", \"between\". Leave it out for none."
1101
+ },
1102
+ {
1103
+ name: "value",
1104
+ type: "ReactNode",
1105
+ required: true,
1106
+ description: "The value as the text people read. The button that opens the editor."
1107
+ },
1108
+ {
1109
+ name: "children",
1110
+ type: "ReactNode",
1111
+ description: "The editor the value opens in a sheet. Leave it out and the value is plain text, not a button."
1112
+ },
1113
+ {
1114
+ name: "onRemove",
1115
+ type: "() => void",
1116
+ description: "Called when the cross is pressed. Leave it out for a pill with no cross. A pill that is removed while it has focus hands focus to the control before it in its row."
1117
+ },
1118
+ {
1119
+ name: "removeLabel",
1120
+ type: "string",
1121
+ description: "The cross's accessible name, used as it is. Left out it reads \"Remove filter\" and then the pill's label."
1122
+ },
1123
+ {
1124
+ name: "removeIcon",
1125
+ type: "ReactNode",
1126
+ description: "A cross of the host's own. Defaults to a drawn one."
1127
+ },
1128
+ {
1129
+ name: "open / defaultOpen / onOpenChange",
1130
+ type: "boolean / boolean / (open) => void",
1131
+ description: "Control the sheet, or start it open."
1132
+ },
1133
+ {
1134
+ name: "editorLabel",
1135
+ type: "string",
1136
+ description: "The sheet's accessible name. Defaults to the label."
1137
+ },
1138
+ {
1139
+ name: "container",
1140
+ type: "HTMLElement | null",
1141
+ description: "Where the sheet is portalled. Defaults to the layer of the kit's dialog or sheet the pill is in, else the page; a dialog that is not the kit's needs its content element here."
1142
+ }
1143
+ ]
1144
+ }),
1145
+ /* @__PURE__ */ jsx(PropsTable, {
1146
+ title: "FilterOptionList",
1147
+ rows: [
1148
+ {
1149
+ name: "options",
1150
+ type: "FilterOption[]",
1151
+ required: true,
1152
+ description: "{ value, label, searchText?, disabled?, count?, hint? }. A label can be any node; searchText is what the search matches. count and hint sit quiet at the row’s end; a text hint is searched too."
1153
+ },
1154
+ {
1155
+ name: "none",
1156
+ type: "boolean | { label?, value? }",
1157
+ description: "A row at the top for no value. true reads labels.none ('None'); its value is '' unless given. The search leaves it in place."
1158
+ },
1159
+ {
1160
+ name: "onCreate",
1161
+ type: "(query: string) => void | Promise",
1162
+ description: "Offer to create what was searched for, under the list, once no option reads it exactly (Enter in the search box does it while nothing matches). A promise holds the row busy; the search clears when it settles."
1163
+ },
1164
+ {
1165
+ name: "value",
1166
+ type: "string[]",
1167
+ default: "[]",
1168
+ description: "The values chosen. At most one in single and radio."
1169
+ },
1170
+ {
1171
+ name: "onValueChange",
1172
+ type: "(value: string[]) => void",
1173
+ description: "Called as each row is pressed, with the values that result."
1174
+ },
1175
+ {
1176
+ name: "mode",
1177
+ type: "'multiple' | 'single' | 'radio'",
1178
+ default: "'multiple'",
1179
+ description: "Ticks, one with a check at the end, or radios."
1180
+ },
1181
+ {
1182
+ name: "searchable / searchThreshold",
1183
+ type: "boolean / number",
1184
+ default: "auto / 8",
1185
+ description: "Show the search box, or how many options a list holds before it grows one."
1186
+ },
1187
+ {
1188
+ name: "labels",
1189
+ type: "{ search, clearSearch, empty, noMatches, results, create, none, count }",
1190
+ description: "The list's words, for translation. Defaults: 'Search', 'Clear search', 'No options available' (nothing to choose at all), (query) => 'Nothing matches \"zzz\"' (a search that finds nothing, also said politely), (count) => '2 results available', said as the search narrows the list, (query) => 'Create \"Fenwick\"', 'None', and (count) => '1,480', how a count is written."
1191
+ }
1192
+ ]
1193
+ }),
1194
+ /* @__PURE__ */ jsx(PropsTable, {
1195
+ title: "FilterTextEditor, FilterRangeEditor, FilterDateEditor",
1196
+ rows: [
1197
+ {
1198
+ name: "onApply",
1199
+ type: "varies",
1200
+ required: true,
1201
+ description: "Text: (value: string). Range: ({ min, max }). Date: ({ from: Date, to: Date })."
1202
+ },
1203
+ {
1204
+ name: "value",
1205
+ type: "varies",
1206
+ description: "What is applied now, which the editor starts with."
1207
+ },
1208
+ {
1209
+ name: "closeOnApply",
1210
+ type: "boolean",
1211
+ default: "false (date: true)",
1212
+ description: "Close the sheet once applied (or, for the range, once a quick pick is pressed). The text and range editors leave it open and the date editor closes it, as the vendor dashboard's do."
1213
+ },
1214
+ {
1215
+ name: "min / max / step / options / onPick / note",
1216
+ type: "FilterRangeEditor",
1217
+ description: "The bounds and step of the fields and the slider, the quick picks and what pressing one does, and a line beside Apply."
1218
+ },
1219
+ {
1220
+ name: "slider / formatValue",
1221
+ type: "FilterRangeEditor",
1222
+ description: "The two-thumb slider above the fields (true by default) and how its thumbs write a value (\"£250\")."
1223
+ },
1224
+ {
1225
+ name: "minValue / maxValue / locale / weekStartsOn",
1226
+ type: "FilterDateEditor",
1227
+ description: "The calendar's limits, language and first day of the week."
1228
+ },
1229
+ {
1230
+ name: "placeholder",
1231
+ type: "string",
1232
+ default: "'Type to search...'",
1233
+ description: "FilterTextEditor: what can be typed. It names the field."
1234
+ },
1235
+ {
1236
+ name: "labels",
1237
+ type: "object",
1238
+ description: "Each editor takes its words: apply (all), minimum and maximum (range), calendar (date)."
1239
+ }
1240
+ ]
1241
+ }),
1242
+ /* @__PURE__ */ jsx(PropsTable, {
1243
+ title: "AddFilter",
1244
+ rows: [
1245
+ {
1246
+ name: "filters",
1247
+ type: "{ value, label, disabled? }[]",
1248
+ required: true,
1249
+ description: "Every filter the list has. With none, nothing is drawn."
1250
+ },
1251
+ {
1252
+ name: "applied",
1253
+ type: "string[]",
1254
+ default: "[]",
1255
+ description: "The keys of the filters that are on: left out of the menu."
1256
+ },
1257
+ {
1258
+ name: "onAdd",
1259
+ type: "(value: string) => void",
1260
+ required: true,
1261
+ description: "Called with the key of the filter chosen, once the menu has closed and focus is back on the button, so a pill opened at once keeps its sheet."
1262
+ },
1263
+ {
1264
+ name: "children",
1265
+ type: "ReactNode",
1266
+ default: "'Add filter'",
1267
+ description: "The button's words."
1268
+ },
1269
+ {
1270
+ name: "emptyLabel",
1271
+ type: "ReactNode",
1272
+ default: "'All filters added'",
1273
+ description: "The dimmed row shown when every filter is on."
1274
+ },
1275
+ {
1276
+ name: "variant / size",
1277
+ type: "ButtonProps",
1278
+ default: "'secondary' / 'sm'",
1279
+ description: "The button. Other button attributes and the ref go to it."
1280
+ },
1281
+ {
1282
+ name: "container",
1283
+ type: "HTMLElement | null",
1284
+ description: "Where the menu is portalled."
1285
+ }
1286
+ ]
1287
+ }),
1288
+ /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "useFilterPillClose()" }), " returns a function that closes the sheet of the pill an editor sits in, for an editor of your own that applies a choice and is done."] })
1289
+ ]
1290
+ })
1291
+ ]
1292
+ });
1293
+ }
1294
+ //#endregion
1295
+ export { Page, Preview };