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

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 (245) hide show
  1. package/README.md +16 -1
  2. package/dist/{accordion-D-YuMJzk.js → accordion-lCqrmQ3w.js} +43 -43
  3. package/dist/accordion.js +1 -1
  4. package/dist/{action-bar-OACchRZw.js → action-bar-ti3e6FK1.js} +1 -1
  5. package/dist/action-bar.js +1 -1
  6. package/dist/{app-shell-CmYvnu_7.js → app-shell-nnSP44OO.js} +271 -267
  7. package/dist/app-shell.js +1 -1
  8. package/dist/bin/slotted-agent-docs.mjs +297 -0
  9. package/dist/calendar-BZ6PP7Ke.js +436 -0
  10. package/dist/calendar.js +1 -1
  11. package/dist/{cascader-D1AhTyBL.js → cascader-Cn2Acpcv.js} +227 -210
  12. package/dist/cascader.js +1 -1
  13. package/dist/chart-04i6NZQA.js +968 -0
  14. package/dist/chart.js +1 -1
  15. package/dist/{checkbox-DfxFHZaU.js → checkbox-B4Sb1eXj.js} +3 -3
  16. package/dist/{checkbox-group-9sDgrV5Z.js → checkbox-group-LpGMuq9w.js} +2 -2
  17. package/dist/checkbox-group.js +1 -1
  18. package/dist/checkbox.js +1 -1
  19. package/dist/{code-block-CFHf8uTm.js → code-block-CTNiyt0U.js} +1 -1
  20. package/dist/code-block.js +1 -1
  21. package/dist/{collapsible-CGo49NNW.js → collapsible-F-K36XbF.js} +17 -17
  22. package/dist/collapsible.js +1 -1
  23. package/dist/{color-picker-CwbWzCKg.js → color-picker-BcRCeISx.js} +4 -4
  24. package/dist/color-picker.js +1 -1
  25. package/dist/{column-manager-CTtizVhm.js → column-manager-BtkYLs5G.js} +4 -4
  26. package/dist/column-manager.js +1 -1
  27. package/dist/{combobox-BVMI9lg8.js → combobox-C1D5doWM.js} +227 -198
  28. package/dist/combobox.js +1 -1
  29. package/dist/{context-menu-BuST6W94.js → context-menu-B00UIBVC.js} +1 -1
  30. package/dist/context-menu.js +1 -1
  31. package/dist/{currency-field-DD9A5U3D.js → currency-field-Dti9JFu0.js} +1 -1
  32. package/dist/currency-field.js +1 -1
  33. package/dist/{dashboard-grid-CBMP_-JV.js → dashboard-grid-CoLKLvYL.js} +1 -1
  34. package/dist/dashboard-grid.js +1 -1
  35. package/dist/{data-grid-BKaGMqIm.js → data-grid-DX95Y7mY.js} +18 -18
  36. package/dist/data-grid.js +1 -1
  37. package/dist/{data-list-oICmxGkA.js → data-list-CWYTPNm-.js} +2 -2
  38. package/dist/data-list.js +1 -1
  39. package/dist/date-field-BxEpqAPg.js +290 -0
  40. package/dist/date-field.js +1 -1
  41. package/dist/date-picker-DRk9SZp1.js +308 -0
  42. package/dist/date-picker.js +1 -1
  43. package/dist/date-range-picker-6Yz7avTS.js +483 -0
  44. package/dist/date-range-picker.js +1 -1
  45. package/dist/{datetime-field-B8TrmsDK.js → datetime-field-D2f9u6im.js} +1 -1
  46. package/dist/datetime-field.js +1 -1
  47. package/dist/datetime-picker-STqSWMkH.js +645 -0
  48. package/dist/datetime-picker.js +1 -1
  49. package/dist/datetime-range-picker-DQNQwr3K.js +1000 -0
  50. package/dist/datetime-range-picker.js +1 -1
  51. package/dist/{detail-panel-qOJiNuzr.js → detail-panel-z6WGleP4.js} +3 -3
  52. package/dist/detail-panel.js +1 -1
  53. package/dist/docs/AGENTS.snippet.md +2 -0
  54. package/dist/docs/app-shell.examples.md +1 -1
  55. package/dist/docs/app-shell.json +4 -4
  56. package/dist/docs/app-shell.md +2 -2
  57. package/dist/docs/calendar.json +7 -0
  58. package/dist/docs/calendar.md +1 -0
  59. package/dist/docs/collapsible.json +1 -1
  60. package/dist/docs/collapsible.md +1 -1
  61. package/dist/docs/date-field.json +8 -1
  62. package/dist/docs/date-field.md +2 -1
  63. package/dist/docs/date-picker.examples.md +29 -0
  64. package/dist/docs/date-picker.json +16 -1
  65. package/dist/docs/date-picker.md +2 -1
  66. package/dist/docs/guidelines/README.md +2 -2
  67. package/dist/docs/guidelines/composition.md +10 -0
  68. package/dist/docs/guidelines/index.md +3 -1
  69. package/dist/docs/guidelines/list-pages.md +12 -1
  70. package/dist/docs/guidelines/own-elements.md +1 -1
  71. package/dist/docs/page-header.json +1 -0
  72. package/dist/docs/page-header.md +1 -1
  73. package/dist/docs/page.json +1 -0
  74. package/dist/docs/page.md +1 -0
  75. package/dist/docs/select.json +1 -1
  76. package/dist/docs/select.md +1 -1
  77. package/dist/docs/skills/build-own-element/SKILL.md +6 -6
  78. package/dist/docs/skills/compose-screen/SKILL.md +13 -6
  79. package/dist/docs/skills/review-screen/SKILL.md +6 -6
  80. package/dist/docs/skills/theme-app/SKILL.md +1 -1
  81. package/dist/docs/skills/waiting-states/SKILL.md +2 -2
  82. package/dist/docs/table.json +13 -0
  83. package/dist/docs/table.md +3 -1
  84. package/dist/docs/tabs.json +22 -4
  85. package/dist/docs/tabs.md +6 -3
  86. package/dist/docs/text-field.json +1 -1
  87. package/dist/docs/text-field.md +1 -1
  88. package/dist/{entity-picker-CPDd73JR.js → entity-picker-BdySwW8F.js} +274 -256
  89. package/dist/entity-picker.js +1 -1
  90. package/dist/{event-calendar-CnF3iIZD.js → event-calendar-CiphPXdV.js} +4 -4
  91. package/dist/event-calendar.js +1 -1
  92. package/dist/{field-NJaCxl2h.js → field-BxQFpOXS.js} +1 -1
  93. package/dist/{field-group-hAzVa2O9.js → field-group-DcN_hiZN.js} +1 -1
  94. package/dist/field-group.js +1 -1
  95. package/dist/field.js +1 -1
  96. package/dist/{filter-bar-D_xDcAp2.js → filter-bar-C_dXljI_.js} +10 -10
  97. package/dist/filter-bar.js +1 -1
  98. package/dist/{hover-card-BJE5dtaQ.js → hover-card-DpVzwvDJ.js} +1 -1
  99. package/dist/hover-card.js +1 -1
  100. package/dist/{import-export-center-DpY2DGBZ.js → import-export-center-BQnMJz4g.js} +3 -3
  101. package/dist/import-export-center.js +1 -1
  102. package/dist/index.js +68 -68
  103. package/dist/{listbox-Dv856z9I.js → listbox-D0MJcAMm.js} +1 -1
  104. package/dist/listbox.js +1 -1
  105. package/dist/{markdown-CeG8mUbI.js → markdown-IiVoh6yi.js} +2 -2
  106. package/dist/markdown.js +1 -1
  107. package/dist/menu-parts-D6v_mz6O.js +809 -0
  108. package/dist/menu.js +1 -1
  109. package/dist/{menubar-b2CruimJ.js → menubar-DApIg1eR.js} +1 -1
  110. package/dist/menubar.js +1 -1
  111. package/dist/{multi-select-DQ5ds0fX.js → multi-select-B8z6ApgW.js} +286 -257
  112. package/dist/multi-select.js +1 -1
  113. package/dist/{notification-center-Sz54IziY.js → notification-center-CGEEHcRA.js} +2 -2
  114. package/dist/notification-center.js +1 -1
  115. package/dist/{number-field-BFIAmv-z.js → number-field-DXk1TAXA.js} +1 -1
  116. package/dist/number-field.js +1 -1
  117. package/dist/{otp-input-BNQhuKaT.js → otp-input-CI-kdNgx.js} +1 -1
  118. package/dist/otp-input.js +1 -1
  119. package/dist/{page-kQgLctsA.js → page-IiYXk1sz.js} +32 -32
  120. package/dist/{page-header-CWEBfMGq.js → page-header-Bn4nIGfF.js} +1 -1
  121. package/dist/page-header.js +1 -1
  122. package/dist/page.js +1 -1
  123. package/dist/{popover-Be7JWbGJ.js → popover-DEp8Bf3e.js} +186 -166
  124. package/dist/popover.js +1 -1
  125. package/dist/{prompt-composer-BxpdkTpZ.js → prompt-composer-DdcU3S3L.js} +1 -1
  126. package/dist/prompt-composer.js +1 -1
  127. package/dist/{radio-group-BaVIP9UH.js → radio-group-D8csBZ8Z.js} +2 -2
  128. package/dist/radio-group.js +1 -1
  129. package/dist/{rating-DYBQBzwB.js → rating-rI3b5zII.js} +1 -1
  130. package/dist/rating.js +1 -1
  131. package/dist/{saved-views-DlE_--Z9.js → saved-views-B3brBTD9.js} +4 -4
  132. package/dist/saved-views.js +1 -1
  133. package/dist/scroll-area-DQ_ansLu.js +112 -0
  134. package/dist/scroll-area.js +1 -1
  135. package/dist/{segmented-control-DmuOGiu6.js → segmented-control-C-PzkTtg.js} +2 -2
  136. package/dist/segmented-control.js +1 -1
  137. package/dist/{select-DOFqPy26.js → select-BUylPwpb.js} +309 -258
  138. package/dist/select.js +1 -1
  139. package/dist/{side-navigation-CBLtCzuJ.js → side-navigation-Bm-BZma1.js} +156 -140
  140. package/dist/side-navigation.js +1 -1
  141. package/dist/{slider-DTes4HLF.js → slider-fp7kyg-6.js} +1 -1
  142. package/dist/slider.js +1 -1
  143. package/dist/{split-button-CPgHiy9G.js → split-button-DKRm0j5c.js} +1 -1
  144. package/dist/split-button.js +1 -1
  145. package/dist/styles.css +1 -1
  146. package/dist/{switch-DQzuIhPX.js → switch-aVoc4C2F.js} +1 -1
  147. package/dist/switch.js +1 -1
  148. package/dist/{table-Cipi2c5X.js → table-BYEvFr4P.js} +206 -203
  149. package/dist/table.js +1 -1
  150. package/dist/tabs-HWmvOKM4.js +355 -0
  151. package/dist/tabs.js +1 -1
  152. package/dist/{tags-input-CcOkm0AW.js → tags-input-pbv6x1Pi.js} +1 -1
  153. package/dist/tags-input.js +1 -1
  154. package/dist/{text-field-DLfIZ0fk.js → text-field-CbQ6UCAP.js} +1 -1
  155. package/dist/text-field.js +1 -1
  156. package/dist/{textarea-CBJBJBi6.js → textarea-DJSfhrXH.js} +1 -1
  157. package/dist/textarea.js +1 -1
  158. package/dist/{time-field-DrhiCtUl.js → time-field-BI9n607q.js} +1 -1
  159. package/dist/time-field.js +1 -1
  160. package/dist/time-picker-D6SlQWNF.js +402 -0
  161. package/dist/time-picker.js +1 -1
  162. package/dist/time-range-picker-CcV3_45h.js +751 -0
  163. package/dist/time-range-picker.js +1 -1
  164. package/dist/{toggle-group-7iBR9Rn1.js → toggle-group-i7JPO8BM.js} +1 -1
  165. package/dist/toggle-group.js +1 -1
  166. package/dist/{toolbar-DDZpEftQ.js → toolbar-B9knmgHA.js} +1 -1
  167. package/dist/toolbar.js +1 -1
  168. package/dist/tooltip-CgjIROUy.js +410 -0
  169. package/dist/tooltip.js +1 -1
  170. package/dist/{top-navigation-e-tWMGNr.js → top-navigation-DiG2PF5W.js} +2 -2
  171. package/dist/top-navigation.js +1 -1
  172. package/dist/{transfer-CqZOTLMP.js → transfer--UOQVeKE.js} +5 -5
  173. package/dist/transfer.js +1 -1
  174. package/dist/types/accordion/accordion.d.ts.map +1 -1
  175. package/dist/types/app-shell/app-shell-parts.d.ts +6 -4
  176. package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
  177. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  178. package/dist/types/calendar/calendar.d.ts +1 -1
  179. package/dist/types/calendar/calendar.d.ts.map +1 -1
  180. package/dist/types/calendar/calendar.types.d.ts +9 -0
  181. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  182. package/dist/types/calendar/index.d.ts +1 -1
  183. package/dist/types/calendar/index.d.ts.map +1 -1
  184. package/dist/types/cascader/cascader.d.ts.map +1 -1
  185. package/dist/types/chart/chart.d.ts.map +1 -1
  186. package/dist/types/collapsible/collapsible-parts.d.ts.map +1 -1
  187. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  188. package/dist/types/date-field/date-field.d.ts +1 -1
  189. package/dist/types/date-field/date-field.d.ts.map +1 -1
  190. package/dist/types/date-field/date-field.types.d.ts +7 -0
  191. package/dist/types/date-field/date-field.types.d.ts.map +1 -1
  192. package/dist/types/date-picker/date-picker.d.ts +5 -1
  193. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  194. package/dist/types/date-picker/date-picker.types.d.ts +20 -2
  195. package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
  196. package/dist/types/date-picker/index.d.ts +1 -1
  197. package/dist/types/date-picker/index.d.ts.map +1 -1
  198. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  199. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  200. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  201. package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
  202. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  203. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  204. package/dist/types/page/page.d.ts.map +1 -1
  205. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  206. package/dist/types/scroll-area/scroll-area.d.ts.map +1 -1
  207. package/dist/types/select/select-items.d.ts.map +1 -1
  208. package/dist/types/select/select-parts.d.ts.map +1 -1
  209. package/dist/types/select/select.d.ts.map +1 -1
  210. package/dist/types/side-navigation/side-navigation-parts.d.ts.map +1 -1
  211. package/dist/types/stat-card/stat-card.types.d.ts +2 -2
  212. package/dist/types/stat-card/stat-card.types.d.ts.map +1 -1
  213. package/dist/types/table/index.d.ts +1 -1
  214. package/dist/types/table/index.d.ts.map +1 -1
  215. package/dist/types/table/table-content.d.ts.map +1 -1
  216. package/dist/types/table/table-defaults.d.ts.map +1 -1
  217. package/dist/types/table/table.d.ts +1 -1
  218. package/dist/types/table/table.d.ts.map +1 -1
  219. package/dist/types/table/table.types.d.ts +15 -0
  220. package/dist/types/table/table.types.d.ts.map +1 -1
  221. package/dist/types/tabs/tabs-parts.d.ts +2 -4
  222. package/dist/types/tabs/tabs-parts.d.ts.map +1 -1
  223. package/dist/types/tabs/tabs.d.ts +1 -1
  224. package/dist/types/tabs/tabs.d.ts.map +1 -1
  225. package/dist/types/tabs/tabs.types.d.ts +18 -0
  226. package/dist/types/tabs/tabs.types.d.ts.map +1 -1
  227. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  228. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  229. package/dist/types/tooltip/tooltip-parts.d.ts.map +1 -1
  230. package/dist/{upload-DjnlVR8y.js → upload-CLX5cURk.js} +1 -1
  231. package/dist/upload.js +1 -1
  232. package/package.json +10 -7
  233. package/dist/calendar-B3mio8iQ.js +0 -387
  234. package/dist/chart-O0ZhkzJe.js +0 -966
  235. package/dist/date-field-CYcN6diW.js +0 -279
  236. package/dist/date-picker-4X-_2ltN.js +0 -264
  237. package/dist/date-range-picker-CNOAtHwU.js +0 -471
  238. package/dist/datetime-picker-HDVlUhzy.js +0 -629
  239. package/dist/datetime-range-picker-IqOFJtdW.js +0 -994
  240. package/dist/menu-parts-W58pVNUt.js +0 -786
  241. package/dist/scroll-area-BriwmvYY.js +0 -111
  242. package/dist/tabs-DQ36APY-.js +0 -343
  243. package/dist/time-picker-CRQsMJbQ.js +0 -396
  244. package/dist/time-range-picker-DlZJsj1e.js +0 -745
  245. package/dist/tooltip-DbKTPe_i.js +0 -392
@@ -1,20 +1,20 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { n, r } from "./i18n-DpW8lqJ1.js";
3
- import { b as i } from "./field-NJaCxl2h.js";
3
+ import { b as i } from "./field-BxQFpOXS.js";
4
4
  import { t as a } from "./highlight-0Qw23QPp.js";
5
5
  import { createControllable as o } from "@slotted/core/state";
6
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
7
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
8
  import { createPresence as ee } from "@slotted/core/presence";
9
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
- import { matchRanges as O } from "@slotted/core/highlight";
10
+ import { createDismissableLayer as te, pressOrigin as S } from "@slotted/core/dismissable-layer";
11
+ import { createPositioner as ne } from "@slotted/core/positioner";
12
+ import { createPortal as re } from "react-dom";
13
+ import { comboboxMessages as C } from "@slotted/core/i18n";
14
+ import { createFilter as ie, moveIndex as w, revealWithin as ae } from "@slotted/core/collection";
15
+ import { matchRanges as T } from "@slotted/core/highlight";
16
16
  //#region src/combobox/combobox-defaults.tsx
17
- var k = {
17
+ var E = {
18
18
  align: "start",
19
19
  alignOffset: 0,
20
20
  allowsCustomValue: !1,
@@ -45,12 +45,12 @@ var k = {
45
45
  strategy: "absolute",
46
46
  variant: "outline",
47
47
  width: "content"
48
- }, A = s(k);
49
- function j() {
50
- return l(A);
48
+ }, D = s(E);
49
+ function O() {
50
+ return l(D);
51
51
  }
52
- function re({ children: e, container: t, ...n }) {
53
- let r = j();
52
+ function oe({ children: e, container: t, ...n }) {
53
+ let r = O();
54
54
  u(() => {
55
55
  if (t !== void 0) return x(t), () => x(null);
56
56
  }, [t]);
@@ -86,50 +86,50 @@ function re({ children: e, container: t, ...n }) {
86
86
  variant: n.variant ?? r.variant,
87
87
  width: n.width ?? r.width
88
88
  };
89
- return /* @__PURE__ */ v(A.Provider, {
89
+ return /* @__PURE__ */ v(D.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 ie = s(void 0);
97
- function M() {
98
- let e = l(ie);
96
+ var k = s(void 0);
97
+ function A() {
98
+ let e = l(k);
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
- var N = (e) => "options" in e;
103
- function ae(e) {
104
- return e === void 0 ? [] : e.flatMap((e) => N(e) ? e.options : [e]);
102
+ var j = (e) => "options" in e;
103
+ function se(e) {
104
+ return e === void 0 ? [] : e.flatMap((e) => j(e) ? e.options : [e]);
105
105
  }
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);
106
+ function M({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, autoHighlight: l, children: u, clearable: p, closeOnEscape: _, closeOnOutsidePress: y, closeOnSelect: ee, collisionPadding: b, onCreate: x, defaultHighlightedValue: te = null, defaultInputValue: S = "", defaultOpen: ne = !1, defaultValue: re = null, disabled: w, filter: T, flip: E, form: D, fullWidth: oe, hideWhenDetached: A, highlightedValue: j, highlightMatch: M, inputValue: N, invalid: P, items: F, loading: I, locale: L, loop: R, messages: ce, mount: le, name: ue, onHighlightedValueChange: de, onInputValueChange: z, onInputReset: fe, onLoadMore: B, onOpenChange: V, onValueChange: H, open: pe, 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 = O(), W = i(), Oe = r(C, ce), ke = n(), Ae = L ?? ke, je = d(), Me = `${je}listbox`, Ne = `${je}input`, [Pe, Fe] = g(ne), [Ie, Le] = g(re), [Re, ze] = g(S), [Be, Ve] = g(te), [He, Ue] = g(null), [G, We] = g(null), Ge = w ?? W?.disabled ?? U.disabled, Ke = ge ?? W?.readOnly ?? U.readOnly, K = (pe ?? Pe) && !Ge, q = Te === void 0 ? Ie : Te, J = N ?? Re, qe = j === void 0 ? Be : j, Je = h(K);
108
108
  K && (Je.current = !0);
109
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 ae(I)) e.set(t.value, t.label);
111
+ for (let t of se(F)) e.set(t.value, t.label);
112
112
  return e;
113
- }, [I]), rt = c((e, t) => {
113
+ }, [F]), rt = c((e, t) => {
114
114
  $e.current.get(e) !== t && ($e.current.set(e, t), tt((e) => e + 1));
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), [
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(() => ie({ locale: Ae }), [Ae]), ot = c((e) => Y === "" || T === null ? !0 : T === void 0 ? X.contains(e, Y) : T(e, Y), [
116
116
  X,
117
- O,
117
+ T,
118
118
  Y
119
119
  ]), Z = h({
120
120
  currentHighlighted: qe,
121
121
  currentInput: J,
122
122
  currentOpen: K,
123
123
  currentValue: q,
124
- highlightedValue: N,
124
+ highlightedValue: j,
125
125
  inputNode: He,
126
- inputValue: P,
127
- onHighlightedValueChange: ue,
128
- onInputValueChange: B,
126
+ inputValue: N,
127
+ onHighlightedValueChange: de,
128
+ onInputValueChange: z,
129
129
  onCreate: x,
130
- onOpenChange: fe,
131
- onValueChange: pe,
132
- open: H,
130
+ onOpenChange: V,
131
+ onValueChange: H,
132
+ open: pe,
133
133
  value: Te
134
134
  });
135
135
  Z.current = {
@@ -137,15 +137,15 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
137
137
  currentInput: J,
138
138
  currentOpen: K,
139
139
  currentValue: q,
140
- highlightedValue: N,
140
+ highlightedValue: j,
141
141
  inputNode: He,
142
- inputValue: P,
143
- onHighlightedValueChange: ue,
144
- onInputValueChange: B,
142
+ inputValue: N,
143
+ onHighlightedValueChange: de,
144
+ onInputValueChange: z,
145
145
  onCreate: x,
146
- onOpenChange: fe,
147
- onValueChange: pe,
148
- open: H,
146
+ onOpenChange: V,
147
+ onValueChange: H,
148
+ open: pe,
149
149
  value: Te
150
150
  };
151
151
  let st = c((e, t, n) => {
@@ -190,7 +190,7 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
190
190
  currentInput: J,
191
191
  currentValue: q,
192
192
  labelFor: it,
193
- onInputReset: de,
193
+ onInputReset: fe,
194
194
  select: $,
195
195
  setInputValue: Q,
196
196
  valueForLabel: lt
@@ -200,7 +200,7 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
200
200
  currentInput: J,
201
201
  currentValue: q,
202
202
  labelFor: it,
203
- onInputReset: de,
203
+ onInputReset: fe,
204
204
  select: $,
205
205
  setInputValue: Q,
206
206
  valueForLabel: lt
@@ -238,7 +238,7 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
238
238
  open: () => st(!0, "programmatic"),
239
239
  scrollToKey: (e) => {
240
240
  let t = G?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
241
- t != null && G !== null && D(t, G);
241
+ t != null && G !== null && ae(t, G);
242
242
  }
243
243
  }), [G, st]);
244
244
  let mt = {
@@ -260,24 +260,24 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
260
260
  create: ft,
261
261
  disabled: Ge,
262
262
  entry: Ye,
263
- flip: k ?? U.flip,
264
- form: A,
265
- fullWidth: re ?? U.fullWidth,
266
- hideWhenDetached: M ?? U.hideWhenDetached,
263
+ flip: E ?? U.flip,
264
+ form: D,
265
+ fullWidth: oe ?? U.fullWidth,
266
+ hideWhenDetached: A ?? U.hideWhenDetached,
267
267
  highlighted: qe,
268
- highlightMatch: oe ?? U.highlightMatch,
268
+ highlightMatch: M ?? U.highlightMatch,
269
269
  inputId: Ne,
270
270
  inputNode: He,
271
271
  inputValue: J,
272
- invalid: F ?? W?.invalid ?? U.invalid,
272
+ invalid: P ?? W?.invalid ?? U.invalid,
273
273
  labelFor: it,
274
- loading: L ?? U.loading,
274
+ loading: I ?? U.loading,
275
275
  locale: Ae,
276
- loop: z ?? U.loop,
276
+ loop: R ?? U.loop,
277
277
  matches: ot,
278
- mount: ce ?? U.mount,
279
- name: le,
280
- onLoadMore: V,
278
+ mount: le ?? U.mount,
279
+ name: ue,
280
+ onLoadMore: B,
281
281
  open: K,
282
282
  openOn: me ?? U.openOn,
283
283
  optionId: at,
@@ -307,63 +307,63 @@ function oe({ align: e, alignOffset: t, allowsCustomValue: a, autocomplete: s, a
307
307
  wantsCompletion: Qe,
308
308
  width: De ?? U.width
309
309
  };
310
- return /* @__PURE__ */ v(ie.Provider, {
310
+ return /* @__PURE__ */ v(k.Provider, {
311
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 = "[data-part='item']";
318
- function F(e) {
319
- return e === null ? [] : [...e.querySelectorAll(P)];
317
+ var N = "[data-part='item']";
318
+ function P(e) {
319
+ return e === null ? [] : [...e.querySelectorAll(N)];
320
320
  }
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
- function z(e, t, n, r) {
323
- let i = F(e);
321
+ var F = (e) => e.dataset.value ?? "", I = (e) => e.dataset.disabled === void 0, L = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
322
+ function R(e, t, n, r) {
323
+ let i = P(e);
324
324
  if (i.length === 0) return null;
325
- let a = E({
326
- enabled: i.map(L),
327
- from: t === null ? -1 : i.findIndex((e) => I(e) === t),
325
+ let a = w({
326
+ enabled: i.map(I),
327
+ from: t === null ? -1 : i.findIndex((e) => F(e) === t),
328
328
  intent: n,
329
329
  loop: r
330
330
  });
331
- return a === -1 ? null : I(i[a]);
331
+ return a === -1 ? null : F(i[a]);
332
332
  }
333
- function se(e, t, n, r) {
333
+ function ce(e, t, n, r) {
334
334
  if (n === "none") return null;
335
335
  if (n === "selected") {
336
336
  if (t === null) return null;
337
- let n = F(e).find((e) => I(e) === t && L(e));
338
- return n === void 0 ? null : I(n);
337
+ let n = P(e).find((e) => F(e) === t && I(e));
338
+ return n === void 0 ? null : F(n);
339
339
  }
340
- return z(e, null, n, r);
341
- }
342
- function ce(e) {
343
- let t = F(e).find(L);
344
- return t === void 0 ? null : R(t);
340
+ return R(e, null, n, r);
345
341
  }
346
- function le(e, t) {
347
- let n = F(e).find((e) => R(e) === t);
348
- return n === void 0 ? null : I(n);
342
+ function le(e) {
343
+ let t = P(e).find(I);
344
+ return t === void 0 ? null : L(t);
349
345
  }
350
346
  function ue(e, t) {
347
+ let n = P(e).find((e) => L(e) === t);
348
+ return n === void 0 ? null : F(n);
349
+ }
350
+ function de(e, t) {
351
351
  if (e === null || t === null) return;
352
- let n = F(e).find((e) => I(e) === t);
353
- n !== void 0 && D(n, e);
352
+ let n = P(e).find((e) => F(e) === t);
353
+ n !== void 0 && ae(n, e);
354
354
  }
355
355
  //#endregion
356
356
  //#region src/combobox/combobox-parts.tsx
357
- function B(e, t) {
357
+ function z(e, t) {
358
358
  return (n) => {
359
359
  e?.(n), n.defaultPrevented || t(n);
360
360
  };
361
361
  }
362
- function de(e, ...t) {
362
+ function fe(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: n, render: r, ...a }) {
366
- let o = M(), s = i(), [l, d] = g(null);
365
+ function B({ ref: n, render: r, ...a }) {
366
+ let o = A(), s = i(), [l, d] = g(null);
367
367
  u(() => {
368
368
  o.setInputNode(l);
369
369
  }, [o, l]), p(() => {
@@ -374,18 +374,18 @@ function V({ ref: n, render: r, ...a }) {
374
374
  l
375
375
  ]);
376
376
  let f = (e, t) => {
377
- let n = z(o.contentNode, o.highlighted, e, o.loop);
377
+ let n = R(o.contentNode, o.highlighted, e, o.loop);
378
378
  n !== null && o.setHighlighted(n, "keyboard", t);
379
379
  }, m = (e) => {
380
380
  if (o.highlighted === null && o.completion !== null) {
381
- let t = le(o.contentNode, o.completion);
381
+ let t = ue(o.contentNode, o.completion);
382
382
  if (t !== null) {
383
383
  o.select(t, "keyboard", e), o.setInputValue(o.completion, "select", e), o.setOpen(!1, "select", e);
384
384
  return;
385
385
  }
386
386
  }
387
387
  let t = o.highlighted;
388
- if (t !== null && fe(o.contentNode, t)) {
388
+ if (t !== null && V(o.contentNode, t)) {
389
389
  o.create(t, "keyboard", e), o.setOpen(!1, "select", e);
390
390
  return;
391
391
  }
@@ -437,20 +437,20 @@ function V({ ref: n, render: r, ...a }) {
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
438
  }, x = () => {
439
439
  o.openOn !== "focus" || o.readOnly || o.open || (o.entry.current = "selected", o.setOpen(!0, "keyboard"));
440
- }, S = (e) => {
441
- o.openOn === "manual" || o.open || o.disabled || o.readOnly || (o.entry.current = "selected", o.setOpen(!0, "pointer", e.nativeEvent));
442
440
  }, te = (e) => {
441
+ o.openOn === "manual" || o.open || o.disabled || o.readOnly || (o.entry.current = "selected", o.setOpen(!0, "pointer", e.nativeEvent));
442
+ }, ne = (e) => {
443
443
  let t = e.relatedTarget;
444
444
  if (t instanceof Node && o.contentNode?.contains(t) === !0) return;
445
- let n = C(l?.ownerDocument);
445
+ let n = S(l?.ownerDocument);
446
446
  n instanceof Node && o.contentNode?.contains(n) === !0 || (o.settleInput(e), o.open && o.setOpen(!1, "blur"));
447
- }, ne = (e) => {
447
+ }, re = (e) => {
448
448
  o.clear("clear", e.nativeEvent), l?.focus({ preventScroll: !0 });
449
- }, w = (e) => {
449
+ }, C = (e) => {
450
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 = {
451
+ }, ie = c((e) => {
452
+ d(e), fe(e, n);
453
+ }, [n]), w = [a["aria-describedby"], s?.describedBy].filter(Boolean).join(" "), ae = o.clearable && o.inputValue !== "" && !o.disabled && !o.readOnly, T = {
454
454
  "data-part": "root",
455
455
  "data-size": o.size,
456
456
  "data-ui": "combobox",
@@ -462,35 +462,35 @@ function V({ ref: n, render: r, ...a }) {
462
462
  ...o.invalid ? { "data-invalid": "" } : {},
463
463
  ...o.required ? { "data-required": "" } : {},
464
464
  ...o.loading ? { "data-loading": "" } : {}
465
- }, k = /* @__PURE__ */ y(_, { children: [
465
+ }, E = /* @__PURE__ */ y(_, { children: [
466
466
  /* @__PURE__ */ v("input", {
467
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": E === "" ? void 0 : E,
471
+ "aria-describedby": w === "" ? void 0 : w,
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
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),
478
+ onBlur: z(a.onBlur, ne),
479
+ onChange: z(a.onChange, b),
480
+ onClick: z(a.onClick, te),
481
+ onFocus: z(a.onFocus, x),
482
+ onKeyDown: z(a.onKeyDown, ee),
483
483
  readOnly: o.readOnly,
484
- ref: T,
484
+ ref: ie,
485
485
  required: o.required,
486
486
  role: "combobox",
487
487
  type: "text",
488
488
  value: o.completion ?? o.inputValue
489
489
  }),
490
- D ? /* @__PURE__ */ v("button", {
490
+ ae ? /* @__PURE__ */ v("button", {
491
491
  "aria-label": o.t("clear"),
492
492
  "data-part": "clear",
493
- onClick: ne,
493
+ onClick: re,
494
494
  type: "button",
495
495
  children: /* @__PURE__ */ v(t, { children: /* @__PURE__ */ v(e, { name: "x" }) })
496
496
  }) : null,
@@ -498,7 +498,7 @@ function V({ ref: n, render: r, ...a }) {
498
498
  "aria-label": o.t("trigger"),
499
499
  "data-part": "trigger",
500
500
  disabled: o.disabled,
501
- onClick: w,
501
+ onClick: C,
502
502
  tabIndex: -1,
503
503
  type: "button",
504
504
  children: o.loading ? /* @__PURE__ */ v("span", {
@@ -533,79 +533,109 @@ function V({ ref: n, render: r, ...a }) {
533
533
  })
534
534
  ] });
535
535
  return r === void 0 ? /* @__PURE__ */ v("div", {
536
- ...O,
537
- children: k
536
+ ...T,
537
+ children: E
538
538
  }) : r({
539
- ...O,
540
- children: k
539
+ ...T,
540
+ children: E
541
541
  });
542
542
  }
543
- function fe(e, t) {
543
+ function V(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 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(() => {
546
+ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
547
+ let o = A(), [s, l] = g(null), [d, f] = g(null), [m, _] = g(null), [x, S] = g("unmounted"), [C, ie] = g(!1), [w, ae] = g(0), T = h(null), E = h(null), D = h(o);
548
+ D.current = o, u(() => {
549
549
  let e = ee({
550
- present: k.current.open,
551
- onStatusChange: x
550
+ present: D.current.open,
551
+ onStatusChange: S
552
552
  });
553
- return D.current = e, x(e.status), () => {
554
- e.destroy(), D.current = null;
553
+ return T.current = e, S(e.status), () => {
554
+ e.destroy(), T.current = null;
555
555
  };
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";
556
+ }, []), u(() => T.current?.sync(o.open), [o.open]), u(() => T.current?.setNode(s), [s]), u(() => o.setContentNode(d), [o, d]);
557
+ let O = o.mount === "eager" || o.mount === "lazy" && o.seen || o.open || x !== "unmounted";
558
558
  u(() => {
559
- if (!A) {
560
- m(null);
559
+ let e = o.inputNode;
560
+ if (e === null || C) return;
561
+ let t = () => ie(!0);
562
+ return e.addEventListener("focusin", t), e.addEventListener("pointerdown", t), () => {
563
+ e.removeEventListener("focusin", t), e.removeEventListener("pointerdown", t);
564
+ };
565
+ }, [o.inputNode, C]);
566
+ let oe = O || C;
567
+ p(() => {
568
+ if (!oe) {
569
+ _(null);
561
570
  return;
562
571
  }
563
572
  let e = b({
564
573
  origin: o.inputNode,
565
574
  disabled: !o.portal
566
575
  });
567
- return m(e.container), () => e.release();
576
+ return _(e.container), () => e.release();
568
577
  }, [
569
578
  o.inputNode,
570
579
  o.portal,
571
- A
580
+ oe
572
581
  ]);
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(() => {
582
+ let { align: k, alignOffset: j, collisionPadding: se, flip: M, hideWhenDetached: N, shift: I, side: L, sideOffset: R, strategy: le, width: ue } = o, z = h(null), B = h(0), V = c((e, t) => {
583
+ e.update().then(() => {
584
+ if (z.current !== e || !D.current.open) return;
585
+ t.setAttribute("data-open", "");
586
+ let n = t.ownerDocument.defaultView;
587
+ n !== null && B.current === 0 && (B.current = n.requestAnimationFrame(() => {
588
+ B.current = 0, de(D.current.contentNode, D.current.highlighted);
589
+ }));
590
+ });
591
+ }, []);
592
+ if (p(() => {
575
593
  if (s === null || o.inputNode === null) return;
576
- let e = !0, t = o.inputNode.closest("[data-part='root']") ?? o.inputNode, n = te(t, s, {
577
- align: j,
578
- alignOffset: re,
579
- boundaryPadding: ie,
580
- flip: N,
581
- hideWhenDetached: ae,
582
- matchWidth: z === "anchor",
583
- shift: oe,
584
- side: P,
585
- sideOffset: L,
586
- strategy: R
594
+ let e = o.inputNode.closest("[data-part='root']") ?? o.inputNode, t = ne(e, s, {
595
+ align: k,
596
+ alignOffset: j,
597
+ boundaryPadding: se,
598
+ flip: M,
599
+ hideWhenDetached: N,
600
+ matchWidth: ue === "anchor",
601
+ shift: I,
602
+ side: L,
603
+ sideOffset: R,
604
+ strategy: le
587
605
  });
588
- return n.update().then(() => {
589
- e && w(!0);
590
- }), () => {
591
- e = !1, n.destroy(), w(!1);
606
+ return z.current = t, D.current.open && V(t, s), () => {
607
+ t.destroy(), z.current = null, s.removeAttribute("data-open");
592
608
  };
593
609
  }, [
610
+ k,
594
611
  j,
595
- re,
596
- ie,
612
+ se,
597
613
  o.inputNode,
614
+ M,
598
615
  N,
599
- ae,
600
616
  s,
601
- oe,
602
- P,
617
+ I,
603
618
  L,
604
619
  R,
605
- z
620
+ le,
621
+ ue,
622
+ V
623
+ ]), p(() => {
624
+ let e = z.current;
625
+ if (e !== null && s !== null) {
626
+ if (o.open) {
627
+ V(e, s);
628
+ return;
629
+ }
630
+ s.removeAttribute("data-open"), B.current !== 0 && (s.ownerDocument.defaultView?.cancelAnimationFrame(B.current), B.current = 0);
631
+ }
632
+ }, [
633
+ s,
634
+ V,
635
+ o.open
606
636
  ]), u(() => {
607
637
  if (s === null || !o.open) return;
608
- let e = [o.inputNode?.closest("[data-part='root']") ?? null].filter((e) => e !== null), t = S(s, {
638
+ let e = [o.inputNode?.closest("[data-part='root']") ?? null].filter((e) => e !== null), t = te(s, {
609
639
  branches: e,
610
640
  escape: o.closeOnEscape,
611
641
  focusOutside: !1,
@@ -613,7 +643,7 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
613
643
  outsidePress: o.closeOnOutsidePress,
614
644
  scrollLock: !1,
615
645
  onDismiss: (e) => {
616
- k.current.setOpen(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
646
+ D.current.setOpen(!1, e.reason === "escape" ? "escape" : "outsidePress", e.source);
617
647
  }
618
648
  });
619
649
  return () => t.destroy();
@@ -624,41 +654,41 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
624
654
  o.open,
625
655
  s
626
656
  ]), p(() => {
627
- let e = F(l).filter((e) => e.dataset.create === void 0).length;
628
- E((t) => t === e ? t : e);
657
+ let e = P(d).filter((e) => e.dataset.create === void 0).length;
658
+ ae((t) => t === e ? t : e);
629
659
  }), p(() => {
630
- let e = k.current;
631
- if (e.open && l !== null) {
660
+ let e = D.current;
661
+ if (e.open && d !== null) {
632
662
  if (e.entry.current !== "none") {
633
- let t = se(l, e.value, e.entry.current, e.loop) ?? (e.autoHighlight ? se(l, null, "first", e.loop) : null);
663
+ let t = ce(d, e.value, e.entry.current, e.loop) ?? (e.autoHighlight ? ce(d, null, "first", e.loop) : null);
634
664
  t !== null && e.setHighlighted(t, "keyboard");
635
665
  return;
636
666
  }
637
- e.highlighted !== null && (F(l).some((t) => I(t) === e.highlighted) || e.setHighlighted(null, "keyboard"));
667
+ e.highlighted !== null && (P(d).some((t) => F(t) === e.highlighted) || e.setHighlighted(null, "keyboard"));
638
668
  }
639
669
  }, [
640
670
  o.open,
641
671
  o.query,
642
- T,
643
- l
672
+ w,
673
+ d
644
674
  ]), u(() => {
645
- ue(l, o.highlighted);
675
+ s?.hasAttribute("data-open") === !0 && de(d, o.highlighted);
646
676
  }, [
677
+ s,
647
678
  o.highlighted,
648
- C,
649
- l
679
+ d
650
680
  ]), p(() => {
651
- let e = k.current;
652
- if (!e.wantsCompletion.current || l === null) return;
681
+ let e = D.current;
682
+ if (!e.wantsCompletion.current || d === null) return;
653
683
  e.wantsCompletion.current = !1;
654
- let t = H(l, e.inputValue);
684
+ let t = pe(d, e.inputValue);
655
685
  t !== null && t !== e.inputValue && e.setCompletion(t);
656
686
  }, [
657
687
  o.inputValue,
658
- T,
659
- l
688
+ w,
689
+ d
660
690
  ]), u(() => {
661
- let e = O.current, t = l, n = o.onLoadMore;
691
+ let e = E.current, t = d, n = o.onLoadMore;
662
692
  if (e === null || t === null || n === void 0 || typeof IntersectionObserver != "function") return;
663
693
  let r = new IntersectionObserver((e) => {
664
694
  e.some((e) => e.isIntersecting) && n();
@@ -666,21 +696,20 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
666
696
  return r.observe(e), () => r.disconnect();
667
697
  }, [
668
698
  o.onLoadMore,
669
- T,
670
- l
671
- ]), !A) return null;
672
- let ce = {
673
- "data-align": j,
699
+ w,
700
+ d
701
+ ]), !O) return null;
702
+ let H = {
703
+ "data-align": k,
674
704
  ...o.open ? {} : { inert: !0 },
675
- ...o.open && C ? { "data-open": "" } : {},
676
705
  "data-part": "positioner",
677
706
  "data-size": o.size,
678
707
  "data-ui": "combobox",
679
708
  "data-width": o.width
680
- }, le = i === void 0 ? o.loading ? o.t("loading") : T === 0 ? null : o.t("count", { count: T }) : i, B = /* @__PURE__ */ v("div", {
681
- ...ce,
709
+ }, me = i === void 0 ? o.loading ? o.t("loading") : w === 0 ? null : o.t("count", { count: w }) : i, he = /* @__PURE__ */ v("div", {
710
+ ...H,
682
711
  ref: (e) => {
683
- c(e), de(e, n);
712
+ l(e), fe(e, n);
684
713
  },
685
714
  children: /* @__PURE__ */ y("div", {
686
715
  ...a,
@@ -689,12 +718,12 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
689
718
  "data-loading": o.loading ? "" : void 0,
690
719
  "data-part": "content",
691
720
  id: o.contentId,
692
- ref: d,
721
+ ref: f,
693
722
  role: "listbox",
694
723
  children: [
695
724
  e,
696
- /* @__PURE__ */ v("div", { ref: O }),
697
- !o.loading && T === 0 && o.canCreate && o.query !== "" ? /* @__PURE__ */ v("div", {
725
+ /* @__PURE__ */ v("div", { ref: E }),
726
+ !o.loading && w === 0 && o.canCreate && o.query !== "" ? /* @__PURE__ */ v("div", {
698
727
  "data-create": "",
699
728
  "data-part": "item",
700
729
  "data-value": o.query,
@@ -713,7 +742,7 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
713
742
  children: o.t("create", { query: o.query })
714
743
  })
715
744
  }) : null,
716
- !o.loading && T === 0 && !(o.canCreate && o.query !== "") ? /* @__PURE__ */ v("div", {
745
+ !o.loading && w === 0 && !(o.canCreate && o.query !== "") ? /* @__PURE__ */ v("div", {
717
746
  "data-part": "empty",
718
747
  children: t ?? o.t("empty")
719
748
  }) : null,
@@ -736,25 +765,25 @@ function pe({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
736
765
  "data-part": "status",
737
766
  ...o.loading ? { "data-loading": "" } : {},
738
767
  role: "status",
739
- children: le
768
+ children: me
740
769
  })
741
770
  ]
742
771
  })
743
- }), V = r === void 0 ? B : r({
744
- ...ce,
772
+ }), ge = r === void 0 ? he : r({
773
+ ...H,
745
774
  children: e
746
775
  });
747
- return f === null ? V : ne(V, f);
776
+ return m === null ? ge : re(ge, m);
748
777
  }
749
- function H(e, t) {
778
+ function pe(e, t) {
750
779
  if (t === "") return null;
751
- let n = ce(e);
780
+ let n = le(e);
752
781
  return n === null ? null : n.toLowerCase().startsWith(t.toLowerCase()) ? n : null;
753
782
  }
754
783
  //#endregion
755
784
  //#region src/combobox/combobox-items.tsx
756
785
  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);
786
+ let p = A(), [_, ee] = g(null), b = h(null), x = l ?? (typeof n == "string" ? n : void 0);
758
787
  u(() => {
759
788
  if (_ === null) return;
760
789
  let e = x ?? _.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
@@ -765,9 +794,9 @@ function me({ children: n, description: r, disabled: i = !1, icon: o, position:
765
794
  x,
766
795
  d
767
796
  ]);
768
- let S = m(() => {
797
+ let te = m(() => {
769
798
  if (!p.highlightMatch || p.query === "" || x === void 0) return n;
770
- let e = O(x, p.query, { locale: p.locale });
799
+ let e = T(x, p.query, { locale: p.locale });
771
800
  return e.length === 0 ? n : /* @__PURE__ */ v(a, {
772
801
  ranges: e,
773
802
  text: x
@@ -780,29 +809,29 @@ function me({ children: n, description: r, disabled: i = !1, icon: o, position:
780
809
  x
781
810
  ]);
782
811
  if (x !== void 0 && !p.matches(x)) return null;
783
- let C = p.value === d, te = p.highlighted === d, ne = (e) => {
812
+ let S = p.value === d, ne = p.highlighted === d, re = (e) => {
784
813
  i || p.setHighlighted(d, "pointer", e.nativeEvent);
785
- }, w = (e) => {
814
+ }, C = (e) => {
786
815
  f.onPointerDown?.(e), !e.defaultPrevented && e.preventDefault();
787
- }, T = (e) => {
816
+ }, ie = (e) => {
788
817
  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 }));
789
818
  };
790
819
  return /* @__PURE__ */ y("div", {
791
820
  ...f,
792
821
  "aria-disabled": i ? !0 : void 0,
793
822
  "aria-posinset": s,
794
- "aria-selected": C,
823
+ "aria-selected": S,
795
824
  "aria-setsize": s === void 0 ? void 0 : p.total,
796
825
  "data-part": "item",
797
826
  "data-value": d,
798
827
  ...x === void 0 ? {} : { "data-text-value": x },
799
828
  ...i ? { "data-disabled": "" } : {},
800
- ...C ? { "data-selected": "" } : {},
801
- ...te ? { "data-current": "" } : {},
829
+ ...S ? { "data-selected": "" } : {},
830
+ ...ne ? { "data-current": "" } : {},
802
831
  id: f.id ?? p.optionId(d),
803
- onClick: T,
804
- onPointerDown: w,
805
- onPointerEnter: ne,
832
+ onClick: ie,
833
+ onPointerDown: C,
834
+ onPointerEnter: re,
806
835
  ref: (e) => {
807
836
  ee(e), typeof c == "function" ? c(e) : c != null && (c.current = e);
808
837
  },
@@ -814,7 +843,7 @@ function me({ children: n, description: r, disabled: i = !1, icon: o, position:
814
843
  }),
815
844
  /* @__PURE__ */ v("span", {
816
845
  "data-part": "label",
817
- children: S
846
+ children: te
818
847
  }),
819
848
  r === void 0 ? null : /* @__PURE__ */ v("span", {
820
849
  "data-part": "description",
@@ -828,7 +857,7 @@ function me({ children: n, description: r, disabled: i = !1, icon: o, position:
828
857
  });
829
858
  }
830
859
  function he({ children: e, label: t, ...n }) {
831
- let r = `${d()}group`, { query: i } = M(), [a, o] = g(null), [s, c] = g(!1);
860
+ let r = `${d()}group`, { query: i } = A(), [a, o] = g(null), [s, c] = g(!1);
832
861
  return u(() => {
833
862
  a !== null && c(a.querySelector("[data-part='item']") === null);
834
863
  }, [a, i]), /* @__PURE__ */ y("div", {
@@ -853,4 +882,4 @@ function ge(e) {
853
882
  });
854
883
  }
855
884
  //#endregion
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 };
885
+ export { B as a, E as c, H as i, oe as l, me as n, M as o, ge as r, A as s, he as t, O as u };