@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.
- package/dist/components/CheckBox/CheckBox.js +36 -35
- package/dist/components/ChoiceBox/ChoiceBox.js +41 -41
- package/dist/components/DataTable/DataTableComponent.d.ts +3 -20
- package/dist/components/DataTable/DataTableComponent.js +38 -36
- package/dist/components/DataTable/table/HeaderCheckbox.js +29 -19
- package/dist/components/Search/Search.d.ts +3 -1
- package/dist/components/Search/Search.js +34 -33
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +47 -41
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.js +70 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -10
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
- package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
- package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/tooltip/use-tooltip.js +17 -0
- package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
- package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
- package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
- package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
- package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
- package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
- package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
- package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +465 -253
- package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
- package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
- package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
- package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
- package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
- package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
- package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
- package/dist/node_modules/@zag-js/store/dist/index.js +98 -137
- package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
- package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
- package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
- package/dist/node_modules/@zag-js/tooltip/dist/index.js +459 -0
- package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
- package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
- package/dist/node_modules/proxy-compare/dist/index.js +4 -106
- package/dist/styles.css +1 -1
- package/package.json +5 -5
- package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
- package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
- package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
- package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
- package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
- package/dist/node_modules/klona/full/index.js +0 -21
- package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js
ADDED
|
@@ -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
|
|
2
|
-
import { useMachine as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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,
|
|
9
|
-
|
|
10
|
-
|
|
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
|
package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js
CHANGED
|
@@ -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
|
-
(
|
|
8
|
-
|
|
9
|
-
|
|
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
|
package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js
CHANGED
|
@@ -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
|
-
(
|
|
8
|
-
|
|
9
|
-
|
|
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((
|
|
9
|
-
const [i,
|
|
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),
|
|
22
|
-
return /* @__PURE__ */ r(P, { value: o, children: /* @__PURE__ */ r(m.nav, { ...
|
|
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
|
|
2
|
-
import { useMachine as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
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:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
16
|
+
l as usePagination
|
|
23
17
|
};
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { isShadowRoot as f, getDocument as
|
|
3
|
-
import { Children as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { useEnvironmentContext as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { children:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
27
|
+
w as Portal
|
|
19
28
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createSplitProps as e } from "../../utils/create-split-props.js";
|
|
2
|
-
const
|
|
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
|
-
|
|
11
|
+
o as splitPresenceProps
|
|
11
12
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { machine as
|
|
2
|
-
import { useMachine as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onExitComplete:
|
|
10
|
-
},
|
|
11
|
-
e.present && (
|
|
12
|
-
const u = !e.present && !
|
|
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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
24
|
+
k as usePresence
|
|
25
25
|
};
|
package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js
CHANGED
|
@@ -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
|
-
(
|
|
9
|
-
|
|
10
|
-
|
|
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
|
package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js
CHANGED
|
@@ -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
|
-
(
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
2
|
-
import { useMachine as c, normalizeProps as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
6
|
-
import { mergeProps as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
return e.unmounted ? null : /* @__PURE__ */ m(
|
|
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
|
-
|
|
12
|
+
u.displayName = "SelectContent";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
u as SelectContent
|
|
14
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { createSplitProps as
|
|
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,
|
|
12
|
-
const [
|
|
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(
|
|
44
|
-
return /* @__PURE__ */ o(S, { value: e, children: /* @__PURE__ */ o(g, { value:
|
|
45
|
-
},
|
|
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
|
-
|
|
46
|
+
j as SelectRoot
|
|
48
47
|
};
|
|
@@ -1,53 +1,26 @@
|
|
|
1
|
-
import { useMachine as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
22
|
-
hiddenSelect:
|
|
11
|
+
label: o == null ? void 0 : o.ids.label,
|
|
12
|
+
hiddenSelect: o == null ? void 0 : o.ids.control
|
|
23
13
|
},
|
|
24
|
-
disabled:
|
|
25
|
-
readOnly:
|
|
26
|
-
invalid:
|
|
27
|
-
required:
|
|
28
|
-
dir:
|
|
29
|
-
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
|
-
},
|
|
36
|
-
|
|
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
|
-
|
|
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
|
-
(
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
2
|
-
import { machine as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
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:
|
|
13
|
-
hiddenInput:
|
|
11
|
+
label: o == null ? void 0 : o.ids.label,
|
|
12
|
+
hiddenInput: o == null ? void 0 : o.ids.control
|
|
14
13
|
},
|
|
15
|
-
dir:
|
|
16
|
-
disabled:
|
|
17
|
-
readOnly:
|
|
18
|
-
invalid:
|
|
19
|
-
required:
|
|
20
|
-
getRootNode:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|