@react-devtools-plus/ui 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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +664 -0
- package/dist/index.js +581 -0
- package/dist/index.js.map +1 -0
- package/dist/theme.cjs +5 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.ts +372 -0
- package/dist/theme.js +474 -0
- package/dist/theme.js.map +1 -0
- package/dist/ui.css +1 -0
- package/package.json +52 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
var R = Object.defineProperty, Z = Object.defineProperties;
|
|
2
|
+
var H = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var I = Object.getOwnPropertySymbols;
|
|
4
|
+
var j = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var L = (o, e, _) => e in o ? R(o, e, { enumerable: !0, configurable: !0, writable: !0, value: _ }) : o[e] = _, u = (o, e) => {
|
|
6
|
+
for (var _ in e || (e = {}))
|
|
7
|
+
j.call(e, _) && L(o, _, e[_]);
|
|
8
|
+
if (I)
|
|
9
|
+
for (var _ of I(e))
|
|
10
|
+
E.call(e, _) && L(o, _, e[_]);
|
|
11
|
+
return o;
|
|
12
|
+
}, b = (o, e) => Z(o, H(e));
|
|
13
|
+
var B = (o, e) => {
|
|
14
|
+
var _ = {};
|
|
15
|
+
for (var s in o)
|
|
16
|
+
j.call(o, s) && e.indexOf(s) < 0 && (_[s] = o[s]);
|
|
17
|
+
if (o != null && I)
|
|
18
|
+
for (var s of I(o))
|
|
19
|
+
e.indexOf(s) < 0 && E.call(o, s) && (_[s] = o[s]);
|
|
20
|
+
return _;
|
|
21
|
+
};
|
|
22
|
+
import { jsx as n, jsxs as z } from "react/jsx-runtime";
|
|
23
|
+
import { forwardRef as M, createContext as D, useState as F, useRef as K, useEffect as C, useMemo as J, useContext as Y } from "react";
|
|
24
|
+
import { flushSync as Q } from "react-dom";
|
|
25
|
+
import { createTheme as V, applyTheme as X, watchSystemDarkMode as G, resolveThemeMode as q } from "./theme.js";
|
|
26
|
+
import { PRESET_COLORS as qo, borderRadius as Ao, detectSystemDarkMode as Uo, generateCSSVariables as e_, generateColorPalette as o_, generateNeutralColors as __, generateSemanticColors as t_, resolveThemeColor as s_, shadows as r_, spacing as n_, transitions as a_, typography as l_, zIndex as c_ } from "./theme.js";
|
|
27
|
+
const A = "Badge-module__wrapper___DxhQK", U = "Badge-module__badge___RsuMz", ee = "Badge-module__standalone___etUpX", oe = "Badge-module__dot___i0c-G", _e = "Badge-module__size-sm___C5J66", te = "Badge-module__size-lg___nYU0Z", se = "Badge-module__color-primary___LWp2-", re = "Badge-module__color-success___tWyRo", ne = "Badge-module__color-warning___9Jy7J", ae = "Badge-module__color-error___rwZFr", le = "Badge-module__color-info___CkG5J", ce = "Badge-module__color-neutral___KWbX-", p = {
|
|
28
|
+
wrapper: A,
|
|
29
|
+
badge: U,
|
|
30
|
+
standalone: ee,
|
|
31
|
+
dot: oe,
|
|
32
|
+
"size-sm": "Badge-module__size-sm___C5J66",
|
|
33
|
+
sizeSm: _e,
|
|
34
|
+
"size-lg": "Badge-module__size-lg___nYU0Z",
|
|
35
|
+
sizeLg: te,
|
|
36
|
+
"color-primary": "Badge-module__color-primary___LWp2-",
|
|
37
|
+
colorPrimary: se,
|
|
38
|
+
"color-success": "Badge-module__color-success___tWyRo",
|
|
39
|
+
colorSuccess: re,
|
|
40
|
+
"color-warning": "Badge-module__color-warning___9Jy7J",
|
|
41
|
+
colorWarning: ne,
|
|
42
|
+
"color-error": "Badge-module__color-error___rwZFr",
|
|
43
|
+
colorError: ae,
|
|
44
|
+
"color-info": "Badge-module__color-info___CkG5J",
|
|
45
|
+
colorInfo: le,
|
|
46
|
+
"color-neutral": "Badge-module__color-neutral___KWbX-",
|
|
47
|
+
colorNeutral: ce
|
|
48
|
+
}, Ho = ({
|
|
49
|
+
children: o,
|
|
50
|
+
count: e = 0,
|
|
51
|
+
dot: _ = !1,
|
|
52
|
+
max: s = 99,
|
|
53
|
+
color: r = "primary",
|
|
54
|
+
size: a = "md",
|
|
55
|
+
showZero: c = !1,
|
|
56
|
+
className: m = "",
|
|
57
|
+
style: t
|
|
58
|
+
}) => {
|
|
59
|
+
const l = typeof e == "number" ? e : 0, i = l > s ? `${s}+` : e, d = _ || c || l > 0 || typeof e == "string" && e;
|
|
60
|
+
return o ? /* @__PURE__ */ z("span", { className: [p.wrapper, m].filter(Boolean).join(" "), style: t, children: [
|
|
61
|
+
o,
|
|
62
|
+
d && /* @__PURE__ */ n(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
className: [
|
|
66
|
+
p.badge,
|
|
67
|
+
p[`color-${r}`],
|
|
68
|
+
p[`size-${a}`],
|
|
69
|
+
_ && p.dot
|
|
70
|
+
].filter(Boolean).join(" "),
|
|
71
|
+
children: !_ && i
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }) : /* @__PURE__ */ n(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
className: [
|
|
78
|
+
p.standalone,
|
|
79
|
+
p[`color-${r}`],
|
|
80
|
+
p[`size-${a}`],
|
|
81
|
+
_ && p.dot,
|
|
82
|
+
m
|
|
83
|
+
].filter(Boolean).join(" "),
|
|
84
|
+
style: t,
|
|
85
|
+
children: !_ && i
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}, de = "Button-module__button___2ZuB7", ie = "Button-module__size-sm___yph5g", ue = "Button-module__size-md___HBcrV", me = "Button-module__size-lg___2sR8u", pe = "Button-module__variant-default___uQ3S6", ge = "Button-module__disabled___Tl9fh", he = "Button-module__variant-primary___yvq47", ze = "Button-module__variant-success___0aOFB", be = "Button-module__variant-warning___-sJWp", fe = "Button-module__variant-error___eSqWK", we = "Button-module__variant-ghost___3HPKX", Se = "Button-module__variant-text___jt-rA", ve = "Button-module__loading___EQAt2", Be = "Button-module__content___EKXmF", ye = "Button-module__icon___-43u5", $e = "Button-module__block___bnWJO", Ne = "Button-module__spinner___ZExvW", xe = "Button-module__spin___JvkZu", g = {
|
|
89
|
+
button: de,
|
|
90
|
+
"size-sm": "Button-module__size-sm___yph5g",
|
|
91
|
+
sizeSm: ie,
|
|
92
|
+
"size-md": "Button-module__size-md___HBcrV",
|
|
93
|
+
sizeMd: ue,
|
|
94
|
+
"size-lg": "Button-module__size-lg___2sR8u",
|
|
95
|
+
sizeLg: me,
|
|
96
|
+
"variant-default": "Button-module__variant-default___uQ3S6",
|
|
97
|
+
variantDefault: pe,
|
|
98
|
+
disabled: ge,
|
|
99
|
+
"variant-primary": "Button-module__variant-primary___yvq47",
|
|
100
|
+
variantPrimary: he,
|
|
101
|
+
"variant-success": "Button-module__variant-success___0aOFB",
|
|
102
|
+
variantSuccess: ze,
|
|
103
|
+
"variant-warning": "Button-module__variant-warning___-sJWp",
|
|
104
|
+
variantWarning: be,
|
|
105
|
+
"variant-error": "Button-module__variant-error___eSqWK",
|
|
106
|
+
variantError: fe,
|
|
107
|
+
"variant-ghost": "Button-module__variant-ghost___3HPKX",
|
|
108
|
+
variantGhost: we,
|
|
109
|
+
"variant-text": "Button-module__variant-text___jt-rA",
|
|
110
|
+
variantText: Se,
|
|
111
|
+
loading: ve,
|
|
112
|
+
content: Be,
|
|
113
|
+
icon: ye,
|
|
114
|
+
block: $e,
|
|
115
|
+
spinner: Ne,
|
|
116
|
+
spin: xe
|
|
117
|
+
}, Do = (v) => {
|
|
118
|
+
var f = v, {
|
|
119
|
+
children: o,
|
|
120
|
+
htmlType: e = "button",
|
|
121
|
+
variant: _ = "default",
|
|
122
|
+
size: s = "md",
|
|
123
|
+
disabled: r = !1,
|
|
124
|
+
loading: a = !1,
|
|
125
|
+
block: c = !1,
|
|
126
|
+
icon: m,
|
|
127
|
+
className: t = "",
|
|
128
|
+
style: l,
|
|
129
|
+
onClick: i
|
|
130
|
+
} = f, d = B(f, [
|
|
131
|
+
"children",
|
|
132
|
+
"htmlType",
|
|
133
|
+
"variant",
|
|
134
|
+
"size",
|
|
135
|
+
"disabled",
|
|
136
|
+
"loading",
|
|
137
|
+
"block",
|
|
138
|
+
"icon",
|
|
139
|
+
"className",
|
|
140
|
+
"style",
|
|
141
|
+
"onClick"
|
|
142
|
+
]);
|
|
143
|
+
const T = [
|
|
144
|
+
g.button,
|
|
145
|
+
g[`variant-${_}`],
|
|
146
|
+
g[`size-${s}`],
|
|
147
|
+
c && g.block,
|
|
148
|
+
(r || a) && g.disabled,
|
|
149
|
+
a && g.loading,
|
|
150
|
+
t
|
|
151
|
+
].filter(Boolean).join(" ");
|
|
152
|
+
return /* @__PURE__ */ z(
|
|
153
|
+
"button",
|
|
154
|
+
b(u({
|
|
155
|
+
type: e,
|
|
156
|
+
className: T,
|
|
157
|
+
disabled: r || a,
|
|
158
|
+
style: l,
|
|
159
|
+
onClick: i
|
|
160
|
+
}, d), {
|
|
161
|
+
children: [
|
|
162
|
+
a && /* @__PURE__ */ n("span", { className: g.spinner }),
|
|
163
|
+
!a && m && /* @__PURE__ */ n("span", { className: g.icon, children: m }),
|
|
164
|
+
o && /* @__PURE__ */ n("span", { className: g.content, children: o })
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
);
|
|
168
|
+
}, ke = "Card-module__card___Cb1o4", Te = "Card-module__bordered___fBy0-", Ie = "Card-module__hoverable___aGYcW", Ce = "Card-module__header___PTXf2", Me = "Card-module__title___mSgoo", We = "Card-module__body___W441Z", Le = "Card-module__padding-none___OI9cD", je = "Card-module__padding-sm___zE1jj", Ee = "Card-module__padding-md___ndH23", Je = "Card-module__padding-lg___l9K5D", w = {
|
|
169
|
+
card: ke,
|
|
170
|
+
bordered: Te,
|
|
171
|
+
hoverable: Ie,
|
|
172
|
+
header: Ce,
|
|
173
|
+
title: Me,
|
|
174
|
+
body: We,
|
|
175
|
+
"padding-none": "Card-module__padding-none___OI9cD",
|
|
176
|
+
paddingNone: Le,
|
|
177
|
+
"padding-sm": "Card-module__padding-sm___zE1jj",
|
|
178
|
+
paddingSm: je,
|
|
179
|
+
"padding-md": "Card-module__padding-md___ndH23",
|
|
180
|
+
paddingMd: Ee,
|
|
181
|
+
"padding-lg": "Card-module__padding-lg___l9K5D",
|
|
182
|
+
paddingLg: Je
|
|
183
|
+
}, Fo = ({
|
|
184
|
+
title: o,
|
|
185
|
+
children: e,
|
|
186
|
+
className: _ = "",
|
|
187
|
+
bordered: s = !0,
|
|
188
|
+
hoverable: r = !1,
|
|
189
|
+
padding: a = "md",
|
|
190
|
+
style: c,
|
|
191
|
+
onClick: m
|
|
192
|
+
}) => {
|
|
193
|
+
const t = [
|
|
194
|
+
w.card,
|
|
195
|
+
s && w.bordered,
|
|
196
|
+
r && w.hoverable,
|
|
197
|
+
w[`padding-${a}`],
|
|
198
|
+
_
|
|
199
|
+
].filter(Boolean).join(" ");
|
|
200
|
+
return /* @__PURE__ */ z(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
className: t,
|
|
204
|
+
style: c,
|
|
205
|
+
onClick: m,
|
|
206
|
+
children: [
|
|
207
|
+
o && /* @__PURE__ */ n("div", { className: w.header, children: /* @__PURE__ */ n("h3", { className: w.title, children: o }) }),
|
|
208
|
+
/* @__PURE__ */ n("div", { className: w.body, children: e })
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
}, Oe = "Checkbox-module__checkbox___lSeQj", Pe = "Checkbox-module__input___2kt-h", Re = "Checkbox-module__box___OCPee", Ze = "Checkbox-module__checkIcon___L7mG7", He = "Checkbox-module__label___cwRtI", De = "Checkbox-module__disabled___x7-eg", y = {
|
|
213
|
+
checkbox: Oe,
|
|
214
|
+
input: Pe,
|
|
215
|
+
box: Re,
|
|
216
|
+
checkIcon: Ze,
|
|
217
|
+
label: He,
|
|
218
|
+
disabled: De
|
|
219
|
+
}, Fe = M((m, c) => {
|
|
220
|
+
var t = m, { checked: o, onChange: e, label: _, disabled: s, className: r = "" } = t, a = B(t, ["checked", "onChange", "label", "disabled", "className"]);
|
|
221
|
+
return /* @__PURE__ */ z("label", { className: `${y.checkbox} ${s ? y.disabled : ""} ${r}`, children: [
|
|
222
|
+
/* @__PURE__ */ n(
|
|
223
|
+
"input",
|
|
224
|
+
u({
|
|
225
|
+
type: "checkbox",
|
|
226
|
+
className: y.input,
|
|
227
|
+
checked: o,
|
|
228
|
+
onChange: (l) => e == null ? void 0 : e(l.target.checked),
|
|
229
|
+
disabled: s,
|
|
230
|
+
ref: c
|
|
231
|
+
}, a)
|
|
232
|
+
),
|
|
233
|
+
/* @__PURE__ */ n("div", { className: y.box, children: /* @__PURE__ */ n("svg", { className: y.checkIcon, viewBox: "0 0 24 24", children: /* @__PURE__ */ n("polyline", { points: "20 6 9 17 4 12" }) }) }),
|
|
234
|
+
_ && /* @__PURE__ */ n("span", { className: y.label, children: _ })
|
|
235
|
+
] });
|
|
236
|
+
});
|
|
237
|
+
Fe.displayName = "Checkbox";
|
|
238
|
+
const Ke = "Input-module__wrapper___iHNUs", Ye = "Input-module__disabled___nzcnQ", Qe = "Input-module__size-sm___3ztQq", Ve = "Input-module__size-md___I7Ar8", Xe = "Input-module__size-lg___sd7Z-", Ge = "Input-module__status-error___Spzrx", qe = "Input-module__status-warning___mWfkv", Ae = "Input-module__status-success___Ik3ZH", Ue = "Input-module__block___RCPH3", eo = "Input-module__input___WjT81", oo = "Input-module__prefix___tWvYu", _o = "Input-module__suffix___MnuX-", to = "Input-module__clear___Y9bUX", h = {
|
|
239
|
+
wrapper: Ke,
|
|
240
|
+
disabled: Ye,
|
|
241
|
+
"size-sm": "Input-module__size-sm___3ztQq",
|
|
242
|
+
sizeSm: Qe,
|
|
243
|
+
"size-md": "Input-module__size-md___I7Ar8",
|
|
244
|
+
sizeMd: Ve,
|
|
245
|
+
"size-lg": "Input-module__size-lg___sd7Z-",
|
|
246
|
+
sizeLg: Xe,
|
|
247
|
+
"status-error": "Input-module__status-error___Spzrx",
|
|
248
|
+
statusError: Ge,
|
|
249
|
+
"status-warning": "Input-module__status-warning___mWfkv",
|
|
250
|
+
statusWarning: qe,
|
|
251
|
+
"status-success": "Input-module__status-success___Ik3ZH",
|
|
252
|
+
statusSuccess: Ae,
|
|
253
|
+
block: Ue,
|
|
254
|
+
input: eo,
|
|
255
|
+
prefix: oo,
|
|
256
|
+
suffix: _o,
|
|
257
|
+
clear: to
|
|
258
|
+
}, so = M((v, d) => {
|
|
259
|
+
var f = v, { size: o = "md", status: e, prefix: _, suffix: s, allowClear: r = !1, onClear: a, block: c = !1, className: m = "", disabled: t, value: l } = f, i = B(f, ["size", "status", "prefix", "suffix", "allowClear", "onClear", "block", "className", "disabled", "value"]);
|
|
260
|
+
const T = [
|
|
261
|
+
h.wrapper,
|
|
262
|
+
h[`size-${o}`],
|
|
263
|
+
e && h[`status-${e}`],
|
|
264
|
+
t && h.disabled,
|
|
265
|
+
c && h.block,
|
|
266
|
+
m
|
|
267
|
+
].filter(Boolean).join(" "), N = r && l && !t;
|
|
268
|
+
return /* @__PURE__ */ z("div", { className: T, children: [
|
|
269
|
+
_ && /* @__PURE__ */ n("span", { className: h.prefix, children: _ }),
|
|
270
|
+
/* @__PURE__ */ n(
|
|
271
|
+
"input",
|
|
272
|
+
u({
|
|
273
|
+
ref: d,
|
|
274
|
+
className: h.input,
|
|
275
|
+
disabled: t,
|
|
276
|
+
value: l
|
|
277
|
+
}, i)
|
|
278
|
+
),
|
|
279
|
+
N && /* @__PURE__ */ n(
|
|
280
|
+
"button",
|
|
281
|
+
{
|
|
282
|
+
type: "button",
|
|
283
|
+
className: h.clear,
|
|
284
|
+
onClick: a,
|
|
285
|
+
tabIndex: -1,
|
|
286
|
+
children: "×"
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
s && !N && /* @__PURE__ */ n("span", { className: h.suffix, children: s })
|
|
290
|
+
] });
|
|
291
|
+
});
|
|
292
|
+
so.displayName = "Input";
|
|
293
|
+
const ro = "Select-module__wrapper___KS2K3", no = "Select-module__select___cjdcr", ao = "Select-module__size-sm___QLegM", lo = "Select-module__size-md___0JLRh", co = "Select-module__size-lg___WT5Lo", io = "Select-module__arrow___w35wW", uo = "Select-module__arrow-sm___8eD2n", k = {
|
|
294
|
+
wrapper: ro,
|
|
295
|
+
select: no,
|
|
296
|
+
"size-sm": "Select-module__size-sm___QLegM",
|
|
297
|
+
sizeSm: ao,
|
|
298
|
+
"size-md": "Select-module__size-md___0JLRh",
|
|
299
|
+
sizeMd: lo,
|
|
300
|
+
"size-lg": "Select-module__size-lg___WT5Lo",
|
|
301
|
+
sizeLg: co,
|
|
302
|
+
arrow: io,
|
|
303
|
+
"arrow-sm": "Select-module__arrow-sm___8eD2n",
|
|
304
|
+
arrowSm: uo
|
|
305
|
+
}, mo = M((m, c) => {
|
|
306
|
+
var t = m, { options: o = [], onChange: e, className: _ = "", size: s = "md", children: r } = t, a = B(t, ["options", "onChange", "className", "size", "children"]);
|
|
307
|
+
const l = [
|
|
308
|
+
k.select,
|
|
309
|
+
k[`size-${s}`]
|
|
310
|
+
].filter(Boolean).join(" "), i = [
|
|
311
|
+
k.arrow,
|
|
312
|
+
s === "sm" && k["arrow-sm"]
|
|
313
|
+
].filter(Boolean).join(" ");
|
|
314
|
+
return /* @__PURE__ */ z("div", { className: `${k.wrapper} ${_}`, children: [
|
|
315
|
+
/* @__PURE__ */ z(
|
|
316
|
+
"select",
|
|
317
|
+
b(u({
|
|
318
|
+
className: l,
|
|
319
|
+
onChange: (d) => e == null ? void 0 : e(d.target.value),
|
|
320
|
+
ref: c
|
|
321
|
+
}, a), {
|
|
322
|
+
children: [
|
|
323
|
+
o.map((d) => /* @__PURE__ */ n("option", { value: d.value, children: d.label }, d.value)),
|
|
324
|
+
r
|
|
325
|
+
]
|
|
326
|
+
})
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ n("svg", { className: i, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M6 8l4 4 4-4" }) })
|
|
329
|
+
] });
|
|
330
|
+
});
|
|
331
|
+
mo.displayName = "Select";
|
|
332
|
+
const po = "Switch-module__input___5BPNu", go = "Switch-module__track___7ObdZ", ho = "Switch-module__size-sm___3fYth", zo = "Switch-module__size-md___SNixg", bo = "Switch-module__size-lg___0syzl", fo = "Switch-module__disabled___2aZ0V", wo = "Switch-module__label___LrH7V", $ = {
|
|
333
|
+
switch: "Switch-module__switch___hgdMu",
|
|
334
|
+
input: po,
|
|
335
|
+
track: go,
|
|
336
|
+
"size-sm": "Switch-module__size-sm___3fYth",
|
|
337
|
+
sizeSm: ho,
|
|
338
|
+
"size-md": "Switch-module__size-md___SNixg",
|
|
339
|
+
sizeMd: zo,
|
|
340
|
+
"size-lg": "Switch-module__size-lg___0syzl",
|
|
341
|
+
sizeLg: bo,
|
|
342
|
+
disabled: fo,
|
|
343
|
+
label: wo
|
|
344
|
+
}, So = (m) => {
|
|
345
|
+
var t = m, {
|
|
346
|
+
checked: o,
|
|
347
|
+
onChange: e,
|
|
348
|
+
label: _,
|
|
349
|
+
className: s = "",
|
|
350
|
+
disabled: r,
|
|
351
|
+
size: a = "md"
|
|
352
|
+
} = t, c = B(t, [
|
|
353
|
+
"checked",
|
|
354
|
+
"onChange",
|
|
355
|
+
"label",
|
|
356
|
+
"className",
|
|
357
|
+
"disabled",
|
|
358
|
+
"size"
|
|
359
|
+
]);
|
|
360
|
+
const l = [
|
|
361
|
+
$.switch,
|
|
362
|
+
r && $.disabled,
|
|
363
|
+
s
|
|
364
|
+
].filter(Boolean).join(" "), i = [
|
|
365
|
+
$.track,
|
|
366
|
+
$[`size-${a}`]
|
|
367
|
+
].filter(Boolean).join(" ");
|
|
368
|
+
return /* @__PURE__ */ z("label", { className: l, children: [
|
|
369
|
+
/* @__PURE__ */ n(
|
|
370
|
+
"input",
|
|
371
|
+
u({
|
|
372
|
+
type: "checkbox",
|
|
373
|
+
className: $.input,
|
|
374
|
+
checked: o,
|
|
375
|
+
onChange: (d) => e == null ? void 0 : e(d.target.checked),
|
|
376
|
+
disabled: r
|
|
377
|
+
}, c)
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ n("div", { className: i }),
|
|
380
|
+
_ && /* @__PURE__ */ n("span", { className: $.label, children: _ })
|
|
381
|
+
] });
|
|
382
|
+
};
|
|
383
|
+
So.displayName = "Switch";
|
|
384
|
+
const vo = "Tag-module__tag___16VPH", Bo = "Tag-module__size-sm___DpOlV", yo = "Tag-module__size-md___fa5ep", $o = "Tag-module__variant-solid___Hi-Zy", No = "Tag-module__color-primary___rx17k", xo = "Tag-module__variant-outline___7Zcet", ko = "Tag-module__color-success___-zzpn", To = "Tag-module__color-warning___EKTvk", Io = "Tag-module__color-error___mYB7S", Co = "Tag-module__color-info___vNcdt", Mo = "Tag-module__color-neutral___5FRfc", Wo = "Tag-module__clickable___KYvr6", Lo = "Tag-module__closable___w571P", jo = "Tag-module__close___SCP4u", S = {
|
|
385
|
+
tag: vo,
|
|
386
|
+
"size-sm": "Tag-module__size-sm___DpOlV",
|
|
387
|
+
sizeSm: Bo,
|
|
388
|
+
"size-md": "Tag-module__size-md___fa5ep",
|
|
389
|
+
sizeMd: yo,
|
|
390
|
+
"variant-solid": "Tag-module__variant-solid___Hi-Zy",
|
|
391
|
+
variantSolid: $o,
|
|
392
|
+
"color-primary": "Tag-module__color-primary___rx17k",
|
|
393
|
+
colorPrimary: No,
|
|
394
|
+
"variant-outline": "Tag-module__variant-outline___7Zcet",
|
|
395
|
+
variantOutline: xo,
|
|
396
|
+
"color-success": "Tag-module__color-success___-zzpn",
|
|
397
|
+
colorSuccess: ko,
|
|
398
|
+
"color-warning": "Tag-module__color-warning___EKTvk",
|
|
399
|
+
colorWarning: To,
|
|
400
|
+
"color-error": "Tag-module__color-error___mYB7S",
|
|
401
|
+
colorError: Io,
|
|
402
|
+
"color-info": "Tag-module__color-info___vNcdt",
|
|
403
|
+
colorInfo: Co,
|
|
404
|
+
"color-neutral": "Tag-module__color-neutral___5FRfc",
|
|
405
|
+
colorNeutral: Mo,
|
|
406
|
+
clickable: Wo,
|
|
407
|
+
closable: Lo,
|
|
408
|
+
close: jo
|
|
409
|
+
}, Ko = ({
|
|
410
|
+
children: o,
|
|
411
|
+
color: e = "neutral",
|
|
412
|
+
variant: _ = "outline",
|
|
413
|
+
size: s = "md",
|
|
414
|
+
closable: r = !1,
|
|
415
|
+
onClose: a,
|
|
416
|
+
onClick: c,
|
|
417
|
+
className: m = "",
|
|
418
|
+
style: t
|
|
419
|
+
}) => {
|
|
420
|
+
const l = c ? "button" : "span", i = [
|
|
421
|
+
S.tag,
|
|
422
|
+
S[`size-${s}`],
|
|
423
|
+
S[`variant-${_}`],
|
|
424
|
+
S[`color-${e}`],
|
|
425
|
+
c && S.clickable,
|
|
426
|
+
r && S.closable,
|
|
427
|
+
m
|
|
428
|
+
].filter(Boolean).join(" ");
|
|
429
|
+
return /* @__PURE__ */ z(
|
|
430
|
+
l,
|
|
431
|
+
{
|
|
432
|
+
type: c ? "button" : void 0,
|
|
433
|
+
className: i,
|
|
434
|
+
style: t,
|
|
435
|
+
onClick: c,
|
|
436
|
+
children: [
|
|
437
|
+
/* @__PURE__ */ n("span", { children: o }),
|
|
438
|
+
r && /* @__PURE__ */ n(
|
|
439
|
+
"button",
|
|
440
|
+
{
|
|
441
|
+
type: "button",
|
|
442
|
+
className: S.close,
|
|
443
|
+
onClick: (d) => {
|
|
444
|
+
d.stopPropagation(), a == null || a(d);
|
|
445
|
+
},
|
|
446
|
+
"aria-label": "Close",
|
|
447
|
+
children: "×"
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}, O = D(null), Eo = {}, Yo = ({
|
|
454
|
+
children: o,
|
|
455
|
+
config: e = Eo,
|
|
456
|
+
storageKey: _ = "react-devtools-theme"
|
|
457
|
+
}) => {
|
|
458
|
+
const [s, r] = F(() => {
|
|
459
|
+
if (typeof window == "undefined")
|
|
460
|
+
return e;
|
|
461
|
+
try {
|
|
462
|
+
const t = localStorage.getItem(_), l = localStorage.getItem(`${_}-initial`);
|
|
463
|
+
if (t) {
|
|
464
|
+
const i = JSON.parse(t);
|
|
465
|
+
return (l ? JSON.stringify(JSON.parse(l)) !== JSON.stringify(e) : JSON.stringify(e) !== "{}") ? u(u({}, i), e) : u(u({}, e), i);
|
|
466
|
+
}
|
|
467
|
+
} catch (t) {
|
|
468
|
+
console.warn("[Theme] Failed to load persisted config:", t);
|
|
469
|
+
}
|
|
470
|
+
return e;
|
|
471
|
+
}), a = K(e);
|
|
472
|
+
C(() => {
|
|
473
|
+
JSON.stringify(e) !== JSON.stringify(a.current) && (a.current = e, r((t) => u(u({}, t), e)));
|
|
474
|
+
}, [e]);
|
|
475
|
+
const c = J(() => V(s), [s]);
|
|
476
|
+
C(() => {
|
|
477
|
+
if (typeof window != "undefined")
|
|
478
|
+
try {
|
|
479
|
+
localStorage.setItem(_, JSON.stringify(s)), localStorage.setItem(`${_}-initial`, JSON.stringify(e));
|
|
480
|
+
} catch (t) {
|
|
481
|
+
console.warn("[Theme] Failed to persist config:", t);
|
|
482
|
+
}
|
|
483
|
+
}, [s, _, e]), C(() => {
|
|
484
|
+
X(c);
|
|
485
|
+
}, [c]), C(() => s.mode !== "auto" ? void 0 : G(() => {
|
|
486
|
+
r((l) => b(u({}, l), { mode: "auto" }));
|
|
487
|
+
}), [s.mode]);
|
|
488
|
+
const m = J(() => ({
|
|
489
|
+
theme: c,
|
|
490
|
+
config: s,
|
|
491
|
+
setMode: (t) => {
|
|
492
|
+
r((l) => b(u({}, l), { mode: t }));
|
|
493
|
+
},
|
|
494
|
+
setPrimaryColor: (t) => {
|
|
495
|
+
r((l) => b(u({}, l), { primaryColor: t }));
|
|
496
|
+
},
|
|
497
|
+
toggleMode: (t) => {
|
|
498
|
+
var N, W;
|
|
499
|
+
const i = q(s.mode || "auto") === "light" ? "dark" : "light";
|
|
500
|
+
if (!document.startViewTransition || window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
501
|
+
r((x) => b(u({}, x), { mode: i }));
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
const d = (N = t == null ? void 0 : t.clientX) != null ? N : window.innerWidth / 2, v = (W = t == null ? void 0 : t.clientY) != null ? W : window.innerHeight / 2, f = Math.hypot(
|
|
505
|
+
Math.max(d, window.innerWidth - d),
|
|
506
|
+
Math.max(v, window.innerHeight - v)
|
|
507
|
+
);
|
|
508
|
+
document.startViewTransition(() => {
|
|
509
|
+
Q(() => {
|
|
510
|
+
r((x) => b(u({}, x), { mode: i }));
|
|
511
|
+
});
|
|
512
|
+
}).ready.then(() => {
|
|
513
|
+
const x = [
|
|
514
|
+
`circle(0px at ${d}px ${v}px)`,
|
|
515
|
+
`circle(${f}px at ${d}px ${v}px)`
|
|
516
|
+
];
|
|
517
|
+
document.documentElement.animate(
|
|
518
|
+
{
|
|
519
|
+
clipPath: x
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
duration: 400,
|
|
523
|
+
easing: "ease-in-out",
|
|
524
|
+
pseudoElement: "::view-transition-new(root)"
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
}), [c, s]);
|
|
530
|
+
return /* @__PURE__ */ n(O.Provider, { value: m, children: o });
|
|
531
|
+
};
|
|
532
|
+
function P() {
|
|
533
|
+
const o = Y(O);
|
|
534
|
+
if (!o)
|
|
535
|
+
throw new Error("useTheme must be used within ThemeProvider");
|
|
536
|
+
return o;
|
|
537
|
+
}
|
|
538
|
+
function Qo() {
|
|
539
|
+
const { theme: o, setMode: e, toggleMode: _ } = P();
|
|
540
|
+
return {
|
|
541
|
+
mode: o.mode,
|
|
542
|
+
setMode: e,
|
|
543
|
+
toggleMode: _
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
function Vo() {
|
|
547
|
+
const { theme: o } = P();
|
|
548
|
+
return o.colors;
|
|
549
|
+
}
|
|
550
|
+
export {
|
|
551
|
+
Ho as Badge,
|
|
552
|
+
Do as Button,
|
|
553
|
+
Fo as Card,
|
|
554
|
+
Fe as Checkbox,
|
|
555
|
+
so as Input,
|
|
556
|
+
qo as PRESET_COLORS,
|
|
557
|
+
mo as Select,
|
|
558
|
+
So as Switch,
|
|
559
|
+
Ko as Tag,
|
|
560
|
+
Yo as ThemeProvider,
|
|
561
|
+
X as applyTheme,
|
|
562
|
+
Ao as borderRadius,
|
|
563
|
+
V as createTheme,
|
|
564
|
+
Uo as detectSystemDarkMode,
|
|
565
|
+
e_ as generateCSSVariables,
|
|
566
|
+
o_ as generateColorPalette,
|
|
567
|
+
__ as generateNeutralColors,
|
|
568
|
+
t_ as generateSemanticColors,
|
|
569
|
+
s_ as resolveThemeColor,
|
|
570
|
+
q as resolveThemeMode,
|
|
571
|
+
r_ as shadows,
|
|
572
|
+
n_ as spacing,
|
|
573
|
+
a_ as transitions,
|
|
574
|
+
l_ as typography,
|
|
575
|
+
P as useTheme,
|
|
576
|
+
Vo as useThemeColors,
|
|
577
|
+
Qo as useThemeMode,
|
|
578
|
+
G as watchSystemDarkMode,
|
|
579
|
+
c_ as zIndex
|
|
580
|
+
};
|
|
581
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/Badge/Badge.tsx","../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Input/Input.tsx","../src/components/Select/Select.tsx","../src/components/Switch/Switch.tsx","../src/components/Tag/Tag.tsx","../src/composables/useTheme.tsx"],"sourcesContent":["import type { CSSProperties, FC, ReactNode } from 'react'\nimport styles from './Badge.module.css'\n\nexport interface BadgeProps {\n /**\n * Badge content\n */\n children?: ReactNode\n\n /**\n * Badge count or text\n */\n count?: number | string\n\n /**\n * Show dot instead of count\n * @default false\n */\n dot?: boolean\n\n /**\n * Max count to display\n * @default 99\n */\n max?: number\n\n /**\n * Badge color\n * @default 'primary'\n */\n color?: 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral'\n\n /**\n * Badge size\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg'\n\n /**\n * Show zero count\n * @default false\n */\n showZero?: boolean\n\n /**\n * Additional CSS class\n */\n className?: string\n\n /**\n * Custom styles\n */\n style?: CSSProperties\n}\n\nexport const Badge: FC<BadgeProps> = ({\n children,\n count = 0,\n dot = false,\n max = 99,\n color = 'primary',\n size = 'md',\n showZero = false,\n className = '',\n style,\n}) => {\n const numericCount = typeof count === 'number' ? count : 0\n const displayCount = numericCount > max ? `${max}+` : count\n const showBadge = dot || showZero || (numericCount > 0) || (typeof count === 'string' && count)\n\n if (!children) {\n // Standalone badge\n return (\n <span\n className={[\n styles.standalone,\n styles[`color-${color}`],\n styles[`size-${size}`],\n dot && styles.dot,\n className,\n ].filter(Boolean).join(' ')}\n style={style}\n >\n {!dot && displayCount}\n </span>\n )\n }\n\n return (\n <span className={[styles.wrapper, className].filter(Boolean).join(' ')} style={style}>\n {children}\n {showBadge && (\n <span\n className={[\n styles.badge,\n styles[`color-${color}`],\n styles[`size-${size}`],\n dot && styles.dot,\n ].filter(Boolean).join(' ')}\n >\n {!dot && displayCount}\n </span>\n )}\n </span>\n )\n}\n","import type { ButtonHTMLAttributes, CSSProperties, FC, ReactNode } from 'react'\nimport styles from './Button.module.css'\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n /**\n * Button content\n */\n children?: ReactNode\n\n /**\n * Button type\n * @default 'button'\n */\n htmlType?: 'button' | 'submit' | 'reset'\n\n /**\n * Button variant\n * @default 'default'\n */\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'ghost' | 'text'\n\n /**\n * Button size\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg'\n\n /**\n * Disabled state\n * @default false\n */\n disabled?: boolean\n\n /**\n * Loading state\n * @default false\n */\n loading?: boolean\n\n /**\n * Block level button\n * @default false\n */\n block?: boolean\n\n /**\n * Icon before content\n */\n icon?: ReactNode\n\n /**\n * Additional CSS class\n */\n className?: string\n\n /**\n * Custom styles\n */\n style?: CSSProperties\n}\n\nexport const Button: FC<ButtonProps> = ({\n children,\n htmlType = 'button',\n variant = 'default',\n size = 'md',\n disabled = false,\n loading = false,\n block = false,\n icon,\n className = '',\n style,\n onClick,\n ...rest\n}) => {\n const classNames = [\n styles.button,\n styles[`variant-${variant}`],\n styles[`size-${size}`],\n block && styles.block,\n (disabled || loading) && styles.disabled,\n loading && styles.loading,\n className,\n ].filter(Boolean).join(' ')\n\n return (\n <button\n type={htmlType}\n className={classNames}\n disabled={disabled || loading}\n style={style}\n onClick={onClick}\n {...rest}\n >\n {loading && (\n <span className={styles.spinner} />\n )}\n {!loading && icon && (\n <span className={styles.icon}>{icon}</span>\n )}\n {children && (\n <span className={styles.content}>{children}</span>\n )}\n </button>\n )\n}\n","import type { CSSProperties, FC, ReactNode } from 'react'\nimport styles from './Card.module.css'\n\nexport interface CardProps {\n /**\n * Card title\n */\n title?: string\n\n /**\n * Card content\n */\n children?: ReactNode\n\n /**\n * Additional CSS class\n */\n className?: string\n\n /**\n * Show border\n * @default true\n */\n bordered?: boolean\n\n /**\n * Hoverable effect\n * @default false\n */\n hoverable?: boolean\n\n /**\n * Card padding size\n * @default 'md'\n */\n padding?: 'none' | 'sm' | 'md' | 'lg'\n\n /**\n * Custom styles\n */\n style?: CSSProperties\n\n /**\n * Click handler\n */\n onClick?: () => void\n}\n\nexport const Card: FC<CardProps> = ({\n title,\n children,\n className = '',\n bordered = true,\n hoverable = false,\n padding = 'md',\n style,\n onClick,\n}) => {\n const classNames = [\n styles.card,\n bordered && styles.bordered,\n hoverable && styles.hoverable,\n styles[`padding-${padding}`],\n className,\n ].filter(Boolean).join(' ')\n\n return (\n <div\n className={classNames}\n style={style}\n onClick={onClick}\n >\n {title && (\n <div className={styles.header}>\n <h3 className={styles.title}>{title}</h3>\n </div>\n )}\n <div className={styles.body}>\n {children}\n </div>\n </div>\n )\n}\n","import type { InputHTMLAttributes } from 'react'\nimport { forwardRef } from 'react'\nimport styles from './Checkbox.module.css'\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n checked?: boolean\n onChange?: (checked: boolean) => void\n label?: string\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(({ checked, onChange, label, disabled, className = '', ...props }, ref) => {\n return (\n <label className={`${styles.checkbox} ${disabled ? styles.disabled : ''} ${className}`}>\n <input\n type=\"checkbox\"\n className={styles.input}\n checked={checked}\n onChange={e => onChange?.(e.target.checked)}\n disabled={disabled}\n ref={ref}\n {...props}\n />\n <div className={styles.box}>\n <svg className={styles.checkIcon} viewBox=\"0 0 24 24\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n {label && <span className={styles.label}>{label}</span>}\n </label>\n )\n})\n\nCheckbox.displayName = 'Checkbox'\n","import type { InputHTMLAttributes, ReactNode } from 'react'\nimport { forwardRef } from 'react'\nimport styles from './Input.module.css'\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {\n /**\n * Input size\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg'\n\n /**\n * Input status\n */\n status?: 'error' | 'warning' | 'success'\n\n /**\n * Prefix icon or text\n */\n prefix?: ReactNode\n\n /**\n * Suffix icon or text\n */\n suffix?: ReactNode\n\n /**\n * Allow clear\n * @default false\n */\n allowClear?: boolean\n\n /**\n * Clear callback\n */\n onClear?: () => void\n\n /**\n * Full width\n * @default false\n */\n block?: boolean\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(({ size = 'md', status, prefix, suffix, allowClear = false, onClear, block = false, className = '', disabled, value, ...rest }, ref) => {\n const wrapperClassNames = [\n styles.wrapper,\n styles[`size-${size}`],\n status && styles[`status-${status}`],\n disabled && styles.disabled,\n block && styles.block,\n className,\n ].filter(Boolean).join(' ')\n\n const showClear = allowClear && value && !disabled\n\n return (\n <div className={wrapperClassNames}>\n {prefix && (\n <span className={styles.prefix}>{prefix}</span>\n )}\n <input\n ref={ref}\n className={styles.input}\n disabled={disabled}\n value={value}\n {...rest}\n />\n {showClear && (\n <button\n type=\"button\"\n className={styles.clear}\n onClick={onClear}\n tabIndex={-1}\n >\n ×\n </button>\n )}\n {suffix && !showClear && (\n <span className={styles.suffix}>{suffix}</span>\n )}\n </div>\n )\n})\n\nInput.displayName = 'Input'\n","import type { SelectHTMLAttributes } from 'react'\nimport { forwardRef } from 'react'\nimport styles from './Select.module.css'\n\nexport interface SelectOption {\n label: string\n value: string | number\n}\n\nexport type SelectSize = 'sm' | 'md' | 'lg'\n\nexport interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'onChange' | 'size'> {\n options?: SelectOption[]\n onChange?: (value: string) => void\n value?: string | number\n size?: SelectSize\n}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(({ options = [], onChange, className = '', size = 'md', children, ...props }, ref) => {\n const selectClass = [\n styles.select,\n styles[`size-${size}`],\n ].filter(Boolean).join(' ')\n\n const arrowClass = [\n styles.arrow,\n size === 'sm' && styles['arrow-sm'],\n ].filter(Boolean).join(' ')\n\n return (\n <div className={`${styles.wrapper} ${className}`}>\n <select\n className={selectClass}\n onChange={e => onChange?.(e.target.value)}\n ref={ref}\n {...props}\n >\n {options.map(option => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n {children}\n </select>\n <svg className={arrowClass} viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"1.5\" d=\"M6 8l4 4 4-4\" />\n </svg>\n </div>\n )\n})\n\nSelect.displayName = 'Select'\n","import type { FC, InputHTMLAttributes } from 'react'\nimport styles from './Switch.module.css'\n\nexport type SwitchSize = 'sm' | 'md' | 'lg'\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'> {\n checked?: boolean\n onChange?: (checked: boolean) => void\n label?: string\n size?: SwitchSize\n}\n\nexport const Switch: FC<SwitchProps> = ({\n checked,\n onChange,\n label,\n className = '',\n disabled,\n size = 'md',\n ...props\n}) => {\n const containerClass = [\n styles.switch,\n disabled && styles.disabled,\n className,\n ].filter(Boolean).join(' ')\n\n const trackClass = [\n styles.track,\n styles[`size-${size}`],\n ].filter(Boolean).join(' ')\n\n return (\n <label className={containerClass}>\n <input\n type=\"checkbox\"\n className={styles.input}\n checked={checked}\n onChange={e => onChange?.(e.target.checked)}\n disabled={disabled}\n {...props}\n />\n <div className={trackClass} />\n {label && (\n <span className={styles.label}>\n {label}\n </span>\n )}\n </label>\n )\n}\n\nSwitch.displayName = 'Switch'\n","import type { CSSProperties, FC, ReactNode } from 'react'\nimport styles from './Tag.module.css'\n\nexport type TagColor = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral'\nexport type TagVariant = 'solid' | 'outline'\nexport type TagSize = 'sm' | 'md'\n\nexport interface TagProps {\n children?: ReactNode\n color?: TagColor\n variant?: TagVariant\n size?: TagSize\n closable?: boolean\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void\n onClick?: (event: React.MouseEvent<HTMLSpanElement | HTMLButtonElement>) => void\n className?: string\n style?: CSSProperties\n}\n\nexport const Tag: FC<TagProps> = ({\n children,\n color = 'neutral',\n variant = 'outline',\n size = 'md',\n closable = false,\n onClose,\n onClick,\n className = '',\n style,\n}) => {\n const TagElement: 'button' | 'span' = onClick ? 'button' : 'span'\n\n const tagClassName = [\n styles.tag,\n styles[`size-${size}`],\n styles[`variant-${variant}`],\n styles[`color-${color}`],\n onClick && styles.clickable,\n closable && styles.closable,\n className,\n ].filter(Boolean).join(' ')\n\n return (\n <TagElement\n type={onClick ? 'button' : undefined}\n className={tagClassName}\n style={style}\n onClick={onClick}\n >\n <span>{children}</span>\n {closable && (\n <button\n type=\"button\"\n className={styles.close}\n onClick={(e) => {\n e.stopPropagation()\n onClose?.(e)\n }}\n aria-label=\"Close\"\n >\n ×\n </button>\n )}\n </TagElement>\n )\n}\n","import type { FC, ReactNode } from 'react'\nimport type { Theme, ThemeConfig, ThemeMode } from '../theme/types'\nimport { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react'\nimport { flushSync } from 'react-dom'\nimport { applyTheme, createTheme, resolveThemeMode, watchSystemDarkMode } from '../theme'\n\n/**\n * Theme context\n */\ninterface ThemeContextValue {\n theme: Theme\n config: ThemeConfig\n setMode: (mode: ThemeMode) => void\n setPrimaryColor: (color: string) => void\n toggleMode: (event?: React.MouseEvent) => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null)\n\n/**\n * Theme Provider Props\n */\nexport interface ThemeProviderProps {\n children: ReactNode\n config?: ThemeConfig\n /**\n * Storage key for persisting theme config\n * @default 'react-devtools-theme'\n */\n storageKey?: string\n}\n\nconst DEFAULT_CONFIG: ThemeConfig = {}\n\n/**\n * Theme Provider Component\n */\nexport const ThemeProvider: FC<ThemeProviderProps> = ({\n children,\n config: initialConfig = DEFAULT_CONFIG,\n storageKey = 'react-devtools-theme',\n}) => {\n // Load persisted config from localStorage\n const [config, setConfig] = useState<ThemeConfig>(() => {\n if (typeof window === 'undefined')\n return initialConfig\n\n try {\n const stored = localStorage.getItem(storageKey)\n const storedInitial = localStorage.getItem(`${storageKey}-initial`)\n\n if (stored) {\n const parsedStored = JSON.parse(stored)\n\n // Check if initial config changed since last time (e.g. developer updated vite.config.ts)\n // If it changed, the new initial config should take precedence over stored user preference\n // for the keys that are defined in initialConfig.\n const initialConfigChanged = storedInitial\n ? JSON.stringify(JSON.parse(storedInitial)) !== JSON.stringify(initialConfig)\n : JSON.stringify(initialConfig) !== '{}' // Treat first time non-empty config as change\n\n if (initialConfigChanged) {\n return { ...parsedStored, ...initialConfig }\n }\n\n // Otherwise, user preference (stored) takes precedence\n return { ...initialConfig, ...parsedStored }\n }\n }\n catch (err) {\n console.warn('[Theme] Failed to load persisted config:', err)\n }\n\n return initialConfig\n })\n\n // Sync initialConfig changes during runtime (e.g. HMR)\n const initialConfigRef = useRef(initialConfig)\n useEffect(() => {\n if (JSON.stringify(initialConfig) !== JSON.stringify(initialConfigRef.current)) {\n initialConfigRef.current = initialConfig\n setConfig(prev => ({ ...prev, ...initialConfig }))\n }\n }, [initialConfig])\n\n // Create theme from config\n const theme = useMemo(() => createTheme(config), [config])\n\n // Persist config changes\n useEffect(() => {\n if (typeof window === 'undefined')\n return\n\n try {\n localStorage.setItem(storageKey, JSON.stringify(config))\n // Also persist the initialConfig we started with, so we can detect changes next time\n localStorage.setItem(`${storageKey}-initial`, JSON.stringify(initialConfig))\n }\n catch (err) {\n console.warn('[Theme] Failed to persist config:', err)\n }\n }, [config, storageKey, initialConfig])\n\n // Apply theme to DOM\n useEffect(() => {\n applyTheme(theme)\n }, [theme])\n\n // Watch system dark mode changes (only when mode is 'auto')\n useEffect(() => {\n if (config.mode !== 'auto')\n return\n\n const unwatch = watchSystemDarkMode(() => {\n // Force re-render by updating config\n setConfig(prev => ({ ...prev, mode: 'auto' }))\n })\n\n return unwatch\n }, [config.mode])\n\n // Context value\n const value = useMemo<ThemeContextValue>(() => ({\n theme,\n config,\n\n setMode: (mode: ThemeMode) => {\n setConfig(prev => ({ ...prev, mode }))\n },\n\n setPrimaryColor: (primaryColor: string) => {\n setConfig(prev => ({ ...prev, primaryColor }))\n },\n\n toggleMode: (event?: React.MouseEvent) => {\n const currentMode = resolveThemeMode(config.mode || 'auto')\n const nextMode = currentMode === 'light' ? 'dark' : 'light'\n\n // Use View Transitions API if available\n // View Transition API is experimental\n if (!document.startViewTransition || window.matchMedia('(prefers-reduced-motion: reduce)').matches) {\n setConfig(prev => ({ ...prev, mode: nextMode }))\n return\n }\n\n // Get click position or center of screen\n const x = event?.clientX ?? window.innerWidth / 2\n const y = event?.clientY ?? window.innerHeight / 2\n\n // Calculate distance to furthest corner\n const endRadius = Math.hypot(\n Math.max(x, window.innerWidth - x),\n Math.max(y, window.innerHeight - y),\n )\n\n // View Transition API is experimental\n const transition = document.startViewTransition(() => {\n // eslint-disable-next-line react-dom/no-flush-sync\n flushSync(() => {\n setConfig(prev => ({ ...prev, mode: nextMode }))\n })\n })\n\n transition.ready.then(() => {\n const clipPath = [\n `circle(0px at ${x}px ${y}px)`,\n `circle(${endRadius}px at ${x}px ${y}px)`,\n ]\n\n // Animate the new view expanding from the click point\n document.documentElement.animate(\n {\n clipPath,\n },\n {\n duration: 400,\n easing: 'ease-in-out',\n pseudoElement: '::view-transition-new(root)',\n },\n )\n })\n },\n }), [theme, config])\n\n return (\n <ThemeContext.Provider value={value}>\n {children}\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Use theme hook\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext)\n\n if (!context) {\n throw new Error('useTheme must be used within ThemeProvider')\n }\n\n return context\n}\n\n/**\n * Use theme mode hook\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useThemeMode() {\n const { theme, setMode, toggleMode } = useTheme()\n\n return {\n mode: theme.mode,\n setMode,\n toggleMode,\n }\n}\n\n/**\n * Use theme colors hook\n */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useThemeColors() {\n const { theme } = useTheme()\n return theme.colors\n}\n"],"names":["Badge","children","count","dot","max","color","size","showZero","className","style","numericCount","displayCount","showBadge","jsxs","styles","jsx","Button","_a","_b","htmlType","variant","disabled","loading","block","icon","onClick","rest","__objRest","classNames","__spreadProps","__spreadValues","Card","title","bordered","hoverable","padding","Checkbox","forwardRef","ref","checked","onChange","label","props","e","Input","status","prefix","suffix","allowClear","onClear","value","wrapperClassNames","showClear","Select","options","selectClass","arrowClass","option","Switch","containerClass","trackClass","Tag","closable","onClose","TagElement","tagClassName","ThemeContext","createContext","DEFAULT_CONFIG","ThemeProvider","initialConfig","storageKey","config","setConfig","useState","stored","storedInitial","parsedStored","err","initialConfigRef","useRef","useEffect","prev","theme","useMemo","createTheme","applyTheme","watchSystemDarkMode","mode","primaryColor","event","nextMode","resolveThemeMode","x","y","endRadius","flushSync","clipPath","useTheme","context","useContext","useThemeMode","setMode","toggleMode","useThemeColors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDaA,KAAwB,CAAC;AAAA,EACpC,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,KAAAC,IAAM;AAAA,EACN,KAAAC,IAAM;AAAA,EACN,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AACF,MAAM;AACJ,QAAMC,IAAe,OAAOR,KAAU,WAAWA,IAAQ,GACnDS,IAAeD,IAAeN,IAAM,GAAGA,CAAG,MAAMF,GAChDU,IAAYT,KAAOI,KAAaG,IAAe,KAAO,OAAOR,KAAU,YAAYA;AAEzF,SAAKD,IAmBH,gBAAAY,EAAC,QAAA,EAAK,WAAW,CAACC,EAAO,SAASN,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAG,OAAAC,GACrE,UAAA;AAAA,IAAAR;AAAA,IACAW,KACC,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACTD,EAAO;AAAA,UACPA,EAAO,SAAST,CAAK,EAAE;AAAA,UACvBS,EAAO,QAAQR,CAAI,EAAE;AAAA,UACrBH,KAAOW,EAAO;AAAA,QAAA,EACd,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAEzB,WAACX,KAAOQ;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEJ,IA9BE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACTD,EAAO;AAAA,QACPA,EAAO,SAAST,CAA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