@octavius2929-personal/design-system 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/index.cjs +419 -355
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +139 -120
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +350 -287
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ function useToggle(initial = false) {
|
|
|
23
23
|
return [on, toggle, setOn];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// src/components/
|
|
26
|
+
// src/components/typography/use-styles.ts
|
|
27
27
|
import { useMemo as useMemo2 } from "react";
|
|
28
28
|
|
|
29
29
|
// src/theme/context/theme-context.tsx
|
|
@@ -104,7 +104,10 @@ function ThemeProvider({
|
|
|
104
104
|
setSchema,
|
|
105
105
|
setMode: setPreference,
|
|
106
106
|
toggleMode: () => setPreference(mode === "dark" ? "light" : "dark"),
|
|
107
|
-
cycleMode: () =>
|
|
107
|
+
cycleMode: () => {
|
|
108
|
+
const next = modeNames[(modeNames.indexOf(mode) + 1) % modeNames.length];
|
|
109
|
+
if (next) setPreference(next);
|
|
110
|
+
}
|
|
108
111
|
}),
|
|
109
112
|
[schema, mode, preference]
|
|
110
113
|
);
|
|
@@ -114,6 +117,65 @@ function useTheme() {
|
|
|
114
117
|
return useContext(ThemeContext) ?? DEFAULT_VALUE;
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
// src/theme/typography.css.ts
|
|
121
|
+
var text = { eyebrow: "typography_text_eyebrow__1wmlzy0", display: "typography_text_display__1wmlzy1", h1: "typography_text_h1__1wmlzy2", h2: "typography_text_h2__1wmlzy3", h3: "typography_text_h3__1wmlzy4", h4: "typography_text_h4__1wmlzy5", body: "typography_text_body__1wmlzy6", lead: "typography_text_lead__1wmlzy7", small: "typography_text_small__1wmlzy8", caption: "typography_text_caption__1wmlzy9", code: "typography_text_code__1wmlzya", blackletter: "typography_text_blackletter__1wmlzyb" };
|
|
122
|
+
|
|
123
|
+
// src/components/typography/use-styles.css.ts
|
|
124
|
+
var align = { left: "use-styles_align_left__d74jf69", center: "use-styles_align_center__d74jf6a", right: "use-styles_align_right__d74jf6b" };
|
|
125
|
+
var base = "use-styles_base__d74jf60";
|
|
126
|
+
var color = { fg1: "use-styles_color_fg1__d74jf61", fg2: "use-styles_color_fg2__d74jf62", fg3: "use-styles_color_fg3__d74jf63", accent: "use-styles_color_accent__d74jf64", danger: "use-styles_color_danger__d74jf65", ok: "use-styles_color_ok__d74jf66", warn: "use-styles_color_warn__d74jf67", info: "use-styles_color_info__d74jf68" };
|
|
127
|
+
|
|
128
|
+
// src/components/typography/use-styles.ts
|
|
129
|
+
function useStyles({
|
|
130
|
+
variant: variant2,
|
|
131
|
+
color: color2,
|
|
132
|
+
align: align2
|
|
133
|
+
}) {
|
|
134
|
+
const { themeClass } = useTheme();
|
|
135
|
+
const className = useMemo2(
|
|
136
|
+
() => [
|
|
137
|
+
themeClass,
|
|
138
|
+
base,
|
|
139
|
+
text[variant2],
|
|
140
|
+
color2 && color[color2],
|
|
141
|
+
align2 && align[align2]
|
|
142
|
+
].filter(Boolean).join(" "),
|
|
143
|
+
[themeClass, variant2, color2, align2]
|
|
144
|
+
);
|
|
145
|
+
return { text: className };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/components/typography/index.tsx
|
|
149
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
150
|
+
var defaultElement = {
|
|
151
|
+
display: "h1",
|
|
152
|
+
h1: "h1",
|
|
153
|
+
h2: "h2",
|
|
154
|
+
h3: "h3",
|
|
155
|
+
h4: "h4",
|
|
156
|
+
body: "p",
|
|
157
|
+
lead: "p",
|
|
158
|
+
small: "span",
|
|
159
|
+
caption: "span",
|
|
160
|
+
eyebrow: "span",
|
|
161
|
+
code: "code",
|
|
162
|
+
blackletter: "span"
|
|
163
|
+
};
|
|
164
|
+
function Typography({
|
|
165
|
+
variant: variant2,
|
|
166
|
+
as,
|
|
167
|
+
color: color2,
|
|
168
|
+
align: align2,
|
|
169
|
+
...rest
|
|
170
|
+
}) {
|
|
171
|
+
const Component = as ?? defaultElement[variant2];
|
|
172
|
+
const { text: text2 } = useStyles({ variant: variant2, color: color2, align: align2 });
|
|
173
|
+
return /* @__PURE__ */ jsx2(Component, { ...rest, className: text2 });
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/components/button/use-styles.ts
|
|
177
|
+
import { useMemo as useMemo3 } from "react";
|
|
178
|
+
|
|
117
179
|
// src/components/button/use-styles.css.ts
|
|
118
180
|
var full = "use-styles_full__1pbtill4";
|
|
119
181
|
var root = "use-styles_root__1pbtill0";
|
|
@@ -124,7 +186,7 @@ var tone = { filledInk: "use-styles_tone_filledInk__1pbtill5", filledAccent: "us
|
|
|
124
186
|
function toneKey(variant2, tone4) {
|
|
125
187
|
return `${variant2}${tone4 === "ink" ? "Ink" : "Accent"}`;
|
|
126
188
|
}
|
|
127
|
-
function
|
|
189
|
+
function useStyles2({
|
|
128
190
|
variant: variant2 = "filled",
|
|
129
191
|
tone: tone4 = "ink",
|
|
130
192
|
size: size3 = "md",
|
|
@@ -132,7 +194,7 @@ function useStyles({
|
|
|
132
194
|
className
|
|
133
195
|
}) {
|
|
134
196
|
const { themeClass } = useTheme();
|
|
135
|
-
const container =
|
|
197
|
+
const container = useMemo3(
|
|
136
198
|
() => [
|
|
137
199
|
themeClass,
|
|
138
200
|
root,
|
|
@@ -147,7 +209,7 @@ function useStyles({
|
|
|
147
209
|
}
|
|
148
210
|
|
|
149
211
|
// src/components/button/index.tsx
|
|
150
|
-
import { jsx as
|
|
212
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
151
213
|
var ICON_SIZE = { sm: 14, md: 16, lg: 18 };
|
|
152
214
|
function Button({
|
|
153
215
|
variant: variant2,
|
|
@@ -160,17 +222,17 @@ function Button({
|
|
|
160
222
|
children,
|
|
161
223
|
...rest
|
|
162
224
|
}) {
|
|
163
|
-
const { container } =
|
|
225
|
+
const { container } = useStyles2({ variant: variant2, tone: tone4, size: size3, full: full2, className });
|
|
164
226
|
const iconSize = ICON_SIZE[size3];
|
|
165
227
|
return /* @__PURE__ */ jsxs("button", { className: container, ...rest, children: [
|
|
166
|
-
StartIcon && /* @__PURE__ */
|
|
228
|
+
StartIcon && /* @__PURE__ */ jsx3(StartIcon, { size: iconSize }),
|
|
167
229
|
children,
|
|
168
|
-
EndIcon && /* @__PURE__ */
|
|
230
|
+
EndIcon && /* @__PURE__ */ jsx3(EndIcon, { size: iconSize })
|
|
169
231
|
] });
|
|
170
232
|
}
|
|
171
233
|
|
|
172
234
|
// src/components/divider/use-styles.ts
|
|
173
|
-
import { useMemo as
|
|
235
|
+
import { useMemo as useMemo4 } from "react";
|
|
174
236
|
|
|
175
237
|
// src/components/divider/use-styles.css.ts
|
|
176
238
|
var horizontal = "use-styles_horizontal__1n7v7yj1";
|
|
@@ -181,9 +243,9 @@ var root2 = "use-styles_root__1n7v7yj0";
|
|
|
181
243
|
var vertical = "use-styles_vertical__1n7v7yj2";
|
|
182
244
|
|
|
183
245
|
// src/components/divider/use-styles.ts
|
|
184
|
-
function
|
|
246
|
+
function useStyles3({ vertical: vertical2, hasLabel }) {
|
|
185
247
|
const { themeClass } = useTheme();
|
|
186
|
-
const root24 =
|
|
248
|
+
const root24 = useMemo4(
|
|
187
249
|
() => [
|
|
188
250
|
themeClass,
|
|
189
251
|
root2,
|
|
@@ -195,22 +257,22 @@ function useStyles2({ vertical: vertical2, hasLabel }) {
|
|
|
195
257
|
}
|
|
196
258
|
|
|
197
259
|
// src/components/divider/index.tsx
|
|
198
|
-
import { jsx as
|
|
260
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
199
261
|
function Divider({ vertical: vertical2, label: label7, ...rest }) {
|
|
200
262
|
const hasLabel = label7 != null;
|
|
201
|
-
const { root: root24, line: line2, label: labelClass } =
|
|
263
|
+
const { root: root24, line: line2, label: labelClass } = useStyles3({ vertical: vertical2, hasLabel });
|
|
202
264
|
if (hasLabel) {
|
|
203
265
|
return /* @__PURE__ */ jsxs2("div", { role: "separator", className: root24, ...rest, children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ jsx4("span", { className: line2 }),
|
|
267
|
+
/* @__PURE__ */ jsx4("span", { className: labelClass, children: label7 }),
|
|
268
|
+
/* @__PURE__ */ jsx4("span", { className: line2 })
|
|
207
269
|
] });
|
|
208
270
|
}
|
|
209
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ jsx4("div", { role: "separator", className: root24, ...rest });
|
|
210
272
|
}
|
|
211
273
|
|
|
212
274
|
// src/components/avatar/use-styles.ts
|
|
213
|
-
import { useMemo as
|
|
275
|
+
import { useMemo as useMemo5 } from "react";
|
|
214
276
|
|
|
215
277
|
// src/components/avatar/use-styles.css.ts
|
|
216
278
|
var root3 = "use-styles_root__1mn1rmu0";
|
|
@@ -218,13 +280,13 @@ var size2 = { sm: "use-styles_size_sm__1mn1rmu1", md: "use-styles_size_md__1mn1r
|
|
|
218
280
|
var variant = { "default": "use-styles_variant_default__1mn1rmu4", filled: "use-styles_variant_filled__1mn1rmu5" };
|
|
219
281
|
|
|
220
282
|
// src/components/avatar/use-styles.ts
|
|
221
|
-
function
|
|
283
|
+
function useStyles4({
|
|
222
284
|
size: size3 = "md",
|
|
223
285
|
filled,
|
|
224
286
|
className
|
|
225
287
|
}) {
|
|
226
288
|
const { themeClass } = useTheme();
|
|
227
|
-
const root24 =
|
|
289
|
+
const root24 = useMemo5(
|
|
228
290
|
() => [
|
|
229
291
|
themeClass,
|
|
230
292
|
root3,
|
|
@@ -238,14 +300,14 @@ function useStyles3({
|
|
|
238
300
|
}
|
|
239
301
|
|
|
240
302
|
// src/components/avatar/index.tsx
|
|
241
|
-
import { jsx as
|
|
303
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
242
304
|
function Avatar({ size: size3, filled, className, children, ...rest }) {
|
|
243
|
-
const { root: root24 } =
|
|
244
|
-
return /* @__PURE__ */
|
|
305
|
+
const { root: root24 } = useStyles4({ size: size3, filled, className });
|
|
306
|
+
return /* @__PURE__ */ jsx5("span", { className: root24, ...rest, children });
|
|
245
307
|
}
|
|
246
308
|
|
|
247
309
|
// src/components/badge/use-styles.ts
|
|
248
|
-
import { useMemo as
|
|
310
|
+
import { useMemo as useMemo6 } from "react";
|
|
249
311
|
|
|
250
312
|
// src/components/badge/use-styles.css.ts
|
|
251
313
|
var dot = "use-styles_dot__1wpei6p1";
|
|
@@ -253,28 +315,31 @@ var root4 = "use-styles_root__1wpei6p0";
|
|
|
253
315
|
var tone2 = { ink: "use-styles_tone_ink__1wpei6p2", accent: "use-styles_tone_accent__1wpei6p3" };
|
|
254
316
|
|
|
255
317
|
// src/components/badge/use-styles.ts
|
|
256
|
-
function
|
|
318
|
+
function useStyles5({
|
|
319
|
+
tone: tone4 = "ink",
|
|
320
|
+
className
|
|
321
|
+
}) {
|
|
257
322
|
const { themeClass } = useTheme();
|
|
258
|
-
const root24 =
|
|
323
|
+
const root24 = useMemo6(
|
|
259
324
|
() => [themeClass, root4, className].filter(Boolean).join(" "),
|
|
260
325
|
[themeClass, className]
|
|
261
326
|
);
|
|
262
|
-
const dot3 =
|
|
327
|
+
const dot3 = useMemo6(() => [dot, tone2[tone4]].join(" "), [tone4]);
|
|
263
328
|
return { root: root24, dot: dot3 };
|
|
264
329
|
}
|
|
265
330
|
|
|
266
331
|
// src/components/badge/index.tsx
|
|
267
|
-
import { jsx as
|
|
332
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
268
333
|
function Badge({ count, tone: tone4, className, children, ...rest }) {
|
|
269
|
-
const { root: root24, dot: dot3 } =
|
|
334
|
+
const { root: root24, dot: dot3 } = useStyles5({ tone: tone4, className });
|
|
270
335
|
return /* @__PURE__ */ jsxs3("span", { className: root24, ...rest, children: [
|
|
271
336
|
children,
|
|
272
|
-
count != null && /* @__PURE__ */
|
|
337
|
+
count != null && /* @__PURE__ */ jsx6("span", { className: dot3, children: count })
|
|
273
338
|
] });
|
|
274
339
|
}
|
|
275
340
|
|
|
276
341
|
// src/components/progress/use-styles.ts
|
|
277
|
-
import { useMemo as
|
|
342
|
+
import { useMemo as useMemo7 } from "react";
|
|
278
343
|
|
|
279
344
|
// src/components/progress/use-styles.css.ts
|
|
280
345
|
var bar = "use-styles_bar__kbop7v3";
|
|
@@ -283,14 +348,14 @@ var spinner = "use-styles_spinner__kbop7v5";
|
|
|
283
348
|
var track = "use-styles_track__kbop7v2";
|
|
284
349
|
|
|
285
350
|
// src/components/progress/use-styles.ts
|
|
286
|
-
function
|
|
351
|
+
function useStyles6({
|
|
287
352
|
variant: variant2 = "linear",
|
|
288
353
|
value,
|
|
289
354
|
className
|
|
290
355
|
}) {
|
|
291
356
|
const { themeClass } = useTheme();
|
|
292
357
|
const indeterminate2 = value === void 0;
|
|
293
|
-
return
|
|
358
|
+
return useMemo7(() => {
|
|
294
359
|
const root24 = (...classes) => [themeClass, ...classes, className].filter(Boolean).join(" ");
|
|
295
360
|
if (variant2 === "circular") {
|
|
296
361
|
return { track: "", bar: "", spinner: root24(spinner) };
|
|
@@ -304,7 +369,7 @@ function useStyles5({
|
|
|
304
369
|
}
|
|
305
370
|
|
|
306
371
|
// src/components/progress/index.tsx
|
|
307
|
-
import { jsx as
|
|
372
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
308
373
|
function Progress({
|
|
309
374
|
variant: variant2 = "linear",
|
|
310
375
|
value,
|
|
@@ -312,10 +377,10 @@ function Progress({
|
|
|
312
377
|
className,
|
|
313
378
|
...rest
|
|
314
379
|
}) {
|
|
315
|
-
const { track: track4, bar: bar2, spinner: spinner2 } =
|
|
380
|
+
const { track: track4, bar: bar2, spinner: spinner2 } = useStyles6({ variant: variant2, value, className });
|
|
316
381
|
const indeterminate2 = value === void 0;
|
|
317
382
|
if (variant2 === "circular") {
|
|
318
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ jsx7(
|
|
319
384
|
"span",
|
|
320
385
|
{
|
|
321
386
|
className: spinner2,
|
|
@@ -328,7 +393,7 @@ function Progress({
|
|
|
328
393
|
}
|
|
329
394
|
);
|
|
330
395
|
}
|
|
331
|
-
return /* @__PURE__ */
|
|
396
|
+
return /* @__PURE__ */ jsx7(
|
|
332
397
|
"div",
|
|
333
398
|
{
|
|
334
399
|
className: track4,
|
|
@@ -337,13 +402,13 @@ function Progress({
|
|
|
337
402
|
"aria-valuemin": indeterminate2 ? void 0 : 0,
|
|
338
403
|
"aria-valuemax": indeterminate2 ? void 0 : 100,
|
|
339
404
|
...rest,
|
|
340
|
-
children: /* @__PURE__ */
|
|
405
|
+
children: /* @__PURE__ */ jsx7("div", { className: bar2, style: indeterminate2 ? void 0 : { width: `${value}%` } })
|
|
341
406
|
}
|
|
342
407
|
);
|
|
343
408
|
}
|
|
344
409
|
|
|
345
410
|
// src/components/icons/x/index.tsx
|
|
346
|
-
import { jsx as
|
|
411
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
347
412
|
function XIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
348
413
|
return /* @__PURE__ */ jsxs4(
|
|
349
414
|
"svg",
|
|
@@ -360,15 +425,15 @@ function XIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
360
425
|
"aria-hidden": "true",
|
|
361
426
|
...rest,
|
|
362
427
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ jsx8("path", { d: "M18 6 6 18" }),
|
|
429
|
+
/* @__PURE__ */ jsx8("path", { d: "m6 6 12 12" })
|
|
365
430
|
]
|
|
366
431
|
}
|
|
367
432
|
);
|
|
368
433
|
}
|
|
369
434
|
|
|
370
435
|
// src/components/chip/use-styles.ts
|
|
371
|
-
import { useMemo as
|
|
436
|
+
import { useMemo as useMemo8 } from "react";
|
|
372
437
|
|
|
373
438
|
// src/components/chip/use-styles.css.ts
|
|
374
439
|
var clickable = "use-styles_clickable__1axilf44";
|
|
@@ -378,13 +443,13 @@ var selected = "use-styles_selected__1axilf43";
|
|
|
378
443
|
var tone3 = { ink: "use-styles_tone_ink__1axilf41", accent: "use-styles_tone_accent__1axilf42" };
|
|
379
444
|
|
|
380
445
|
// src/components/chip/use-styles.ts
|
|
381
|
-
function
|
|
446
|
+
function useStyles7({
|
|
382
447
|
selected: selected3,
|
|
383
448
|
tone: tone4 = "ink",
|
|
384
449
|
clickable: clickable2
|
|
385
450
|
}) {
|
|
386
451
|
const { themeClass } = useTheme();
|
|
387
|
-
const root24 =
|
|
452
|
+
const root24 = useMemo8(
|
|
388
453
|
() => [
|
|
389
454
|
themeClass,
|
|
390
455
|
root5,
|
|
@@ -397,24 +462,24 @@ function useStyles6({
|
|
|
397
462
|
}
|
|
398
463
|
|
|
399
464
|
// src/components/chip/index.tsx
|
|
400
|
-
import { jsx as
|
|
465
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
401
466
|
function Chip({ selected: selected3, tone: tone4, onDelete, onClick, children, ...rest }) {
|
|
402
467
|
const clickable2 = Boolean(onClick);
|
|
403
|
-
const { root: root24, deleteBtn: deleteBtn2 } =
|
|
468
|
+
const { root: root24, deleteBtn: deleteBtn2 } = useStyles7({ selected: selected3, tone: tone4, clickable: clickable2 });
|
|
404
469
|
const handleDelete = (event) => {
|
|
405
470
|
event.stopPropagation();
|
|
406
471
|
onDelete?.();
|
|
407
472
|
};
|
|
408
473
|
return /* @__PURE__ */ jsxs5("span", { className: root24, onClick, ...rest, children: [
|
|
409
474
|
children,
|
|
410
|
-
onDelete && /* @__PURE__ */
|
|
475
|
+
onDelete && /* @__PURE__ */ jsx9("button", { type: "button", className: deleteBtn2, "aria-label": "Remove", onClick: handleDelete, children: /* @__PURE__ */ jsx9(XIcon, { size: 13 }) })
|
|
411
476
|
] });
|
|
412
477
|
}
|
|
413
478
|
|
|
414
479
|
// src/components/icons/check/index.tsx
|
|
415
|
-
import { jsx as
|
|
480
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
416
481
|
function CheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
417
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ jsx10(
|
|
418
483
|
"svg",
|
|
419
484
|
{
|
|
420
485
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -428,13 +493,13 @@ function CheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
428
493
|
strokeLinejoin: "round",
|
|
429
494
|
"aria-hidden": "true",
|
|
430
495
|
...rest,
|
|
431
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ jsx10("path", { d: "M20 6 9 17l-5-5" })
|
|
432
497
|
}
|
|
433
498
|
);
|
|
434
499
|
}
|
|
435
500
|
|
|
436
501
|
// src/components/checkbox/use-styles.ts
|
|
437
|
-
import { useMemo as
|
|
502
|
+
import { useMemo as useMemo9 } from "react";
|
|
438
503
|
|
|
439
504
|
// src/components/checkbox/use-styles.css.ts
|
|
440
505
|
var box = "use-styles_box__9zoga91";
|
|
@@ -445,13 +510,13 @@ var input = "surfaces_srOnly__6hs0fg0";
|
|
|
445
510
|
var root6 = "use-styles_root__9zoga90";
|
|
446
511
|
|
|
447
512
|
// src/components/checkbox/use-styles.ts
|
|
448
|
-
function
|
|
513
|
+
function useStyles8({ checked, disabled: disabled3 }) {
|
|
449
514
|
const { themeClass } = useTheme();
|
|
450
|
-
const root24 =
|
|
515
|
+
const root24 = useMemo9(
|
|
451
516
|
() => [themeClass, root6, disabled3 && disabled].filter(Boolean).join(" "),
|
|
452
517
|
[themeClass, disabled3]
|
|
453
518
|
);
|
|
454
|
-
const box2 =
|
|
519
|
+
const box2 = useMemo9(
|
|
455
520
|
() => [box, checked && boxChecked].filter(Boolean).join(" "),
|
|
456
521
|
[checked]
|
|
457
522
|
);
|
|
@@ -459,7 +524,7 @@ function useStyles7({ checked, disabled: disabled3 }) {
|
|
|
459
524
|
}
|
|
460
525
|
|
|
461
526
|
// src/components/checkbox/index.tsx
|
|
462
|
-
import { jsx as
|
|
527
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
463
528
|
function Checkbox({
|
|
464
529
|
checked = false,
|
|
465
530
|
onChange,
|
|
@@ -467,13 +532,13 @@ function Checkbox({
|
|
|
467
532
|
disabled: disabled3 = false,
|
|
468
533
|
id
|
|
469
534
|
}) {
|
|
470
|
-
const { root: root24, input: input6, box: box2, check: check2 } =
|
|
535
|
+
const { root: root24, input: input6, box: box2, check: check2 } = useStyles8({ checked, disabled: disabled3 });
|
|
471
536
|
const handleChange = (e) => {
|
|
472
537
|
if (disabled3) return;
|
|
473
538
|
onChange?.(e.target.checked);
|
|
474
539
|
};
|
|
475
540
|
return /* @__PURE__ */ jsxs6("label", { className: root24, children: [
|
|
476
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ jsx11(
|
|
477
542
|
"input",
|
|
478
543
|
{
|
|
479
544
|
type: "checkbox",
|
|
@@ -484,13 +549,13 @@ function Checkbox({
|
|
|
484
549
|
onChange: handleChange
|
|
485
550
|
}
|
|
486
551
|
),
|
|
487
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx11("span", { className: box2, children: checked && /* @__PURE__ */ jsx11(CheckIcon, { size: 12, className: check2 }) }),
|
|
488
553
|
label7
|
|
489
554
|
] });
|
|
490
555
|
}
|
|
491
556
|
|
|
492
557
|
// src/components/radio/use-styles.ts
|
|
493
|
-
import { useMemo as
|
|
558
|
+
import { useMemo as useMemo10 } from "react";
|
|
494
559
|
|
|
495
560
|
// src/components/radio/use-styles.css.ts
|
|
496
561
|
var circle = "use-styles_circle__vy61b42";
|
|
@@ -501,12 +566,12 @@ var label2 = "use-styles_label__vy61b44";
|
|
|
501
566
|
var root7 = "use-styles_root__vy61b40";
|
|
502
567
|
|
|
503
568
|
// src/components/radio/use-styles.ts
|
|
504
|
-
function
|
|
569
|
+
function useStyles9({
|
|
505
570
|
disabled: disabled3,
|
|
506
571
|
className
|
|
507
572
|
}) {
|
|
508
573
|
const { themeClass } = useTheme();
|
|
509
|
-
const root24 =
|
|
574
|
+
const root24 = useMemo10(
|
|
510
575
|
() => [themeClass, root7, disabled3 && disabled2, className].filter(Boolean).join(" "),
|
|
511
576
|
[themeClass, disabled3, className]
|
|
512
577
|
);
|
|
@@ -520,11 +585,11 @@ function useStyles8({
|
|
|
520
585
|
}
|
|
521
586
|
|
|
522
587
|
// src/components/radio/index.tsx
|
|
523
|
-
import { jsx as
|
|
588
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
524
589
|
function Radio({ checked, onChange, label: label7, name, value, disabled: disabled3 }) {
|
|
525
|
-
const { root: root24, input: input6, circle: circle2, dot: dot3, label: labelClass } =
|
|
590
|
+
const { root: root24, input: input6, circle: circle2, dot: dot3, label: labelClass } = useStyles9({ disabled: disabled3 });
|
|
526
591
|
return /* @__PURE__ */ jsxs7("label", { className: root24, children: [
|
|
527
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ jsx12(
|
|
528
593
|
"input",
|
|
529
594
|
{
|
|
530
595
|
className: input6,
|
|
@@ -536,13 +601,13 @@ function Radio({ checked, onChange, label: label7, name, value, disabled: disabl
|
|
|
536
601
|
onChange
|
|
537
602
|
}
|
|
538
603
|
),
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
label7 != null && /* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ jsx12("span", { className: circle2, children: checked && /* @__PURE__ */ jsx12("span", { className: dot3 }) }),
|
|
605
|
+
label7 != null && /* @__PURE__ */ jsx12("span", { className: labelClass, children: label7 })
|
|
541
606
|
] });
|
|
542
607
|
}
|
|
543
608
|
|
|
544
609
|
// src/components/switch/use-styles.ts
|
|
545
|
-
import { useMemo as
|
|
610
|
+
import { useMemo as useMemo11 } from "react";
|
|
546
611
|
|
|
547
612
|
// src/components/switch/use-styles.css.ts
|
|
548
613
|
var input3 = "surfaces_srOnly__6hs0fg0";
|
|
@@ -554,9 +619,9 @@ var track2 = "use-styles_track__1r6kem71";
|
|
|
554
619
|
var trackChecked = "use-styles_trackChecked__1r6kem72";
|
|
555
620
|
|
|
556
621
|
// src/components/switch/use-styles.ts
|
|
557
|
-
function
|
|
622
|
+
function useStyles10({ checked }) {
|
|
558
623
|
const { themeClass } = useTheme();
|
|
559
|
-
return
|
|
624
|
+
return useMemo11(
|
|
560
625
|
() => ({
|
|
561
626
|
root: [themeClass, root8].filter(Boolean).join(" "),
|
|
562
627
|
input: input3,
|
|
@@ -569,11 +634,11 @@ function useStyles9({ checked }) {
|
|
|
569
634
|
}
|
|
570
635
|
|
|
571
636
|
// src/components/switch/index.tsx
|
|
572
|
-
import { jsx as
|
|
637
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
573
638
|
function Switch({ checked = false, onChange, label: label7, disabled: disabled3 }) {
|
|
574
|
-
const { root: root24, input: input6, track: track4, knob: knob2, label: labelClass } =
|
|
639
|
+
const { root: root24, input: input6, track: track4, knob: knob2, label: labelClass } = useStyles10({ checked });
|
|
575
640
|
return /* @__PURE__ */ jsxs8("label", { className: root24, children: [
|
|
576
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ jsx13(
|
|
577
642
|
"input",
|
|
578
643
|
{
|
|
579
644
|
type: "checkbox",
|
|
@@ -588,8 +653,8 @@ function Switch({ checked = false, onChange, label: label7, disabled: disabled3
|
|
|
588
653
|
}
|
|
589
654
|
}
|
|
590
655
|
),
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
label7 != null && /* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ jsx13("span", { className: track4, children: /* @__PURE__ */ jsx13("span", { className: knob2 }) }),
|
|
657
|
+
label7 != null && /* @__PURE__ */ jsx13("span", { className: labelClass, children: label7 })
|
|
593
658
|
] });
|
|
594
659
|
}
|
|
595
660
|
|
|
@@ -600,7 +665,7 @@ import {
|
|
|
600
665
|
} from "react";
|
|
601
666
|
|
|
602
667
|
// src/components/icons/eye/index.tsx
|
|
603
|
-
import { jsx as
|
|
668
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
604
669
|
function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
605
670
|
return /* @__PURE__ */ jsxs9(
|
|
606
671
|
"svg",
|
|
@@ -617,15 +682,15 @@ function EyeIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
617
682
|
"aria-hidden": "true",
|
|
618
683
|
...rest,
|
|
619
684
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ jsx14("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
686
|
+
/* @__PURE__ */ jsx14("circle", { cx: "12", cy: "12", r: "3" })
|
|
622
687
|
]
|
|
623
688
|
}
|
|
624
689
|
);
|
|
625
690
|
}
|
|
626
691
|
|
|
627
692
|
// src/components/icons/eye-off/index.tsx
|
|
628
|
-
import { jsx as
|
|
693
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
629
694
|
function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
630
695
|
return /* @__PURE__ */ jsxs10(
|
|
631
696
|
"svg",
|
|
@@ -642,17 +707,17 @@ function EyeOffIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
642
707
|
"aria-hidden": "true",
|
|
643
708
|
...rest,
|
|
644
709
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ jsx15("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
|
|
711
|
+
/* @__PURE__ */ jsx15("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
|
|
712
|
+
/* @__PURE__ */ jsx15("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
|
|
713
|
+
/* @__PURE__ */ jsx15("path", { d: "m2 2 20 20" })
|
|
649
714
|
]
|
|
650
715
|
}
|
|
651
716
|
);
|
|
652
717
|
}
|
|
653
718
|
|
|
654
719
|
// src/components/text-field/use-styles.ts
|
|
655
|
-
import { useMemo as
|
|
720
|
+
import { useMemo as useMemo12 } from "react";
|
|
656
721
|
|
|
657
722
|
// src/components/text-field/use-styles.css.ts
|
|
658
723
|
var field = "use-styles_field__vat8gv3";
|
|
@@ -669,9 +734,9 @@ var root9 = "use-styles_root__vat8gv0";
|
|
|
669
734
|
var startIcon = "use-styles_startIcon__vat8gva";
|
|
670
735
|
|
|
671
736
|
// src/components/text-field/use-styles.ts
|
|
672
|
-
function
|
|
737
|
+
function useStyles11({ error, hasStartIcon, hasReveal, className }) {
|
|
673
738
|
const { themeClass } = useTheme();
|
|
674
|
-
return
|
|
739
|
+
return useMemo12(() => {
|
|
675
740
|
const root24 = [themeClass, root9].filter(Boolean).join(" ");
|
|
676
741
|
const labelText2 = [labelText, error && labelTextError].filter(Boolean).join(" ");
|
|
677
742
|
const input6 = [
|
|
@@ -695,7 +760,7 @@ function useStyles10({ error, hasStartIcon, hasReveal, className }) {
|
|
|
695
760
|
}
|
|
696
761
|
|
|
697
762
|
// src/components/text-field/index.tsx
|
|
698
|
-
import { jsx as
|
|
763
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
699
764
|
function TextField({
|
|
700
765
|
label: label7,
|
|
701
766
|
help,
|
|
@@ -715,7 +780,7 @@ function TextField({
|
|
|
715
780
|
const effectiveType = isPassword ? reveal ? "text" : "password" : type;
|
|
716
781
|
const autoId = useId();
|
|
717
782
|
const controlId = id ?? autoId;
|
|
718
|
-
const classes =
|
|
783
|
+
const classes = useStyles11({
|
|
719
784
|
error,
|
|
720
785
|
hasStartIcon: Boolean(StartIcon),
|
|
721
786
|
hasReveal,
|
|
@@ -731,10 +796,10 @@ function TextField({
|
|
|
731
796
|
e.preventDefault();
|
|
732
797
|
};
|
|
733
798
|
return /* @__PURE__ */ jsxs11("div", { className: classes.root, children: [
|
|
734
|
-
label7 != null && /* @__PURE__ */
|
|
799
|
+
label7 != null && /* @__PURE__ */ jsx16("label", { htmlFor: controlId, className: classes.labelText, children: label7 }),
|
|
735
800
|
/* @__PURE__ */ jsxs11("div", { className: classes.field, children: [
|
|
736
|
-
StartIcon != null && /* @__PURE__ */
|
|
737
|
-
multiline ? /* @__PURE__ */
|
|
801
|
+
StartIcon != null && /* @__PURE__ */ jsx16("span", { className: classes.startIcon, children: /* @__PURE__ */ jsx16(StartIcon, { size: 18 }) }),
|
|
802
|
+
multiline ? /* @__PURE__ */ jsx16(
|
|
738
803
|
"textarea",
|
|
739
804
|
{
|
|
740
805
|
id: controlId,
|
|
@@ -743,7 +808,7 @@ function TextField({
|
|
|
743
808
|
onChange: handleTextareaChange,
|
|
744
809
|
...rest
|
|
745
810
|
}
|
|
746
|
-
) : /* @__PURE__ */
|
|
811
|
+
) : /* @__PURE__ */ jsx16(
|
|
747
812
|
"input",
|
|
748
813
|
{
|
|
749
814
|
id: controlId,
|
|
@@ -753,7 +818,7 @@ function TextField({
|
|
|
753
818
|
...rest
|
|
754
819
|
}
|
|
755
820
|
),
|
|
756
|
-
hasReveal && /* @__PURE__ */
|
|
821
|
+
hasReveal && /* @__PURE__ */ jsx16(
|
|
757
822
|
"button",
|
|
758
823
|
{
|
|
759
824
|
type: "button",
|
|
@@ -762,16 +827,16 @@ function TextField({
|
|
|
762
827
|
"aria-label": reveal ? "Ocultar contrase\xF1a" : "Mostrar contrase\xF1a",
|
|
763
828
|
onMouseDown: handleToggleMouseDown,
|
|
764
829
|
onClick: () => setReveal((r) => !r),
|
|
765
|
-
children: reveal ? /* @__PURE__ */
|
|
830
|
+
children: reveal ? /* @__PURE__ */ jsx16(EyeOffIcon, { size: 18 }) : /* @__PURE__ */ jsx16(EyeIcon, { size: 18 })
|
|
766
831
|
}
|
|
767
832
|
)
|
|
768
833
|
] }),
|
|
769
|
-
help != null && /* @__PURE__ */
|
|
834
|
+
help != null && /* @__PURE__ */ jsx16("span", { className: classes.helpText, children: help })
|
|
770
835
|
] });
|
|
771
836
|
}
|
|
772
837
|
|
|
773
838
|
// src/components/icon-button/use-styles.ts
|
|
774
|
-
import { useMemo as
|
|
839
|
+
import { useMemo as useMemo13 } from "react";
|
|
775
840
|
|
|
776
841
|
// src/components/icon-button/use-styles.css.ts
|
|
777
842
|
var accent = "use-styles_accent__18np0q02";
|
|
@@ -779,12 +844,12 @@ var active = "use-styles_active__18np0q01";
|
|
|
779
844
|
var root10 = "use-styles_root__18np0q00";
|
|
780
845
|
|
|
781
846
|
// src/components/icon-button/use-styles.ts
|
|
782
|
-
function
|
|
847
|
+
function useStyles12({
|
|
783
848
|
active: active2 = false,
|
|
784
849
|
tone: tone4 = "ink"
|
|
785
850
|
}) {
|
|
786
851
|
const { themeClass } = useTheme();
|
|
787
|
-
const root24 =
|
|
852
|
+
const root24 = useMemo13(
|
|
788
853
|
() => [themeClass, root10, tone4 === "accent" && accent, active2 && active].filter(Boolean).join(" "),
|
|
789
854
|
[themeClass, active2, tone4]
|
|
790
855
|
);
|
|
@@ -792,14 +857,14 @@ function useStyles11({
|
|
|
792
857
|
}
|
|
793
858
|
|
|
794
859
|
// src/components/icon-button/index.tsx
|
|
795
|
-
import { jsx as
|
|
860
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
796
861
|
function IconButton({ icon: Icon, active: active2, tone: tone4, title, ...rest }) {
|
|
797
|
-
const { root: root24 } =
|
|
798
|
-
return /* @__PURE__ */
|
|
862
|
+
const { root: root24 } = useStyles12({ active: active2, tone: tone4 });
|
|
863
|
+
return /* @__PURE__ */ jsx17("button", { className: root24, "aria-label": title, title, ...rest, children: /* @__PURE__ */ jsx17(Icon, { size: 18 }) });
|
|
799
864
|
}
|
|
800
865
|
|
|
801
866
|
// src/components/card/use-styles.ts
|
|
802
|
-
import { useMemo as
|
|
867
|
+
import { useMemo as useMemo14 } from "react";
|
|
803
868
|
|
|
804
869
|
// src/components/card/use-styles.css.ts
|
|
805
870
|
var body = "use-styles_body__1fuvd022";
|
|
@@ -808,29 +873,29 @@ var header = "use-styles_header__1fuvd021";
|
|
|
808
873
|
var root11 = "use-styles_root__1fuvd020";
|
|
809
874
|
|
|
810
875
|
// src/components/card/use-styles.ts
|
|
811
|
-
function
|
|
876
|
+
function useStyles13() {
|
|
812
877
|
const { themeClass } = useTheme();
|
|
813
|
-
const root24 =
|
|
878
|
+
const root24 = useMemo14(() => `${themeClass} ${root11}`, [themeClass]);
|
|
814
879
|
return { root: root24, header, body, footer };
|
|
815
880
|
}
|
|
816
881
|
|
|
817
882
|
// src/components/card/index.tsx
|
|
818
|
-
import { jsx as
|
|
883
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
819
884
|
function CardRoot({ children, ...rest }) {
|
|
820
|
-
const { root: root24 } =
|
|
821
|
-
return /* @__PURE__ */
|
|
885
|
+
const { root: root24 } = useStyles13();
|
|
886
|
+
return /* @__PURE__ */ jsx18("div", { className: root24, ...rest, children });
|
|
822
887
|
}
|
|
823
888
|
function CardHeader({ children, ...rest }) {
|
|
824
|
-
const { header: header3 } =
|
|
825
|
-
return /* @__PURE__ */
|
|
889
|
+
const { header: header3 } = useStyles13();
|
|
890
|
+
return /* @__PURE__ */ jsx18("div", { className: header3, ...rest, children });
|
|
826
891
|
}
|
|
827
892
|
function CardBody({ children, ...rest }) {
|
|
828
|
-
const { body:
|
|
829
|
-
return /* @__PURE__ */
|
|
893
|
+
const { body: body3 } = useStyles13();
|
|
894
|
+
return /* @__PURE__ */ jsx18("div", { className: body3, ...rest, children });
|
|
830
895
|
}
|
|
831
896
|
function CardFooter({ children, ...rest }) {
|
|
832
|
-
const { footer: footer2 } =
|
|
833
|
-
return /* @__PURE__ */
|
|
897
|
+
const { footer: footer2 } = useStyles13();
|
|
898
|
+
return /* @__PURE__ */ jsx18("div", { className: footer2, ...rest, children });
|
|
834
899
|
}
|
|
835
900
|
CardRoot.displayName = "Card";
|
|
836
901
|
CardHeader.displayName = "Card.Header";
|
|
@@ -843,7 +908,7 @@ var Card = Object.assign(CardRoot, {
|
|
|
843
908
|
});
|
|
844
909
|
|
|
845
910
|
// src/components/icons/circle-check/index.tsx
|
|
846
|
-
import { jsx as
|
|
911
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
847
912
|
function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
848
913
|
return /* @__PURE__ */ jsxs12(
|
|
849
914
|
"svg",
|
|
@@ -860,15 +925,15 @@ function CircleCheckIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
860
925
|
"aria-hidden": "true",
|
|
861
926
|
...rest,
|
|
862
927
|
children: [
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "10" }),
|
|
929
|
+
/* @__PURE__ */ jsx19("path", { d: "m9 12 2 2 4-4" })
|
|
865
930
|
]
|
|
866
931
|
}
|
|
867
932
|
);
|
|
868
933
|
}
|
|
869
934
|
|
|
870
935
|
// src/components/icons/circle-x/index.tsx
|
|
871
|
-
import { jsx as
|
|
936
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
872
937
|
function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
873
938
|
return /* @__PURE__ */ jsxs13(
|
|
874
939
|
"svg",
|
|
@@ -885,16 +950,16 @@ function CircleXIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
885
950
|
"aria-hidden": "true",
|
|
886
951
|
...rest,
|
|
887
952
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "10" }),
|
|
954
|
+
/* @__PURE__ */ jsx20("path", { d: "m15 9-6 6" }),
|
|
955
|
+
/* @__PURE__ */ jsx20("path", { d: "m9 9 6 6" })
|
|
891
956
|
]
|
|
892
957
|
}
|
|
893
958
|
);
|
|
894
959
|
}
|
|
895
960
|
|
|
896
961
|
// src/components/icons/info/index.tsx
|
|
897
|
-
import { jsx as
|
|
962
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
898
963
|
function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
899
964
|
return /* @__PURE__ */ jsxs14(
|
|
900
965
|
"svg",
|
|
@@ -911,16 +976,16 @@ function InfoIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
911
976
|
"aria-hidden": "true",
|
|
912
977
|
...rest,
|
|
913
978
|
children: [
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "10" }),
|
|
980
|
+
/* @__PURE__ */ jsx21("path", { d: "M12 16v-4" }),
|
|
981
|
+
/* @__PURE__ */ jsx21("path", { d: "M12 8h.01" })
|
|
917
982
|
]
|
|
918
983
|
}
|
|
919
984
|
);
|
|
920
985
|
}
|
|
921
986
|
|
|
922
987
|
// src/components/icons/triangle-alert/index.tsx
|
|
923
|
-
import { jsx as
|
|
988
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
924
989
|
function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
925
990
|
return /* @__PURE__ */ jsxs15(
|
|
926
991
|
"svg",
|
|
@@ -937,46 +1002,42 @@ function TriangleAlertIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
937
1002
|
"aria-hidden": "true",
|
|
938
1003
|
...rest,
|
|
939
1004
|
children: [
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ jsx22("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
1006
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 9v4" }),
|
|
1007
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 17h.01" })
|
|
943
1008
|
]
|
|
944
1009
|
}
|
|
945
1010
|
);
|
|
946
1011
|
}
|
|
947
1012
|
|
|
948
1013
|
// src/components/alert/use-styles.ts
|
|
949
|
-
import { useMemo as
|
|
1014
|
+
import { useMemo as useMemo15 } from "react";
|
|
950
1015
|
|
|
951
1016
|
// src/components/alert/use-styles.css.ts
|
|
952
|
-
var body2 = "use-styles_body__ivsh6u8";
|
|
953
1017
|
var content = "use-styles_content__ivsh6u6";
|
|
954
1018
|
var iconSlot = "use-styles_iconSlot__ivsh6u5";
|
|
955
1019
|
var root12 = "use-styles_root__ivsh6u0";
|
|
956
1020
|
var severity = { info: "use-styles_severity_info__ivsh6u1", ok: "use-styles_severity_ok__ivsh6u2", warn: "use-styles_severity_warn__ivsh6u3", danger: "use-styles_severity_danger__ivsh6u4" };
|
|
957
|
-
var titleText = "use-styles_titleText__ivsh6u7";
|
|
958
1021
|
|
|
959
1022
|
// src/components/alert/use-styles.ts
|
|
960
|
-
function
|
|
1023
|
+
function useStyles14({
|
|
961
1024
|
severity: severity2 = "info",
|
|
962
1025
|
className
|
|
963
1026
|
}) {
|
|
964
1027
|
const { themeClass } = useTheme();
|
|
965
|
-
const root24 =
|
|
1028
|
+
const root24 = useMemo15(
|
|
966
1029
|
() => [themeClass, root12, severity[severity2], className].filter(Boolean).join(" "),
|
|
967
1030
|
[themeClass, severity2, className]
|
|
968
1031
|
);
|
|
969
1032
|
return {
|
|
970
1033
|
root: root24,
|
|
971
1034
|
iconSlot,
|
|
972
|
-
content
|
|
973
|
-
titleText,
|
|
974
|
-
body: body2
|
|
1035
|
+
content
|
|
975
1036
|
};
|
|
976
1037
|
}
|
|
977
1038
|
|
|
978
1039
|
// src/components/alert/index.tsx
|
|
979
|
-
import { jsx as
|
|
1040
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
980
1041
|
var defaultIcons = {
|
|
981
1042
|
info: InfoIcon,
|
|
982
1043
|
ok: CircleCheckIcon,
|
|
@@ -991,13 +1052,13 @@ function Alert({
|
|
|
991
1052
|
children,
|
|
992
1053
|
...rest
|
|
993
1054
|
}) {
|
|
994
|
-
const styles =
|
|
1055
|
+
const styles = useStyles14({ severity: severity2, className });
|
|
995
1056
|
const IconComponent = icon ?? defaultIcons[severity2];
|
|
996
1057
|
return /* @__PURE__ */ jsxs16("div", { role: "alert", className: styles.root, ...rest, children: [
|
|
997
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ jsx23("span", { className: styles.iconSlot, children: /* @__PURE__ */ jsx23(IconComponent, {}) }),
|
|
998
1059
|
/* @__PURE__ */ jsxs16("div", { className: styles.content, children: [
|
|
999
|
-
title != null && /* @__PURE__ */
|
|
1000
|
-
children != null && /* @__PURE__ */
|
|
1060
|
+
title != null && /* @__PURE__ */ jsx23(Typography, { variant: "h4", children: title }),
|
|
1061
|
+
children != null && /* @__PURE__ */ jsx23(Typography, { variant: "body", color: "fg2", children })
|
|
1001
1062
|
] })
|
|
1002
1063
|
] });
|
|
1003
1064
|
}
|
|
@@ -1006,7 +1067,7 @@ function Alert({
|
|
|
1006
1067
|
import { cloneElement, useId as useId2, useState as useState4 } from "react";
|
|
1007
1068
|
|
|
1008
1069
|
// src/components/tooltip/use-styles.ts
|
|
1009
|
-
import { useMemo as
|
|
1070
|
+
import { useMemo as useMemo16 } from "react";
|
|
1010
1071
|
|
|
1011
1072
|
// src/components/tooltip/use-styles.css.ts
|
|
1012
1073
|
var bubble = "use-styles_bubble__h9kvh1 surfaces_inkySurface__6hs0fg2";
|
|
@@ -1014,13 +1075,15 @@ var placement = { top: "use-styles_placement_top__h9kvh2", bottom: "use-styles_p
|
|
|
1014
1075
|
var wrapper = "use-styles_wrapper__h9kvh0";
|
|
1015
1076
|
|
|
1016
1077
|
// src/components/tooltip/use-styles.ts
|
|
1017
|
-
function
|
|
1078
|
+
function useStyles15({
|
|
1079
|
+
placement: placement2 = "top"
|
|
1080
|
+
}) {
|
|
1018
1081
|
const { themeClass } = useTheme();
|
|
1019
|
-
const wrapper4 =
|
|
1082
|
+
const wrapper4 = useMemo16(
|
|
1020
1083
|
() => [themeClass, wrapper].filter(Boolean).join(" "),
|
|
1021
1084
|
[themeClass]
|
|
1022
1085
|
);
|
|
1023
|
-
const bubble2 =
|
|
1086
|
+
const bubble2 = useMemo16(
|
|
1024
1087
|
() => [bubble, placement[placement2]].filter(Boolean).join(" "),
|
|
1025
1088
|
[placement2]
|
|
1026
1089
|
);
|
|
@@ -1028,11 +1091,11 @@ function useStyles14({ placement: placement2 = "top" }) {
|
|
|
1028
1091
|
}
|
|
1029
1092
|
|
|
1030
1093
|
// src/components/tooltip/index.tsx
|
|
1031
|
-
import { jsx as
|
|
1094
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1032
1095
|
function Tooltip({ label: label7, children, placement: placement2 }) {
|
|
1033
1096
|
const [open, setOpen] = useState4(false);
|
|
1034
1097
|
const tooltipId = useId2();
|
|
1035
|
-
const { wrapper: wrapper4, bubble: bubble2 } =
|
|
1098
|
+
const { wrapper: wrapper4, bubble: bubble2 } = useStyles15({ placement: placement2 });
|
|
1036
1099
|
const show = () => setOpen(true);
|
|
1037
1100
|
const hide = () => setOpen(false);
|
|
1038
1101
|
const previousDescribedBy = children.props["aria-describedby"];
|
|
@@ -1040,7 +1103,7 @@ function Tooltip({ label: label7, children, placement: placement2 }) {
|
|
|
1040
1103
|
const trigger2 = cloneElement(children, { "aria-describedby": describedBy });
|
|
1041
1104
|
return /* @__PURE__ */ jsxs17("span", { className: wrapper4, onMouseEnter: show, onMouseLeave: hide, onFocus: show, onBlur: hide, children: [
|
|
1042
1105
|
trigger2,
|
|
1043
|
-
open && /* @__PURE__ */
|
|
1106
|
+
open && /* @__PURE__ */ jsx24("span", { id: tooltipId, role: "tooltip", className: bubble2, children: label7 })
|
|
1044
1107
|
] });
|
|
1045
1108
|
}
|
|
1046
1109
|
|
|
@@ -1048,9 +1111,9 @@ function Tooltip({ label: label7, children, placement: placement2 }) {
|
|
|
1048
1111
|
import { useEffect as useEffect3, useId as useId3, useRef as useRef2, useState as useState5 } from "react";
|
|
1049
1112
|
|
|
1050
1113
|
// src/components/icons/chevron-down/index.tsx
|
|
1051
|
-
import { jsx as
|
|
1114
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1052
1115
|
function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1053
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ jsx25(
|
|
1054
1117
|
"svg",
|
|
1055
1118
|
{
|
|
1056
1119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1064,13 +1127,13 @@ function ChevronDownIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1064
1127
|
strokeLinejoin: "round",
|
|
1065
1128
|
"aria-hidden": "true",
|
|
1066
1129
|
...rest,
|
|
1067
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ jsx25("path", { d: "m6 9 6 6 6-6" })
|
|
1068
1131
|
}
|
|
1069
1132
|
);
|
|
1070
1133
|
}
|
|
1071
1134
|
|
|
1072
1135
|
// src/components/select/use-styles.ts
|
|
1073
|
-
import { useMemo as
|
|
1136
|
+
import { useMemo as useMemo17 } from "react";
|
|
1074
1137
|
|
|
1075
1138
|
// src/components/select/use-styles.css.ts
|
|
1076
1139
|
var chevron = "use-styles_chevron__1w1czpb4";
|
|
@@ -1085,11 +1148,11 @@ var root13 = "use-styles_root__1w1czpb0";
|
|
|
1085
1148
|
var trigger = "use-styles_trigger__1w1czpb2";
|
|
1086
1149
|
|
|
1087
1150
|
// src/components/select/use-styles.ts
|
|
1088
|
-
function
|
|
1151
|
+
function useStyles16({
|
|
1089
1152
|
open = false
|
|
1090
1153
|
}) {
|
|
1091
1154
|
const { themeClass } = useTheme();
|
|
1092
|
-
return
|
|
1155
|
+
return useMemo17(() => {
|
|
1093
1156
|
const chevron3 = [chevron, open && chevronOpen].filter(Boolean).join(" ");
|
|
1094
1157
|
return {
|
|
1095
1158
|
root: [themeClass, root13].filter(Boolean).join(" "),
|
|
@@ -1104,7 +1167,7 @@ function useStyles15({
|
|
|
1104
1167
|
}
|
|
1105
1168
|
|
|
1106
1169
|
// src/components/select/index.tsx
|
|
1107
|
-
import { jsx as
|
|
1170
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1108
1171
|
function Select({ options, value, onChange, placeholder: placeholder2, label: label7, disabled: disabled3 }) {
|
|
1109
1172
|
const [open, setOpen] = useState5(false);
|
|
1110
1173
|
const [activeIndex, setActiveIndex] = useState5(0);
|
|
@@ -1120,7 +1183,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1120
1183
|
chevron: chevron3,
|
|
1121
1184
|
menu: menu2,
|
|
1122
1185
|
optionClass
|
|
1123
|
-
} =
|
|
1186
|
+
} = useStyles16({ open });
|
|
1124
1187
|
useEffect3(() => {
|
|
1125
1188
|
if (!open) return;
|
|
1126
1189
|
const onPointerDown = (event) => {
|
|
@@ -1182,7 +1245,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1182
1245
|
}
|
|
1183
1246
|
};
|
|
1184
1247
|
return /* @__PURE__ */ jsxs18("div", { ref: rootRef, className: root24, children: [
|
|
1185
|
-
label7 && /* @__PURE__ */
|
|
1248
|
+
label7 && /* @__PURE__ */ jsx26("span", { id: labelId, className: labelClass, children: label7 }),
|
|
1186
1249
|
/* @__PURE__ */ jsxs18(
|
|
1187
1250
|
"button",
|
|
1188
1251
|
{
|
|
@@ -1203,17 +1266,17 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1203
1266
|
},
|
|
1204
1267
|
onKeyDown: handleKeyDown,
|
|
1205
1268
|
children: [
|
|
1206
|
-
selected3 ? selected3.label : /* @__PURE__ */
|
|
1207
|
-
/* @__PURE__ */
|
|
1269
|
+
selected3 ? selected3.label : /* @__PURE__ */ jsx26("span", { className: placeholderClass, children: placeholder2 }),
|
|
1270
|
+
/* @__PURE__ */ jsx26("span", { className: chevron3, children: /* @__PURE__ */ jsx26(ChevronDownIcon, { size: 18 }) })
|
|
1208
1271
|
]
|
|
1209
1272
|
}
|
|
1210
1273
|
),
|
|
1211
|
-
open && /* @__PURE__ */
|
|
1274
|
+
open && /* @__PURE__ */ jsx26("div", { className: menu2, role: "listbox", children: options.map((option2, index) => {
|
|
1212
1275
|
const isSelected = option2.value === value;
|
|
1213
1276
|
const isActive = index === activeIndex;
|
|
1214
1277
|
return (
|
|
1215
1278
|
// biome-ignore lint/a11y/useKeyWithClickEvents: keyboard nav lives on the trigger via aria-activedescendant; options are not focusable.
|
|
1216
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ jsx26(
|
|
1217
1280
|
"div",
|
|
1218
1281
|
{
|
|
1219
1282
|
id: optionId(index),
|
|
@@ -1232,7 +1295,7 @@ function Select({ options, value, onChange, placeholder: placeholder2, label: la
|
|
|
1232
1295
|
}
|
|
1233
1296
|
|
|
1234
1297
|
// src/components/slider/use-styles.ts
|
|
1235
|
-
import { useMemo as
|
|
1298
|
+
import { useMemo as useMemo18 } from "react";
|
|
1236
1299
|
|
|
1237
1300
|
// src/components/slider/use-styles.css.ts
|
|
1238
1301
|
var input5 = "use-styles_input__okw59n3";
|
|
@@ -1244,9 +1307,9 @@ var track3 = "use-styles_track__okw59n1";
|
|
|
1244
1307
|
var wrapper2 = "use-styles_wrapper__okw59n6";
|
|
1245
1308
|
|
|
1246
1309
|
// src/components/slider/use-styles.ts
|
|
1247
|
-
function
|
|
1310
|
+
function useStyles17() {
|
|
1248
1311
|
const { themeClass } = useTheme();
|
|
1249
|
-
return
|
|
1312
|
+
return useMemo18(() => {
|
|
1250
1313
|
const root24 = [themeClass, root14].filter(Boolean).join(" ");
|
|
1251
1314
|
return {
|
|
1252
1315
|
wrapper: wrapper2,
|
|
@@ -1261,7 +1324,7 @@ function useStyles16() {
|
|
|
1261
1324
|
}
|
|
1262
1325
|
|
|
1263
1326
|
// src/components/slider/index.tsx
|
|
1264
|
-
import { jsx as
|
|
1327
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1265
1328
|
function Slider({
|
|
1266
1329
|
value = 0,
|
|
1267
1330
|
onChange,
|
|
@@ -1271,7 +1334,7 @@ function Slider({
|
|
|
1271
1334
|
disabled: disabled3,
|
|
1272
1335
|
label: label7
|
|
1273
1336
|
}) {
|
|
1274
|
-
const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } =
|
|
1337
|
+
const { wrapper: wrapper4, label: labelClass, root: root24, track: track4, range: range2, thumb: thumb2, input: input6 } = useStyles17();
|
|
1275
1338
|
const span = max - min;
|
|
1276
1339
|
const percent = span > 0 ? (value - min) / span * 100 : 0;
|
|
1277
1340
|
const clamped = Math.max(0, Math.min(100, percent));
|
|
@@ -1279,11 +1342,11 @@ function Slider({
|
|
|
1279
1342
|
onChange?.(Number(e.target.value));
|
|
1280
1343
|
};
|
|
1281
1344
|
return /* @__PURE__ */ jsxs19("span", { className: wrapper4, children: [
|
|
1282
|
-
label7 ? /* @__PURE__ */
|
|
1345
|
+
label7 ? /* @__PURE__ */ jsx27("span", { className: labelClass, children: label7 }) : null,
|
|
1283
1346
|
/* @__PURE__ */ jsxs19("span", { className: root24, children: [
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
-
/* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ jsx27("span", { className: track4 }),
|
|
1348
|
+
/* @__PURE__ */ jsx27("span", { className: range2, style: { width: `${clamped}%` } }),
|
|
1349
|
+
/* @__PURE__ */ jsx27(
|
|
1287
1350
|
"input",
|
|
1288
1351
|
{
|
|
1289
1352
|
className: input6,
|
|
@@ -1296,7 +1359,7 @@ function Slider({
|
|
|
1296
1359
|
onChange: handleChange
|
|
1297
1360
|
}
|
|
1298
1361
|
),
|
|
1299
|
-
/* @__PURE__ */
|
|
1362
|
+
/* @__PURE__ */ jsx27("span", { className: thumb2, style: { left: `${clamped}%` } })
|
|
1300
1363
|
] })
|
|
1301
1364
|
] });
|
|
1302
1365
|
}
|
|
@@ -1305,7 +1368,7 @@ function Slider({
|
|
|
1305
1368
|
import { useState as useState6 } from "react";
|
|
1306
1369
|
|
|
1307
1370
|
// src/components/accordion/use-styles.ts
|
|
1308
|
-
import { useMemo as
|
|
1371
|
+
import { useMemo as useMemo19 } from "react";
|
|
1309
1372
|
|
|
1310
1373
|
// src/components/accordion/use-styles.css.ts
|
|
1311
1374
|
var chevron2 = "use-styles_chevron__1cjrdh93";
|
|
@@ -1316,9 +1379,9 @@ var panel = "use-styles_panel__1cjrdh95";
|
|
|
1316
1379
|
var root15 = "use-styles_root__1cjrdh90";
|
|
1317
1380
|
|
|
1318
1381
|
// src/components/accordion/use-styles.ts
|
|
1319
|
-
function
|
|
1382
|
+
function useStyles18({ className }) {
|
|
1320
1383
|
const { themeClass } = useTheme();
|
|
1321
|
-
return
|
|
1384
|
+
return useMemo19(
|
|
1322
1385
|
() => ({
|
|
1323
1386
|
root: [themeClass, root15, className].filter(Boolean).join(" "),
|
|
1324
1387
|
item,
|
|
@@ -1331,7 +1394,7 @@ function useStyles17({ className }) {
|
|
|
1331
1394
|
}
|
|
1332
1395
|
|
|
1333
1396
|
// src/components/accordion/index.tsx
|
|
1334
|
-
import { jsx as
|
|
1397
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1335
1398
|
function Accordion({
|
|
1336
1399
|
items,
|
|
1337
1400
|
multiple = false,
|
|
@@ -1339,7 +1402,7 @@ function Accordion({
|
|
|
1339
1402
|
className
|
|
1340
1403
|
}) {
|
|
1341
1404
|
const [open, setOpen] = useState6(defaultOpen);
|
|
1342
|
-
const { root: root24, item: item3, header: header3, chevronFor, panel: panel2 } =
|
|
1405
|
+
const { root: root24, item: item3, header: header3, chevronFor, panel: panel2 } = useStyles18({ className });
|
|
1343
1406
|
const toggle = (id) => {
|
|
1344
1407
|
setOpen((current2) => {
|
|
1345
1408
|
const isOpen = current2.includes(id);
|
|
@@ -1347,7 +1410,7 @@ function Accordion({
|
|
|
1347
1410
|
return multiple ? [...current2, id] : [id];
|
|
1348
1411
|
});
|
|
1349
1412
|
};
|
|
1350
|
-
return /* @__PURE__ */
|
|
1413
|
+
return /* @__PURE__ */ jsx28("div", { className: root24, children: items.map((it) => {
|
|
1351
1414
|
const isOpen = open.includes(it.id);
|
|
1352
1415
|
const panelId = `accordion-panel-${it.id}`;
|
|
1353
1416
|
const headerId = `accordion-header-${it.id}`;
|
|
@@ -1363,11 +1426,11 @@ function Accordion({
|
|
|
1363
1426
|
onClick: () => toggle(it.id),
|
|
1364
1427
|
children: [
|
|
1365
1428
|
it.title,
|
|
1366
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ jsx28(ChevronDownIcon, { className: chevronFor(isOpen) })
|
|
1367
1430
|
]
|
|
1368
1431
|
}
|
|
1369
1432
|
),
|
|
1370
|
-
isOpen && /* @__PURE__ */
|
|
1433
|
+
isOpen && /* @__PURE__ */ jsx28("div", { id: panelId, className: panel2, role: "region", "aria-labelledby": headerId, children: it.content })
|
|
1371
1434
|
] }, it.id);
|
|
1372
1435
|
}) });
|
|
1373
1436
|
}
|
|
@@ -1376,9 +1439,9 @@ function Accordion({
|
|
|
1376
1439
|
import { Fragment } from "react";
|
|
1377
1440
|
|
|
1378
1441
|
// src/components/icons/chevron-right/index.tsx
|
|
1379
|
-
import { jsx as
|
|
1442
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1380
1443
|
function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1381
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx29(
|
|
1382
1445
|
"svg",
|
|
1383
1446
|
{
|
|
1384
1447
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1392,13 +1455,13 @@ function ChevronRightIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1392
1455
|
strokeLinejoin: "round",
|
|
1393
1456
|
"aria-hidden": "true",
|
|
1394
1457
|
...rest,
|
|
1395
|
-
children: /* @__PURE__ */
|
|
1458
|
+
children: /* @__PURE__ */ jsx29("path", { d: "m9 18 6-6-6-6" })
|
|
1396
1459
|
}
|
|
1397
1460
|
);
|
|
1398
1461
|
}
|
|
1399
1462
|
|
|
1400
1463
|
// src/components/breadcrumbs/use-styles.ts
|
|
1401
|
-
import { useMemo as
|
|
1464
|
+
import { useMemo as useMemo20 } from "react";
|
|
1402
1465
|
|
|
1403
1466
|
// src/components/breadcrumbs/use-styles.css.ts
|
|
1404
1467
|
var crumb = "use-styles_crumb__7u0du61";
|
|
@@ -1407,9 +1470,9 @@ var root16 = "use-styles_root__7u0du60";
|
|
|
1407
1470
|
var separator = "use-styles_separator__7u0du63";
|
|
1408
1471
|
|
|
1409
1472
|
// src/components/breadcrumbs/use-styles.ts
|
|
1410
|
-
function
|
|
1473
|
+
function useStyles19({ className }) {
|
|
1411
1474
|
const { themeClass } = useTheme();
|
|
1412
|
-
const root24 =
|
|
1475
|
+
const root24 = useMemo20(
|
|
1413
1476
|
() => [themeClass, root16, className].filter(Boolean).join(" "),
|
|
1414
1477
|
[themeClass, className]
|
|
1415
1478
|
);
|
|
@@ -1417,23 +1480,23 @@ function useStyles18({ className }) {
|
|
|
1417
1480
|
}
|
|
1418
1481
|
|
|
1419
1482
|
// src/components/breadcrumbs/index.tsx
|
|
1420
|
-
import { jsx as
|
|
1483
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1421
1484
|
function Breadcrumbs({ items, className, ...rest }) {
|
|
1422
|
-
const { root: root24, crumb: crumb2, current: current2, separator: separator2 } =
|
|
1423
|
-
return /* @__PURE__ */
|
|
1485
|
+
const { root: root24, crumb: crumb2, current: current2, separator: separator2 } = useStyles19({ className });
|
|
1486
|
+
return /* @__PURE__ */ jsx30("nav", { "aria-label": "Breadcrumb", className: root24, ...rest, children: items.map((item3, index) => {
|
|
1424
1487
|
const isLast = index === items.length - 1;
|
|
1425
1488
|
const key = index;
|
|
1426
1489
|
return /* @__PURE__ */ jsxs21(Fragment, { children: [
|
|
1427
|
-
isLast ? /* @__PURE__ */
|
|
1428
|
-
!isLast && /* @__PURE__ */
|
|
1490
|
+
isLast ? /* @__PURE__ */ jsx30("span", { className: current2, "aria-current": "page", children: item3.label }) : item3.href ? /* @__PURE__ */ jsx30("a", { className: crumb2, href: item3.href, children: item3.label }) : /* @__PURE__ */ jsx30("span", { className: crumb2, children: item3.label }),
|
|
1491
|
+
!isLast && /* @__PURE__ */ jsx30("span", { className: separator2, children: /* @__PURE__ */ jsx30(ChevronRightIcon, { size: 14 }) })
|
|
1429
1492
|
] }, key);
|
|
1430
1493
|
}) });
|
|
1431
1494
|
}
|
|
1432
1495
|
|
|
1433
1496
|
// src/components/icons/chevron-left/index.tsx
|
|
1434
|
-
import { jsx as
|
|
1497
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1435
1498
|
function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
1436
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ jsx31(
|
|
1437
1500
|
"svg",
|
|
1438
1501
|
{
|
|
1439
1502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1447,13 +1510,13 @@ function ChevronLeftIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
1447
1510
|
strokeLinejoin: "round",
|
|
1448
1511
|
"aria-hidden": "true",
|
|
1449
1512
|
...rest,
|
|
1450
|
-
children: /* @__PURE__ */
|
|
1513
|
+
children: /* @__PURE__ */ jsx31("path", { d: "m15 18-6-6 6-6" })
|
|
1451
1514
|
}
|
|
1452
1515
|
);
|
|
1453
1516
|
}
|
|
1454
1517
|
|
|
1455
1518
|
// src/components/pagination/use-styles.ts
|
|
1456
|
-
import { useMemo as
|
|
1519
|
+
import { useMemo as useMemo21 } from "react";
|
|
1457
1520
|
|
|
1458
1521
|
// src/components/pagination/use-styles.css.ts
|
|
1459
1522
|
var ellipsis = "use-styles_ellipsis__1azgzoh3";
|
|
@@ -1463,9 +1526,9 @@ var pageBtn = "use-styles_pageBtn__1azgzoh1";
|
|
|
1463
1526
|
var root17 = "use-styles_root__1azgzoh0";
|
|
1464
1527
|
|
|
1465
1528
|
// src/components/pagination/use-styles.ts
|
|
1466
|
-
function
|
|
1529
|
+
function useStyles20() {
|
|
1467
1530
|
const { themeClass } = useTheme();
|
|
1468
|
-
return
|
|
1531
|
+
return useMemo21(
|
|
1469
1532
|
() => ({
|
|
1470
1533
|
root: [themeClass, root17].filter(Boolean).join(" "),
|
|
1471
1534
|
pageBtnFor: (active2) => [pageBtn, active2 && pageActive].filter(Boolean).join(" "),
|
|
@@ -1477,7 +1540,7 @@ function useStyles19() {
|
|
|
1477
1540
|
}
|
|
1478
1541
|
|
|
1479
1542
|
// src/components/pagination/index.tsx
|
|
1480
|
-
import { jsx as
|
|
1543
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1481
1544
|
function buildItems(count, page, siblingCount) {
|
|
1482
1545
|
const total = Math.max(1, count);
|
|
1483
1546
|
const first = 1;
|
|
@@ -1492,13 +1555,13 @@ function buildItems(count, page, siblingCount) {
|
|
|
1492
1555
|
return items;
|
|
1493
1556
|
}
|
|
1494
1557
|
function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
1495
|
-
const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } =
|
|
1558
|
+
const { root: root24, pageBtnFor, ellipsis: ellipsis2, nav: nav2 } = useStyles20();
|
|
1496
1559
|
const total = Math.max(1, count);
|
|
1497
1560
|
const current2 = Math.min(Math.max(1, page), total);
|
|
1498
1561
|
const items = buildItems(total, current2, siblingCount);
|
|
1499
1562
|
const go = (n) => onChange?.(Math.min(Math.max(1, n), total));
|
|
1500
1563
|
return /* @__PURE__ */ jsxs22("nav", { className: root24, "aria-label": "Pagination", children: [
|
|
1501
|
-
/* @__PURE__ */
|
|
1564
|
+
/* @__PURE__ */ jsx32(
|
|
1502
1565
|
"button",
|
|
1503
1566
|
{
|
|
1504
1567
|
type: "button",
|
|
@@ -1506,14 +1569,14 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1506
1569
|
"aria-label": "Previous page",
|
|
1507
1570
|
disabled: current2 <= 1,
|
|
1508
1571
|
onClick: () => go(current2 - 1),
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx32(ChevronLeftIcon, { size: 18 })
|
|
1510
1573
|
}
|
|
1511
1574
|
),
|
|
1512
1575
|
items.map(
|
|
1513
1576
|
(item3, index) => item3 === "ellipsis" ? (
|
|
1514
1577
|
// biome-ignore lint/suspicious/noArrayIndexKey: ellipsis position is stable per render
|
|
1515
|
-
/* @__PURE__ */
|
|
1516
|
-
) : /* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ jsx32("span", { className: ellipsis2, children: "\u2026" }, `ellipsis-${index}`)
|
|
1579
|
+
) : /* @__PURE__ */ jsx32(
|
|
1517
1580
|
"button",
|
|
1518
1581
|
{
|
|
1519
1582
|
type: "button",
|
|
@@ -1525,7 +1588,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1525
1588
|
item3
|
|
1526
1589
|
)
|
|
1527
1590
|
),
|
|
1528
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ jsx32(
|
|
1529
1592
|
"button",
|
|
1530
1593
|
{
|
|
1531
1594
|
type: "button",
|
|
@@ -1533,7 +1596,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1533
1596
|
"aria-label": "Next page",
|
|
1534
1597
|
disabled: current2 >= total,
|
|
1535
1598
|
onClick: () => go(current2 + 1),
|
|
1536
|
-
children: /* @__PURE__ */
|
|
1599
|
+
children: /* @__PURE__ */ jsx32(ChevronRightIcon, { size: 18 })
|
|
1537
1600
|
}
|
|
1538
1601
|
)
|
|
1539
1602
|
] });
|
|
@@ -1543,7 +1606,7 @@ function Pagination({ count, page = 1, onChange, siblingCount = 1 }) {
|
|
|
1543
1606
|
import { Fragment as Fragment2 } from "react";
|
|
1544
1607
|
|
|
1545
1608
|
// src/components/stepper/use-styles.ts
|
|
1546
|
-
import { useMemo as
|
|
1609
|
+
import { useMemo as useMemo22 } from "react";
|
|
1547
1610
|
|
|
1548
1611
|
// src/components/stepper/use-styles.css.ts
|
|
1549
1612
|
var connector = "use-styles_connector__79pt4e7";
|
|
@@ -1556,9 +1619,9 @@ var root18 = "use-styles_root__79pt4e0";
|
|
|
1556
1619
|
var step = "use-styles_step__79pt4e1";
|
|
1557
1620
|
|
|
1558
1621
|
// src/components/stepper/use-styles.ts
|
|
1559
|
-
function
|
|
1622
|
+
function useStyles21({ className }) {
|
|
1560
1623
|
const { themeClass } = useTheme();
|
|
1561
|
-
return
|
|
1624
|
+
return useMemo22(() => {
|
|
1562
1625
|
const root24 = [themeClass, root18, className].filter(Boolean).join(" ");
|
|
1563
1626
|
const markerFor = (state) => [
|
|
1564
1627
|
marker,
|
|
@@ -1571,27 +1634,27 @@ function useStyles20({ className }) {
|
|
|
1571
1634
|
}
|
|
1572
1635
|
|
|
1573
1636
|
// src/components/stepper/index.tsx
|
|
1574
|
-
import { jsx as
|
|
1637
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1575
1638
|
function Stepper({ steps, active: active2 = 0, className, ...rest }) {
|
|
1576
|
-
const { root: root24, step: step2, connector: connector2, markerFor, labelFor } =
|
|
1577
|
-
return /* @__PURE__ */
|
|
1639
|
+
const { root: root24, step: step2, connector: connector2, markerFor, labelFor } = useStyles21({ className });
|
|
1640
|
+
return /* @__PURE__ */ jsx33("div", { className: root24, ...rest, children: steps.map((s, index) => {
|
|
1578
1641
|
const state = index < active2 ? "done" : index === active2 ? "active" : "upcoming";
|
|
1579
1642
|
const isActive = state === "active";
|
|
1580
1643
|
return (
|
|
1581
1644
|
// biome-ignore lint/suspicious/noArrayIndexKey: steps are a static, ordered list with no stable id.
|
|
1582
1645
|
/* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
1583
1646
|
/* @__PURE__ */ jsxs23("div", { className: step2, "aria-current": isActive ? "step" : void 0, children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1647
|
+
/* @__PURE__ */ jsx33("span", { className: markerFor(state), children: state === "done" ? /* @__PURE__ */ jsx33(CheckIcon, { size: 14 }) : index + 1 }),
|
|
1648
|
+
/* @__PURE__ */ jsx33("span", { className: labelFor(isActive), children: s.label })
|
|
1586
1649
|
] }),
|
|
1587
|
-
index < steps.length - 1 && /* @__PURE__ */
|
|
1650
|
+
index < steps.length - 1 && /* @__PURE__ */ jsx33("span", { "data-part": "connector", className: connector2 })
|
|
1588
1651
|
] }, index)
|
|
1589
1652
|
);
|
|
1590
1653
|
}) });
|
|
1591
1654
|
}
|
|
1592
1655
|
|
|
1593
1656
|
// src/components/tabs/use-styles.ts
|
|
1594
|
-
import { useMemo as
|
|
1657
|
+
import { useMemo as useMemo23 } from "react";
|
|
1595
1658
|
|
|
1596
1659
|
// src/components/tabs/use-styles.css.ts
|
|
1597
1660
|
var root19 = "use-styles_root__1l4m7t40";
|
|
@@ -1599,9 +1662,9 @@ var tab = "use-styles_tab__1l4m7t41";
|
|
|
1599
1662
|
var tabActive = "use-styles_tabActive__1l4m7t42";
|
|
1600
1663
|
|
|
1601
1664
|
// src/components/tabs/use-styles.ts
|
|
1602
|
-
function
|
|
1665
|
+
function useStyles22() {
|
|
1603
1666
|
const { themeClass } = useTheme();
|
|
1604
|
-
return
|
|
1667
|
+
return useMemo23(() => {
|
|
1605
1668
|
const root24 = [themeClass, root19].filter(Boolean).join(" ");
|
|
1606
1669
|
const tabClass = (active2) => [tab, active2 && tabActive].filter(Boolean).join(" ");
|
|
1607
1670
|
return { root: root24, tab, tabClass };
|
|
@@ -1609,12 +1672,12 @@ function useStyles21() {
|
|
|
1609
1672
|
}
|
|
1610
1673
|
|
|
1611
1674
|
// src/components/tabs/index.tsx
|
|
1612
|
-
import { jsx as
|
|
1675
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1613
1676
|
function Tabs({ items, value, onChange }) {
|
|
1614
|
-
const { root: root24, tabClass } =
|
|
1615
|
-
return /* @__PURE__ */
|
|
1677
|
+
const { root: root24, tabClass } = useStyles22();
|
|
1678
|
+
return /* @__PURE__ */ jsx34("div", { role: "tablist", className: root24, children: items.map((item3) => {
|
|
1616
1679
|
const active2 = item3.value === value;
|
|
1617
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx34(
|
|
1618
1681
|
"button",
|
|
1619
1682
|
{
|
|
1620
1683
|
type: "button",
|
|
@@ -1638,7 +1701,7 @@ import {
|
|
|
1638
1701
|
} from "react";
|
|
1639
1702
|
|
|
1640
1703
|
// src/components/menu/use-styles.ts
|
|
1641
|
-
import { useMemo as
|
|
1704
|
+
import { useMemo as useMemo24 } from "react";
|
|
1642
1705
|
|
|
1643
1706
|
// src/components/menu/use-styles.css.ts
|
|
1644
1707
|
var danger = "use-styles_danger__1uyxaj3";
|
|
@@ -1647,9 +1710,9 @@ var list = "use-styles_list__1uyxaj1 surfaces_panelSurface__6hs0fg1";
|
|
|
1647
1710
|
var wrapper3 = "use-styles_wrapper__1uyxaj0";
|
|
1648
1711
|
|
|
1649
1712
|
// src/components/menu/use-styles.ts
|
|
1650
|
-
function
|
|
1713
|
+
function useStyles23() {
|
|
1651
1714
|
const { themeClass } = useTheme();
|
|
1652
|
-
return
|
|
1715
|
+
return useMemo24(
|
|
1653
1716
|
() => ({
|
|
1654
1717
|
wrapper: [themeClass, wrapper3].filter(Boolean).join(" "),
|
|
1655
1718
|
list,
|
|
@@ -1661,13 +1724,13 @@ function useStyles22() {
|
|
|
1661
1724
|
}
|
|
1662
1725
|
|
|
1663
1726
|
// src/components/menu/index.tsx
|
|
1664
|
-
import { jsx as
|
|
1727
|
+
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1665
1728
|
function assignRef(ref, value) {
|
|
1666
1729
|
if (typeof ref === "function") ref(value);
|
|
1667
1730
|
else if (ref) ref.current = value;
|
|
1668
1731
|
}
|
|
1669
1732
|
function Menu({ trigger: trigger2, items }) {
|
|
1670
|
-
const { wrapper: wrapper4, list: list2, item: item3, dangerItem } =
|
|
1733
|
+
const { wrapper: wrapper4, list: list2, item: item3, dangerItem } = useStyles23();
|
|
1671
1734
|
const [open, setOpen] = useState7(false);
|
|
1672
1735
|
const rootRef = useRef3(null);
|
|
1673
1736
|
const listRef = useRef3(null);
|
|
@@ -1750,7 +1813,7 @@ function Menu({ trigger: trigger2, items }) {
|
|
|
1750
1813
|
});
|
|
1751
1814
|
return /* @__PURE__ */ jsxs24("div", { ref: rootRef, className: wrapper4, children: [
|
|
1752
1815
|
clonedTrigger,
|
|
1753
|
-
open && /* @__PURE__ */
|
|
1816
|
+
open && /* @__PURE__ */ jsx35("div", { ref: listRef, role: "menu", className: list2, onKeyDown: onMenuKeyDown, children: items.map((entry, index) => /* @__PURE__ */ jsx35(
|
|
1754
1817
|
"button",
|
|
1755
1818
|
{
|
|
1756
1819
|
type: "button",
|
|
@@ -1777,24 +1840,22 @@ import {
|
|
|
1777
1840
|
import { createPortal } from "react-dom";
|
|
1778
1841
|
|
|
1779
1842
|
// src/components/dialog/use-styles.ts
|
|
1780
|
-
import { useMemo as
|
|
1843
|
+
import { useMemo as useMemo25 } from "react";
|
|
1781
1844
|
|
|
1782
1845
|
// src/components/dialog/use-styles.css.ts
|
|
1783
|
-
var actions = "use-
|
|
1784
|
-
var
|
|
1846
|
+
var actions = "use-styles_actions__5tstu83";
|
|
1847
|
+
var body2 = "use-styles_body__5tstu82";
|
|
1785
1848
|
var overlay = "use-styles_overlay__5tstu80";
|
|
1786
1849
|
var surface = "use-styles_surface__5tstu81";
|
|
1787
|
-
var titleText2 = "use-styles_titleText__5tstu82";
|
|
1788
1850
|
|
|
1789
1851
|
// src/components/dialog/use-styles.ts
|
|
1790
|
-
function
|
|
1852
|
+
function useStyles24() {
|
|
1791
1853
|
const { themeClass } = useTheme();
|
|
1792
|
-
return
|
|
1854
|
+
return useMemo25(
|
|
1793
1855
|
() => ({
|
|
1794
1856
|
overlay: [themeClass, overlay].filter(Boolean).join(" "),
|
|
1795
1857
|
surface,
|
|
1796
|
-
|
|
1797
|
-
body: body3,
|
|
1858
|
+
body: body2,
|
|
1798
1859
|
actions
|
|
1799
1860
|
}),
|
|
1800
1861
|
[themeClass]
|
|
@@ -1802,10 +1863,10 @@ function useStyles23() {
|
|
|
1802
1863
|
}
|
|
1803
1864
|
|
|
1804
1865
|
// src/components/dialog/index.tsx
|
|
1805
|
-
import { jsx as
|
|
1866
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1806
1867
|
var FOCUSABLE = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1807
1868
|
function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
1808
|
-
const { overlay: overlay2, surface: surface2,
|
|
1869
|
+
const { overlay: overlay2, surface: surface2, body: body3, actions: actionsClass } = useStyles24();
|
|
1809
1870
|
const surfaceRef = useRef4(null);
|
|
1810
1871
|
const previouslyFocused = useRef4(null);
|
|
1811
1872
|
const generatedId = useId4();
|
|
@@ -1848,6 +1909,7 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1848
1909
|
}
|
|
1849
1910
|
const first = focusable[0];
|
|
1850
1911
|
const last = focusable[focusable.length - 1];
|
|
1912
|
+
if (!first || !last) return;
|
|
1851
1913
|
const active2 = document.activeElement;
|
|
1852
1914
|
if (event.shiftKey) {
|
|
1853
1915
|
if (active2 === first || active2 === surfaceEl) {
|
|
@@ -1861,7 +1923,7 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1861
1923
|
};
|
|
1862
1924
|
return createPortal(
|
|
1863
1925
|
// biome-ignore lint/a11y/useKeyWithClickEvents: ESC handled by a document keydown listener.
|
|
1864
|
-
/* @__PURE__ */
|
|
1926
|
+
/* @__PURE__ */ jsx36("div", { className: overlay2, "data-testid": "dialog-overlay", onClick: onClose, children: /* @__PURE__ */ jsxs25(
|
|
1865
1927
|
"div",
|
|
1866
1928
|
{
|
|
1867
1929
|
ref: surfaceRef,
|
|
@@ -1873,9 +1935,9 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1873
1935
|
onClick: stop,
|
|
1874
1936
|
onKeyDown: onSurfaceKeyDown,
|
|
1875
1937
|
children: [
|
|
1876
|
-
title != null && /* @__PURE__ */
|
|
1877
|
-
children != null && /* @__PURE__ */
|
|
1878
|
-
actions3 != null && /* @__PURE__ */
|
|
1938
|
+
title != null && /* @__PURE__ */ jsx36(Typography, { variant: "h3", as: "h2", id: titleId, children: title }),
|
|
1939
|
+
children != null && /* @__PURE__ */ jsx36("div", { className: body3, children: /* @__PURE__ */ jsx36(Typography, { variant: "body", color: "fg2", children }) }),
|
|
1940
|
+
actions3 != null && /* @__PURE__ */ jsx36("div", { className: actionsClass, children: actions3 })
|
|
1879
1941
|
]
|
|
1880
1942
|
}
|
|
1881
1943
|
) }),
|
|
@@ -1887,7 +1949,7 @@ function Dialog({ open, onClose, title, actions: actions3, children }) {
|
|
|
1887
1949
|
import { createPortal as createPortal2 } from "react-dom";
|
|
1888
1950
|
|
|
1889
1951
|
// src/components/snackbar/use-styles.ts
|
|
1890
|
-
import { useMemo as
|
|
1952
|
+
import { useMemo as useMemo26 } from "react";
|
|
1891
1953
|
|
|
1892
1954
|
// src/components/snackbar/use-styles.css.ts
|
|
1893
1955
|
var closeBtn = "use-styles_closeBtn__ihzsep2";
|
|
@@ -1895,9 +1957,9 @@ var message = "use-styles_message__ihzsep1";
|
|
|
1895
1957
|
var root20 = "use-styles_root__ihzsep0 surfaces_inkySurface__6hs0fg2";
|
|
1896
1958
|
|
|
1897
1959
|
// src/components/snackbar/use-styles.ts
|
|
1898
|
-
function
|
|
1960
|
+
function useStyles25() {
|
|
1899
1961
|
const { themeClass } = useTheme();
|
|
1900
|
-
return
|
|
1962
|
+
return useMemo26(
|
|
1901
1963
|
() => ({
|
|
1902
1964
|
root: [themeClass, root20].filter(Boolean).join(" "),
|
|
1903
1965
|
message,
|
|
@@ -1908,22 +1970,22 @@ function useStyles24() {
|
|
|
1908
1970
|
}
|
|
1909
1971
|
|
|
1910
1972
|
// src/components/snackbar/index.tsx
|
|
1911
|
-
import { jsx as
|
|
1973
|
+
import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1912
1974
|
function Snackbar({ open, message: message2, action, onClose }) {
|
|
1913
|
-
const { root: root24, message: messageClass, closeBtn: closeBtn2 } =
|
|
1975
|
+
const { root: root24, message: messageClass, closeBtn: closeBtn2 } = useStyles25();
|
|
1914
1976
|
if (!open || typeof document === "undefined") return null;
|
|
1915
1977
|
return createPortal2(
|
|
1916
1978
|
/* @__PURE__ */ jsxs26("div", { role: "status", className: root24, children: [
|
|
1917
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ jsx37("span", { className: messageClass, children: message2 }),
|
|
1918
1980
|
action,
|
|
1919
|
-
onClose && /* @__PURE__ */
|
|
1981
|
+
onClose && /* @__PURE__ */ jsx37("button", { type: "button", "aria-label": "Close", className: closeBtn2, onClick: onClose, children: /* @__PURE__ */ jsx37(XIcon, { size: 18 }) })
|
|
1920
1982
|
] }),
|
|
1921
1983
|
document.body
|
|
1922
1984
|
);
|
|
1923
1985
|
}
|
|
1924
1986
|
|
|
1925
1987
|
// src/components/table/use-styles.ts
|
|
1926
|
-
import { useMemo as
|
|
1988
|
+
import { useMemo as useMemo27 } from "react";
|
|
1927
1989
|
|
|
1928
1990
|
// src/components/table/use-styles.css.ts
|
|
1929
1991
|
var alignRight = "use-styles_alignRight__1n2cz6i3";
|
|
@@ -1932,9 +1994,9 @@ var td = "use-styles_td__1n2cz6i2";
|
|
|
1932
1994
|
var th = "use-styles_th__1n2cz6i1";
|
|
1933
1995
|
|
|
1934
1996
|
// src/components/table/use-styles.ts
|
|
1935
|
-
function
|
|
1997
|
+
function useStyles26({ className }) {
|
|
1936
1998
|
const { themeClass } = useTheme();
|
|
1937
|
-
const root24 =
|
|
1999
|
+
const root24 = useMemo27(
|
|
1938
2000
|
() => [themeClass, root21, className].filter(Boolean).join(" "),
|
|
1939
2001
|
[themeClass, className]
|
|
1940
2002
|
);
|
|
@@ -1942,7 +2004,7 @@ function useStyles25({ className }) {
|
|
|
1942
2004
|
}
|
|
1943
2005
|
|
|
1944
2006
|
// src/components/table/index.tsx
|
|
1945
|
-
import { jsx as
|
|
2007
|
+
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1946
2008
|
function Table({
|
|
1947
2009
|
columns,
|
|
1948
2010
|
rows,
|
|
@@ -1950,17 +2012,17 @@ function Table({
|
|
|
1950
2012
|
className,
|
|
1951
2013
|
...rest
|
|
1952
2014
|
}) {
|
|
1953
|
-
const { root: root24, th: th2, td: td2, alignRight: alignRight2 } =
|
|
2015
|
+
const { root: root24, th: th2, td: td2, alignRight: alignRight2 } = useStyles26({ className });
|
|
1954
2016
|
const headClass = (column) => column.align === "right" ? `${th2} ${alignRight2}` : th2;
|
|
1955
2017
|
const cellClass = (column) => column.align === "right" ? `${td2} ${alignRight2}` : td2;
|
|
1956
2018
|
return /* @__PURE__ */ jsxs27("table", { className: root24, ...rest, children: [
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx38("thead", { children: /* @__PURE__ */ jsx38("tr", { children: columns.map((column) => /* @__PURE__ */ jsx38("th", { className: headClass(column), children: column.header }, column.key)) }) }),
|
|
2020
|
+
/* @__PURE__ */ jsx38("tbody", { children: rows.map((row, index) => /* @__PURE__ */ jsx38("tr", { children: columns.map((column) => /* @__PURE__ */ jsx38("td", { className: cellClass(column), children: column.render ? column.render(row) : String(row[column.key]) }, column.key)) }, getRowKey ? getRowKey(row, index) : index)) })
|
|
1959
2021
|
] });
|
|
1960
2022
|
}
|
|
1961
2023
|
|
|
1962
2024
|
// src/components/app-bar/use-styles.ts
|
|
1963
|
-
import { useMemo as
|
|
2025
|
+
import { useMemo as useMemo28 } from "react";
|
|
1964
2026
|
|
|
1965
2027
|
// src/components/app-bar/use-styles.css.ts
|
|
1966
2028
|
var actions2 = "use-styles_actions__1h133nh2";
|
|
@@ -1968,9 +2030,9 @@ var brand = "use-styles_brand__1h133nh1";
|
|
|
1968
2030
|
var root22 = "use-styles_root__1h133nh0";
|
|
1969
2031
|
|
|
1970
2032
|
// src/components/app-bar/use-styles.ts
|
|
1971
|
-
function
|
|
2033
|
+
function useStyles27({ className }) {
|
|
1972
2034
|
const { themeClass } = useTheme();
|
|
1973
|
-
const root24 =
|
|
2035
|
+
const root24 = useMemo28(
|
|
1974
2036
|
() => [themeClass, root22, className].filter(Boolean).join(" "),
|
|
1975
2037
|
[themeClass, className]
|
|
1976
2038
|
);
|
|
@@ -1978,18 +2040,18 @@ function useStyles26({ className }) {
|
|
|
1978
2040
|
}
|
|
1979
2041
|
|
|
1980
2042
|
// src/components/app-bar/index.tsx
|
|
1981
|
-
import { jsx as
|
|
2043
|
+
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1982
2044
|
function AppBar({ brand: brand2, actions: actions3, className, children, ...rest }) {
|
|
1983
|
-
const styles =
|
|
2045
|
+
const styles = useStyles27({ className });
|
|
1984
2046
|
return /* @__PURE__ */ jsxs28("header", { className: styles.root, ...rest, children: [
|
|
1985
|
-
brand2 !== void 0 ? /* @__PURE__ */
|
|
2047
|
+
brand2 !== void 0 ? /* @__PURE__ */ jsx39("div", { className: styles.brand, children: brand2 }) : null,
|
|
1986
2048
|
children,
|
|
1987
|
-
actions3 !== void 0 ? /* @__PURE__ */
|
|
2049
|
+
actions3 !== void 0 ? /* @__PURE__ */ jsx39("div", { className: styles.actions, children: actions3 }) : null
|
|
1988
2050
|
] });
|
|
1989
2051
|
}
|
|
1990
2052
|
|
|
1991
2053
|
// src/components/list-item/use-styles.ts
|
|
1992
|
-
import { useMemo as
|
|
2054
|
+
import { useMemo as useMemo29 } from "react";
|
|
1993
2055
|
|
|
1994
2056
|
// src/components/list-item/use-styles.css.ts
|
|
1995
2057
|
var content2 = "use-styles_content__kbreq13";
|
|
@@ -1999,9 +2061,12 @@ var selected2 = "use-styles_selected__kbreq11";
|
|
|
1999
2061
|
var trailing = "use-styles_trailing__kbreq14";
|
|
2000
2062
|
|
|
2001
2063
|
// src/components/list-item/use-styles.ts
|
|
2002
|
-
function
|
|
2064
|
+
function useStyles28({
|
|
2065
|
+
selected: selected3,
|
|
2066
|
+
className
|
|
2067
|
+
}) {
|
|
2003
2068
|
const { themeClass } = useTheme();
|
|
2004
|
-
const root24 =
|
|
2069
|
+
const root24 = useMemo29(
|
|
2005
2070
|
() => [themeClass, root23, selected3 && selected2, className].filter(Boolean).join(" "),
|
|
2006
2071
|
[themeClass, selected3, className]
|
|
2007
2072
|
);
|
|
@@ -2009,7 +2074,7 @@ function useStyles27({ selected: selected3, className }) {
|
|
|
2009
2074
|
}
|
|
2010
2075
|
|
|
2011
2076
|
// src/components/list-item/index.tsx
|
|
2012
|
-
import { jsx as
|
|
2077
|
+
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2013
2078
|
function ListItem({
|
|
2014
2079
|
leading: leading2,
|
|
2015
2080
|
trailing: trailing2,
|
|
@@ -2018,18 +2083,18 @@ function ListItem({
|
|
|
2018
2083
|
children,
|
|
2019
2084
|
...rest
|
|
2020
2085
|
}) {
|
|
2021
|
-
const styles =
|
|
2086
|
+
const styles = useStyles28({ selected: selected3, className });
|
|
2022
2087
|
return /* @__PURE__ */ jsxs29("div", { className: styles.root, ...rest, children: [
|
|
2023
|
-
leading2 != null && /* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
trailing2 != null && /* @__PURE__ */
|
|
2088
|
+
leading2 != null && /* @__PURE__ */ jsx40("span", { className: styles.leading, children: leading2 }),
|
|
2089
|
+
/* @__PURE__ */ jsx40("span", { className: styles.content, children }),
|
|
2090
|
+
trailing2 != null && /* @__PURE__ */ jsx40("span", { className: styles.trailing, children: trailing2 })
|
|
2026
2091
|
] });
|
|
2027
2092
|
}
|
|
2028
2093
|
|
|
2029
2094
|
// src/components/icons/chevron-up/index.tsx
|
|
2030
|
-
import { jsx as
|
|
2095
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2031
2096
|
function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2032
|
-
return /* @__PURE__ */
|
|
2097
|
+
return /* @__PURE__ */ jsx41(
|
|
2033
2098
|
"svg",
|
|
2034
2099
|
{
|
|
2035
2100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2043,13 +2108,13 @@ function ChevronUpIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2043
2108
|
strokeLinejoin: "round",
|
|
2044
2109
|
"aria-hidden": "true",
|
|
2045
2110
|
...rest,
|
|
2046
|
-
children: /* @__PURE__ */
|
|
2111
|
+
children: /* @__PURE__ */ jsx41("path", { d: "m18 15-6-6-6 6" })
|
|
2047
2112
|
}
|
|
2048
2113
|
);
|
|
2049
2114
|
}
|
|
2050
2115
|
|
|
2051
2116
|
// src/components/icons/search/index.tsx
|
|
2052
|
-
import { jsx as
|
|
2117
|
+
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2053
2118
|
function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2054
2119
|
return /* @__PURE__ */ jsxs30(
|
|
2055
2120
|
"svg",
|
|
@@ -2066,15 +2131,15 @@ function SearchIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2066
2131
|
"aria-hidden": "true",
|
|
2067
2132
|
...rest,
|
|
2068
2133
|
children: [
|
|
2069
|
-
/* @__PURE__ */
|
|
2070
|
-
/* @__PURE__ */
|
|
2134
|
+
/* @__PURE__ */ jsx42("circle", { cx: "11", cy: "11", r: "8" }),
|
|
2135
|
+
/* @__PURE__ */ jsx42("path", { d: "m21 21-4.3-4.3" })
|
|
2071
2136
|
]
|
|
2072
2137
|
}
|
|
2073
2138
|
);
|
|
2074
2139
|
}
|
|
2075
2140
|
|
|
2076
2141
|
// src/components/icons/plus/index.tsx
|
|
2077
|
-
import { jsx as
|
|
2142
|
+
import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2078
2143
|
function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2079
2144
|
return /* @__PURE__ */ jsxs31(
|
|
2080
2145
|
"svg",
|
|
@@ -2091,17 +2156,17 @@ function PlusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2091
2156
|
"aria-hidden": "true",
|
|
2092
2157
|
...rest,
|
|
2093
2158
|
children: [
|
|
2094
|
-
/* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ jsx43("path", { d: "M5 12h14" }),
|
|
2160
|
+
/* @__PURE__ */ jsx43("path", { d: "M12 5v14" })
|
|
2096
2161
|
]
|
|
2097
2162
|
}
|
|
2098
2163
|
);
|
|
2099
2164
|
}
|
|
2100
2165
|
|
|
2101
2166
|
// src/components/icons/minus/index.tsx
|
|
2102
|
-
import { jsx as
|
|
2167
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2103
2168
|
function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2104
|
-
return /* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ jsx44(
|
|
2105
2170
|
"svg",
|
|
2106
2171
|
{
|
|
2107
2172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2115,13 +2180,13 @@ function MinusIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2115
2180
|
strokeLinejoin: "round",
|
|
2116
2181
|
"aria-hidden": "true",
|
|
2117
2182
|
...rest,
|
|
2118
|
-
children: /* @__PURE__ */
|
|
2183
|
+
children: /* @__PURE__ */ jsx44("path", { d: "M5 12h14" })
|
|
2119
2184
|
}
|
|
2120
2185
|
);
|
|
2121
2186
|
}
|
|
2122
2187
|
|
|
2123
2188
|
// src/components/icons/more-horizontal/index.tsx
|
|
2124
|
-
import { jsx as
|
|
2189
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2125
2190
|
function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
2126
2191
|
return /* @__PURE__ */ jsxs32(
|
|
2127
2192
|
"svg",
|
|
@@ -2138,16 +2203,13 @@ function MoreHorizontalIcon({ size: size3 = 20, strokeWidth = 1.75, ...rest }) {
|
|
|
2138
2203
|
"aria-hidden": "true",
|
|
2139
2204
|
...rest,
|
|
2140
2205
|
children: [
|
|
2141
|
-
/* @__PURE__ */
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ jsx45("circle", { cx: "12", cy: "12", r: "1" }),
|
|
2207
|
+
/* @__PURE__ */ jsx45("circle", { cx: "19", cy: "12", r: "1" }),
|
|
2208
|
+
/* @__PURE__ */ jsx45("circle", { cx: "5", cy: "12", r: "1" })
|
|
2144
2209
|
]
|
|
2145
2210
|
}
|
|
2146
2211
|
);
|
|
2147
2212
|
}
|
|
2148
|
-
|
|
2149
|
-
// src/theme/typography.css.ts
|
|
2150
|
-
var text = { eyebrow: "typography_text_eyebrow__1wmlzy0", display: "typography_text_display__1wmlzy1", h1: "typography_text_h1__1wmlzy2", h2: "typography_text_h2__1wmlzy3", h3: "typography_text_h3__1wmlzy4", h4: "typography_text_h4__1wmlzy5", body: "typography_text_body__1wmlzy6", lead: "typography_text_lead__1wmlzy7", small: "typography_text_small__1wmlzy8", caption: "typography_text_caption__1wmlzy9", code: "typography_text_code__1wmlzya", blackletter: "typography_text_blackletter__1wmlzyb" };
|
|
2151
2213
|
export {
|
|
2152
2214
|
Accordion,
|
|
2153
2215
|
Alert,
|
|
@@ -2192,6 +2254,7 @@ export {
|
|
|
2192
2254
|
ThemeProvider,
|
|
2193
2255
|
Tooltip,
|
|
2194
2256
|
TriangleAlertIcon,
|
|
2257
|
+
Typography,
|
|
2195
2258
|
XIcon,
|
|
2196
2259
|
colorVars,
|
|
2197
2260
|
modeNames,
|