@serendie/ui 3.5.1-dev.202606091509 → 3.5.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/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
- package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +1 -1
- package/dist/components/Tabs/TabItem.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/i18n/provider.d.ts +1 -1
- package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +50 -49
- package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +68 -70
- package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +308 -322
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +79 -93
- package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +43 -35
- package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +35 -36
- package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +37 -27
- package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +41 -56
- package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +31 -51
- package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +25 -46
- package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
- package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +21 -13
- package/dist/node_modules/@zag-js/live-region/dist/index.js +19 -29
- package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +135 -138
- package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
- package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
- package/dist/node_modules/@zag-js/popper/dist/get-placement.js +71 -82
- package/dist/node_modules/@zag-js/react/dist/machine.js +96 -105
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +26 -34
- package/dist/node_modules/@zag-js/select/dist/select.connect.js +101 -104
- package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
- package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +60 -63
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +25 -27
- package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +14 -15
- package/dist/theme/initColorScheme.d.ts +1 -1
- package/package.json +8 -8
- package/dist/node_modules/@zag-js/date-utils/dist/locale.js +0 -12
- package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +0 -11
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { isLeftClick as
|
|
2
|
-
import { dataAttr as
|
|
3
|
-
import { isFocusVisible as
|
|
4
|
-
import { getPlacementStyles as
|
|
5
|
-
import { getPlacementSide as k } from "../../popper/dist/placement.js";
|
|
1
|
+
import { isLeftClick as V } from "../../dom-query/dist/event.js";
|
|
2
|
+
import { dataAttr as P } from "../../dom-query/dist/shared.js";
|
|
3
|
+
import { isFocusVisible as A } from "../../focus-visible/dist/index.js";
|
|
4
|
+
import { getPlacementStyles as C } from "../../popper/dist/get-styles.js";
|
|
6
5
|
import { parts as p } from "./tooltip.anatomy.js";
|
|
7
|
-
import { getContentId as
|
|
6
|
+
import { getContentId as I, getPositionerId as S, getArrowId as k, getTriggerId as L } from "./tooltip.dom.js";
|
|
8
7
|
import { store as g } from "./tooltip.store.js";
|
|
9
|
-
function
|
|
10
|
-
const { state: y, context:
|
|
8
|
+
function j(b, u) {
|
|
9
|
+
const { state: y, context: m, send: r, scope: d, prop: n, event: D } = b, f = n("id"), w = !!n("aria-label"), o = y.matches("open", "closing"), h = m.get("triggerValue"), T = I(d), a = n("disabled"), v = C({
|
|
11
10
|
...n("positioning"),
|
|
12
|
-
placement: m
|
|
11
|
+
placement: m.get("currentPlacement")
|
|
13
12
|
});
|
|
14
13
|
return {
|
|
15
14
|
open: o,
|
|
16
15
|
setOpen(i) {
|
|
17
16
|
y.matches("open", "closing") !== i && r({ type: i ? "open" : "close" });
|
|
18
17
|
},
|
|
19
|
-
triggerValue:
|
|
18
|
+
triggerValue: h,
|
|
20
19
|
setTriggerValue(i) {
|
|
21
20
|
r({ type: "triggerValue.set", value: i ?? void 0 });
|
|
22
21
|
},
|
|
@@ -24,24 +23,24 @@ function J(V, u) {
|
|
|
24
23
|
r({ type: "positioning.set", options: i });
|
|
25
24
|
},
|
|
26
25
|
getTriggerProps(i = {}) {
|
|
27
|
-
const { value: e } = i, l = e == null ? !1 :
|
|
26
|
+
const { value: e } = i, l = e == null ? !1 : h === e, c = L(d, e);
|
|
28
27
|
return u.button({
|
|
29
28
|
...p.trigger.attrs,
|
|
30
29
|
id: c,
|
|
31
30
|
"data-ownedby": d.id,
|
|
32
31
|
"data-value": e,
|
|
33
|
-
"data-current":
|
|
32
|
+
"data-current": P(l),
|
|
34
33
|
dir: n("dir"),
|
|
35
|
-
"data-expanded":
|
|
34
|
+
"data-expanded": P(o),
|
|
36
35
|
"data-state": o ? "open" : "closed",
|
|
37
|
-
"aria-describedby": o ?
|
|
36
|
+
"aria-describedby": o ? T : void 0,
|
|
38
37
|
onClick(t) {
|
|
39
38
|
if (t.defaultPrevented || a || !n("closeOnClick")) return;
|
|
40
39
|
const s = o && e != null && !l;
|
|
41
40
|
r({ type: s ? "triggerValue.set" : "close", src: "trigger.click", value: e, triggerId: c });
|
|
42
41
|
},
|
|
43
42
|
onFocus(t) {
|
|
44
|
-
if (t.defaultPrevented || a || !
|
|
43
|
+
if (t.defaultPrevented || a || !A()) return;
|
|
45
44
|
const s = o && e != null && !l;
|
|
46
45
|
r({ type: s ? "triggerValue.set" : "open", src: "trigger.focus", value: e, triggerId: c });
|
|
47
46
|
},
|
|
@@ -51,7 +50,7 @@ function J(V, u) {
|
|
|
51
50
|
(s == null ? void 0 : s.closest(`[data-ownedby="${d.id}"]`)) != null || r({ type: "close", src: "trigger.blur", value: e, triggerId: c });
|
|
52
51
|
},
|
|
53
52
|
onPointerDown(t) {
|
|
54
|
-
t.defaultPrevented || a ||
|
|
53
|
+
t.defaultPrevented || a || V(t) && n("closeOnPointerDown") && f === g.get("id") && r({ type: "close", src: "trigger.pointerdown", value: e, triggerId: c });
|
|
55
54
|
},
|
|
56
55
|
onPointerMove(t) {
|
|
57
56
|
if (t.defaultPrevented || a || t.pointerType === "touch") return;
|
|
@@ -71,25 +70,25 @@ function J(V, u) {
|
|
|
71
70
|
},
|
|
72
71
|
getArrowProps() {
|
|
73
72
|
return u.element({
|
|
74
|
-
id:
|
|
73
|
+
id: k(d),
|
|
75
74
|
...p.arrow.attrs,
|
|
76
75
|
dir: n("dir"),
|
|
77
|
-
style:
|
|
76
|
+
style: v.arrow
|
|
78
77
|
});
|
|
79
78
|
},
|
|
80
79
|
getArrowTipProps() {
|
|
81
80
|
return u.element({
|
|
82
81
|
...p.arrowTip.attrs,
|
|
83
82
|
dir: n("dir"),
|
|
84
|
-
style:
|
|
83
|
+
style: v.arrowTip
|
|
85
84
|
});
|
|
86
85
|
},
|
|
87
86
|
getPositionerProps() {
|
|
88
87
|
return u.element({
|
|
89
|
-
id:
|
|
88
|
+
id: S(d),
|
|
90
89
|
...p.positioner.attrs,
|
|
91
90
|
dir: n("dir"),
|
|
92
|
-
style:
|
|
91
|
+
style: v.floating
|
|
93
92
|
});
|
|
94
93
|
},
|
|
95
94
|
getContentProps() {
|
|
@@ -99,11 +98,10 @@ function J(V, u) {
|
|
|
99
98
|
dir: n("dir"),
|
|
100
99
|
hidden: !o,
|
|
101
100
|
"data-state": o ? "open" : "closed",
|
|
102
|
-
"data-instant":
|
|
103
|
-
role:
|
|
104
|
-
id:
|
|
105
|
-
"data-placement": m,
|
|
106
|
-
"data-side": A,
|
|
101
|
+
"data-instant": P(l),
|
|
102
|
+
role: w ? void 0 : "tooltip",
|
|
103
|
+
id: w ? void 0 : T,
|
|
104
|
+
"data-placement": m.get("currentPlacement"),
|
|
107
105
|
onPointerEnter() {
|
|
108
106
|
r({ type: "content.pointer.move" });
|
|
109
107
|
},
|
|
@@ -118,5 +116,5 @@ function J(V, u) {
|
|
|
118
116
|
};
|
|
119
117
|
}
|
|
120
118
|
export {
|
|
121
|
-
|
|
119
|
+
j as connect
|
|
122
120
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { isFunction as
|
|
2
|
-
import { queryAll as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
const i = (
|
|
6
|
-
return i != null ?
|
|
7
|
-
},
|
|
1
|
+
import { isFunction as g } from "../../utils/dist/guard.js";
|
|
2
|
+
import { queryAll as d } from "../../dom-query/dist/query.js";
|
|
3
|
+
var e = (t, r) => {
|
|
4
|
+
var o;
|
|
5
|
+
const i = (o = t.ids) == null ? void 0 : o.trigger;
|
|
6
|
+
return i != null ? g(i) ? i(r) : i : r ? `tooltip:${t.id}:trigger:${r}` : `tooltip:${t.id}:trigger`;
|
|
7
|
+
}, $ = (t) => {
|
|
8
8
|
var r;
|
|
9
9
|
return ((r = t.ids) == null ? void 0 : r.content) ?? `tooltip:${t.id}:content`;
|
|
10
|
-
},
|
|
10
|
+
}, p = (t) => {
|
|
11
11
|
var r;
|
|
12
12
|
return ((r = t.ids) == null ? void 0 : r.arrow) ?? `tooltip:${t.id}:arrow`;
|
|
13
13
|
}, n = (t) => {
|
|
14
14
|
var r;
|
|
15
15
|
return ((r = t.ids) == null ? void 0 : r.positioner) ?? `tooltip:${t.id}:popper`;
|
|
16
|
-
},
|
|
16
|
+
}, m = (t) => t.getById(n(t)), a = (t) => d(t.getDoc(), `[data-scope="tooltip"][data-part="trigger"][data-ownedby="${t.id}"]`), u = (t, r) => r == null ? a(t)[0] : t.getById(e(t, r));
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
u as getActiveTriggerEl,
|
|
19
|
+
p as getArrowId,
|
|
20
|
+
$ as getContentId,
|
|
21
21
|
m as getPositionerEl,
|
|
22
22
|
n as getPositionerId,
|
|
23
|
-
a as
|
|
24
|
-
|
|
25
|
-
o as getTriggerId
|
|
23
|
+
a as getTriggerEls,
|
|
24
|
+
e as getTriggerId
|
|
26
25
|
};
|
|
@@ -71,4 +71,4 @@ export declare function getColorSchemeScript(options?: ColorSchemeScriptOptions)
|
|
|
71
71
|
* }
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
|
-
export declare function ColorSchemeScript(props?: ColorSchemeScriptOptions): import("react").JSX.Element;
|
|
74
|
+
export declare function ColorSchemeScript(props?: ColorSchemeScriptOptions): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "3.5.1
|
|
12
|
+
"version": "3.5.1",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"sideEffects": [
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"@serendie/design-token": "^1.4.5",
|
|
65
65
|
"@tanstack/intent": "^0.0.41",
|
|
66
66
|
"@storybook/addon-designs": "^11.1.3",
|
|
67
|
-
"@storybook/addon-links": "10.
|
|
68
|
-
"@storybook/addon-onboarding": "10.
|
|
69
|
-
"@storybook/addon-themes": "10.
|
|
70
|
-
"@storybook/react-vite": "10.
|
|
67
|
+
"@storybook/addon-links": "10.3.6",
|
|
68
|
+
"@storybook/addon-onboarding": "10.3.6",
|
|
69
|
+
"@storybook/addon-themes": "10.3.6",
|
|
70
|
+
"@storybook/react-vite": "10.3.6",
|
|
71
71
|
"@storybook/test-runner": "^0.24.3",
|
|
72
72
|
"@types/eslint__js": "^8.42.3",
|
|
73
73
|
"@types/react": "^18.3.1",
|
|
@@ -80,20 +80,20 @@
|
|
|
80
80
|
"eslint-plugin-prettier": "^5.2.1",
|
|
81
81
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
82
82
|
"eslint-plugin-react-refresh": "^0.4.8",
|
|
83
|
-
"eslint-plugin-storybook": "10.
|
|
83
|
+
"eslint-plugin-storybook": "10.3.6",
|
|
84
84
|
"globby": "14.1.0",
|
|
85
85
|
"husky": "^9.1.4",
|
|
86
86
|
"lint-staged": "^15.2.8",
|
|
87
87
|
"prettier": "^3.3.3",
|
|
88
88
|
"release-it": "^20.0.1",
|
|
89
|
-
"storybook": "10.
|
|
89
|
+
"storybook": "10.3.6",
|
|
90
90
|
"tsx": "^4.20.6",
|
|
91
91
|
"typescript": "^5.5.3",
|
|
92
92
|
"typescript-eslint": "^8.0.0",
|
|
93
93
|
"vite": "^5.3.3",
|
|
94
94
|
"vite-plugin-dts": "^4.2.1",
|
|
95
95
|
"vite-plugin-svgr": "^4.2.0",
|
|
96
|
-
"@storybook/addon-docs": "10.
|
|
96
|
+
"@storybook/addon-docs": "10.3.6"
|
|
97
97
|
},
|
|
98
98
|
"main": "./dist/index.cjs",
|
|
99
99
|
"module": "./dist/index.js",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var s = (t, e) => t ? /\d/.test(t) || e.includes(t) || t.length !== 1 : !0, l = (t, e) => t.split("").filter((r) => s(r, e)).join(""), n = /* @__PURE__ */ new Map();
|
|
2
|
-
function u(t) {
|
|
3
|
-
let e = n.get(t);
|
|
4
|
-
if (e != null) return e;
|
|
5
|
-
const a = new Intl.DateTimeFormat(t).formatToParts(/* @__PURE__ */ new Date()).find((i) => i.type === "literal");
|
|
6
|
-
return e = a ? a.value : "/", n.set(t, e), e;
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
l as ensureValidCharacters,
|
|
10
|
-
u as getLocaleSeparator,
|
|
11
|
-
s as isValidCharacter
|
|
12
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { isOverflowElement as l } from "./overflow.js";
|
|
2
|
-
function n(t) {
|
|
3
|
-
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth;
|
|
4
|
-
}
|
|
5
|
-
function e(t, r) {
|
|
6
|
-
const { rootEl: o, ...i } = r || {};
|
|
7
|
-
!t || !o || !l(o) || !n(o) || t.scrollIntoView(i);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
e as scrollIntoView
|
|
11
|
-
};
|