@stokelp/ui 1.6.4 → 1.7.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/components/box/Box.d.ts +8 -0
- package/dist/components/box/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/ui.cjs +3 -3
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +29 -25
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
3
|
-
import { Accordion as $, Checkbox as _, Dialog as C, ark as P, Portal as
|
|
3
|
+
import { Accordion as $, Checkbox as _, Dialog as C, ark as P, Portal as J, Switch as F, Tabs as R, Select as b } from "@ark-ui/react";
|
|
4
4
|
import { styled as i, splitCssProps as j } from "@stokelp/styled-system/jsx";
|
|
5
|
-
import { accordion as we, button as Ie, checkbox as
|
|
6
|
-
import { createContext as ze, forwardRef as k, useContext as Ae, createElement as Ne, useMemo as
|
|
7
|
-
import { cx as
|
|
5
|
+
import { accordion as we, button as Ie, checkbox as Z, drawer as Ce, formControl as Se, formLabel as O, formHelperText as ke, heading as Te, switchRecipe as K, text as _e, textarea as Ee, tabs as Re, select as Be, input as Fe, inputAddon as $e, inputGroup as De } from "@stokelp/styled-system/recipes";
|
|
6
|
+
import { createContext as ze, forwardRef as k, useContext as Ae, createElement as Ne, useMemo as G } from "react";
|
|
7
|
+
import { cx as Y, css as X } from "@stokelp/styled-system/css";
|
|
8
8
|
import { defineKeyframes as Pe, defineRecipe as w, defineSlotRecipe as T, defineSemanticTokens as Le, defineTextStyles as We, defineTokens as d, defineUtility as Ve, definePreset as Me } from "@pandacss/dev";
|
|
9
|
-
const
|
|
9
|
+
const Q = (...e) => e.filter(Boolean).join(" "), L = (e, t) => {
|
|
10
10
|
const o = ze(null);
|
|
11
11
|
return {
|
|
12
12
|
withContext: (m, s, u) => s ? k((c, H) => {
|
|
@@ -15,7 +15,7 @@ const K = (...e) => e.filter(Boolean).join(" "), L = (e, t) => {
|
|
|
15
15
|
...D && { "data-recipe-slot": s ?? "" },
|
|
16
16
|
...c,
|
|
17
17
|
...u == null ? void 0 : u.defaultProps,
|
|
18
|
-
className:
|
|
18
|
+
className: Q(B == null ? void 0 : B[s ?? ""], c.className),
|
|
19
19
|
ref: H
|
|
20
20
|
});
|
|
21
21
|
}) : m,
|
|
@@ -23,14 +23,14 @@ const K = (...e) => e.filter(Boolean).join(" "), L = (e, t) => {
|
|
|
23
23
|
const [B, D] = e.splitVariantProps({
|
|
24
24
|
...c,
|
|
25
25
|
...u == null ? void 0 : u.defaultProps
|
|
26
|
-
}),
|
|
27
|
-
return /* @__PURE__ */ a(o.Provider, { value:
|
|
26
|
+
}), q = e(B), xe = (t == null ? void 0 : t.dataAttr) ?? !1;
|
|
27
|
+
return /* @__PURE__ */ a(o.Provider, { value: q, children: /* @__PURE__ */ a(
|
|
28
28
|
m,
|
|
29
29
|
{
|
|
30
30
|
ref: H,
|
|
31
31
|
...xe && { "data-recipe-slot": s ?? "" },
|
|
32
32
|
...D,
|
|
33
|
-
className:
|
|
33
|
+
className: Q(q[s ?? ""], D.className)
|
|
34
34
|
}
|
|
35
35
|
) });
|
|
36
36
|
})
|
|
@@ -40,8 +40,8 @@ const K = (...e) => e.filter(Boolean).join(" "), L = (e, t) => {
|
|
|
40
40
|
children: /* @__PURE__ */ a("svg", { width: "16", height: "17", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ a("path", { d: "M4.94 6.03L8 9.08333L11.06 6.03L12 6.97L8 10.97L4 6.97L4.94 6.03Z", fill: "currentColor" }) })
|
|
41
41
|
}
|
|
42
42
|
}), ir = W(i($.ItemTrigger), "itemTrigger"), Oe = i("button", Ie), je = k((e, t) => {
|
|
43
|
-
const [o, r] =
|
|
44
|
-
return /* @__PURE__ */ v(_.Root, { ref: t, className:
|
|
43
|
+
const [o, r] = Z.splitVariantProps(e), [l, m] = j(r), { children: s, className: u, ...S } = m, c = Z(o);
|
|
44
|
+
return /* @__PURE__ */ v(_.Root, { ref: t, className: Y(c.root, X(l), u), ...S, children: [
|
|
45
45
|
/* @__PURE__ */ v(_.Control, { className: c.control, children: [
|
|
46
46
|
/* @__PURE__ */ a(_.Indicator, { children: /* @__PURE__ */ a(Ge, {}) }),
|
|
47
47
|
/* @__PURE__ */ a(_.Indicator, { indeterminate: !0, children: /* @__PURE__ */ a(Ye, {}) })
|
|
@@ -82,7 +82,7 @@ const Ge = () => /* @__PURE__ */ v("svg", { viewBox: "0 0 12 13", fill: "none",
|
|
|
82
82
|
);
|
|
83
83
|
ee.displayName = "DrawerHeader";
|
|
84
84
|
const dr = I(ee, "header"), cr = I(i(C.Title), "title"), ur = I(i(C.Trigger), "trigger"), qe = I(i(C.Positioner), "positioner"), Ze = I(i(C.Backdrop), "backdrop"), te = k(
|
|
85
|
-
({ children: e, ...t }, o) => /* @__PURE__ */ v(
|
|
85
|
+
({ children: e, ...t }, o) => /* @__PURE__ */ v(J, { children: [
|
|
86
86
|
/* @__PURE__ */ a(Ze, {}),
|
|
87
87
|
/* @__PURE__ */ a(qe, { children: /* @__PURE__ */ a(C.Content, { ref: o, ...t, children: e }) })
|
|
88
88
|
] })
|
|
@@ -100,18 +100,18 @@ const pr = I(i(te), "content"), Ke = i("div", Se, {
|
|
|
100
100
|
return /* @__PURE__ */ a(Ke, { ...r, ...o });
|
|
101
101
|
}, Qe = i("label", O), mr = (e) => {
|
|
102
102
|
const [t, o] = O.splitVariantProps(e), [r, l] = j(o), { children: m, className: s, addon: u, ...S } = l, c = O(t);
|
|
103
|
-
return /* @__PURE__ */ v(Qe, { className:
|
|
103
|
+
return /* @__PURE__ */ v(Qe, { className: Y(c.root, X(r), s), ...S, children: [
|
|
104
104
|
m,
|
|
105
105
|
u ? /* @__PURE__ */ a(i.span, { className: c.addon, children: u }) : null
|
|
106
106
|
] });
|
|
107
107
|
}, hr = i("p", ke, {
|
|
108
108
|
dataAttr: !0
|
|
109
109
|
}), vr = (e) => {
|
|
110
|
-
const { as: t = "h2", ...o } = e, r =
|
|
110
|
+
const { as: t = "h2", ...o } = e, r = G(() => i(t, Te), [t]);
|
|
111
111
|
return /* @__PURE__ */ a(r, { size: t, ...o });
|
|
112
112
|
}, Je = k((e, t) => {
|
|
113
|
-
const [o, r] =
|
|
114
|
-
return /* @__PURE__ */ v(F.Root, { ref: t, className:
|
|
113
|
+
const [o, r] = K.splitVariantProps(e), [l, m] = j(r), { children: s, className: u, ...S } = m, c = K(o);
|
|
114
|
+
return /* @__PURE__ */ v(F.Root, { ref: t, className: Y(c.root, X(l), u), ...S, children: [
|
|
115
115
|
/* @__PURE__ */ a(F.Control, { className: c.control, children: /* @__PURE__ */ a(F.Thumb, { className: c.thumb }) }),
|
|
116
116
|
s ? /* @__PURE__ */ a(F.Label, { className: c.label, children: s }) : null,
|
|
117
117
|
/* @__PURE__ */ a(F.HiddenInput, {})
|
|
@@ -119,7 +119,7 @@ const pr = I(i(te), "content"), Ke = i("div", Se, {
|
|
|
119
119
|
});
|
|
120
120
|
Je.displayName = "Switch";
|
|
121
121
|
const et = (e) => {
|
|
122
|
-
const { as: t = "p", ...o } = e, r =
|
|
122
|
+
const { as: t = "p", ...o } = e, r = G(() => i(t, _e), [t]);
|
|
123
123
|
return /* @__PURE__ */ a(r, { ...o });
|
|
124
124
|
}, br = i(P.textarea, Ee), { withProvider: tt, withContext: V } = L(Re), fr = tt(i(R.Root), "root", {
|
|
125
125
|
defaultProps: {
|
|
@@ -170,7 +170,7 @@ const wr = V(i(oe), "list"), rt = ({ children: e, when: t, wrapper: o }) => t ==
|
|
|
170
170
|
}
|
|
171
171
|
) }) })
|
|
172
172
|
] }) }),
|
|
173
|
-
/* @__PURE__ */ a(rt, { when: r, wrapper: (s) => /* @__PURE__ */ a(
|
|
173
|
+
/* @__PURE__ */ a(rt, { when: r, wrapper: (s) => /* @__PURE__ */ a(J, { children: s }), children: /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(lt, { children: e.length === 0 ? /* @__PURE__ */ a(et, { px: "space-8", textAlign: "center", children: o ?? "Aucun résultat" }) : e.map((s) => /* @__PURE__ */ v(ct, { item: s, children: [
|
|
174
174
|
/* @__PURE__ */ a(pt, { truncate: !0, children: s.label }),
|
|
175
175
|
m.multiple ? /* @__PURE__ */ a(ut, { children: "✓" }) : null
|
|
176
176
|
] }, s.value)) }) }) }),
|
|
@@ -181,7 +181,10 @@ const wr = V(i(oe), "list"), rt = ({ children: e, when: t, wrapper: o }) => t ==
|
|
|
181
181
|
dataAttr: !0
|
|
182
182
|
}), Sr = i("div", $e, {
|
|
183
183
|
dataAttr: !0
|
|
184
|
-
}), kr = i("div", De),
|
|
184
|
+
}), kr = i("div", De), Tr = (e) => {
|
|
185
|
+
const { as: t = "div", ...o } = e, r = G(() => i(t), [t]);
|
|
186
|
+
return /* @__PURE__ */ a(r, { ...o });
|
|
187
|
+
}, vt = {
|
|
185
188
|
xl: "1536px",
|
|
186
189
|
lg: "1200px",
|
|
187
190
|
md: "900px",
|
|
@@ -1058,7 +1061,7 @@ function ro(e) {
|
|
|
1058
1061
|
};
|
|
1059
1062
|
return { ...t, ...e };
|
|
1060
1063
|
}
|
|
1061
|
-
var
|
|
1064
|
+
var U = () => (e) => Array.from(new Set(e)), ve = x("tabs").parts("root", "list", "trigger", "content", "indicator");
|
|
1062
1065
|
ve.build();
|
|
1063
1066
|
var n = ro({
|
|
1064
1067
|
getRootId: (e) => {
|
|
@@ -1118,7 +1121,7 @@ var n = ro({
|
|
|
1118
1121
|
top: `${e.top}px`
|
|
1119
1122
|
})
|
|
1120
1123
|
});
|
|
1121
|
-
|
|
1124
|
+
U()([
|
|
1122
1125
|
"activationMode",
|
|
1123
1126
|
"composite",
|
|
1124
1127
|
"dir",
|
|
@@ -1132,8 +1135,8 @@ X()([
|
|
|
1132
1135
|
"translations",
|
|
1133
1136
|
"value"
|
|
1134
1137
|
]);
|
|
1135
|
-
|
|
1136
|
-
|
|
1138
|
+
U()(["disabled", "value"]);
|
|
1139
|
+
U()(["value"]);
|
|
1137
1140
|
const ao = T({
|
|
1138
1141
|
base: {
|
|
1139
1142
|
control: {
|
|
@@ -2913,7 +2916,7 @@ const Wo = d.fontSizes({
|
|
|
2913
2916
|
extend: {
|
|
2914
2917
|
boxSize: Yo
|
|
2915
2918
|
}
|
|
2916
|
-
},
|
|
2919
|
+
}, _r = Me({
|
|
2917
2920
|
staticCss: {
|
|
2918
2921
|
recipes: "*"
|
|
2919
2922
|
},
|
|
@@ -2936,6 +2939,7 @@ export {
|
|
|
2936
2939
|
rr as AccordionItemContent,
|
|
2937
2940
|
ar as AccordionItemIndicator,
|
|
2938
2941
|
ir as AccordionItemTrigger,
|
|
2942
|
+
Tr as Box,
|
|
2939
2943
|
Oe as Button,
|
|
2940
2944
|
je as Checkbox,
|
|
2941
2945
|
nr as Drawer,
|
|
@@ -2961,6 +2965,6 @@ export {
|
|
|
2961
2965
|
xr as TabsTrigger,
|
|
2962
2966
|
et as Text,
|
|
2963
2967
|
br as Textarea,
|
|
2964
|
-
|
|
2968
|
+
_r as preset
|
|
2965
2969
|
};
|
|
2966
2970
|
//# sourceMappingURL=ui.js.map
|