@serendie/ui 2.1.3 → 2.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/dist/client.js +79 -74
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +22 -21
- package/dist/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/components/DatePicker/DatePicker.js +203 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +6 -0
- package/dist/components/DatePicker/parseDate.d.ts +1 -0
- package/dist/components/DatePicker/styles.d.ts +1 -0
- package/dist/components/DatePicker/styles.js +224 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
- package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
- package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
- package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
- package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
- package/dist/components/ProgressIndicator/index.d.ts +4 -1
- package/dist/components/ProgressIndicator/index.js +3 -2
- package/dist/components/ProgressIndicator/util.d.ts +1 -0
- package/dist/components/ProgressIndicator/util.js +13 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/TextField/TextField.js +59 -156
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +80 -75
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
- package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
- package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
- package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
- package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
- package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
- package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
- package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
- package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
- package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
- package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
- package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
- package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
- package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
- package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
- package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
- package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
- package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
- package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
- package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
- package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
- package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
- package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
- package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
- package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
- package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
- package/dist/preset.d.ts +11 -1
- package/dist/recipes/index.d.ts +3 -2
- package/dist/recipes/index.js +5 -2
- package/dist/recipes/textFieldRecipe.d.ts +6 -0
- package/dist/recipes/textFieldRecipe.js +107 -0
- package/dist/styled-system/css/cva.js +43 -38
- package/dist/styled-system/recipes/create-recipe.js +37 -0
- package/dist/styled-system/recipes/text-field-recipe.js +61 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/keyframes/index.d.ts +8 -0
- package/dist/tokens/keyframes/index.js +6 -2
- package/package.json +3 -3
- package/styled-system/recipes/create-recipe.js +82 -0
- package/styled-system/recipes/index.d.ts +2 -0
- package/styled-system/recipes/index.js +1 -0
- package/styled-system/recipes/text-field-recipe.d.ts +28 -0
- package/styled-system/recipes/text-field-recipe.js +72 -0
- package/styled-system/types/prop-type.d.ts +1 -1
- package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
- package/dist/node_modules/proxy-compare/dist/index.js +0 -7
|
@@ -1,127 +1,173 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
1
|
+
function L(t) {
|
|
2
|
+
return t == null ? [] : Array.isArray(t) ? t : [t];
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
const { step:
|
|
7
|
-
return
|
|
4
|
+
var z = (t) => t[0], d = (t) => t[t.length - 1], O = (t, r) => t.indexOf(r) !== -1, j = (t, ...r) => t.concat(r), E = (t, ...r) => t.filter((n) => !r.includes(n)), B = (t, r) => O(t, r) ? E(t, r) : j(t, r);
|
|
5
|
+
function y(t, r, n = {}) {
|
|
6
|
+
const { step: e = 1, loop: o = !0 } = n, i = r + e, c = t.length, a = c - 1;
|
|
7
|
+
return r === -1 ? e > 0 ? 0 : a : i < 0 ? o ? a : 0 : i >= c ? o ? 0 : r > c ? c : r : i;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
9
|
+
function D(t, r, n = {}) {
|
|
10
|
+
return t[y(t, r, n)];
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const { step:
|
|
14
|
-
return
|
|
12
|
+
function A(t, r, n = {}) {
|
|
13
|
+
const { step: e = 1, loop: o = !0 } = n;
|
|
14
|
+
return y(t, r, { step: -e, loop: o });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function G(t, r, n = {}) {
|
|
17
|
+
return t[A(t, r, n)];
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
function M(t, r) {
|
|
20
|
+
return t.reduce((n, e, o) => {
|
|
21
|
+
var i;
|
|
22
|
+
return o % r === 0 ? n.push([e]) : (i = d(n)) == null || i.push(e), n;
|
|
23
|
+
}, []);
|
|
24
|
+
}
|
|
25
|
+
var p = (t) => (t == null ? void 0 : t.constructor.name) === "Array", k = (t, r) => {
|
|
26
|
+
if (t.length !== r.length) return !1;
|
|
27
|
+
for (let n = 0; n < t.length; n++)
|
|
28
|
+
if (!h(t[n], r[n])) return !1;
|
|
23
29
|
return !0;
|
|
24
|
-
},
|
|
25
|
-
if (Object.is(
|
|
26
|
-
if (
|
|
27
|
-
if (typeof (
|
|
28
|
-
return
|
|
29
|
-
if (typeof
|
|
30
|
-
return
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
33
|
-
if (typeof
|
|
34
|
-
const n = Object.keys(
|
|
35
|
-
for (let
|
|
36
|
-
if (!Reflect.has(
|
|
37
|
-
for (let
|
|
38
|
-
const i = n[
|
|
39
|
-
if (!
|
|
30
|
+
}, h = (t, r) => {
|
|
31
|
+
if (Object.is(t, r)) return !0;
|
|
32
|
+
if (t == null && r != null || t != null && r == null) return !1;
|
|
33
|
+
if (typeof (t == null ? void 0 : t.isEqual) == "function" && typeof (r == null ? void 0 : r.isEqual) == "function")
|
|
34
|
+
return t.isEqual(r);
|
|
35
|
+
if (typeof t == "function" && typeof r == "function")
|
|
36
|
+
return t.toString() === r.toString();
|
|
37
|
+
if (p(t) && p(r))
|
|
38
|
+
return k(Array.from(t), Array.from(r));
|
|
39
|
+
if (typeof t != "object" || typeof r != "object") return !1;
|
|
40
|
+
const n = Object.keys(r ?? /* @__PURE__ */ Object.create(null)), e = n.length;
|
|
41
|
+
for (let o = 0; o < e; o++)
|
|
42
|
+
if (!Reflect.has(t, n[o])) return !1;
|
|
43
|
+
for (let o = 0; o < e; o++) {
|
|
44
|
+
const i = n[o];
|
|
45
|
+
if (!h(t[i], r[i])) return !1;
|
|
40
46
|
}
|
|
41
47
|
return !0;
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
r
|
|
47
|
-
|
|
48
|
+
}, S = (t) => Array.isArray(t), W = (t) => t === !0 || t === !1, g = (t) => t != null && typeof t == "object", H = (t) => g(t) && !S(t), Q = (t) => typeof t == "string", N = (t) => typeof t == "function", U = (t) => t == null, w = (t, r) => Object.prototype.hasOwnProperty.call(t, r), q = (t) => Object.prototype.toString.call(t), m = Function.prototype.toString, F = m.call(Object), $ = (t) => {
|
|
49
|
+
if (!g(t) || q(t) != "[object Object]" || C(t)) return !1;
|
|
50
|
+
const r = Object.getPrototypeOf(t);
|
|
51
|
+
if (r === null) return !0;
|
|
52
|
+
const n = w(r, "constructor") && r.constructor;
|
|
53
|
+
return typeof n == "function" && n instanceof n && m.call(n) == F;
|
|
54
|
+
}, R = (t) => typeof t == "object" && t !== null && "$$typeof" in t && "props" in t, b = (t) => typeof t == "object" && t !== null && "__v_isVNode" in t, C = (t) => R(t) || b(t), X = (t, ...r) => (typeof t == "function" ? t(...r) : t) ?? void 0, Y = (t) => t, Z = (t) => t(), x = () => {
|
|
55
|
+
}, tt = (...t) => (...r) => {
|
|
56
|
+
t.forEach(function(n) {
|
|
57
|
+
n == null || n(...r);
|
|
48
58
|
});
|
|
49
|
-
},
|
|
50
|
-
let
|
|
51
|
-
return () => (
|
|
59
|
+
}, rt = /* @__PURE__ */ (() => {
|
|
60
|
+
let t = 0;
|
|
61
|
+
return () => (t++, t.toString(36));
|
|
52
62
|
})();
|
|
53
|
-
function
|
|
54
|
-
var
|
|
55
|
-
if (
|
|
56
|
-
const i = t
|
|
57
|
-
return
|
|
63
|
+
function P(t, r, ...n) {
|
|
64
|
+
var o;
|
|
65
|
+
if (t in r) {
|
|
66
|
+
const i = r[t];
|
|
67
|
+
return N(i) ? i(...n) : i;
|
|
58
68
|
}
|
|
59
|
-
const
|
|
60
|
-
throw (
|
|
69
|
+
const e = new Error(`No matching key: ${JSON.stringify(t)} in ${JSON.stringify(Object.keys(r))}`);
|
|
70
|
+
throw (o = Error.captureStackTrace) == null || o.call(Error, e, P), e;
|
|
61
71
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
var { min: V, max: K } = Math, T = (t) => Number.isNaN(t), v = (t) => T(t) ? 0 : t, nt = (t, r, n) => {
|
|
73
|
+
const e = v(t), o = r == null || e >= r, i = n == null || e <= n;
|
|
74
|
+
return o && i;
|
|
75
|
+
}, et = (t, r, n) => V(K(v(t), r), n);
|
|
76
|
+
function _(t) {
|
|
77
|
+
if (!$(t) || t === void 0) return t;
|
|
78
|
+
const r = Reflect.ownKeys(t).filter((e) => typeof e == "string"), n = {};
|
|
79
|
+
for (const e of r) {
|
|
80
|
+
const o = t[e];
|
|
81
|
+
o !== void 0 && (n[e] = _(o));
|
|
68
82
|
}
|
|
69
83
|
return n;
|
|
70
84
|
}
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
function ot(t, r = Object.is) {
|
|
86
|
+
let n = { ...t };
|
|
87
|
+
const e = /* @__PURE__ */ new Set(), o = (s) => (e.add(s), () => e.delete(s)), i = () => {
|
|
88
|
+
e.forEach((s) => s());
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
subscribe: o,
|
|
92
|
+
get: (s) => n[s],
|
|
93
|
+
set: (s, u) => {
|
|
94
|
+
r(n[s], u) || (n[s] = u, i());
|
|
95
|
+
},
|
|
96
|
+
update: (s) => {
|
|
97
|
+
let u = !1;
|
|
98
|
+
for (const l in s) {
|
|
99
|
+
const f = s[l];
|
|
100
|
+
f !== void 0 && !r(n[l], f) && (n[l] = f, u = !0);
|
|
101
|
+
}
|
|
102
|
+
u && i();
|
|
103
|
+
},
|
|
104
|
+
snapshot: () => ({ ...n })
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function it(t, r) {
|
|
73
108
|
const n = performance.now();
|
|
74
|
-
let
|
|
75
|
-
function
|
|
76
|
-
|
|
109
|
+
let e;
|
|
110
|
+
function o(i) {
|
|
111
|
+
if (i - n >= r) {
|
|
112
|
+
t();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
e = requestAnimationFrame(o);
|
|
77
116
|
}
|
|
78
|
-
return
|
|
117
|
+
return e = requestAnimationFrame(o), () => cancelAnimationFrame(e);
|
|
79
118
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
82
|
-
(
|
|
119
|
+
function st(...t) {
|
|
120
|
+
const r = t.length === 1 ? t[0] : t[1];
|
|
121
|
+
(t.length === 2 ? t[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(r);
|
|
83
122
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
123
|
+
function ct(t, r) {
|
|
124
|
+
if (t == null) throw new Error(r());
|
|
86
125
|
}
|
|
87
|
-
function
|
|
88
|
-
let
|
|
89
|
-
for (const
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
throw new Error(`[zag-js${` > ${n}`}] missing required props: ${
|
|
126
|
+
function ut(t, r, n) {
|
|
127
|
+
let e = [];
|
|
128
|
+
for (const o of r)
|
|
129
|
+
t[o] == null && e.push(o);
|
|
130
|
+
if (e.length > 0)
|
|
131
|
+
throw new Error(`[zag-js${` > ${n}`}] missing required props: ${e.join(", ")}`);
|
|
93
132
|
}
|
|
94
133
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
D as
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
134
|
+
j as add,
|
|
135
|
+
B as addOrRemove,
|
|
136
|
+
tt as callAll,
|
|
137
|
+
Y as cast,
|
|
138
|
+
M as chunk,
|
|
139
|
+
et as clampValue,
|
|
140
|
+
_ as compact,
|
|
141
|
+
ot as createStore,
|
|
142
|
+
ct as ensure,
|
|
143
|
+
ut as ensureProps,
|
|
144
|
+
z as first,
|
|
145
|
+
O as has,
|
|
146
|
+
w as hasProp,
|
|
147
|
+
Z as identity,
|
|
148
|
+
S as isArray,
|
|
149
|
+
W as isBoolean,
|
|
150
|
+
h as isEqual,
|
|
151
|
+
N as isFunction,
|
|
152
|
+
T as isNaN,
|
|
153
|
+
U as isNull,
|
|
154
|
+
H as isObject,
|
|
155
|
+
g as isObjectLike,
|
|
156
|
+
$ as isPlainObject,
|
|
157
|
+
Q as isString,
|
|
158
|
+
nt as isValueWithinRange,
|
|
159
|
+
d as last,
|
|
160
|
+
P as match,
|
|
161
|
+
v as nan,
|
|
162
|
+
D as next,
|
|
163
|
+
y as nextIndex,
|
|
164
|
+
x as noop,
|
|
165
|
+
G as prev,
|
|
166
|
+
A as prevIndex,
|
|
167
|
+
E as remove,
|
|
168
|
+
X as runIfFn,
|
|
169
|
+
it as setRafTimeout,
|
|
170
|
+
L as toArray,
|
|
171
|
+
rt as uuid,
|
|
172
|
+
st as warn
|
|
127
173
|
};
|
package/dist/preset.d.ts
CHANGED
|
@@ -1177,7 +1177,9 @@ export declare const SerendiePreset: {
|
|
|
1177
1177
|
breakpoints: {
|
|
1178
1178
|
expanded: string;
|
|
1179
1179
|
};
|
|
1180
|
-
recipes:
|
|
1180
|
+
recipes: {
|
|
1181
|
+
textFieldRecipe: import('../styled-system/types').SlotRecipeConfig;
|
|
1182
|
+
};
|
|
1181
1183
|
tokens: {
|
|
1182
1184
|
sizes: {
|
|
1183
1185
|
sd: {
|
|
@@ -2661,6 +2663,14 @@ export declare const SerendiePreset: {
|
|
|
2661
2663
|
transform: string;
|
|
2662
2664
|
};
|
|
2663
2665
|
};
|
|
2666
|
+
progressIndicatorSlide: {
|
|
2667
|
+
from: {
|
|
2668
|
+
transform: string;
|
|
2669
|
+
};
|
|
2670
|
+
to: {
|
|
2671
|
+
transform: string;
|
|
2672
|
+
};
|
|
2673
|
+
};
|
|
2664
2674
|
};
|
|
2665
2675
|
};
|
|
2666
2676
|
};
|
package/dist/recipes/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const SerendieRecipes: {
|
|
2
|
+
textFieldRecipe: import('../../styled-system/types').SlotRecipeConfig;
|
|
3
|
+
};
|
package/dist/recipes/index.js
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
className: "input",
|
|
3
|
+
slots: [
|
|
4
|
+
"root",
|
|
5
|
+
"label",
|
|
6
|
+
"labelRequired",
|
|
7
|
+
"inputWrapper",
|
|
8
|
+
"input",
|
|
9
|
+
"icon",
|
|
10
|
+
"leftContent",
|
|
11
|
+
"rightContent",
|
|
12
|
+
"messageField",
|
|
13
|
+
"description",
|
|
14
|
+
"invalidMessage"
|
|
15
|
+
],
|
|
16
|
+
base: {
|
|
17
|
+
root: {
|
|
18
|
+
display: "inline-grid",
|
|
19
|
+
// 後から指定したCSSからwidthが上書きできないため、@layer componentsを指定
|
|
20
|
+
"@layer components": {
|
|
21
|
+
width: "min(100%, 300px)"
|
|
22
|
+
},
|
|
23
|
+
gridTemplateColumns: "auto",
|
|
24
|
+
rowGap: "sd.system.dimension.spacing.extraSmall",
|
|
25
|
+
textStyle: {
|
|
26
|
+
base: "sd.system.typography.body.medium_compact",
|
|
27
|
+
expanded: "sd.system.typography.body.medium_expanded"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
textStyle: {
|
|
32
|
+
base: "sd.system.typography.label.medium_compact",
|
|
33
|
+
expanded: "sd.system.typography.label.medium_expanded"
|
|
34
|
+
},
|
|
35
|
+
color: "sd.system.color.component.onSurface",
|
|
36
|
+
fontWeight: "medium"
|
|
37
|
+
},
|
|
38
|
+
labelRequired: {
|
|
39
|
+
pl: "sd.system.dimension.spacing.extraSmall",
|
|
40
|
+
color: "sd.system.color.impression.negative"
|
|
41
|
+
},
|
|
42
|
+
inputWrapper: {
|
|
43
|
+
height: 48,
|
|
44
|
+
display: "grid",
|
|
45
|
+
gridTemplateColumns: "auto 1fr auto auto",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
outlineStyle: "solid",
|
|
48
|
+
outlineWidth: "sd.system.dimension.border.medium",
|
|
49
|
+
outlineColor: "sd.system.color.component.outline",
|
|
50
|
+
borderRadius: "sd.system.dimension.radius.medium",
|
|
51
|
+
backgroundColor: "sd.system.color.component.surface",
|
|
52
|
+
'&:has([data-focus="true"])': {
|
|
53
|
+
outlineWidth: "sd.system.dimension.border.thick",
|
|
54
|
+
outlineColor: "sd.system.color.impression.primary"
|
|
55
|
+
},
|
|
56
|
+
_focusWithin: {
|
|
57
|
+
outlineWidth: "sd.system.dimension.border.thick",
|
|
58
|
+
outlineColor: "sd.system.color.impression.primary"
|
|
59
|
+
},
|
|
60
|
+
_disabled: {
|
|
61
|
+
backgroundColor: "sd.system.color.interaction.disabled",
|
|
62
|
+
cursor: "not-allowed"
|
|
63
|
+
},
|
|
64
|
+
_invalid: {
|
|
65
|
+
outlineColor: "sd.system.color.impression.negative"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
leftContent: {
|
|
69
|
+
paddingLeft: "sd.system.dimension.spacing.medium"
|
|
70
|
+
},
|
|
71
|
+
rightContent: {
|
|
72
|
+
paddingRight: "sd.system.dimension.spacing.medium"
|
|
73
|
+
},
|
|
74
|
+
input: {
|
|
75
|
+
outline: "none",
|
|
76
|
+
paddingTop: "sd.system.dimension.spacing.extraSmall",
|
|
77
|
+
paddingRight: "sd.system.dimension.spacing.twoExtraSmall",
|
|
78
|
+
paddingBottom: "sd.system.dimension.spacing.extraSmall",
|
|
79
|
+
paddingLeft: "sd.system.dimension.spacing.medium"
|
|
80
|
+
},
|
|
81
|
+
icon: {
|
|
82
|
+
display: "grid",
|
|
83
|
+
placeItems: "center",
|
|
84
|
+
w: "48px",
|
|
85
|
+
h: "48px",
|
|
86
|
+
expanded: {
|
|
87
|
+
w: "44px",
|
|
88
|
+
h: "44px"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
messageField: {
|
|
92
|
+
textStyle: {
|
|
93
|
+
base: "sd.system.typography.body.extraSmall_compact",
|
|
94
|
+
expanded: "sd.system.typography.body.extraSmall_expanded"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
description: {
|
|
98
|
+
color: "sd.system.color.component.onSurfaceVariant"
|
|
99
|
+
},
|
|
100
|
+
invalidMessage: {
|
|
101
|
+
color: "sd.system.color.impression.negative"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
e as textFieldRecipe
|
|
107
|
+
};
|
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { memo as y, compact as C, splitProps as
|
|
2
|
-
import { mergeCss as
|
|
3
|
-
const
|
|
1
|
+
import { memo as y, compact as C, splitProps as h, uniq as w, mergeProps as E } from "../helpers.js";
|
|
2
|
+
import { mergeCss as f, css as P } from "./css.js";
|
|
3
|
+
const g = (s) => ({
|
|
4
4
|
base: {},
|
|
5
5
|
variants: {},
|
|
6
6
|
defaultVariants: {},
|
|
7
7
|
compoundVariants: [],
|
|
8
|
-
...
|
|
8
|
+
...s
|
|
9
9
|
});
|
|
10
|
-
function
|
|
11
|
-
const { base:
|
|
12
|
-
function
|
|
13
|
-
var
|
|
14
|
-
const r =
|
|
15
|
-
let
|
|
16
|
-
for (const [
|
|
17
|
-
(
|
|
18
|
-
const
|
|
19
|
-
return
|
|
10
|
+
function K(s) {
|
|
11
|
+
const { base: a, variants: t, defaultVariants: e, compoundVariants: m } = g(s), i = (n) => ({ ...e, ...C(n) });
|
|
12
|
+
function o(n = {}) {
|
|
13
|
+
var l;
|
|
14
|
+
const r = i(n);
|
|
15
|
+
let c = { ...a };
|
|
16
|
+
for (const [V, v] of Object.entries(r))
|
|
17
|
+
(l = t[V]) != null && l[v] && (c = f(c, t[V][v]));
|
|
18
|
+
const u = M(m, r);
|
|
19
|
+
return f(c, u);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const r =
|
|
23
|
-
return
|
|
24
|
-
base:
|
|
21
|
+
function d(n) {
|
|
22
|
+
const r = g(n.config), c = w(n.variantKeys, Object.keys(t));
|
|
23
|
+
return K({
|
|
24
|
+
base: f(a, r.base),
|
|
25
25
|
variants: Object.fromEntries(
|
|
26
|
-
|
|
26
|
+
c.map((u) => [u, f(t[u], r.variants[u])])
|
|
27
27
|
),
|
|
28
28
|
defaultVariants: E(e, r.defaultVariants),
|
|
29
29
|
compoundVariants: [...m, ...r.compoundVariants]
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function p(
|
|
33
|
-
return
|
|
32
|
+
function p(n) {
|
|
33
|
+
return P(o(n));
|
|
34
34
|
}
|
|
35
|
-
const b = Object.keys(
|
|
36
|
-
function
|
|
37
|
-
return
|
|
35
|
+
const b = Object.keys(t);
|
|
36
|
+
function j(n) {
|
|
37
|
+
return h(n, b);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const O = Object.fromEntries(Object.entries(t).map(([n, r]) => [n, Object.keys(r)]));
|
|
40
40
|
return Object.assign(y(p), {
|
|
41
41
|
__cva__: !0,
|
|
42
|
-
variantMap:
|
|
42
|
+
variantMap: O,
|
|
43
43
|
variantKeys: b,
|
|
44
|
-
raw:
|
|
45
|
-
config:
|
|
46
|
-
merge:
|
|
47
|
-
splitVariantProps:
|
|
48
|
-
getVariantProps:
|
|
44
|
+
raw: o,
|
|
45
|
+
config: s,
|
|
46
|
+
merge: d,
|
|
47
|
+
splitVariantProps: j,
|
|
48
|
+
getVariantProps: i
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let
|
|
53
|
-
return
|
|
54
|
-
Object.entries(e).every(([
|
|
55
|
-
}),
|
|
51
|
+
function M(s, a) {
|
|
52
|
+
let t = {};
|
|
53
|
+
return s.forEach((e) => {
|
|
54
|
+
Object.entries(e).every(([i, o]) => i === "css" ? !0 : (Array.isArray(o) ? o : [o]).some((p) => a[i] === p)) && (t = f(t, e.css));
|
|
55
|
+
}), t;
|
|
56
|
+
}
|
|
57
|
+
function $(s, a, t, e) {
|
|
58
|
+
if (a.length > 0 && typeof (t == null ? void 0 : t[e]) == "object")
|
|
59
|
+
throw new Error(`[recipe:${s}:${e}] Conditions are not supported when using compound variants.`);
|
|
56
60
|
}
|
|
57
61
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
$ as assertCompoundVariant,
|
|
63
|
+
K as cva,
|
|
64
|
+
M as getCompoundVariantCss
|
|
60
65
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { finalizeConditions as _, sortConditions as f } from "../css/conditions.js";
|
|
2
|
+
import { css as u } from "../css/css.js";
|
|
3
|
+
import { getCompoundVariantCss as p, assertCompoundVariant as C } from "../css/cva.js";
|
|
4
|
+
import { cx as d } from "../css/cx.js";
|
|
5
|
+
import { compact as g, createCss as l, withoutSpace as y } from "../helpers.js";
|
|
6
|
+
const z = (e, a, s) => {
|
|
7
|
+
const i = (t) => ({
|
|
8
|
+
[e]: "__ignore__",
|
|
9
|
+
...a,
|
|
10
|
+
...g(t)
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
recipeFn: (t, m = !0) => {
|
|
14
|
+
const c = l({
|
|
15
|
+
conditions: {
|
|
16
|
+
shift: f,
|
|
17
|
+
finalize: _,
|
|
18
|
+
breakpoints: { keys: ["base", "expanded"] }
|
|
19
|
+
},
|
|
20
|
+
utility: {
|
|
21
|
+
toHash: (r, o) => o(r.join(":")),
|
|
22
|
+
transform: (r, o) => (C(e, s, t, r), o === "__ignore__" ? { className: e } : (o = y(o), { className: `${e}--${r}_${o}` }))
|
|
23
|
+
}
|
|
24
|
+
}), n = i(t);
|
|
25
|
+
if (m) {
|
|
26
|
+
const r = p(s, n);
|
|
27
|
+
return d(c(n), u(r));
|
|
28
|
+
}
|
|
29
|
+
return c(n);
|
|
30
|
+
},
|
|
31
|
+
getVariantProps: i,
|
|
32
|
+
__getCompoundVariantCss__: (t) => p(s, i(t))
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
z as createRecipe
|
|
37
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { memo as a, compact as r, splitProps as o, getSlotCompoundVariant as s } from "../helpers.js";
|
|
2
|
+
import { createRecipe as _ } from "./create-recipe.js";
|
|
3
|
+
const n = {}, c = [], l = [
|
|
4
|
+
[
|
|
5
|
+
"root",
|
|
6
|
+
"input__root"
|
|
7
|
+
],
|
|
8
|
+
[
|
|
9
|
+
"label",
|
|
10
|
+
"input__label"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"labelRequired",
|
|
14
|
+
"input__labelRequired"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"inputWrapper",
|
|
18
|
+
"input__inputWrapper"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"input",
|
|
22
|
+
"input__input"
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"icon",
|
|
26
|
+
"input__icon"
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"leftContent",
|
|
30
|
+
"input__leftContent"
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
"rightContent",
|
|
34
|
+
"input__rightContent"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"messageField",
|
|
38
|
+
"input__messageField"
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"description",
|
|
42
|
+
"input__description"
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"invalidMessage",
|
|
46
|
+
"input__invalidMessage"
|
|
47
|
+
]
|
|
48
|
+
], u = /* @__PURE__ */ l.map(([e, t]) => [e, _(t, n, s(c, e))]), d = a((e = {}) => Object.fromEntries(u.map(([t, p]) => [t, p.recipeFn(e)]))), i = [], m = (e) => ({ ...n, ...r(e) }), g = /* @__PURE__ */ Object.assign(d, {
|
|
49
|
+
__recipe__: !1,
|
|
50
|
+
__name__: "textFieldRecipe",
|
|
51
|
+
raw: (e) => e,
|
|
52
|
+
variantKeys: i,
|
|
53
|
+
variantMap: {},
|
|
54
|
+
splitVariantProps(e) {
|
|
55
|
+
return o(e, i);
|
|
56
|
+
},
|
|
57
|
+
getVariantProps: m
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
g as textFieldRecipe
|
|
61
|
+
};
|