@serendie/ui 0.1.16 → 0.2.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/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/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 +89 -89
- 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 +31 -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,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 {
|