@yourbestsoft/studio-screen-ui-kit 0.0.11 → 0.0.12
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/ToolIconButton-BezvcpMB.js +586 -0
- package/dist/ToolIconButton-BezvcpMB.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +2 -1
- package/dist/hooks/useKeyboardControls.d.ts +14 -1
- package/dist/index.js +119 -128
- package/dist/index.js.map +1 -1
- package/dist/index2.js +21 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/ToolIconButton-C4F-rxOr.js +0 -536
- package/dist/ToolIconButton-C4F-rxOr.js.map +0 -1
|
@@ -1,536 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as g, Fragment as B } from "react/jsx-runtime";
|
|
2
|
-
import i from "classnames";
|
|
3
|
-
import G, { forwardRef as b, createContext as W, useState as T, useRef as E, useEffect as I, useContext as w } from "react";
|
|
4
|
-
import { Eye as J, EyeOff as Q, X as U, Search as Y } from "lucide-react";
|
|
5
|
-
const Z = "_text_4m304_1", tt = "_tertiary_4m304_1", et = "_secondary_4m304_1", ot = "_primary_4m304_1", nt = "_fullWidth_4m304_50", st = "_buttonWithIcon_4m304_54", rt = "_content_4m304_61", ct = "_shortcut_4m304_70", at = "_disabled_4m304_82", C = {
|
|
6
|
-
text: Z,
|
|
7
|
-
tertiary: tt,
|
|
8
|
-
secondary: et,
|
|
9
|
-
primary: ot,
|
|
10
|
-
fullWidth: nt,
|
|
11
|
-
buttonWithIcon: st,
|
|
12
|
-
content: rt,
|
|
13
|
-
shortcut: ct,
|
|
14
|
-
disabled: at
|
|
15
|
-
}, it = ({
|
|
16
|
-
children: t,
|
|
17
|
-
className: e,
|
|
18
|
-
component: o = "button",
|
|
19
|
-
disabled: s,
|
|
20
|
-
fullWidth: r,
|
|
21
|
-
icon: c,
|
|
22
|
-
shortcut: a,
|
|
23
|
-
variant: _ = "primary",
|
|
24
|
-
...d
|
|
25
|
-
}, l) => {
|
|
26
|
-
const m = /* @__PURE__ */ g("div", { className: C.buttonWithIcon, children: [
|
|
27
|
-
/* @__PURE__ */ g("div", { className: C.content, children: [
|
|
28
|
-
c,
|
|
29
|
-
t
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ n("div", { className: C.shortcut, children: a })
|
|
32
|
-
] });
|
|
33
|
-
return /* @__PURE__ */ n(
|
|
34
|
-
o,
|
|
35
|
-
{
|
|
36
|
-
className: i(
|
|
37
|
-
C[_],
|
|
38
|
-
r && C.fullWidth,
|
|
39
|
-
s && C.disabled,
|
|
40
|
-
c && C.icon,
|
|
41
|
-
e
|
|
42
|
-
),
|
|
43
|
-
children: c ? m : t,
|
|
44
|
-
disabled: s,
|
|
45
|
-
ref: l,
|
|
46
|
-
...d
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}, He = b(it), lt = "_content_23x5h_1", dt = "_header_23x5h_1", _t = "_root_23x5h_7", ut = "_contentAfterHeader_23x5h_22", R = {
|
|
50
|
-
content: lt,
|
|
51
|
-
header: dt,
|
|
52
|
-
root: _t,
|
|
53
|
-
contentAfterHeader: ut
|
|
54
|
-
}, H = b(
|
|
55
|
-
({ className: t, ...e }, o) => /* @__PURE__ */ n("div", { className: i(R.root, t), ref: o, ...e })
|
|
56
|
-
), ht = b(
|
|
57
|
-
({ className: t, ignoreHeader: e, ...o }, s) => /* @__PURE__ */ n(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: i(
|
|
61
|
-
R.content,
|
|
62
|
-
!e && R.contentAfterHeader,
|
|
63
|
-
t
|
|
64
|
-
),
|
|
65
|
-
ref: s,
|
|
66
|
-
...o
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
), mt = b(
|
|
70
|
-
({ className: t, ...e }, o) => /* @__PURE__ */ n("div", { className: i(R.header, t), ref: o, ...e })
|
|
71
|
-
), Fe = Object.assign(H, {
|
|
72
|
-
Content: ht,
|
|
73
|
-
Header: mt,
|
|
74
|
-
Root: H
|
|
75
|
-
}), gt = "_root_1xfv8_1", bt = "_dropdownContent_1xfv8_6", ft = "_left_1xfv8_17", pt = "_center_1xfv8_21", Ct = "_right_1xfv8_26", vt = "_top_1xfv8_30", wt = "_bottom_1xfv8_34", Nt = "_fixedPosition_1xfv8_38", x = {
|
|
76
|
-
root: gt,
|
|
77
|
-
dropdownContent: bt,
|
|
78
|
-
left: ft,
|
|
79
|
-
center: pt,
|
|
80
|
-
right: Ct,
|
|
81
|
-
top: vt,
|
|
82
|
-
bottom: wt,
|
|
83
|
-
fixedPosition: Nt
|
|
84
|
-
}, M = W(
|
|
85
|
-
void 0
|
|
86
|
-
), P = () => {
|
|
87
|
-
const t = w(M);
|
|
88
|
-
if (!t)
|
|
89
|
-
throw new Error("useDropDownContext must be used within a DropDown.Root");
|
|
90
|
-
return t;
|
|
91
|
-
}, k = [], kt = ({
|
|
92
|
-
children: t,
|
|
93
|
-
closeOnEsc: e = !0,
|
|
94
|
-
closeOnOutsideClick: o = !0,
|
|
95
|
-
defaultVisible: s = !1
|
|
96
|
-
}) => {
|
|
97
|
-
const [r, c] = T(s), a = E(null), _ = () => {
|
|
98
|
-
r ? d() : (c(!0), a.current && k.push(a.current));
|
|
99
|
-
}, d = () => {
|
|
100
|
-
if (c(!1), a.current) {
|
|
101
|
-
const l = k.indexOf(a.current);
|
|
102
|
-
l !== -1 && k.splice(l, 1);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return I(() => {
|
|
106
|
-
if (!o) return;
|
|
107
|
-
const l = (m) => {
|
|
108
|
-
a.current && !a.current.contains(m.target) && d();
|
|
109
|
-
};
|
|
110
|
-
return document.addEventListener("mousedown", l), () => {
|
|
111
|
-
document.removeEventListener("mousedown", l);
|
|
112
|
-
};
|
|
113
|
-
}, [o]), I(() => {
|
|
114
|
-
if (!e) return;
|
|
115
|
-
const l = (m) => {
|
|
116
|
-
m.key === "Escape" && r && k[k.length - 1] === a.current && d();
|
|
117
|
-
};
|
|
118
|
-
return document.addEventListener("keydown", l), () => {
|
|
119
|
-
document.removeEventListener("keydown", l);
|
|
120
|
-
};
|
|
121
|
-
}, [e, r]), /* @__PURE__ */ n(M.Provider, { value: { close: d, toggle: _, visible: r }, children: /* @__PURE__ */ n("div", { ref: a, className: x.root, children: t }) });
|
|
122
|
-
}, xt = ({ children: t }) => {
|
|
123
|
-
const { toggle: e } = P();
|
|
124
|
-
return /* @__PURE__ */ n("div", { onClick: e, children: t });
|
|
125
|
-
}, yt = ({
|
|
126
|
-
children: t,
|
|
127
|
-
className: e,
|
|
128
|
-
fixedPosition: o = !1,
|
|
129
|
-
horizontal: s = "left",
|
|
130
|
-
vertical: r = "bottom"
|
|
131
|
-
}) => {
|
|
132
|
-
const { visible: c } = P();
|
|
133
|
-
return c ? /* @__PURE__ */ n(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
className: i(
|
|
137
|
-
x.dropdownContent,
|
|
138
|
-
x[s],
|
|
139
|
-
x[r],
|
|
140
|
-
{ [x.fixedPosition]: o },
|
|
141
|
-
e
|
|
142
|
-
),
|
|
143
|
-
children: t
|
|
144
|
-
}
|
|
145
|
-
) : null;
|
|
146
|
-
}, Tt = ({ children: t, onClick: e }) => {
|
|
147
|
-
const { close: o } = P();
|
|
148
|
-
return /* @__PURE__ */ n("div", { onClick: (r) => {
|
|
149
|
-
e && e(r), o();
|
|
150
|
-
}, children: t });
|
|
151
|
-
}, Ae = { Content: yt, Root: kt, Trigger: xt, Close: Tt }, Rt = "_dialogRoot_c30vs_1", St = "_dialogTrigger_c30vs_5", Dt = "_dialogContent_c30vs_13", $t = "_dialogClose_c30vs_25", Ot = "_dialogTitle_c30vs_33", It = "_dialogSeparator_c30vs_38", N = {
|
|
152
|
-
dialogRoot: Rt,
|
|
153
|
-
dialogTrigger: St,
|
|
154
|
-
dialogContent: Dt,
|
|
155
|
-
dialogClose: $t,
|
|
156
|
-
dialogTitle: Ot,
|
|
157
|
-
dialogSeparator: It
|
|
158
|
-
}, S = G.createContext(null), Wt = ({
|
|
159
|
-
children: t,
|
|
160
|
-
isOpen: e,
|
|
161
|
-
onStateChange: o
|
|
162
|
-
}) => {
|
|
163
|
-
const s = E(null), [r, c] = T(!1), a = e !== void 0 ? e : r, _ = (d) => {
|
|
164
|
-
e === void 0 && c(d), o && o(d);
|
|
165
|
-
};
|
|
166
|
-
return /* @__PURE__ */ n(S.Provider, { value: { dialogRef: s, isOpen: a, setIsOpen: _ }, children: /* @__PURE__ */ n("div", { className: N.dialogRoot, children: t }) });
|
|
167
|
-
}, Et = ({
|
|
168
|
-
as: t,
|
|
169
|
-
children: e,
|
|
170
|
-
...o
|
|
171
|
-
}) => {
|
|
172
|
-
const s = w(S);
|
|
173
|
-
if (!s) throw new Error("Trigger must be used within a Dialog.Root");
|
|
174
|
-
const { dialogRef: r, setIsOpen: c } = s;
|
|
175
|
-
return /* @__PURE__ */ n(
|
|
176
|
-
t || "button",
|
|
177
|
-
{
|
|
178
|
-
onClick: () => {
|
|
179
|
-
r.current?.showModal(), c(!0);
|
|
180
|
-
},
|
|
181
|
-
...o,
|
|
182
|
-
className: N.dialogTrigger,
|
|
183
|
-
role: t && t !== "button" ? "button" : void 0,
|
|
184
|
-
children: e
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}, Pt = b(
|
|
188
|
-
({ children: t, className: e, closeOnBackdropClick: o = !0 }, s) => {
|
|
189
|
-
const r = w(S);
|
|
190
|
-
if (!r) throw new Error("Content must be used within a Dialog.Root");
|
|
191
|
-
const { dialogRef: c, isOpen: a, setIsOpen: _ } = r, d = (l) => {
|
|
192
|
-
o && l.target === c.current && (c.current?.close(), _(!1));
|
|
193
|
-
};
|
|
194
|
-
return /* @__PURE__ */ n(
|
|
195
|
-
"dialog",
|
|
196
|
-
{
|
|
197
|
-
ref: c,
|
|
198
|
-
className: i(N.dialogContent, e),
|
|
199
|
-
onClick: d,
|
|
200
|
-
open: a,
|
|
201
|
-
children: /* @__PURE__ */ n("div", { onClick: (l) => l.stopPropagation(), children: t })
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
), Lt = ({
|
|
206
|
-
as: t,
|
|
207
|
-
children: e,
|
|
208
|
-
...o
|
|
209
|
-
}) => {
|
|
210
|
-
const s = w(S);
|
|
211
|
-
if (!s) throw new Error("Close must be used within a Dialog.Root");
|
|
212
|
-
const { dialogRef: r, setIsOpen: c } = s;
|
|
213
|
-
return /* @__PURE__ */ n(
|
|
214
|
-
t || "button",
|
|
215
|
-
{
|
|
216
|
-
onClick: () => {
|
|
217
|
-
r.current?.close(), c(!1);
|
|
218
|
-
},
|
|
219
|
-
...o,
|
|
220
|
-
className: N.dialogClose,
|
|
221
|
-
role: t && t !== "button" ? "button" : void 0,
|
|
222
|
-
children: e
|
|
223
|
-
}
|
|
224
|
-
);
|
|
225
|
-
}, qt = ({ children: t, className: e }) => /* @__PURE__ */ n("h2", { className: i(N.dialogTitle, e), children: t }), Ht = ({}) => /* @__PURE__ */ n("div", { className: N.dialogSeparator }), Be = {
|
|
226
|
-
Close: Lt,
|
|
227
|
-
Content: Pt,
|
|
228
|
-
Root: Wt,
|
|
229
|
-
Separator: Ht,
|
|
230
|
-
Title: qt,
|
|
231
|
-
Trigger: Et
|
|
232
|
-
}, Ft = "_sidebar_dg2au_12", At = "_trigger_dg2au_16", Bt = "_content_dg2au_21", Mt = "_left_dg2au_34", Vt = "_open_dg2au_38", jt = "_right_dg2au_42", zt = "_bottom_dg2au_50", Kt = "_top_dg2au_63", v = {
|
|
233
|
-
sidebar: Ft,
|
|
234
|
-
trigger: At,
|
|
235
|
-
content: Bt,
|
|
236
|
-
left: Mt,
|
|
237
|
-
open: Vt,
|
|
238
|
-
right: jt,
|
|
239
|
-
bottom: zt,
|
|
240
|
-
top: Kt
|
|
241
|
-
}, V = W(
|
|
242
|
-
void 0
|
|
243
|
-
), L = () => {
|
|
244
|
-
const t = w(V);
|
|
245
|
-
if (!t)
|
|
246
|
-
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
247
|
-
return t;
|
|
248
|
-
}, Xt = ({ children: t, isOpen: e, setIsOpen: o }) => /* @__PURE__ */ n(
|
|
249
|
-
V.Provider,
|
|
250
|
-
{
|
|
251
|
-
value: {
|
|
252
|
-
isOpen: e,
|
|
253
|
-
setIsOpen: () => o(!e)
|
|
254
|
-
},
|
|
255
|
-
children: t
|
|
256
|
-
}
|
|
257
|
-
), Gt = ({ children: t }) => {
|
|
258
|
-
const { setIsOpen: e } = L(), o = (s) => {
|
|
259
|
-
s.preventDefault(), e(!0);
|
|
260
|
-
};
|
|
261
|
-
return /* @__PURE__ */ n("div", { className: v.trigger, onClick: o, children: t });
|
|
262
|
-
}, Jt = ({
|
|
263
|
-
children: t,
|
|
264
|
-
className: e,
|
|
265
|
-
closeOnOutsideClick: o = !0,
|
|
266
|
-
position: s = "right"
|
|
267
|
-
}) => {
|
|
268
|
-
const { isOpen: r, setIsOpen: c } = L(), a = E(null);
|
|
269
|
-
return I(() => {
|
|
270
|
-
if (!o) return;
|
|
271
|
-
const _ = (d) => {
|
|
272
|
-
a.current && !a.current.contains(d.target) && c(!1);
|
|
273
|
-
};
|
|
274
|
-
return r && document.addEventListener("mousedown", _), () => {
|
|
275
|
-
document.removeEventListener("mousedown", _);
|
|
276
|
-
};
|
|
277
|
-
}, [r, c, o]), /* @__PURE__ */ n(
|
|
278
|
-
"div",
|
|
279
|
-
{
|
|
280
|
-
ref: a,
|
|
281
|
-
className: i(
|
|
282
|
-
v[s],
|
|
283
|
-
v.content,
|
|
284
|
-
{
|
|
285
|
-
[v.close]: !r,
|
|
286
|
-
[v.open]: r
|
|
287
|
-
},
|
|
288
|
-
e
|
|
289
|
-
),
|
|
290
|
-
children: t
|
|
291
|
-
}
|
|
292
|
-
);
|
|
293
|
-
}, Qt = ({ children: t }) => {
|
|
294
|
-
const { setIsOpen: e } = L(), o = (s) => {
|
|
295
|
-
s.preventDefault(), e(!1);
|
|
296
|
-
};
|
|
297
|
-
return /* @__PURE__ */ n("button", { className: v.close, onClick: o, children: t });
|
|
298
|
-
}, Me = {
|
|
299
|
-
Close: Qt,
|
|
300
|
-
Content: Jt,
|
|
301
|
-
Root: Xt,
|
|
302
|
-
Trigger: Gt
|
|
303
|
-
}, Ut = "_switcher_k6tdq_1", Yt = "_buttons_k6tdq_6", Zt = "_separator_k6tdq_10", O = {
|
|
304
|
-
switcher: Ut,
|
|
305
|
-
buttons: Yt,
|
|
306
|
-
separator: Zt
|
|
307
|
-
}, Ve = b(
|
|
308
|
-
({
|
|
309
|
-
className: t,
|
|
310
|
-
component: e,
|
|
311
|
-
componentValues: o,
|
|
312
|
-
containerProps: s,
|
|
313
|
-
onChange: r,
|
|
314
|
-
selectedValue: c,
|
|
315
|
-
slot: a
|
|
316
|
-
}, _) => {
|
|
317
|
-
const [d, l] = T(
|
|
318
|
-
c || o[0].value
|
|
319
|
-
), m = (h) => {
|
|
320
|
-
l(h), r && r(h);
|
|
321
|
-
};
|
|
322
|
-
return /* @__PURE__ */ g("div", { ref: _, className: O.switcher, ...s, children: [
|
|
323
|
-
/* @__PURE__ */ n("div", { className: i(O.buttons, t), children: o.map((h, p) => /* @__PURE__ */ n(
|
|
324
|
-
e,
|
|
325
|
-
{
|
|
326
|
-
...h,
|
|
327
|
-
selected: d === h.value,
|
|
328
|
-
onClick: () => m(h.value)
|
|
329
|
-
},
|
|
330
|
-
p
|
|
331
|
-
)) }),
|
|
332
|
-
a && /* @__PURE__ */ g(B, { children: [
|
|
333
|
-
/* @__PURE__ */ n("div", { className: O.separator }),
|
|
334
|
-
a
|
|
335
|
-
] })
|
|
336
|
-
] });
|
|
337
|
-
}
|
|
338
|
-
), te = "_root_1b0i5_13", ee = "_header_1b0i5_19", oe = "_footer_1b0i5_23", ne = "_row_1b0i5_28", se = "_body_1b0i5_41", re = "_head_1b0i5_19", ce = "_cell_1b0i5_48", ae = "_caption_1b0i5_65", ie = "_storiesFooterCellOne_1b0i5_70", le = "_storiesFooterCellTwo_1b0i5_73", f = {
|
|
339
|
-
root: te,
|
|
340
|
-
header: ee,
|
|
341
|
-
footer: oe,
|
|
342
|
-
row: ne,
|
|
343
|
-
body: se,
|
|
344
|
-
head: re,
|
|
345
|
-
cell: ce,
|
|
346
|
-
caption: ae,
|
|
347
|
-
storiesFooterCellOne: ie,
|
|
348
|
-
storiesFooterCellTwo: le
|
|
349
|
-
}, F = ({ children: t, className: e }) => /* @__PURE__ */ n("table", { className: i(f.root, e), children: t }), de = ({ children: t, className: e }) => /* @__PURE__ */ n("caption", { className: i(f.caption, e), children: t }), _e = ({ children: t, className: e }) => /* @__PURE__ */ n("thead", { className: i(f.header, e), children: t }), ue = ({
|
|
350
|
-
children: t,
|
|
351
|
-
className: e,
|
|
352
|
-
onBlur: o,
|
|
353
|
-
onClick: s,
|
|
354
|
-
onDoubleClick: r
|
|
355
|
-
}) => /* @__PURE__ */ n(
|
|
356
|
-
"tr",
|
|
357
|
-
{
|
|
358
|
-
className: i(f.row, e),
|
|
359
|
-
onClick: s,
|
|
360
|
-
onDoubleClick: r,
|
|
361
|
-
onBlur: o,
|
|
362
|
-
children: t
|
|
363
|
-
}
|
|
364
|
-
), he = ({ children: t, className: e }) => /* @__PURE__ */ n("th", { className: i(f.head, e), children: t }), me = ({ children: t, className: e }) => /* @__PURE__ */ n("tbody", { className: i(f.body, e), children: t }), ge = ({ children: t, className: e }) => /* @__PURE__ */ n("td", { className: i(f.cell, e), children: t }), be = ({ children: t, className: e }) => /* @__PURE__ */ n("tfoot", { className: i(f.footer, e), children: t }), je = Object.assign(F, {
|
|
365
|
-
Body: me,
|
|
366
|
-
Caption: de,
|
|
367
|
-
Cell: ge,
|
|
368
|
-
Footer: be,
|
|
369
|
-
Head: he,
|
|
370
|
-
Header: _e,
|
|
371
|
-
Root: F,
|
|
372
|
-
Row: ue
|
|
373
|
-
}), fe = "_inputContainer_iqbs3_1", pe = "_input_iqbs3_1", Ce = "_inputSearch_iqbs3_40", ve = "_error_iqbs3_43", we = "_button_iqbs3_58", Ne = "_buttonWithLabel_iqbs3_68", ke = "_resetSearchValue_iqbs3_73", xe = "_searchOutline_iqbs3_80", ye = "_errorMessage_iqbs3_87", u = {
|
|
374
|
-
inputContainer: fe,
|
|
375
|
-
input: pe,
|
|
376
|
-
inputSearch: Ce,
|
|
377
|
-
error: ve,
|
|
378
|
-
button: we,
|
|
379
|
-
buttonWithLabel: Ne,
|
|
380
|
-
resetSearchValue: ke,
|
|
381
|
-
searchOutline: xe,
|
|
382
|
-
errorMessage: ye
|
|
383
|
-
}, ze = b(({ className: t, error: e, label: o, onChange: s, required: r, ...c }, a) => {
|
|
384
|
-
const [_, d] = T(!1), l = (p) => s(p.currentTarget.value), m = i(u.input, e && u.error, t);
|
|
385
|
-
let h;
|
|
386
|
-
if (!c.as || c.as === "input") {
|
|
387
|
-
const { inputType: p, ...K } = c, D = p === "search", q = p === "password", X = _ ? "text" : "password";
|
|
388
|
-
h = /* @__PURE__ */ g(B, { children: [
|
|
389
|
-
/* @__PURE__ */ n(
|
|
390
|
-
"input",
|
|
391
|
-
{
|
|
392
|
-
className: i(m, D && u.inputSearch),
|
|
393
|
-
onChange: l,
|
|
394
|
-
ref: a,
|
|
395
|
-
type: q ? X : p,
|
|
396
|
-
...K
|
|
397
|
-
}
|
|
398
|
-
),
|
|
399
|
-
q && (_ ? /* @__PURE__ */ n(
|
|
400
|
-
J,
|
|
401
|
-
{
|
|
402
|
-
strokeWidth: 2.5,
|
|
403
|
-
width: 20,
|
|
404
|
-
className: i(u.button, o && u.buttonWithLabel),
|
|
405
|
-
onClick: () => d(($) => !$)
|
|
406
|
-
}
|
|
407
|
-
) : /* @__PURE__ */ n(
|
|
408
|
-
Q,
|
|
409
|
-
{
|
|
410
|
-
strokeWidth: 2.5,
|
|
411
|
-
width: 20,
|
|
412
|
-
className: i(u.button, o && u.buttonWithLabel),
|
|
413
|
-
onClick: () => d(($) => !$)
|
|
414
|
-
}
|
|
415
|
-
)),
|
|
416
|
-
D && c.value && /* @__PURE__ */ n(
|
|
417
|
-
U,
|
|
418
|
-
{
|
|
419
|
-
onClick: () => s(""),
|
|
420
|
-
className: i(
|
|
421
|
-
u.button,
|
|
422
|
-
o && u.buttonWithLabel,
|
|
423
|
-
u.resetSearchValue
|
|
424
|
-
),
|
|
425
|
-
strokeWidth: 2.5,
|
|
426
|
-
size: 24
|
|
427
|
-
}
|
|
428
|
-
),
|
|
429
|
-
D && /* @__PURE__ */ n(
|
|
430
|
-
Y,
|
|
431
|
-
{
|
|
432
|
-
className: i(
|
|
433
|
-
u.searchOutline,
|
|
434
|
-
o && u.searchOutlineWithLabel
|
|
435
|
-
),
|
|
436
|
-
size: 20
|
|
437
|
-
}
|
|
438
|
-
)
|
|
439
|
-
] });
|
|
440
|
-
}
|
|
441
|
-
return c.as === "textarea" && (h = /* @__PURE__ */ n(
|
|
442
|
-
"textarea",
|
|
443
|
-
{
|
|
444
|
-
className: m,
|
|
445
|
-
onChange: l,
|
|
446
|
-
ref: a,
|
|
447
|
-
...c
|
|
448
|
-
}
|
|
449
|
-
)), /* @__PURE__ */ g("div", { className: u.root, children: [
|
|
450
|
-
/* @__PURE__ */ g("span", { className: u.title, children: [
|
|
451
|
-
o,
|
|
452
|
-
r && /* @__PURE__ */ n("span", { className: u.titleError, children: "*" })
|
|
453
|
-
] }),
|
|
454
|
-
/* @__PURE__ */ n("div", { className: u.inputContainer, children: h }),
|
|
455
|
-
/* @__PURE__ */ n("div", { className: u.errorMessage, children: e })
|
|
456
|
-
] });
|
|
457
|
-
}), j = W(void 0), Ke = ({ children: t }) => {
|
|
458
|
-
const e = z() || "system", [o, s] = T(e);
|
|
459
|
-
return /* @__PURE__ */ n(j.Provider, { value: { setTheme: s, theme: o }, children: t });
|
|
460
|
-
}, Xe = () => {
|
|
461
|
-
const t = w(j);
|
|
462
|
-
if (!t)
|
|
463
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
464
|
-
return Te(t.theme), t;
|
|
465
|
-
}, Te = (t) => {
|
|
466
|
-
const e = z();
|
|
467
|
-
Re(t || e);
|
|
468
|
-
}, Re = (t) => {
|
|
469
|
-
const e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
470
|
-
if (t === "system") {
|
|
471
|
-
const o = e.matches ? "dark" : "light";
|
|
472
|
-
localStorage.setItem("theme", t), A(o);
|
|
473
|
-
} else
|
|
474
|
-
localStorage.setItem("theme", t), A(t);
|
|
475
|
-
}, A = (t) => {
|
|
476
|
-
document.documentElement.setAttribute("data-theme", t);
|
|
477
|
-
}, z = () => {
|
|
478
|
-
const t = localStorage.getItem("theme");
|
|
479
|
-
if (t) return t;
|
|
480
|
-
}, Se = "_root_17w6h_1", De = "_icon_17w6h_11", $e = "_active_17w6h_27", Oe = "_disabled_17w6h_31", Ie = "_keybinding_17w6h_44", y = {
|
|
481
|
-
root: Se,
|
|
482
|
-
icon: De,
|
|
483
|
-
active: $e,
|
|
484
|
-
disabled: Oe,
|
|
485
|
-
keybinding: Ie
|
|
486
|
-
}, Ge = b(
|
|
487
|
-
(t, e) => {
|
|
488
|
-
const { classes: o, disabled: s, icon: r, isActive: c, keybinding: a, onClick: _, title: d } = t, l = We(o, c, s);
|
|
489
|
-
return /* @__PURE__ */ g("label", { className: y.root, title: d, children: [
|
|
490
|
-
/* @__PURE__ */ n(
|
|
491
|
-
"div",
|
|
492
|
-
{
|
|
493
|
-
className: l.icon,
|
|
494
|
-
ref: e,
|
|
495
|
-
tabIndex: s ? -1 : 0,
|
|
496
|
-
role: "button",
|
|
497
|
-
"aria-pressed": c,
|
|
498
|
-
"aria-disabled": s,
|
|
499
|
-
onClick: s ? void 0 : _,
|
|
500
|
-
children: r
|
|
501
|
-
}
|
|
502
|
-
),
|
|
503
|
-
a && /* @__PURE__ */ n("span", { className: l.keybinding, children: a })
|
|
504
|
-
] });
|
|
505
|
-
}
|
|
506
|
-
), We = (t, e, o) => ({
|
|
507
|
-
icon: i(
|
|
508
|
-
y.icon,
|
|
509
|
-
{
|
|
510
|
-
[y.active]: e,
|
|
511
|
-
[y.disabled]: o
|
|
512
|
-
},
|
|
513
|
-
t?.icon
|
|
514
|
-
),
|
|
515
|
-
keybinding: i(y.keybinding, t?.keybinding)
|
|
516
|
-
});
|
|
517
|
-
export {
|
|
518
|
-
He as B,
|
|
519
|
-
H as C,
|
|
520
|
-
Ae as D,
|
|
521
|
-
V as S,
|
|
522
|
-
je as T,
|
|
523
|
-
it as a,
|
|
524
|
-
ht as b,
|
|
525
|
-
mt as c,
|
|
526
|
-
Fe as d,
|
|
527
|
-
Be as e,
|
|
528
|
-
L as f,
|
|
529
|
-
Me as g,
|
|
530
|
-
Ve as h,
|
|
531
|
-
ze as i,
|
|
532
|
-
Ge as j,
|
|
533
|
-
Ke as k,
|
|
534
|
-
Xe as u
|
|
535
|
-
};
|
|
536
|
-
//# sourceMappingURL=ToolIconButton-C4F-rxOr.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolIconButton-C4F-rxOr.js","sources":["../src/components/button/Button.tsx","../src/components/card/Card.tsx","../src/components/drop-down/DropDown.tsx","../src/components/dialog/Dialog.tsx","../src/components/sidebar/Sidebar.tsx","../src/components/switcher-buttons/SwitcherButtons.tsx","../src/components/table/Table.tsx","../src/components/text-field/text-field.tsx","../src/features/theme-provider/ThemeProvider.tsx","../src/components/toolbar/tool-icon-button/ToolIconButton.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport {\n ComponentPropsWithoutRef,\n ElementRef,\n ElementType,\n ForwardedRef,\n ReactNode,\n forwardRef,\n} from 'react'\n\nimport { Replace } from '../../utils'\nimport s from './button.module.scss'\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'text'\ntype OwnProps<T extends ElementType> = {\n children?: ReactNode\n className?: string\n component?: T\n disabled?: boolean\n fullWidth?: boolean\n variant?: ButtonVariant\n icon?: ReactNode\n shortcut?: string\n}\n\nexport type ButtonProps<T extends ElementType> = Replace<\n ComponentPropsWithoutRef<T>,\n OwnProps<T>\n>\n\ntype ButtonRenderType = {\n (\n props: ButtonProps<'button'>,\n ref?: ForwardedRef<ElementRef<'button'>>\n ): ReactNode\n (\n props: ButtonProps<ElementType>,\n ref?: ForwardedRef<ElementRef<ElementType>>\n ): ReactNode\n}\n\nexport type ButtonComponent = {\n <T extends ElementType = 'button'>(\n props: ButtonProps<T> & { ref?: ForwardedRef<ElementRef<T>> }\n ): ReactNode\n}\n\nexport const ButtonRender: ButtonRenderType = (\n {\n children,\n className,\n component: Component = 'button',\n disabled,\n fullWidth,\n icon,\n shortcut,\n variant = 'primary',\n ...props\n },\n ref\n) => {\n const content = (\n <div className={s.buttonWithIcon}>\n <div className={s.content}>\n {icon}\n {children}\n </div>\n <div className={s.shortcut}>{shortcut}</div>\n </div>\n )\n\n return (\n <Component\n className={classNames(\n s[variant],\n fullWidth && s.fullWidth,\n disabled && s.disabled,\n icon && s.icon,\n className\n )}\n children={icon ? content : children}\n disabled={disabled}\n ref={ref}\n {...props}\n />\n )\n}\n\nexport const Button: ButtonComponent = forwardRef(ButtonRender)\n","import classNames from 'classnames'\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react'\n\nimport s from './card.module.scss'\n\nexport type CardProps = ComponentPropsWithoutRef<'div'>\n\nexport const CardRoot = forwardRef<ElementRef<'div'>, CardProps>(\n ({ className, ...props }, ref) => (\n <div className={classNames(s.root, className)} ref={ref} {...props} />\n )\n)\n\nexport type CardContentProps = CardProps & { ignoreHeader?: boolean }\n\nexport const CardContent = forwardRef<ElementRef<'div'>, CardContentProps>(\n ({ className, ignoreHeader, ...props }, ref) => (\n <div\n className={classNames(\n s.content,\n !ignoreHeader && s.contentAfterHeader,\n className\n )}\n ref={ref}\n {...props}\n />\n )\n)\n\nexport const CardHeader = forwardRef<ElementRef<'div'>, CardProps>(\n ({ className, ...props }, ref) => (\n <div className={classNames(s.header, className)} ref={ref} {...props} />\n )\n)\n\nexport const Card = Object.assign(CardRoot, {\n Content: CardContent,\n Header: CardHeader,\n Root: CardRoot,\n})\n","import classNames from 'classnames'\nimport {\n createContext,\n ReactNode,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react'\n\nimport styles from './drop-down.module.scss'\n\ninterface DropDownContextType {\n visible: boolean\n toggle: () => void\n close: () => void\n}\n\nconst DropDownContext = createContext<DropDownContextType | undefined>(\n undefined\n)\n\nconst useDropDownContext = () => {\n const context = useContext(DropDownContext)\n if (!context) {\n throw new Error('useDropDownContext must be used within a DropDown.Root')\n }\n return context\n}\n\ninterface RootProps {\n children: ReactNode\n defaultVisible?: boolean\n closeOnOutsideClick?: boolean\n closeOnEsc?: boolean\n}\n\nconst openDropDownStack: HTMLElement[] = []\n\nconst Root = ({\n children,\n closeOnEsc = true,\n closeOnOutsideClick = true,\n defaultVisible = false,\n}: RootProps) => {\n const [visible, setVisible] = useState(defaultVisible)\n const rootRef = useRef<HTMLDivElement>(null)\n\n const toggle = () => {\n if (!visible) {\n setVisible(true)\n if (rootRef.current) {\n openDropDownStack.push(rootRef.current)\n }\n } else {\n close()\n }\n }\n\n const close = () => {\n setVisible(false)\n if (rootRef.current) {\n const index = openDropDownStack.indexOf(rootRef.current)\n if (index !== -1) {\n openDropDownStack.splice(index, 1)\n }\n }\n }\n\n useEffect(() => {\n if (!closeOnOutsideClick) return\n\n const handleClickOutside = (event: MouseEvent) => {\n if (rootRef.current && !rootRef.current.contains(event.target as Node)) {\n close()\n }\n }\n\n document.addEventListener('mousedown', handleClickOutside)\n return () => {\n document.removeEventListener('mousedown', handleClickOutside)\n }\n }, [closeOnOutsideClick])\n\n useEffect(() => {\n if (!closeOnEsc) return\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && visible) {\n const lastDropDown = openDropDownStack[openDropDownStack.length - 1]\n if (lastDropDown === rootRef.current) {\n close()\n }\n }\n }\n\n document.addEventListener('keydown', handleKeyDown)\n return () => {\n document.removeEventListener('keydown', handleKeyDown)\n }\n }, [closeOnEsc, visible])\n\n return (\n <DropDownContext.Provider value={{ close, toggle, visible }}>\n <div ref={rootRef} className={styles.root}>\n {children}\n </div>\n </DropDownContext.Provider>\n )\n}\n\ninterface TriggerProps {\n children: ReactNode\n}\n\nconst Trigger = ({ children }: TriggerProps) => {\n const { toggle } = useDropDownContext()\n return <div onClick={toggle}>{children}</div>\n}\n\ninterface ContentProps {\n children: ReactNode\n horizontal?: 'left' | 'center' | 'right'\n vertical?: 'top' | 'bottom'\n className?: string\n fixedPosition?: boolean\n}\n\nconst Content = ({\n children,\n className,\n fixedPosition = false,\n horizontal = 'left',\n vertical = 'bottom',\n}: ContentProps) => {\n const { visible } = useDropDownContext()\n\n if (!visible) return null\n\n return (\n <div\n className={classNames(\n styles.dropdownContent,\n styles[horizontal],\n styles[vertical],\n { [styles.fixedPosition]: fixedPosition },\n className\n )}\n >\n {children}\n </div>\n )\n}\n\ninterface CloseProps {\n children: ReactNode\n onClick?: (event: React.MouseEvent) => void\n}\n\nconst Close = ({ children, onClick }: CloseProps) => {\n const { close } = useDropDownContext()\n\n const handleClick = (event: React.MouseEvent) => {\n if (onClick) {\n onClick(event)\n }\n close()\n }\n\n return <div onClick={handleClick}>{children}</div>\n}\n\nexport const DropDown = { Content, Root, Trigger, Close }\n","import classNames from 'classnames'\nimport React, {\n useState,\n useRef,\n ReactNode,\n forwardRef,\n MouseEvent,\n ElementType,\n useContext,\n} from 'react'\n\nimport styles from './dialog.module.scss'\n\ninterface RootProps {\n children: React.ReactNode\n isOpen?: boolean\n onStateChange?: (isOpen: boolean) => void\n}\n\ninterface DialogContextProps {\n dialogRef: React.RefObject<HTMLDialogElement>\n isOpen: boolean\n setIsOpen: (state: boolean) => void\n}\nconst DialogContext = React.createContext<DialogContextProps | null>(null)\n\nconst Root = ({\n children,\n isOpen: externalIsOpen,\n onStateChange,\n}: RootProps) => {\n const dialogRef = useRef<HTMLDialogElement | null>(null)\n const [internalIsOpen, setInternalIsOpen] = useState(false)\n\n const isOpen = externalIsOpen !== undefined ? externalIsOpen : internalIsOpen\n const setIsOpen = (state: boolean) => {\n if (externalIsOpen === undefined) {\n setInternalIsOpen(state)\n }\n if (onStateChange) {\n onStateChange(state)\n }\n }\n\n return (\n <DialogContext.Provider value={{ dialogRef, isOpen, setIsOpen }}>\n <div className={styles.dialogRoot}>{children}</div>\n </DialogContext.Provider>\n )\n}\n\ninterface TriggerProps<T extends ElementType = 'button'> {\n as?: T\n children: ReactNode\n}\n\nconst Trigger = <T extends ElementType = 'button'>({\n as,\n children,\n ...props\n}: TriggerProps<T> & React.ComponentPropsWithoutRef<T>) => {\n const context = useContext(DialogContext)\n if (!context) throw new Error('Trigger must be used within a Dialog.Root')\n\n const { dialogRef, setIsOpen } = context\n const Component = as || 'button'\n\n const handleClick = () => {\n dialogRef.current?.showModal()\n setIsOpen(true)\n }\n\n return (\n <Component\n onClick={handleClick}\n {...props}\n className={styles.dialogTrigger}\n role={as && as !== 'button' ? 'button' : undefined}\n >\n {children}\n </Component>\n )\n}\n\ninterface ContentProps {\n children: ReactNode\n className?: string\n closeOnBackdropClick?: boolean\n}\n\nconst Content = forwardRef<HTMLDialogElement, ContentProps>(\n ({ children, className, closeOnBackdropClick = true }, _) => {\n const context = useContext(DialogContext)\n if (!context) throw new Error('Content must be used within a Dialog.Root')\n\n const { dialogRef, isOpen, setIsOpen } = context\n\n const handleBackdropClick = (event: MouseEvent<HTMLDialogElement>) => {\n if (closeOnBackdropClick && event.target === dialogRef.current) {\n dialogRef.current?.close()\n setIsOpen(false)\n }\n }\n\n return (\n <dialog\n ref={dialogRef}\n className={classNames(styles.dialogContent, className)}\n onClick={handleBackdropClick}\n open={isOpen}\n >\n <div onClick={(e) => e.stopPropagation()}>{children}</div>\n </dialog>\n )\n }\n)\n\ninterface CloseProps<T extends ElementType = 'button'> {\n as?: T\n children?: ReactNode\n}\n\nconst Close = <T extends ElementType = 'button'>({\n as,\n children,\n ...props\n}: CloseProps<T> & React.ComponentPropsWithoutRef<T>) => {\n const context = useContext(DialogContext)\n if (!context) throw new Error('Close must be used within a Dialog.Root')\n\n const { dialogRef, setIsOpen } = context\n const Component = as || 'button'\n\n const handleClick = () => {\n dialogRef.current?.close()\n setIsOpen(false)\n }\n\n return (\n <Component\n onClick={handleClick}\n {...props}\n className={styles.dialogClose}\n role={as && as !== 'button' ? 'button' : undefined}\n >\n {children}\n </Component>\n )\n}\n\ninterface TitleProps {\n children: ReactNode\n className?: string\n}\n\nconst Title = ({ children, className }: TitleProps) => {\n return (\n <h2 className={classNames(styles.dialogTitle, className)}>{children}</h2>\n )\n}\n\ninterface SeparatorProps {}\n\nconst Separator = ({}: SeparatorProps) => {\n return <div className={styles.dialogSeparator} />\n}\n\nexport const Dialog = {\n Close,\n Content,\n Root,\n Separator,\n Title,\n Trigger,\n}\n","import classNames from 'classnames'\nimport {\n createContext,\n MouseEvent,\n ReactNode,\n useContext,\n useEffect,\n useRef,\n} from 'react'\n\nimport styles from './sidebar.module.scss'\n\ntype SidebarContextProps = {\n isOpen: boolean\n setIsOpen: (isOpen: boolean) => void\n}\n\nexport const SidebarContext = createContext<SidebarContextProps | undefined>(\n undefined\n)\n\nexport const useSidebarContext = () => {\n const context = useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebarContext must be used within a SidebarProvider')\n }\n return context\n}\n\ntype SidebarRootProps = {\n isOpen: boolean\n setIsOpen: (isOpen: boolean) => void\n children: ReactNode\n}\n\nconst Root = ({ children, isOpen, setIsOpen }: SidebarRootProps) => {\n return (\n <SidebarContext.Provider\n value={{\n isOpen: isOpen,\n setIsOpen: () => setIsOpen(!isOpen),\n }}\n >\n {children}\n </SidebarContext.Provider>\n )\n}\n\ntype SidebarTriggerProps = {\n children: ReactNode\n}\n\nconst Trigger = ({ children }: SidebarTriggerProps) => {\n const { setIsOpen } = useSidebarContext()\n\n const onClickHandler = (event: MouseEvent<HTMLDivElement>) => {\n event.preventDefault()\n setIsOpen(true)\n }\n\n return (\n <div className={styles.trigger} onClick={onClickHandler}>\n {children}\n </div>\n )\n}\n\ntype SidebarContentProps = {\n position?: 'left' | 'right' | 'bottom' | 'top'\n children: ReactNode\n className?: string\n closeOnOutsideClick?: boolean\n}\n\nconst Content = ({\n children,\n className,\n closeOnOutsideClick = true,\n position = 'right',\n}: SidebarContentProps) => {\n const { isOpen, setIsOpen } = useSidebarContext()\n const contentRef = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n if (!closeOnOutsideClick) return\n\n const handleClickOutside = (event: Event) => {\n if (\n contentRef.current &&\n !contentRef.current.contains(event.target as Node)\n ) {\n setIsOpen(false)\n }\n }\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside)\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside)\n }\n }, [isOpen, setIsOpen, closeOnOutsideClick])\n\n return (\n <div\n ref={contentRef}\n className={classNames(\n styles[position],\n styles.content,\n {\n [styles.close]: !isOpen,\n [styles.open]: isOpen,\n },\n className\n )}\n >\n {children}\n </div>\n )\n}\n\ntype SidebarCloseProps = {\n children: ReactNode\n}\n\nconst Close = ({ children }: SidebarCloseProps) => {\n const { setIsOpen } = useSidebarContext()\n\n const onClickHandler = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n setIsOpen(false)\n }\n\n return (\n <button className={styles.close} onClick={onClickHandler}>\n {children}\n </button>\n )\n}\n\nexport const Sidebar = {\n Close,\n Content,\n Root,\n Trigger,\n}\n","import classNames from 'classnames'\nimport React, { ElementType, forwardRef, ReactNode, useState } from 'react'\n\nimport style from './switcher-buttons.module.scss'\n\ninterface ComponentValues {\n value: string\n [key: string]: any\n}\n\ninterface SwitcherProps {\n componentValues: ComponentValues[]\n defaultValue?: string\n onChange?: (value: string) => void\n selectedValue?: string\n component: ElementType\n containerProps?: React.HTMLAttributes<HTMLDivElement>\n slot?: ReactNode\n className?: string\n}\n\nexport const SwitcherButtons = forwardRef<HTMLDivElement, SwitcherProps>(\n (\n {\n className,\n component: Component,\n componentValues,\n containerProps,\n onChange,\n selectedValue,\n slot,\n },\n ref\n ) => {\n const [activeValue, setActiveValue] = useState<string>(\n selectedValue || componentValues[0].value\n )\n\n const onChangeHandler = (value: string) => {\n setActiveValue(value)\n if (onChange) onChange(value)\n }\n\n return (\n <div ref={ref} className={style.switcher} {...containerProps}>\n <div className={classNames(style.buttons, className)}>\n {componentValues.map((button, index) => (\n <Component\n key={index}\n {...button}\n selected={activeValue === button.value}\n onClick={() => onChangeHandler(button.value)}\n />\n ))}\n </div>\n {slot && (\n <>\n <div className={style.separator} />\n {slot}\n </>\n )}\n </div>\n )\n }\n)\n","import classNames from 'classnames'\nimport { FocusEventHandler, MouseEventHandler, ReactNode } from 'react'\n\nimport s from './table.module.scss'\n\ninterface Props {\n children: ReactNode\n className?: string\n}\n\ntype RootProps = Props\nconst Root = ({ children, className }: RootProps) => {\n return <table className={classNames(s.root, className)}>{children}</table>\n}\n\ntype CaptionProps = Props\nconst Caption = ({ children, className }: CaptionProps) => {\n return (\n <caption className={classNames(s.caption, className)}>{children}</caption>\n )\n}\n\ntype HeaderProps = Props\nconst Header = ({ children, className }: HeaderProps) => {\n return <thead className={classNames(s.header, className)}>{children}</thead>\n}\n\ninterface RowProps extends Props {\n onClick?: MouseEventHandler<HTMLTableRowElement> | undefined\n onDoubleClick?: MouseEventHandler<HTMLTableRowElement> | undefined\n onBlur?: FocusEventHandler<HTMLTableRowElement> | undefined\n}\nconst Row = ({\n children,\n className,\n onBlur,\n onClick,\n onDoubleClick,\n}: RowProps) => {\n return (\n <tr\n className={classNames(s.row, className)}\n onClick={onClick}\n onDoubleClick={onDoubleClick}\n onBlur={onBlur}\n >\n {children}\n </tr>\n )\n}\n\ntype HeadProps = Props\nconst Head = ({ children, className }: HeadProps) => {\n return <th className={classNames(s.head, className)}>{children}</th>\n}\n\ntype BodyProps = Props\nconst Body = ({ children, className }: BodyProps) => {\n return <tbody className={classNames(s.body, className)}>{children}</tbody>\n}\n\ntype CellProps = Props\nconst Cell = ({ children, className }: CellProps) => {\n return <td className={classNames(s.cell, className)}>{children}</td>\n}\n\ntype FooterProps = Props\nconst Footer = ({ children, className }: FooterProps) => {\n return <tfoot className={classNames(s.footer, className)}>{children}</tfoot>\n}\n\nexport const Table = Object.assign(Root, {\n Body,\n Caption,\n Cell,\n Footer,\n Head,\n Header,\n Root,\n Row,\n})\n","import classNames from 'classnames'\nimport { X, Eye, Search, EyeOff } from 'lucide-react'\nimport {\n ChangeEvent,\n ForwardedRef,\n ReactNode,\n forwardRef,\n useState,\n} from 'react'\n\nimport s from './text-field.module.scss'\n\ntype SharedProps = {\n className?: string\n disabled?: boolean\n error?: string\n label?: string\n onBlur?: () => void\n onChange: (value: string) => void\n onFocus?: () => void\n placeholder?: string\n required?: boolean\n type?: 'text' | 'password' | 'email' | 'url' | string\n value: string\n}\n\nexport type TextFieldProps =\n | (SharedProps & {\n as?: 'input'\n inputType?: 'password' | 'search' | 'text'\n })\n | (SharedProps & { as: 'textarea' })\n\nexport type TextFieldComponent = {\n (\n props: Extract<TextFieldProps, { as: 'textarea' }> & {\n ref?: ForwardedRef<HTMLTextAreaElement>\n }\n ): ReactNode\n (\n props: Extract<TextFieldProps, { as?: 'input' }> & {\n ref?: ForwardedRef<HTMLInputElement>\n }\n ): ReactNode\n}\n\nexport const TextField: TextFieldComponent = forwardRef<\n HTMLInputElement | HTMLTextAreaElement,\n TextFieldProps\n>(({ className, error, label, onChange, required, ...props }, ref) => {\n const [showPassword, setShowPassword] = useState(false)\n\n const handleChange = (\n e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => onChange(e.currentTarget.value)\n\n const sharedClassName = classNames(s.input, error && s.error, className)\n let resolvedFragment: ReactNode\n\n if (!props.as || props.as === 'input') {\n const { inputType, ...restProps } = props\n const isSearch = inputType === 'search'\n const isPassword = inputType === 'password'\n const passwordFieldNextType = showPassword ? 'text' : 'password'\n\n resolvedFragment = (\n <>\n <input\n className={classNames(sharedClassName, isSearch && s.inputSearch)}\n onChange={handleChange}\n ref={ref as unknown as ForwardedRef<HTMLInputElement>}\n type={isPassword ? passwordFieldNextType : inputType}\n {...restProps}\n />\n {isPassword &&\n (showPassword ? (\n <Eye\n strokeWidth={2.5}\n width={20}\n className={classNames(s.button, label && s.buttonWithLabel)}\n onClick={() => setShowPassword((prev) => !prev)}\n />\n ) : (\n <EyeOff\n strokeWidth={2.5}\n width={20}\n className={classNames(s.button, label && s.buttonWithLabel)}\n onClick={() => setShowPassword((prev) => !prev)}\n />\n ))}\n {isSearch && props.value && (\n <X\n onClick={() => onChange('')}\n className={classNames(\n s.button,\n label && s.buttonWithLabel,\n s.resetSearchValue\n )}\n strokeWidth={2.5}\n size={24}\n />\n )}\n {isSearch && (\n <Search\n className={classNames(\n s.searchOutline,\n label && s.searchOutlineWithLabel\n )}\n size={20}\n />\n )}\n </>\n )\n }\n\n if (props.as === 'textarea') {\n resolvedFragment = (\n <textarea\n className={sharedClassName}\n onChange={handleChange}\n ref={ref as unknown as ForwardedRef<HTMLTextAreaElement>}\n {...props}\n />\n )\n }\n\n return (\n <div className={s.root}>\n <span className={s.title}>\n {label}\n {required && <span className={s.titleError}>*</span>}\n </span>\n <div className={s.inputContainer}>{resolvedFragment}</div>\n <div className={s.errorMessage}>{error}</div>\n </div>\n )\n})\n","import { createContext, useContext, useState, ReactNode } from 'react'\n\nexport type Theme = 'light' | 'dark'\nexport type ThemeValue = Theme | 'system'\n\ninterface ThemeContextType {\n theme: ThemeValue\n setTheme: (theme: ThemeValue) => void\n}\n\nconst ThemeContext = createContext<ThemeContextType | undefined>(undefined)\n\nexport const ThemeProvider = ({ children }: { children: ReactNode }) => {\n const defaultTheme = getTheme() || 'system'\n const [theme, setTheme] = useState<ThemeValue>(defaultTheme)\n\n return (\n <ThemeContext.Provider value={{ setTheme, theme }}>\n {children}\n </ThemeContext.Provider>\n )\n}\n\nexport const useTheme = () => {\n const context = useContext(ThemeContext)\n\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider')\n }\n\n setDataThemeHandler(context.theme)\n\n return context\n}\n\nconst setDataThemeHandler = (value: ThemeValue) => {\n const savedTheme = getTheme()\n\n saveTheme(value || savedTheme)\n}\n\nconst saveTheme = (theme: ThemeValue) => {\n const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)')\n\n if (theme === 'system') {\n const defaultTheme = prefersDarkScheme.matches ? 'dark' : 'light'\n localStorage.setItem('theme', theme)\n setTheme(defaultTheme)\n } else {\n localStorage.setItem('theme', theme)\n setTheme(theme)\n }\n}\n\nconst setTheme = (theme: Theme) => {\n document.documentElement.setAttribute('data-theme', theme)\n}\n\nconst getTheme = () => {\n const theme = localStorage.getItem('theme')\n if (theme) return theme as ThemeValue\n}\n","import classNames from 'classnames'\nimport { ReactNode, forwardRef } from 'react'\n\nimport s from './tool-icon-button.module.scss'\n\nexport type ToolbarSlot = 'icon' | 'keybinding'\nexport type ToolbarClasses = { [P in ToolbarSlot]?: string }\n\ninterface Props {\n title?: string\n icon: ReactNode\n keybinding?: string\n aria_label?: string\n aria_keyshortcuts?: string\n classes?: ToolbarClasses\n name?: string\n id?: string\n isActive?: boolean\n disabled?: boolean\n onClick?: () => void\n}\n\nexport const ToolIconButton = forwardRef<HTMLDivElement, Props>(\n (props, ref) => {\n const { classes, disabled, icon, isActive, keybinding, onClick, title } =\n props\n\n const styles = getClasses(classes, isActive, disabled)\n\n return (\n <label className={s.root} title={title}>\n <div\n className={styles.icon}\n ref={ref}\n tabIndex={disabled ? -1 : 0}\n role=\"button\"\n aria-pressed={isActive}\n aria-disabled={disabled}\n onClick={!disabled ? onClick : undefined}\n >\n {icon}\n </div>\n {keybinding && <span className={styles.keybinding}>{keybinding}</span>}\n </label>\n )\n }\n)\n\nconst getClasses = (\n classes?: ToolbarClasses,\n isActive?: boolean,\n disabled?: boolean\n): Required<ToolbarClasses> => ({\n icon: classNames(\n s.icon,\n {\n [s.active]: isActive,\n [s.disabled]: disabled,\n },\n classes?.icon\n ),\n keybinding: classNames(s.keybinding, classes?.keybinding),\n})\n"],"names":["ButtonRender","children","className","Component","disabled","fullWidth","icon","shortcut","variant","props","ref","content","jsxs","s","jsx","classNames","Button","forwardRef","CardRoot","CardContent","ignoreHeader","CardHeader","Card","DropDownContext","createContext","useDropDownContext","context","useContext","openDropDownStack","Root","closeOnEsc","closeOnOutsideClick","defaultVisible","visible","setVisible","useState","rootRef","useRef","toggle","close","index","useEffect","handleClickOutside","event","handleKeyDown","styles","Trigger","Content","fixedPosition","horizontal","vertical","Close","onClick","DropDown","DialogContext","React","externalIsOpen","onStateChange","dialogRef","internalIsOpen","setInternalIsOpen","isOpen","setIsOpen","state","as","closeOnBackdropClick","_","handleBackdropClick","e","Title","Separator","Dialog","SidebarContext","useSidebarContext","onClickHandler","position","contentRef","Sidebar","SwitcherButtons","componentValues","containerProps","onChange","selectedValue","slot","activeValue","setActiveValue","onChangeHandler","value","style","button","Fragment","Caption","Header","Row","onBlur","onDoubleClick","Head","Body","Cell","Footer","Table","TextField","error","label","required","showPassword","setShowPassword","handleChange","sharedClassName","resolvedFragment","inputType","restProps","isSearch","isPassword","passwordFieldNextType","Eye","prev","EyeOff","X","Search","ThemeContext","ThemeProvider","defaultTheme","getTheme","theme","setTheme","useTheme","setDataThemeHandler","savedTheme","saveTheme","prefersDarkScheme","ToolIconButton","classes","isActive","keybinding","title","getClasses"],"mappings":";;;;;;;;;;;;;;GA+CaA,KAAiC,CAC5C;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAWC,IAAY;AAAA,EACvB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IACJ,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAE,gBAChB,UAAA;AAAA,IAAC,gBAAAD,EAAA,OAAA,EAAI,WAAWC,EAAE,SACf,UAAA;AAAA,MAAAP;AAAA,MACAL;AAAA,IAAA,GACH;AAAA,IACC,gBAAA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