@yourbestsoft/studio-screen-ui-kit 0.0.8 → 0.0.10
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-CKUWpXoL.js +531 -0
- package/dist/ToolIconButton-CKUWpXoL.js.map +1 -0
- package/dist/components/table/Table.d.ts +11 -16
- package/dist/components/text-field/text-field.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index2.js +2 -2
- package/package.json +1 -1
- package/dist/ToolIconButton-C1LlNNL-.js +0 -520
- package/dist/ToolIconButton-C1LlNNL-.js.map +0 -1
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as A } 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", v = {
|
|
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: c,
|
|
21
|
+
icon: r,
|
|
22
|
+
shortcut: a,
|
|
23
|
+
variant: _ = "primary",
|
|
24
|
+
...d
|
|
25
|
+
}, l) => {
|
|
26
|
+
const m = /* @__PURE__ */ g("div", { className: v.buttonWithIcon, children: [
|
|
27
|
+
/* @__PURE__ */ g("div", { className: v.content, children: [
|
|
28
|
+
r,
|
|
29
|
+
t
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ n("div", { className: v.shortcut, children: a })
|
|
32
|
+
] });
|
|
33
|
+
return /* @__PURE__ */ n(
|
|
34
|
+
o,
|
|
35
|
+
{
|
|
36
|
+
className: i(
|
|
37
|
+
v[_],
|
|
38
|
+
c && v.fullWidth,
|
|
39
|
+
s && v.disabled,
|
|
40
|
+
r && v.icon,
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
children: r ? m : t,
|
|
44
|
+
disabled: s,
|
|
45
|
+
ref: l,
|
|
46
|
+
...d
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}, qe = 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
|
+
}, q = 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
|
+
), He = Object.assign(q, {
|
|
72
|
+
Content: ht,
|
|
73
|
+
Header: mt,
|
|
74
|
+
Root: q
|
|
75
|
+
}), gt = "_root_1xfv8_1", bt = "_dropdownContent_1xfv8_6", ft = "_left_1xfv8_17", pt = "_center_1xfv8_21", vt = "_right_1xfv8_26", Ct = "_top_1xfv8_30", wt = "_bottom_1xfv8_34", Nt = "_fixedPosition_1xfv8_38", k = {
|
|
76
|
+
root: gt,
|
|
77
|
+
dropdownContent: bt,
|
|
78
|
+
left: ft,
|
|
79
|
+
center: pt,
|
|
80
|
+
right: vt,
|
|
81
|
+
top: Ct,
|
|
82
|
+
bottom: wt,
|
|
83
|
+
fixedPosition: Nt
|
|
84
|
+
}, B = W(
|
|
85
|
+
void 0
|
|
86
|
+
), M = () => {
|
|
87
|
+
const t = w(B);
|
|
88
|
+
if (!t)
|
|
89
|
+
throw new Error("useDropDownContext must be used within a DropDown.Root");
|
|
90
|
+
return t;
|
|
91
|
+
}, x = [], xt = ({
|
|
92
|
+
children: t,
|
|
93
|
+
closeOnEsc: e = !0,
|
|
94
|
+
closeOnOutsideClick: o = !0,
|
|
95
|
+
defaultVisible: s = !1
|
|
96
|
+
}) => {
|
|
97
|
+
const [c, r] = T(s), a = E(null), _ = () => {
|
|
98
|
+
c ? d() : (r(!0), a.current && x.push(a.current));
|
|
99
|
+
}, d = () => {
|
|
100
|
+
if (r(!1), a.current) {
|
|
101
|
+
const l = x.indexOf(a.current);
|
|
102
|
+
l !== -1 && x.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" && c && x[x.length - 1] === a.current && d();
|
|
117
|
+
};
|
|
118
|
+
return document.addEventListener("keydown", l), () => {
|
|
119
|
+
document.removeEventListener("keydown", l);
|
|
120
|
+
};
|
|
121
|
+
}, [e, c]), /* @__PURE__ */ n(B.Provider, { value: { close: d, toggle: _, visible: c }, children: /* @__PURE__ */ n("div", { ref: a, className: k.root, children: t }) });
|
|
122
|
+
}, kt = ({ children: t }) => {
|
|
123
|
+
const { toggle: e } = M();
|
|
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: c = "bottom"
|
|
131
|
+
}) => {
|
|
132
|
+
const { visible: r } = M();
|
|
133
|
+
return r ? /* @__PURE__ */ n(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
className: i(
|
|
137
|
+
k.dropdownContent,
|
|
138
|
+
k[s],
|
|
139
|
+
k[c],
|
|
140
|
+
{ [k.fixedPosition]: o },
|
|
141
|
+
e
|
|
142
|
+
),
|
|
143
|
+
children: t
|
|
144
|
+
}
|
|
145
|
+
) : null;
|
|
146
|
+
}, Fe = { Content: yt, Root: xt, Trigger: kt }, Tt = "_dialogRoot_c30vs_1", Rt = "_dialogTrigger_c30vs_5", St = "_dialogContent_c30vs_13", Dt = "_dialogClose_c30vs_25", $t = "_dialogTitle_c30vs_33", Ot = "_dialogSeparator_c30vs_38", N = {
|
|
147
|
+
dialogRoot: Tt,
|
|
148
|
+
dialogTrigger: Rt,
|
|
149
|
+
dialogContent: St,
|
|
150
|
+
dialogClose: Dt,
|
|
151
|
+
dialogTitle: $t,
|
|
152
|
+
dialogSeparator: Ot
|
|
153
|
+
}, S = G.createContext(null), It = ({
|
|
154
|
+
children: t,
|
|
155
|
+
isOpen: e,
|
|
156
|
+
onStateChange: o
|
|
157
|
+
}) => {
|
|
158
|
+
const s = E(null), [c, r] = T(!1), a = e !== void 0 ? e : c, _ = (d) => {
|
|
159
|
+
e === void 0 && r(d), o && o(d);
|
|
160
|
+
};
|
|
161
|
+
return /* @__PURE__ */ n(S.Provider, { value: { dialogRef: s, isOpen: a, setIsOpen: _ }, children: /* @__PURE__ */ n("div", { className: N.dialogRoot, children: t }) });
|
|
162
|
+
}, Wt = ({
|
|
163
|
+
as: t,
|
|
164
|
+
children: e,
|
|
165
|
+
...o
|
|
166
|
+
}) => {
|
|
167
|
+
const s = w(S);
|
|
168
|
+
if (!s) throw new Error("Trigger must be used within a Dialog.Root");
|
|
169
|
+
const { dialogRef: c, setIsOpen: r } = s;
|
|
170
|
+
return /* @__PURE__ */ n(
|
|
171
|
+
t || "button",
|
|
172
|
+
{
|
|
173
|
+
onClick: () => {
|
|
174
|
+
c.current?.showModal(), r(!0);
|
|
175
|
+
},
|
|
176
|
+
...o,
|
|
177
|
+
className: N.dialogTrigger,
|
|
178
|
+
role: t && t !== "button" ? "button" : void 0,
|
|
179
|
+
children: e
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}, Et = b(
|
|
183
|
+
({ children: t, className: e, closeOnBackdropClick: o = !0 }, s) => {
|
|
184
|
+
const c = w(S);
|
|
185
|
+
if (!c) throw new Error("Content must be used within a Dialog.Root");
|
|
186
|
+
const { dialogRef: r, isOpen: a, setIsOpen: _ } = c, d = (l) => {
|
|
187
|
+
o && l.target === r.current && (r.current?.close(), _(!1));
|
|
188
|
+
};
|
|
189
|
+
return /* @__PURE__ */ n(
|
|
190
|
+
"dialog",
|
|
191
|
+
{
|
|
192
|
+
ref: r,
|
|
193
|
+
className: i(N.dialogContent, e),
|
|
194
|
+
onClick: d,
|
|
195
|
+
open: a,
|
|
196
|
+
children: /* @__PURE__ */ n("div", { onClick: (l) => l.stopPropagation(), children: t })
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
), Pt = ({
|
|
201
|
+
as: t,
|
|
202
|
+
children: e,
|
|
203
|
+
...o
|
|
204
|
+
}) => {
|
|
205
|
+
const s = w(S);
|
|
206
|
+
if (!s) throw new Error("Close must be used within a Dialog.Root");
|
|
207
|
+
const { dialogRef: c, setIsOpen: r } = s;
|
|
208
|
+
return /* @__PURE__ */ n(
|
|
209
|
+
t || "button",
|
|
210
|
+
{
|
|
211
|
+
onClick: () => {
|
|
212
|
+
c.current?.close(), r(!1);
|
|
213
|
+
},
|
|
214
|
+
...o,
|
|
215
|
+
className: N.dialogClose,
|
|
216
|
+
role: t && t !== "button" ? "button" : void 0,
|
|
217
|
+
children: e
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}, Lt = ({ children: t, className: e }) => /* @__PURE__ */ n("h2", { className: i(N.dialogTitle, e), children: t }), qt = ({}) => /* @__PURE__ */ n("div", { className: N.dialogSeparator }), Ae = {
|
|
221
|
+
Close: Pt,
|
|
222
|
+
Content: Et,
|
|
223
|
+
Root: It,
|
|
224
|
+
Separator: qt,
|
|
225
|
+
Title: Lt,
|
|
226
|
+
Trigger: Wt
|
|
227
|
+
}, Ht = "_sidebar_dg2au_12", Ft = "_trigger_dg2au_16", At = "_content_dg2au_21", Bt = "_left_dg2au_34", Mt = "_open_dg2au_38", Vt = "_right_dg2au_42", jt = "_bottom_dg2au_50", zt = "_top_dg2au_63", C = {
|
|
228
|
+
sidebar: Ht,
|
|
229
|
+
trigger: Ft,
|
|
230
|
+
content: At,
|
|
231
|
+
left: Bt,
|
|
232
|
+
open: Mt,
|
|
233
|
+
right: Vt,
|
|
234
|
+
bottom: jt,
|
|
235
|
+
top: zt
|
|
236
|
+
}, V = W(
|
|
237
|
+
void 0
|
|
238
|
+
), P = () => {
|
|
239
|
+
const t = w(V);
|
|
240
|
+
if (!t)
|
|
241
|
+
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
242
|
+
return t;
|
|
243
|
+
}, Kt = ({ children: t, isOpen: e, setIsOpen: o }) => /* @__PURE__ */ n(
|
|
244
|
+
V.Provider,
|
|
245
|
+
{
|
|
246
|
+
value: {
|
|
247
|
+
isOpen: e,
|
|
248
|
+
setIsOpen: () => o(!e)
|
|
249
|
+
},
|
|
250
|
+
children: t
|
|
251
|
+
}
|
|
252
|
+
), Xt = ({ children: t }) => {
|
|
253
|
+
const { setIsOpen: e } = P(), o = (s) => {
|
|
254
|
+
s.preventDefault(), e(!0);
|
|
255
|
+
};
|
|
256
|
+
return /* @__PURE__ */ n("div", { className: C.trigger, onClick: o, children: t });
|
|
257
|
+
}, Gt = ({
|
|
258
|
+
children: t,
|
|
259
|
+
className: e,
|
|
260
|
+
closeOnOutsideClick: o = !0,
|
|
261
|
+
position: s = "right"
|
|
262
|
+
}) => {
|
|
263
|
+
const { isOpen: c, setIsOpen: r } = P(), a = E(null);
|
|
264
|
+
return I(() => {
|
|
265
|
+
if (!o) return;
|
|
266
|
+
const _ = (d) => {
|
|
267
|
+
a.current && !a.current.contains(d.target) && r(!1);
|
|
268
|
+
};
|
|
269
|
+
return c && document.addEventListener("mousedown", _), () => {
|
|
270
|
+
document.removeEventListener("mousedown", _);
|
|
271
|
+
};
|
|
272
|
+
}, [c, r, o]), /* @__PURE__ */ n(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
ref: a,
|
|
276
|
+
className: i(
|
|
277
|
+
C[s],
|
|
278
|
+
C.content,
|
|
279
|
+
{
|
|
280
|
+
[C.close]: !c,
|
|
281
|
+
[C.open]: c
|
|
282
|
+
},
|
|
283
|
+
e
|
|
284
|
+
),
|
|
285
|
+
children: t
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
}, Jt = ({ children: t }) => {
|
|
289
|
+
const { setIsOpen: e } = P(), o = (s) => {
|
|
290
|
+
s.preventDefault(), e(!1);
|
|
291
|
+
};
|
|
292
|
+
return /* @__PURE__ */ n("button", { className: C.close, onClick: o, children: t });
|
|
293
|
+
}, Be = {
|
|
294
|
+
Close: Jt,
|
|
295
|
+
Content: Gt,
|
|
296
|
+
Root: Kt,
|
|
297
|
+
Trigger: Xt
|
|
298
|
+
}, Qt = "_switcher_k6tdq_1", Ut = "_buttons_k6tdq_6", Yt = "_separator_k6tdq_10", O = {
|
|
299
|
+
switcher: Qt,
|
|
300
|
+
buttons: Ut,
|
|
301
|
+
separator: Yt
|
|
302
|
+
}, Me = b(
|
|
303
|
+
({
|
|
304
|
+
className: t,
|
|
305
|
+
component: e,
|
|
306
|
+
componentValues: o,
|
|
307
|
+
containerProps: s,
|
|
308
|
+
onChange: c,
|
|
309
|
+
selectedValue: r,
|
|
310
|
+
slot: a
|
|
311
|
+
}, _) => {
|
|
312
|
+
const [d, l] = T(
|
|
313
|
+
r || o[0].value
|
|
314
|
+
), m = (h) => {
|
|
315
|
+
l(h), c && c(h);
|
|
316
|
+
};
|
|
317
|
+
return /* @__PURE__ */ g("div", { ref: _, className: O.switcher, ...s, children: [
|
|
318
|
+
/* @__PURE__ */ n("div", { className: i(O.buttons, t), children: o.map((h, p) => /* @__PURE__ */ n(
|
|
319
|
+
e,
|
|
320
|
+
{
|
|
321
|
+
...h,
|
|
322
|
+
selected: d === h.value,
|
|
323
|
+
onClick: () => m(h.value)
|
|
324
|
+
},
|
|
325
|
+
p
|
|
326
|
+
)) }),
|
|
327
|
+
a && /* @__PURE__ */ g(A, { children: [
|
|
328
|
+
/* @__PURE__ */ n("div", { className: O.separator }),
|
|
329
|
+
a
|
|
330
|
+
] })
|
|
331
|
+
] });
|
|
332
|
+
}
|
|
333
|
+
), Zt = "_root_1b0i5_13", te = "_header_1b0i5_19", ee = "_footer_1b0i5_23", oe = "_row_1b0i5_28", ne = "_body_1b0i5_41", se = "_head_1b0i5_19", re = "_cell_1b0i5_48", ce = "_caption_1b0i5_65", ae = "_storiesFooterCellOne_1b0i5_70", ie = "_storiesFooterCellTwo_1b0i5_73", f = {
|
|
334
|
+
root: Zt,
|
|
335
|
+
header: te,
|
|
336
|
+
footer: ee,
|
|
337
|
+
row: oe,
|
|
338
|
+
body: ne,
|
|
339
|
+
head: se,
|
|
340
|
+
cell: re,
|
|
341
|
+
caption: ce,
|
|
342
|
+
storiesFooterCellOne: ae,
|
|
343
|
+
storiesFooterCellTwo: ie
|
|
344
|
+
}, H = ({ children: t, className: e }) => /* @__PURE__ */ n("table", { className: i(f.root, e), children: t }), le = ({ children: t, className: e }) => /* @__PURE__ */ n("caption", { className: i(f.caption, e), children: t }), de = ({ children: t, className: e }) => /* @__PURE__ */ n("thead", { className: i(f.header, e), children: t }), _e = ({
|
|
345
|
+
children: t,
|
|
346
|
+
className: e,
|
|
347
|
+
onBlur: o,
|
|
348
|
+
onClick: s,
|
|
349
|
+
onDoubleClick: c
|
|
350
|
+
}) => /* @__PURE__ */ n(
|
|
351
|
+
"tr",
|
|
352
|
+
{
|
|
353
|
+
className: i(f.row, e),
|
|
354
|
+
onClick: s,
|
|
355
|
+
onDoubleClick: c,
|
|
356
|
+
onBlur: o,
|
|
357
|
+
children: t
|
|
358
|
+
}
|
|
359
|
+
), ue = ({ children: t, className: e }) => /* @__PURE__ */ n("th", { className: i(f.head, e), children: t }), he = ({ children: t, className: e }) => /* @__PURE__ */ n("tbody", { className: i(f.body, e), children: t }), me = ({ children: t, className: e }) => /* @__PURE__ */ n("td", { className: i(f.cell, e), children: t }), ge = ({ children: t, className: e }) => /* @__PURE__ */ n("tfoot", { className: i(f.footer, e), children: t }), Ve = Object.assign(H, {
|
|
360
|
+
Body: he,
|
|
361
|
+
Caption: le,
|
|
362
|
+
Cell: me,
|
|
363
|
+
Footer: ge,
|
|
364
|
+
Head: ue,
|
|
365
|
+
Header: de,
|
|
366
|
+
Root: H,
|
|
367
|
+
Row: _e
|
|
368
|
+
}), be = "_inputContainer_iqbs3_1", fe = "_input_iqbs3_1", pe = "_inputSearch_iqbs3_40", ve = "_error_iqbs3_43", Ce = "_button_iqbs3_58", we = "_buttonWithLabel_iqbs3_68", Ne = "_resetSearchValue_iqbs3_73", xe = "_searchOutline_iqbs3_80", ke = "_errorMessage_iqbs3_87", u = {
|
|
369
|
+
inputContainer: be,
|
|
370
|
+
input: fe,
|
|
371
|
+
inputSearch: pe,
|
|
372
|
+
error: ve,
|
|
373
|
+
button: Ce,
|
|
374
|
+
buttonWithLabel: we,
|
|
375
|
+
resetSearchValue: Ne,
|
|
376
|
+
searchOutline: xe,
|
|
377
|
+
errorMessage: ke
|
|
378
|
+
}, je = b(({ className: t, error: e, label: o, onChange: s, required: c, ...r }, a) => {
|
|
379
|
+
const [_, d] = T(!1), l = (p) => s(p.currentTarget.value), m = i(u.input, e && u.error, t);
|
|
380
|
+
let h;
|
|
381
|
+
if (!r.as || r.as === "input") {
|
|
382
|
+
const { inputType: p, ...K } = r, D = p === "search", L = p === "password", X = _ ? "text" : "password";
|
|
383
|
+
h = /* @__PURE__ */ g(A, { children: [
|
|
384
|
+
/* @__PURE__ */ n(
|
|
385
|
+
"input",
|
|
386
|
+
{
|
|
387
|
+
className: i(m, D && u.inputSearch),
|
|
388
|
+
onChange: l,
|
|
389
|
+
ref: a,
|
|
390
|
+
type: L ? X : p,
|
|
391
|
+
...K
|
|
392
|
+
}
|
|
393
|
+
),
|
|
394
|
+
L && (_ ? /* @__PURE__ */ n(
|
|
395
|
+
J,
|
|
396
|
+
{
|
|
397
|
+
strokeWidth: 2.5,
|
|
398
|
+
width: 20,
|
|
399
|
+
className: i(u.button, o && u.buttonWithLabel),
|
|
400
|
+
onClick: () => d(($) => !$)
|
|
401
|
+
}
|
|
402
|
+
) : /* @__PURE__ */ n(
|
|
403
|
+
Q,
|
|
404
|
+
{
|
|
405
|
+
strokeWidth: 2.5,
|
|
406
|
+
width: 20,
|
|
407
|
+
className: i(u.button, o && u.buttonWithLabel),
|
|
408
|
+
onClick: () => d(($) => !$)
|
|
409
|
+
}
|
|
410
|
+
)),
|
|
411
|
+
D && r.value && /* @__PURE__ */ n(
|
|
412
|
+
U,
|
|
413
|
+
{
|
|
414
|
+
onClick: () => s(""),
|
|
415
|
+
className: i(
|
|
416
|
+
u.button,
|
|
417
|
+
o && u.buttonWithLabel,
|
|
418
|
+
u.resetSearchValue
|
|
419
|
+
),
|
|
420
|
+
strokeWidth: 2.5,
|
|
421
|
+
size: 24
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
D && /* @__PURE__ */ n(
|
|
425
|
+
Y,
|
|
426
|
+
{
|
|
427
|
+
className: i(
|
|
428
|
+
u.searchOutline,
|
|
429
|
+
o && u.searchOutlineWithLabel
|
|
430
|
+
),
|
|
431
|
+
size: 20
|
|
432
|
+
}
|
|
433
|
+
)
|
|
434
|
+
] });
|
|
435
|
+
}
|
|
436
|
+
return r.as === "textarea" && (h = /* @__PURE__ */ n(
|
|
437
|
+
"textarea",
|
|
438
|
+
{
|
|
439
|
+
className: m,
|
|
440
|
+
onChange: l,
|
|
441
|
+
ref: a,
|
|
442
|
+
...r
|
|
443
|
+
}
|
|
444
|
+
)), /* @__PURE__ */ g("div", { className: u.root, children: [
|
|
445
|
+
/* @__PURE__ */ g("span", { className: u.title, children: [
|
|
446
|
+
o,
|
|
447
|
+
c && /* @__PURE__ */ n("span", { className: u.titleError, children: "*" })
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ n("div", { className: u.inputContainer, children: h }),
|
|
450
|
+
/* @__PURE__ */ n("div", { className: u.errorMessage, children: e })
|
|
451
|
+
] });
|
|
452
|
+
}), j = W(void 0), ze = ({ children: t }) => {
|
|
453
|
+
const e = z() || "system", [o, s] = T(e);
|
|
454
|
+
return /* @__PURE__ */ n(j.Provider, { value: { setTheme: s, theme: o }, children: t });
|
|
455
|
+
}, Ke = () => {
|
|
456
|
+
const t = w(j);
|
|
457
|
+
if (!t)
|
|
458
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
459
|
+
return ye(t.theme), t;
|
|
460
|
+
}, ye = (t) => {
|
|
461
|
+
const e = z();
|
|
462
|
+
Te(t || e);
|
|
463
|
+
}, Te = (t) => {
|
|
464
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
465
|
+
if (t === "system") {
|
|
466
|
+
const o = e.matches ? "dark" : "light";
|
|
467
|
+
localStorage.setItem("theme", t), F(o);
|
|
468
|
+
} else
|
|
469
|
+
localStorage.setItem("theme", t), F(t);
|
|
470
|
+
}, F = (t) => {
|
|
471
|
+
document.documentElement.setAttribute("data-theme", t);
|
|
472
|
+
}, z = () => {
|
|
473
|
+
const t = localStorage.getItem("theme");
|
|
474
|
+
if (t) return t;
|
|
475
|
+
}, Re = "_root_17w6h_1", Se = "_icon_17w6h_11", De = "_active_17w6h_27", $e = "_disabled_17w6h_31", Oe = "_keybinding_17w6h_44", y = {
|
|
476
|
+
root: Re,
|
|
477
|
+
icon: Se,
|
|
478
|
+
active: De,
|
|
479
|
+
disabled: $e,
|
|
480
|
+
keybinding: Oe
|
|
481
|
+
}, Xe = b(
|
|
482
|
+
(t, e) => {
|
|
483
|
+
const { classes: o, disabled: s, icon: c, isActive: r, keybinding: a, onClick: _, title: d } = t, l = Ie(o, r, s);
|
|
484
|
+
return /* @__PURE__ */ g("label", { className: y.root, title: d, children: [
|
|
485
|
+
/* @__PURE__ */ n(
|
|
486
|
+
"div",
|
|
487
|
+
{
|
|
488
|
+
className: l.icon,
|
|
489
|
+
ref: e,
|
|
490
|
+
tabIndex: s ? -1 : 0,
|
|
491
|
+
role: "button",
|
|
492
|
+
"aria-pressed": r,
|
|
493
|
+
"aria-disabled": s,
|
|
494
|
+
onClick: s ? void 0 : _,
|
|
495
|
+
children: c
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
a && /* @__PURE__ */ n("span", { className: l.keybinding, children: a })
|
|
499
|
+
] });
|
|
500
|
+
}
|
|
501
|
+
), Ie = (t, e, o) => ({
|
|
502
|
+
icon: i(
|
|
503
|
+
y.icon,
|
|
504
|
+
{
|
|
505
|
+
[y.active]: e,
|
|
506
|
+
[y.disabled]: o
|
|
507
|
+
},
|
|
508
|
+
t?.icon
|
|
509
|
+
),
|
|
510
|
+
keybinding: i(y.keybinding, t?.keybinding)
|
|
511
|
+
});
|
|
512
|
+
export {
|
|
513
|
+
qe as B,
|
|
514
|
+
q as C,
|
|
515
|
+
Fe as D,
|
|
516
|
+
V as S,
|
|
517
|
+
Ve as T,
|
|
518
|
+
it as a,
|
|
519
|
+
ht as b,
|
|
520
|
+
mt as c,
|
|
521
|
+
He as d,
|
|
522
|
+
Ae as e,
|
|
523
|
+
P as f,
|
|
524
|
+
Be as g,
|
|
525
|
+
Me as h,
|
|
526
|
+
je as i,
|
|
527
|
+
Xe as j,
|
|
528
|
+
ze as k,
|
|
529
|
+
Ke as u
|
|
530
|
+
};
|
|
531
|
+
//# sourceMappingURL=ToolIconButton-CKUWpXoL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolIconButton-CKUWpXoL.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\nexport const DropDown = { Content, Root, Trigger }\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","DropDown","DialogContext","React","externalIsOpen","onStateChange","dialogRef","internalIsOpen","setInternalIsOpen","isOpen","setIsOpen","state","as","closeOnBackdropClick","_","handleBackdropClick","e","Close","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","onClick","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,gBAAAa,EAAA,OAAA,EAAI,WAAWD,EAAE,UAAW,UAASN,EAAA,CAAA;AAAA,EAAA,GACxC;AAIA,SAAA,gBAAAO;AAAA,IAACX;AAAA,IAAA;AAAA,MACC,WAAWY;AAAA,QACTF,EAAEL,CAAO;AAAA,QACTH,KAAaQ,EAAE;AAAA,QACfT,KAAYS,EAAE;AAAA,QACdP,KAAQO,EAAE;AAAA,QACVX;AAAA,MACF;AAAA,MACA,UAAUI,IAAOK,IAAUV;AAAA,MAC3B,UAAAG;AAAA,MACA,KAAAM;AAAA,MACC,GAAGD;AAAA,IAAA;AAAA,EACN;AAEJ,GAEaO,KAA0BC,EAAWj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ejI;AAAA,UACf,SAAUA,IAAqB,SAAV0F;AAAA,UAEpB,UAAAxF;AAAA,QAAA;AAAA,MACH;AAAA,MACCgI,KAAe,gBAAAxH,EAAA,QAAA,EAAK,WAAW+B,EAAO,YAAa,UAAWyF,EAAA,CAAA;AAAA,IAAA,GACjE;AAAA,EAAA;AAGN,GAEME,KAAa,CACjBJ,GACAC,GACAjI,OAC8B;AAAA,EAC9B,MAAMW;AAAA,IACJF,EAAE;AAAA,IACF;AAAA,MACE,CAACA,EAAE,MAAM,GAAGwH;AAAA,MACZ,CAACxH,EAAE,QAAQ,GAAGT;AAAA,IAChB;AAAA,IACAgI,GAAS;AAAA,EACX;AAAA,EACA,YAAYrH,EAAWF,EAAE,YAAYuH,GAAS,UAAU;AAC1D;"}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { MouseEventHandler, ReactNode } from 'react';
|
|
1
|
+
import { FocusEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
interface Props {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
interface HeaderProps extends Props {
|
|
11
|
-
}
|
|
6
|
+
type RootProps = Props;
|
|
7
|
+
type CaptionProps = Props;
|
|
8
|
+
type HeaderProps = Props;
|
|
12
9
|
interface RowProps extends Props {
|
|
13
10
|
onClick?: MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
11
|
+
onDoubleClick?: MouseEventHandler<HTMLTableRowElement> | undefined;
|
|
12
|
+
onBlur?: FocusEventHandler<HTMLTableRowElement> | undefined;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
interface CellProps extends Props {
|
|
20
|
-
}
|
|
21
|
-
interface FooterProps extends Props {
|
|
22
|
-
}
|
|
14
|
+
type HeadProps = Props;
|
|
15
|
+
type BodyProps = Props;
|
|
16
|
+
type CellProps = Props;
|
|
17
|
+
type FooterProps = Props;
|
|
23
18
|
export declare const Table: (({ children, className }: RootProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
24
19
|
Body: ({ children, className }: BodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
20
|
Caption: ({ children, className }: CaptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,6 +23,6 @@ export declare const Table: (({ children, className }: RootProps) => import("rea
|
|
|
28
23
|
Head: ({ children, className }: HeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
24
|
Header: ({ children, className }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
25
|
Root: ({ children, className }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
Row: ({ children, className, onClick }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
Row: ({ children, className, onBlur, onClick, onDoubleClick, }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
27
|
};
|
|
33
28
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as H, B as F, u as J } from "./ToolIconButton-
|
|
2
|
-
import { a as an, d as ln, b as rn, c as dn, C as hn, e as _n, g as un, S as mn, h as pn, T as gn, i as fn, j as yn, f as kn } from "./ToolIconButton-
|
|
1
|
+
import { D as H, B as F, u as J } from "./ToolIconButton-CKUWpXoL.js";
|
|
2
|
+
import { a as an, d as ln, b as rn, c as dn, C as hn, e as _n, g as un, S as mn, h as pn, T as gn, i as fn, j as yn, f as kn } from "./ToolIconButton-CKUWpXoL.js";
|
|
3
3
|
import { jsx as s, jsxs as g, Fragment as Q } from "react/jsx-runtime";
|
|
4
4
|
import m from "classnames";
|
|
5
5
|
import { useState as k, useEffect as K, useCallback as M, useRef as G } from "react";
|
package/dist/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import { Image as h, Video as g, FileQuestion as p, HardDriveDownload as u, Share2 as y, PencilRuler as I } from "lucide-react";
|
|
4
|
-
import { d as l, e as o, B as v } from "./ToolIconButton-
|
|
5
|
-
import { k as U, u as X } from "./ToolIconButton-
|
|
4
|
+
import { d as l, e as o, B as v } from "./ToolIconButton-CKUWpXoL.js";
|
|
5
|
+
import { k as U, u as X } from "./ToolIconButton-CKUWpXoL.js";
|
|
6
6
|
import "react";
|
|
7
7
|
const f = [
|
|
8
8
|
"png",
|
package/package.json
CHANGED
|
@@ -1,520 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as g, Fragment as B } from "react/jsx-runtime";
|
|
2
|
-
import i from "classnames";
|
|
3
|
-
import J, { forwardRef as b, createContext as E, useState as R, useRef as P, useEffect as W, useContext as C } from "react";
|
|
4
|
-
import { Eye as Q, EyeOff as U, X as Y, Search as Z } from "lucide-react";
|
|
5
|
-
const tt = "_text_4m304_1", et = "_tertiary_4m304_1", ot = "_secondary_4m304_1", nt = "_primary_4m304_1", st = "_fullWidth_4m304_50", rt = "_buttonWithIcon_4m304_54", ct = "_content_4m304_61", at = "_shortcut_4m304_70", it = "_disabled_4m304_82", p = {
|
|
6
|
-
text: tt,
|
|
7
|
-
tertiary: et,
|
|
8
|
-
secondary: ot,
|
|
9
|
-
primary: nt,
|
|
10
|
-
fullWidth: st,
|
|
11
|
-
buttonWithIcon: rt,
|
|
12
|
-
content: ct,
|
|
13
|
-
shortcut: at,
|
|
14
|
-
disabled: it
|
|
15
|
-
}, lt = ({
|
|
16
|
-
children: t,
|
|
17
|
-
className: e,
|
|
18
|
-
component: o = "button",
|
|
19
|
-
disabled: s,
|
|
20
|
-
fullWidth: c,
|
|
21
|
-
icon: r,
|
|
22
|
-
shortcut: a,
|
|
23
|
-
variant: _ = "primary",
|
|
24
|
-
...d
|
|
25
|
-
}, l) => {
|
|
26
|
-
const m = /* @__PURE__ */ g("div", { className: p.buttonWithIcon, children: [
|
|
27
|
-
/* @__PURE__ */ g("div", { className: p.content, children: [
|
|
28
|
-
r,
|
|
29
|
-
t
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ n("div", { className: p.shortcut, children: a })
|
|
32
|
-
] });
|
|
33
|
-
return /* @__PURE__ */ n(
|
|
34
|
-
o,
|
|
35
|
-
{
|
|
36
|
-
className: i(
|
|
37
|
-
p[_],
|
|
38
|
-
c && p.fullWidth,
|
|
39
|
-
s && p.disabled,
|
|
40
|
-
r && p.icon,
|
|
41
|
-
e
|
|
42
|
-
),
|
|
43
|
-
children: r ? m : t,
|
|
44
|
-
disabled: s,
|
|
45
|
-
ref: l,
|
|
46
|
-
...d
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}, He = b(lt), dt = "_content_23x5h_1", _t = "_header_23x5h_1", ut = "_root_23x5h_7", ht = "_contentAfterHeader_23x5h_22", S = {
|
|
50
|
-
content: dt,
|
|
51
|
-
header: _t,
|
|
52
|
-
root: ut,
|
|
53
|
-
contentAfterHeader: ht
|
|
54
|
-
}, H = b(
|
|
55
|
-
({ className: t, ...e }, o) => /* @__PURE__ */ n("div", { className: i(S.root, t), ref: o, ...e })
|
|
56
|
-
), mt = b(
|
|
57
|
-
({ className: t, ignoreHeader: e, ...o }, s) => /* @__PURE__ */ n(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: i(
|
|
61
|
-
S.content,
|
|
62
|
-
!e && S.contentAfterHeader,
|
|
63
|
-
t
|
|
64
|
-
),
|
|
65
|
-
ref: s,
|
|
66
|
-
...o
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
), gt = b(
|
|
70
|
-
({ className: t, ...e }, o) => /* @__PURE__ */ n("div", { className: i(S.header, t), ref: o, ...e })
|
|
71
|
-
), Fe = Object.assign(H, {
|
|
72
|
-
Content: mt,
|
|
73
|
-
Header: gt,
|
|
74
|
-
Root: H
|
|
75
|
-
}), bt = "_root_1xfv8_1", ft = "_dropdownContent_1xfv8_6", pt = "_left_1xfv8_17", vt = "_center_1xfv8_21", Ct = "_right_1xfv8_26", wt = "_top_1xfv8_30", Nt = "_bottom_1xfv8_34", xt = "_fixedPosition_1xfv8_38", y = {
|
|
76
|
-
root: bt,
|
|
77
|
-
dropdownContent: ft,
|
|
78
|
-
left: pt,
|
|
79
|
-
center: vt,
|
|
80
|
-
right: Ct,
|
|
81
|
-
top: wt,
|
|
82
|
-
bottom: Nt,
|
|
83
|
-
fixedPosition: xt
|
|
84
|
-
}, M = E(
|
|
85
|
-
void 0
|
|
86
|
-
), V = () => {
|
|
87
|
-
const t = C(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 [c, r] = R(s), a = P(null), _ = () => {
|
|
98
|
-
c ? d() : (r(!0), a.current && k.push(a.current));
|
|
99
|
-
}, d = () => {
|
|
100
|
-
if (r(!1), a.current) {
|
|
101
|
-
const l = k.indexOf(a.current);
|
|
102
|
-
l !== -1 && k.splice(l, 1);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return W(() => {
|
|
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]), W(() => {
|
|
114
|
-
if (!e) return;
|
|
115
|
-
const l = (m) => {
|
|
116
|
-
m.key === "Escape" && c && k[k.length - 1] === a.current && d();
|
|
117
|
-
};
|
|
118
|
-
return document.addEventListener("keydown", l), () => {
|
|
119
|
-
document.removeEventListener("keydown", l);
|
|
120
|
-
};
|
|
121
|
-
}, [e, c]), /* @__PURE__ */ n(M.Provider, { value: { close: d, toggle: _, visible: c }, children: /* @__PURE__ */ n("div", { ref: a, className: y.root, children: t }) });
|
|
122
|
-
}, yt = ({ children: t }) => {
|
|
123
|
-
const { toggle: e } = V();
|
|
124
|
-
return /* @__PURE__ */ n("div", { onClick: e, children: t });
|
|
125
|
-
}, Tt = ({
|
|
126
|
-
children: t,
|
|
127
|
-
className: e,
|
|
128
|
-
fixedPosition: o = !1,
|
|
129
|
-
horizontal: s = "left",
|
|
130
|
-
vertical: c = "bottom"
|
|
131
|
-
}) => {
|
|
132
|
-
const { visible: r } = V();
|
|
133
|
-
return r ? /* @__PURE__ */ n(
|
|
134
|
-
"div",
|
|
135
|
-
{
|
|
136
|
-
className: i(
|
|
137
|
-
y.dropdownContent,
|
|
138
|
-
y[s],
|
|
139
|
-
y[c],
|
|
140
|
-
{ [y.fixedPosition]: o },
|
|
141
|
-
e
|
|
142
|
-
),
|
|
143
|
-
children: t
|
|
144
|
-
}
|
|
145
|
-
) : null;
|
|
146
|
-
}, Ae = { Content: Tt, Root: kt, Trigger: yt }, Rt = "_dialogRoot_c30vs_1", St = "_dialogTrigger_c30vs_5", Dt = "_dialogContent_c30vs_13", $t = "_dialogClose_c30vs_25", Ot = "_dialogTitle_c30vs_33", It = "_dialogSeparator_c30vs_38", w = {
|
|
147
|
-
dialogRoot: Rt,
|
|
148
|
-
dialogTrigger: St,
|
|
149
|
-
dialogContent: Dt,
|
|
150
|
-
dialogClose: $t,
|
|
151
|
-
dialogTitle: Ot,
|
|
152
|
-
dialogSeparator: It
|
|
153
|
-
}, D = J.createContext(null), Wt = ({
|
|
154
|
-
children: t,
|
|
155
|
-
isOpen: e,
|
|
156
|
-
onStateChange: o
|
|
157
|
-
}) => {
|
|
158
|
-
const s = P(null), [c, r] = R(!1), a = e !== void 0 ? e : c, _ = (d) => {
|
|
159
|
-
e === void 0 && r(d), o && o(d);
|
|
160
|
-
};
|
|
161
|
-
return /* @__PURE__ */ n(D.Provider, { value: { dialogRef: s, isOpen: a, setIsOpen: _ }, children: /* @__PURE__ */ n("div", { className: w.dialogRoot, children: t }) });
|
|
162
|
-
}, Et = ({
|
|
163
|
-
as: t,
|
|
164
|
-
children: e,
|
|
165
|
-
...o
|
|
166
|
-
}) => {
|
|
167
|
-
const s = C(D);
|
|
168
|
-
if (!s) throw new Error("Trigger must be used within a Dialog.Root");
|
|
169
|
-
const { dialogRef: c, setIsOpen: r } = s;
|
|
170
|
-
return /* @__PURE__ */ n(
|
|
171
|
-
t || "button",
|
|
172
|
-
{
|
|
173
|
-
onClick: () => {
|
|
174
|
-
c.current?.showModal(), r(!0);
|
|
175
|
-
},
|
|
176
|
-
...o,
|
|
177
|
-
className: w.dialogTrigger,
|
|
178
|
-
role: t && t !== "button" ? "button" : void 0,
|
|
179
|
-
children: e
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}, Pt = b(
|
|
183
|
-
({ children: t, className: e, closeOnBackdropClick: o = !0 }, s) => {
|
|
184
|
-
const c = C(D);
|
|
185
|
-
if (!c) throw new Error("Content must be used within a Dialog.Root");
|
|
186
|
-
const { dialogRef: r, isOpen: a, setIsOpen: _ } = c, d = (l) => {
|
|
187
|
-
o && l.target === r.current && (r.current?.close(), _(!1));
|
|
188
|
-
};
|
|
189
|
-
return /* @__PURE__ */ n(
|
|
190
|
-
"dialog",
|
|
191
|
-
{
|
|
192
|
-
ref: r,
|
|
193
|
-
className: i(w.dialogContent, e),
|
|
194
|
-
onClick: d,
|
|
195
|
-
open: a,
|
|
196
|
-
children: /* @__PURE__ */ n("div", { onClick: (l) => l.stopPropagation(), children: t })
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
), Lt = ({
|
|
201
|
-
as: t,
|
|
202
|
-
children: e,
|
|
203
|
-
...o
|
|
204
|
-
}) => {
|
|
205
|
-
const s = C(D);
|
|
206
|
-
if (!s) throw new Error("Close must be used within a Dialog.Root");
|
|
207
|
-
const { dialogRef: c, setIsOpen: r } = s;
|
|
208
|
-
return /* @__PURE__ */ n(
|
|
209
|
-
t || "button",
|
|
210
|
-
{
|
|
211
|
-
onClick: () => {
|
|
212
|
-
c.current?.close(), r(!1);
|
|
213
|
-
},
|
|
214
|
-
...o,
|
|
215
|
-
className: w.dialogClose,
|
|
216
|
-
role: t && t !== "button" ? "button" : void 0,
|
|
217
|
-
children: e
|
|
218
|
-
}
|
|
219
|
-
);
|
|
220
|
-
}, qt = ({ children: t, className: e }) => /* @__PURE__ */ n("h2", { className: i(w.dialogTitle, e), children: t }), Ht = ({}) => /* @__PURE__ */ n("div", { className: w.dialogSeparator }), Be = {
|
|
221
|
-
Close: Lt,
|
|
222
|
-
Content: Pt,
|
|
223
|
-
Root: Wt,
|
|
224
|
-
Separator: Ht,
|
|
225
|
-
Title: qt,
|
|
226
|
-
Trigger: Et
|
|
227
|
-
}, 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 = {
|
|
228
|
-
sidebar: Ft,
|
|
229
|
-
trigger: At,
|
|
230
|
-
content: Bt,
|
|
231
|
-
left: Mt,
|
|
232
|
-
open: Vt,
|
|
233
|
-
right: jt,
|
|
234
|
-
bottom: zt,
|
|
235
|
-
top: Kt
|
|
236
|
-
}, j = E(
|
|
237
|
-
void 0
|
|
238
|
-
), L = () => {
|
|
239
|
-
const t = C(j);
|
|
240
|
-
if (!t)
|
|
241
|
-
throw new Error("useSidebarContext must be used within a SidebarProvider");
|
|
242
|
-
return t;
|
|
243
|
-
}, Xt = ({ children: t, isOpen: e, setIsOpen: o }) => /* @__PURE__ */ n(
|
|
244
|
-
j.Provider,
|
|
245
|
-
{
|
|
246
|
-
value: {
|
|
247
|
-
isOpen: e,
|
|
248
|
-
setIsOpen: () => o(!e)
|
|
249
|
-
},
|
|
250
|
-
children: t
|
|
251
|
-
}
|
|
252
|
-
), Gt = ({ children: t }) => {
|
|
253
|
-
const { setIsOpen: e } = L(), o = (s) => {
|
|
254
|
-
s.preventDefault(), e(!0);
|
|
255
|
-
};
|
|
256
|
-
return /* @__PURE__ */ n("div", { className: v.trigger, onClick: o, children: t });
|
|
257
|
-
}, Jt = ({
|
|
258
|
-
children: t,
|
|
259
|
-
className: e,
|
|
260
|
-
closeOnOutsideClick: o = !0,
|
|
261
|
-
position: s = "right"
|
|
262
|
-
}) => {
|
|
263
|
-
const { isOpen: c, setIsOpen: r } = L(), a = P(null);
|
|
264
|
-
return W(() => {
|
|
265
|
-
if (!o) return;
|
|
266
|
-
const _ = (d) => {
|
|
267
|
-
a.current && !a.current.contains(d.target) && r(!1);
|
|
268
|
-
};
|
|
269
|
-
return c && document.addEventListener("mousedown", _), () => {
|
|
270
|
-
document.removeEventListener("mousedown", _);
|
|
271
|
-
};
|
|
272
|
-
}, [c, r, o]), /* @__PURE__ */ n(
|
|
273
|
-
"div",
|
|
274
|
-
{
|
|
275
|
-
ref: a,
|
|
276
|
-
className: i(
|
|
277
|
-
v[s],
|
|
278
|
-
v.content,
|
|
279
|
-
{
|
|
280
|
-
[v.close]: !c,
|
|
281
|
-
[v.open]: c
|
|
282
|
-
},
|
|
283
|
-
e
|
|
284
|
-
),
|
|
285
|
-
children: t
|
|
286
|
-
}
|
|
287
|
-
);
|
|
288
|
-
}, Qt = ({ children: t }) => {
|
|
289
|
-
const { setIsOpen: e } = L(), o = (s) => {
|
|
290
|
-
s.preventDefault(), e(!1);
|
|
291
|
-
};
|
|
292
|
-
return /* @__PURE__ */ n("button", { className: v.close, onClick: o, children: t });
|
|
293
|
-
}, Me = {
|
|
294
|
-
Close: Qt,
|
|
295
|
-
Content: Jt,
|
|
296
|
-
Root: Xt,
|
|
297
|
-
Trigger: Gt
|
|
298
|
-
}, Ut = "_switcher_k6tdq_1", Yt = "_buttons_k6tdq_6", Zt = "_separator_k6tdq_10", I = {
|
|
299
|
-
switcher: Ut,
|
|
300
|
-
buttons: Yt,
|
|
301
|
-
separator: Zt
|
|
302
|
-
}, Ve = b(
|
|
303
|
-
({
|
|
304
|
-
className: t,
|
|
305
|
-
component: e,
|
|
306
|
-
componentValues: o,
|
|
307
|
-
containerProps: s,
|
|
308
|
-
onChange: c,
|
|
309
|
-
selectedValue: r,
|
|
310
|
-
slot: a
|
|
311
|
-
}, _) => {
|
|
312
|
-
const [d, l] = R(
|
|
313
|
-
r || o[0].value
|
|
314
|
-
), m = (h) => {
|
|
315
|
-
l(h), c && c(h);
|
|
316
|
-
};
|
|
317
|
-
return /* @__PURE__ */ g("div", { ref: _, className: I.switcher, ...s, children: [
|
|
318
|
-
/* @__PURE__ */ n("div", { className: i(I.buttons, t), children: o.map((h, N) => /* @__PURE__ */ n(
|
|
319
|
-
e,
|
|
320
|
-
{
|
|
321
|
-
...h,
|
|
322
|
-
selected: d === h.value,
|
|
323
|
-
onClick: () => m(h.value)
|
|
324
|
-
},
|
|
325
|
-
N
|
|
326
|
-
)) }),
|
|
327
|
-
a && /* @__PURE__ */ g(B, { children: [
|
|
328
|
-
/* @__PURE__ */ n("div", { className: I.separator }),
|
|
329
|
-
a
|
|
330
|
-
] })
|
|
331
|
-
] });
|
|
332
|
-
}
|
|
333
|
-
), 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 = {
|
|
334
|
-
root: te,
|
|
335
|
-
header: ee,
|
|
336
|
-
footer: oe,
|
|
337
|
-
row: ne,
|
|
338
|
-
body: se,
|
|
339
|
-
head: re,
|
|
340
|
-
cell: ce,
|
|
341
|
-
caption: ae,
|
|
342
|
-
storiesFooterCellOne: ie,
|
|
343
|
-
storiesFooterCellTwo: le
|
|
344
|
-
}, 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 = ({ children: t, className: e, onClick: o }) => /* @__PURE__ */ n("tr", { className: i(f.row, e), onClick: o, children: t }), 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, {
|
|
345
|
-
Body: me,
|
|
346
|
-
Caption: de,
|
|
347
|
-
Cell: ge,
|
|
348
|
-
Footer: be,
|
|
349
|
-
Head: he,
|
|
350
|
-
Header: _e,
|
|
351
|
-
Root: F,
|
|
352
|
-
Row: ue
|
|
353
|
-
}), fe = "_inputContainer_iqbs3_1", pe = "_input_iqbs3_1", ve = "_inputSearch_iqbs3_40", Ce = "_error_iqbs3_43", we = "_button_iqbs3_58", Ne = "_buttonWithLabel_iqbs3_68", xe = "_resetSearchValue_iqbs3_73", ke = "_searchOutline_iqbs3_80", ye = "_errorMessage_iqbs3_87", u = {
|
|
354
|
-
inputContainer: fe,
|
|
355
|
-
input: pe,
|
|
356
|
-
inputSearch: ve,
|
|
357
|
-
error: Ce,
|
|
358
|
-
button: we,
|
|
359
|
-
buttonWithLabel: Ne,
|
|
360
|
-
resetSearchValue: xe,
|
|
361
|
-
searchOutline: ke,
|
|
362
|
-
errorMessage: ye
|
|
363
|
-
}, ze = b(({ className: t, error: e, label: o, onChange: s, required: c, ...r }, a) => {
|
|
364
|
-
const [_, d] = R(!1), l = (N) => s(N.currentTarget.value), m = i(u.input, e && u.error, t);
|
|
365
|
-
let h;
|
|
366
|
-
if (!r.as || r.as === "input") {
|
|
367
|
-
const { as: N, inputType: x, ...X } = r, $ = x === "search", q = x === "password", G = _ ? "text" : "password";
|
|
368
|
-
h = /* @__PURE__ */ g(B, { children: [
|
|
369
|
-
/* @__PURE__ */ n(
|
|
370
|
-
"input",
|
|
371
|
-
{
|
|
372
|
-
className: i(m, $ && u.inputSearch),
|
|
373
|
-
onChange: l,
|
|
374
|
-
ref: a,
|
|
375
|
-
type: q ? G : x,
|
|
376
|
-
...X
|
|
377
|
-
}
|
|
378
|
-
),
|
|
379
|
-
q && (_ ? /* @__PURE__ */ n(
|
|
380
|
-
Q,
|
|
381
|
-
{
|
|
382
|
-
strokeWidth: 2.5,
|
|
383
|
-
width: 20,
|
|
384
|
-
className: i(u.button, o && u.buttonWithLabel),
|
|
385
|
-
onClick: () => d((O) => !O)
|
|
386
|
-
}
|
|
387
|
-
) : /* @__PURE__ */ n(
|
|
388
|
-
U,
|
|
389
|
-
{
|
|
390
|
-
strokeWidth: 2.5,
|
|
391
|
-
width: 20,
|
|
392
|
-
className: i(u.button, o && u.buttonWithLabel),
|
|
393
|
-
onClick: () => d((O) => !O)
|
|
394
|
-
}
|
|
395
|
-
)),
|
|
396
|
-
$ && r.value && /* @__PURE__ */ n(
|
|
397
|
-
Y,
|
|
398
|
-
{
|
|
399
|
-
onClick: () => s(""),
|
|
400
|
-
className: i(
|
|
401
|
-
u.button,
|
|
402
|
-
o && u.buttonWithLabel,
|
|
403
|
-
u.resetSearchValue
|
|
404
|
-
),
|
|
405
|
-
strokeWidth: 2.5,
|
|
406
|
-
size: 24
|
|
407
|
-
}
|
|
408
|
-
),
|
|
409
|
-
$ && /* @__PURE__ */ n(
|
|
410
|
-
Z,
|
|
411
|
-
{
|
|
412
|
-
className: i(
|
|
413
|
-
u.searchOutline,
|
|
414
|
-
o && u.searchOutlineWithLabel
|
|
415
|
-
),
|
|
416
|
-
size: 20
|
|
417
|
-
}
|
|
418
|
-
)
|
|
419
|
-
] });
|
|
420
|
-
}
|
|
421
|
-
if (r.as === "textarea") {
|
|
422
|
-
const { as: N, ...x } = r;
|
|
423
|
-
h = /* @__PURE__ */ n(
|
|
424
|
-
"textarea",
|
|
425
|
-
{
|
|
426
|
-
className: m,
|
|
427
|
-
onChange: l,
|
|
428
|
-
ref: a,
|
|
429
|
-
...x
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
return /* @__PURE__ */ g("div", { className: u.root, children: [
|
|
434
|
-
/* @__PURE__ */ g("span", { className: u.title, children: [
|
|
435
|
-
o,
|
|
436
|
-
c && /* @__PURE__ */ n("span", { className: u.titleError, children: "*" })
|
|
437
|
-
] }),
|
|
438
|
-
/* @__PURE__ */ n("div", { className: u.inputContainer, children: h }),
|
|
439
|
-
/* @__PURE__ */ n("div", { className: u.errorMessage, children: e })
|
|
440
|
-
] });
|
|
441
|
-
}), z = E(void 0), Ke = ({ children: t }) => {
|
|
442
|
-
const e = K() || "system", [o, s] = R(e);
|
|
443
|
-
return /* @__PURE__ */ n(z.Provider, { value: { setTheme: s, theme: o }, children: t });
|
|
444
|
-
}, Xe = () => {
|
|
445
|
-
const t = C(z);
|
|
446
|
-
if (!t)
|
|
447
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
448
|
-
return Te(t.theme), t;
|
|
449
|
-
}, Te = (t) => {
|
|
450
|
-
const e = K();
|
|
451
|
-
Re(t || e);
|
|
452
|
-
}, Re = (t) => {
|
|
453
|
-
const e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
454
|
-
if (t === "system") {
|
|
455
|
-
const o = e.matches ? "dark" : "light";
|
|
456
|
-
localStorage.setItem("theme", t), A(o);
|
|
457
|
-
} else
|
|
458
|
-
localStorage.setItem("theme", t), A(t);
|
|
459
|
-
}, A = (t) => {
|
|
460
|
-
document.documentElement.setAttribute("data-theme", t);
|
|
461
|
-
}, K = () => {
|
|
462
|
-
const t = localStorage.getItem("theme");
|
|
463
|
-
if (t) return t;
|
|
464
|
-
}, Se = "_root_17w6h_1", De = "_icon_17w6h_11", $e = "_active_17w6h_27", Oe = "_disabled_17w6h_31", Ie = "_keybinding_17w6h_44", T = {
|
|
465
|
-
root: Se,
|
|
466
|
-
icon: De,
|
|
467
|
-
active: $e,
|
|
468
|
-
disabled: Oe,
|
|
469
|
-
keybinding: Ie
|
|
470
|
-
}, Ge = b(
|
|
471
|
-
(t, e) => {
|
|
472
|
-
const { classes: o, disabled: s, icon: c, isActive: r, keybinding: a, onClick: _, title: d } = t, l = We(o, r, s);
|
|
473
|
-
return /* @__PURE__ */ g("label", { className: T.root, title: d, children: [
|
|
474
|
-
/* @__PURE__ */ n(
|
|
475
|
-
"div",
|
|
476
|
-
{
|
|
477
|
-
className: l.icon,
|
|
478
|
-
ref: e,
|
|
479
|
-
tabIndex: s ? -1 : 0,
|
|
480
|
-
role: "button",
|
|
481
|
-
"aria-pressed": r,
|
|
482
|
-
"aria-disabled": s,
|
|
483
|
-
onClick: s ? void 0 : _,
|
|
484
|
-
children: c
|
|
485
|
-
}
|
|
486
|
-
),
|
|
487
|
-
a && /* @__PURE__ */ n("span", { className: l.keybinding, children: a })
|
|
488
|
-
] });
|
|
489
|
-
}
|
|
490
|
-
), We = (t, e, o) => ({
|
|
491
|
-
icon: i(
|
|
492
|
-
T.icon,
|
|
493
|
-
{
|
|
494
|
-
[T.active]: e,
|
|
495
|
-
[T.disabled]: o
|
|
496
|
-
},
|
|
497
|
-
t?.icon
|
|
498
|
-
),
|
|
499
|
-
keybinding: i(T.keybinding, t?.keybinding)
|
|
500
|
-
});
|
|
501
|
-
export {
|
|
502
|
-
He as B,
|
|
503
|
-
H as C,
|
|
504
|
-
Ae as D,
|
|
505
|
-
j as S,
|
|
506
|
-
je as T,
|
|
507
|
-
lt as a,
|
|
508
|
-
mt as b,
|
|
509
|
-
gt as c,
|
|
510
|
-
Fe as d,
|
|
511
|
-
Be as e,
|
|
512
|
-
L as f,
|
|
513
|
-
Me as g,
|
|
514
|
-
Ve as h,
|
|
515
|
-
ze as i,
|
|
516
|
-
Ge as j,
|
|
517
|
-
Ke as k,
|
|
518
|
-
Xe as u
|
|
519
|
-
};
|
|
520
|
-
//# sourceMappingURL=ToolIconButton-C1LlNNL-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolIconButton-C1LlNNL-.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\nexport const DropDown = { Content, Root, Trigger }\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 { MouseEventHandler, ReactNode } from 'react'\n\nimport s from './table.module.scss'\n\ninterface Props {\n children: ReactNode\n className?: string\n}\n\ninterface RootProps extends Props {}\nconst Root = ({ children, className }: RootProps) => {\n return <table className={classNames(s.root, className)}>{children}</table>\n}\n\ninterface CaptionProps extends Props {}\nconst Caption = ({ children, className }: CaptionProps) => {\n return (\n <caption className={classNames(s.caption, className)}>{children}</caption>\n )\n}\n\ninterface HeaderProps extends 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}\nconst Row = ({ children, className, onClick }: RowProps) => {\n return (\n <tr className={classNames(s.row, className)} onClick={onClick}>\n {children}\n </tr>\n )\n}\n\ninterface HeadProps extends Props {}\nconst Head = ({ children, className }: HeadProps) => {\n return <th className={classNames(s.head, className)}>{children}</th>\n}\n\ninterface BodyProps extends Props {}\nconst Body = ({ children, className }: BodyProps) => {\n return <tbody className={classNames(s.body, className)}>{children}</tbody>\n}\n\ninterface CellProps extends Props {}\nconst Cell = ({ children, className }: CellProps) => {\n return <td className={classNames(s.cell, className)}>{children}</td>\n}\n\ninterface FooterProps extends 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 {\n ChangeEvent,\n ForwardedRef,\n ReactNode,\n forwardRef,\n useState,\n} from 'react'\n\nimport classNames from 'classnames'\n\nimport s from './text-field.module.scss'\nimport { X, Eye, Search, EyeOff } from 'lucide-react'\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 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 { as, 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 const { as, ...restProps } = props\n\n resolvedFragment = (\n <textarea\n className={sharedClassName}\n onChange={handleChange}\n ref={ref as unknown as ForwardedRef<HTMLTextAreaElement>}\n {...restProps}\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","DropDown","DialogContext","React","externalIsOpen","onStateChange","dialogRef","internalIsOpen","setInternalIsOpen","isOpen","setIsOpen","state","as","closeOnBackdropClick","_","handleBackdropClick","e","Close","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","onClick","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","pref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