componentables 0.1.4 → 0.1.5
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/componentables.css +1 -1
- package/dist/context/ThemeProvider.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +76 -76
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import I, { useMemo as
|
|
1
|
+
import I, { useMemo as Se, useEffect as K, createContext as De, useContext as Ae, useState as T, useCallback as ye, useRef as ce } from "react";
|
|
2
2
|
import { jsxs as k, jsx as l } from "react/jsx-runtime";
|
|
3
|
-
function
|
|
3
|
+
function xe(e) {
|
|
4
4
|
var r, t, o = "";
|
|
5
5
|
if (typeof e == "string" || typeof e == "number") o += e;
|
|
6
6
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
7
7
|
var n = e.length;
|
|
8
|
-
for (r = 0; r < n; r++) e[r] && (t =
|
|
8
|
+
for (r = 0; r < n; r++) e[r] && (t = xe(e[r])) && (o && (o += " "), o += t);
|
|
9
9
|
} else for (t in e) e[t] && (o && (o += " "), o += t);
|
|
10
10
|
return o;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
for (var e, r, t = 0, o = "", n = arguments.length; t < n; t++) (e = arguments[t]) && (r =
|
|
12
|
+
function je() {
|
|
13
|
+
for (var e, r, t = 0, o = "", n = arguments.length; t < n; t++) (e = arguments[t]) && (r = xe(e)) && (o && (o += " "), o += r);
|
|
14
14
|
return o;
|
|
15
15
|
}
|
|
16
|
-
const ie = "-",
|
|
17
|
-
const r =
|
|
16
|
+
const ie = "-", Oe = (e) => {
|
|
17
|
+
const r = Ie(e), {
|
|
18
18
|
conflictingClassGroups: t,
|
|
19
19
|
conflictingClassGroupModifiers: o
|
|
20
20
|
} = e;
|
|
21
21
|
return {
|
|
22
22
|
getClassGroupId: (i) => {
|
|
23
23
|
const a = i.split(ie);
|
|
24
|
-
return a[0] === "" && a.length !== 1 && a.shift(),
|
|
24
|
+
return a[0] === "" && a.length !== 1 && a.shift(), ve(a, r) || Ee(i);
|
|
25
25
|
},
|
|
26
26
|
getConflictingClassGroupIds: (i, a) => {
|
|
27
27
|
const p = t[i] || [];
|
|
28
28
|
return a && o[i] ? [...p, ...o[i]] : p;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
},
|
|
31
|
+
}, ve = (e, r) => {
|
|
32
32
|
if (e.length === 0)
|
|
33
33
|
return r.classGroupId;
|
|
34
|
-
const t = e[0], o = r.nextPart.get(t), n = o ?
|
|
34
|
+
const t = e[0], o = r.nextPart.get(t), n = o ? ve(e.slice(1), o) : void 0;
|
|
35
35
|
if (n)
|
|
36
36
|
return n;
|
|
37
37
|
if (r.validators.length === 0)
|
|
@@ -40,13 +40,13 @@ const ie = "-", je = (e) => {
|
|
|
40
40
|
return r.validators.find(({
|
|
41
41
|
validator: i
|
|
42
42
|
}) => i(s))?.classGroupId;
|
|
43
|
-
}, de = /^\[(.+)\]$/,
|
|
43
|
+
}, de = /^\[(.+)\]$/, Ee = (e) => {
|
|
44
44
|
if (de.test(e)) {
|
|
45
45
|
const r = de.exec(e)[1], t = r?.substring(0, r.indexOf(":"));
|
|
46
46
|
if (t)
|
|
47
47
|
return "arbitrary.." + t;
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, Ie = (e) => {
|
|
50
50
|
const {
|
|
51
51
|
theme: r,
|
|
52
52
|
prefix: t
|
|
@@ -54,7 +54,7 @@ const ie = "-", je = (e) => {
|
|
|
54
54
|
nextPart: /* @__PURE__ */ new Map(),
|
|
55
55
|
validators: []
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return Re(Object.entries(e.classGroups), t).forEach(([s, i]) => {
|
|
58
58
|
ae(i, o, s, r);
|
|
59
59
|
}), o;
|
|
60
60
|
}, ae = (e, r, t, o) => {
|
|
@@ -65,7 +65,7 @@ const ie = "-", je = (e) => {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
if (typeof n == "function") {
|
|
68
|
-
if (
|
|
68
|
+
if (Te(n)) {
|
|
69
69
|
ae(n(o), r, t, o);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
@@ -87,10 +87,10 @@ const ie = "-", je = (e) => {
|
|
|
87
87
|
validators: []
|
|
88
88
|
}), t = t.nextPart.get(o);
|
|
89
89
|
}), t;
|
|
90
|
-
},
|
|
90
|
+
}, Te = (e) => e.isThemeGetter, Re = (e, r) => r ? e.map(([t, o]) => {
|
|
91
91
|
const n = o.map((s) => typeof s == "string" ? r + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([i, a]) => [r + i, a])) : s);
|
|
92
92
|
return [t, n];
|
|
93
|
-
}) : e,
|
|
93
|
+
}) : e, Ve = (e) => {
|
|
94
94
|
if (e < 1)
|
|
95
95
|
return {
|
|
96
96
|
get: () => {
|
|
@@ -114,7 +114,7 @@ const ie = "-", je = (e) => {
|
|
|
114
114
|
t.has(s) ? t.set(s, i) : n(s, i);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
-
},
|
|
117
|
+
}, we = "!", Ge = (e) => {
|
|
118
118
|
const {
|
|
119
119
|
separator: r,
|
|
120
120
|
experimentalParseClassName: t
|
|
@@ -135,7 +135,7 @@ const ie = "-", je = (e) => {
|
|
|
135
135
|
}
|
|
136
136
|
y === "[" ? c++ : y === "]" && c--;
|
|
137
137
|
}
|
|
138
|
-
const w = p.length === 0 ? a : a.substring(m), v = w.startsWith(
|
|
138
|
+
const w = p.length === 0 ? a : a.substring(m), v = w.startsWith(we), f = v ? w.substring(1) : w, g = C && C > m ? C - m : void 0;
|
|
139
139
|
return {
|
|
140
140
|
modifiers: p,
|
|
141
141
|
hasImportantModifier: v,
|
|
@@ -147,7 +147,7 @@ const ie = "-", je = (e) => {
|
|
|
147
147
|
className: a,
|
|
148
148
|
parseClassName: i
|
|
149
149
|
}) : i;
|
|
150
|
-
},
|
|
150
|
+
}, Fe = (e) => {
|
|
151
151
|
if (e.length <= 1)
|
|
152
152
|
return e;
|
|
153
153
|
const r = [];
|
|
@@ -155,16 +155,16 @@ const ie = "-", je = (e) => {
|
|
|
155
155
|
return e.forEach((o) => {
|
|
156
156
|
o[0] === "[" ? (r.push(...t.sort(), o), t = []) : t.push(o);
|
|
157
157
|
}), r.push(...t.sort()), r;
|
|
158
|
-
},
|
|
159
|
-
cache:
|
|
160
|
-
parseClassName:
|
|
161
|
-
...
|
|
162
|
-
}),
|
|
158
|
+
}, Be = (e) => ({
|
|
159
|
+
cache: Ve(e.cacheSize),
|
|
160
|
+
parseClassName: Ge(e),
|
|
161
|
+
...Oe(e)
|
|
162
|
+
}), _e = /\s+/, $e = (e, r) => {
|
|
163
163
|
const {
|
|
164
164
|
parseClassName: t,
|
|
165
165
|
getClassGroupId: o,
|
|
166
166
|
getConflictingClassGroupIds: n
|
|
167
|
-
} = r, s = [], i = e.trim().split(
|
|
167
|
+
} = r, s = [], i = e.trim().split(_e);
|
|
168
168
|
let a = "";
|
|
169
169
|
for (let p = i.length - 1; p >= 0; p -= 1) {
|
|
170
170
|
const c = i[p], {
|
|
@@ -185,7 +185,7 @@ const ie = "-", je = (e) => {
|
|
|
185
185
|
}
|
|
186
186
|
f = !1;
|
|
187
187
|
}
|
|
188
|
-
const d =
|
|
188
|
+
const d = Fe(m).join(":"), y = C ? d + we : d, b = y + g;
|
|
189
189
|
if (s.includes(b))
|
|
190
190
|
continue;
|
|
191
191
|
s.push(b);
|
|
@@ -198,49 +198,49 @@ const ie = "-", je = (e) => {
|
|
|
198
198
|
}
|
|
199
199
|
return a;
|
|
200
200
|
};
|
|
201
|
-
function
|
|
201
|
+
function We() {
|
|
202
202
|
let e = 0, r, t, o = "";
|
|
203
203
|
for (; e < arguments.length; )
|
|
204
|
-
(r = arguments[e++]) && (t =
|
|
204
|
+
(r = arguments[e++]) && (t = ke(r)) && (o && (o += " "), o += t);
|
|
205
205
|
return o;
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const ke = (e) => {
|
|
208
208
|
if (typeof e == "string")
|
|
209
209
|
return e;
|
|
210
210
|
let r, t = "";
|
|
211
211
|
for (let o = 0; o < e.length; o++)
|
|
212
|
-
e[o] && (r =
|
|
212
|
+
e[o] && (r = ke(e[o])) && (t && (t += " "), t += r);
|
|
213
213
|
return t;
|
|
214
214
|
};
|
|
215
|
-
function
|
|
215
|
+
function Ue(e, ...r) {
|
|
216
216
|
let t, o, n, s = i;
|
|
217
217
|
function i(p) {
|
|
218
218
|
const c = r.reduce((m, C) => C(m), e());
|
|
219
|
-
return t =
|
|
219
|
+
return t = Be(c), o = t.cache.get, n = t.cache.set, s = a, a(p);
|
|
220
220
|
}
|
|
221
221
|
function a(p) {
|
|
222
222
|
const c = o(p);
|
|
223
223
|
if (c)
|
|
224
224
|
return c;
|
|
225
|
-
const m =
|
|
225
|
+
const m = $e(p, t);
|
|
226
226
|
return n(p, m), m;
|
|
227
227
|
}
|
|
228
228
|
return function() {
|
|
229
|
-
return s(
|
|
229
|
+
return s(We.apply(null, arguments));
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
const D = (e) => {
|
|
233
233
|
const r = (t) => t[e] || [];
|
|
234
234
|
return r.isThemeGetter = !0, r;
|
|
235
|
-
},
|
|
236
|
-
const o =
|
|
235
|
+
}, Ce = /^\[(?:([a-z-]+):)?(.+)\]$/i, He = /^\d+\/\d+$/, Ye = /* @__PURE__ */ new Set(["px", "full", "screen"]), Ke = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Je = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Xe = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ze = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, qe = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, V = (e) => J(e) || Ye.has(e) || He.test(e), G = (e) => X(e, "length", ar), J = (e) => !!e && !Number.isNaN(Number(e)), ne = (e) => X(e, "number", J), q = (e) => !!e && Number.isInteger(Number(e)), Qe = (e) => e.endsWith("%") && J(e.slice(0, -1)), x = (e) => Ce.test(e), F = (e) => Ke.test(e), er = /* @__PURE__ */ new Set(["length", "size", "percentage"]), rr = (e) => X(e, er, Ne), tr = (e) => X(e, "position", Ne), or = /* @__PURE__ */ new Set(["image", "url"]), nr = (e) => X(e, or, ir), sr = (e) => X(e, "", lr), Q = () => !0, X = (e, r, t) => {
|
|
236
|
+
const o = Ce.exec(e);
|
|
237
237
|
return o ? o[1] ? typeof r == "string" ? o[1] === r : r.has(o[1]) : t(o[2]) : !1;
|
|
238
|
-
},
|
|
238
|
+
}, ar = (e) => (
|
|
239
239
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
240
240
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
241
241
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
242
|
-
|
|
243
|
-
),
|
|
242
|
+
Je.test(e) && !Xe.test(e)
|
|
243
|
+
), Ne = () => !1, lr = (e) => Ze.test(e), ir = (e) => qe.test(e), cr = () => {
|
|
244
244
|
const e = D("colors"), r = D("spacing"), t = D("blur"), o = D("brightness"), n = D("borderColor"), s = D("borderRadius"), i = D("borderSpacing"), a = D("borderWidth"), p = D("contrast"), c = D("grayscale"), m = D("hueRotate"), C = D("invert"), w = D("gap"), v = D("gradientColorStops"), f = D("gradientColorStopPositions"), g = D("inset"), d = D("margin"), y = D("opacity"), b = D("padding"), P = D("saturate"), M = D("scale"), j = D("sepia"), N = D("skew"), z = D("space"), W = D("translate"), R = () => ["auto", "contain", "none"], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], Z = () => ["auto", x, r], S = () => [x, r], U = () => ["", V, G], H = () => ["auto", J, x], ee = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], $ = () => ["solid", "dashed", "dotted", "double", "none"], re = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], h = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], L = () => ["", "0", x], O = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], E = () => [J, x];
|
|
245
245
|
return {
|
|
246
246
|
cacheSize: 500,
|
|
@@ -260,7 +260,7 @@ const D = (e) => {
|
|
|
260
260
|
invert: L(),
|
|
261
261
|
gap: S(),
|
|
262
262
|
gradientColorStops: [e],
|
|
263
|
-
gradientColorStopPositions: [
|
|
263
|
+
gradientColorStopPositions: [Qe, G],
|
|
264
264
|
inset: Z(),
|
|
265
265
|
margin: Z(),
|
|
266
266
|
opacity: E(),
|
|
@@ -1173,7 +1173,7 @@ const D = (e) => {
|
|
|
1173
1173
|
* @see https://tailwindcss.com/docs/background-position
|
|
1174
1174
|
*/
|
|
1175
1175
|
"bg-position": [{
|
|
1176
|
-
bg: [...ee(),
|
|
1176
|
+
bg: [...ee(), tr]
|
|
1177
1177
|
}],
|
|
1178
1178
|
/**
|
|
1179
1179
|
* Background Repeat
|
|
@@ -1189,7 +1189,7 @@ const D = (e) => {
|
|
|
1189
1189
|
* @see https://tailwindcss.com/docs/background-size
|
|
1190
1190
|
*/
|
|
1191
1191
|
"bg-size": [{
|
|
1192
|
-
bg: ["auto", "cover", "contain",
|
|
1192
|
+
bg: ["auto", "cover", "contain", rr]
|
|
1193
1193
|
}],
|
|
1194
1194
|
/**
|
|
1195
1195
|
* Background Image
|
|
@@ -1198,7 +1198,7 @@ const D = (e) => {
|
|
|
1198
1198
|
"bg-image": [{
|
|
1199
1199
|
bg: ["none", {
|
|
1200
1200
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1201
|
-
},
|
|
1201
|
+
}, nr]
|
|
1202
1202
|
}],
|
|
1203
1203
|
/**
|
|
1204
1204
|
* Background Color
|
|
@@ -1614,7 +1614,7 @@ const D = (e) => {
|
|
|
1614
1614
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
1615
1615
|
*/
|
|
1616
1616
|
shadow: [{
|
|
1617
|
-
shadow: ["", "inner", "none", F,
|
|
1617
|
+
shadow: ["", "inner", "none", F, sr]
|
|
1618
1618
|
}],
|
|
1619
1619
|
/**
|
|
1620
1620
|
* Box Shadow Color
|
|
@@ -2269,11 +2269,11 @@ const D = (e) => {
|
|
|
2269
2269
|
"font-size": ["leading"]
|
|
2270
2270
|
}
|
|
2271
2271
|
};
|
|
2272
|
-
},
|
|
2272
|
+
}, dr = /* @__PURE__ */ Ue(cr);
|
|
2273
2273
|
function u(...e) {
|
|
2274
|
-
return
|
|
2274
|
+
return dr(je(e));
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2276
|
+
function ur(e) {
|
|
2277
2277
|
const r = parseInt(e.slice(1, 3), 16) / 255, t = parseInt(e.slice(3, 5), 16) / 255, o = parseInt(e.slice(5, 7), 16) / 255, n = Math.max(r, t, o), s = Math.min(r, t, o);
|
|
2278
2278
|
let i = 0, a = 0;
|
|
2279
2279
|
const p = (n + s) / 2;
|
|
@@ -2302,7 +2302,7 @@ function pe(e, r, t) {
|
|
|
2302
2302
|
return `#${n(0)}${n(8)}${n(4)}`;
|
|
2303
2303
|
}
|
|
2304
2304
|
function se(e) {
|
|
2305
|
-
const [r, t, o] =
|
|
2305
|
+
const [r, t, o] = ur(e);
|
|
2306
2306
|
return {
|
|
2307
2307
|
base: e,
|
|
2308
2308
|
light: pe(r, Math.max(0, t - 10), Math.min(100, o + 15)),
|
|
@@ -2332,11 +2332,11 @@ const A = {
|
|
|
2332
2332
|
light: "#f9fafb",
|
|
2333
2333
|
active: "#4338ca"
|
|
2334
2334
|
}
|
|
2335
|
-
},
|
|
2335
|
+
}, Me = De(A);
|
|
2336
2336
|
function Or() {
|
|
2337
|
-
return
|
|
2337
|
+
return Ae(Me);
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function be(e) {
|
|
2340
2340
|
const r = document.documentElement;
|
|
2341
2341
|
r.style.setProperty("--componentables-primary", e.colors.primary), r.style.setProperty(
|
|
2342
2342
|
"--componentables-primary-light",
|
|
@@ -2374,7 +2374,7 @@ function Er({
|
|
|
2374
2374
|
children: e,
|
|
2375
2375
|
theme: r
|
|
2376
2376
|
}) {
|
|
2377
|
-
const t =
|
|
2377
|
+
const t = Se(() => {
|
|
2378
2378
|
const o = r?.colors || {}, n = o.primary ? se(o.primary) : null, s = o.secondary ? se(o.secondary) : null, i = o.danger ? se(o.danger) : null;
|
|
2379
2379
|
return {
|
|
2380
2380
|
colors: {
|
|
@@ -2401,9 +2401,9 @@ function Er({
|
|
|
2401
2401
|
}
|
|
2402
2402
|
};
|
|
2403
2403
|
}, [r]);
|
|
2404
|
-
return K(() => {
|
|
2405
|
-
|
|
2406
|
-
}, [t]), I.createElement(
|
|
2404
|
+
return typeof window < "u" && be(t), K(() => {
|
|
2405
|
+
be(t);
|
|
2406
|
+
}, [t]), I.createElement(Me.Provider, { value: t }, e);
|
|
2407
2407
|
}
|
|
2408
2408
|
const pr = {
|
|
2409
2409
|
primary: "bg-primary text-white border-primary hover:bg-primary-dark hover:border-primary-dark active:bg-active",
|
|
@@ -2722,13 +2722,13 @@ function Rr({
|
|
|
2722
2722
|
)
|
|
2723
2723
|
] });
|
|
2724
2724
|
}
|
|
2725
|
-
var
|
|
2725
|
+
var ze = {
|
|
2726
2726
|
color: void 0,
|
|
2727
2727
|
size: void 0,
|
|
2728
2728
|
className: void 0,
|
|
2729
2729
|
style: void 0,
|
|
2730
2730
|
attr: void 0
|
|
2731
|
-
},
|
|
2731
|
+
}, me = I.createContext && /* @__PURE__ */ I.createContext(ze), mr = ["attr", "size", "title"];
|
|
2732
2732
|
function gr(e, r) {
|
|
2733
2733
|
if (e == null) return {};
|
|
2734
2734
|
var t = fr(e, r), o, n;
|
|
@@ -2759,7 +2759,7 @@ function te() {
|
|
|
2759
2759
|
return e;
|
|
2760
2760
|
}, te.apply(this, arguments);
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function ge(e, r) {
|
|
2763
2763
|
var t = Object.keys(e);
|
|
2764
2764
|
if (Object.getOwnPropertySymbols) {
|
|
2765
2765
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -2772,9 +2772,9 @@ function me(e, r) {
|
|
|
2772
2772
|
function oe(e) {
|
|
2773
2773
|
for (var r = 1; r < arguments.length; r++) {
|
|
2774
2774
|
var t = arguments[r] != null ? arguments[r] : {};
|
|
2775
|
-
r % 2 ?
|
|
2775
|
+
r % 2 ? ge(Object(t), !0).forEach(function(o) {
|
|
2776
2776
|
hr(e, o, t[o]);
|
|
2777
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
2777
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ge(Object(t)).forEach(function(o) {
|
|
2778
2778
|
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
2779
2779
|
});
|
|
2780
2780
|
}
|
|
@@ -2797,15 +2797,15 @@ function xr(e, r) {
|
|
|
2797
2797
|
}
|
|
2798
2798
|
return (r === "string" ? String : Number)(e);
|
|
2799
2799
|
}
|
|
2800
|
-
function
|
|
2800
|
+
function Le(e) {
|
|
2801
2801
|
return e && e.map((r, t) => /* @__PURE__ */ I.createElement(r.tag, oe({
|
|
2802
2802
|
key: t
|
|
2803
|
-
}, r.attr),
|
|
2803
|
+
}, r.attr), Le(r.child)));
|
|
2804
2804
|
}
|
|
2805
2805
|
function B(e) {
|
|
2806
2806
|
return (r) => /* @__PURE__ */ I.createElement(vr, te({
|
|
2807
2807
|
attr: oe({}, e.attr)
|
|
2808
|
-
}, r),
|
|
2808
|
+
}, r), Le(e.child));
|
|
2809
2809
|
}
|
|
2810
2810
|
function vr(e) {
|
|
2811
2811
|
var r = (t) => {
|
|
@@ -2828,7 +2828,7 @@ function vr(e) {
|
|
|
2828
2828
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2829
2829
|
}), s && /* @__PURE__ */ I.createElement("title", null, s), e.children);
|
|
2830
2830
|
};
|
|
2831
|
-
return
|
|
2831
|
+
return me !== void 0 ? /* @__PURE__ */ I.createElement(me.Consumer, null, (t) => r(t)) : r(ze);
|
|
2832
2832
|
}
|
|
2833
2833
|
function wr(e) {
|
|
2834
2834
|
return B({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(e);
|
|
@@ -2855,7 +2855,7 @@ function Vr({
|
|
|
2855
2855
|
debounceDelay: a = 500,
|
|
2856
2856
|
...p
|
|
2857
2857
|
}) {
|
|
2858
|
-
const [c, m] = T(e || ""), C = kr(c, a), w =
|
|
2858
|
+
const [c, m] = T(e || ""), C = kr(c, a), w = ye(r, [r]);
|
|
2859
2859
|
K(() => {
|
|
2860
2860
|
w(C);
|
|
2861
2861
|
}, [C, w]);
|
|
@@ -2958,7 +2958,7 @@ function Gr({
|
|
|
2958
2958
|
)
|
|
2959
2959
|
] });
|
|
2960
2960
|
}
|
|
2961
|
-
function
|
|
2961
|
+
function Pe(e) {
|
|
2962
2962
|
return B({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "48", d: "m112 184 144 144 144-144" }, child: [] }] })(e);
|
|
2963
2963
|
}
|
|
2964
2964
|
function Mr(e) {
|
|
@@ -3031,7 +3031,7 @@ function Fr({
|
|
|
3031
3031
|
d(),
|
|
3032
3032
|
v && "rotate-180"
|
|
3033
3033
|
),
|
|
3034
|
-
children: /* @__PURE__ */ l(
|
|
3034
|
+
children: /* @__PURE__ */ l(Pe, { className: "h-5 w-5" })
|
|
3035
3035
|
}
|
|
3036
3036
|
)
|
|
3037
3037
|
] })
|
|
@@ -3122,10 +3122,10 @@ function _r({
|
|
|
3122
3122
|
/* @__PURE__ */ l("div", { role: "tabpanel", id: `tabpanel-${c}`, children: v })
|
|
3123
3123
|
] });
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3125
|
+
function fe(e) {
|
|
3126
3126
|
return B({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }, child: [] }] })(e);
|
|
3127
3127
|
}
|
|
3128
|
-
function
|
|
3128
|
+
function he(e) {
|
|
3129
3129
|
return B({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }, child: [] }] })(e);
|
|
3130
3130
|
}
|
|
3131
3131
|
const Lr = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Pr = [
|
|
@@ -3278,7 +3278,7 @@ function $r({
|
|
|
3278
3278
|
M.button,
|
|
3279
3279
|
t && "opacity-50 cursor-not-allowed"
|
|
3280
3280
|
),
|
|
3281
|
-
children: /* @__PURE__ */ l(
|
|
3281
|
+
children: /* @__PURE__ */ l(fe, { size: 18 })
|
|
3282
3282
|
}
|
|
3283
3283
|
),
|
|
3284
3284
|
/* @__PURE__ */ l("h2", { className: "font-semibold text-lg", children: c.getFullYear() }),
|
|
@@ -3293,7 +3293,7 @@ function $r({
|
|
|
3293
3293
|
M.button,
|
|
3294
3294
|
t && "opacity-50 cursor-not-allowed"
|
|
3295
3295
|
),
|
|
3296
|
-
children: /* @__PURE__ */ l(
|
|
3296
|
+
children: /* @__PURE__ */ l(he, { size: 18 })
|
|
3297
3297
|
}
|
|
3298
3298
|
)
|
|
3299
3299
|
]
|
|
@@ -3311,7 +3311,7 @@ function $r({
|
|
|
3311
3311
|
M.button,
|
|
3312
3312
|
t && "opacity-50 cursor-not-allowed"
|
|
3313
3313
|
),
|
|
3314
|
-
children: /* @__PURE__ */ l(
|
|
3314
|
+
children: /* @__PURE__ */ l(fe, { size: 18 })
|
|
3315
3315
|
}
|
|
3316
3316
|
),
|
|
3317
3317
|
/* @__PURE__ */ l("h2", { className: "font-semibold text-lg", children: a[c.getMonth()] }),
|
|
@@ -3326,7 +3326,7 @@ function $r({
|
|
|
3326
3326
|
M.button,
|
|
3327
3327
|
t && "opacity-50 cursor-not-allowed"
|
|
3328
3328
|
),
|
|
3329
|
-
children: /* @__PURE__ */ l(
|
|
3329
|
+
children: /* @__PURE__ */ l(he, { size: 18 })
|
|
3330
3330
|
}
|
|
3331
3331
|
)
|
|
3332
3332
|
] })
|
|
@@ -3549,7 +3549,7 @@ function Ur({
|
|
|
3549
3549
|
}, [t, r]), K(() => {
|
|
3550
3550
|
d && i && _.current && _.current.focus();
|
|
3551
3551
|
}, [d, i]);
|
|
3552
|
-
const U =
|
|
3552
|
+
const U = ye(() => {
|
|
3553
3553
|
if (!R.current) return;
|
|
3554
3554
|
const h = R.current.getBoundingClientRect(), L = window.innerHeight, O = 250, Y = L - h.bottom < O && h.top > O;
|
|
3555
3555
|
j({
|
|
@@ -3631,7 +3631,7 @@ function Ur({
|
|
|
3631
3631
|
"h-5 w-5 transition-transform duration-200",
|
|
3632
3632
|
d && "rotate-180"
|
|
3633
3633
|
),
|
|
3634
|
-
children: /* @__PURE__ */ l(
|
|
3634
|
+
children: /* @__PURE__ */ l(Pe, { className: "h-5 w-5" })
|
|
3635
3635
|
}
|
|
3636
3636
|
)
|
|
3637
3637
|
]
|
|
@@ -3753,7 +3753,7 @@ export {
|
|
|
3753
3753
|
u as cn,
|
|
3754
3754
|
A as defaultTheme,
|
|
3755
3755
|
se as generateColorVariants,
|
|
3756
|
-
|
|
3756
|
+
ur as hexToHsl,
|
|
3757
3757
|
pe as hslToHex,
|
|
3758
3758
|
Or as useTheme
|
|
3759
3759
|
};
|