@serendie/ui 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/components/CheckBox/CheckBox.js +36 -35
  2. package/dist/components/ChoiceBox/ChoiceBox.js +41 -41
  3. package/dist/components/DataTable/DataTableComponent.d.ts +3 -20
  4. package/dist/components/DataTable/DataTableComponent.js +38 -36
  5. package/dist/components/DataTable/table/HeaderCheckbox.js +29 -19
  6. package/dist/components/Search/Search.d.ts +3 -1
  7. package/dist/components/Search/Search.js +34 -33
  8. package/dist/components/Select/Select.d.ts +2 -1
  9. package/dist/components/Select/Select.js +47 -41
  10. package/dist/components/Tooltip/Tooltip.d.ts +14 -0
  11. package/dist/components/Tooltip/Tooltip.js +70 -0
  12. package/dist/components/Tooltip/index.d.ts +1 -0
  13. package/dist/components/Tooltip/index.js +4 -0
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.js +12 -10
  16. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
  17. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
  18. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
  19. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
  20. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
  21. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
  22. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
  23. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
  24. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
  25. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
  26. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
  27. package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
  28. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
  29. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
  30. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
  31. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
  32. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
  33. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
  34. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
  35. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
  36. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
  37. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
  38. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
  39. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
  40. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
  41. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
  42. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
  43. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
  44. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
  45. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
  47. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
  48. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
  49. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
  50. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
  51. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
  52. package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
  53. package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
  54. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
  55. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
  56. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
  57. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
  58. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
  59. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
  60. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
  61. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
  62. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
  63. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
  64. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
  65. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
  66. package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
  67. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
  68. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +13 -0
  69. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +13 -0
  70. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +15 -0
  71. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +14 -0
  72. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +14 -0
  73. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +13 -0
  74. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +10 -0
  75. package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +17 -0
  76. package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
  77. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
  78. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
  79. package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
  80. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
  81. package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
  82. package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
  83. package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
  84. package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
  85. package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
  86. package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
  87. package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
  88. package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
  89. package/dist/node_modules/@zag-js/dom-query/dist/index.js +465 -253
  90. package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
  91. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
  92. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
  93. package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
  94. package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
  98. package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
  99. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
  100. package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
  101. package/dist/node_modules/@zag-js/store/dist/index.js +98 -137
  102. package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
  103. package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
  104. package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
  105. package/dist/node_modules/@zag-js/tooltip/dist/index.js +459 -0
  106. package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
  107. package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
  108. package/dist/node_modules/proxy-compare/dist/index.js +4 -106
  109. package/dist/styles.css +1 -1
  110. package/package.json +5 -5
  111. package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
  112. package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
  113. package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
  114. package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
  115. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  116. package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
  117. package/dist/node_modules/klona/full/index.js +0 -21
  118. package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -1,26 +1,19 @@
1
- import { machine as f, connect as d } from "../../../../../@zag-js/collapsible/dist/index.js";
2
- import { useMachine as b, normalizeProps as v } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useRef as x, useId as C } from "react";
1
+ import { machine as a, connect as f } from "../../../../../@zag-js/collapsible/dist/index.js";
2
+ import { useMachine as b, normalizeProps as d } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { useId as v, useRef as x } from "react";
4
4
  import { useEnvironmentContext as h } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as O } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as g } from "../../utils/use-event.js";
7
- const w = (e = {}) => {
8
- const { lazyMount: i, unmountOnExit: s, ...r } = e, o = x(!1), { dir: c } = O(), { getRootNode: l } = h(), t = {
9
- id: C(),
5
+ import { useLocaleContext as C } from "../../providers/locale/use-locale-context.js";
6
+ const g = (t = {}) => {
7
+ const { lazyMount: n, unmountOnExit: s, ...i } = t, r = v(), e = x(!1), { dir: c } = C(), { getRootNode: m } = h(), u = {
8
+ id: r,
10
9
  dir: c,
11
- getRootNode: l,
12
- open: e.defaultOpen,
13
- "open.controlled": e.open !== void 0,
14
- ...r
15
- }, u = {
16
- ...t,
17
- open: e.open,
18
- onOpenChange: g(e.onOpenChange, { sync: !0 })
19
- }, [m, a] = b(f(t), { context: u }), n = d(m, a, v);
20
- n.visible && (o.current = !0);
21
- const p = !n.visible && !o.current && i || s && !n.visible && o.current;
22
- return { ...n, isUnmounted: p };
10
+ getRootNode: m,
11
+ ...i
12
+ }, l = b(a, u), o = f(l, d);
13
+ o.visible && (e.current = !0);
14
+ const p = !o.visible && !e.current && n || s && !o.visible && e.current;
15
+ return { ...o, isUnmounted: p };
23
16
  };
24
17
  export {
25
- w as useCollapsible
18
+ g as useCollapsible
26
19
  };
@@ -0,0 +1,5 @@
1
+ import { ListCollection as t } from "../../../../../@zag-js/collection/dist/index.js";
2
+ const i = (o) => new t(o);
3
+ export {
4
+ i as createListCollection
5
+ };
@@ -1,14 +1,15 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import { ark as p } from "../factory.js";
4
- import { usePresenceContext as f } from "../presence/use-presence-context.js";
5
- import { useComboboxContext as i } from "./use-combobox-context.js";
3
+ import { composeRefs as p } from "../../utils/compose-refs.js";
4
+ import { ark as f } from "../factory.js";
5
+ import { usePresenceContext as i } from "../presence/use-presence-context.js";
6
+ import { useComboboxContext as c } from "./use-combobox-context.js";
6
7
  import { mergeProps as b } from "../../../../../@zag-js/core/dist/index.js";
7
- const c = s((r, e) => {
8
- const t = i(), o = f(), m = b(t.getContentProps(), o.getPresenceProps(e), r);
9
- return o.unmounted ? null : /* @__PURE__ */ n(p.div, { ...m });
8
+ const x = s((r, e) => {
9
+ const t = c(), o = i(), m = b(t.getContentProps(), o.getPresenceProps(), r);
10
+ return o.unmounted ? null : /* @__PURE__ */ n(f.div, { ...m, ref: p(o.ref, e) });
10
11
  });
11
- c.displayName = "ComboboxContent";
12
+ x.displayName = "ComboboxContent";
12
13
  export {
13
- c as ComboboxContent
14
+ x as ComboboxContent
14
15
  };
@@ -5,12 +5,10 @@ import { ark as f } from "../factory.js";
5
5
  import { useComboboxContext as n } from "./use-combobox-context.js";
6
6
  import { ComboboxItemGroupPropsProvider as P } from "./use-combobox-item-group-props-context.js";
7
7
  import { mergeProps as x } from "../../../../../@zag-js/core/dist/index.js";
8
- const a = c(
9
- (m, t) => {
10
- const p = u(), [e, s] = d()(m, ["id"]), o = { id: p, ...e }, i = n(), b = x(i.getItemGroupProps(o), s);
11
- return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(f.div, { ...b, ref: t }) });
12
- }
13
- );
8
+ const a = c((m, t) => {
9
+ const p = u(), [e, s] = d()(m, ["id"]), o = { id: p, ...e }, i = n(), b = x(i.getItemGroupProps(o), s);
10
+ return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(f.div, { ...b, ref: t }) });
11
+ });
14
12
  a.displayName = "ComboboxItemGroup";
15
13
  export {
16
14
  a as ComboboxItemGroup
@@ -4,12 +4,10 @@ import { ark as i } from "../factory.js";
4
4
  import { usePresenceContext as p } from "../presence/use-presence-context.js";
5
5
  import { useComboboxContext as f } from "./use-combobox-context.js";
6
6
  import { mergeProps as b } from "../../../../../@zag-js/core/dist/index.js";
7
- const x = s(
8
- (o, r) => {
9
- const e = f(), t = p(), m = b(e.getPositionerProps(), o);
10
- return t.unmounted ? null : /* @__PURE__ */ n(i.div, { ...m, ref: r });
11
- }
12
- );
7
+ const x = s((o, r) => {
8
+ const e = f(), t = p(), m = b(e.getPositionerProps(), o);
9
+ return t.unmounted ? null : /* @__PURE__ */ n(i.div, { ...m, ref: r });
10
+ });
13
11
  x.displayName = "ComboboxPositioner";
14
12
  export {
15
13
  x as ComboboxPositioner
@@ -1,45 +1,44 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
3
- import { createSplitProps as u } from "../../utils/create-split-props.js";
2
+ import { forwardRef as u } from "react";
3
+ import { createSplitProps as c } from "../../utils/create-split-props.js";
4
4
  import { ark as d } from "../factory.js";
5
- import { splitPresenceProps as b } from "../presence/split-presence-props.js";
6
- import { usePresence as g } from "../presence/use-presence.js";
7
- import { PresenceProvider as h } from "../presence/use-presence-context.js";
8
- import { useCombobox as P } from "./use-combobox.js";
9
- import { ComboboxProvider as f } from "./use-combobox-context.js";
5
+ import { splitPresenceProps as f } from "../presence/split-presence-props.js";
6
+ import { usePresence as h } from "../presence/use-presence.js";
7
+ import { PresenceProvider as b } from "../presence/use-presence-context.js";
8
+ import { useCombobox as g } from "./use-combobox.js";
9
+ import { ComboboxProvider as P } from "./use-combobox-context.js";
10
10
  import { mergeProps as r } from "../../../../../@zag-js/core/dist/index.js";
11
11
  const C = (n, t) => {
12
- const [i, s] = b(n), [l, p] = u()(s, [
12
+ const [i, l] = f(n), [s, p] = c()(l, [
13
13
  "allowCustomValue",
14
14
  "autoFocus",
15
15
  "closeOnSelect",
16
+ "collection",
16
17
  "composite",
18
+ "defaultHighlightedValue",
19
+ "defaultInputValue",
17
20
  "defaultOpen",
18
21
  "defaultValue",
19
22
  "disabled",
20
23
  "disableLayer",
21
24
  "form",
22
- "getSelectionValue",
23
25
  "highlightedValue",
24
26
  "id",
25
27
  "ids",
26
28
  "inputBehavior",
27
29
  "inputValue",
28
30
  "invalid",
29
- "isItemDisabled",
30
- "items",
31
- "itemToString",
32
- "itemToValue",
33
31
  "loopFocus",
34
32
  "multiple",
35
33
  "name",
34
+ "navigate",
36
35
  "onFocusOutside",
37
36
  "onHighlightChange",
38
37
  "onInputValueChange",
39
38
  "onInteractOutside",
40
39
  "onOpenChange",
41
- "onOpenChange",
42
40
  "onPointerDownOutside",
41
+ "onSelect",
43
42
  "onValueChange",
44
43
  "open",
45
44
  "openOnChange",
@@ -53,9 +52,9 @@ const C = (n, t) => {
53
52
  "selectionBehavior",
54
53
  "translations",
55
54
  "value"
56
- ]), o = P(l), m = g(r({ present: o.open }, i)), a = r(o.getRootProps(), p);
57
- return /* @__PURE__ */ e(f, { value: o, children: /* @__PURE__ */ e(h, { value: m, children: /* @__PURE__ */ e(d.div, { ...a, ref: t }) }) });
58
- }, T = c(C);
55
+ ]), o = g(s), a = h(r({ present: o.open }, i)), m = r(o.getRootProps(), p);
56
+ return /* @__PURE__ */ e(P, { value: o, children: /* @__PURE__ */ e(b, { value: a, children: /* @__PURE__ */ e(d.div, { ...m, ref: t }) }) });
57
+ }, k = u(C);
59
58
  export {
60
- T as ComboboxRoot
59
+ k as ComboboxRoot
61
60
  };
@@ -1,13 +1,14 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { createSplitProps as g } from "../../utils/create-split-props.js";
3
4
  import { ark as b } from "../factory.js";
4
- import { useComboboxContext as g } from "./use-combobox-context.js";
5
- import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
6
- const s = p((o, r) => {
7
- const m = g(), t = i(m.getTriggerProps(), o);
8
- return /* @__PURE__ */ e(b.button, { ...t, ref: r });
5
+ import { useComboboxContext as f } from "./use-combobox-context.js";
6
+ import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
7
+ const a = i((o, r) => {
8
+ const [t, m] = g()(o, ["focusable"]), e = f(), p = c(e.getTriggerProps(t), m);
9
+ return /* @__PURE__ */ s(b.button, { ...p, ref: r });
9
10
  });
10
- s.displayName = "ComboboxTrigger";
11
+ a.displayName = "ComboboxTrigger";
11
12
  export {
12
- s as ComboboxTrigger
13
+ a as ComboboxTrigger
13
14
  };
@@ -1,11 +1,9 @@
1
1
  import { createContext as o } from "../../utils/create-context.js";
2
- const [t, m] = o(
3
- {
4
- name: "ComboboxItemContext",
5
- hookName: "useComboboxItemContext",
6
- providerName: "<ComboboxItemProvider />"
7
- }
8
- );
2
+ const [t, m] = o({
3
+ name: "ComboboxItemContext",
4
+ hookName: "useComboboxItemContext",
5
+ providerName: "<ComboboxItemProvider />"
6
+ });
9
7
  export {
10
8
  t as ComboboxItemProvider,
11
9
  m as useComboboxItemContext
@@ -1,50 +1,26 @@
1
- import { collection as g, machine as h, connect as d } from "../../../../../@zag-js/combobox/dist/index.js";
2
- import { useMachine as C, normalizeProps as b } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useMemo as v, useId as x } from "react";
4
- import { useEnvironmentContext as p } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as O } from "../../providers/locale/use-locale-context.js";
6
- import { createSplitProps as V } from "../../utils/create-split-props.js";
7
- import { useEvent as n } from "../../utils/use-event.js";
8
- import { useFieldContext as y } from "../field/use-field-context.js";
9
- const j = (o) => {
10
- const [t, c] = V()(o, [
11
- "isItemDisabled",
12
- "itemToValue",
13
- "itemToString",
14
- "items"
15
- ]), i = v(
16
- () => g(t),
17
- Object.values(t)
18
- ), { dir: l } = O(), { getRootNode: r } = p(), e = y(), a = {
19
- id: x(),
1
+ import { machine as i, connect as c } from "../../../../../@zag-js/combobox/dist/index.js";
2
+ import { useMachine as a, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { useId as u } from "react";
4
+ import { useEnvironmentContext as d } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as b } from "../../providers/locale/use-locale-context.js";
6
+ import { useFieldContext as x } from "../field/use-field-context.js";
7
+ const O = (r) => {
8
+ const t = u(), { dir: n } = b(), { getRootNode: e } = d(), o = x(), s = {
9
+ id: t,
20
10
  ids: {
21
- label: e == null ? void 0 : e.ids.label,
22
- input: e == null ? void 0 : e.ids.control
11
+ label: o == null ? void 0 : o.ids.label,
12
+ input: o == null ? void 0 : o.ids.control
23
13
  },
24
- disabled: e == null ? void 0 : e.disabled,
25
- readOnly: e == null ? void 0 : e.readOnly,
26
- required: e == null ? void 0 : e.required,
27
- invalid: e == null ? void 0 : e.invalid,
28
- dir: l,
29
- getRootNode: r,
30
- collection: i,
31
- open: o.defaultOpen,
32
- value: o.defaultValue,
33
- "open.controlled": o.open !== void 0,
34
- ...c
35
- }, u = {
36
- ...a,
37
- collection: i,
38
- value: o.value,
39
- onValueChange: n(o.onValueChange, { sync: !0 }),
40
- onInputValueChange: n(o.onInputValueChange, { sync: !0 }),
41
- onHighlightChange: n(o.onHighlightChange),
42
- onOpenChange: n(o.onOpenChange)
43
- }, [m, s] = C(h(a), {
44
- context: u
45
- });
46
- return d(m, s, b);
14
+ disabled: o == null ? void 0 : o.disabled,
15
+ readOnly: o == null ? void 0 : o.readOnly,
16
+ required: o == null ? void 0 : o.required,
17
+ invalid: o == null ? void 0 : o.invalid,
18
+ dir: n,
19
+ getRootNode: e,
20
+ ...r
21
+ }, m = a(i, s);
22
+ return c(m, p);
47
23
  };
48
24
  export {
49
- j as useCombobox
25
+ O as useCombobox
50
26
  };
@@ -1,15 +1,16 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
3
- import { useRenderStrategyPropsContext as i } from "../../utils/render-strategy.js";
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { composeRefs as i } from "../../utils/compose-refs.js";
4
+ import { useRenderStrategyPropsContext as f } from "../../utils/render-strategy.js";
4
5
  import { ark as a } from "../factory.js";
5
6
  import { usePresence as c } from "../presence/use-presence.js";
6
7
  import { useDialogContext as d } from "./use-dialog-context.js";
7
- import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
8
- const g = m((e, t) => {
9
- const r = d(), p = i(), o = c({ ...p, present: r.open }), s = f(r.getBackdropProps(), o.getPresenceProps(t), e);
10
- return o.unmounted ? null : /* @__PURE__ */ n(a.div, { ...s });
8
+ import { mergeProps as g } from "../../../../../@zag-js/core/dist/index.js";
9
+ const u = n((e, t) => {
10
+ const o = d(), p = f(), r = c({ ...p, present: o.open }), s = g(o.getBackdropProps(), r.getPresenceProps(), e);
11
+ return r.unmounted ? null : /* @__PURE__ */ m(a.div, { ...s, ref: i(r.ref, t) });
11
12
  });
12
- g.displayName = "DialogBackdrop";
13
+ u.displayName = "DialogBackdrop";
13
14
  export {
14
- g as DialogBackdrop
15
+ u as DialogBackdrop
15
16
  };
@@ -3,12 +3,10 @@ import { forwardRef as i } from "react";
3
3
  import { ark as m } from "../factory.js";
4
4
  import { useDialogContext as s } from "./use-dialog-context.js";
5
5
  import { mergeProps as p } from "../../../../../@zag-js/core/dist/index.js";
6
- const a = i(
7
- (o, r) => {
8
- const e = s(), t = p(e.getCloseTriggerProps(), o);
9
- return /* @__PURE__ */ g(m.button, { ...t, ref: r });
10
- }
11
- );
6
+ const a = i((o, r) => {
7
+ const e = s(), t = p(e.getCloseTriggerProps(), o);
8
+ return /* @__PURE__ */ g(m.button, { ...t, ref: r });
9
+ });
12
10
  a.displayName = "DialogCloseTrigger";
13
11
  export {
14
12
  a as DialogCloseTrigger
@@ -1,12 +1,13 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
+ import { composeRefs as p } from "../../utils/compose-refs.js";
3
4
  import { ark as i } from "../factory.js";
4
- import { usePresenceContext as p } from "../presence/use-presence-context.js";
5
- import { useDialogContext as f } from "./use-dialog-context.js";
6
- import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
5
+ import { usePresenceContext as f } from "../presence/use-presence-context.js";
6
+ import { useDialogContext as a } from "./use-dialog-context.js";
7
+ import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
7
8
  const g = s((r, e) => {
8
- const t = f(), o = p(), n = a(t.getContentProps(), o.getPresenceProps(e), r);
9
- return o.unmounted ? null : /* @__PURE__ */ m(i.div, { ...n });
9
+ const t = a(), o = f(), n = c(t.getContentProps(), o.getPresenceProps(), r);
10
+ return o.unmounted ? null : /* @__PURE__ */ m(i.div, { ...n, ref: p(o.ref, e) });
10
11
  });
11
12
  g.displayName = "DialogContent";
12
13
  export {
@@ -3,12 +3,10 @@ import { forwardRef as m } from "react";
3
3
  import { ark as p } from "../factory.js";
4
4
  import { useDialogContext as s } from "./use-dialog-context.js";
5
5
  import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
6
- const n = m(
7
- (o, r) => {
8
- const i = s(), t = a(i.getDescriptionProps(), o);
9
- return /* @__PURE__ */ e(p.div, { ...t, ref: r });
10
- }
11
- );
6
+ const n = m((o, r) => {
7
+ const i = s(), t = a(i.getDescriptionProps(), o);
8
+ return /* @__PURE__ */ e(p.div, { ...t, ref: r });
9
+ });
12
10
  n.displayName = "DialogDescription";
13
11
  export {
14
12
  n as DialogDescription
@@ -1,25 +1,16 @@
1
- import { machine as a, connect as s } from "../../../../../@zag-js/dialog/dist/index.js";
2
- import { useMachine as u, normalizeProps as d } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useId as f } from "react";
4
- import { useEnvironmentContext as l } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as p } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as n } from "../../utils/use-event.js";
7
- const v = (e = {}) => {
8
- const { getRootNode: t } = l(), { dir: i } = p(), o = {
9
- id: f(),
10
- getRootNode: t,
11
- dir: i,
12
- open: e.defaultOpen,
13
- "open.controlled": e.open !== void 0,
14
- ...e
15
- }, c = {
16
- ...o,
17
- open: e.open,
18
- onOpenChange: n(e.onOpenChange, { sync: !0 }),
19
- onEscapeKeyDown: n(e.onEscapeKeyDown),
20
- onInteractOutside: n(e.onInteractOutside)
21
- }, [r, m] = u(a(o), { context: c });
22
- return s(r, m, d);
1
+ import { machine as m, connect as s } from "../../../../../@zag-js/dialog/dist/index.js";
2
+ import { useMachine as c, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { useId as a } from "react";
4
+ import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as f } from "../../providers/locale/use-locale-context.js";
6
+ const v = (o) => {
7
+ const t = a(), { getRootNode: e } = u(), { dir: r } = f(), n = {
8
+ id: t,
9
+ getRootNode: e,
10
+ dir: r,
11
+ ...o
12
+ }, i = c(m, n);
13
+ return s(i, p);
23
14
  };
24
15
  export {
25
16
  v as useDialog
@@ -1,39 +1,41 @@
1
- import { mergeProps as p } from "../../../../@zag-js/core/dist/index.js";
2
- import { memo as m, forwardRef as c, createElement as u, Children as d, isValidElement as h, cloneElement as y } from "react";
3
- import { composeRefs as g } from "../utils/compose-refs.js";
4
- function w(r) {
5
- return "ref" in r.props ? r.props.ref : "ref" in r ? r.ref : null;
1
+ import { mergeProps as f } from "../../../../@zag-js/core/dist/index.js";
2
+ import { memo as l, forwardRef as g, createElement as m, Children as u, isValidElement as d, cloneElement as h } from "react";
3
+ import { composeRefs as y } from "../utils/compose-refs.js";
4
+ function R(r) {
5
+ var e, s;
6
+ let t = (e = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : e.get, n = t && "isReactWarning" in t && t.isReactWarning;
7
+ return n ? r.ref : (t = (s = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : s.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? r.props.ref : r.props.ref || r.ref);
6
8
  }
7
- const s = (r) => {
8
- const t = m(
9
- c((n, e) => {
10
- const { asChild: f, children: i, ...l } = n;
11
- if (!f)
12
- return u(r, { ...l, ref: e }, i);
13
- const o = d.only(i);
14
- if (!h(o))
9
+ const o = (r) => {
10
+ const t = l(
11
+ g((n, e) => {
12
+ const { asChild: s, children: a, ...c } = n;
13
+ if (!s)
14
+ return m(r, { ...c, ref: e }, a);
15
+ const i = u.only(a);
16
+ if (!d(i))
15
17
  return null;
16
- const a = w(o);
17
- return y(o, {
18
- ...p(l, o.props),
19
- ref: e ? g(e, a) : a
18
+ const p = R(i);
19
+ return h(i, {
20
+ ...f(c, i.props),
21
+ ref: e ? y(e, p) : p
20
22
  });
21
23
  })
22
24
  );
23
25
  return t.displayName = r.displayName || r.name, t;
24
- }, E = () => {
26
+ }, w = () => {
25
27
  const r = /* @__PURE__ */ new Map();
26
- return new Proxy(s, {
28
+ return new Proxy(o, {
27
29
  apply(t, n, e) {
28
- return s(e[0]);
30
+ return o(e[0]);
29
31
  },
30
32
  get(t, n) {
31
33
  const e = n;
32
- return r.has(e) || r.set(e, s(e)), r.get(e);
34
+ return r.has(e) || r.set(e, o(e)), r.get(e);
33
35
  }
34
36
  });
35
- }, P = E();
37
+ }, O = w();
36
38
  export {
37
- P as ark,
38
- E as jsxFactory
39
+ O as ark,
40
+ w as jsxFactory
39
41
  };
@@ -1,14 +1,15 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import { ark as p } from "../factory.js";
3
+ import { composeRefs as p } from "../../utils/compose-refs.js";
4
+ import { ark as f } from "../factory.js";
4
5
  import { usePresenceContext as u } from "../presence/use-presence-context.js";
5
- import { useMenuContext as f } from "./use-menu-context.js";
6
- import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
7
- const c = s((r, o) => {
8
- const t = f(), e = u(), n = i(t.getContentProps(), e.getPresenceProps(o), r);
9
- return e.unmounted ? null : /* @__PURE__ */ m(p.div, { ...n });
6
+ import { useMenuContext as i } from "./use-menu-context.js";
7
+ import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
8
+ const P = s((r, o) => {
9
+ const t = i(), e = u(), n = c(t.getContentProps(), e.getPresenceProps(), r);
10
+ return e.unmounted ? null : /* @__PURE__ */ m(f.div, { ...n, ref: p(e.ref, o) });
10
11
  });
11
- c.displayName = "MenuContent";
12
+ P.displayName = "MenuContent";
12
13
  export {
13
- c as MenuContent
14
+ P as MenuContent
14
15
  };
@@ -6,9 +6,7 @@ import { useMenuContext as f } from "./use-menu-context.js";
6
6
  import { MenuItemGroupProvider as a } from "./use-menu-item-group-context.js";
7
7
  import { mergeProps as P } from "../../../../../@zag-js/core/dist/index.js";
8
8
  const l = n((e, t) => {
9
- const [m, p] = d()(e, [
10
- "id"
11
- ]), i = f(), o = { id: u(), ...m }, s = P(i.getItemGroupProps(o), p);
9
+ const [m, p] = d()(e, ["id"]), i = f(), o = { id: u(), ...m }, s = P(i.getItemGroupProps(o), p);
12
10
  return /* @__PURE__ */ r(a, { value: o, children: /* @__PURE__ */ r(c.div, { ...s, ref: t }) });
13
11
  });
14
12
  l.displayName = "MenuItemGroup";
@@ -1,20 +1,22 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { createSplitProps as a } from "../../utils/create-split-props.js";
4
- import { ark as l } from "../factory.js";
5
- import { useMenuContext as c } from "./use-menu-context.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as p, useEffect as l } from "react";
3
+ import { createSplitProps as c } from "../../utils/create-split-props.js";
4
+ import { ark as d } from "../factory.js";
5
+ import { useMenuContext as a } from "./use-menu-context.js";
6
6
  import { MenuItemProvider as u } from "./use-menu-item-context.js";
7
- import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
8
- const d = n((o, m) => {
9
- const [e, p] = a()(o, [
7
+ import { MenuItemPropsProvider as f } from "./use-menu-option-item-props-context.js";
8
+ import { mergeProps as P } from "../../../../../@zag-js/core/dist/index.js";
9
+ const S = p((m, i) => {
10
+ const [e, n] = c()(m, [
10
11
  "closeOnSelect",
11
12
  "disabled",
12
13
  "value",
13
- "valueText"
14
- ]), t = c(), s = f(t.getItemProps(e), p), i = t.getItemState(e);
15
- return /* @__PURE__ */ r(u, { value: i, children: /* @__PURE__ */ r(l.div, { ...s, ref: m }) });
14
+ "valueText",
15
+ "onSelect"
16
+ ]), t = a(), s = P(t.getItemProps(e), n), r = t.getItemState(e);
17
+ return l(() => t.addItemListener({ id: r.id, onSelect: e.onSelect }), [r.id, e.onSelect]), /* @__PURE__ */ o(f, { value: e, children: /* @__PURE__ */ o(u, { value: r, children: /* @__PURE__ */ o(d.div, { ...s, ref: i }) }) });
16
18
  });
17
- d.displayName = "MenuItem";
19
+ S.displayName = "MenuItem";
18
20
  export {
19
- d as MenuItem
21
+ S as MenuItem
20
22
  };
@@ -1,26 +1,28 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { useCallback as l } from "react";
3
- import { createSplitProps as P } from "../../utils/create-split-props.js";
3
+ import { createSplitProps as d } from "../../utils/create-split-props.js";
4
4
  import { useEffectOnce as f } from "../../utils/use-effect-once.js";
5
- import { splitPresenceProps as h } from "../presence/split-presence-props.js";
6
- import { usePresence as d } from "../presence/use-presence.js";
7
- import { PresenceProvider as g } from "../presence/use-presence-context.js";
5
+ import { splitPresenceProps as g } from "../presence/split-presence-props.js";
6
+ import { usePresence as h } from "../presence/use-presence.js";
7
+ import { PresenceProvider as P } from "../presence/use-presence-context.js";
8
8
  import { useMenu as M } from "./use-menu.js";
9
9
  import { useMenuContext as v, MenuProvider as C } from "./use-menu-context.js";
10
10
  import { useMenuMachineContext as O, MenuMachineProvider as x } from "./use-menu-machine-context.js";
11
11
  import { MenuTriggerItemProvider as I } from "./use-menu-trigger-item-context.js";
12
12
  import { mergeProps as S } from "../../../../../@zag-js/core/dist/index.js";
13
- const V = (i) => {
14
- const [s, p] = h(i), [c, m] = P()(p, [
13
+ const R = (i) => {
14
+ const [s, p] = g(i), [c, u] = d()(p, [
15
15
  "anchorPoint",
16
16
  "aria-label",
17
17
  "closeOnSelect",
18
18
  "composite",
19
+ "defaultHighlightedValue",
19
20
  "defaultOpen",
20
21
  "highlightedValue",
21
22
  "id",
22
23
  "ids",
23
24
  "loopFocus",
25
+ "navigate",
24
26
  "onEscapeKeyDown",
25
27
  "onFocusOutside",
26
28
  "onHighlightChange",
@@ -31,16 +33,13 @@ const V = (i) => {
31
33
  "open",
32
34
  "positioning",
33
35
  "typeahead"
34
- ]), e = v(), n = O(), { api: o, machine: t } = M(c), u = d(S({ present: o.open }, s));
36
+ ]), e = v(), t = O(), { api: o, service: n } = M(c), m = h(S({ present: o.open }, s));
35
37
  f(() => {
36
- n && e && (e.setChild(t), o.setParent(n));
38
+ t && e && (e.setChild(n), o.setParent(t));
37
39
  });
38
- const a = l(
39
- () => e == null ? void 0 : e.getTriggerItemProps(o),
40
- [o, e]
41
- );
42
- return /* @__PURE__ */ r(I, { value: a, children: /* @__PURE__ */ r(x, { value: t, children: /* @__PURE__ */ r(C, { value: o, children: /* @__PURE__ */ r(g, { value: u, ...m }) }) }) });
40
+ const a = l(() => e == null ? void 0 : e.getTriggerItemProps(o), [o, e]);
41
+ return /* @__PURE__ */ r(I, { value: a, children: /* @__PURE__ */ r(x, { value: n, children: /* @__PURE__ */ r(C, { value: o, children: /* @__PURE__ */ r(P, { value: m, ...u }) }) }) });
43
42
  };
44
43
  export {
45
- V as MenuRoot
44
+ R as MenuRoot
46
45
  };