@wrdagency/blockout 0.1.10 → 1.0.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 (494) hide show
  1. package/dist/2NBKRL7C-Cug3TzgR.js +85 -0
  2. package/dist/{2RSXSRCN-qt84MtKs.js → 2RSXSRCN-Bc3g-z-i.js} +12 -12
  3. package/dist/{4CMBR7SL-BAGv8IL2.js → 4CMBR7SL-xNGezbCB.js} +31 -31
  4. package/dist/{5JTVDSTH-CG1NL6Fw.js → 5JTVDSTH-CIreO5bC.js} +26 -26
  5. package/dist/{5VQZOHHZ-CscZGerP.js → 5VQZOHHZ-CNzYHc1X.js} +1 -1
  6. package/dist/{6VRAQV3D-2rb_aClP.js → 6VRAQV3D-BoLhl3hf.js} +19 -19
  7. package/dist/A3WPL2ZJ-D0Eh1dEB.js +11 -0
  8. package/dist/ArrowBendDownRight.es-mejk84um.js +32 -0
  9. package/dist/BM6PGYQY-Bhr7peim.js +17 -0
  10. package/dist/{CaretDown.es-eySGHzTJ.js → CaretDown.es-BKFnosGJ.js} +3 -5
  11. package/dist/CaretDown.es-eyr5AnCc.js +8 -0
  12. package/dist/CaretLeft.es-C1wX08tw.js +32 -0
  13. package/dist/CaretRight.es-vnr78BGI.js +32 -0
  14. package/dist/DG5U6ZEL-C7eLVyh-.js +17 -0
  15. package/dist/DotsSixVertical.es-Ixbhxg7Z.js +38 -0
  16. package/dist/DotsThreeVertical.es-uadrGk3y.js +36 -0
  17. package/dist/EM5CXX6A-DKxCXPnz.js +14 -0
  18. package/dist/{F5MUBM3I-87B2_4WK.js → F5MUBM3I-_HauDyEF.js} +11 -11
  19. package/dist/G7GW6PWC-Crp1Jn-8.js +1236 -0
  20. package/dist/J2LQO3EC-CcHJqN0I.js +39 -0
  21. package/dist/KFH4SEIX-D-fCkpQv.js +120 -0
  22. package/dist/{LMDWO4NN--KEvZePp.js → LMDWO4NN-DdLnHzru.js} +47 -47
  23. package/dist/MR26YJYP-yD1_RvCA.js +283 -0
  24. package/dist/MTZPJQMC-RLG1q394.js +12 -0
  25. package/dist/MagnifyingGlass.es-CLstwG_v.js +32 -0
  26. package/dist/O2PQ2652-THp22K4G.js +51 -0
  27. package/dist/P7GR5CS5-Dub2zqTX.js +22 -0
  28. package/dist/{PFRGBC2K-BEg8ahbY.js → PFRGBC2K-DUhGSIey.js} +83 -83
  29. package/dist/{RS7LB2H4-D0fWv5qu.js → RS7LB2H4-C0kmTjy8.js} +3 -3
  30. package/dist/{RZ4GPYOB-13-5LlEb.js → RZ4GPYOB-c8s_KHUk.js} +6 -6
  31. package/dist/RadioButton.es-D3QVjfF9.js +36 -0
  32. package/dist/{S43UC3DV-Dn8EFLaT.js → S43UC3DV-erT1ucAd.js} +5 -5
  33. package/dist/{T7VMP3TM-DeRMoW8g.js → T7VMP3TM-C-Aesx9K.js} +10 -10
  34. package/dist/TP7N7UIH-mdk33dnV.js +34 -0
  35. package/dist/{UQQRIHDV-Bu8e1bYU.js → UQQRIHDV-DIXH69U3.js} +8 -8
  36. package/dist/{UYGDZTLQ-DcCmv5SE.js → UYGDZTLQ-fOwUiOjI.js} +4 -4
  37. package/dist/VIIRIBF3-DylpToFV.js +18 -0
  38. package/dist/WMYDSCNQ-D43V-JUe.js +62 -0
  39. package/dist/WYCIER3C-S-jsj0wy.js +59 -0
  40. package/dist/X.es-TbGOnXOO.js +38 -0
  41. package/dist/{YV4JVR4I-kvospPUa.js → YV4JVR4I-BXEaRiAN.js} +33 -33
  42. package/dist/assets/button.css +1 -1
  43. package/dist/assets/index.css +1 -1
  44. package/dist/assets/index10.css +1 -1
  45. package/dist/assets/index11.css +1 -1
  46. package/dist/assets/index12.css +1 -1
  47. package/dist/assets/index13.css +1 -1
  48. package/dist/assets/index14.css +1 -1
  49. package/dist/assets/index15.css +1 -1
  50. package/dist/assets/index16.css +1 -1
  51. package/dist/assets/index17.css +1 -1
  52. package/dist/assets/index18.css +1 -1
  53. package/dist/assets/index19.css +1 -1
  54. package/dist/assets/index2.css +1 -1
  55. package/dist/assets/index20.css +1 -1
  56. package/dist/assets/index3.css +1 -1
  57. package/dist/assets/index4.css +1 -1
  58. package/dist/assets/index5.css +1 -1
  59. package/dist/assets/index6.css +1 -1
  60. package/dist/assets/index7.css +1 -1
  61. package/dist/assets/index8.css +1 -1
  62. package/dist/assets/index9.css +1 -1
  63. package/dist/assets/prosemirror.css +1 -0
  64. package/dist/assets/root.css +1 -0
  65. package/dist/assets/style.css +1 -1
  66. package/dist/assets/style10.css +1 -0
  67. package/dist/assets/style11.css +1 -0
  68. package/dist/assets/style12.css +1 -0
  69. package/dist/assets/style13.css +1 -0
  70. package/dist/assets/style14.css +1 -0
  71. package/dist/assets/style15.css +1 -0
  72. package/dist/assets/style16.css +1 -0
  73. package/dist/assets/style17.css +1 -0
  74. package/dist/assets/style18.css +1 -0
  75. package/dist/assets/style19.css +1 -0
  76. package/dist/assets/style2.css +1 -1
  77. package/dist/assets/style20.css +1 -0
  78. package/dist/assets/style21.css +1 -0
  79. package/dist/assets/style22.css +1 -0
  80. package/dist/assets/style23.css +1 -0
  81. package/dist/assets/style24.css +1 -0
  82. package/dist/assets/style25.css +1 -0
  83. package/dist/assets/style3.css +1 -1
  84. package/dist/assets/style4.css +1 -1
  85. package/dist/assets/style5.css +1 -0
  86. package/dist/assets/style6.css +1 -0
  87. package/dist/assets/style7.css +1 -0
  88. package/dist/assets/style8.css +1 -0
  89. package/dist/assets/style9.css +1 -0
  90. package/dist/assets/styles2.css +1 -0
  91. package/dist/assets/styles3.css +1 -0
  92. package/dist/assets/styles4.css +1 -0
  93. package/dist/assets/styles5.css +1 -0
  94. package/dist/base-jB1DIMnz.js +559 -0
  95. package/dist/commands-IQnqt4xL.js +5937 -0
  96. package/dist/components/avatar/index.d.ts +10 -0
  97. package/dist/components/avatar/index.js +42 -0
  98. package/dist/components/badge/index.d.ts +7 -0
  99. package/dist/components/badge/index.js +24 -0
  100. package/dist/components/breadcrumbs/index.d.ts +2 -1
  101. package/dist/components/breadcrumbs/index.js +31 -63
  102. package/dist/components/breadcrumbs/types.d.ts +2 -1
  103. package/dist/components/button/button.d.ts +1 -0
  104. package/dist/components/button/icon.js +31 -10
  105. package/dist/components/button/index.js +7 -5
  106. package/dist/components/button/row.d.ts +7 -0
  107. package/dist/components/button/row.js +14 -0
  108. package/dist/components/controls/base-control/affix.d.ts +1 -1
  109. package/dist/components/controls/base-control/index.js +35 -23
  110. package/dist/components/controls/base-control/props.d.ts +9 -1
  111. package/dist/components/controls/base-control/props.js +31 -12
  112. package/dist/components/controls/base-popover-control/index.js +41 -27
  113. package/dist/components/controls/card-number-control/cards/index.d.ts +0 -1
  114. package/dist/components/controls/card-number-control/cards/index.js +6 -8
  115. package/dist/components/controls/card-number-control/index.js +39 -435
  116. package/dist/components/controls/checkbox-control/index.d.ts +2 -0
  117. package/dist/components/controls/checkbox-control/index.js +80 -46
  118. package/dist/components/controls/choice-control/choice.js +30 -23
  119. package/dist/components/controls/choice-control/index.js +6 -5
  120. package/dist/components/controls/date-control/component.d.ts +8 -7
  121. package/dist/components/controls/date-control/component.js +27 -28
  122. package/dist/components/controls/date-control/index.d.ts +5 -9
  123. package/dist/components/controls/date-control/index.js +131 -35
  124. package/dist/components/controls/date-control/picker.d.ts +8 -0
  125. package/dist/components/controls/date-control/picker.js +18 -0
  126. package/dist/components/controls/date-control/types.d.ts +10 -13
  127. package/dist/components/controls/date-control/types.js +75 -52
  128. package/dist/components/controls/date-control/util.d.ts +1 -0
  129. package/dist/components/controls/date-control/util.js +1608 -0
  130. package/dist/components/controls/index.d.ts +3 -1
  131. package/dist/components/controls/index.js +32 -27
  132. package/dist/components/controls/list-control/index.d.ts +9 -0
  133. package/dist/components/controls/list-control/index.js +42 -0
  134. package/dist/components/controls/list-control/item.d.ts +10 -0
  135. package/dist/components/controls/list-control/item.js +108 -0
  136. package/dist/components/controls/list-control/list.d.ts +10 -0
  137. package/dist/components/controls/list-control/list.js +89 -0
  138. package/dist/components/controls/list-control/types.d.ts +6 -0
  139. package/dist/components/controls/markdown-control/commands.d.ts +1 -0
  140. package/dist/components/controls/markdown-control/commands.js +5 -0
  141. package/dist/components/controls/markdown-control/editor.d.ts +8 -0
  142. package/dist/components/controls/markdown-control/editor.js +807 -0
  143. package/dist/components/controls/markdown-control/index.d.ts +7 -0
  144. package/dist/components/controls/markdown-control/index.js +20 -0
  145. package/dist/components/controls/markdown-control/slash/base.d.ts +14 -0
  146. package/dist/components/controls/markdown-control/slash/base.js +9 -0
  147. package/dist/components/controls/markdown-control/slash/mentions.d.ts +6 -0
  148. package/dist/components/controls/markdown-control/slash/mentions.js +14 -0
  149. package/dist/components/controls/markdown-control/toolbar.d.ts +6 -0
  150. package/dist/components/controls/markdown-control/toolbar.js +10 -0
  151. package/dist/components/controls/number-control/index.js +8 -7
  152. package/dist/components/controls/password-control/index.js +4 -3
  153. package/dist/components/controls/recurrence-control/index.js +81 -100
  154. package/dist/components/controls/select-control/control.d.ts +3 -0
  155. package/dist/components/controls/select-control/control.js +53 -0
  156. package/dist/components/controls/select-control/index.d.ts +2 -1
  157. package/dist/components/controls/select-control/index.js +6 -5
  158. package/dist/components/controls/select-control/props.d.ts +14 -0
  159. package/dist/components/controls/select-control/props.js +1 -0
  160. package/dist/components/controls/select-control/select.d.ts +3 -0
  161. package/dist/components/controls/select-control/select.js +1186 -0
  162. package/dist/components/controls/text-control/index.js +11 -10
  163. package/dist/components/controls/textarea-control/index.js +7 -6
  164. package/dist/components/controls/toggle-control/index.d.ts +4 -3
  165. package/dist/components/controls/toggle-control/index.js +73 -53
  166. package/dist/components/controls/toggle-group-control/index.d.ts +1 -0
  167. package/dist/components/controls/toggle-group-control/index.js +35 -26
  168. package/dist/components/data-form/api.d.ts +2 -0
  169. package/dist/components/data-form/api.js +1826 -0
  170. package/dist/components/data-form/autosave.d.ts +4 -0
  171. package/dist/components/data-form/autosave.js +12 -0
  172. package/dist/components/data-form/context.d.ts +10 -0
  173. package/dist/components/data-form/context.js +10 -0
  174. package/dist/components/data-form/form.d.ts +11 -0
  175. package/dist/components/data-form/form.js +30 -0
  176. package/dist/components/data-form/index.js +14 -0
  177. package/dist/components/data-form/row.d.ts +7 -0
  178. package/dist/components/data-form/row.js +16 -0
  179. package/dist/components/data-form/status.d.ts +6 -0
  180. package/dist/components/data-form/status.js +37 -0
  181. package/dist/components/data-form/submit.d.ts +10 -0
  182. package/dist/components/data-form/submit.js +37 -0
  183. package/dist/components/data-form/types.d.ts +37 -0
  184. package/dist/components/data-form/types.js +1 -0
  185. package/dist/components/data-view/api.d.ts +24 -0
  186. package/dist/components/data-view/api.js +31 -0
  187. package/dist/components/data-view/data/apply.d.ts +10 -0
  188. package/dist/components/data-view/data/apply.js +346 -0
  189. package/dist/components/data-view/data/fields.d.ts +4 -0
  190. package/dist/components/data-view/data/fields.js +26 -0
  191. package/dist/components/data-view/data/filter.d.ts +8 -0
  192. package/dist/components/data-view/data/filter.js +48 -0
  193. package/dist/components/data-view/data/layout.d.ts +2 -0
  194. package/dist/components/data-view/data/layout.js +19 -0
  195. package/dist/components/data-view/data/normalize.d.ts +5 -0
  196. package/dist/components/data-view/data/normalize.js +76 -0
  197. package/dist/components/data-view/data/options.d.ts +10 -0
  198. package/dist/components/data-view/data/options.js +297 -0
  199. package/dist/components/data-view/index.d.ts +5 -0
  200. package/dist/components/data-view/index.js +9 -0
  201. package/dist/components/data-view/layouts/grid/empty.d.ts +2 -0
  202. package/dist/components/data-view/layouts/grid/empty.js +6 -0
  203. package/dist/components/data-view/layouts/grid/group.d.ts +2 -0
  204. package/dist/components/data-view/layouts/grid/group.js +57 -0
  205. package/dist/components/data-view/layouts/grid/index.d.ts +3 -0
  206. package/dist/components/data-view/layouts/grid/index.js +8 -0
  207. package/dist/components/data-view/layouts/grid/item.d.ts +2 -0
  208. package/dist/components/data-view/layouts/grid/item.js +98 -0
  209. package/dist/components/data-view/layouts/grid/root.d.ts +2 -0
  210. package/dist/components/data-view/layouts/grid/root.js +6 -0
  211. package/dist/components/data-view/layouts/kanban/empty.d.ts +2 -0
  212. package/dist/components/data-view/layouts/kanban/empty.js +6 -0
  213. package/dist/components/data-view/layouts/kanban/group.d.ts +2 -0
  214. package/dist/components/data-view/layouts/kanban/group.js +57 -0
  215. package/dist/components/data-view/layouts/kanban/index.d.ts +3 -0
  216. package/dist/components/data-view/layouts/kanban/index.js +8 -0
  217. package/dist/components/data-view/layouts/kanban/item.d.ts +2 -0
  218. package/dist/components/data-view/layouts/kanban/item.js +98 -0
  219. package/dist/components/data-view/layouts/kanban/root.d.ts +2 -0
  220. package/dist/components/data-view/layouts/kanban/root.js +18 -0
  221. package/dist/components/data-view/layouts/list/empty.d.ts +2 -0
  222. package/dist/components/data-view/layouts/list/empty.js +6 -0
  223. package/dist/components/data-view/layouts/list/group.d.ts +2 -0
  224. package/dist/components/data-view/layouts/list/group.js +57 -0
  225. package/dist/components/data-view/layouts/list/index.d.ts +3 -0
  226. package/dist/components/data-view/layouts/list/index.js +8 -0
  227. package/dist/components/data-view/layouts/list/item.d.ts +2 -0
  228. package/dist/components/data-view/layouts/list/item.js +77 -0
  229. package/dist/components/data-view/layouts/list/root.d.ts +2 -0
  230. package/dist/components/data-view/layouts/list/root.js +6 -0
  231. package/dist/components/data-view/layouts/table/empty.d.ts +2 -0
  232. package/dist/components/data-view/layouts/table/empty.js +54 -0
  233. package/dist/components/data-view/layouts/table/group.d.ts +2 -0
  234. package/dist/components/data-view/layouts/table/group.js +67 -0
  235. package/dist/components/data-view/layouts/table/index.d.ts +3 -0
  236. package/dist/components/data-view/layouts/table/index.js +8 -0
  237. package/dist/components/data-view/layouts/table/item.d.ts +2 -0
  238. package/dist/components/data-view/layouts/table/item.js +77 -0
  239. package/dist/components/data-view/layouts/table/root.d.ts +2 -0
  240. package/dist/components/data-view/layouts/table/root.js +134 -0
  241. package/dist/components/data-view/parts/body/empty.d.ts +2 -0
  242. package/dist/components/data-view/parts/body/empty.js +50 -0
  243. package/dist/components/data-view/parts/body/index.d.ts +2 -0
  244. package/dist/components/data-view/parts/body/index.js +64 -0
  245. package/dist/components/data-view/parts/controls/index.d.ts +5 -0
  246. package/dist/components/data-view/parts/controls/index.js +139 -0
  247. package/dist/components/data-view/parts/controls/search.d.ts +5 -0
  248. package/dist/components/data-view/parts/controls/search.js +77 -0
  249. package/dist/components/data-view/parts/filters/chip.d.ts +13 -0
  250. package/dist/components/data-view/parts/filters/chip.js +53 -0
  251. package/dist/components/data-view/parts/filters/editor.d.ts +10 -0
  252. package/dist/components/data-view/parts/filters/editor.js +89 -0
  253. package/dist/components/data-view/parts/filters/index.js +9 -0
  254. package/dist/components/data-view/parts/filters/list.d.ts +11 -0
  255. package/dist/components/data-view/parts/filters/list.js +108 -0
  256. package/dist/components/data-view/parts/filters/utils.d.ts +2 -0
  257. package/dist/components/data-view/parts/filters/utils.js +13 -0
  258. package/dist/components/data-view/parts/footer/actions.d.ts +2 -0
  259. package/dist/components/data-view/parts/footer/actions.js +104 -0
  260. package/dist/components/data-view/parts/footer/index.js +68 -0
  261. package/dist/components/data-view/parts/footer/selection.d.ts +2 -0
  262. package/dist/components/data-view/parts/footer/selection.js +61 -0
  263. package/dist/components/data-view/parts/index.d.ts +5 -0
  264. package/dist/components/data-view/parts/index.js +12 -0
  265. package/dist/components/data-view/parts/view-control/index.d.ts +6 -0
  266. package/dist/components/data-view/parts/view-control/index.js +215 -0
  267. package/dist/components/data-view/root.d.ts +18 -0
  268. package/dist/components/data-view/root.js +105 -0
  269. package/dist/components/data-view/slots/group/checkbox.d.ts +7 -0
  270. package/dist/components/data-view/slots/group/checkbox.js +41 -0
  271. package/dist/components/data-view/slots/group/context.d.ts +12 -0
  272. package/dist/components/data-view/slots/group/context.js +23 -0
  273. package/dist/components/data-view/slots/group/icon.d.ts +1 -0
  274. package/dist/components/data-view/slots/group/icon.js +4 -0
  275. package/dist/components/data-view/slots/group/index.js +5 -0
  276. package/dist/components/data-view/slots/group/label.d.ts +3 -0
  277. package/dist/components/data-view/slots/group/label.js +5 -0
  278. package/dist/components/data-view/slots/index.d.ts +4 -0
  279. package/dist/components/data-view/slots/index.js +9 -0
  280. package/dist/components/data-view/slots/item/actions.d.ts +6 -0
  281. package/dist/components/data-view/slots/item/actions.js +44 -0
  282. package/dist/components/data-view/slots/item/checkbox.d.ts +7 -0
  283. package/dist/components/data-view/slots/item/checkbox.js +87 -0
  284. package/dist/components/data-view/slots/item/context.d.ts +8 -0
  285. package/dist/components/data-view/slots/item/context.js +10 -0
  286. package/dist/components/data-view/slots/item/depth.d.ts +3 -0
  287. package/dist/components/data-view/slots/item/depth.js +9 -0
  288. package/dist/components/data-view/slots/item/description.d.ts +3 -0
  289. package/dist/components/data-view/slots/item/description.js +6 -0
  290. package/dist/components/data-view/slots/item/index.js +8 -0
  291. package/dist/components/data-view/slots/item/properties.d.ts +13 -0
  292. package/dist/components/data-view/slots/item/properties.js +8 -0
  293. package/dist/components/data-view/slots/item/relations.d.ts +7 -0
  294. package/dist/components/data-view/slots/item/relations.js +21 -0
  295. package/dist/components/data-view/slots/item/tags.d.ts +6 -0
  296. package/dist/components/data-view/slots/item/tags.js +7 -0
  297. package/dist/components/data-view/slots/item/thumbnail.d.ts +6 -0
  298. package/dist/components/data-view/slots/item/thumbnail.js +6 -0
  299. package/dist/components/data-view/slots/item/title.d.ts +3 -0
  300. package/dist/components/data-view/slots/item/title.js +17 -0
  301. package/dist/components/data-view/slots/item/util.d.ts +6 -0
  302. package/dist/components/data-view/slots/item/util.js +6 -0
  303. package/dist/components/data-view/slots/property/context.d.ts +8 -0
  304. package/dist/components/data-view/slots/property/context.js +10 -0
  305. package/dist/components/data-view/slots/property/field/editable.d.ts +3 -0
  306. package/dist/components/data-view/slots/property/field/editable.js +42 -0
  307. package/dist/components/data-view/slots/property/field/index.d.ts +3 -0
  308. package/dist/components/data-view/slots/property/field/index.js +7 -0
  309. package/dist/components/data-view/slots/property/field/static.d.ts +8 -0
  310. package/dist/components/data-view/slots/property/field/static.js +7 -0
  311. package/dist/components/data-view/slots/property/field/types.d.ts +5 -0
  312. package/dist/components/data-view/slots/property/field/types.js +1 -0
  313. package/dist/components/data-view/slots/property/index.js +5 -0
  314. package/dist/components/data-view/slots/property/label.d.ts +7 -0
  315. package/dist/components/data-view/slots/property/label.js +5 -0
  316. package/dist/components/data-view/slots/root/checkbox.d.ts +7 -0
  317. package/dist/components/data-view/slots/root/checkbox.js +40 -0
  318. package/dist/components/data-view/slots/root/context.d.ts +25 -0
  319. package/dist/components/data-view/slots/root/context.js +11 -0
  320. package/dist/components/data-view/slots/root/index.js +5 -0
  321. package/dist/components/data-view/types/actions.d.ts +15 -0
  322. package/dist/components/data-view/types/actions.js +1 -0
  323. package/dist/components/data-view/types/fields.d.ts +64 -0
  324. package/dist/components/data-view/types/fields.js +1 -0
  325. package/dist/components/data-view/types/filters.d.ts +19 -0
  326. package/dist/components/data-view/types/filters.js +1 -0
  327. package/dist/components/data-view/types/hierarchy.d.ts +13 -0
  328. package/dist/components/data-view/types/hierarchy.js +1 -0
  329. package/dist/components/data-view/types/index.d.ts +3 -0
  330. package/dist/components/data-view/types/index.js +1 -0
  331. package/dist/components/data-view/types/view.d.ts +47 -0
  332. package/dist/components/data-view/types/view.js +1 -0
  333. package/dist/components/filesystem/file.js +1 -1
  334. package/dist/components/filesystem/folder.js +30 -29
  335. package/dist/components/filesystem/index.js +1 -1
  336. package/dist/components/filesystem/list.js +1 -1
  337. package/dist/components/filesystem/root.js +1 -1
  338. package/dist/components/form/components/pagination.js +72 -17
  339. package/dist/components/index.d.ts +7 -2
  340. package/dist/components/index.js +69 -50
  341. package/dist/components/menu/index.d.ts +4 -0
  342. package/dist/components/menu/index.js +40 -129
  343. package/dist/components/menu/item.js +1 -1
  344. package/dist/components/menu/items/action.js +2 -1
  345. package/dist/components/menu/items/spacer.js +3 -3
  346. package/dist/components/menu/items/submenu.js +4 -3
  347. package/dist/components/menu/items/toggle.js +11 -10
  348. package/dist/components/menu/types.d.ts +1 -0
  349. package/dist/components/pagination/index.d.ts +10 -0
  350. package/dist/components/pagination/index.js +63 -0
  351. package/dist/components/progress/index.d.ts +2 -1
  352. package/dist/components/progress/index.js +29 -20
  353. package/dist/components/shell/index.js +12 -0
  354. package/dist/components/shell/navigation.d.ts +6 -0
  355. package/dist/components/shell/navigation.js +6 -0
  356. package/dist/components/shell/pane.d.ts +9 -0
  357. package/dist/components/shell/pane.js +38 -0
  358. package/dist/components/shell/root.d.ts +7 -0
  359. package/dist/components/shell/root.js +31 -0
  360. package/dist/components/shell/sidebar.d.ts +6 -0
  361. package/dist/components/shell/sidebar.js +6 -0
  362. package/dist/components/tabs/index.js +1 -1
  363. package/dist/components/tabs/list.js +3 -3
  364. package/dist/components/tabs/panel.js +11 -10
  365. package/dist/components/tabs/root.js +42 -42
  366. package/dist/components/tabs/tab.js +4 -4
  367. package/dist/components/tag/index.js +8 -0
  368. package/dist/components/tag/list.d.ts +8 -0
  369. package/dist/components/tag/list.js +10 -0
  370. package/dist/components/tag/tag.d.ts +8 -0
  371. package/dist/components/tag/tag.js +26 -0
  372. package/dist/components/tag/types.d.ts +6 -0
  373. package/dist/components/tag/types.js +1 -0
  374. package/dist/components/toolbar/divider.d.ts +6 -0
  375. package/dist/components/toolbar/divider.js +24 -0
  376. package/dist/components/toolbar/index.js +19 -15
  377. package/dist/components/toolbar/root.js +67 -4
  378. package/dist/components/window/index.d.ts +8 -0
  379. package/dist/components/window/index.js +54 -0
  380. package/dist/{composite-provider-DNftbE5U.js → composite-provider-R5SnRc_G.js} +4 -4
  381. package/dist/filter-HYEwffYa.js +133 -0
  382. package/dist/floating-ui.dom-2MezWvgs.js +1070 -0
  383. package/dist/hooks/index.d.ts +4 -1
  384. package/dist/hooks/index.js +10 -4
  385. package/dist/hooks/input.js +13 -13
  386. package/dist/hooks/keyboard.d.ts +7 -0
  387. package/dist/hooks/keyboard.js +40 -0
  388. package/dist/hooks/selection.d.ts +19 -0
  389. package/dist/hooks/selection.js +57 -0
  390. package/dist/hooks/state.js +3 -3
  391. package/dist/hooks/temporary.d.ts +7 -0
  392. package/dist/hooks/temporary.js +12 -0
  393. package/dist/index-C2R91pmO.js +251 -0
  394. package/dist/index-CwFPDtaz.js +172 -0
  395. package/dist/index-D7vLJIGX.js +90 -0
  396. package/dist/index-DgyEPQBp.js +55 -0
  397. package/dist/index-EPj3dCzl.js +16324 -0
  398. package/dist/index-EQOyE9yF.js +73 -0
  399. package/dist/index.js +112 -63
  400. package/dist/item-C5GtZF5t.js +470 -0
  401. package/dist/picker-HwuTWxQw.js +858 -0
  402. package/dist/primitives/colourway/index.d.ts +9 -0
  403. package/dist/primitives/colourway/index.js +26 -0
  404. package/dist/primitives/colourway/util.d.ts +2 -0
  405. package/dist/primitives/colourway/util.js +146 -0
  406. package/dist/primitives/icon-label/index.d.ts +8 -0
  407. package/dist/primitives/icon-label/index.js +23 -0
  408. package/dist/primitives/index.d.ts +7 -0
  409. package/dist/primitives/index.js +34 -10
  410. package/dist/primitives/link/index.d.ts +5 -0
  411. package/dist/primitives/link/index.js +24 -0
  412. package/dist/primitives/popover/index.js +10 -0
  413. package/dist/primitives/popover/root.d.ts +10 -0
  414. package/dist/primitives/popover/root.js +5 -0
  415. package/dist/primitives/popover/target.d.ts +7 -0
  416. package/dist/primitives/popover/target.js +18 -0
  417. package/dist/primitives/popover/window.d.ts +6 -0
  418. package/dist/primitives/popover/window.js +38 -0
  419. package/dist/primitives/resizable/index.js +43 -32
  420. package/dist/primitives/scroll-area/index.js +4 -5
  421. package/dist/primitives/symbol/danger.d.ts +6 -0
  422. package/dist/primitives/symbol/danger.js +83 -0
  423. package/dist/primitives/symbol/index.d.ts +5 -0
  424. package/dist/primitives/symbol/index.js +12 -0
  425. package/dist/primitives/symbol/progress.d.ts +6 -0
  426. package/dist/primitives/symbol/progress.js +162 -0
  427. package/dist/primitives/symbol/types.d.ts +5 -0
  428. package/dist/primitives/symbol/types.js +1 -0
  429. package/dist/primitives/tooltip/index.d.ts +7 -0
  430. package/dist/primitives/tooltip/index.js +178 -0
  431. package/dist/primitives/truncate/index.js +14 -13
  432. package/dist/primitives/typography/heading.d.ts +16 -0
  433. package/dist/primitives/typography/heading.js +50 -0
  434. package/dist/primitives/typography/index.d.ts +2 -0
  435. package/dist/primitives/typography/index.js +12 -0
  436. package/dist/primitives/typography/paragraph.d.ts +9 -0
  437. package/dist/primitives/typography/paragraph.js +25 -0
  438. package/dist/protectedTokens-DdjZoCxO.js +587 -0
  439. package/dist/root-C7IYlG1s.js +20 -0
  440. package/dist/sortable.esm-De3H-_AA.js +3009 -0
  441. package/dist/style-A7_0w2WD.js +397 -0
  442. package/dist/style-Bp4uISf6.js +670 -0
  443. package/dist/toolbar-j1SJvq8D.js +6283 -0
  444. package/dist/types/component.d.ts +1 -0
  445. package/dist/types/options.d.ts +1 -0
  446. package/dist/types/options.js +8 -2
  447. package/dist/types/util.d.ts +1 -0
  448. package/dist/types/util.js +1 -0
  449. package/dist/utils/array.d.ts +1 -0
  450. package/dist/utils/array.js +9 -0
  451. package/dist/utils/components.d.ts +2 -1
  452. package/dist/utils/components.js +11 -7
  453. package/dist/utils/object.d.ts +1 -0
  454. package/dist/utils/object.js +8 -0
  455. package/dist/utils/url.d.ts +1 -0
  456. package/dist/utils/url.js +10 -0
  457. package/package.json +23 -3
  458. package/dist/2NBKRL7C-BAzCMGOw.js +0 -85
  459. package/dist/ArrowRight.es-xyNbtVOa.js +0 -60
  460. package/dist/DG5U6ZEL-CVj-Czp2.js +0 -17
  461. package/dist/MTZPJQMC-DyCWBG18.js +0 -14
  462. package/dist/P7GR5CS5-BoOYUfSQ.js +0 -19
  463. package/dist/TP7N7UIH-BHb1rEeb.js +0 -34
  464. package/dist/VIIRIBF3-D5DmZNtI.js +0 -26
  465. package/dist/WMYDSCNQ-Dy1O-Kdl.js +0 -2405
  466. package/dist/WYCIER3C-DRn904Gy.js +0 -175
  467. package/dist/components/block-editor/editor.d.ts +0 -5
  468. package/dist/components/block-editor/editor.js +0 -6
  469. package/dist/components/block-editor/index.d.ts +0 -1
  470. package/dist/components/block-editor/index.js +0 -4
  471. package/dist/components/button/index.d.ts +0 -4
  472. package/dist/components/controls/card-number-control/cards/generic.d.ts +0 -2
  473. package/dist/components/controls/card-number-control/cards/generic.js +0 -19
  474. package/dist/components/controls/select-control/component.d.ts +0 -12
  475. package/dist/components/controls/select-control/component.js +0 -1898
  476. package/dist/components/data-table/column.d.ts +0 -4
  477. package/dist/components/data-table/column.js +0 -874
  478. package/dist/components/data-table/context.d.ts +0 -7
  479. package/dist/components/data-table/context.js +0 -36
  480. package/dist/components/data-table/example.d.ts +0 -1
  481. package/dist/components/data-table/example.js +0 -5
  482. package/dist/components/data-table/footer.js +0 -23
  483. package/dist/components/data-table/header.d.ts +0 -7
  484. package/dist/components/data-table/header.js +0 -358
  485. package/dist/components/data-table/index.d.ts +0 -10
  486. package/dist/components/data-table/index.js +0 -86
  487. package/dist/components/data-table/types.d.ts +0 -75
  488. package/dist/hooks/theme.d.ts +0 -8
  489. package/dist/hooks/theme.js +0 -14
  490. package/dist/index-1AjPIqTN.js +0 -73
  491. package/dist/item-B1ugJ7YQ.js +0 -764
  492. package/dist/root-CaKPdqzv.js +0 -73
  493. /package/dist/components/{data-table → controls/list-control}/types.js +0 -0
  494. /package/dist/components/{data-table/footer.d.ts → data-view/parts/footer/index.d.ts} +0 -0
@@ -1,1898 +0,0 @@
1
- import { jsx as I, jsxs as X, Fragment as we } from "react/jsx-runtime";
2
- import { normalizeOption as Bt } from "../../../types/options.js";
3
- import { cn as jt } from "../../../utils/css.js";
4
- import { noop as Wt } from "../../../utils/noop.js";
5
- import { e as Zt } from "../../../CaretDown.es-eySGHzTJ.js";
6
- import * as N from "react";
7
- import { useMemo as Ce, useState as de, useRef as se, useEffect as ae, useCallback as Xe, useContext as Pe, createContext as ke, startTransition as $t } from "react";
8
- import { w as qt } from "../../../SSRBase.es-BUXS72ra.js";
9
- import { g as Yt } from "../../../_commonjsHelpers-C6fGbg64.js";
10
- import { BaseControl as zt } from "../base-control/index.js";
11
- import { Affix as Fe } from "../base-control/affix.js";
12
- import { useBaseControlProps as Qt } from "../base-control/props.js";
13
- import { C as Xt, a as Gt } from "../../../P7GR5CS5-BoOYUfSQ.js";
14
- import { a as ne, _ as oe, i as me, m as U, o as A, v as Ge, f as re, q as le, $ as Je, Y as ie, X as D, U as $, Z as Me, j as H, e as Q, H as et, l as he, n as ye, ab as tt, r as nt, s as Ae, t as Jt, P as ot, Q as rt, R as en, h as tn, u as nn, ac as lt, c as on, a0 as rn, A as ln, ad as sn, ae as an, af as un, x as Be, ag as Ie, a6 as cn, B as dn, b as Ve, a9 as mn, W as fn, K as vn, k as pn } from "../../../LMDWO4NN--KEvZePp.js";
15
- import { c as st, b as at, f as bn, e as hn, d as Sn, g as gn } from "../../../WMYDSCNQ-Dy1O-Kdl.js";
16
- import { c as it, d as ut, b as ct } from "../../../4CMBR7SL-BAGv8IL2.js";
17
- import { m as dt, o as Cn, t as mt, c as ft, s as G, b as J, g as vt, e as pt, f as be, u as bt, a as En, p as On } from "../../../YV4JVR4I-kvospPUa.js";
18
- import { a as ht, C as yn, b as St, c as An, d as xn, e as gt, u as In, f as wn } from "../../../S43UC3DV-Dn8EFLaT.js";
19
- import { t as Ct } from "../../../7PRQYBBV-91wrWGjk.js";
20
- import { u as Ne, a as De, S as Et, b as Pn, c as Vn, d as _n, e as je } from "../../../DG5U6ZEL-CVj-Czp2.js";
21
- import { u as kn } from "../../../MTZPJQMC-DyCWBG18.js";
22
- import { u as Ot } from "../../../T7VMP3TM-DeRMoW8g.js";
23
- import { i as yt } from "../../../WYCIER3C-DRn904Gy.js";
24
- import { u as At } from "../../../5JTVDSTH-CG1NL6Fw.js";
25
- import { h as _e } from "../../../PFRGBC2K-BEg8ahbY.js";
26
- import { u as xt } from "../../../UQQRIHDV-Bu8e1bYU.js";
27
- import { u as It } from "../../../6VRAQV3D-2rb_aClP.js";
28
- var Mn = "span", Nn = {
29
- top: "4,10 8,6 12,10",
30
- right: "6,4 10,8 6,12",
31
- bottom: "4,6 8,10 12,6",
32
- left: "10,4 6,8 10,12"
33
- }, wt = ne(function(n) {
34
- var o = n, { store: e, placement: r } = o, l = oe(o, ["store", "placement"]);
35
- const a = kn();
36
- e = e || a, me(
37
- e,
38
- process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
39
- );
40
- const f = e.useState((s) => r || s.placement).split("-")[0], c = Nn[f], i = Ce(
41
- () => /* @__PURE__ */ I(
42
- "svg",
43
- {
44
- display: "block",
45
- fill: "none",
46
- stroke: "currentColor",
47
- strokeLinecap: "round",
48
- strokeLinejoin: "round",
49
- strokeWidth: 1.5,
50
- viewBox: "0 0 16 16",
51
- height: "1em",
52
- width: "1em",
53
- children: /* @__PURE__ */ I("polyline", { points: c })
54
- }
55
- ),
56
- [c]
57
- );
58
- return l = U(A({
59
- children: i,
60
- "aria-hidden": !0
61
- }, l), {
62
- style: A({
63
- width: "1em",
64
- height: "1em",
65
- pointerEvents: "none"
66
- }, l.style)
67
- }), Ge(l);
68
- });
69
- re(
70
- function(n) {
71
- const o = wt(n);
72
- return le(Mn, o);
73
- }
74
- );
75
- function Dn(t = {}) {
76
- var n = t, {
77
- combobox: o
78
- } = n, e = Je(n, [
79
- "combobox"
80
- ]);
81
- const r = dt(
82
- e.store,
83
- Cn(o, [
84
- "value",
85
- "items",
86
- "renderedItems",
87
- "baseElement",
88
- "arrowElement",
89
- "anchorElement",
90
- "contentElement",
91
- "popoverElement",
92
- "disclosureElement"
93
- ])
94
- );
95
- mt(e, r);
96
- const l = r.getState(), a = it(ie($({}, e), {
97
- store: r,
98
- virtualFocus: D(
99
- e.virtualFocus,
100
- l.virtualFocus,
101
- !0
102
- ),
103
- includesBaseElement: D(
104
- e.includesBaseElement,
105
- l.includesBaseElement,
106
- !1
107
- ),
108
- activeId: D(
109
- e.activeId,
110
- l.activeId,
111
- e.defaultActiveId,
112
- null
113
- ),
114
- orientation: D(
115
- e.orientation,
116
- l.orientation,
117
- "vertical"
118
- )
119
- })), m = st(ie($({}, e), {
120
- store: r,
121
- placement: D(
122
- e.placement,
123
- l.placement,
124
- "bottom-start"
125
- )
126
- })), f = new String(""), c = ie($($({}, a.getState()), m.getState()), {
127
- value: D(
128
- e.value,
129
- l.value,
130
- e.defaultValue,
131
- f
132
- ),
133
- setValueOnMove: D(
134
- e.setValueOnMove,
135
- l.setValueOnMove,
136
- !1
137
- ),
138
- labelElement: D(l.labelElement, null),
139
- selectElement: D(l.selectElement, null),
140
- listElement: D(l.listElement, null)
141
- }), i = ft(c, a, m, r);
142
- return G(
143
- i,
144
- () => J(i, ["value", "items"], (s) => {
145
- if (s.value !== f || !s.items.length) return;
146
- const v = s.items.find(
147
- (C) => !C.disabled && C.value != null
148
- );
149
- (v == null ? void 0 : v.value) != null && i.setState("value", v.value);
150
- })
151
- ), G(
152
- i,
153
- () => J(i, ["mounted"], (s) => {
154
- s.mounted || i.setState("activeId", c.activeId);
155
- })
156
- ), G(
157
- i,
158
- () => J(i, ["mounted", "items", "value"], (s) => {
159
- if (o || s.mounted) return;
160
- const v = Ct(s.value), C = v[v.length - 1];
161
- if (C == null) return;
162
- const d = s.items.find(
163
- (p) => !p.disabled && p.value === C
164
- );
165
- d && i.setState("activeId", d.id);
166
- })
167
- ), G(
168
- i,
169
- () => vt(i, ["setValueOnMove", "moves"], (s) => {
170
- const { mounted: v, value: C, activeId: d } = i.getState();
171
- if (!s.setValueOnMove && v || Array.isArray(C) || !s.moves || !d) return;
172
- const p = a.item(d);
173
- !p || p.disabled || p.value == null || i.setState("value", p.value);
174
- })
175
- ), ie($($($({}, a), m), i), {
176
- combobox: o,
177
- setValue: (s) => i.setState("value", s),
178
- setLabelElement: (s) => i.setState("labelElement", s),
179
- setSelectElement: (s) => i.setState("selectElement", s),
180
- setListElement: (s) => i.setState("listElement", s)
181
- });
182
- }
183
- function Ln(t) {
184
- const n = ht();
185
- return t = U(A({}, t), {
186
- combobox: t.combobox !== void 0 ? t.combobox : n
187
- }), ut(t);
188
- }
189
- function Tn(t, n, o) {
190
- return Me(n, [o.combobox]), be(t, o, "value", "setValue"), be(t, o, "setValueOnMove"), Object.assign(
191
- at(
192
- ct(t, n, o),
193
- n,
194
- o
195
- ),
196
- { combobox: o.combobox }
197
- );
198
- }
199
- function Rn(t = {}) {
200
- t = Ln(t);
201
- const [n, o] = pt(Dn, t);
202
- return Tn(n, o, t);
203
- }
204
- var Kn = "span", Hn = ne(
205
- function(n) {
206
- var o = n, { store: e } = o, r = oe(o, ["store"]);
207
- const l = Ne();
208
- return e = e || l, r = wt(A({ store: e }, r)), r;
209
- }
210
- ), Un = re(function(n) {
211
- const o = Hn(n);
212
- return le(Kn, o);
213
- }), Fn = "button";
214
- function Bn(t) {
215
- return Array.from(t.selectedOptions).map((n) => n.value);
216
- }
217
- function Oe(t, n) {
218
- return () => {
219
- const o = n();
220
- if (!o) return;
221
- let e = 0, r = t.item(o);
222
- const l = r;
223
- for (; r && r.value == null; ) {
224
- const a = n(++e);
225
- if (!a) return;
226
- if (r = t.item(a), r === l) break;
227
- }
228
- return r == null ? void 0 : r.id;
229
- };
230
- }
231
- var jn = ne(function(n) {
232
- var o = n, {
233
- store: e,
234
- name: r,
235
- form: l,
236
- required: a,
237
- showOnKeyDown: m = !0,
238
- moveOnKeyDown: f = !0,
239
- toggleOnPress: c = !0,
240
- toggleOnClick: i = c
241
- } = o, s = oe(o, [
242
- "store",
243
- "name",
244
- "form",
245
- "required",
246
- "showOnKeyDown",
247
- "moveOnKeyDown",
248
- "toggleOnPress",
249
- "toggleOnClick"
250
- ]);
251
- const v = De();
252
- e = e || v, me(
253
- e,
254
- process.env.NODE_ENV !== "production" && "Select must receive a `store` prop or be wrapped in a SelectProvider component."
255
- );
256
- const C = s.onKeyDown, d = H(m), p = H(f), O = e.useState("placement").split("-")[0], g = e.useState("value"), R = Array.isArray(g), K = Q((S) => {
257
- var E;
258
- if (C == null || C(S), S.defaultPrevented || !e) return;
259
- const { orientation: q, items: Y, activeId: ee } = e.getState(), fe = q !== "horizontal", ue = q !== "vertical", M = !!((E = Y.find((Ee) => !Ee.disabled && Ee.value != null)) != null && E.rowId), pe = {
260
- ArrowUp: (M || fe) && Oe(e, e.up),
261
- ArrowRight: (M || ue) && Oe(e, e.next),
262
- ArrowDown: (M || fe) && Oe(e, e.down),
263
- ArrowLeft: (M || ue) && Oe(e, e.previous)
264
- }[S.key];
265
- pe && p(S) && (S.preventDefault(), e.move(pe()));
266
- const Se = O === "top" || O === "bottom";
267
- ({
268
- ArrowDown: Se,
269
- ArrowUp: Se,
270
- ArrowLeft: O === "left",
271
- ArrowRight: O === "right"
272
- })[S.key] && d(S) && (S.preventDefault(), e.move(ee), et(S.currentTarget, "keyup", e.show));
273
- });
274
- s = he(
275
- s,
276
- (S) => /* @__PURE__ */ I(Et, { value: e, children: S }),
277
- [e]
278
- );
279
- const [P, _] = de(!1), w = se(!1);
280
- ae(() => {
281
- const S = w.current;
282
- w.current = !1, !S && _(!1);
283
- }, [g]);
284
- const B = e.useState((S) => {
285
- var E;
286
- return (E = S.labelElement) == null ? void 0 : E.id;
287
- }), b = s["aria-label"], y = s["aria-labelledby"] || B, j = e.useState((S) => {
288
- if (r)
289
- return S.items;
290
- }), W = Ce(() => [...new Set(j == null ? void 0 : j.map((S) => S.value).filter((S) => S != null))], [j]);
291
- s = he(
292
- s,
293
- (S) => r ? /* @__PURE__ */ X(we, { children: [
294
- /* @__PURE__ */ X(
295
- "select",
296
- {
297
- style: {
298
- border: 0,
299
- clip: "rect(0 0 0 0)",
300
- height: "1px",
301
- margin: "-1px",
302
- overflow: "hidden",
303
- padding: 0,
304
- position: "absolute",
305
- whiteSpace: "nowrap",
306
- width: "1px"
307
- },
308
- tabIndex: -1,
309
- "aria-hidden": !0,
310
- "aria-label": b,
311
- "aria-labelledby": y,
312
- name: r,
313
- form: l,
314
- required: a,
315
- disabled: s.disabled,
316
- value: g,
317
- multiple: R,
318
- onFocus: () => {
319
- var E;
320
- return (E = e == null ? void 0 : e.getState().selectElement) == null ? void 0 : E.focus();
321
- },
322
- onChange: (E) => {
323
- w.current = !0, _(!0), e == null || e.setValue(
324
- R ? Bn(E.target) : E.target.value
325
- );
326
- },
327
- children: [
328
- Ct(g).map((E) => E == null || W.includes(E) ? null : /* @__PURE__ */ I("option", { value: E, children: E }, E)),
329
- W.map((E) => /* @__PURE__ */ I("option", { value: E, children: E }, E))
330
- ]
331
- }
332
- ),
333
- S
334
- ] }) : S,
335
- [
336
- e,
337
- b,
338
- y,
339
- r,
340
- l,
341
- a,
342
- g,
343
- R,
344
- W,
345
- s.disabled
346
- ]
347
- );
348
- const h = /* @__PURE__ */ X(we, { children: [
349
- g,
350
- /* @__PURE__ */ I(Un, {})
351
- ] }), k = e.useState("contentElement");
352
- return s = U(A({
353
- role: "combobox",
354
- "aria-autocomplete": "none",
355
- "aria-labelledby": B,
356
- "aria-haspopup": tt(k, "listbox"),
357
- "data-autofill": P || void 0,
358
- "data-name": r,
359
- children: h
360
- }, s), {
361
- ref: ye(e.setSelectElement, s.ref),
362
- onKeyDown: K
363
- }), s = bn(A({ store: e, toggleOnClick: i }, s)), s = Ot(A({ store: e }, s)), s;
364
- }), Wn = re(function(n) {
365
- const o = jn(n);
366
- return le(Fn, o);
367
- });
368
- function Zn(t = {}) {
369
- const n = Rn(t);
370
- return /* @__PURE__ */ I(Pn, { value: n, children: t.children });
371
- }
372
- var $n = "div";
373
- function qn(t, n) {
374
- if (n != null)
375
- return t == null ? !1 : Array.isArray(t) ? t.includes(n) : t === n;
376
- }
377
- var Yn = ne(
378
- function(n) {
379
- var o = n, {
380
- store: e,
381
- value: r,
382
- getItem: l,
383
- hideOnClick: a,
384
- setValueOnClick: m = r != null,
385
- preventScrollOnKeyDown: f = !0,
386
- focusOnHover: c = !0
387
- } = o, i = oe(o, [
388
- "store",
389
- "value",
390
- "getItem",
391
- "hideOnClick",
392
- "setValueOnClick",
393
- "preventScrollOnKeyDown",
394
- "focusOnHover"
395
- ]), s;
396
- const v = Vn();
397
- e = e || v, me(
398
- e,
399
- process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
400
- );
401
- const C = Ae(i.id), d = Jt(i), { listElement: p, multiSelectable: V, selected: O, autoFocus: g } = bt(e, {
402
- listElement: "listElement",
403
- multiSelectable(b) {
404
- return Array.isArray(b.value);
405
- },
406
- selected(b) {
407
- return qn(b.value, r);
408
- },
409
- autoFocus(b) {
410
- return r == null || b.value == null || b.activeId !== C && (e != null && e.item(b.activeId)) ? !1 : Array.isArray(b.value) ? b.value[b.value.length - 1] === r : b.value === r;
411
- }
412
- }), R = Xe(
413
- (b) => {
414
- const y = U(A({}, b), {
415
- value: d ? void 0 : r,
416
- children: r
417
- });
418
- return l ? l(y) : y;
419
- },
420
- [d, r, l]
421
- );
422
- a = a ?? (r != null && !V);
423
- const K = i.onClick, P = H(m), _ = H(a), w = Q((b) => {
424
- K == null || K(b), !b.defaultPrevented && (ot(b) || rt(b) || (P(b) && r != null && (e == null || e.setValue((y) => Array.isArray(y) ? y.includes(r) ? y.filter((j) => j !== r) : [...y, r] : r)), _(b) && (e == null || e.hide())));
425
- });
426
- i = he(
427
- i,
428
- (b) => /* @__PURE__ */ I(_n.Provider, { value: O ?? !1, children: b }),
429
- [O]
430
- ), i = U(A({
431
- id: C,
432
- role: en(p),
433
- "aria-selected": O,
434
- children: r
435
- }, i), {
436
- autoFocus: (s = i.autoFocus) != null ? s : g,
437
- onClick: w
438
- }), i = It(A({
439
- store: e,
440
- getItem: R,
441
- preventScrollOnKeyDown: f
442
- }, i));
443
- const B = H(c);
444
- return i = xt(U(A({
445
- store: e
446
- }, i), {
447
- // We have to disable focusOnHover when the popup is closed, otherwise
448
- // the active item will change to null (the container) when the popup is
449
- // closed by clicking on an item.
450
- focusOnHover(b) {
451
- if (!B(b)) return !1;
452
- const y = e == null ? void 0 : e.getState();
453
- return !!(y != null && y.open);
454
- }
455
- })), i;
456
- }
457
- ), zn = nt(
458
- re(function(n) {
459
- const o = Yn(n);
460
- return le($n, o);
461
- })
462
- ), Qn = "div", We = ke(null), Pt = ne(
463
- function(n) {
464
- var o = n, {
465
- store: e,
466
- resetOnEscape: r = !0,
467
- hideOnEnter: l = !0,
468
- focusOnMove: a = !0,
469
- composite: m,
470
- alwaysVisible: f
471
- } = o, c = oe(o, [
472
- "store",
473
- "resetOnEscape",
474
- "hideOnEnter",
475
- "focusOnMove",
476
- "composite",
477
- "alwaysVisible"
478
- ]);
479
- const i = Ne();
480
- e = e || i, me(
481
- e,
482
- process.env.NODE_ENV !== "production" && "SelectList must receive a `store` prop or be wrapped in a SelectProvider component."
483
- );
484
- const s = Ae(c.id), v = e.useState("value"), C = Array.isArray(v), [d, p] = de(v), V = e.useState("mounted");
485
- ae(() => {
486
- V || p(v);
487
- }, [V, v]), r = r && !C;
488
- const O = c.onKeyDown, g = H(r), R = H(l), K = Q((M) => {
489
- O == null || O(M), !M.defaultPrevented && (M.key === "Escape" && g(M) && (e == null || e.setValue(d)), (M.key === " " || M.key === "Enter") && tn(M) && R(M) && (M.preventDefault(), e == null || e.hide()));
490
- }), P = Pe(je), _ = de(), [w, B] = P || _, b = Ce(
491
- () => [w, B],
492
- [w]
493
- ), [y, j] = de(null), W = Pe(We);
494
- ae(() => {
495
- if (W)
496
- return W(e), () => W(null);
497
- }, [W, e]), c = he(
498
- c,
499
- (M) => /* @__PURE__ */ I(Et, { value: e, children: /* @__PURE__ */ I(We.Provider, { value: j, children: /* @__PURE__ */ I(je.Provider, { value: b, children: M }) }) }),
500
- [e, b]
501
- );
502
- const h = !!e.combobox;
503
- m = m ?? (!h && y !== e);
504
- const [k, S] = nn(
505
- m ? e.setListElement : null
506
- ), E = lt(k, "role", c.role), Y = (m || (E === "listbox" || E === "menu" || E === "tree" || E === "grid")) && C || void 0, ee = yt(V, c.hidden, f), fe = ee ? U(A({}, c.style), { display: "none" }) : c.style;
507
- m && (c = A({
508
- role: "listbox",
509
- "aria-multiselectable": Y
510
- }, c));
511
- const ue = e.useState(
512
- (M) => {
513
- var ve;
514
- return w || ((ve = M.labelElement) == null ? void 0 : ve.id);
515
- }
516
- );
517
- return c = U(A({
518
- id: s,
519
- "aria-labelledby": ue,
520
- hidden: ee
521
- }, c), {
522
- ref: ye(S, c.ref),
523
- style: fe,
524
- onKeyDown: K
525
- }), c = At(U(A({ store: e }, c), { composite: m })), c = Ot(A({ store: e, typeahead: !h }, c)), c;
526
- }
527
- ), Xn = re(function(n) {
528
- const o = Pt(n);
529
- return le(Qn, o);
530
- }), Gn = "div", Jn = ne(
531
- function(n) {
532
- var o = n, { store: e, alwaysVisible: r } = o, l = oe(o, ["store", "alwaysVisible"]);
533
- const a = De();
534
- return e = e || a, l = Pt(A({ store: e, alwaysVisible: r }, l)), l = Sn(A({ store: e, alwaysVisible: r }, l)), l;
535
- }
536
- ), eo = hn(
537
- re(function(n) {
538
- const o = Jn(n);
539
- return le(Gn, o);
540
- }),
541
- De
542
- );
543
- function to({
544
- store: t,
545
- fallback: n,
546
- children: o
547
- } = {}) {
548
- const e = Ne();
549
- t = t || e;
550
- const r = En(t, (l) => l != null && l.value.length ? l.value : n);
551
- return o ? o(r || "") : r;
552
- }
553
- ke(null);
554
- ke(
555
- null
556
- );
557
- var no = on(
558
- [Gt],
559
- [Xt]
560
- ), oo = no.useContext, ro = ln() && sn();
561
- function lo(t = {}) {
562
- var n = t, {
563
- tag: o
564
- } = n, e = Je(n, [
565
- "tag"
566
- ]);
567
- const r = dt(e.store, On(o, ["value", "rtl"]));
568
- mt(e, r);
569
- const l = o == null ? void 0 : o.getState(), a = r == null ? void 0 : r.getState(), m = D(
570
- e.activeId,
571
- a == null ? void 0 : a.activeId,
572
- e.defaultActiveId,
573
- null
574
- ), f = it(ie($({}, e), {
575
- activeId: m,
576
- includesBaseElement: D(
577
- e.includesBaseElement,
578
- a == null ? void 0 : a.includesBaseElement,
579
- !0
580
- ),
581
- orientation: D(
582
- e.orientation,
583
- a == null ? void 0 : a.orientation,
584
- "vertical"
585
- ),
586
- focusLoop: D(e.focusLoop, a == null ? void 0 : a.focusLoop, !0),
587
- focusWrap: D(e.focusWrap, a == null ? void 0 : a.focusWrap, !0),
588
- virtualFocus: D(
589
- e.virtualFocus,
590
- a == null ? void 0 : a.virtualFocus,
591
- !0
592
- )
593
- })), c = st(ie($({}, e), {
594
- placement: D(
595
- e.placement,
596
- a == null ? void 0 : a.placement,
597
- "bottom-start"
598
- )
599
- })), i = D(
600
- e.value,
601
- a == null ? void 0 : a.value,
602
- e.defaultValue,
603
- ""
604
- ), s = D(
605
- e.selectedValue,
606
- a == null ? void 0 : a.selectedValue,
607
- l == null ? void 0 : l.values,
608
- e.defaultSelectedValue,
609
- ""
610
- ), v = Array.isArray(s), C = ie($($({}, f.getState()), c.getState()), {
611
- value: i,
612
- selectedValue: s,
613
- resetValueOnSelect: D(
614
- e.resetValueOnSelect,
615
- a == null ? void 0 : a.resetValueOnSelect,
616
- v
617
- ),
618
- resetValueOnHide: D(
619
- e.resetValueOnHide,
620
- a == null ? void 0 : a.resetValueOnHide,
621
- v && !o
622
- ),
623
- activeValue: a == null ? void 0 : a.activeValue
624
- }), d = ft(C, f, c, r);
625
- return ro && G(
626
- d,
627
- () => J(d, ["virtualFocus"], () => {
628
- d.setState("virtualFocus", !1);
629
- })
630
- ), G(d, () => {
631
- if (o)
632
- return rn(
633
- J(d, ["selectedValue"], (p) => {
634
- Array.isArray(p.selectedValue) && o.setValues(p.selectedValue);
635
- }),
636
- J(o, ["values"], (p) => {
637
- d.setState("selectedValue", p.values);
638
- })
639
- );
640
- }), G(
641
- d,
642
- () => J(d, ["resetValueOnHide", "mounted"], (p) => {
643
- p.resetValueOnHide && (p.mounted || d.setState("value", i));
644
- })
645
- ), G(
646
- d,
647
- () => J(d, ["open"], (p) => {
648
- p.open || (d.setState("activeId", m), d.setState("moves", 0));
649
- })
650
- ), G(
651
- d,
652
- () => J(d, ["moves", "activeId"], (p, V) => {
653
- p.moves === V.moves && d.setState("activeValue", void 0);
654
- })
655
- ), G(
656
- d,
657
- () => vt(d, ["moves", "renderedItems"], (p, V) => {
658
- if (p.moves === V.moves) return;
659
- const { activeId: O } = d.getState(), g = f.item(O);
660
- d.setState("activeValue", g == null ? void 0 : g.value);
661
- })
662
- ), ie($($($({}, c), f), d), {
663
- tag: o,
664
- setValue: (p) => d.setState("value", p),
665
- resetValue: () => d.setState("value", C.value),
666
- setSelectedValue: (p) => d.setState("selectedValue", p)
667
- });
668
- }
669
- function so(t) {
670
- const n = oo();
671
- return t = U(A({}, t), {
672
- tag: t.tag !== void 0 ? t.tag : n
673
- }), ut(t);
674
- }
675
- function ao(t, n, o) {
676
- return Me(n, [o.tag]), be(t, o, "value", "setValue"), be(t, o, "selectedValue", "setSelectedValue"), be(t, o, "resetValueOnHide"), be(t, o, "resetValueOnSelect"), Object.assign(
677
- ct(
678
- at(t, n, o),
679
- n,
680
- o
681
- ),
682
- { tag: o.tag }
683
- );
684
- }
685
- function io(t = {}) {
686
- t = so(t);
687
- const [n, o] = pt(lo, t);
688
- return ao(n, o, t);
689
- }
690
- var uo = "input";
691
- function Ze(t, n, o) {
692
- if (!o) return !1;
693
- const e = t.find((r) => !r.disabled && r.value);
694
- return (e == null ? void 0 : e.value) === n;
695
- }
696
- function $e(t, n) {
697
- return !n || t == null ? !1 : (t = vn(t), n.length > t.length && n.toLowerCase().indexOf(t.toLowerCase()) === 0);
698
- }
699
- function co(t) {
700
- return t.type === "input";
701
- }
702
- function mo(t) {
703
- return t === "inline" || t === "list" || t === "both" || t === "none";
704
- }
705
- function fo(t) {
706
- const n = t.find((o) => {
707
- var e;
708
- return o.disabled ? !1 : ((e = o.element) == null ? void 0 : e.getAttribute("role")) !== "tab";
709
- });
710
- return n == null ? void 0 : n.id;
711
- }
712
- var vo = ne(
713
- function(n) {
714
- var o = n, {
715
- store: e,
716
- focusable: r = !0,
717
- autoSelect: l = !1,
718
- getAutoSelectId: a,
719
- setValueOnChange: m,
720
- showMinLength: f = 0,
721
- showOnChange: c,
722
- showOnMouseDown: i,
723
- showOnClick: s = i,
724
- showOnKeyDown: v,
725
- showOnKeyPress: C = v,
726
- blurActiveItemOnClick: d,
727
- setValueOnClick: p = !0,
728
- moveOnKeyPress: V = !0,
729
- autoComplete: O = "list"
730
- } = o, g = oe(o, [
731
- "store",
732
- "focusable",
733
- "autoSelect",
734
- "getAutoSelectId",
735
- "setValueOnChange",
736
- "showMinLength",
737
- "showOnChange",
738
- "showOnMouseDown",
739
- "showOnClick",
740
- "showOnKeyDown",
741
- "showOnKeyPress",
742
- "blurActiveItemOnClick",
743
- "setValueOnClick",
744
- "moveOnKeyPress",
745
- "autoComplete"
746
- ]);
747
- const R = ht();
748
- e = e || R, me(
749
- e,
750
- process.env.NODE_ENV !== "production" && "Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component."
751
- );
752
- const K = se(null), [P, _] = an(), w = se(!1), B = se(!1), b = e.useState(
753
- (u) => u.virtualFocus && l
754
- ), y = O === "inline" || O === "both", [j, W] = de(y);
755
- un(() => {
756
- y && W(!0);
757
- }, [y]);
758
- const h = e.useState("value"), k = se();
759
- ae(() => J(e, ["selectedValue", "activeId"], (u, x) => {
760
- k.current = x.selectedValue;
761
- }), []);
762
- const S = e.useState((u) => {
763
- var x;
764
- if (y && j && !(u.activeValue && Array.isArray(u.selectedValue) && (u.selectedValue.includes(u.activeValue) || (x = k.current) != null && x.includes(u.activeValue))))
765
- return u.activeValue;
766
- }), E = e.useState("renderedItems"), q = e.useState("open"), Y = e.useState("contentElement"), ee = Ce(() => {
767
- if (!y || !j) return h;
768
- if (Ze(
769
- E,
770
- S,
771
- b
772
- )) {
773
- if ($e(h, S)) {
774
- const x = (S == null ? void 0 : S.slice(h.length)) || "";
775
- return h + x;
776
- }
777
- return h;
778
- }
779
- return S || h;
780
- }, [y, j, E, S, b, h]);
781
- ae(() => {
782
- const u = K.current;
783
- if (!u) return;
784
- const x = () => W(!0);
785
- return u.addEventListener("combobox-item-move", x), () => {
786
- u.removeEventListener("combobox-item-move", x);
787
- };
788
- }, []), ae(() => {
789
- if (!y || !j || !S || !Ze(
790
- E,
791
- S,
792
- b
793
- ) || !$e(h, S)) return;
794
- let x = cn;
795
- return queueMicrotask(() => {
796
- const L = K.current;
797
- if (!L) return;
798
- const { start: T, end: z } = Be(L), te = h.length, F = S.length;
799
- Ie(L, te, F), x = () => {
800
- if (!_e(L)) return;
801
- const { start: ce, end: Ft } = Be(L);
802
- ce === te && Ft === F && Ie(L, T, z);
803
- };
804
- }), () => x();
805
- }, [
806
- P,
807
- y,
808
- j,
809
- S,
810
- E,
811
- b,
812
- h
813
- ]);
814
- const fe = se(null), ue = Q(a), M = se(null);
815
- ae(() => {
816
- if (!q || !Y) return;
817
- const u = dn(Y);
818
- if (!u) return;
819
- fe.current = u;
820
- const x = () => {
821
- w.current = !1;
822
- }, L = () => {
823
- if (!e || !w.current) return;
824
- const { activeId: z } = e.getState();
825
- z !== null && z !== M.current && (w.current = !1);
826
- }, T = { passive: !0, capture: !0 };
827
- return u.addEventListener("wheel", x, T), u.addEventListener("touchmove", x, T), u.addEventListener("scroll", L, T), () => {
828
- u.removeEventListener("wheel", x, !0), u.removeEventListener("touchmove", x, !0), u.removeEventListener("scroll", L, !0);
829
- };
830
- }, [q, Y, e]), Ve(() => {
831
- h && (B.current || (w.current = !0));
832
- }, [h]), Ve(() => {
833
- b !== "always" && q || (w.current = q);
834
- }, [b, q]);
835
- const ve = e.useState("resetValueOnSelect");
836
- Me(() => {
837
- var u, x;
838
- const L = w.current;
839
- if (!e || !q || !L && !ve) return;
840
- const { baseElement: T, contentElement: z, activeId: te } = e.getState();
841
- if (!(T && !_e(T))) {
842
- if (z != null && z.hasAttribute("data-placing")) {
843
- const F = new MutationObserver(_);
844
- return F.observe(z, { attributeFilter: ["data-placing"] }), () => F.disconnect();
845
- }
846
- if (b && L) {
847
- const F = ue(E), ce = F !== void 0 ? F : (u = fo(E)) != null ? u : e.first();
848
- M.current = ce, e.move(ce ?? null);
849
- } else {
850
- const F = (x = e.item(te || e.first())) == null ? void 0 : x.element;
851
- F && "scrollIntoView" in F && F.scrollIntoView({ block: "nearest", inline: "nearest" });
852
- }
853
- }
854
- }, [
855
- e,
856
- q,
857
- P,
858
- h,
859
- b,
860
- ve,
861
- ue,
862
- E
863
- ]), ae(() => {
864
- if (!y) return;
865
- const u = K.current;
866
- if (!u) return;
867
- const x = [u, Y].filter(
868
- (T) => !!T
869
- ), L = (T) => {
870
- x.every((z) => fn(T, z)) && (e == null || e.setValue(ee));
871
- };
872
- for (const T of x)
873
- T.addEventListener("focusout", L);
874
- return () => {
875
- for (const T of x)
876
- T.removeEventListener("focusout", L);
877
- };
878
- }, [y, Y, e, ee]);
879
- const pe = (u) => u.currentTarget.value.length >= f, Se = g.onChange, Le = H(c ?? pe), Te = H(
880
- // If the combobox is combined with tags, the value will be set by the tag
881
- // input component.
882
- m ?? !e.tag
883
- ), Re = Q((u) => {
884
- if (Se == null || Se(u), u.defaultPrevented || !e) return;
885
- const x = u.currentTarget, { value: L, selectionStart: T, selectionEnd: z } = x, te = u.nativeEvent;
886
- if (w.current = !0, co(te) && (te.isComposing && (w.current = !1, B.current = !0), y)) {
887
- const F = te.inputType === "insertText" || te.inputType === "insertCompositionText", ce = T === L.length;
888
- W(F && ce);
889
- }
890
- if (Te(u)) {
891
- const F = L === e.getState().value;
892
- e.setValue(L), queueMicrotask(() => {
893
- Ie(x, T, z);
894
- }), y && b && F && _();
895
- }
896
- Le(u) && e.show(), (!b || !w.current) && e.setActiveId(null);
897
- }), xe = g.onCompositionEnd, Ee = Q((u) => {
898
- w.current = !0, B.current = !1, xe == null || xe(u), !u.defaultPrevented && b && _();
899
- }), Ke = g.onMouseDown, kt = H(
900
- d ?? (() => !!(e != null && e.getState().includesBaseElement))
901
- ), Mt = H(p), Nt = H(s ?? pe), Dt = Q((u) => {
902
- Ke == null || Ke(u), !u.defaultPrevented && (u.button || u.ctrlKey || e && (kt(u) && e.setActiveId(null), Mt(u) && e.setValue(ee), Nt(u) && et(u.currentTarget, "mouseup", e.show)));
903
- }), He = g.onKeyDown, Lt = H(C ?? pe), Tt = Q((u) => {
904
- if (He == null || He(u), u.repeat || (w.current = !1), u.defaultPrevented || u.ctrlKey || u.altKey || u.shiftKey || u.metaKey || !e) return;
905
- const { open: x } = e.getState();
906
- x || (u.key === "ArrowUp" || u.key === "ArrowDown") && Lt(u) && (u.preventDefault(), e.show());
907
- }), Ue = g.onBlur, Rt = Q((u) => {
908
- w.current = !1, Ue == null || Ue(u), u.defaultPrevented;
909
- }), Kt = Ae(g.id), Ht = mo(O) ? O : void 0, Ut = e.useState((u) => u.activeId === null);
910
- return g = U(A({
911
- id: Kt,
912
- role: "combobox",
913
- "aria-autocomplete": Ht,
914
- "aria-haspopup": tt(Y, "listbox"),
915
- "aria-expanded": q,
916
- "aria-controls": Y == null ? void 0 : Y.id,
917
- "data-active-item": Ut || void 0,
918
- value: ee
919
- }, g), {
920
- ref: ye(K, g.ref),
921
- onChange: Re,
922
- onCompositionEnd: Ee,
923
- onMouseDown: Dt,
924
- onKeyDown: Tt,
925
- onBlur: Rt
926
- }), g = At(U(A({
927
- store: e,
928
- focusable: r
929
- }, g), {
930
- // Enable inline autocomplete when the user moves from the combobox input
931
- // to an item.
932
- moveOnKeyPress: (u) => mn(V, u) ? !1 : (y && W(!0), !0)
933
- })), g = gn(A({ store: e }, g)), A({ autoComplete: "off" }, g);
934
- }
935
- ), po = re(function(n) {
936
- const o = vo(n);
937
- return le(uo, o);
938
- });
939
- function bo(t = {}) {
940
- const n = io(t);
941
- return /* @__PURE__ */ I(yn, { value: n, children: t.children });
942
- }
943
- var ho = "div";
944
- function So(t, n) {
945
- if (n != null)
946
- return t == null ? !1 : Array.isArray(t) ? t.includes(n) : t === n;
947
- }
948
- function go(t) {
949
- var n;
950
- return (n = {
951
- menu: "menuitem",
952
- listbox: "option",
953
- tree: "treeitem"
954
- }[t]) != null ? n : "option";
955
- }
956
- var Co = ne(
957
- function(n) {
958
- var o = n, {
959
- store: e,
960
- value: r,
961
- hideOnClick: l,
962
- setValueOnClick: a,
963
- selectValueOnClick: m = !0,
964
- resetValueOnSelect: f,
965
- focusOnHover: c = !1,
966
- moveOnKeyPress: i = !0,
967
- getItem: s
968
- } = o, v = oe(o, [
969
- "store",
970
- "value",
971
- "hideOnClick",
972
- "setValueOnClick",
973
- "selectValueOnClick",
974
- "resetValueOnSelect",
975
- "focusOnHover",
976
- "moveOnKeyPress",
977
- "getItem"
978
- ]), C;
979
- const d = St();
980
- e = e || d, me(
981
- e,
982
- process.env.NODE_ENV !== "production" && "ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component."
983
- );
984
- const { resetValueOnSelectState: p, multiSelectable: V, selected: O } = bt(e, {
985
- resetValueOnSelectState: "resetValueOnSelect",
986
- multiSelectable(h) {
987
- return Array.isArray(h.selectedValue);
988
- },
989
- selected(h) {
990
- return So(h.selectedValue, r);
991
- }
992
- }), g = Xe(
993
- (h) => {
994
- const k = U(A({}, h), { value: r });
995
- return s ? s(k) : k;
996
- },
997
- [r, s]
998
- );
999
- a = a ?? !V, l = l ?? (r != null && !V);
1000
- const R = v.onClick, K = H(a), P = H(m), _ = H(
1001
- (C = f ?? p) != null ? C : V
1002
- ), w = H(l), B = Q((h) => {
1003
- R == null || R(h), !h.defaultPrevented && (ot(h) || rt(h) || (r != null && (P(h) && (_(h) && (e == null || e.resetValue()), e == null || e.setSelectedValue((k) => Array.isArray(k) ? k.includes(r) ? k.filter((S) => S !== r) : [...k, r] : r)), K(h) && (e == null || e.setValue(r))), w(h) && (e == null || e.hide())));
1004
- }), b = v.onKeyDown, y = Q((h) => {
1005
- if (b == null || b(h), h.defaultPrevented) return;
1006
- const k = e == null ? void 0 : e.getState().baseElement;
1007
- if (!k || _e(k)) return;
1008
- (h.key.length === 1 || h.key === "Backspace" || h.key === "Delete") && (queueMicrotask(() => k.focus()), pn(k) && (e == null || e.setValue(k.value)));
1009
- });
1010
- V && O != null && (v = A({
1011
- "aria-selected": O
1012
- }, v)), v = he(
1013
- v,
1014
- (h) => /* @__PURE__ */ I(An.Provider, { value: r, children: /* @__PURE__ */ I(xn.Provider, { value: O ?? !1, children: h }) }),
1015
- [r, O]
1016
- );
1017
- const j = Pe(gt);
1018
- v = U(A({
1019
- role: go(j),
1020
- children: r
1021
- }, v), {
1022
- onClick: B,
1023
- onKeyDown: y
1024
- });
1025
- const W = H(i);
1026
- return v = It(U(A({
1027
- store: e
1028
- }, v), {
1029
- getItem: g,
1030
- // Dispatch a custom event on the combobox input when moving to an item
1031
- // with the keyboard so the Combobox component can enable inline
1032
- // autocompletion.
1033
- moveOnKeyPress: (h) => {
1034
- if (!W(h)) return !1;
1035
- const k = new Event("combobox-item-move"), S = e == null ? void 0 : e.getState().baseElement;
1036
- return S == null || S.dispatchEvent(k), !0;
1037
- }
1038
- })), v = xt(A({ store: e, focusOnHover: c }, v)), v;
1039
- }
1040
- ), Eo = nt(
1041
- re(function(n) {
1042
- const o = Co(n);
1043
- return le(ho, o);
1044
- })
1045
- ), Oo = "div", yo = ne(
1046
- function(n) {
1047
- var o = n, { store: e, alwaysVisible: r } = o, l = oe(o, ["store", "alwaysVisible"]);
1048
- const a = St(!0), m = In();
1049
- e = e || m;
1050
- const f = !!e && e === a;
1051
- me(
1052
- e,
1053
- process.env.NODE_ENV !== "production" && "ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component."
1054
- );
1055
- const c = se(null), i = Ae(l.id), s = e.useState("mounted"), v = yt(s, l.hidden, r), C = v ? U(A({}, l.style), { display: "none" }) : l.style, d = e.useState(
1056
- (_) => Array.isArray(_.selectedValue)
1057
- ), p = lt(c, "role", l.role), O = (p === "listbox" || p === "tree" || p === "grid") && d || void 0, [g, R] = de(!1), K = e.useState("contentElement");
1058
- Ve(() => {
1059
- if (!s) return;
1060
- const _ = c.current;
1061
- if (!_ || K !== _) return;
1062
- const w = () => {
1063
- R(!!_.querySelector("[role='listbox']"));
1064
- }, B = new MutationObserver(w);
1065
- return B.observe(_, {
1066
- subtree: !0,
1067
- childList: !0,
1068
- attributeFilter: ["role"]
1069
- }), w(), () => B.disconnect();
1070
- }, [s, K]), g || (l = A({
1071
- role: "listbox",
1072
- "aria-multiselectable": O
1073
- }, l)), l = he(
1074
- l,
1075
- (_) => /* @__PURE__ */ I(wn, { value: e, children: /* @__PURE__ */ I(gt.Provider, { value: p, children: _ }) }),
1076
- [e, p]
1077
- );
1078
- const P = i && (!a || !f) ? e.setContentElement : null;
1079
- return l = U(A({
1080
- id: i,
1081
- hidden: v
1082
- }, l), {
1083
- ref: ye(P, c, l.ref),
1084
- style: C
1085
- }), Ge(l);
1086
- }
1087
- ), Ao = re(function(n) {
1088
- const o = yo(n);
1089
- return le(Oo, o);
1090
- });
1091
- const xo = /* @__PURE__ */ new Map([
1092
- [
1093
- "bold",
1094
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
1095
- ],
1096
- [
1097
- "duotone",
1098
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z", opacity: "0.2" }), /* @__PURE__ */ N.createElement("path", { d: "M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
1099
- ],
1100
- [
1101
- "fill",
1102
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z" }))
1103
- ],
1104
- [
1105
- "light",
1106
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z" }))
1107
- ],
1108
- [
1109
- "regular",
1110
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
1111
- ],
1112
- [
1113
- "thin",
1114
- /* @__PURE__ */ N.createElement(N.Fragment, null, /* @__PURE__ */ N.createElement("path", { d: "M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z" }))
1115
- ]
1116
- ]), Vt = N.forwardRef((t, n) => /* @__PURE__ */ N.createElement(qt, { ref: n, ...t, weights: xo }));
1117
- Vt.displayName = "MagnifyingGlassIcon";
1118
- var ge = { exports: {} }, qe;
1119
- function Io() {
1120
- if (qe) return ge.exports;
1121
- qe = 1;
1122
- var t = {
1123
- À: "A",
1124
- Á: "A",
1125
- Â: "A",
1126
- Ã: "A",
1127
- Ä: "A",
1128
- Å: "A",
1129
- Ấ: "A",
1130
- Ắ: "A",
1131
- Ẳ: "A",
1132
- Ẵ: "A",
1133
- Ặ: "A",
1134
- Æ: "AE",
1135
- Ầ: "A",
1136
- Ằ: "A",
1137
- Ȃ: "A",
1138
- Ả: "A",
1139
- Ạ: "A",
1140
- Ẩ: "A",
1141
- Ẫ: "A",
1142
- Ậ: "A",
1143
- Ç: "C",
1144
- Ḉ: "C",
1145
- È: "E",
1146
- É: "E",
1147
- Ê: "E",
1148
- Ë: "E",
1149
- Ế: "E",
1150
- Ḗ: "E",
1151
- Ề: "E",
1152
- Ḕ: "E",
1153
- Ḝ: "E",
1154
- Ȇ: "E",
1155
- Ẻ: "E",
1156
- Ẽ: "E",
1157
- Ẹ: "E",
1158
- Ể: "E",
1159
- Ễ: "E",
1160
- Ệ: "E",
1161
- Ì: "I",
1162
- Í: "I",
1163
- Î: "I",
1164
- Ï: "I",
1165
- Ḯ: "I",
1166
- Ȋ: "I",
1167
- Ỉ: "I",
1168
- Ị: "I",
1169
- Ð: "D",
1170
- Ñ: "N",
1171
- Ò: "O",
1172
- Ó: "O",
1173
- Ô: "O",
1174
- Õ: "O",
1175
- Ö: "O",
1176
- Ø: "O",
1177
- Ố: "O",
1178
- Ṍ: "O",
1179
- Ṓ: "O",
1180
- Ȏ: "O",
1181
- Ỏ: "O",
1182
- Ọ: "O",
1183
- Ổ: "O",
1184
- Ỗ: "O",
1185
- Ộ: "O",
1186
- Ờ: "O",
1187
- Ở: "O",
1188
- Ỡ: "O",
1189
- Ớ: "O",
1190
- Ợ: "O",
1191
- Ù: "U",
1192
- Ú: "U",
1193
- Û: "U",
1194
- Ü: "U",
1195
- Ủ: "U",
1196
- Ụ: "U",
1197
- Ử: "U",
1198
- Ữ: "U",
1199
- Ự: "U",
1200
- Ý: "Y",
1201
- à: "a",
1202
- á: "a",
1203
- â: "a",
1204
- ã: "a",
1205
- ä: "a",
1206
- å: "a",
1207
- ấ: "a",
1208
- ắ: "a",
1209
- ẳ: "a",
1210
- ẵ: "a",
1211
- ặ: "a",
1212
- æ: "ae",
1213
- ầ: "a",
1214
- ằ: "a",
1215
- ȃ: "a",
1216
- ả: "a",
1217
- ạ: "a",
1218
- ẩ: "a",
1219
- ẫ: "a",
1220
- ậ: "a",
1221
- ç: "c",
1222
- ḉ: "c",
1223
- è: "e",
1224
- é: "e",
1225
- ê: "e",
1226
- ë: "e",
1227
- ế: "e",
1228
- ḗ: "e",
1229
- ề: "e",
1230
- ḕ: "e",
1231
- ḝ: "e",
1232
- ȇ: "e",
1233
- ẻ: "e",
1234
- ẽ: "e",
1235
- ẹ: "e",
1236
- ể: "e",
1237
- ễ: "e",
1238
- ệ: "e",
1239
- ì: "i",
1240
- í: "i",
1241
- î: "i",
1242
- ï: "i",
1243
- ḯ: "i",
1244
- ȋ: "i",
1245
- ỉ: "i",
1246
- ị: "i",
1247
- ð: "d",
1248
- ñ: "n",
1249
- ò: "o",
1250
- ó: "o",
1251
- ô: "o",
1252
- õ: "o",
1253
- ö: "o",
1254
- ø: "o",
1255
- ố: "o",
1256
- ṍ: "o",
1257
- ṓ: "o",
1258
- ȏ: "o",
1259
- ỏ: "o",
1260
- ọ: "o",
1261
- ổ: "o",
1262
- ỗ: "o",
1263
- ộ: "o",
1264
- ờ: "o",
1265
- ở: "o",
1266
- ỡ: "o",
1267
- ớ: "o",
1268
- ợ: "o",
1269
- ù: "u",
1270
- ú: "u",
1271
- û: "u",
1272
- ü: "u",
1273
- ủ: "u",
1274
- ụ: "u",
1275
- ử: "u",
1276
- ữ: "u",
1277
- ự: "u",
1278
- ý: "y",
1279
- ÿ: "y",
1280
- Ā: "A",
1281
- ā: "a",
1282
- Ă: "A",
1283
- ă: "a",
1284
- Ą: "A",
1285
- ą: "a",
1286
- Ć: "C",
1287
- ć: "c",
1288
- Ĉ: "C",
1289
- ĉ: "c",
1290
- Ċ: "C",
1291
- ċ: "c",
1292
- Č: "C",
1293
- č: "c",
1294
- C̆: "C",
1295
- c̆: "c",
1296
- Ď: "D",
1297
- ď: "d",
1298
- Đ: "D",
1299
- đ: "d",
1300
- Ē: "E",
1301
- ē: "e",
1302
- Ĕ: "E",
1303
- ĕ: "e",
1304
- Ė: "E",
1305
- ė: "e",
1306
- Ę: "E",
1307
- ę: "e",
1308
- Ě: "E",
1309
- ě: "e",
1310
- Ĝ: "G",
1311
- Ǵ: "G",
1312
- ĝ: "g",
1313
- ǵ: "g",
1314
- Ğ: "G",
1315
- ğ: "g",
1316
- Ġ: "G",
1317
- ġ: "g",
1318
- Ģ: "G",
1319
- ģ: "g",
1320
- Ĥ: "H",
1321
- ĥ: "h",
1322
- Ħ: "H",
1323
- ħ: "h",
1324
- Ḫ: "H",
1325
- ḫ: "h",
1326
- Ĩ: "I",
1327
- ĩ: "i",
1328
- Ī: "I",
1329
- ī: "i",
1330
- Ĭ: "I",
1331
- ĭ: "i",
1332
- Į: "I",
1333
- į: "i",
1334
- İ: "I",
1335
- ı: "i",
1336
- IJ: "IJ",
1337
- ij: "ij",
1338
- Ĵ: "J",
1339
- ĵ: "j",
1340
- Ķ: "K",
1341
- ķ: "k",
1342
- Ḱ: "K",
1343
- ḱ: "k",
1344
- K̆: "K",
1345
- k̆: "k",
1346
- Ĺ: "L",
1347
- ĺ: "l",
1348
- Ļ: "L",
1349
- ļ: "l",
1350
- Ľ: "L",
1351
- ľ: "l",
1352
- Ŀ: "L",
1353
- ŀ: "l",
1354
- Ł: "l",
1355
- ł: "l",
1356
- Ḿ: "M",
1357
- ḿ: "m",
1358
- M̆: "M",
1359
- m̆: "m",
1360
- Ń: "N",
1361
- ń: "n",
1362
- Ņ: "N",
1363
- ņ: "n",
1364
- Ň: "N",
1365
- ň: "n",
1366
- ʼn: "n",
1367
- N̆: "N",
1368
- n̆: "n",
1369
- Ō: "O",
1370
- ō: "o",
1371
- Ŏ: "O",
1372
- ŏ: "o",
1373
- Ő: "O",
1374
- ő: "o",
1375
- Œ: "OE",
1376
- œ: "oe",
1377
- P̆: "P",
1378
- p̆: "p",
1379
- Ŕ: "R",
1380
- ŕ: "r",
1381
- Ŗ: "R",
1382
- ŗ: "r",
1383
- Ř: "R",
1384
- ř: "r",
1385
- R̆: "R",
1386
- r̆: "r",
1387
- Ȓ: "R",
1388
- ȓ: "r",
1389
- Ś: "S",
1390
- ś: "s",
1391
- Ŝ: "S",
1392
- ŝ: "s",
1393
- Ş: "S",
1394
- Ș: "S",
1395
- ș: "s",
1396
- ş: "s",
1397
- Š: "S",
1398
- š: "s",
1399
- Ţ: "T",
1400
- ţ: "t",
1401
- ț: "t",
1402
- Ț: "T",
1403
- Ť: "T",
1404
- ť: "t",
1405
- Ŧ: "T",
1406
- ŧ: "t",
1407
- T̆: "T",
1408
- t̆: "t",
1409
- Ũ: "U",
1410
- ũ: "u",
1411
- Ū: "U",
1412
- ū: "u",
1413
- Ŭ: "U",
1414
- ŭ: "u",
1415
- Ů: "U",
1416
- ů: "u",
1417
- Ű: "U",
1418
- ű: "u",
1419
- Ų: "U",
1420
- ų: "u",
1421
- Ȗ: "U",
1422
- ȗ: "u",
1423
- V̆: "V",
1424
- v̆: "v",
1425
- Ŵ: "W",
1426
- ŵ: "w",
1427
- Ẃ: "W",
1428
- ẃ: "w",
1429
- X̆: "X",
1430
- x̆: "x",
1431
- Ŷ: "Y",
1432
- ŷ: "y",
1433
- Ÿ: "Y",
1434
- Y̆: "Y",
1435
- y̆: "y",
1436
- Ź: "Z",
1437
- ź: "z",
1438
- Ż: "Z",
1439
- ż: "z",
1440
- Ž: "Z",
1441
- ž: "z",
1442
- ſ: "s",
1443
- ƒ: "f",
1444
- Ơ: "O",
1445
- ơ: "o",
1446
- Ư: "U",
1447
- ư: "u",
1448
- Ǎ: "A",
1449
- ǎ: "a",
1450
- Ǐ: "I",
1451
- ǐ: "i",
1452
- Ǒ: "O",
1453
- ǒ: "o",
1454
- Ǔ: "U",
1455
- ǔ: "u",
1456
- Ǖ: "U",
1457
- ǖ: "u",
1458
- Ǘ: "U",
1459
- ǘ: "u",
1460
- Ǚ: "U",
1461
- ǚ: "u",
1462
- Ǜ: "U",
1463
- ǜ: "u",
1464
- Ứ: "U",
1465
- ứ: "u",
1466
- Ṹ: "U",
1467
- ṹ: "u",
1468
- Ǻ: "A",
1469
- ǻ: "a",
1470
- Ǽ: "AE",
1471
- ǽ: "ae",
1472
- Ǿ: "O",
1473
- ǿ: "o",
1474
- Þ: "TH",
1475
- þ: "th",
1476
- Ṕ: "P",
1477
- ṕ: "p",
1478
- Ṥ: "S",
1479
- ṥ: "s",
1480
- X́: "X",
1481
- x́: "x",
1482
- Ѓ: "Г",
1483
- ѓ: "г",
1484
- Ќ: "К",
1485
- ќ: "к",
1486
- A̋: "A",
1487
- a̋: "a",
1488
- E̋: "E",
1489
- e̋: "e",
1490
- I̋: "I",
1491
- i̋: "i",
1492
- Ǹ: "N",
1493
- ǹ: "n",
1494
- Ồ: "O",
1495
- ồ: "o",
1496
- Ṑ: "O",
1497
- ṑ: "o",
1498
- Ừ: "U",
1499
- ừ: "u",
1500
- Ẁ: "W",
1501
- ẁ: "w",
1502
- Ỳ: "Y",
1503
- ỳ: "y",
1504
- Ȁ: "A",
1505
- ȁ: "a",
1506
- Ȅ: "E",
1507
- ȅ: "e",
1508
- Ȉ: "I",
1509
- ȉ: "i",
1510
- Ȍ: "O",
1511
- ȍ: "o",
1512
- Ȑ: "R",
1513
- ȑ: "r",
1514
- Ȕ: "U",
1515
- ȕ: "u",
1516
- B̌: "B",
1517
- b̌: "b",
1518
- Č̣: "C",
1519
- č̣: "c",
1520
- Ê̌: "E",
1521
- ê̌: "e",
1522
- F̌: "F",
1523
- f̌: "f",
1524
- Ǧ: "G",
1525
- ǧ: "g",
1526
- Ȟ: "H",
1527
- ȟ: "h",
1528
- J̌: "J",
1529
- ǰ: "j",
1530
- Ǩ: "K",
1531
- ǩ: "k",
1532
- M̌: "M",
1533
- m̌: "m",
1534
- P̌: "P",
1535
- p̌: "p",
1536
- Q̌: "Q",
1537
- q̌: "q",
1538
- Ř̩: "R",
1539
- ř̩: "r",
1540
- Ṧ: "S",
1541
- ṧ: "s",
1542
- V̌: "V",
1543
- v̌: "v",
1544
- W̌: "W",
1545
- w̌: "w",
1546
- X̌: "X",
1547
- x̌: "x",
1548
- Y̌: "Y",
1549
- y̌: "y",
1550
- A̧: "A",
1551
- a̧: "a",
1552
- B̧: "B",
1553
- b̧: "b",
1554
- Ḑ: "D",
1555
- ḑ: "d",
1556
- Ȩ: "E",
1557
- ȩ: "e",
1558
- Ɛ̧: "E",
1559
- ɛ̧: "e",
1560
- Ḩ: "H",
1561
- ḩ: "h",
1562
- I̧: "I",
1563
- i̧: "i",
1564
- Ɨ̧: "I",
1565
- ɨ̧: "i",
1566
- M̧: "M",
1567
- m̧: "m",
1568
- O̧: "O",
1569
- o̧: "o",
1570
- Q̧: "Q",
1571
- q̧: "q",
1572
- U̧: "U",
1573
- u̧: "u",
1574
- X̧: "X",
1575
- x̧: "x",
1576
- Z̧: "Z",
1577
- z̧: "z",
1578
- й: "и",
1579
- Й: "И",
1580
- ё: "е",
1581
- Ё: "Е"
1582
- }, n = Object.keys(t).join("|"), o = new RegExp(n, "g"), e = new RegExp(n, "");
1583
- function r(m) {
1584
- return t[m];
1585
- }
1586
- var l = function(m) {
1587
- return m.replace(o, r);
1588
- }, a = function(m) {
1589
- return !!m.match(e);
1590
- };
1591
- return ge.exports = l, ge.exports.has = a, ge.exports.remove = l, ge.exports;
1592
- }
1593
- var wo = Io();
1594
- const Po = /* @__PURE__ */ Yt(wo);
1595
- /**
1596
- * @name match-sorter
1597
- * @license MIT license.
1598
- * @copyright (c) 2020 Kent C. Dodds
1599
- * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
1600
- */
1601
- const Z = {
1602
- CASE_SENSITIVE_EQUAL: 7,
1603
- EQUAL: 6,
1604
- STARTS_WITH: 5,
1605
- WORD_STARTS_WITH: 4,
1606
- CONTAINS: 3,
1607
- ACRONYM: 2,
1608
- MATCHES: 1,
1609
- NO_MATCH: 0
1610
- }, Vo = (t, n) => String(t.rankedValue).localeCompare(String(n.rankedValue));
1611
- function _t(t, n, o) {
1612
- o === void 0 && (o = {});
1613
- const {
1614
- keys: e,
1615
- threshold: r = Z.MATCHES,
1616
- baseSort: l = Vo,
1617
- sorter: a = (c) => c.sort((i, s) => No(i, s, l))
1618
- } = o, m = t.reduce(f, []);
1619
- return a(m).map((c) => {
1620
- let {
1621
- item: i
1622
- } = c;
1623
- return i;
1624
- });
1625
- function f(c, i, s) {
1626
- const v = _o(i, e, n, o), {
1627
- rank: C,
1628
- keyThreshold: d = r
1629
- } = v;
1630
- return C >= d && c.push({
1631
- ...v,
1632
- item: i,
1633
- index: s
1634
- }), c;
1635
- }
1636
- }
1637
- _t.rankings = Z;
1638
- function _o(t, n, o, e) {
1639
- if (!n) {
1640
- const l = t;
1641
- return {
1642
- // ends up being duplicate of 'item' in matches but consistent
1643
- rankedValue: l,
1644
- rank: Ye(l, o, e),
1645
- keyIndex: -1,
1646
- keyThreshold: e.threshold
1647
- };
1648
- }
1649
- return To(t, n).reduce((l, a, m) => {
1650
- let {
1651
- rank: f,
1652
- rankedValue: c,
1653
- keyIndex: i,
1654
- keyThreshold: s
1655
- } = l, {
1656
- itemValue: v,
1657
- attributes: C
1658
- } = a, d = Ye(v, o, e), p = c;
1659
- const {
1660
- minRanking: V,
1661
- maxRanking: O,
1662
- threshold: g
1663
- } = C;
1664
- return d < V && d >= Z.MATCHES ? d = V : d > O && (d = O), d > f && (f = d, i = m, s = g, p = v), {
1665
- rankedValue: p,
1666
- rank: f,
1667
- keyIndex: i,
1668
- keyThreshold: s
1669
- };
1670
- }, {
1671
- rankedValue: t,
1672
- rank: Z.NO_MATCH,
1673
- keyIndex: -1,
1674
- keyThreshold: e.threshold
1675
- });
1676
- }
1677
- function Ye(t, n, o) {
1678
- return t = ze(t, o), n = ze(n, o), n.length > t.length ? Z.NO_MATCH : t === n ? Z.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), n = n.toLowerCase(), t === n ? Z.EQUAL : t.startsWith(n) ? Z.STARTS_WITH : t.includes(` ${n}`) ? Z.WORD_STARTS_WITH : t.includes(n) ? Z.CONTAINS : n.length === 1 ? Z.NO_MATCH : ko(t).includes(n) ? Z.ACRONYM : Mo(t, n));
1679
- }
1680
- function ko(t) {
1681
- let n = "";
1682
- return t.split(" ").forEach((e) => {
1683
- e.split("-").forEach((l) => {
1684
- n += l.substr(0, 1);
1685
- });
1686
- }), n;
1687
- }
1688
- function Mo(t, n) {
1689
- let o = 0, e = 0;
1690
- function r(f, c, i) {
1691
- for (let s = i, v = c.length; s < v; s++)
1692
- if (c[s] === f)
1693
- return o += 1, s + 1;
1694
- return -1;
1695
- }
1696
- function l(f) {
1697
- const c = 1 / f, i = o / n.length;
1698
- return Z.MATCHES + i * c;
1699
- }
1700
- const a = r(n[0], t, 0);
1701
- if (a < 0)
1702
- return Z.NO_MATCH;
1703
- e = a;
1704
- for (let f = 1, c = n.length; f < c; f++) {
1705
- const i = n[f];
1706
- if (e = r(i, t, e), !(e > -1))
1707
- return Z.NO_MATCH;
1708
- }
1709
- const m = e - a;
1710
- return l(m);
1711
- }
1712
- function No(t, n, o) {
1713
- const {
1714
- rank: l,
1715
- keyIndex: a
1716
- } = t, {
1717
- rank: m,
1718
- keyIndex: f
1719
- } = n;
1720
- return l === m ? a === f ? o(t, n) : a < f ? -1 : 1 : l > m ? -1 : 1;
1721
- }
1722
- function ze(t, n) {
1723
- let {
1724
- keepDiacritics: o
1725
- } = n;
1726
- return t = `${t}`, o || (t = Po(t)), t;
1727
- }
1728
- function Do(t, n) {
1729
- typeof n == "object" && (n = n.key);
1730
- let o;
1731
- if (typeof n == "function")
1732
- o = n(t);
1733
- else if (t == null)
1734
- o = null;
1735
- else if (Object.hasOwnProperty.call(t, n))
1736
- o = t[n];
1737
- else {
1738
- if (n.includes("."))
1739
- return Lo(n, t);
1740
- o = null;
1741
- }
1742
- return o == null ? [] : Array.isArray(o) ? o : [String(o)];
1743
- }
1744
- function Lo(t, n) {
1745
- const o = t.split(".");
1746
- let e = [n];
1747
- for (let r = 0, l = o.length; r < l; r++) {
1748
- const a = o[r];
1749
- let m = [];
1750
- for (let f = 0, c = e.length; f < c; f++) {
1751
- const i = e[f];
1752
- if (i != null)
1753
- if (Object.hasOwnProperty.call(i, a)) {
1754
- const s = i[a];
1755
- s != null && m.push(s);
1756
- } else a === "*" && (m = m.concat(i));
1757
- }
1758
- e = m;
1759
- }
1760
- return Array.isArray(e[0]) ? [].concat(...e) : e;
1761
- }
1762
- function To(t, n) {
1763
- const o = [];
1764
- for (let e = 0, r = n.length; e < r; e++) {
1765
- const l = n[e], a = Ro(l), m = Do(t, l);
1766
- for (let f = 0, c = m.length; f < c; f++)
1767
- o.push({
1768
- itemValue: m[f],
1769
- attributes: a
1770
- });
1771
- }
1772
- return o;
1773
- }
1774
- const Qe = {
1775
- maxRanking: 1 / 0,
1776
- minRanking: -1 / 0
1777
- };
1778
- function Ro(t) {
1779
- return typeof t == "string" ? Qe : {
1780
- ...Qe,
1781
- ...t
1782
- };
1783
- }
1784
- function cr(t) {
1785
- const { baseProps: n, controlProps: o } = Qt(t, {
1786
- className: "component-select-control"
1787
- }), { prefix: e, suffix: r, ...l } = n, [a, m] = de(""), {
1788
- value: f,
1789
- onChangeValue: c = Wt,
1790
- options: i,
1791
- placeholder: s = "Choose an option...",
1792
- searchable: v = !1,
1793
- ...C
1794
- } = o, d = (i || []).map(Bt), p = Ce(() => _t(d, a, {
1795
- baseSort: (P, _) => P.index < _.index ? -1 : 1,
1796
- keys: ["label", "description"]
1797
- }), [a]), V = v ? Ao : Xn, O = d.find((P) => P.value === f), g = !!O, R = !g, K = g ? O.label : s;
1798
- return console.log({ value: f, isPlaceholder: R }), /* @__PURE__ */ I(
1799
- bo,
1800
- {
1801
- resetValueOnHide: !0,
1802
- setValue: (P) => {
1803
- $t(() => {
1804
- m(P);
1805
- });
1806
- },
1807
- children: /* @__PURE__ */ I(
1808
- Zn,
1809
- {
1810
- value: R ? "" : f,
1811
- setValue: c,
1812
- children: /* @__PURE__ */ X(zt, { ...l, children: [
1813
- /* @__PURE__ */ X(
1814
- Wn,
1815
- {
1816
- className: "component-select-control__input",
1817
- ...C,
1818
- children: [
1819
- /* @__PURE__ */ I(
1820
- "div",
1821
- {
1822
- className: jt(
1823
- "component-select-control__value",
1824
- R && "component-select-control__value--placeholder"
1825
- ),
1826
- children: /* @__PURE__ */ I(to, { fallback: s, children: () => /* @__PURE__ */ X(we, { children: [
1827
- /* @__PURE__ */ I(Fe, { children: e }),
1828
- /* @__PURE__ */ I("span", { className: "component-select-control__value__label", children: K }),
1829
- /* @__PURE__ */ I(Fe, { suffix: !0, children: r })
1830
- ] }) })
1831
- }
1832
- ),
1833
- /* @__PURE__ */ I("div", { className: "component-select-control__caret", children: /* @__PURE__ */ I(Zt, {}) })
1834
- ]
1835
- }
1836
- ),
1837
- /* @__PURE__ */ X(
1838
- eo,
1839
- {
1840
- className: "component-select-control__popover",
1841
- "data-colour-scheme": "invert",
1842
- wrapperProps: {
1843
- className: "component-select-control__popover__wrapper"
1844
- },
1845
- fitViewport: !0,
1846
- gutter: 8,
1847
- overflowPadding: 4,
1848
- shift: -1,
1849
- portal: !0,
1850
- children: [
1851
- /* @__PURE__ */ X(
1852
- "div",
1853
- {
1854
- className: "component-select-control__popover__search-wrapper",
1855
- inert: !v,
1856
- hidden: !v,
1857
- children: [
1858
- /* @__PURE__ */ I(Vt, { className: "component-select-control__popover__search-icon" }),
1859
- /* @__PURE__ */ I(
1860
- po,
1861
- {
1862
- autoSelect: !0,
1863
- placeholder: "Search...",
1864
- className: "component-select-control__popover__search"
1865
- }
1866
- )
1867
- ]
1868
- }
1869
- ),
1870
- /* @__PURE__ */ I(V, { className: "component-select-control__list", children: p.map((P) => /* @__PURE__ */ X(
1871
- zn,
1872
- {
1873
- disabled: P.disabled,
1874
- value: P.value,
1875
- className: "component-select-control__option",
1876
- render: /* @__PURE__ */ I(Eo, {}),
1877
- children: [
1878
- /* @__PURE__ */ X("div", { className: "component-select-control__option__label", children: [
1879
- P.icon,
1880
- P.label
1881
- ] }),
1882
- P.description && /* @__PURE__ */ I("div", { className: "component-select-control__option__description", children: P.description })
1883
- ]
1884
- },
1885
- P.value
1886
- )) })
1887
- ]
1888
- }
1889
- )
1890
- ] })
1891
- }
1892
- )
1893
- }
1894
- );
1895
- }
1896
- export {
1897
- cr as SelectControl
1898
- };