@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
@@ -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.getPrevTriggerProps(), 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.getPrevTriggerProps(), r);
8
+ return /* @__PURE__ */ i(g.button, { ...e, ref: o });
9
+ });
12
10
  p.displayName = "PaginationPrevTrigger";
13
11
  export {
14
12
  p as PaginationPrevTrigger
@@ -5,10 +5,11 @@ import { ark as m } from "../factory.js";
5
5
  import { usePagination as s } from "./use-pagination.js";
6
6
  import { PaginationProvider as P } from "./use-pagination-context.js";
7
7
  import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
8
- const l = p((t, a) => {
9
- const [i, n] = g()(t, [
8
+ const l = p((a, t) => {
9
+ const [i, e] = g()(a, [
10
10
  "count",
11
11
  "defaultPage",
12
+ "defaultPageSize",
12
13
  "id",
13
14
  "ids",
14
15
  "onPageChange",
@@ -18,8 +19,8 @@ const l = p((t, a) => {
18
19
  "siblingCount",
19
20
  "translations",
20
21
  "type"
21
- ]), o = s(i), e = f(o.getRootProps(), n);
22
- return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(m.nav, { ...e, ref: a }) });
22
+ ]), o = s(i), n = f(o.getRootProps(), e);
23
+ return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(m.nav, { ...n, ref: t }) });
23
24
  });
24
25
  l.displayName = "PaginationRoot";
25
26
  export {
@@ -1,23 +1,17 @@
1
- import { machine as m, connect as c } from "../../../../../@zag-js/pagination/dist/index.js";
2
- import { useMachine as s, normalizeProps as g } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useId as u } from "react";
4
- import { useEnvironmentContext as f } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as d } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as p } from "../../utils/use-event.js";
7
- const E = (e) => {
8
- const { getRootNode: o } = f(), { dir: n } = d(), t = {
9
- id: u(),
1
+ import { machine as m, connect as s } from "../../../../../@zag-js/pagination/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 l = (o) => {
7
+ const t = a(), { getRootNode: e } = u(), { dir: n } = f(), r = {
8
+ id: t,
10
9
  dir: n,
11
- getRootNode: o,
12
- page: e.defaultPage,
13
- ...e
14
- }, a = {
15
- ...t,
16
- page: e.page,
17
- onPageChange: p(e.onPageChange, { sync: !0 })
18
- }, [i, r] = s(m(t), { context: a });
19
- return c(i, r, g);
10
+ getRootNode: e,
11
+ ...o
12
+ }, i = c(m, r);
13
+ return s(i, p);
20
14
  };
21
15
  export {
22
- E as usePagination
16
+ l as usePagination
23
17
  };
@@ -1,19 +1,28 @@
1
- import { jsx as e, Fragment as n } from "react/jsx-runtime";
2
- import { isShadowRoot as f, getDocument as c } from "../../../../../@zag-js/dom-query/dist/index.js";
3
- import { Children as p } from "react";
4
- import { createPortal as a } from "react-dom";
5
- import { useEnvironmentContext as l } from "../../providers/environment/use-environment-context.js";
6
- import { useIsServer as g } from "../../utils/use-is-server.js";
7
- const C = (t) => {
8
- const { children: r, container: o, disabled: m } = t, i = g(), { getRootNode: s } = l();
9
- if (i || m) return /* @__PURE__ */ e(n, { children: r });
10
- const d = (o == null ? void 0 : o.current) ?? N(s);
11
- return /* @__PURE__ */ e(n, { children: p.map(r, (u) => a(u, d)) });
1
+ import { jsx as i, Fragment as c } from "react/jsx-runtime";
2
+ import { isShadowRoot as f, getDocument as l } from "../../../../../@zag-js/dom-query/dist/index.js";
3
+ import { useState as g, useSyncExternalStore as N, useEffect as S, Children as h } from "react";
4
+ import { createPortal as x } from "react-dom";
5
+ import { useEnvironmentContext as C } from "../../providers/environment/use-environment-context.js";
6
+ const w = (t) => {
7
+ var n;
8
+ const { children: o, disabled: e } = t, [s, a] = g((n = t.container) == null ? void 0 : n.current), m = N(
9
+ P,
10
+ () => !1,
11
+ () => !0
12
+ ), { getRootNode: u } = C();
13
+ if (S(() => {
14
+ a(() => {
15
+ var r;
16
+ return (r = t.container) == null ? void 0 : r.current;
17
+ });
18
+ }, [t.container]), m || e) return /* @__PURE__ */ i(c, { children: o });
19
+ const d = s ?? E(u);
20
+ return /* @__PURE__ */ i(c, { children: h.map(o, (r) => x(r, d)) });
21
+ }, E = (t) => {
22
+ const o = t == null ? void 0 : t(), e = o.getRootNode();
23
+ return f(e) ? e : l(o).body;
24
+ }, P = () => () => {
12
25
  };
13
- function N(t) {
14
- const r = t == null ? void 0 : t(), o = r.getRootNode();
15
- return f(o) ? o : c(r).body;
16
- }
17
26
  export {
18
- C as Portal
27
+ w as Portal
19
28
  };
@@ -1,11 +1,12 @@
1
1
  import { createSplitProps as e } from "../../utils/create-split-props.js";
2
- const n = (t) => e()(t, [
2
+ const o = (t) => e()(t, [
3
3
  "immediate",
4
4
  "lazyMount",
5
5
  "onExitComplete",
6
6
  "present",
7
+ "skipAnimationOnMount",
7
8
  "unmountOnExit"
8
9
  ]);
9
10
  export {
10
- n as splitPresenceProps
11
+ o as splitPresenceProps
11
12
  };
@@ -1,25 +1,25 @@
1
- import { machine as a, connect as f } from "../../../../../@zag-js/presence/dist/index.js";
2
- import { useMachine as d } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useRef as P } from "react";
4
- import { composeRefs as l } from "../../utils/compose-refs.js";
5
- import { useEvent as x } from "../../utils/use-event.js";
6
- const R = (t) => {
7
- const { lazyMount: o, unmountOnExit: s, ...c } = t, n = P(!1), r = {
8
- ...c,
9
- onExitComplete: x(t.onExitComplete)
10
- }, [m, p] = d(a(r), { context: r }), e = f(m, p);
11
- e.present && (n.current = !0);
12
- const u = !e.present && !n.current && o || s && !e.present && n.current;
1
+ import { machine as f, connect as d } from "../../../../../@zag-js/presence/dist/index.js";
2
+ import { useMachine as l } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { useRef as E } from "react";
4
+ import { useEvent as P } from "../../utils/use-event.js";
5
+ const k = (n = {}) => {
6
+ const { lazyMount: s, unmountOnExit: o, present: r, skipAnimationOnMount: c = !1, ...i } = n, t = E(!1), p = {
7
+ ...i,
8
+ present: r,
9
+ onExitComplete: P(n.onExitComplete)
10
+ }, m = l(f, p), e = d(m);
11
+ e.present && (t.current = !0);
12
+ const u = !e.present && !t.current && s || o && !e.present && t.current, a = () => ({
13
+ "data-state": e.skip && c ? void 0 : r ? "open" : "closed",
14
+ hidden: !e.present
15
+ });
13
16
  return {
14
- getPresenceProps: (i) => ({
15
- ref: l(e.setNode, i),
16
- "data-state": t.present ? "open" : "closed",
17
- hidden: !e.present
18
- }),
17
+ ref: e.setNode,
18
+ getPresenceProps: a,
19
19
  present: e.present,
20
20
  unmounted: u
21
21
  };
22
22
  };
23
23
  export {
24
- R as usePresence
24
+ k as usePresence
25
25
  };
@@ -4,12 +4,10 @@ import { ark as s } from "../factory.js";
4
4
  import { useRadioGroupContext as n } from "./use-radio-group-context.js";
5
5
  import { useRadioGroupItemPropsContext as a } from "./use-radio-group-item-props-context.js";
6
6
  import { mergeProps as d } from "../../../../../@zag-js/core/dist/index.js";
7
- const f = i(
8
- (o, r) => {
9
- const t = n(), m = a(), e = d(t.getItemControlProps(m), o);
10
- return /* @__PURE__ */ p(s.div, { ...e, ref: r });
11
- }
12
- );
7
+ const f = i((o, r) => {
8
+ const t = n(), m = a(), e = d(t.getItemControlProps(m), o);
9
+ return /* @__PURE__ */ p(s.div, { ...e, ref: r });
10
+ });
13
11
  f.displayName = "RadioGroupItemControl";
14
12
  export {
15
13
  f as RadioGroupItemControl
@@ -4,12 +4,10 @@ import { ark as i } from "../factory.js";
4
4
  import { useRadioGroupContext as a } from "./use-radio-group-context.js";
5
5
  import { useRadioGroupItemPropsContext as d } from "./use-radio-group-item-props-context.js";
6
6
  import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
7
- const n = s(
8
- (o, r) => {
9
- const t = a(), e = d(), m = f(t.getItemTextProps(e), o);
10
- return /* @__PURE__ */ p(i.span, { ...m, ref: r });
11
- }
12
- );
7
+ const n = s((o, r) => {
8
+ const t = a(), e = d(), m = f(t.getItemTextProps(e), o);
9
+ return /* @__PURE__ */ p(i.span, { ...m, ref: r });
10
+ });
13
11
  n.displayName = "RadioGroupItemText";
14
12
  export {
15
13
  n as RadioGroupItemText
@@ -7,11 +7,7 @@ import { RadioGroupItemProvider as f } from "./use-radio-group-item-context.js";
7
7
  import { RadioGroupItemPropsProvider as n } from "./use-radio-group-item-props-context.js";
8
8
  import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
9
9
  const P = d((t, m) => {
10
- const [o, i] = s()(t, [
11
- "value",
12
- "disabled",
13
- "invalid"
14
- ]), e = u(), p = c(e.getItemProps(o), i), a = e.getItemState(o);
10
+ const [o, i] = s()(t, ["value", "disabled", "invalid"]), e = u(), p = c(e.getItemProps(o), i), a = e.getItemState(o);
15
11
  return /* @__PURE__ */ r(f, { value: a, children: /* @__PURE__ */ r(n, { value: o, children: /* @__PURE__ */ r(l.label, { ...p, ref: m }) }) });
16
12
  });
17
13
  P.displayName = "RadioGroupItem";
@@ -1,25 +1,17 @@
1
- import { machine as u, connect as m } from "../../../../../@zag-js/radio-group/dist/index.js";
2
- import { useMachine as c, normalizeProps as s } from "../../../../../@zag-js/react/dist/index.js";
3
- import { useId as l } from "react";
4
- import { useEnvironmentContext as d } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as f } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as v } from "../../utils/use-event.js";
7
- const E = (e) => {
8
- const { getRootNode: t } = d(), { dir: n } = f(), o = {
9
- id: l(),
10
- dir: n,
11
- getRootNode: t,
12
- value: e.defaultValue,
13
- ...e
14
- }, r = {
15
- ...o,
16
- value: e.value,
17
- onValueChange: v(e.onValueChange, { sync: !0 })
18
- }, [a, i] = c(u(o), {
19
- context: r
20
- });
21
- return m(a, i, s);
1
+ import { machine as m, connect as s } from "../../../../../@zag-js/radio-group/dist/index.js";
2
+ import { useMachine as c, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
3
+ import { useId as u } from "react";
4
+ import { useEnvironmentContext as a } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as d } from "../../providers/locale/use-locale-context.js";
6
+ const C = (o) => {
7
+ const t = u(), { getRootNode: e } = a(), { dir: r } = d(), n = {
8
+ id: t,
9
+ dir: r,
10
+ getRootNode: e,
11
+ ...o
12
+ }, i = c(m, n);
13
+ return s(i, p);
22
14
  };
23
15
  export {
24
- E as useRadioGroup
16
+ C as useRadioGroup
25
17
  };
@@ -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 c } from "../presence/use-presence-context.js";
5
- import { useSelectContext as f } from "./use-select-context.js";
6
- import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
7
- const l = s((t, r) => {
8
- const o = f(), e = c(), n = i(o.getContentProps(), e.getPresenceProps(r), t);
9
- return e.unmounted ? null : /* @__PURE__ */ m(p.div, { ...n });
6
+ import { useSelectContext as i } from "./use-select-context.js";
7
+ import { mergeProps as l } from "../../../../../@zag-js/core/dist/index.js";
8
+ const u = s((r, o) => {
9
+ const t = i(), e = c(), n = l(t.getContentProps(), e.getPresenceProps(), r);
10
+ return e.unmounted ? null : /* @__PURE__ */ m(f.div, { ...n, ref: p(e.ref, o) });
10
11
  });
11
- l.displayName = "SelectContent";
12
+ u.displayName = "SelectContent";
12
13
  export {
13
- l as SelectContent
14
+ u as SelectContent
14
15
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as a } from "react";
3
- import { createSplitProps as d } from "../../utils/create-split-props.js";
2
+ import { forwardRef as d } from "react";
3
+ import { createSplitProps as a } from "../../utils/create-split-props.js";
4
4
  import { ark as u } from "../factory.js";
5
5
  import { splitPresenceProps as f } from "../presence/split-presence-props.js";
6
6
  import { usePresence as P } from "../presence/use-presence.js";
@@ -8,10 +8,12 @@ import { PresenceProvider as g } from "../presence/use-presence-context.js";
8
8
  import { useSelect as h } from "./use-select.js";
9
9
  import { SelectProvider as S } from "./use-select-context.js";
10
10
  import { mergeProps as r } from "../../../../../@zag-js/core/dist/index.js";
11
- const v = (t, s) => {
12
- const [i, n] = f(t), [l, p] = d()(n, [
11
+ const v = (t, l) => {
12
+ const [n, s] = f(t), [i, c] = a()(s, [
13
13
  "closeOnSelect",
14
+ "collection",
14
15
  "composite",
16
+ "defaultHighlightedValue",
15
17
  "defaultOpen",
16
18
  "defaultValue",
17
19
  "deselectable",
@@ -21,10 +23,6 @@ const v = (t, s) => {
21
23
  "id",
22
24
  "ids",
23
25
  "invalid",
24
- "isItemDisabled",
25
- "items",
26
- "itemToString",
27
- "itemToValue",
28
26
  "loopFocus",
29
27
  "multiple",
30
28
  "name",
@@ -33,6 +31,7 @@ const v = (t, s) => {
33
31
  "onInteractOutside",
34
32
  "onOpenChange",
35
33
  "onPointerDownOutside",
34
+ "onSelect",
36
35
  "onValueChange",
37
36
  "open",
38
37
  "positioning",
@@ -40,9 +39,9 @@ const v = (t, s) => {
40
39
  "required",
41
40
  "scrollToIndexFn",
42
41
  "value"
43
- ]), e = h(l), c = P(r({ present: e.open }, i)), m = r(e.getRootProps(), p);
44
- return /* @__PURE__ */ o(S, { value: e, children: /* @__PURE__ */ o(g, { value: c, children: /* @__PURE__ */ o(u.div, { ...m, ref: s }) }) });
45
- }, D = a(v);
42
+ ]), e = h(i), p = P(r({ present: e.open }, n)), m = r(e.getRootProps(), c);
43
+ return /* @__PURE__ */ o(S, { value: e, children: /* @__PURE__ */ o(g, { value: p, children: /* @__PURE__ */ o(u.div, { ...m, ref: l }) }) });
44
+ }, j = d(v);
46
45
  export {
47
- D as SelectRoot
46
+ j as SelectRoot
48
47
  };
@@ -1,53 +1,26 @@
1
- import { useMachine as h, normalizeProps as C } from "../../../../../@zag-js/react/dist/index.js";
2
- import { collection as v, machine as p, connect as O } from "../../../../../@zag-js/select/dist/index.js";
3
- import { useMemo as b, useId as x, useEffect as P } from "react";
4
- import { useEnvironmentContext as S } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as V } from "../../providers/locale/use-locale-context.js";
6
- import { createSplitProps as y } from "../../utils/create-split-props.js";
7
- import { useEvent as n } from "../../utils/use-event.js";
8
- import { useFieldContext as E } from "../field/use-field-context.js";
9
- const z = (o) => {
10
- const [i, r] = y()(o, [
11
- "isItemDisabled",
12
- "itemToValue",
13
- "itemToString",
14
- "items"
15
- ]), t = b(
16
- () => v(i),
17
- Object.values(i)
18
- ), a = V(), s = S(), e = E(), c = {
19
- id: x(),
1
+ import { useMachine as i, normalizeProps as m } from "../../../../../@zag-js/react/dist/index.js";
2
+ import { machine as a, connect as d } from "../../../../../@zag-js/select/dist/index.js";
3
+ import { useId as p } from "react";
4
+ import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
5
+ import { useLocaleContext as l } from "../../providers/locale/use-locale-context.js";
6
+ import { useFieldContext as b } from "../field/use-field-context.js";
7
+ const O = (r) => {
8
+ const t = p(), { dir: e } = l(), { getRootNode: n } = u(), o = b(), s = {
9
+ id: t,
20
10
  ids: {
21
- label: e == null ? void 0 : e.ids.label,
22
- hiddenSelect: e == null ? void 0 : e.ids.control
11
+ label: o == null ? void 0 : o.ids.label,
12
+ hiddenSelect: 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
- invalid: e == null ? void 0 : e.invalid,
27
- required: e == null ? void 0 : e.required,
28
- dir: a.dir,
29
- getRootNode: s.getRootNode,
30
- collection: t,
31
- open: o.defaultOpen,
32
- value: o.defaultValue,
33
- "open.controlled": o.open !== void 0,
14
+ disabled: o == null ? void 0 : o.disabled,
15
+ readOnly: o == null ? void 0 : o.readOnly,
16
+ invalid: o == null ? void 0 : o.invalid,
17
+ required: o == null ? void 0 : o.required,
18
+ dir: e,
19
+ getRootNode: n,
34
20
  ...r
35
- }, m = (() => {
36
- const { collection: q, ...g } = c;
37
- return {
38
- ...g,
39
- value: o.value,
40
- onValueChange: n(o.onValueChange, { sync: !0 }),
41
- onHighlightChange: n(o.onHighlightChange),
42
- onOpenChange: n(o.onOpenChange)
43
- };
44
- })(), [u, d] = h(p(c), {
45
- context: m
46
- }), l = O(u, d, C);
47
- return P(() => {
48
- l.setCollection(t);
49
- }, [t]), l;
21
+ }, c = i(a, s);
22
+ return d(c, m);
50
23
  };
51
24
  export {
52
- z as useSelect
25
+ O as useSelect
53
26
  };
@@ -4,12 +4,10 @@ import { ark as p } from "../factory.js";
4
4
  import { useFieldContext as s } from "../field/use-field-context.js";
5
5
  import { useSwitchContext as d } from "./use-switch-context.js";
6
6
  import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
7
- const a = n(
8
- (t, o) => {
9
- const e = d(), i = c(e.getHiddenInputProps(), t), r = s();
10
- return /* @__PURE__ */ m(p.input, { "aria-describedby": r == null ? void 0 : r.ariaDescribedby, ...i, ref: o });
11
- }
12
- );
7
+ const a = n((t, o) => {
8
+ const e = d(), i = c(e.getHiddenInputProps(), t), r = s();
9
+ return /* @__PURE__ */ m(p.input, { "aria-describedby": r == null ? void 0 : r.ariaDescribedby, ...i, ref: o });
10
+ });
13
11
  a.displayName = "SwitchHiddenInput";
14
12
  export {
15
13
  a as SwitchHiddenInput
@@ -1,31 +1,25 @@
1
- import { useMachine as a, normalizeProps as d } from "../../../../../@zag-js/react/dist/index.js";
2
- import { machine as m, connect as u } from "../../../../../@zag-js/switch/dist/index.js";
3
- import { useId as h } from "react";
4
- import { useEnvironmentContext as C } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as k } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as x } from "../../utils/use-event.js";
7
- import { useFieldContext as l } from "../field/use-field-context.js";
8
- const I = (t) => {
9
- const { getRootNode: o } = C(), { dir: r } = k(), e = l(), n = {
10
- id: h(),
1
+ import { useMachine as c, normalizeProps as m } from "../../../../../@zag-js/react/dist/index.js";
2
+ import { machine as a, connect as p } from "../../../../../@zag-js/switch/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 h } from "../../providers/locale/use-locale-context.js";
6
+ import { useFieldContext as b } from "../field/use-field-context.js";
7
+ const I = (r) => {
8
+ const t = u(), { getRootNode: n } = d(), { dir: e } = h(), o = b(), s = {
9
+ id: t,
11
10
  ids: {
12
- label: e == null ? void 0 : e.ids.label,
13
- hiddenInput: e == null ? void 0 : e.ids.control
11
+ label: o == null ? void 0 : o.ids.label,
12
+ hiddenInput: o == null ? void 0 : o.ids.control
14
13
  },
15
- dir: r,
16
- disabled: e == null ? void 0 : e.disabled,
17
- readOnly: e == null ? void 0 : e.readOnly,
18
- invalid: e == null ? void 0 : e.invalid,
19
- required: e == null ? void 0 : e.required,
20
- getRootNode: o,
21
- checked: t.defaultChecked,
22
- ...t
23
- }, c = {
24
- ...n,
25
- checked: t.checked,
26
- onCheckedChange: x(t.onCheckedChange, { sync: !0 })
27
- }, [s, i] = a(m(n), { context: c });
28
- return u(s, i, d);
14
+ dir: e,
15
+ disabled: o == null ? void 0 : o.disabled,
16
+ readOnly: o == null ? void 0 : o.readOnly,
17
+ invalid: o == null ? void 0 : o.invalid,
18
+ required: o == null ? void 0 : o.required,
19
+ getRootNode: n,
20
+ ...r
21
+ }, i = c(a, s);
22
+ return p(i, m);
29
23
  };
30
24
  export {
31
25
  I as useSwitch
@@ -1,13 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
2
+ import { forwardRef as m } from "react";
3
3
  import { createSplitProps as l } from "../../utils/create-split-props.js";
4
4
  import { splitRenderStrategyProps as d, RenderStrategyPropsProvider as c } from "../../utils/render-strategy.js";
5
5
  import { ark as f } from "../factory.js";
6
6
  import { useTabs as u } from "./use-tabs.js";
7
7
  import { TabsProvider as P } from "./use-tabs-context.js";
8
- import { mergeProps as b } from "../../../../../@zag-js/core/dist/index.js";
9
- const g = n((e, t) => {
10
- const [s, a] = d(e), [p, i] = l()(a, [
8
+ import { mergeProps as g } from "../../../../../@zag-js/core/dist/index.js";
9
+ const b = m((e, t) => {
10
+ const [s, a] = d(e), [i, p] = l()(a, [
11
11
  "activationMode",
12
12
  "composite",
13
13
  "defaultValue",
@@ -15,15 +15,16 @@ const g = n((e, t) => {
15
15
  "id",
16
16
  "ids",
17
17
  "loopFocus",
18
+ "navigate",
18
19
  "onFocusChange",
19
20
  "onValueChange",
20
21
  "orientation",
21
22
  "translations",
22
23
  "value"
23
- ]), r = u(p), m = b(r.getRootProps(), i);
24
- return /* @__PURE__ */ o(P, { value: r, children: /* @__PURE__ */ o(c, { value: s, children: /* @__PURE__ */ o(f.div, { ...m, ref: t }) }) });
24
+ ]), r = u(i), n = g(r.getRootProps(), p);
25
+ return /* @__PURE__ */ o(P, { value: r, children: /* @__PURE__ */ o(c, { value: s, children: /* @__PURE__ */ o(f.div, { ...n, ref: t }) }) });
25
26
  });
26
- g.displayName = "TabsRoot";
27
+ b.displayName = "TabsRoot";
27
28
  export {
28
- g as TabsRoot
29
+ b as TabsRoot
29
30
  };
@@ -1,24 +1,17 @@
1
- import { useMachine as i, normalizeProps as m } from "../../../../../@zag-js/react/dist/index.js";
2
- import { machine as s, connect as l } from "../../../../../@zag-js/tabs/dist/index.js";
3
- import { useId as f } from "react";
4
- import { useEnvironmentContext as C } from "../../providers/environment/use-environment-context.js";
5
- import { useLocaleContext as d } from "../../providers/locale/use-locale-context.js";
6
- import { useEvent as t } from "../../utils/use-event.js";
7
- const F = (e) => {
8
- const { getRootNode: n } = C(), { dir: a } = d(), o = {
9
- id: f(),
10
- dir: a,
11
- getRootNode: n,
12
- value: e.defaultValue,
13
- ...e
14
- }, u = {
15
- ...o,
16
- value: e.value,
17
- onValueChange: t(e.onValueChange, { sync: !0 }),
18
- onFocusChange: t(e.onFocusChange)
19
- }, [r, c] = i(s(o), { context: u });
20
- return l(r, c, m);
1
+ import { useMachine as m, normalizeProps as c } from "../../../../../@zag-js/react/dist/index.js";
2
+ import { machine as i, connect as p } from "../../../../../@zag-js/tabs/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 C = (o) => {
7
+ const t = a(), { getRootNode: e } = u(), { dir: r } = f(), n = {
8
+ id: t,
9
+ dir: r,
10
+ getRootNode: e,
11
+ ...o
12
+ }, s = m(i, n);
13
+ return p(s, c);
21
14
  };
22
15
  export {
23
- F as useTabs
16
+ C as useTabs
24
17
  };
@@ -1,9 +1,5 @@
1
- import { normalizeProps as n } from "../../../../../@zag-js/react/dist/index.js";
2
- import { group as r } from "../../../../../@zag-js/toast/dist/index.js";
3
- const a = (e) => {
4
- const o = r.machine({ id: "1", ...e });
5
- return { ...r.connect(o, o.send, n), machine: o };
6
- };
1
+ import { createStore as r } from "../../../../../@zag-js/toast/dist/index.js";
2
+ const o = (e) => r(e);
7
3
  export {
8
- a as createToaster
4
+ o as createToaster
9
5
  };