@serendie/ui 1.0.1 → 2.0.0-dev.202507180004

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 (154) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Banner/Banner.d.ts +1 -1
  3. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  4. package/dist/components/Button/Button.d.ts +2 -2
  5. package/dist/components/Chart/SerendieChartProps.d.ts +40 -0
  6. package/dist/components/Chart/SerendieChartProps.js +127 -0
  7. package/dist/components/Chart/SerendieChartTheme.d.ts +2 -0
  8. package/dist/components/Chart/SerendieChartTheme.js +150 -0
  9. package/dist/components/Chart/chartData.d.ts +29 -0
  10. package/dist/components/Chart/index.d.ts +3 -0
  11. package/dist/components/Chart/index.js +15 -0
  12. package/dist/components/CheckBox/CheckBox.js +36 -35
  13. package/dist/components/ChoiceBox/ChoiceBox.d.ts +1 -3
  14. package/dist/components/ChoiceBox/ChoiceBox.js +54 -67
  15. package/dist/components/DataTable/DataTableComponent.d.ts +23 -0
  16. package/dist/components/DataTable/DataTableComponent.js +52 -0
  17. package/dist/components/DataTable/createColumnHelper.d.ts +2 -0
  18. package/dist/components/DataTable/createColumnHelper.js +5 -0
  19. package/dist/components/DataTable/index.d.ts +19 -0
  20. package/dist/components/DataTable/index.js +28 -0
  21. package/dist/components/DataTable/table/BodyCell.d.ts +55 -0
  22. package/dist/components/DataTable/table/BodyCell.js +127 -0
  23. package/dist/components/DataTable/table/BodyCheckbox.d.ts +4 -0
  24. package/dist/components/DataTable/table/BodyCheckbox.js +22 -0
  25. package/dist/components/DataTable/table/HeaderCell.d.ts +8 -0
  26. package/dist/components/DataTable/table/HeaderCell.js +79 -0
  27. package/dist/components/DataTable/table/HeaderCheckbox.d.ts +2 -0
  28. package/dist/components/DataTable/table/HeaderCheckbox.js +26 -0
  29. package/dist/components/DataTable/table/HeaderRow.d.ts +11 -0
  30. package/dist/components/DataTable/table/HeaderRow.js +40 -0
  31. package/dist/components/DataTable/table/Root.d.ts +5 -0
  32. package/dist/components/DataTable/table/Root.js +34 -0
  33. package/dist/components/DataTable/table/Row.d.ts +5 -0
  34. package/dist/components/DataTable/table/Row.js +90 -0
  35. package/dist/components/DataTable/table/Tbody.d.ts +1 -0
  36. package/dist/components/DataTable/table/Tbody.js +7 -0
  37. package/dist/components/DataTable/table/Thead.d.ts +1 -0
  38. package/dist/components/DataTable/table/Thead.js +7 -0
  39. package/dist/components/DataTable/table/Tr.d.ts +1 -0
  40. package/dist/components/DataTable/table/Tr.js +27 -0
  41. package/dist/components/DataTable/table/index.d.ts +10 -0
  42. package/dist/components/DataTable/table/index.js +22 -0
  43. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  44. package/dist/components/IconButton/IconButton.d.ts +3 -3
  45. package/dist/components/Pagination/Pagination.d.ts +1 -1
  46. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  47. package/dist/components/Search/Search.d.ts +4 -2
  48. package/dist/components/Search/Search.js +34 -33
  49. package/dist/components/Select/Select.d.ts +2 -1
  50. package/dist/components/Select/Select.js +47 -41
  51. package/dist/components/Tabs/TabItem.d.ts +1 -1
  52. package/dist/components/Toast/Toast.d.ts +1 -1
  53. package/dist/index.d.ts +2 -0
  54. package/dist/index.js +109 -92
  55. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
  56. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
  57. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
  58. package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
  59. package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
  60. package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
  61. package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
  62. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
  63. package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
  64. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
  65. package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
  66. package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
  67. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
  68. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
  69. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
  70. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
  71. package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
  72. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
  73. package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
  74. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
  75. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
  76. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
  77. package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
  78. package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
  79. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
  80. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
  81. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
  82. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
  83. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
  84. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
  85. package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
  86. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
  87. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
  88. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
  89. package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
  90. package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
  91. package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
  92. package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
  93. package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
  94. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
  95. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
  96. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
  97. package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
  98. package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
  99. package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
  100. package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
  101. package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
  102. package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
  103. package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
  104. package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
  105. package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
  106. package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
  107. package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
  108. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
  109. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
  110. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +100 -0
  111. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1741 -0
  112. package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
  113. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
  114. package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
  115. package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
  116. package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
  117. package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
  118. package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
  119. package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
  120. package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
  121. package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
  122. package/dist/node_modules/@zag-js/dom-query/dist/index.js +462 -255
  123. package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
  124. package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
  125. package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
  126. package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
  127. package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
  128. package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
  129. package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
  130. package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
  131. package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
  132. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
  133. package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
  134. package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
  135. package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
  136. package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
  137. package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
  138. package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
  139. package/dist/styled-system/tokens/index.js +4758 -0
  140. package/dist/styles.css +1 -1
  141. package/dist/tokens/getToken.js +4 -4
  142. package/dist/utils/colors.d.ts +1 -0
  143. package/dist/utils/colors.js +12 -0
  144. package/package.json +10 -4
  145. package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
  146. package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
  147. package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
  148. package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
  149. package/dist/node_modules/@zag-js/store/dist/index.js +0 -170
  150. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  151. package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
  152. package/dist/node_modules/klona/full/index.js +0 -21
  153. package/dist/node_modules/proxy-compare/dist/index.js +0 -109
  154. package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
@@ -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
  };
@@ -0,0 +1,10 @@
1
+ import { createContext as e } from "../../utils/create-context.js";
2
+ const [t, r] = e({
3
+ name: "MenuItemPropsContext",
4
+ hookName: "useMenuItemPropsContext",
5
+ providerName: "<MenuItemPropsProvider />"
6
+ });
7
+ export {
8
+ t as MenuItemPropsProvider,
9
+ r as useMenuItemPropsContext
10
+ };
@@ -1,24 +1,17 @@
1
- import { machine as s, connect as u } from "../../../../../@zag-js/menu/dist/index.js";
2
- import { useMachine as d, normalizeProps as l } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useId as p } from "react";
4
- import { useEnvironmentContext as f } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as h } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as o } from "../../utils/use-event.js";
7
- const S = (e = {}) => {
8
- const { getRootNode: t } = f(), { dir: i } = h(), n = {
9
- id: p(),
10
- dir: i,
11
- getRootNode: t,
12
- open: e.defaultOpen,
13
- "open.controlled": e.open !== void 0,
14
- ...e
15
- }, c = {
16
- ...n,
17
- onOpenChange: o(e.onOpenChange),
18
- onSelect: o(e.onSelect)
19
- }, [m, r, a] = d(s(n), { context: c });
20
- return { api: u(m, r, l), machine: a };
1
+ import { machine as s, connect as c } from "../../../../../@zag-js/menu/dist/index.js";
2
+ import { useMachine as m, 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 M = (t) => {
7
+ const e = a(), { getRootNode: n } = u(), { dir: r } = f(), i = {
8
+ id: e,
9
+ dir: r,
10
+ getRootNode: n,
11
+ ...t
12
+ }, o = m(s, i);
13
+ return { api: c(o, p), service: o };
21
14
  };
22
15
  export {
23
- S as useMenu
16
+ M as useMenu
24
17
  };
@@ -4,12 +4,10 @@ import { createSplitProps as n } from "../../utils/create-split-props.js";
4
4
  import { ark as a } from "../factory.js";
5
5
  import { usePaginationContext as l } from "./use-pagination-context.js";
6
6
  import { mergeProps as P } from "../../../../../@zag-js/core/dist/index.js";
7
- const f = m(
8
- (o, r) => {
9
- const [i, s] = n()(o, ["index"]), t = l(), p = P(t.getEllipsisProps(i), s);
10
- return /* @__PURE__ */ e(a.div, { ...p, ref: r });
11
- }
12
- );
7
+ const f = m((o, r) => {
8
+ const [i, s] = n()(o, ["index"]), t = l(), p = P(t.getEllipsisProps(i), s);
9
+ return /* @__PURE__ */ e(a.div, { ...p, ref: r });
10
+ });
13
11
  f.displayName = "PaginationEllipsis";
14
12
  export {
15
13
  f as PaginationEllipsis
@@ -3,12 +3,10 @@ import { forwardRef as n } from "react";
3
3
  import { ark as g } from "../factory.js";
4
4
  import { usePaginationContext as m } from "./use-pagination-context.js";
5
5
  import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
6
- const p = n(
7
- (r, o) => {
8
- const t = m(), e = a(t.getNextTriggerProps(), r);
9
- return /* @__PURE__ */ i(g.button, { ...e, ref: o });
10
- }
11
- );
6
+ const p = n((r, o) => {
7
+ const t = m(), e = a(t.getNextTriggerProps(), r);
8
+ return /* @__PURE__ */ i(g.button, { ...e, ref: o });
9
+ });
12
10
  p.displayName = "PaginationNextTrigger";
13
11
  export {
14
12
  p as PaginationNextTrigger