@slotted/react 0.1.0-beta.1 → 0.1.0-beta.3

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 (307) hide show
  1. package/README.md +4 -0
  2. package/dist/{action-bar-C7cGnEyJ.js → action-bar-OACchRZw.js} +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/{action-sheet-D8Glxl7l.js → action-sheet-C60BWUW8.js} +1 -1
  5. package/dist/action-sheet.js +1 -1
  6. package/dist/{app-shell-CXwma4XA.js → app-shell-CmYvnu_7.js} +310 -310
  7. package/dist/app-shell.js +1 -1
  8. package/dist/button-Db9f3Bxn.js +99 -0
  9. package/dist/button.js +2 -2
  10. package/dist/cascader-D1AhTyBL.js +1097 -0
  11. package/dist/cascader.js +1 -1
  12. package/dist/chart-O0ZhkzJe.js +966 -0
  13. package/dist/chart.js +1 -1
  14. package/dist/{checkbox-CwUOc-3u.js → checkbox-DfxFHZaU.js} +3 -3
  15. package/dist/{checkbox-group-BYTjgAcX.js → checkbox-group-9sDgrV5Z.js} +2 -2
  16. package/dist/checkbox-group.js +1 -1
  17. package/dist/checkbox.js +1 -1
  18. package/dist/{color-picker-BlPR4g4H.js → color-picker-CwbWzCKg.js} +4 -4
  19. package/dist/color-picker.js +1 -1
  20. package/dist/{column-manager-CNZ7Xk5_.js → column-manager-CTtizVhm.js} +6 -6
  21. package/dist/column-manager.js +1 -1
  22. package/dist/{combobox-C46GRqAA.js → combobox-BVMI9lg8.js} +296 -292
  23. package/dist/combobox.js +1 -1
  24. package/dist/{command-palette-BqRyNR9Y.js → command-palette-DFLbSOiv.js} +1 -1
  25. package/dist/command-palette.js +1 -1
  26. package/dist/{context-menu-DMiHdggw.js → context-menu-BuST6W94.js} +1 -1
  27. package/dist/context-menu.js +1 -1
  28. package/dist/currency-field-DD9A5U3D.js +455 -0
  29. package/dist/currency-field.js +1 -1
  30. package/dist/dashboard-grid-CBMP_-JV.js +1043 -0
  31. package/dist/dashboard-grid.js +1 -1
  32. package/dist/{data-grid-BUgOJuGp.js → data-grid-BKaGMqIm.js} +19 -19
  33. package/dist/data-grid.js +1 -1
  34. package/dist/{data-list-2xfDpHVC.js → data-list-oICmxGkA.js} +5 -5
  35. package/dist/data-list.js +1 -1
  36. package/dist/{date-field-D_kLLTfL.js → date-field-CYcN6diW.js} +1 -1
  37. package/dist/date-field.js +1 -1
  38. package/dist/date-picker-4X-_2ltN.js +264 -0
  39. package/dist/date-picker.js +1 -1
  40. package/dist/date-range-picker-CNOAtHwU.js +471 -0
  41. package/dist/date-range-picker.js +1 -1
  42. package/dist/{datetime-field-T1gNdJ7t.js → datetime-field-B8TrmsDK.js} +1 -1
  43. package/dist/datetime-field.js +1 -1
  44. package/dist/datetime-picker-HDVlUhzy.js +629 -0
  45. package/dist/datetime-picker.js +1 -1
  46. package/dist/datetime-range-picker-IqOFJtdW.js +994 -0
  47. package/dist/datetime-range-picker.js +1 -1
  48. package/dist/{dialog-Dmy-m_pe.js → dialog-BHYDDj1S.js} +112 -113
  49. package/dist/dialog.js +1 -1
  50. package/dist/docs/AGENTS.snippet.md +10 -0
  51. package/dist/docs/app-shell.json +1 -1
  52. package/dist/docs/button-group.json +1 -0
  53. package/dist/docs/button-group.md +1 -1
  54. package/dist/docs/button.json +45 -11
  55. package/dist/docs/button.md +10 -6
  56. package/dist/docs/chart.json +7 -0
  57. package/dist/docs/chart.md +1 -0
  58. package/dist/docs/currency-field.json +32 -1
  59. package/dist/docs/currency-field.md +4 -1
  60. package/dist/docs/dialog.examples.md +26 -0
  61. package/dist/docs/dialog.json +14 -2
  62. package/dist/docs/dialog.md +1 -1
  63. package/dist/docs/event-calendar.json +7 -0
  64. package/dist/docs/event-calendar.md +1 -0
  65. package/dist/docs/guidelines/README.md +27 -0
  66. package/dist/docs/guidelines/async-feedback.md +108 -0
  67. package/dist/docs/guidelines/browsing.md +74 -0
  68. package/dist/docs/guidelines/builders.md +97 -0
  69. package/dist/docs/guidelines/composition.md +129 -0
  70. package/dist/docs/guidelines/conversations.md +59 -0
  71. package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
  72. package/dist/docs/guidelines/forms.md +192 -0
  73. package/dist/docs/guidelines/index.md +121 -0
  74. package/dist/docs/guidelines/layout-alignment.md +95 -0
  75. package/dist/docs/guidelines/ledgers.md +45 -0
  76. package/dist/docs/guidelines/list-pages.md +165 -0
  77. package/dist/docs/guidelines/overviews.md +66 -0
  78. package/dist/docs/guidelines/own-elements.md +115 -0
  79. package/dist/docs/guidelines/reading-permissions.md +55 -0
  80. package/dist/docs/guidelines/record-pages.md +178 -0
  81. package/dist/docs/guidelines/reports.md +123 -0
  82. package/dist/docs/guidelines/shell-composition.md +94 -0
  83. package/dist/docs/guidelines/workspaces.md +46 -0
  84. package/dist/docs/index.md +12 -0
  85. package/dist/docs/list.json +26 -1
  86. package/dist/docs/list.md +4 -1
  87. package/dist/docs/popover.json +1 -1
  88. package/dist/docs/progress-indicator.json +1 -2
  89. package/dist/docs/progress-indicator.md +2 -2
  90. package/dist/docs/segmented-control.json +29 -1
  91. package/dist/docs/segmented-control.md +17 -1
  92. package/dist/docs/side-navigation.json +2 -2
  93. package/dist/docs/side-navigation.md +19 -4
  94. package/dist/docs/skills/build-own-element/SKILL.md +90 -0
  95. package/dist/docs/skills/compose-screen/SKILL.md +76 -0
  96. package/dist/docs/skills/index.md +9 -0
  97. package/dist/docs/skills/review-screen/SKILL.md +70 -0
  98. package/dist/docs/skills/theme-app/SKILL.md +79 -0
  99. package/dist/docs/skills/waiting-states/SKILL.md +139 -0
  100. package/dist/docs/split-button.json +1 -0
  101. package/dist/docs/split-button.md +1 -1
  102. package/dist/docs/stat-card.json +2 -0
  103. package/dist/docs/stat-card.md +1 -1
  104. package/dist/docs/table.examples.md +1 -1
  105. package/dist/docs/table.json +78 -2
  106. package/dist/docs/table.md +12 -1
  107. package/dist/docs/tabs.examples.md +1 -1
  108. package/dist/docs/tabs.json +2 -5
  109. package/dist/docs/tabs.md +1 -1
  110. package/dist/docs/toggle-group.json +14 -3
  111. package/dist/docs/toggle-group.md +3 -3
  112. package/dist/docs/toggle.json +12 -3
  113. package/dist/docs/toggle.md +3 -3
  114. package/dist/docs/tokens.md +448 -0
  115. package/dist/docs/top-navigation.examples.md +23 -5
  116. package/dist/docs/top-navigation.json +2 -2
  117. package/dist/docs/tour.json +1 -1
  118. package/dist/drawer-LXM44eso.js +757 -0
  119. package/dist/drawer.js +1 -1
  120. package/dist/entity-picker-CPDd73JR.js +1110 -0
  121. package/dist/entity-picker.js +1 -1
  122. package/dist/{event-calendar-BFdeGfC-.js → event-calendar-CnF3iIZD.js} +391 -390
  123. package/dist/event-calendar.js +1 -1
  124. package/dist/{field-BJh5HI7w.js → field-NJaCxl2h.js} +1 -1
  125. package/dist/{field-group-BDaspQPh.js → field-group-hAzVa2O9.js} +1 -1
  126. package/dist/field-group.js +1 -1
  127. package/dist/field.js +1 -1
  128. package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-D_xDcAp2.js} +20 -20
  129. package/dist/filter-bar.js +1 -1
  130. package/dist/{hover-card-CSDbA6zd.js → hover-card-BJE5dtaQ.js} +1 -1
  131. package/dist/hover-card.js +1 -1
  132. package/dist/{icon-button-TnvMhK4o.js → icon-button-CCWkCDMs.js} +26 -24
  133. package/dist/import-export-center-DpY2DGBZ.js +813 -0
  134. package/dist/import-export-center.js +1 -1
  135. package/dist/index.js +85 -84
  136. package/dist/{list-C1Y8MWp2.js → list-WsQ6ZzCa.js} +16 -12
  137. package/dist/{list-item-DN_mcouU.js → list-item-DpCwZIrd.js} +1 -1
  138. package/dist/list-item.js +1 -1
  139. package/dist/list.js +1 -1
  140. package/dist/{listbox-4WvqR0JF.js → listbox-Dv856z9I.js} +1 -1
  141. package/dist/listbox.js +1 -1
  142. package/dist/{loading-overlay-B83XFctM.js → loading-overlay-COfnckse.js} +73 -73
  143. package/dist/loading-overlay.js +1 -1
  144. package/dist/{markdown-CpfDn1LF.js → markdown-CeG8mUbI.js} +2 -2
  145. package/dist/markdown.js +1 -1
  146. package/dist/menu-parts-W58pVNUt.js +786 -0
  147. package/dist/menu.js +1 -1
  148. package/dist/{menubar-CtGavUTO.js → menubar-b2CruimJ.js} +1 -1
  149. package/dist/menubar.js +1 -1
  150. package/dist/{multi-select-CfzsvAeI.js → multi-select-DQ5ds0fX.js} +432 -437
  151. package/dist/multi-select.js +1 -1
  152. package/dist/{notification-center-C4pEHJ3h.js → notification-center-Sz54IziY.js} +2 -2
  153. package/dist/notification-center.js +1 -1
  154. package/dist/{number-field-J_koud1r.js → number-field-BFIAmv-z.js} +1 -1
  155. package/dist/number-field.js +1 -1
  156. package/dist/{otp-input-Bf8JUiVR.js → otp-input-BNQhuKaT.js} +1 -1
  157. package/dist/otp-input.js +1 -1
  158. package/dist/popover-Be7JWbGJ.js +475 -0
  159. package/dist/popover.js +1 -1
  160. package/dist/press-selection-DjOllE2B.js +29 -0
  161. package/dist/press-selection.js +2 -0
  162. package/dist/{prompt-composer-B7MMcER0.js → prompt-composer-BxpdkTpZ.js} +1 -1
  163. package/dist/prompt-composer.js +1 -1
  164. package/dist/{radio-group-BFpjhDkV.js → radio-group-BaVIP9UH.js} +2 -2
  165. package/dist/radio-group.js +1 -1
  166. package/dist/{rating-D1EsADFM.js → rating-DYBQBzwB.js} +1 -1
  167. package/dist/rating.js +1 -1
  168. package/dist/{saved-views-BueW-Lyb.js → saved-views-DlE_--Z9.js} +5 -5
  169. package/dist/saved-views.js +1 -1
  170. package/dist/{segmented-control-Cy_5D3Nj.js → segmented-control-DmuOGiu6.js} +28 -24
  171. package/dist/segmented-control.js +1 -1
  172. package/dist/{select-UTwKjheK.js → select-DOFqPy26.js} +334 -347
  173. package/dist/select.js +1 -1
  174. package/dist/{side-navigation-YUiJRpng.js → side-navigation-CBLtCzuJ.js} +186 -187
  175. package/dist/side-navigation.js +1 -1
  176. package/dist/{slider-B432T6nD.js → slider-DTes4HLF.js} +1 -1
  177. package/dist/slider.js +1 -1
  178. package/dist/{split-button-DHF3v3PJ.js → split-button-CPgHiy9G.js} +2 -2
  179. package/dist/split-button.js +1 -1
  180. package/dist/styles.css +1 -1
  181. package/dist/{switch-4MHwKmkz.js → switch-DQzuIhPX.js} +1 -1
  182. package/dist/switch.js +1 -1
  183. package/dist/{table-CzBIw9ng.js → table-Cipi2c5X.js} +206 -173
  184. package/dist/table.js +2 -2
  185. package/dist/{tags-input-DLdHLWrH.js → tags-input-CcOkm0AW.js} +1 -1
  186. package/dist/tags-input.js +1 -1
  187. package/dist/{text-field-BktZbmzD.js → text-field-DLfIZ0fk.js} +1 -1
  188. package/dist/text-field.js +1 -1
  189. package/dist/{textarea-JAK2RJl0.js → textarea-CBJBJBi6.js} +1 -1
  190. package/dist/textarea.js +1 -1
  191. package/dist/{time-field-DCG_VtGO.js → time-field-DrhiCtUl.js} +1 -1
  192. package/dist/time-field.js +1 -1
  193. package/dist/{time-picker-DuT1tf5-.js → time-picker-CRQsMJbQ.js} +102 -102
  194. package/dist/time-picker.js +1 -1
  195. package/dist/{time-range-picker-HwBvrrXN.js → time-range-picker-DlZJsj1e.js} +202 -202
  196. package/dist/time-range-picker.js +1 -1
  197. package/dist/{toast-wI8BtPY5.js → toast-Bf3e0AgC.js} +157 -157
  198. package/dist/toast.js +1 -1
  199. package/dist/toggle-group-7iBR9Rn1.js +142 -0
  200. package/dist/toggle-group.js +1 -1
  201. package/dist/{toolbar-CDQTydDx.js → toolbar-DDZpEftQ.js} +1 -1
  202. package/dist/toolbar.js +1 -1
  203. package/dist/{tooltip-BggqPDcW.js → tooltip-DbKTPe_i.js} +108 -109
  204. package/dist/tooltip.js +1 -1
  205. package/dist/{top-navigation-COQZsNqW.js → top-navigation-e-tWMGNr.js} +255 -256
  206. package/dist/top-navigation.js +1 -1
  207. package/dist/{tour-C11DmYTC.js → tour-BTdt716T.js} +180 -180
  208. package/dist/tour.js +1 -1
  209. package/dist/{transfer-JA9TWjAw.js → transfer-CqZOTLMP.js} +6 -6
  210. package/dist/transfer.js +1 -1
  211. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  212. package/dist/types/button/button-link.d.ts +1 -1
  213. package/dist/types/button/button-link.d.ts.map +1 -1
  214. package/dist/types/button/button-root.d.ts +5 -3
  215. package/dist/types/button/button-root.d.ts.map +1 -1
  216. package/dist/types/button/button.constants.d.ts +2 -1
  217. package/dist/types/button/button.constants.d.ts.map +1 -1
  218. package/dist/types/button/button.d.ts +1 -1
  219. package/dist/types/button/button.d.ts.map +1 -1
  220. package/dist/types/button/button.types.d.ts +9 -2
  221. package/dist/types/button/button.types.d.ts.map +1 -1
  222. package/dist/types/button/index.d.ts +1 -1
  223. package/dist/types/button/index.d.ts.map +1 -1
  224. package/dist/types/button/toggle-button.d.ts +1 -1
  225. package/dist/types/button/toggle-button.d.ts.map +1 -1
  226. package/dist/types/chart/chart.d.ts.map +1 -1
  227. package/dist/types/combobox/combobox-collection.d.ts +1 -0
  228. package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
  229. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  230. package/dist/types/combobox/combobox.d.ts.map +1 -1
  231. package/dist/types/currency-field/currency-field.d.ts +1 -1
  232. package/dist/types/currency-field/currency-field.d.ts.map +1 -1
  233. package/dist/types/currency-field/currency-field.types.d.ts +14 -0
  234. package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
  235. package/dist/types/currency-field/index.d.ts +1 -1
  236. package/dist/types/currency-field/index.d.ts.map +1 -1
  237. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  238. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  239. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  240. package/dist/types/dialog/dialog-demo.d.ts +8 -0
  241. package/dist/types/dialog/dialog-demo.d.ts.map +1 -1
  242. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  243. package/dist/types/event-calendar/event-calendar.d.ts +1 -1
  244. package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
  245. package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
  246. package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
  247. package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
  248. package/dist/types/index.d.ts +1 -0
  249. package/dist/types/index.d.ts.map +1 -1
  250. package/dist/types/list/index.d.ts +1 -1
  251. package/dist/types/list/index.d.ts.map +1 -1
  252. package/dist/types/list/list-parts.d.ts +1 -1
  253. package/dist/types/list/list-parts.d.ts.map +1 -1
  254. package/dist/types/list/list.types.d.ts +12 -0
  255. package/dist/types/list/list.types.d.ts.map +1 -1
  256. package/dist/types/menu/menu.types.d.ts +3 -1
  257. package/dist/types/menu/menu.types.d.ts.map +1 -1
  258. package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
  259. package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
  260. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  261. package/dist/types/multi-select/multi-select.d.ts.map +1 -1
  262. package/dist/types/press-selection/index.d.ts +3 -0
  263. package/dist/types/press-selection/index.d.ts.map +1 -0
  264. package/dist/types/press-selection/press-selection.d.ts +23 -0
  265. package/dist/types/press-selection/press-selection.d.ts.map +1 -0
  266. package/dist/types/segmented-control/index.d.ts +1 -1
  267. package/dist/types/segmented-control/index.d.ts.map +1 -1
  268. package/dist/types/segmented-control/segmented-control-defaults.d.ts.map +1 -1
  269. package/dist/types/segmented-control/segmented-control.d.ts +1 -1
  270. package/dist/types/segmented-control/segmented-control.d.ts.map +1 -1
  271. package/dist/types/segmented-control/segmented-control.types.d.ts +10 -0
  272. package/dist/types/segmented-control/segmented-control.types.d.ts.map +1 -1
  273. package/dist/types/select/select-collection.d.ts +0 -2
  274. package/dist/types/select/select-collection.d.ts.map +1 -1
  275. package/dist/types/select/select.d.ts.map +1 -1
  276. package/dist/types/table/index.d.ts +2 -2
  277. package/dist/types/table/index.d.ts.map +1 -1
  278. package/dist/types/table/table-parts.d.ts +8 -2
  279. package/dist/types/table/table-parts.d.ts.map +1 -1
  280. package/dist/types/table/table.types.d.ts +28 -1
  281. package/dist/types/table/table.types.d.ts.map +1 -1
  282. package/dist/types/toggle/toggle.types.d.ts +1 -1
  283. package/dist/types/toggle/toggle.types.d.ts.map +1 -1
  284. package/dist/types/toggle-group/toggle-group.d.ts.map +1 -1
  285. package/dist/types/toggle-group/toggle-group.types.d.ts +6 -1
  286. package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
  287. package/dist/{upload-Bq_UiyMr.js → upload-DjnlVR8y.js} +2 -2
  288. package/dist/upload.js +1 -1
  289. package/dist/{wizard-B4GrlEqh.js → wizard-BxA08vXt.js} +1 -1
  290. package/dist/wizard.js +1 -1
  291. package/package.json +12 -7
  292. package/dist/button-DakQ-7Tm.js +0 -97
  293. package/dist/cascader-CARCYdHh.js +0 -1097
  294. package/dist/chart-BNzfIfQe.js +0 -948
  295. package/dist/currency-field-B7OZ0hk7.js +0 -436
  296. package/dist/dashboard-grid-nfhEewA4.js +0 -1005
  297. package/dist/date-picker-DQ5SIhdA.js +0 -264
  298. package/dist/date-range-picker-lpB08hK_.js +0 -471
  299. package/dist/datetime-picker-0F0kDW-8.js +0 -629
  300. package/dist/datetime-range-picker-ClnEleth.js +0 -994
  301. package/dist/drawer-Ci3wuCVa.js +0 -758
  302. package/dist/entity-picker-UGhbVwkC.js +0 -1111
  303. package/dist/import-export-center-D8xbCLWs.js +0 -813
  304. package/dist/menu-parts-BQej6eU9.js +0 -787
  305. package/dist/popover-DE22lSpV.js +0 -476
  306. package/dist/react-dom-DzrKNxo6.js +0 -273
  307. package/dist/toggle-group-DQBlI1TV.js +0 -140
@@ -1,17 +1,17 @@
1
- import { t as e } from "./react-dom-DzrKNxo6.js";
2
- import { n as t, t as n } from "./icon-T9Yt4tnm.js";
3
- import { n as r, r as i } from "./i18n-DpW8lqJ1.js";
4
- import { b as a } from "./field-BJh5HI7w.js";
5
- import { t as o } from "./highlight-0Qw23QPp.js";
6
- import { createControllable as s } from "@slotted/core/state";
7
- import { createContext as c, useCallback as l, useContext as u, useEffect as d, useId as f, useImperativeHandle as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
8
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { createPresence as x } from "@slotted/core/presence";
10
- import { createPortalRoot as S, setPortalContainer as C } from "@slotted/core/portal";
11
- import { createDismissableLayer as w, pressOrigin as T } from "@slotted/core/dismissable-layer";
12
- import { createPositioner as ee } from "@slotted/core/positioner";
13
- import { comboboxMessages as E } from "@slotted/core/i18n";
14
- import { createFilter as te, moveIndex as D } from "@slotted/core/collection";
1
+ import { n as e, t } from "./icon-T9Yt4tnm.js";
2
+ import { n, r } from "./i18n-DpW8lqJ1.js";
3
+ import { b as i } from "./field-NJaCxl2h.js";
4
+ import { t as a } from "./highlight-0Qw23QPp.js";
5
+ import { createControllable as o } from "@slotted/core/state";
6
+ import { createContext as s, useCallback as c, useContext as l, useEffect as u, useId as d, useImperativeHandle as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
7
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ import { createPresence as ee } from "@slotted/core/presence";
9
+ import { createPortalRoot as b, setPortalContainer as x } from "@slotted/core/portal";
10
+ import { createDismissableLayer as S, pressOrigin as C } from "@slotted/core/dismissable-layer";
11
+ import { createPositioner as te } from "@slotted/core/positioner";
12
+ import { createPortal as ne } from "react-dom";
13
+ import { comboboxMessages as w } from "@slotted/core/i18n";
14
+ import { createFilter as T, moveIndex as E, revealWithin as D } from "@slotted/core/collection";
15
15
  import { matchRanges as O } from "@slotted/core/highlight";
16
16
  //#region src/combobox/combobox-defaults.tsx
17
17
  var k = {
@@ -45,14 +45,14 @@ var k = {
45
45
  strategy: "absolute",
46
46
  variant: "outline",
47
47
  width: "content"
48
- }, A = c(k);
48
+ }, A = s(k);
49
49
  function j() {
50
- return u(A);
50
+ return l(A);
51
51
  }
52
- function ne({ children: e, container: t, ...n }) {
52
+ function re({ children: e, container: t, ...n }) {
53
53
  let r = j();
54
- d(() => {
55
- if (t !== void 0) return C(t), () => C(null);
54
+ u(() => {
55
+ if (t !== void 0) return x(t), () => x(null);
56
56
  }, [t]);
57
57
  let i = {
58
58
  align: n.align ?? r.align,
@@ -86,127 +86,127 @@ function ne({ children: e, container: t, ...n }) {
86
86
  variant: n.variant ?? r.variant,
87
87
  width: n.width ?? r.width
88
88
  };
89
- return /* @__PURE__ */ y(A.Provider, {
89
+ return /* @__PURE__ */ v(A.Provider, {
90
90
  value: i,
91
91
  children: e
92
92
  });
93
93
  }
94
94
  //#endregion
95
95
  //#region src/combobox/combobox.tsx
96
- var re = c(void 0);
96
+ var ie = s(void 0);
97
97
  function M() {
98
- let e = u(re);
98
+ let e = l(ie);
99
99
  if (e === void 0) throw Error("ComboboxInput, ComboboxContent and every option have to be inside a Combobox.");
100
100
  return e;
101
101
  }
102
102
  var N = (e) => "options" in e;
103
- function ie(e) {
103
+ function ae(e) {
104
104
  return e === void 0 ? [] : e.flatMap((e) => N(e) ? e.options : [e]);
105
105
  }
106
- function ae({ align: e, alignOffset: t, allowsCustomValue: n, autocomplete: o, autoHighlight: c, children: u, clearable: d, closeOnEscape: m, closeOnOutsidePress: v, closeOnSelect: b, collisionPadding: x, onCreate: S, defaultHighlightedValue: C = null, defaultInputValue: w = "", defaultOpen: T = !1, defaultValue: ee = null, disabled: D, filter: O, flip: k, form: A, fullWidth: ne, hideWhenDetached: M, highlightedValue: N, highlightMatch: ae, inputValue: P, invalid: oe, items: F, loading: I, locale: L, loop: R, messages: z, mount: se, name: ce, onHighlightedValueChange: le, onInputValueChange: ue, onInputReset: B, onLoadMore: de, onOpenChange: V, onValueChange: fe, open: H, openOn: pe, portal: me, readOnly: he, ref: ge, required: _e, shift: ve, side: ye, sideOffset: be, size: xe, strategy: Se, total: Ce, value: we, variant: Te, width: Ee }) {
107
- let U = j(), W = a(), De = i(E, z), Oe = r(), ke = L ?? Oe, Ae = f(), je = `${Ae}listbox`, Me = `${Ae}input`, [Ne, Pe] = _(T), [Fe, Ie] = _(ee), [Le, Re] = _(w), [ze, Be] = _(C), [Ve, He] = _(null), [Ue, We] = _(null), Ge = D ?? W?.disabled ?? U.disabled, Ke = he ?? W?.readOnly ?? U.readOnly, G = (H ?? Ne) && !Ge, K = we === void 0 ? Fe : we, q = P ?? Le, qe = N === void 0 ? ze : N, Je = g(G);
108
- G && (Je.current = !0);
109
- let Ye = g("none"), [Xe, Ze] = _(null), Qe = g(!1), $e = g(/* @__PURE__ */ new Map()), [et, tt] = _(0), nt = h(() => {
106
+ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, autoHighlight: l, children: u, clearable: p, closeOnEscape: _, closeOnOutsidePress: y, closeOnSelect: ee, collisionPadding: b, onCreate: x, defaultHighlightedValue: S = null, defaultInputValue: C = "", defaultOpen: te = !1, defaultValue: ne = null, disabled: E, filter: O, flip: k, form: A, fullWidth: re, hideWhenDetached: M, highlightedValue: N, highlightMatch: oe, inputValue: P, invalid: F, items: I, loading: L, locale: R, loop: z, messages: se, mount: ce, name: le, onHighlightedValueChange: ue, onInputValueChange: B, onInputReset: de, onLoadMore: V, onOpenChange: fe, onValueChange: pe, open: H, openOn: me, portal: he, readOnly: ge, ref: _e, required: ve, shift: ye, side: be, sideOffset: xe, size: Se, strategy: Ce, total: we, value: Te, variant: Ee, width: De }) {
107
+ let U = j(), W = i(), Oe = r(w, se), ke = n(), Ae = R ?? ke, je = d(), Me = `${je}listbox`, Ne = `${je}input`, [Pe, Fe] = g(te), [Ie, Le] = g(ne), [Re, ze] = g(C), [Be, Ve] = g(S), [He, Ue] = g(null), [G, We] = g(null), Ge = E ?? W?.disabled ?? U.disabled, Ke = ge ?? W?.readOnly ?? U.readOnly, K = (H ?? Pe) && !Ge, q = Te === void 0 ? Ie : Te, J = P ?? Re, qe = N === void 0 ? Be : N, Je = h(K);
108
+ K && (Je.current = !0);
109
+ let Ye = h("none"), [Xe, Ze] = g(null), Qe = h(!1), $e = h(/* @__PURE__ */ new Map()), [et, tt] = g(0), nt = m(() => {
110
110
  let e = /* @__PURE__ */ new Map();
111
- for (let t of ie(F)) e.set(t.value, t.label);
111
+ for (let t of ae(I)) e.set(t.value, t.label);
112
112
  return e;
113
- }, [F]), rt = l((e, t) => {
113
+ }, [I]), rt = c((e, t) => {
114
114
  $e.current.get(e) !== t && ($e.current.set(e, t), tt((e) => e + 1));
115
- }, []), it = l((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = l((e) => `${Ae}option-${encodeURIComponent(e)}`, [Ae]), J = q === (K === null ? void 0 : it(K)) ? "" : q, Y = h(() => te({ locale: ke }), [ke]), ot = l((e) => J === "" || O === null ? !0 : O === void 0 ? Y.contains(e, J) : O(e, J), [
116
- Y,
115
+ }, []), it = c((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = c((e) => `${je}option-${encodeURIComponent(e)}`, [je]), Y = J === (q === null ? void 0 : it(q)) ? "" : J, X = m(() => T({ locale: Ae }), [Ae]), ot = c((e) => Y === "" || O === null ? !0 : O === void 0 ? X.contains(e, Y) : O(e, Y), [
116
+ X,
117
117
  O,
118
- J
119
- ]), X = g({
118
+ Y
119
+ ]), Z = h({
120
120
  currentHighlighted: qe,
121
- currentInput: q,
122
- currentOpen: G,
123
- currentValue: K,
121
+ currentInput: J,
122
+ currentOpen: K,
123
+ currentValue: q,
124
124
  highlightedValue: N,
125
- inputNode: Ve,
125
+ inputNode: He,
126
126
  inputValue: P,
127
- onHighlightedValueChange: le,
128
- onInputValueChange: ue,
129
- onCreate: S,
130
- onOpenChange: V,
131
- onValueChange: fe,
127
+ onHighlightedValueChange: ue,
128
+ onInputValueChange: B,
129
+ onCreate: x,
130
+ onOpenChange: fe,
131
+ onValueChange: pe,
132
132
  open: H,
133
- value: we
133
+ value: Te
134
134
  });
135
- X.current = {
135
+ Z.current = {
136
136
  currentHighlighted: qe,
137
- currentInput: q,
138
- currentOpen: G,
139
- currentValue: K,
137
+ currentInput: J,
138
+ currentOpen: K,
139
+ currentValue: q,
140
140
  highlightedValue: N,
141
- inputNode: Ve,
141
+ inputNode: He,
142
142
  inputValue: P,
143
- onHighlightedValueChange: le,
144
- onInputValueChange: ue,
145
- onCreate: S,
146
- onOpenChange: V,
147
- onValueChange: fe,
143
+ onHighlightedValueChange: ue,
144
+ onInputValueChange: B,
145
+ onCreate: x,
146
+ onOpenChange: fe,
147
+ onValueChange: pe,
148
148
  open: H,
149
- value: we
149
+ value: Te
150
150
  };
151
- let Z = l((e, t, n) => {
152
- let r = X.current;
153
- e !== r.currentOpen && s({
151
+ let st = c((e, t, n) => {
152
+ let r = Z.current;
153
+ e !== r.currentOpen && o({
154
154
  controlled: r.open,
155
155
  initial: r.currentOpen,
156
156
  onRequest: (e) => r.onOpenChange?.(e.value, e)
157
- }).request(e, t, n) && (Pe(e), e || (Be(null), Ye.current = "none"));
158
- }, []), st = l((e, t, n) => {
159
- let r = X.current;
160
- e !== r.currentHighlighted && s({
157
+ }).request(e, t, n) && (Fe(e), e || (Ve(null), Ye.current = "none"));
158
+ }, []), ct = c((e, t, n) => {
159
+ let r = Z.current;
160
+ e !== r.currentHighlighted && o({
161
161
  controlled: r.highlightedValue,
162
162
  initial: r.currentHighlighted,
163
163
  onRequest: (e) => r.onHighlightedValueChange?.(e.value, e)
164
- }).request(e, t, n) && Be(e);
165
- }, []), ct = l((e) => {
164
+ }).request(e, t, n) && Ve(e);
165
+ }, []), lt = c((e) => {
166
166
  if (e !== "") {
167
- for (let [t, n] of nt) if (Y.equals(n, e)) return t;
168
- for (let [t, n] of $e.current) if (Y.equals(n, e)) return t;
167
+ for (let [t, n] of nt) if (X.equals(n, e)) return t;
168
+ for (let [t, n] of $e.current) if (X.equals(n, e)) return t;
169
169
  }
170
170
  }, [
171
171
  nt,
172
- Y,
172
+ X,
173
173
  et
174
- ]), Q = l((e, t, n) => {
175
- let r = X.current;
176
- Ze(null), e !== r.currentInput && s({
174
+ ]), Q = c((e, t, n) => {
175
+ let r = Z.current;
176
+ Ze(null), e !== r.currentInput && o({
177
177
  controlled: r.inputValue,
178
178
  initial: r.currentInput,
179
179
  onRequest: (e) => r.onInputValueChange?.(e.value, e)
180
- }).request(e, t, n) && Re(e);
181
- }, []), $ = l((e, t, n) => {
182
- let r = X.current;
183
- e !== r.currentValue && s({
180
+ }).request(e, t, n) && ze(e);
181
+ }, []), $ = c((e, t, n) => {
182
+ let r = Z.current;
183
+ e !== r.currentValue && o({
184
184
  controlled: r.value,
185
185
  initial: r.currentValue,
186
186
  onRequest: (e) => r.onValueChange?.(e.value, e)
187
- }).request(e, t, n) && Ie(e);
188
- }, []), lt = g({
187
+ }).request(e, t, n) && Le(e);
188
+ }, []), ut = h({
189
189
  allowsCustomValue: !1,
190
- currentInput: q,
191
- currentValue: K,
190
+ currentInput: J,
191
+ currentValue: q,
192
192
  labelFor: it,
193
- onInputReset: B,
193
+ onInputReset: de,
194
194
  select: $,
195
195
  setInputValue: Q,
196
- valueForLabel: ct
196
+ valueForLabel: lt
197
197
  });
198
- lt.current = {
199
- allowsCustomValue: n ?? U.allowsCustomValue,
200
- currentInput: q,
201
- currentValue: K,
198
+ ut.current = {
199
+ allowsCustomValue: a ?? U.allowsCustomValue,
200
+ currentInput: J,
201
+ currentValue: q,
202
202
  labelFor: it,
203
- onInputReset: B,
203
+ onInputReset: de,
204
204
  select: $,
205
205
  setInputValue: Q,
206
- valueForLabel: ct
206
+ valueForLabel: lt
207
207
  };
208
- let ut = l((e) => {
209
- let t = lt.current, n = t.currentInput, r = t.valueForLabel(n);
208
+ let dt = c((e) => {
209
+ let t = ut.current, n = t.currentInput, r = t.valueForLabel(n);
210
210
  if (r !== void 0) {
211
211
  r !== t.currentValue && t.select(r, "blur", e), t.setInputValue(t.labelFor(r) ?? n, "blur", e);
212
212
  return;
@@ -224,105 +224,105 @@ function ae({ align: e, alignOffset: t, allowsCustomValue: n, autocomplete: o, a
224
224
  reason: "blur",
225
225
  source: e
226
226
  });
227
- }, []), dt = l((e, t, n) => {
228
- X.current.onCreate?.(e, {
227
+ }, []), ft = c((e, t, n) => {
228
+ Z.current.onCreate?.(e, {
229
229
  reason: t,
230
230
  source: n
231
231
  });
232
- }, []), ft = l((e, t) => {
232
+ }, []), pt = c((e, t) => {
233
233
  $(null, e, t), Q("", e === "clear" ? "clear" : "programmatic", t);
234
234
  }, [$, Q]);
235
- p(ge, () => ({
236
- close: () => Z(!1, "programmatic"),
237
- focus: () => X.current.inputNode?.focus({ preventScroll: !0 }),
238
- open: () => Z(!0, "programmatic"),
235
+ f(_e, () => ({
236
+ close: () => st(!1, "programmatic"),
237
+ focus: () => Z.current.inputNode?.focus({ preventScroll: !0 }),
238
+ open: () => st(!0, "programmatic"),
239
239
  scrollToKey: (e) => {
240
- let t = Ue?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
241
- typeof t?.scrollIntoView == "function" && t.scrollIntoView({ block: "nearest" });
240
+ let t = G?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
241
+ t != null && G !== null && D(t, G);
242
242
  }
243
- }), [Ue, Z]);
244
- let pt = {
243
+ }), [G, st]);
244
+ let mt = {
245
245
  align: e ?? U.align,
246
246
  alignOffset: t ?? U.alignOffset,
247
- allowsCustomValue: n ?? U.allowsCustomValue,
248
- autocomplete: o ?? U.autocomplete,
249
- autoHighlight: c ?? U.autoHighlight,
250
- clear: ft,
251
- clearable: d ?? U.clearable,
252
- closeOnEscape: m ?? U.closeOnEscape,
253
- closeOnOutsidePress: v ?? U.closeOnOutsidePress,
254
- closeOnSelect: b ?? U.closeOnSelect,
255
- collisionPadding: x ?? U.collisionPadding,
247
+ allowsCustomValue: a ?? U.allowsCustomValue,
248
+ autocomplete: s ?? U.autocomplete,
249
+ autoHighlight: l ?? U.autoHighlight,
250
+ clear: pt,
251
+ clearable: p ?? U.clearable,
252
+ closeOnEscape: _ ?? U.closeOnEscape,
253
+ closeOnOutsidePress: y ?? U.closeOnOutsidePress,
254
+ closeOnSelect: ee ?? U.closeOnSelect,
255
+ collisionPadding: b ?? U.collisionPadding,
256
256
  completion: Xe,
257
- contentId: je,
258
- contentNode: Ue,
259
- canCreate: S !== void 0,
260
- create: dt,
257
+ contentId: Me,
258
+ contentNode: G,
259
+ canCreate: x !== void 0,
260
+ create: ft,
261
261
  disabled: Ge,
262
262
  entry: Ye,
263
263
  flip: k ?? U.flip,
264
264
  form: A,
265
- fullWidth: ne ?? U.fullWidth,
265
+ fullWidth: re ?? U.fullWidth,
266
266
  hideWhenDetached: M ?? U.hideWhenDetached,
267
267
  highlighted: qe,
268
- highlightMatch: ae ?? U.highlightMatch,
269
- inputId: Me,
270
- inputNode: Ve,
271
- inputValue: q,
272
- invalid: oe ?? W?.invalid ?? U.invalid,
268
+ highlightMatch: oe ?? U.highlightMatch,
269
+ inputId: Ne,
270
+ inputNode: He,
271
+ inputValue: J,
272
+ invalid: F ?? W?.invalid ?? U.invalid,
273
273
  labelFor: it,
274
- loading: I ?? U.loading,
275
- locale: ke,
276
- loop: R ?? U.loop,
274
+ loading: L ?? U.loading,
275
+ locale: Ae,
276
+ loop: z ?? U.loop,
277
277
  matches: ot,
278
- mount: se ?? U.mount,
279
- name: ce,
280
- onLoadMore: de,
281
- open: G,
282
- openOn: pe ?? U.openOn,
278
+ mount: ce ?? U.mount,
279
+ name: le,
280
+ onLoadMore: V,
281
+ open: K,
282
+ openOn: me ?? U.openOn,
283
283
  optionId: at,
284
- portal: me ?? U.portal,
285
- query: J,
284
+ portal: he ?? U.portal,
285
+ query: Y,
286
286
  readOnly: Ke,
287
287
  registerLabel: rt,
288
- required: _e ?? W?.required ?? U.required,
288
+ required: ve ?? W?.required ?? U.required,
289
289
  seen: Je.current,
290
290
  select: $,
291
291
  setCompletion: Ze,
292
292
  setContentNode: We,
293
- setHighlighted: st,
294
- setInputNode: He,
293
+ setHighlighted: ct,
294
+ setInputNode: Ue,
295
295
  setInputValue: Q,
296
- setOpen: Z,
297
- settleInput: ut,
298
- shift: ve ?? U.shift,
299
- side: ye ?? U.side,
300
- sideOffset: be ?? U.sideOffset,
301
- size: xe ?? W?.size ?? U.size,
302
- strategy: Se ?? U.strategy,
303
- t: De,
304
- total: Ce,
305
- value: K,
306
- variant: Te ?? U.variant,
296
+ setOpen: st,
297
+ settleInput: dt,
298
+ shift: ye ?? U.shift,
299
+ side: be ?? U.side,
300
+ sideOffset: xe ?? U.sideOffset,
301
+ size: Se ?? W?.size ?? U.size,
302
+ strategy: Ce ?? U.strategy,
303
+ t: Oe,
304
+ total: we,
305
+ value: q,
306
+ variant: Ee ?? U.variant,
307
307
  wantsCompletion: Qe,
308
- width: Ee ?? U.width
308
+ width: De ?? U.width
309
309
  };
310
- return /* @__PURE__ */ y(re.Provider, {
311
- value: pt,
310
+ return /* @__PURE__ */ v(ie.Provider, {
311
+ value: mt,
312
312
  children: u
313
313
  });
314
314
  }
315
315
  //#endregion
316
316
  //#region src/combobox/combobox-collection.ts
317
- var P = e(), oe = "[data-part='item']";
317
+ var P = "[data-part='item']";
318
318
  function F(e) {
319
- return e === null ? [] : [...e.querySelectorAll(oe)];
319
+ return e === null ? [] : [...e.querySelectorAll(P)];
320
320
  }
321
321
  var I = (e) => e.dataset.value ?? "", L = (e) => e.dataset.disabled === void 0, R = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
322
322
  function z(e, t, n, r) {
323
323
  let i = F(e);
324
324
  if (i.length === 0) return null;
325
- let a = D({
325
+ let a = E({
326
326
  enabled: i.map(L),
327
327
  from: t === null ? -1 : i.findIndex((e) => I(e) === t),
328
328
  intent: n,
@@ -350,7 +350,7 @@ function le(e, t) {
350
350
  function ue(e, t) {
351
351
  if (e === null || t === null) return;
352
352
  let n = F(e).find((e) => I(e) === t);
353
- typeof n?.scrollIntoView == "function" && n.scrollIntoView({ block: "nearest" });
353
+ n !== void 0 && D(n, e);
354
354
  }
355
355
  //#endregion
356
356
  //#region src/combobox/combobox-parts.tsx
@@ -362,21 +362,21 @@ function B(e, t) {
362
362
  function de(e, ...t) {
363
363
  for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
364
364
  }
365
- function V({ ref: e, render: r, ...i }) {
366
- let o = M(), s = a(), [c, u] = _(null);
367
- d(() => {
368
- o.setInputNode(c);
369
- }, [o, c]), m(() => {
370
- o.completion !== null && c !== null && c.setSelectionRange(o.inputValue.length, o.completion.length);
365
+ function V({ ref: n, render: r, ...a }) {
366
+ let o = M(), s = i(), [l, d] = g(null);
367
+ u(() => {
368
+ o.setInputNode(l);
369
+ }, [o, l]), p(() => {
370
+ o.completion !== null && l !== null && l.setSelectionRange(o.inputValue.length, o.completion.length);
371
371
  }, [
372
372
  o.completion,
373
373
  o.inputValue,
374
- c
374
+ l
375
375
  ]);
376
376
  let f = (e, t) => {
377
377
  let n = z(o.contentNode, o.highlighted, e, o.loop);
378
378
  n !== null && o.setHighlighted(n, "keyboard", t);
379
- }, p = (e) => {
379
+ }, m = (e) => {
380
380
  if (o.highlighted === null && o.completion !== null) {
381
381
  let t = le(o.contentNode, o.completion);
382
382
  if (t !== null) {
@@ -396,7 +396,7 @@ function V({ ref: e, render: r, ...i }) {
396
396
  o.select(t, "keyboard", e), o.setInputValue(o.labelFor(t) ?? t, "select", e), o.closeOnSelect && o.setOpen(!1, "select", e);
397
397
  }, h = (e, t) => {
398
398
  o.entry.current = e, o.setOpen(!0, "keyboard", t);
399
- }, g = (e) => {
399
+ }, ee = (e) => {
400
400
  if (o.disabled) return;
401
401
  let t = e.altKey;
402
402
  switch (e.key) {
@@ -418,7 +418,7 @@ function V({ ref: e, render: r, ...i }) {
418
418
  return;
419
419
  case "Enter":
420
420
  if (!o.open && !o.allowsCustomValue) return;
421
- e.preventDefault(), p(e.nativeEvent);
421
+ e.preventDefault(), m(e.nativeEvent);
422
422
  return;
423
423
  case "Escape":
424
424
  if (o.open) {
@@ -429,28 +429,28 @@ function V({ ref: e, render: r, ...i }) {
429
429
  e.preventDefault(), o.inputValue === (o.labelFor(o.value) ?? "") ? o.clear("keyboard", e.nativeEvent) : o.setInputValue(o.labelFor(o.value) ?? "", "keyboard", e.nativeEvent);
430
430
  return;
431
431
  case "Tab":
432
- o.completion === null ? o.open && o.setOpen(!1, "dismiss", e.nativeEvent) : p(e.nativeEvent);
432
+ o.completion === null ? o.open && o.setOpen(!1, "dismiss", e.nativeEvent) : m(e.nativeEvent);
433
433
  return;
434
434
  }
435
- }, x = (e) => {
435
+ }, b = (e) => {
436
436
  let t = e.currentTarget.value;
437
437
  o.setInputValue(t, "keyboard", e.nativeEvent), o.wantsCompletion.current = o.autocomplete === "both" && t.length > o.inputValue.length, o.openOn === "input" && !o.open && !o.readOnly && (o.entry.current = o.autoHighlight ? "first" : "none", o.setOpen(!0, "keyboard", e.nativeEvent));
438
- }, S = () => {
438
+ }, x = () => {
439
439
  o.openOn !== "focus" || o.readOnly || o.open || (o.entry.current = "selected", o.setOpen(!0, "keyboard"));
440
- }, C = (e) => {
440
+ }, S = (e) => {
441
441
  o.openOn === "manual" || o.open || o.disabled || o.readOnly || (o.entry.current = "selected", o.setOpen(!0, "pointer", e.nativeEvent));
442
- }, w = (e) => {
442
+ }, te = (e) => {
443
443
  let t = e.relatedTarget;
444
444
  if (t instanceof Node && o.contentNode?.contains(t) === !0) return;
445
- let n = T(c?.ownerDocument);
445
+ let n = C(l?.ownerDocument);
446
446
  n instanceof Node && o.contentNode?.contains(n) === !0 || (o.settleInput(e), o.open && o.setOpen(!1, "blur"));
447
- }, ee = (e) => {
448
- o.clear("clear", e.nativeEvent), c?.focus({ preventScroll: !0 });
449
- }, E = (e) => {
450
- o.disabled || o.readOnly || (o.entry.current = "selected", o.setOpen(!o.open, "pointer", e.nativeEvent), c?.focus({ preventScroll: !0 }));
451
- }, te = l((t) => {
452
- u(t), de(t, e);
453
- }, [e]), D = [i["aria-describedby"], s?.describedBy].filter(Boolean).join(" "), O = o.clearable && o.inputValue !== "" && !o.disabled && !o.readOnly, k = {
447
+ }, ne = (e) => {
448
+ o.clear("clear", e.nativeEvent), l?.focus({ preventScroll: !0 });
449
+ }, w = (e) => {
450
+ o.disabled || o.readOnly || (o.entry.current = "selected", o.setOpen(!o.open, "pointer", e.nativeEvent), l?.focus({ preventScroll: !0 }));
451
+ }, T = c((e) => {
452
+ d(e), de(e, n);
453
+ }, [n]), E = [a["aria-describedby"], s?.describedBy].filter(Boolean).join(" "), D = o.clearable && o.inputValue !== "" && !o.disabled && !o.readOnly, O = {
454
454
  "data-part": "root",
455
455
  "data-size": o.size,
456
456
  "data-ui": "combobox",
@@ -462,55 +462,55 @@ function V({ ref: e, render: r, ...i }) {
462
462
  ...o.invalid ? { "data-invalid": "" } : {},
463
463
  ...o.required ? { "data-required": "" } : {},
464
464
  ...o.loading ? { "data-loading": "" } : {}
465
- }, A = /* @__PURE__ */ b(v, { children: [
466
- /* @__PURE__ */ y("input", {
467
- ...i,
465
+ }, k = /* @__PURE__ */ y(_, { children: [
466
+ /* @__PURE__ */ v("input", {
467
+ ...a,
468
468
  "aria-activedescendant": o.open && o.highlighted !== null ? o.optionId(o.highlighted) : void 0,
469
469
  "aria-autocomplete": o.autocomplete,
470
470
  "aria-controls": o.open ? o.contentId : void 0,
471
- "aria-describedby": D === "" ? void 0 : D,
471
+ "aria-describedby": E === "" ? void 0 : E,
472
472
  "aria-expanded": o.open,
473
473
  "aria-invalid": o.invalid ? !0 : void 0,
474
474
  "aria-readonly": o.readOnly ? !0 : void 0,
475
475
  "data-part": "input",
476
476
  disabled: o.disabled,
477
- id: i.id ?? s?.ids.control ?? o.inputId,
478
- onBlur: B(i.onBlur, w),
479
- onChange: B(i.onChange, x),
480
- onClick: B(i.onClick, C),
481
- onFocus: B(i.onFocus, S),
482
- onKeyDown: B(i.onKeyDown, g),
477
+ id: a.id ?? s?.ids.control ?? o.inputId,
478
+ onBlur: B(a.onBlur, te),
479
+ onChange: B(a.onChange, b),
480
+ onClick: B(a.onClick, S),
481
+ onFocus: B(a.onFocus, x),
482
+ onKeyDown: B(a.onKeyDown, ee),
483
483
  readOnly: o.readOnly,
484
- ref: te,
484
+ ref: T,
485
485
  required: o.required,
486
486
  role: "combobox",
487
487
  type: "text",
488
488
  value: o.completion ?? o.inputValue
489
489
  }),
490
- O ? /* @__PURE__ */ y("button", {
490
+ D ? /* @__PURE__ */ v("button", {
491
491
  "aria-label": o.t("clear"),
492
492
  "data-part": "clear",
493
- onClick: ee,
493
+ onClick: ne,
494
494
  type: "button",
495
- children: /* @__PURE__ */ y(n, { children: /* @__PURE__ */ y(t, { name: "x" }) })
495
+ children: /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(e, { name: "x" }) })
496
496
  }) : null,
497
- /* @__PURE__ */ y("button", {
497
+ /* @__PURE__ */ v("button", {
498
498
  "aria-label": o.t("trigger"),
499
499
  "data-part": "trigger",
500
500
  disabled: o.disabled,
501
- onClick: E,
501
+ onClick: w,
502
502
  tabIndex: -1,
503
503
  type: "button",
504
- children: o.loading ? /* @__PURE__ */ y("span", {
504
+ children: o.loading ? /* @__PURE__ */ v("span", {
505
505
  "aria-hidden": "true",
506
506
  "data-part": "busy",
507
507
  "data-ui": "spinner"
508
- }) : /* @__PURE__ */ y("span", {
508
+ }) : /* @__PURE__ */ v("span", {
509
509
  "data-part": "arrow",
510
- children: /* @__PURE__ */ y(n, { children: /* @__PURE__ */ y(t, { name: "chevron-down" }) })
510
+ children: /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(e, { name: "chevron-down" }) })
511
511
  })
512
512
  }),
513
- o.name === void 0 ? null : /* @__PURE__ */ y("input", {
513
+ o.name === void 0 ? null : /* @__PURE__ */ v("input", {
514
514
  "aria-hidden": "true",
515
515
  form: o.form,
516
516
  name: o.name,
@@ -532,80 +532,80 @@ function V({ ref: e, render: r, ...i }) {
532
532
  value: o.value ?? ""
533
533
  })
534
534
  ] });
535
- return r === void 0 ? /* @__PURE__ */ y("div", {
536
- ...k,
537
- children: A
535
+ return r === void 0 ? /* @__PURE__ */ v("div", {
536
+ ...O,
537
+ children: k
538
538
  }) : r({
539
- ...k,
540
- children: A
539
+ ...O,
540
+ children: k
541
541
  });
542
542
  }
543
543
  function fe(e, t) {
544
544
  return e !== null && e.querySelector(`[data-part='item'][data-value="${CSS.escape(t)}"]`)?.hasAttribute("data-create") === !0;
545
545
  }
546
- function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
547
- let o = M(), [s, c] = _(null), [l, u] = _(null), [f, p] = _(null), [h, v] = _("unmounted"), [C, T] = _(!1), [E, te] = _(0), D = g(null), O = g(null), k = g(o);
548
- k.current = o, d(() => {
549
- let e = x({
546
+ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
547
+ let o = M(), [s, c] = g(null), [l, d] = g(null), [f, m] = g(null), [_, x] = g("unmounted"), [C, w] = g(!1), [T, E] = g(0), D = h(null), O = h(null), k = h(o);
548
+ k.current = o, u(() => {
549
+ let e = ee({
550
550
  present: k.current.open,
551
- onStatusChange: v
551
+ onStatusChange: x
552
552
  });
553
- return D.current = e, v(e.status), () => {
553
+ return D.current = e, x(e.status), () => {
554
554
  e.destroy(), D.current = null;
555
555
  };
556
- }, []), d(() => D.current?.sync(o.open), [o.open]), d(() => D.current?.setNode(s), [s]), d(() => o.setContentNode(l), [o, l]);
557
- let A = o.mount === "eager" || o.mount === "lazy" && o.seen || h !== "unmounted";
558
- d(() => {
556
+ }, []), u(() => D.current?.sync(o.open), [o.open]), u(() => D.current?.setNode(s), [s]), u(() => o.setContentNode(l), [o, l]);
557
+ let A = o.mount === "eager" || o.mount === "lazy" && o.seen || _ !== "unmounted";
558
+ u(() => {
559
559
  if (!A) {
560
- p(null);
560
+ m(null);
561
561
  return;
562
562
  }
563
- let e = S({
563
+ let e = b({
564
564
  origin: o.inputNode,
565
565
  disabled: !o.portal
566
566
  });
567
- return p(e.container), () => e.release();
567
+ return m(e.container), () => e.release();
568
568
  }, [
569
569
  o.inputNode,
570
570
  o.portal,
571
571
  A
572
572
  ]);
573
- let { align: j, alignOffset: ne, collisionPadding: re, flip: N, hideWhenDetached: ie, shift: ae, side: oe, sideOffset: L, strategy: R, width: z } = o;
574
- if (d(() => {
573
+ let { align: j, alignOffset: re, collisionPadding: ie, flip: N, hideWhenDetached: ae, shift: oe, side: P, sideOffset: L, strategy: R, width: z } = o;
574
+ if (u(() => {
575
575
  if (s === null || o.inputNode === null) return;
576
- let e = !0, t = o.inputNode.closest("[data-part='root']") ?? o.inputNode, n = ee(t, s, {
576
+ let e = !0, t = o.inputNode.closest("[data-part='root']") ?? o.inputNode, n = te(t, s, {
577
577
  align: j,
578
- alignOffset: ne,
579
- boundaryPadding: re,
578
+ alignOffset: re,
579
+ boundaryPadding: ie,
580
580
  flip: N,
581
- hideWhenDetached: ie,
581
+ hideWhenDetached: ae,
582
582
  matchWidth: z === "anchor",
583
- shift: ae,
584
- side: oe,
583
+ shift: oe,
584
+ side: P,
585
585
  sideOffset: L,
586
586
  strategy: R
587
587
  });
588
588
  return n.update().then(() => {
589
- e && T(!0);
589
+ e && w(!0);
590
590
  }), () => {
591
- e = !1, n.destroy(), T(!1);
591
+ e = !1, n.destroy(), w(!1);
592
592
  };
593
593
  }, [
594
594
  j,
595
- ne,
596
595
  re,
596
+ ie,
597
597
  o.inputNode,
598
598
  N,
599
- ie,
600
- s,
601
599
  ae,
600
+ s,
602
601
  oe,
602
+ P,
603
603
  L,
604
604
  R,
605
605
  z
606
- ]), d(() => {
606
+ ]), u(() => {
607
607
  if (s === null || !o.open) return;
608
- let e = [o.inputNode?.closest("[data-part='root']") ?? null].filter((e) => e !== null), t = w(s, {
608
+ let e = [o.inputNode?.closest("[data-part='root']") ?? null].filter((e) => e !== null), t = S(s, {
609
609
  branches: e,
610
610
  escape: o.closeOnEscape,
611
611
  focusOutside: !1,
@@ -623,10 +623,10 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
623
623
  o.inputNode,
624
624
  o.open,
625
625
  s
626
- ]), m(() => {
626
+ ]), p(() => {
627
627
  let e = F(l).filter((e) => e.dataset.create === void 0).length;
628
- te((t) => t === e ? t : e);
629
- }), m(() => {
628
+ E((t) => t === e ? t : e);
629
+ }), p(() => {
630
630
  let e = k.current;
631
631
  if (e.open && l !== null) {
632
632
  if (e.entry.current !== "none") {
@@ -639,21 +639,25 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
639
639
  }, [
640
640
  o.open,
641
641
  o.query,
642
- E,
642
+ T,
643
643
  l
644
- ]), d(() => {
644
+ ]), u(() => {
645
645
  ue(l, o.highlighted);
646
- }, [o.highlighted, l]), m(() => {
646
+ }, [
647
+ o.highlighted,
648
+ C,
649
+ l
650
+ ]), p(() => {
647
651
  let e = k.current;
648
652
  if (!e.wantsCompletion.current || l === null) return;
649
653
  e.wantsCompletion.current = !1;
650
- let t = pe(l, e.inputValue);
654
+ let t = H(l, e.inputValue);
651
655
  t !== null && t !== e.inputValue && e.setCompletion(t);
652
656
  }, [
653
657
  o.inputValue,
654
- E,
658
+ T,
655
659
  l
656
- ]), d(() => {
660
+ ]), u(() => {
657
661
  let e = O.current, t = l, n = o.onLoadMore;
658
662
  if (e === null || t === null || n === void 0 || typeof IntersectionObserver != "function") return;
659
663
  let r = new IntersectionObserver((e) => {
@@ -662,7 +666,7 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
662
666
  return r.observe(e), () => r.disconnect();
663
667
  }, [
664
668
  o.onLoadMore,
665
- E,
669
+ T,
666
670
  l
667
671
  ]), !A) return null;
668
672
  let ce = {
@@ -673,24 +677,24 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
673
677
  "data-size": o.size,
674
678
  "data-ui": "combobox",
675
679
  "data-width": o.width
676
- }, le = i === void 0 ? o.loading ? o.t("loading") : E === 0 ? null : o.t("count", { count: E }) : i, B = /* @__PURE__ */ y("div", {
680
+ }, le = i === void 0 ? o.loading ? o.t("loading") : T === 0 ? null : o.t("count", { count: T }) : i, B = /* @__PURE__ */ v("div", {
677
681
  ...ce,
678
682
  ref: (e) => {
679
683
  c(e), de(e, n);
680
684
  },
681
- children: /* @__PURE__ */ b("div", {
685
+ children: /* @__PURE__ */ y("div", {
682
686
  ...a,
683
687
  "aria-busy": o.loading ? !0 : void 0,
684
688
  "aria-label": a["aria-label"] ?? void 0,
685
689
  "data-loading": o.loading ? "" : void 0,
686
690
  "data-part": "content",
687
691
  id: o.contentId,
688
- ref: u,
692
+ ref: d,
689
693
  role: "listbox",
690
694
  children: [
691
695
  e,
692
- /* @__PURE__ */ y("div", { ref: O }),
693
- !o.loading && E === 0 && o.canCreate && o.query !== "" ? /* @__PURE__ */ y("div", {
696
+ /* @__PURE__ */ v("div", { ref: O }),
697
+ !o.loading && T === 0 && o.canCreate && o.query !== "" ? /* @__PURE__ */ v("div", {
694
698
  "data-create": "",
695
699
  "data-part": "item",
696
700
  "data-value": o.query,
@@ -704,30 +708,30 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
704
708
  onPointerEnter: (e) => o.setHighlighted(o.query, "pointer", e.nativeEvent),
705
709
  role: "option",
706
710
  ...o.highlighted === o.query ? { "data-current": "" } : {},
707
- children: /* @__PURE__ */ y("span", {
711
+ children: /* @__PURE__ */ v("span", {
708
712
  "data-part": "label",
709
713
  children: o.t("create", { query: o.query })
710
714
  })
711
715
  }) : null,
712
- !o.loading && E === 0 && !(o.canCreate && o.query !== "") ? /* @__PURE__ */ y("div", {
716
+ !o.loading && T === 0 && !(o.canCreate && o.query !== "") ? /* @__PURE__ */ v("div", {
713
717
  "data-part": "empty",
714
718
  children: t ?? o.t("empty")
715
719
  }) : null,
716
- o.loading ? /* @__PURE__ */ y("div", {
720
+ o.loading ? /* @__PURE__ */ v("div", {
717
721
  "aria-hidden": "true",
718
722
  "data-part": "placeholder",
719
723
  children: [
720
724
  0,
721
725
  1,
722
726
  2
723
- ].map((e) => /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y("span", {
727
+ ].map((e) => /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v("span", {
724
728
  "data-part": "root",
725
729
  "data-shape": "text",
726
730
  "data-ui": "skeleton",
727
731
  "data-loading": ""
728
732
  }) }, e))
729
733
  }) : null,
730
- /* @__PURE__ */ y("div", {
734
+ /* @__PURE__ */ v("div", {
731
735
  "aria-live": "polite",
732
736
  "data-part": "status",
733
737
  ...o.loading ? { "data-loading": "" } : {},
@@ -740,101 +744,101 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
740
744
  ...ce,
741
745
  children: e
742
746
  });
743
- return f === null ? V : (0, P.createPortal)(V, f);
747
+ return f === null ? V : ne(V, f);
744
748
  }
745
- function pe(e, t) {
749
+ function H(e, t) {
746
750
  if (t === "") return null;
747
751
  let n = ce(e);
748
752
  return n === null ? null : n.toLowerCase().startsWith(t.toLowerCase()) ? n : null;
749
753
  }
750
754
  //#endregion
751
755
  //#region src/combobox/combobox-items.tsx
752
- function me({ children: e, description: r, disabled: i = !1, icon: a, position: s, ref: c, textValue: l, value: u, ...f }) {
753
- let p = M(), [m, v] = _(null), x = g(null), S = l ?? (typeof e == "string" ? e : void 0);
754
- d(() => {
755
- if (m === null) return;
756
- let e = S ?? m.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
757
- e !== "" && e !== x.current && (x.current = e, p.registerLabel(u, e));
756
+ function me({ children: n, description: r, disabled: i = !1, icon: o, position: s, ref: c, textValue: l, value: d, ...f }) {
757
+ let p = M(), [_, ee] = g(null), b = h(null), x = l ?? (typeof n == "string" ? n : void 0);
758
+ u(() => {
759
+ if (_ === null) return;
760
+ let e = x ?? _.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
761
+ e !== "" && e !== b.current && (b.current = e, p.registerLabel(d, e));
758
762
  }, [
759
763
  p,
760
- m,
761
- S,
762
- u
764
+ _,
765
+ x,
766
+ d
763
767
  ]);
764
- let C = h(() => {
765
- if (!p.highlightMatch || p.query === "" || S === void 0) return e;
766
- let t = O(S, p.query, { locale: p.locale });
767
- return t.length === 0 ? e : /* @__PURE__ */ y(o, {
768
- ranges: t,
769
- text: S
768
+ let S = m(() => {
769
+ if (!p.highlightMatch || p.query === "" || x === void 0) return n;
770
+ let e = O(x, p.query, { locale: p.locale });
771
+ return e.length === 0 ? n : /* @__PURE__ */ v(a, {
772
+ ranges: e,
773
+ text: x
770
774
  });
771
775
  }, [
772
- e,
776
+ n,
773
777
  p.highlightMatch,
774
778
  p.locale,
775
779
  p.query,
776
- S
780
+ x
777
781
  ]);
778
- if (S !== void 0 && !p.matches(S)) return null;
779
- let w = p.value === u, T = p.highlighted === u, ee = (e) => {
780
- i || p.setHighlighted(u, "pointer", e.nativeEvent);
781
- }, E = (e) => {
782
+ if (x !== void 0 && !p.matches(x)) return null;
783
+ let C = p.value === d, te = p.highlighted === d, ne = (e) => {
784
+ i || p.setHighlighted(d, "pointer", e.nativeEvent);
785
+ }, w = (e) => {
782
786
  f.onPointerDown?.(e), !e.defaultPrevented && e.preventDefault();
783
- }, te = (e) => {
784
- i || (p.select(u, "pointer", e.nativeEvent), p.setInputValue(p.labelFor(u) ?? S ?? u, "select", e.nativeEvent), p.closeOnSelect && p.setOpen(!1, "select", e.nativeEvent), p.inputNode?.focus({ preventScroll: !0 }));
787
+ }, T = (e) => {
788
+ i || (p.select(d, "pointer", e.nativeEvent), p.setInputValue(p.labelFor(d) ?? x ?? d, "select", e.nativeEvent), p.closeOnSelect && p.setOpen(!1, "select", e.nativeEvent), p.inputNode?.focus({ preventScroll: !0 }));
785
789
  };
786
- return /* @__PURE__ */ b("div", {
790
+ return /* @__PURE__ */ y("div", {
787
791
  ...f,
788
792
  "aria-disabled": i ? !0 : void 0,
789
793
  "aria-posinset": s,
790
- "aria-selected": w,
794
+ "aria-selected": C,
791
795
  "aria-setsize": s === void 0 ? void 0 : p.total,
792
796
  "data-part": "item",
793
- "data-value": u,
794
- ...S === void 0 ? {} : { "data-text-value": S },
797
+ "data-value": d,
798
+ ...x === void 0 ? {} : { "data-text-value": x },
795
799
  ...i ? { "data-disabled": "" } : {},
796
- ...w ? { "data-selected": "" } : {},
797
- ...T ? { "data-current": "" } : {},
798
- id: f.id ?? p.optionId(u),
799
- onClick: te,
800
- onPointerDown: E,
801
- onPointerEnter: ee,
800
+ ...C ? { "data-selected": "" } : {},
801
+ ...te ? { "data-current": "" } : {},
802
+ id: f.id ?? p.optionId(d),
803
+ onClick: T,
804
+ onPointerDown: w,
805
+ onPointerEnter: ne,
802
806
  ref: (e) => {
803
- v(e), typeof c == "function" ? c(e) : c != null && (c.current = e);
807
+ ee(e), typeof c == "function" ? c(e) : c != null && (c.current = e);
804
808
  },
805
809
  role: "option",
806
810
  children: [
807
- a === void 0 ? null : /* @__PURE__ */ y("span", {
811
+ o === void 0 ? null : /* @__PURE__ */ v("span", {
808
812
  "data-part": "icon",
809
- children: a
813
+ children: o
810
814
  }),
811
- /* @__PURE__ */ y("span", {
815
+ /* @__PURE__ */ v("span", {
812
816
  "data-part": "label",
813
- children: C
817
+ children: S
814
818
  }),
815
- r === void 0 ? null : /* @__PURE__ */ y("span", {
819
+ r === void 0 ? null : /* @__PURE__ */ v("span", {
816
820
  "data-part": "description",
817
821
  children: r
818
822
  }),
819
- /* @__PURE__ */ y("span", {
823
+ /* @__PURE__ */ v("span", {
820
824
  "data-part": "indicator",
821
- children: /* @__PURE__ */ y(n, { children: /* @__PURE__ */ y(t, { name: "check" }) })
825
+ children: /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(e, { name: "check" }) })
822
826
  })
823
827
  ]
824
828
  });
825
829
  }
826
830
  function he({ children: e, label: t, ...n }) {
827
- let r = `${f()}group`, { query: i } = M(), [a, o] = _(null), [s, c] = _(!1);
828
- return d(() => {
831
+ let r = `${d()}group`, { query: i } = M(), [a, o] = g(null), [s, c] = g(!1);
832
+ return u(() => {
829
833
  a !== null && c(a.querySelector("[data-part='item']") === null);
830
- }, [a, i]), /* @__PURE__ */ b("div", {
834
+ }, [a, i]), /* @__PURE__ */ y("div", {
831
835
  ...n,
832
836
  "aria-labelledby": r,
833
837
  "data-part": "group",
834
838
  hidden: s,
835
839
  ref: o,
836
840
  role: "group",
837
- children: [/* @__PURE__ */ y("div", {
841
+ children: [/* @__PURE__ */ v("div", {
838
842
  "data-part": "group-label",
839
843
  id: r,
840
844
  children: t
@@ -842,11 +846,11 @@ function he({ children: e, label: t, ...n }) {
842
846
  });
843
847
  }
844
848
  function ge(e) {
845
- return /* @__PURE__ */ y("div", {
849
+ return /* @__PURE__ */ v("div", {
846
850
  "data-part": "separator",
847
851
  ref: e.ref,
848
852
  role: "separator"
849
853
  });
850
854
  }
851
855
  //#endregion
852
- export { V as a, k as c, H as i, ne as l, me as n, ae as o, ge as r, M as s, he as t, j as u };
856
+ export { V as a, k as c, pe as i, re as l, me as n, oe as o, ge as r, M as s, he as t, j as u };