@serendie/ui 0.1.16 → 0.2.1
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/LICENSE +21 -0
- package/README.md +51 -9
- package/dist/components/{Accordion.d.ts → Accordion/Accordion.d.ts} +2 -2
- package/dist/components/{Accordion.js → Accordion/Accordion.js} +10 -10
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +4 -0
- package/dist/components/AccordionGroup.js +4 -4
- package/dist/components/Avatar.js +4 -4
- package/dist/components/Badge.js +4 -4
- package/dist/components/Banner.js +4 -4
- package/dist/components/BottomNavigation.js +3 -3
- package/dist/components/BottomNavigationItem.js +4 -4
- package/dist/components/Button.js +7 -7
- package/dist/components/CheckBox.js +4 -4
- package/dist/components/ChoiceBox.js +10 -10
- package/dist/components/DashboardWidget.js +4 -4
- package/dist/components/Divider.js +4 -4
- package/dist/components/Drawer.js +4 -4
- package/dist/components/DropdownMenu.js +4 -4
- package/dist/components/IconButton.js +4 -4
- package/dist/components/ListItem.js +4 -4
- package/dist/components/ModalDialog.js +4 -4
- package/dist/components/NotificationBadge.js +4 -4
- package/dist/components/ProgressIndicator.js +4 -4
- package/dist/components/RadioButton.js +4 -4
- package/dist/components/Search.js +6 -6
- package/dist/components/Select.js +4 -4
- package/dist/components/Switch.js +4 -4
- package/dist/components/TabItem.js +4 -4
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TextArea.js +4 -4
- package/dist/components/TextField.js +4 -4
- package/dist/components/Toast.js +3 -3
- package/dist/components/TopAppBar.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-fallback.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-image.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +8 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-root.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-control.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-input.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-text.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-positioner.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-root.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-title.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +2 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-hidden-input.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-root.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-control.js +6 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-item.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-label.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-positioner.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +7 -7
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-trigger.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-value-text.js +5 -6
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +35 -31
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-control.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-label.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-root.js +8 -9
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js +4 -5
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-list.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js +3 -4
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +10 -10
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-root.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toast-title.js +0 -1
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +4 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +361 -303
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +229 -216
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -19
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +39 -38
- package/dist/node_modules/@serendie/design-token/dist/panda-tokens.js +823 -20
- package/dist/node_modules/@serendie/design-token/dist/tokens.js +346 -25
- package/dist/node_modules/@zag-js/accordion/dist/index.js +12 -12
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +13 -62
- package/dist/node_modules/@zag-js/avatar/dist/index.js +12 -10
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +99 -92
- package/dist/node_modules/@zag-js/collapsible/dist/index.js +5 -5
- package/dist/node_modules/@zag-js/collection/dist/index.js +21 -21
- package/dist/node_modules/@zag-js/combobox/dist/index.js +30 -31
- package/dist/node_modules/@zag-js/core/dist/index.js +285 -320
- package/dist/node_modules/@zag-js/dialog/dist/index.js +56 -62
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +3 -3
- package/dist/node_modules/@zag-js/dom-event/dist/index.js +88 -115
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +2 -2
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +73 -0
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +33 -33
- package/dist/node_modules/@zag-js/menu/dist/index.js +81 -77
- package/dist/node_modules/@zag-js/popper/dist/index.js +86 -79
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +116 -109
- package/dist/node_modules/@zag-js/react/dist/index.js +44 -43
- package/dist/node_modules/@zag-js/select/dist/index.js +203 -231
- package/dist/node_modules/@zag-js/store/dist/index.js +110 -110
- package/dist/node_modules/@zag-js/switch/dist/index.js +62 -55
- package/dist/node_modules/@zag-js/tabs/dist/index.js +64 -61
- package/dist/node_modules/@zag-js/toast/dist/index.js +174 -173
- package/dist/node_modules/@zag-js/utils/dist/index.js +93 -71
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +217 -219
- package/dist/preset.d.ts +807 -4
- package/dist/{ui/styled-system → styled-system}/css/css.js +5 -6
- package/dist/{ui/styled-system → styled-system}/css/cva.js +4 -4
- package/dist/{ui/styled-system → styled-system}/css/sva.js +3 -3
- package/dist/styled-system/jsx/is-valid-prop.js +6 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/getToken.d.ts +324 -3
- package/dist/tokens/index.d.ts +806 -3
- package/package.json +32 -5
- package/styled-system/css/css.js +1 -1
- package/styled-system/jsx/is-valid-prop.js +1 -1
- package/styled-system/themes/theme-asagi.json +1 -1
- package/styled-system/themes/theme-kurikawa.json +1 -1
- package/styled-system/themes/theme-sumire.json +1 -1
- package/styled-system/themes/theme-tsutsuji.json +1 -1
- package/styled-system/tokens/index.js +1238 -54
- package/styled-system/tokens/tokens.d.ts +3 -3
- package/styled-system/types/conditions.d.ts +2 -2
- package/styled-system/types/prop-type.d.ts +1 -1
- package/dist/ui/styled-system/jsx/is-valid-prop.js +0 -6
- /package/dist/{ui/styled-system → styled-system}/css/conditions.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/css/cx.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/helpers.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/box.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/factory-helper.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/jsx/factory.js +0 -0
- /package/dist/{ui/styled-system → styled-system}/patterns/box.js +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as m } from "react";
|
|
4
3
|
import { ark as s } from "../factory.js";
|
|
5
4
|
import { usePresenceContext as i } from "../presence/use-presence-context.js";
|
|
6
5
|
import { useMenuContext as p } from "./use-menu-context.js";
|
|
7
6
|
import { mergeProps as u } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
|
-
const f = m((
|
|
9
|
-
const o = p(), t = u(o.getPositionerProps(),
|
|
10
|
-
return i().unmounted ? null : /* @__PURE__ */ n(s.div, { ...t, ref:
|
|
7
|
+
const f = m((e, r) => {
|
|
8
|
+
const o = p(), t = u(o.getPositionerProps(), e);
|
|
9
|
+
return i().unmounted ? null : /* @__PURE__ */ n(s.div, { ...t, ref: r });
|
|
11
10
|
});
|
|
12
11
|
f.displayName = "MenuPositioner";
|
|
13
12
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { useCallback as l } from "react";
|
|
4
3
|
import { createSplitProps as P } from "../../utils/create-split-props.js";
|
|
5
4
|
import { useEffectOnce as f } from "../../utils/use-effect-once.js";
|
|
@@ -11,7 +10,7 @@ import { useMenuContext as v, MenuProvider as C } from "./use-menu-context.js";
|
|
|
11
10
|
import { useMenuMachineContext as O, MenuMachineProvider as x } from "./use-menu-machine-context.js";
|
|
12
11
|
import { MenuTriggerItemProvider as I } from "./use-menu-trigger-item-context.js";
|
|
13
12
|
import { mergeProps as S } from "../../../../../@zag-js/core/dist/index.js";
|
|
14
|
-
const
|
|
13
|
+
const V = (i) => {
|
|
15
14
|
const [s, p] = h(i), [c, m] = P()(p, [
|
|
16
15
|
"anchorPoint",
|
|
17
16
|
"aria-label",
|
|
@@ -43,5 +42,5 @@ const q = (i) => {
|
|
|
43
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 }) }) }) });
|
|
44
43
|
};
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
V as MenuRoot
|
|
47
46
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef as s } from "react";
|
|
4
3
|
import { ark as i } from "../factory.js";
|
|
5
4
|
import { usePresenceContext as p } from "../presence/use-presence-context.js";
|
|
6
5
|
import { useMenuContext as g } from "./use-menu-context.js";
|
|
7
6
|
import { mergeProps as u } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
7
|
const a = s((o, e) => {
|
|
9
|
-
const r = g(), t = p(),
|
|
8
|
+
const r = g(), t = p(), n = u(
|
|
10
9
|
{
|
|
11
10
|
...r.getTriggerProps(),
|
|
12
11
|
"aria-controls": t.unmounted ? void 0 : r.getTriggerProps()["aria-controls"]
|
|
13
12
|
},
|
|
14
13
|
o
|
|
15
14
|
);
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ m(i.button, { ...n, ref: e });
|
|
17
16
|
});
|
|
18
17
|
a.displayName = "MenuTrigger";
|
|
19
18
|
export {
|
package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef as i } from "react";
|
|
4
3
|
import { ark as s } from "../factory.js";
|
|
5
4
|
import { useRadioGroupContext as n } from "./use-radio-group-context.js";
|
|
@@ -7,8 +6,8 @@ import { useRadioGroupItemPropsContext as a } from "./use-radio-group-item-props
|
|
|
7
6
|
import { mergeProps as d } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
7
|
const f = i(
|
|
9
8
|
(o, r) => {
|
|
10
|
-
const t = n(), m = a(),
|
|
11
|
-
return /* @__PURE__ */
|
|
9
|
+
const t = n(), m = a(), e = d(t.getItemControlProps(m), o);
|
|
10
|
+
return /* @__PURE__ */ p(s.div, { ...e, ref: r });
|
|
12
11
|
}
|
|
13
12
|
);
|
|
14
13
|
f.displayName = "RadioGroupItemControl";
|
package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { ark as s } from "../factory.js";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { ark as i } from "../factory.js";
|
|
5
4
|
import { useRadioGroupContext as a } from "./use-radio-group-context.js";
|
|
6
5
|
import { useRadioGroupItemPropsContext as d } from "./use-radio-group-item-props-context.js";
|
|
7
6
|
import { mergeProps as f } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
|
-
const n =
|
|
7
|
+
const n = s(
|
|
9
8
|
(o, r) => {
|
|
10
9
|
const t = a(), e = d(), m = f(t.getItemTextProps(e), o);
|
|
11
|
-
return /* @__PURE__ */ p(
|
|
10
|
+
return /* @__PURE__ */ p(i.span, { ...m, ref: r });
|
|
12
11
|
}
|
|
13
12
|
);
|
|
14
13
|
n.displayName = "RadioGroupItemText";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as d } from "react";
|
|
4
3
|
import { createSplitProps as s } from "../../utils/create-split-props.js";
|
|
5
4
|
import { ark as l } from "../factory.js";
|
|
@@ -7,12 +6,12 @@ import { useRadioGroupContext as u } from "./use-radio-group-context.js";
|
|
|
7
6
|
import { RadioGroupItemProvider as f } from "./use-radio-group-item-context.js";
|
|
8
7
|
import { RadioGroupItemPropsProvider as n } from "./use-radio-group-item-props-context.js";
|
|
9
8
|
import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
|
|
10
|
-
const P = d((
|
|
11
|
-
const [o, i] = s()(
|
|
9
|
+
const P = d((t, m) => {
|
|
10
|
+
const [o, i] = s()(t, [
|
|
12
11
|
"value",
|
|
13
12
|
"disabled",
|
|
14
13
|
"invalid"
|
|
15
|
-
]),
|
|
14
|
+
]), e = u(), p = c(e.getItemProps(o), i), a = e.getItemState(o);
|
|
16
15
|
return /* @__PURE__ */ r(f, { value: a, children: /* @__PURE__ */ r(n, { value: o, children: /* @__PURE__ */ r(l.label, { ...p, ref: m }) }) });
|
|
17
16
|
});
|
|
18
17
|
P.displayName = "RadioGroupItem";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as m } from "react";
|
|
4
3
|
import { createSplitProps as d } from "../../utils/create-split-props.js";
|
|
5
4
|
import { ark as s } from "../factory.js";
|
|
@@ -7,7 +6,7 @@ import { useRadioGroup as u } from "./use-radio-group.js";
|
|
|
7
6
|
import { RadioGroupProvider as l } from "./use-radio-group-context.js";
|
|
8
7
|
import { mergeProps as n } from "../../../../../@zag-js/core/dist/index.js";
|
|
9
8
|
const f = m((e, i) => {
|
|
10
|
-
const [
|
|
9
|
+
const [a, p] = d()(e, [
|
|
11
10
|
"defaultValue",
|
|
12
11
|
"disabled",
|
|
13
12
|
"form",
|
|
@@ -18,8 +17,8 @@ const f = m((e, i) => {
|
|
|
18
17
|
"orientation",
|
|
19
18
|
"readOnly",
|
|
20
19
|
"value"
|
|
21
|
-
]), o = u(
|
|
22
|
-
return /* @__PURE__ */ r(l, { value: o, children: /* @__PURE__ */ r(s.div, { ...
|
|
20
|
+
]), o = u(a), t = n(o.getRootProps(), p);
|
|
21
|
+
return /* @__PURE__ */ r(l, { value: o, children: /* @__PURE__ */ r(s.div, { ...t, ref: i }) });
|
|
23
22
|
});
|
|
24
23
|
f.displayName = "RadioGroupRoot";
|
|
25
24
|
export {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as s } from "react";
|
|
4
3
|
import { ark as p } from "../factory.js";
|
|
5
4
|
import { usePresenceContext as c } from "../presence/use-presence-context.js";
|
|
6
|
-
import { useSelectContext as
|
|
7
|
-
import { mergeProps as
|
|
5
|
+
import { useSelectContext as f } from "./use-select-context.js";
|
|
6
|
+
import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
7
|
const l = s((t, r) => {
|
|
9
|
-
const o =
|
|
8
|
+
const o = f(), e = c(), n = i(o.getContentProps(), e.getPresenceProps(r), t);
|
|
10
9
|
return e.unmounted ? null : /* @__PURE__ */ m(p.div, { ...n });
|
|
11
10
|
});
|
|
12
11
|
l.displayName = "SelectContent";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as p } from "react";
|
|
4
3
|
import { ark as s } from "../factory.js";
|
|
5
|
-
import { useSelectContext as
|
|
6
|
-
import { mergeProps as
|
|
7
|
-
const
|
|
8
|
-
const t =
|
|
4
|
+
import { useSelectContext as l } from "./use-select-context.js";
|
|
5
|
+
import { mergeProps as n } from "../../../../../@zag-js/core/dist/index.js";
|
|
6
|
+
const c = p((o, r) => {
|
|
7
|
+
const t = l(), e = n(t.getControlProps(), o);
|
|
9
8
|
return /* @__PURE__ */ m(s.div, { ...e, ref: r });
|
|
10
9
|
});
|
|
11
|
-
|
|
10
|
+
c.displayName = "SelectControl";
|
|
12
11
|
export {
|
|
13
|
-
|
|
12
|
+
c as SelectControl
|
|
14
13
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { ark as l } from "../factory.js";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { ark as p } from "../factory.js";
|
|
5
4
|
import { useSelectContext as s } from "./use-select-context.js";
|
|
6
5
|
import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
|
-
const c =
|
|
6
|
+
const c = l((e, r) => {
|
|
8
7
|
const o = s(), t = a(o.getLabelProps(), e);
|
|
9
|
-
return /* @__PURE__ */ m(
|
|
8
|
+
return /* @__PURE__ */ m(p.label, { ...t, ref: r });
|
|
10
9
|
});
|
|
11
10
|
c.displayName = "SelectLabel";
|
|
12
11
|
export {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { ark as n } from "../factory.js";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { ark as m } from "../factory.js";
|
|
5
4
|
import { usePresenceContext as i } from "../presence/use-presence-context.js";
|
|
6
5
|
import { useSelectContext as p } from "./use-select-context.js";
|
|
7
6
|
import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
|
-
const f =
|
|
7
|
+
const f = n((e, r) => {
|
|
9
8
|
const o = p(), t = c(o.getPositionerProps(), e);
|
|
10
|
-
return i().unmounted ? null : /* @__PURE__ */ s(
|
|
9
|
+
return i().unmounted ? null : /* @__PURE__ */ s(m.div, { ...t, ref: r });
|
|
11
10
|
});
|
|
12
11
|
f.displayName = "SelectPositioner";
|
|
13
12
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as a } from "react";
|
|
4
3
|
import { createSplitProps as d } from "../../utils/create-split-props.js";
|
|
5
4
|
import { ark as u } from "../factory.js";
|
|
@@ -9,12 +8,13 @@ import { PresenceProvider as g } from "../presence/use-presence-context.js";
|
|
|
9
8
|
import { useSelect as h } from "./use-select.js";
|
|
10
9
|
import { SelectProvider as S } from "./use-select-context.js";
|
|
11
10
|
import { mergeProps as r } from "../../../../../@zag-js/core/dist/index.js";
|
|
12
|
-
const v = (t,
|
|
13
|
-
const [
|
|
11
|
+
const v = (t, s) => {
|
|
12
|
+
const [i, n] = f(t), [l, p] = d()(n, [
|
|
14
13
|
"closeOnSelect",
|
|
15
14
|
"composite",
|
|
16
15
|
"defaultOpen",
|
|
17
16
|
"defaultValue",
|
|
17
|
+
"deselectable",
|
|
18
18
|
"disabled",
|
|
19
19
|
"form",
|
|
20
20
|
"highlightedValue",
|
|
@@ -40,9 +40,9 @@ const v = (t, i) => {
|
|
|
40
40
|
"required",
|
|
41
41
|
"scrollToIndexFn",
|
|
42
42
|
"value"
|
|
43
|
-
]), e = h(l),
|
|
44
|
-
return /* @__PURE__ */ o(S, { value: e, children: /* @__PURE__ */ o(g, { value:
|
|
45
|
-
},
|
|
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);
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
D as SelectRoot
|
|
48
48
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as p } from "react";
|
|
4
|
-
import { ark as
|
|
5
|
-
import { useSelectContext as
|
|
6
|
-
import { mergeProps as
|
|
3
|
+
import { ark as s } from "../factory.js";
|
|
4
|
+
import { useSelectContext as g } from "./use-select-context.js";
|
|
5
|
+
import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const c = p((r, e) => {
|
|
8
|
-
const o =
|
|
9
|
-
return /* @__PURE__ */ m(
|
|
7
|
+
const o = g(), t = i(o.getTriggerProps(), r);
|
|
8
|
+
return /* @__PURE__ */ m(s.button, { ...t, ref: e });
|
|
10
9
|
});
|
|
11
10
|
c.displayName = "SelectTrigger";
|
|
12
11
|
export {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef as c } from "react";
|
|
4
3
|
import { ark as a } from "../factory.js";
|
|
5
|
-
import { useSelectContext as
|
|
6
|
-
import { mergeProps as
|
|
4
|
+
import { useSelectContext as n } from "./use-select-context.js";
|
|
5
|
+
import { mergeProps as i } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const f = c((r, o) => {
|
|
8
|
-
const { children: t, placeholder: l, ...p } = r, e =
|
|
9
|
-
return /* @__PURE__ */
|
|
7
|
+
const { children: t, placeholder: l, ...p } = r, e = n(), s = i(e.getValueTextProps(), p);
|
|
8
|
+
return /* @__PURE__ */ m(a.span, { ...s, ref: o, children: t || e.valueAsString || l });
|
|
10
9
|
});
|
|
11
10
|
f.displayName = "SelectValueText";
|
|
12
11
|
export {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { useMachine as
|
|
2
|
-
import { collection as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { useEnvironmentContext as
|
|
5
|
-
import { useLocaleContext as
|
|
6
|
-
import { createSplitProps as
|
|
7
|
-
import { useEvent as
|
|
8
|
-
import { useFieldContext as
|
|
9
|
-
const
|
|
10
|
-
const [
|
|
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
11
|
"isItemDisabled",
|
|
12
12
|
"itemToValue",
|
|
13
13
|
"itemToString",
|
|
14
14
|
"items"
|
|
15
|
-
]),
|
|
16
|
-
() =>
|
|
17
|
-
Object.values(
|
|
18
|
-
),
|
|
19
|
-
id:
|
|
15
|
+
]), t = b(
|
|
16
|
+
() => v(i),
|
|
17
|
+
Object.values(i)
|
|
18
|
+
), a = V(), s = S(), e = E(), c = {
|
|
19
|
+
id: x(),
|
|
20
20
|
ids: {
|
|
21
21
|
label: e == null ? void 0 : e.ids.label,
|
|
22
22
|
hiddenSelect: e == null ? void 0 : e.ids.control
|
|
@@ -25,25 +25,29 @@ const j = (o) => {
|
|
|
25
25
|
readOnly: e == null ? void 0 : e.readOnly,
|
|
26
26
|
invalid: e == null ? void 0 : e.invalid,
|
|
27
27
|
required: e == null ? void 0 : e.required,
|
|
28
|
-
dir:
|
|
29
|
-
getRootNode:
|
|
30
|
-
collection:
|
|
28
|
+
dir: a.dir,
|
|
29
|
+
getRootNode: s.getRootNode,
|
|
30
|
+
collection: t,
|
|
31
31
|
open: o.defaultOpen,
|
|
32
32
|
value: o.defaultValue,
|
|
33
33
|
"open.controlled": o.open !== void 0,
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
...c
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
|
|
34
|
+
...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;
|
|
46
50
|
};
|
|
47
51
|
export {
|
|
48
|
-
|
|
52
|
+
z as useSelect
|
|
49
53
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as p } from "react";
|
|
4
|
-
import { ark as
|
|
5
|
-
import { useSwitchContext as
|
|
3
|
+
import { ark as s } from "../factory.js";
|
|
4
|
+
import { useSwitchContext as i } from "./use-switch-context.js";
|
|
6
5
|
import { mergeProps as n } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const c = p((o, r) => {
|
|
8
|
-
const t =
|
|
9
|
-
return /* @__PURE__ */ e(
|
|
7
|
+
const t = i(), m = n(t.getControlProps(), o);
|
|
8
|
+
return /* @__PURE__ */ e(s.span, { ...m, ref: r });
|
|
10
9
|
});
|
|
11
10
|
c.displayName = "SwitchControl";
|
|
12
11
|
export {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { ark as n } from "../factory.js";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { ark as p } from "../factory.js";
|
|
5
4
|
import { useFieldContext as s } from "../field/use-field-context.js";
|
|
6
5
|
import { useSwitchContext as d } from "./use-switch-context.js";
|
|
7
6
|
import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
|
-
const a =
|
|
7
|
+
const a = n(
|
|
9
8
|
(t, o) => {
|
|
10
9
|
const e = d(), i = c(e.getHiddenInputProps(), t), r = s();
|
|
11
|
-
return /* @__PURE__ */ m(
|
|
10
|
+
return /* @__PURE__ */ m(p.input, { "aria-describedby": r == null ? void 0 : r.ariaDescribedby, ...i, ref: o });
|
|
12
11
|
}
|
|
13
12
|
);
|
|
14
13
|
a.displayName = "SwitchHiddenInput";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as p } from "react";
|
|
4
|
-
import { ark as
|
|
5
|
-
import { useSwitchContext as
|
|
3
|
+
import { ark as s } from "../factory.js";
|
|
4
|
+
import { useSwitchContext as i } from "./use-switch-context.js";
|
|
6
5
|
import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const c = p((r, o) => {
|
|
8
|
-
const t =
|
|
9
|
-
return /* @__PURE__ */ m(
|
|
7
|
+
const t = i(), e = a(t.getLabelProps(), r);
|
|
8
|
+
return /* @__PURE__ */ m(s.span, { ...e, ref: o });
|
|
10
9
|
});
|
|
11
10
|
c.displayName = "SwitchLabel";
|
|
12
11
|
export {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useSwitch as d } from "./use-switch.js";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { createSplitProps as a } from "../../utils/create-split-props.js";
|
|
4
|
+
import { ark as d } from "../factory.js";
|
|
5
|
+
import { useSwitch as p } from "./use-switch.js";
|
|
7
6
|
import { SwitchProvider as l } from "./use-switch-context.js";
|
|
8
7
|
import { mergeProps as n } from "../../../../../@zag-js/core/dist/index.js";
|
|
9
|
-
const f =
|
|
10
|
-
const [i, m] =
|
|
8
|
+
const f = s((e, t) => {
|
|
9
|
+
const [i, m] = a()(e, [
|
|
11
10
|
"checked",
|
|
12
11
|
"defaultChecked",
|
|
13
12
|
"disabled",
|
|
@@ -21,8 +20,8 @@ const f = p((e, t) => {
|
|
|
21
20
|
"readOnly",
|
|
22
21
|
"required",
|
|
23
22
|
"value"
|
|
24
|
-
]), o =
|
|
25
|
-
return /* @__PURE__ */ r(l, { value: o, children: /* @__PURE__ */ r(
|
|
23
|
+
]), o = p(i), c = n(o.getRootProps(), m);
|
|
24
|
+
return /* @__PURE__ */ r(l, { value: o, children: /* @__PURE__ */ r(d.label, { ...c, ref: t }) });
|
|
26
25
|
});
|
|
27
26
|
f.displayName = "SwitchRoot";
|
|
28
27
|
export {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as p } from "react";
|
|
4
|
-
import { ark as
|
|
5
|
-
import { useSwitchContext as
|
|
3
|
+
import { ark as s } from "../factory.js";
|
|
4
|
+
import { useSwitchContext as i } from "./use-switch-context.js";
|
|
6
5
|
import { mergeProps as c } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const f = p((r, o) => {
|
|
8
|
-
const t =
|
|
9
|
-
return /* @__PURE__ */ e(
|
|
7
|
+
const t = i(), m = c(t.getThumbProps(), r);
|
|
8
|
+
return /* @__PURE__ */ e(s.span, { ...m, ref: o });
|
|
10
9
|
});
|
|
11
10
|
f.displayName = "SwitchThumb";
|
|
12
11
|
export {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef as e } from "react";
|
|
4
3
|
import { ark as i } from "../factory.js";
|
|
5
4
|
import { useTabsContext as p } from "./use-tabs-context.js";
|
|
6
5
|
import { mergeProps as a } from "../../../../../@zag-js/core/dist/index.js";
|
|
7
6
|
const f = e((r, o) => {
|
|
8
|
-
const t = p(),
|
|
9
|
-
return /* @__PURE__ */
|
|
7
|
+
const t = p(), s = a(t.getListProps(), r);
|
|
8
|
+
return /* @__PURE__ */ m(i.div, { ...s, ref: o });
|
|
10
9
|
});
|
|
11
10
|
f.displayName = "TabList";
|
|
12
11
|
export {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
2
|
import { forwardRef as a } from "react";
|
|
4
3
|
import { createSplitProps as i } from "../../utils/create-split-props.js";
|
|
5
4
|
import { ark as g } from "../factory.js";
|
|
6
5
|
import { useTabsContext as f } from "./use-tabs-context.js";
|
|
7
6
|
import { mergeProps as b } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
7
|
const n = a((r, o) => {
|
|
9
|
-
const [t, e] = i()(r, ["disabled", "value"]),
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
const [t, e] = i()(r, ["disabled", "value"]), s = f(), m = b(s.getTriggerProps(t), e);
|
|
9
|
+
return /* @__PURE__ */ p(g.button, { ...m, ref: o });
|
|
11
10
|
});
|
|
12
11
|
n.displayName = "TabTrigger";
|
|
13
12
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as n } from "react";
|
|
4
|
-
import { createSplitProps as
|
|
5
|
-
import { splitRenderStrategyProps as
|
|
3
|
+
import { createSplitProps as l } from "../../utils/create-split-props.js";
|
|
4
|
+
import { splitRenderStrategyProps as d, RenderStrategyPropsProvider as c } from "../../utils/render-strategy.js";
|
|
6
5
|
import { ark as f } from "../factory.js";
|
|
7
6
|
import { useTabs as u } from "./use-tabs.js";
|
|
8
7
|
import { TabsProvider as P } from "./use-tabs-context.js";
|
|
9
|
-
import { mergeProps as
|
|
10
|
-
const
|
|
11
|
-
const [s, a] =
|
|
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, [
|
|
12
11
|
"activationMode",
|
|
13
12
|
"composite",
|
|
14
13
|
"defaultValue",
|
|
14
|
+
"deselectable",
|
|
15
15
|
"id",
|
|
16
16
|
"ids",
|
|
17
17
|
"loopFocus",
|
|
@@ -20,10 +20,10 @@ const b = n((t, e) => {
|
|
|
20
20
|
"orientation",
|
|
21
21
|
"translations",
|
|
22
22
|
"value"
|
|
23
|
-
]), r = u(p), m =
|
|
24
|
-
return /* @__PURE__ */ o(P, { value: r, children: /* @__PURE__ */ o(c, { value: s, children: /* @__PURE__ */ o(f.div, { ...m, ref:
|
|
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 }) }) });
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
g.displayName = "TabsRoot";
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
g as TabsRoot
|
|
29
29
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../../../../@zag-js/react/dist/index.js";
|
|
3
2
|
import { forwardRef as i } from "react";
|
|
4
3
|
import { useToastContext as p } from "./use-toast-context.js";
|
|
5
4
|
import { mergeProps as d } from "../../../../../@zag-js/core/dist/index.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useMachine as h,
|
|
3
|
-
import {
|
|
2
|
+
import { useMachine as h, normalizeProps as i, useActor as P } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
|
+
import { group as g, connect as v } from "../../../../../@zag-js/toast/dist/index.js";
|
|
4
4
|
import { forwardRef as T } from "react";
|
|
5
5
|
import { ark as x } from "../factory.js";
|
|
6
6
|
import { ToastProvider as y } from "./use-toast-context.js";
|
|
7
7
|
import { mergeProps as A } from "../../../../../@zag-js/core/dist/index.js";
|
|
8
8
|
const j = T((o, t) => {
|
|
9
|
-
const { toaster: e, children: r, ...p } = o, [s, d] = h(e.machine), c = s.context.placement, a =
|
|
9
|
+
const { toaster: e, children: r, ...p } = o, [s, d] = h(e.machine), c = s.context.placement, a = g.connect(s, d, i), l = a.getToastsByPlacement(c), f = A(a.getGroupProps({ placement: c }), p);
|
|
10
10
|
return /* @__PURE__ */ n(x.div, { ...f, ref: t, children: l.map((m) => /* @__PURE__ */ n(k, { value: m, children: (u) => r(u) }, m.id)) });
|
|
11
11
|
});
|
|
12
12
|
j.displayName = "Toaster";
|
|
13
13
|
const k = (o) => {
|
|
14
|
-
const [t, e] = P(o.value), r =
|
|
14
|
+
const [t, e] = P(o.value), r = v(t, e, i);
|
|
15
15
|
return /* @__PURE__ */ n(y, { value: r, children: o.children(t.context) });
|
|
16
16
|
};
|
|
17
17
|
export {
|