@serendie/ui 2.1.1 → 2.1.2-dev.202509020319
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/README.md +26 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +117 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.js +6 -8
- package/dist/components/Accordion/AccordionGroup.js +2 -6
- package/dist/components/Avatar/Avatar.js +11 -13
- package/dist/components/Badge/Badge.js +8 -10
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +6 -8
- package/dist/components/BottomNavigation/BottomNavigation.js +10 -11
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.js +6 -8
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +13 -15
- package/dist/components/CheckBox/CheckBox.js +10 -11
- package/dist/components/ChoiceBox/ChoiceBox.js +20 -22
- package/dist/components/DashboardWidget/DashboardWidget.js +11 -13
- package/dist/components/DataTable/table/BodyCell.js +2 -4
- package/dist/components/DataTable/table/HeaderCell.js +6 -7
- package/dist/components/DataTable/table/HeaderCheckbox.js +8 -9
- package/dist/components/DataTable/table/HeaderRow.js +2 -3
- package/dist/components/DataTable/table/Root.js +4 -6
- package/dist/components/DataTable/table/Row.js +2 -4
- package/dist/components/DataTable/table/Tr.js +6 -7
- package/dist/components/Divider/Divider.js +6 -8
- package/dist/components/Drawer/Drawer.js +11 -13
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +13 -15
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/IconButton/IconButton.js +6 -8
- package/dist/components/List/ListItem.js +7 -8
- package/dist/components/ModalDialog/ModalDialog.js +12 -14
- package/dist/components/NotificationBadge/NotificationBadge.js +6 -8
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.js +8 -10
- package/dist/components/ProgressIndicator/ProgressIndicator.js +9 -11
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +14 -15
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.js +17 -21
- package/dist/components/Select/Select.d.ts +3 -2
- package/dist/components/Select/Select.js +16 -17
- package/dist/components/Switch/Switch.js +13 -14
- package/dist/components/Tabs/TabItem.d.ts +1 -1
- package/dist/components/Tabs/TabItem.js +8 -10
- package/dist/components/Tabs/Tabs.js +8 -10
- package/dist/components/TextArea/TextArea.js +8 -10
- package/dist/components/TextField/TextField.js +6 -7
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +8 -10
- package/dist/components/Tooltip/Tooltip.js +17 -19
- package/dist/components/TopAppBar/TopAppBar.js +14 -16
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +2 -2
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +3 -3
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +3 -3
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +10 -10
- package/dist/node_modules/@zag-js/combobox/dist/index.js +4 -4
- package/dist/node_modules/@zag-js/menu/dist/index.js +31 -31
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +10 -10
- package/dist/node_modules/@zag-js/select/dist/index.js +11 -11
- package/dist/node_modules/@zag-js/switch/dist/index.js +10 -10
- package/dist/node_modules/@zag-js/tabs/dist/index.js +12 -12
- package/dist/node_modules/@zag-js/toast/dist/index.js +5 -5
- package/dist/node_modules/@zag-js/tooltip/dist/index.js +4 -4
- package/dist/styled-system/css/css.js +3 -3
- package/dist/styled-system/jsx/factory.js +12 -12
- package/dist/styled-system/patterns/box.js +3 -4
- package/package.json +9 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import v from "../../node_modules/merge-refs/dist/esm/index.js";
|
|
3
|
-
import
|
|
4
|
-
import "../../styled-system/css/
|
|
5
|
-
import { cx as
|
|
6
|
-
|
|
7
|
-
import { sva as C } from "../../styled-system/css/sva.js";
|
|
8
|
-
const c = C({
|
|
3
|
+
import c, { forwardRef as _ } from "react";
|
|
4
|
+
import { sva as w } from "../../styled-system/css/sva.js";
|
|
5
|
+
import { cx as C } from "../../styled-system/css/cx.js";
|
|
6
|
+
const p = w({
|
|
9
7
|
slots: [
|
|
10
8
|
"root",
|
|
11
9
|
"label",
|
|
@@ -97,7 +95,7 @@ const c = C({
|
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
|
-
}),
|
|
98
|
+
}), A = _(
|
|
101
99
|
({
|
|
102
100
|
placeholder: y,
|
|
103
101
|
label: r,
|
|
@@ -109,8 +107,8 @@ const c = C({
|
|
|
109
107
|
className: u,
|
|
110
108
|
...l
|
|
111
109
|
}, g) => {
|
|
112
|
-
const x =
|
|
113
|
-
return /* @__PURE__ */ i("div", { className:
|
|
110
|
+
const x = c.useRef(null), h = v(x, g), [b, f] = p.splitVariantProps(l), e = p(b), S = t || a && o, m = l.id || c.useId();
|
|
111
|
+
return /* @__PURE__ */ i("div", { className: C(e.root, u), children: [
|
|
114
112
|
r ? /* @__PURE__ */ i("label", { className: e.label, htmlFor: m, children: [
|
|
115
113
|
r,
|
|
116
114
|
d && /* @__PURE__ */ s("span", { className: e.required, children: "必須" })
|
|
@@ -143,5 +141,5 @@ const c = C({
|
|
|
143
141
|
}
|
|
144
142
|
);
|
|
145
143
|
export {
|
|
146
|
-
|
|
144
|
+
A as TextArea
|
|
147
145
|
};
|
|
@@ -2,11 +2,10 @@ import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { SerendieSymbolAlertCircle as P, SerendieSymbolClose as j } from "@serendie/symbols";
|
|
3
3
|
import q from "../../node_modules/merge-refs/dist/esm/index.js";
|
|
4
4
|
import m, { forwardRef as L } from "react";
|
|
5
|
+
import { sva as M } from "../../styled-system/css/sva.js";
|
|
6
|
+
import { cx as A } from "../../styled-system/css/cx.js";
|
|
5
7
|
import { css as v } from "../../styled-system/css/css.js";
|
|
6
|
-
|
|
7
|
-
import "../../styled-system/helpers.js";
|
|
8
|
-
import { sva as A } from "../../styled-system/css/sva.js";
|
|
9
|
-
const S = A({
|
|
8
|
+
const S = M({
|
|
10
9
|
slots: [
|
|
11
10
|
"root",
|
|
12
11
|
"label",
|
|
@@ -103,7 +102,7 @@ const S = A({
|
|
|
103
102
|
color: "sd.system.color.impression.negative"
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
|
-
}),
|
|
105
|
+
}), K = L(
|
|
107
106
|
({
|
|
108
107
|
placeholder: C,
|
|
109
108
|
label: c,
|
|
@@ -129,7 +128,7 @@ const S = A({
|
|
|
129
128
|
}, f = (i) => {
|
|
130
129
|
V(i.target.value), u && u(i);
|
|
131
130
|
};
|
|
132
|
-
return /* @__PURE__ */ n("div", { className:
|
|
131
|
+
return /* @__PURE__ */ n("div", { className: A(s.root, _), children: [
|
|
133
132
|
c ? /* @__PURE__ */ n("label", { className: s.label, htmlFor: x, children: [
|
|
134
133
|
c,
|
|
135
134
|
p && /* @__PURE__ */ e("span", { className: s.required, children: "必須" })
|
|
@@ -186,5 +185,5 @@ const S = A({
|
|
|
186
185
|
}
|
|
187
186
|
);
|
|
188
187
|
export {
|
|
189
|
-
|
|
188
|
+
K as TextField
|
|
190
189
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createToaster } from '@ark-ui/react';
|
|
2
|
-
export declare const ToastStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"
|
|
2
|
+
export declare const ToastStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"icon" | "text" | "root" | "textGroup", {
|
|
3
3
|
variant: {
|
|
4
4
|
default: {
|
|
5
5
|
root: {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { SerendieSymbolAlertCircleFilled as n, SerendieSymbolCheckCircleFilled as l } from "@serendie/symbols";
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../
|
|
5
|
-
import { sva as
|
|
6
|
-
import { createToaster as c } from "../../node_modules/@ark-ui/react/dist/components/toast/create-toaster.js";
|
|
7
|
-
import { Toaster as d } from "../../node_modules/@ark-ui/react/dist/components/toast/toaster.js";
|
|
3
|
+
import { createToaster as m } from "../../node_modules/@ark-ui/react/dist/components/toast/create-toaster.js";
|
|
4
|
+
import { Toaster as c } from "../../node_modules/@ark-ui/react/dist/components/toast/toaster.js";
|
|
5
|
+
import { sva as d } from "../../styled-system/css/sva.js";
|
|
8
6
|
import { ToastRoot as p } from "../../node_modules/@ark-ui/react/dist/components/toast/toast-root.js";
|
|
9
7
|
import { ToastTitle as y } from "../../node_modules/@ark-ui/react/dist/components/toast/toast-title.js";
|
|
10
|
-
const x =
|
|
8
|
+
const x = d({
|
|
11
9
|
slots: ["root", "textGroup", "text", "icon"],
|
|
12
10
|
base: {
|
|
13
11
|
root: {
|
|
@@ -64,9 +62,9 @@ const x = m({
|
|
|
64
62
|
defaultVariants: {
|
|
65
63
|
variant: "default"
|
|
66
64
|
}
|
|
67
|
-
}),
|
|
65
|
+
}), T = m({
|
|
68
66
|
placement: "bottom"
|
|
69
|
-
}),
|
|
67
|
+
}), C = ({ toaster: r }) => /* @__PURE__ */ o(c, { toaster: r, children: (t) => {
|
|
70
68
|
const s = t.type === "error" ? "error" : "default", e = x({ variant: s }), i = s === "error" ? /* @__PURE__ */ o(n, { className: e.icon }) : /* @__PURE__ */ o(l, { className: e.icon });
|
|
71
69
|
return /* @__PURE__ */ o(p, { className: e.root, children: /* @__PURE__ */ a("div", { className: e.textGroup, children: [
|
|
72
70
|
i,
|
|
@@ -74,7 +72,7 @@ const x = m({
|
|
|
74
72
|
] }) }, t.id);
|
|
75
73
|
} });
|
|
76
74
|
export {
|
|
77
|
-
|
|
75
|
+
C as Toast,
|
|
78
76
|
x as ToastStyle,
|
|
79
|
-
|
|
77
|
+
T as toaster
|
|
80
78
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "../../styled-system/css/
|
|
3
|
-
import {
|
|
4
|
-
import "../../
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { TooltipPositioner as g } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js";
|
|
9
|
-
import { TooltipContent as h } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js";
|
|
2
|
+
import { sva as y } from "../../styled-system/css/sva.js";
|
|
3
|
+
import { TooltipRoot as f } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-root.js";
|
|
4
|
+
import { TooltipTrigger as w } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-trigger.js";
|
|
5
|
+
import { TooltipPositioner as T } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-positioner.js";
|
|
6
|
+
import { TooltipContent as g } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-content.js";
|
|
7
|
+
import { cx as h } from "../../styled-system/css/cx.js";
|
|
10
8
|
import { TooltipArrow as u } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow.js";
|
|
11
9
|
import { TooltipArrowTip as S } from "../../node_modules/@ark-ui/react/dist/components/tooltip/tooltip-arrow-tip.js";
|
|
12
|
-
const t =
|
|
10
|
+
const t = y({
|
|
13
11
|
slots: ["content", "arrow", "arrowTip"],
|
|
14
12
|
base: {
|
|
15
13
|
content: {
|
|
@@ -34,25 +32,25 @@ const t = f({
|
|
|
34
32
|
children: i,
|
|
35
33
|
placement: a = "top",
|
|
36
34
|
openDelay: n = 700,
|
|
37
|
-
closeDelay:
|
|
38
|
-
disabled:
|
|
39
|
-
className:
|
|
35
|
+
closeDelay: l = 300,
|
|
36
|
+
disabled: m = !1,
|
|
37
|
+
className: p,
|
|
40
38
|
...d
|
|
41
39
|
}) => {
|
|
42
40
|
const [c, x] = t.splitVariantProps(d), r = t(c);
|
|
43
41
|
return /* @__PURE__ */ s(
|
|
44
|
-
|
|
42
|
+
f,
|
|
45
43
|
{
|
|
46
44
|
openDelay: n,
|
|
47
|
-
closeDelay:
|
|
45
|
+
closeDelay: l,
|
|
48
46
|
positioning: { placement: a, arrowPadding: 8 },
|
|
49
|
-
disabled:
|
|
47
|
+
disabled: m,
|
|
50
48
|
children: [
|
|
51
|
-
/* @__PURE__ */ o(
|
|
52
|
-
/* @__PURE__ */ o(
|
|
53
|
-
|
|
49
|
+
/* @__PURE__ */ o(w, { asChild: !0, children: i }),
|
|
50
|
+
/* @__PURE__ */ o(T, { children: /* @__PURE__ */ s(
|
|
51
|
+
g,
|
|
54
52
|
{
|
|
55
|
-
className:
|
|
53
|
+
className: h(r.content, p),
|
|
56
54
|
...x,
|
|
57
55
|
children: [
|
|
58
56
|
/* @__PURE__ */ o(u, { className: r.arrow, children: /* @__PURE__ */ o(S, { className: r.arrowTip }) }),
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
3
|
-
import { cx as d } from "../../styled-system/css/cx.js";
|
|
4
|
-
import "../../styled-system/helpers.js";
|
|
2
|
+
import { NotificationBadge as d } from "../NotificationBadge/NotificationBadge.js";
|
|
5
3
|
import { sva as y } from "../../styled-system/css/sva.js";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
4
|
+
import { cx as x } from "../../styled-system/css/cx.js";
|
|
5
|
+
const n = y({
|
|
8
6
|
slots: ["root", "container", "left", "buttonContainer", "title"],
|
|
9
7
|
base: {
|
|
10
8
|
root: {
|
|
@@ -56,23 +54,23 @@ const i = y({
|
|
|
56
54
|
defaultVariants: {
|
|
57
55
|
type: "navbar"
|
|
58
56
|
}
|
|
59
|
-
}),
|
|
60
|
-
headingIconButton:
|
|
61
|
-
trailingIconButtons:
|
|
57
|
+
}), v = ({
|
|
58
|
+
headingIconButton: i,
|
|
59
|
+
trailingIconButtons: s,
|
|
62
60
|
badge: a,
|
|
63
|
-
title:
|
|
61
|
+
title: r,
|
|
64
62
|
...l
|
|
65
63
|
}) => {
|
|
66
|
-
const [p, { className: c, ...m }] =
|
|
67
|
-
return /* @__PURE__ */ e("nav", { className:
|
|
64
|
+
const [p, { className: c, ...m }] = n.splitVariantProps(l), t = n(p);
|
|
65
|
+
return /* @__PURE__ */ e("nav", { className: x(t.root, c), ...m, children: /* @__PURE__ */ o("div", { className: t.container, children: [
|
|
68
66
|
/* @__PURE__ */ o("div", { className: t.left, children: [
|
|
69
|
-
/* @__PURE__ */ e("div", { className: t.buttonContainer, children:
|
|
70
|
-
/* @__PURE__ */ e("h1", { className: t.title, children:
|
|
71
|
-
a && /* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e("div", { className: t.buttonContainer, children: i }),
|
|
68
|
+
/* @__PURE__ */ e("h1", { className: t.title, children: r }),
|
|
69
|
+
a && /* @__PURE__ */ e(d, { count: a, position: "relative" })
|
|
72
70
|
] }),
|
|
73
|
-
/* @__PURE__ */ e("div", { className: t.buttonContainer, children:
|
|
71
|
+
/* @__PURE__ */ e("div", { className: t.buttonContainer, children: s })
|
|
74
72
|
] }) });
|
|
75
73
|
};
|
|
76
74
|
export {
|
|
77
|
-
|
|
75
|
+
v as TopAppBar
|
|
78
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as m, machine as s } from "../../../../../@zag-js/avatar/dist/index.js";
|
|
2
2
|
import { useMachine as i, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
4
|
import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
|
|
@@ -9,8 +9,8 @@ const C = (o) => {
|
|
|
9
9
|
dir: r,
|
|
10
10
|
getRootNode: e,
|
|
11
11
|
...o
|
|
12
|
-
}, c = i(
|
|
13
|
-
return
|
|
12
|
+
}, c = i(s, n);
|
|
13
|
+
return m(c, p);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
C as useAvatar
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as a, machine as u } from "../../../../../@zag-js/checkbox/dist/index.js";
|
|
2
2
|
import { useMachine as p, normalizeProps as d } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useMemo as v, useId as x } from "react";
|
|
4
4
|
import { useEnvironmentContext as C } from "../../providers/environment/use-environment-context.js";
|
|
@@ -20,8 +20,8 @@ const E = (t = {}) => {
|
|
|
20
20
|
required: o == null ? void 0 : o.required,
|
|
21
21
|
getRootNode: s,
|
|
22
22
|
...e
|
|
23
|
-
}, c = p(
|
|
24
|
-
return
|
|
23
|
+
}, c = p(u, i);
|
|
24
|
+
return a(c, d);
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
27
|
E as useCheckbox
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as m, machine as s } from "../../../../../@zag-js/dialog/dist/index.js";
|
|
2
2
|
import { useMachine as c, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
4
|
import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
|
|
@@ -9,8 +9,8 @@ const v = (o) => {
|
|
|
9
9
|
getRootNode: e,
|
|
10
10
|
dir: r,
|
|
11
11
|
...o
|
|
12
|
-
}, i = c(
|
|
13
|
-
return
|
|
12
|
+
}, i = c(s, n);
|
|
13
|
+
return m(i, p);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
v as useDialog
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as s, machine as c } from "../../../../../@zag-js/menu/dist/index.js";
|
|
2
2
|
import { useMachine as m, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
4
|
import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
|
|
@@ -9,8 +9,8 @@ const M = (t) => {
|
|
|
9
9
|
dir: r,
|
|
10
10
|
getRootNode: n,
|
|
11
11
|
...t
|
|
12
|
-
}, o = m(
|
|
13
|
-
return { api:
|
|
12
|
+
}, o = m(c, i);
|
|
13
|
+
return { api: s(o, p), service: o };
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
M as useMenu
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as m, machine as s } from "../../../../../@zag-js/pagination/dist/index.js";
|
|
2
2
|
import { useMachine as c, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
4
|
import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
|
|
@@ -9,8 +9,8 @@ const l = (o) => {
|
|
|
9
9
|
dir: n,
|
|
10
10
|
getRootNode: e,
|
|
11
11
|
...o
|
|
12
|
-
}, i = c(
|
|
13
|
-
return
|
|
12
|
+
}, i = c(s, r);
|
|
13
|
+
return m(i, p);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
l as usePagination
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as f, machine as d } from "../../../../../@zag-js/presence/dist/index.js";
|
|
2
2
|
import { useMachine as l } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useRef as E } from "react";
|
|
4
4
|
import { useEvent as P } from "../../utils/use-event.js";
|
|
@@ -7,7 +7,7 @@ const k = (n = {}) => {
|
|
|
7
7
|
...i,
|
|
8
8
|
present: r,
|
|
9
9
|
onExitComplete: P(n.onExitComplete)
|
|
10
|
-
}, m = l(
|
|
10
|
+
}, m = l(d, p), e = f(m);
|
|
11
11
|
e.present && (t.current = !0);
|
|
12
12
|
const u = !e.present && !t.current && s || o && !e.present && t.current, a = () => ({
|
|
13
13
|
"data-state": e.skip && c ? void 0 : r ? "open" : "closed",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { connect as m, machine as s } from "../../../../../@zag-js/radio-group/dist/index.js";
|
|
2
2
|
import { useMachine as c, normalizeProps as p } from "../../../../../@zag-js/react/dist/index.js";
|
|
3
3
|
import { useId as u } from "react";
|
|
4
4
|
import { useEnvironmentContext as a } from "../../providers/environment/use-environment-context.js";
|
|
@@ -9,8 +9,8 @@ const C = (o) => {
|
|
|
9
9
|
dir: r,
|
|
10
10
|
getRootNode: e,
|
|
11
11
|
...o
|
|
12
|
-
}, i = c(
|
|
13
|
-
return
|
|
12
|
+
}, i = c(s, n);
|
|
13
|
+
return m(i, p);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
C as useRadioGroup
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMachine as c, normalizeProps as m } from "../../../../../@zag-js/react/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { connect as a, machine as p } from "../../../../../@zag-js/switch/dist/index.js";
|
|
3
3
|
import { useId as u } from "react";
|
|
4
4
|
import { useEnvironmentContext as d } from "../../providers/environment/use-environment-context.js";
|
|
5
5
|
import { useLocaleContext as h } from "../../providers/locale/use-locale-context.js";
|
|
@@ -18,8 +18,8 @@ const I = (r) => {
|
|
|
18
18
|
required: o == null ? void 0 : o.required,
|
|
19
19
|
getRootNode: n,
|
|
20
20
|
...r
|
|
21
|
-
}, i = c(
|
|
22
|
-
return
|
|
21
|
+
}, i = c(p, s);
|
|
22
|
+
return a(i, m);
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
25
|
I as useSwitch
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMachine as m, normalizeProps as c } from "../../../../../@zag-js/react/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { connect as i, machine as p } from "../../../../../@zag-js/tabs/dist/index.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
4
|
import { useEnvironmentContext as u } from "../../providers/environment/use-environment-context.js";
|
|
5
5
|
import { useLocaleContext as f } from "../../providers/locale/use-locale-context.js";
|
|
@@ -9,8 +9,8 @@ const C = (o) => {
|
|
|
9
9
|
dir: r,
|
|
10
10
|
getRootNode: e,
|
|
11
11
|
...o
|
|
12
|
-
}, s = m(
|
|
13
|
-
return
|
|
12
|
+
}, s = m(p, n);
|
|
13
|
+
return i(s, c);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
C as useTabs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnatomy as I } from "../../anatomy/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { dataAttr as o, visuallyHiddenStyle as P, getEventTarget as S, dispatchInputCheckedEvent as F, setElementChecked as N, trackFormControl as D, trackPress as O } from "../../dom-query/dist/index.js";
|
|
3
|
+
import { isFocusVisible as H, trackFocusVisible as K } from "../../focus-visible/dist/index.js";
|
|
4
4
|
import { createMachine as R, createGuards as x } from "../../core/dist/index.js";
|
|
5
5
|
import { createProps as G } from "../../types/dist/index.js";
|
|
6
6
|
var L = I("checkbox").parts("root", "label", "control", "indicator"), h = L.build(), y = (e) => {
|
|
@@ -53,7 +53,7 @@ function J(e, t) {
|
|
|
53
53
|
i || d({ type: "CONTEXT.SET", context: { hovered: !1 } });
|
|
54
54
|
},
|
|
55
55
|
onClick(s) {
|
|
56
|
-
|
|
56
|
+
S(s) === l(c) && s.stopPropagation();
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
},
|
|
@@ -94,9 +94,9 @@ function J(e, t) {
|
|
|
94
94
|
name: a("name"),
|
|
95
95
|
form: a("form"),
|
|
96
96
|
value: a("value"),
|
|
97
|
-
style:
|
|
97
|
+
style: P,
|
|
98
98
|
onFocus() {
|
|
99
|
-
const s =
|
|
99
|
+
const s = H();
|
|
100
100
|
d({ type: "CONTEXT.SET", context: { focused: !0, focusVisible: s } });
|
|
101
101
|
},
|
|
102
102
|
onBlur() {
|
|
@@ -188,7 +188,7 @@ var { not: T } = x(), Q = R({
|
|
|
188
188
|
effects: {
|
|
189
189
|
trackPressEvent({ context: e, computed: t, scope: d }) {
|
|
190
190
|
if (!t("disabled"))
|
|
191
|
-
return
|
|
191
|
+
return O({
|
|
192
192
|
pointerNode: q(d),
|
|
193
193
|
keyboardNode: l(d),
|
|
194
194
|
isValidKey: (r) => r.key === " ",
|
|
@@ -200,10 +200,10 @@ var { not: T } = x(), Q = R({
|
|
|
200
200
|
trackFocusVisible({ computed: e, scope: t }) {
|
|
201
201
|
var d;
|
|
202
202
|
if (!e("disabled"))
|
|
203
|
-
return
|
|
203
|
+
return K({ root: (d = t.getRootNode) == null ? void 0 : d.call(t) });
|
|
204
204
|
},
|
|
205
205
|
trackFormControlState({ context: e, scope: t }) {
|
|
206
|
-
return
|
|
206
|
+
return D(l(t), {
|
|
207
207
|
onFieldsetDisabledChange(d) {
|
|
208
208
|
e.set("fieldsetDisabled", d);
|
|
209
209
|
},
|
|
@@ -220,7 +220,7 @@ var { not: T } = x(), Q = R({
|
|
|
220
220
|
},
|
|
221
221
|
syncInputElement({ context: e, computed: t, scope: d }) {
|
|
222
222
|
const r = l(d);
|
|
223
|
-
r && (
|
|
223
|
+
r && (N(r, t("checked")), r.indeterminate = f(e.get("checked")));
|
|
224
224
|
},
|
|
225
225
|
removeFocusIfNeeded({ context: e, prop: t }) {
|
|
226
226
|
t("disabled") && e.get("focused") && (e.set("focused", !1), e.set("focusVisible", !1));
|
|
@@ -235,7 +235,7 @@ var { not: T } = x(), Q = R({
|
|
|
235
235
|
dispatchChangeEvent({ computed: e, scope: t }) {
|
|
236
236
|
queueMicrotask(() => {
|
|
237
237
|
const d = l(t);
|
|
238
|
-
|
|
238
|
+
F(d, { checked: e("checked") });
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnatomy as ce } from "../../anatomy/dist/index.js";
|
|
2
2
|
import { ListCollection as ee } from "../../collection/dist/index.js";
|
|
3
|
-
import { raf as f, setCaretToEnd as ge, observeAttributes as de, observeChildren as he, clickIfLink as Ie, dataAttr as u, ariaAttr as K, isDownloadingEvent as pe, isOpeningInNewTab as me, isContextMenuEvent as Ce, isLeftClick as U, getEventKey as $, isComposingEvent as fe,
|
|
3
|
+
import { raf as f, setCaretToEnd as ge, observeAttributes as de, observeChildren as he, clickIfLink as Ie, dataAttr as u, ariaAttr as K, isDownloadingEvent as pe, isOpeningInNewTab as me, isContextMenuEvent as Ce, isLeftClick as U, getEventKey as $, isComposingEvent as fe, isAnchorElement as Oe, query as ve, scrollIntoView as Ee } from "../../dom-query/dist/index.js";
|
|
4
4
|
import { getPlacement as q, getPlacementStyles as Ve } from "../../popper/dist/index.js";
|
|
5
5
|
import { match as D, remove as Te, addOrRemove as Y, isBoolean as ye, isEqual as Pe, ensure as Se } from "../../utils/dist/index.js";
|
|
6
6
|
import { ariaHidden as Ne } from "../../aria-hidden/dist/index.js";
|
|
@@ -60,7 +60,7 @@ var Fe = (e) => {
|
|
|
60
60
|
}, T = (e) => e.getById(w(e)), y = (e) => e.getById(M(e)), Q = (e) => e.getById(ne(e)), X = (e) => e.getById(ie(e)), L = (e) => e.getById(le(e)), Z = (e) => e.getById(oe(e)), ae = (e, t) => {
|
|
61
61
|
if (t == null) return;
|
|
62
62
|
const i = `[role=option][data-value="${CSS.escape(t)}"]`;
|
|
63
|
-
return
|
|
63
|
+
return ve(T(e), i);
|
|
64
64
|
}, z = (e) => {
|
|
65
65
|
const t = y(e);
|
|
66
66
|
e.isActiveElement(t) || t == null || t.focus({ preventScroll: !0 });
|
|
@@ -226,7 +226,7 @@ function Ye(e, t) {
|
|
|
226
226
|
const ue = C("isCustomValue") && n("allowCustomValue");
|
|
227
227
|
if (d && !ue && V.preventDefault(), b == null) return;
|
|
228
228
|
const _ = ae(r, b);
|
|
229
|
-
|
|
229
|
+
Oe(_) && ((W = n("navigate")) == null || W({ value: b, node: _, href: _.href }));
|
|
230
230
|
},
|
|
231
231
|
Escape() {
|
|
232
232
|
a({ type: "INPUT.ESCAPE", keypress: h }), l.preventDefault();
|
|
@@ -1098,7 +1098,7 @@ var { guards: He, createMachine: Ue, choose: De } = be(), { and: c, not: m } = H
|
|
|
1098
1098
|
return;
|
|
1099
1099
|
}
|
|
1100
1100
|
const d = f(() => {
|
|
1101
|
-
|
|
1101
|
+
Ee(P, { rootEl: v, block: "nearest" });
|
|
1102
1102
|
});
|
|
1103
1103
|
a.push(d);
|
|
1104
1104
|
}, C = f(() => r(!0));
|