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