@flipova/foundation 1.13.0 → 1.14.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.
@@ -0,0 +1,1500 @@
1
+ 'use strict';
2
+
3
+ var chunkM3YLASM2_js = require('../chunk-M3YLASM2.js');
4
+ var chunkASZEP37D_js = require('../chunk-ASZEP37D.js');
5
+ var React = require('react');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var LucideIcons = require('lucide-react');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var React__default = /*#__PURE__*/_interopDefault(React);
30
+ var LucideIcons__namespace = /*#__PURE__*/_interopNamespace(LucideIcons);
31
+
32
+ // foundation/web/utils/themeUtils.ts
33
+ var resolveWebSpacing = (val) => {
34
+ if (val === void 0 || val === null) return void 0;
35
+ if (typeof val === "number") return `${val}px`;
36
+ if (typeof val === "string" && val in chunkASZEP37D_js.spacing) return `${chunkASZEP37D_js.spacing[val]}px`;
37
+ const namedMap = {
38
+ xs: 4,
39
+ sm: 8,
40
+ md: 16,
41
+ lg: 24,
42
+ xl: 32,
43
+ xxl: 48
44
+ };
45
+ if (typeof val === "string" && val in namedMap) return `${namedMap[val]}px`;
46
+ return val;
47
+ };
48
+ var resolveWebRadius = (val) => {
49
+ if (val === void 0 || val === null) return void 0;
50
+ if (typeof val === "number") return `${val}px`;
51
+ if (typeof val === "string" && val in chunkASZEP37D_js.radii) return `${chunkASZEP37D_js.radii[val]}px`;
52
+ return val;
53
+ };
54
+ var resolveWebColor = (theme, colorKey) => {
55
+ if (!colorKey) return theme.foreground;
56
+ if (colorKey === "text" || colorKey === "primaryText") return theme.foreground;
57
+ if (colorKey === "textMuted" || colorKey === "mutedText") return theme.mutedForeground;
58
+ if (colorKey === "surface" || colorKey === "card") return theme.card;
59
+ if (colorKey in theme) {
60
+ const val = theme[colorKey];
61
+ if (typeof val === "string") return val;
62
+ }
63
+ return colorKey;
64
+ };
65
+ var Box = React__default.default.forwardRef(
66
+ ({
67
+ padding,
68
+ p,
69
+ paddingTop,
70
+ pt,
71
+ paddingBottom,
72
+ pb,
73
+ paddingLeft,
74
+ pl,
75
+ paddingRight,
76
+ pr,
77
+ paddingHorizontal,
78
+ px,
79
+ paddingVertical,
80
+ py,
81
+ margin,
82
+ m,
83
+ marginTop,
84
+ mt,
85
+ marginBottom,
86
+ mb,
87
+ borderRadius,
88
+ bg,
89
+ backgroundColor,
90
+ borderWidth,
91
+ borderColor,
92
+ flex,
93
+ width,
94
+ height,
95
+ maxWidth,
96
+ maxHeight,
97
+ display,
98
+ position,
99
+ style,
100
+ children,
101
+ ...rest
102
+ }, ref) => {
103
+ const { theme } = chunkM3YLASM2_js.useTheme();
104
+ const resolvedBg = bg || backgroundColor;
105
+ const finalBg = resolvedBg ? resolveWebColor(theme, resolvedBg) : void 0;
106
+ const finalBorderColor = borderColor ? resolveWebColor(theme, borderColor) : void 0;
107
+ const computedStyle = {
108
+ boxSizing: "border-box",
109
+ padding: resolveWebSpacing(padding ?? p),
110
+ paddingTop: resolveWebSpacing(paddingTop ?? pt ?? paddingVertical ?? py),
111
+ paddingBottom: resolveWebSpacing(paddingBottom ?? pb ?? paddingVertical ?? py),
112
+ paddingLeft: resolveWebSpacing(paddingLeft ?? pl ?? paddingHorizontal ?? px),
113
+ paddingRight: resolveWebSpacing(paddingRight ?? pr ?? paddingHorizontal ?? px),
114
+ margin: resolveWebSpacing(margin ?? m),
115
+ marginTop: resolveWebSpacing(marginTop ?? mt),
116
+ marginBottom: resolveWebSpacing(marginBottom ?? mb),
117
+ borderRadius: resolveWebRadius(borderRadius),
118
+ backgroundColor: finalBg,
119
+ borderWidth: typeof borderWidth === "number" ? `${borderWidth}px` : borderWidth,
120
+ borderColor: finalBorderColor,
121
+ borderStyle: borderWidth || borderColor ? "solid" : void 0,
122
+ flex,
123
+ width,
124
+ height,
125
+ maxWidth,
126
+ maxHeight,
127
+ display,
128
+ position,
129
+ ...style
130
+ };
131
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, style: computedStyle, ...rest, children });
132
+ }
133
+ );
134
+ Box.displayName = "Box";
135
+ var Stack = ({
136
+ gap,
137
+ align,
138
+ justify,
139
+ style,
140
+ children,
141
+ ...rest
142
+ }) => {
143
+ return /* @__PURE__ */ jsxRuntime.jsx(
144
+ Box,
145
+ {
146
+ style: {
147
+ display: "flex",
148
+ flexDirection: "column",
149
+ alignItems: align,
150
+ justifyContent: justify,
151
+ gap: resolveWebSpacing(gap),
152
+ ...style
153
+ },
154
+ ...rest,
155
+ children
156
+ }
157
+ );
158
+ };
159
+ var Inline = ({
160
+ gap,
161
+ align = "center",
162
+ justify,
163
+ wrap = false,
164
+ style,
165
+ children,
166
+ ...rest
167
+ }) => {
168
+ return /* @__PURE__ */ jsxRuntime.jsx(
169
+ Box,
170
+ {
171
+ style: {
172
+ display: "flex",
173
+ flexDirection: "row",
174
+ alignItems: align,
175
+ justifyContent: justify,
176
+ flexWrap: wrap ? "wrap" : "nowrap",
177
+ gap: resolveWebSpacing(gap),
178
+ ...style
179
+ },
180
+ ...rest,
181
+ children
182
+ }
183
+ );
184
+ };
185
+ var Center = ({ style, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
186
+ Box,
187
+ {
188
+ style: {
189
+ display: "flex",
190
+ justifyContent: "center",
191
+ alignItems: "center",
192
+ ...style
193
+ },
194
+ ...rest,
195
+ children
196
+ }
197
+ );
198
+ var Scroll = ({
199
+ direction = "vertical",
200
+ hideScrollbar = false,
201
+ style,
202
+ children,
203
+ ...rest
204
+ }) => {
205
+ const overflowY = direction === "vertical" || direction === "both" ? "auto" : "hidden";
206
+ const overflowX = direction === "horizontal" || direction === "both" ? "auto" : "hidden";
207
+ return /* @__PURE__ */ jsxRuntime.jsx(
208
+ Box,
209
+ {
210
+ style: {
211
+ overflowY,
212
+ overflowX,
213
+ WebkitOverflowScrolling: "touch",
214
+ scrollbarWidth: hideScrollbar ? "none" : void 0,
215
+ msOverflowStyle: hideScrollbar ? "none" : void 0,
216
+ ...style
217
+ },
218
+ ...rest,
219
+ children
220
+ }
221
+ );
222
+ };
223
+ var Divider = ({
224
+ orientation = "horizontal",
225
+ color,
226
+ size = 1,
227
+ style
228
+ }) => {
229
+ const { theme } = chunkM3YLASM2_js.useTheme();
230
+ const borderCol = color ? color in theme ? theme[color] : color : theme.border;
231
+ const isHorizontal = orientation === "horizontal";
232
+ return /* @__PURE__ */ jsxRuntime.jsx(
233
+ "div",
234
+ {
235
+ style: {
236
+ backgroundColor: borderCol,
237
+ width: isHorizontal ? "100%" : typeof size === "number" ? `${size}px` : size,
238
+ height: isHorizontal ? typeof size === "number" ? `${size}px` : size : "100%",
239
+ margin: 0,
240
+ padding: 0,
241
+ border: "none",
242
+ flexShrink: 0,
243
+ ...style
244
+ }
245
+ }
246
+ );
247
+ };
248
+ var Button = ({
249
+ label,
250
+ variant = "primary",
251
+ size = "md",
252
+ loading = false,
253
+ disabled = false,
254
+ fullWidth = false,
255
+ leftIcon,
256
+ rightIcon,
257
+ style,
258
+ children,
259
+ ...rest
260
+ }) => {
261
+ const { theme } = chunkM3YLASM2_js.useTheme();
262
+ const sizeMap = {
263
+ sm: { padding: "4px 12px", fontSize: "13px", height: "32px" },
264
+ md: { padding: "8px 16px", fontSize: "14px", height: "40px" },
265
+ lg: { padding: "12px 24px", fontSize: "16px", height: "48px" }
266
+ };
267
+ const currentSize = sizeMap[size] || sizeMap.md;
268
+ const getVariantStyles = () => {
269
+ switch (variant) {
270
+ case "secondary":
271
+ return {
272
+ backgroundColor: theme.secondary,
273
+ color: theme.secondaryForeground,
274
+ border: "none"
275
+ };
276
+ case "outline":
277
+ return {
278
+ backgroundColor: "transparent",
279
+ color: theme.foreground,
280
+ border: `1px solid ${theme.border}`
281
+ };
282
+ case "ghost":
283
+ return {
284
+ backgroundColor: "transparent",
285
+ color: theme.foreground,
286
+ border: "none"
287
+ };
288
+ case "destructive":
289
+ return {
290
+ backgroundColor: theme.destructive,
291
+ color: theme.destructiveForeground,
292
+ border: "none"
293
+ };
294
+ case "primary":
295
+ default:
296
+ return {
297
+ backgroundColor: theme.primary,
298
+ color: theme.primaryForeground,
299
+ border: "none"
300
+ };
301
+ }
302
+ };
303
+ const variantStyle = getVariantStyles();
304
+ return /* @__PURE__ */ jsxRuntime.jsx(
305
+ "button",
306
+ {
307
+ disabled: disabled || loading,
308
+ style: {
309
+ display: "inline-flex",
310
+ alignItems: "center",
311
+ justifyContent: "center",
312
+ gap: "6px",
313
+ borderRadius: resolveWebRadius("md") || "8px",
314
+ fontWeight: 600,
315
+ fontFamily: "inherit",
316
+ cursor: disabled || loading ? "not-allowed" : "pointer",
317
+ opacity: disabled ? 0.6 : 1,
318
+ transition: "all 0.15s ease-in-out",
319
+ width: fullWidth ? "100%" : "auto",
320
+ ...currentSize,
321
+ ...variantStyle,
322
+ ...style
323
+ },
324
+ ...rest,
325
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
326
+ "span",
327
+ {
328
+ style: {
329
+ width: "16px",
330
+ height: "16px",
331
+ border: "2px solid currentColor",
332
+ borderRightColor: "transparent",
333
+ borderRadius: "50%",
334
+ display: "inline-block",
335
+ animation: "spin 0.6s linear infinite"
336
+ }
337
+ }
338
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
339
+ leftIcon,
340
+ children || label,
341
+ rightIcon
342
+ ] })
343
+ }
344
+ );
345
+ };
346
+ var Text = ({
347
+ variant = "body",
348
+ size,
349
+ weight,
350
+ color = "primary",
351
+ align,
352
+ as,
353
+ style,
354
+ children,
355
+ ...rest
356
+ }) => {
357
+ const { theme } = chunkM3YLASM2_js.useTheme();
358
+ const resolveColor = () => {
359
+ if (color === "primary") return theme.foreground;
360
+ if (color === "secondary") return theme.secondary;
361
+ if (color === "muted") return theme.mutedForeground;
362
+ if (color === "error") return theme.error;
363
+ if (color === "success") return theme.success;
364
+ return resolveWebColor(theme, color);
365
+ };
366
+ const getVariantStyles = () => {
367
+ switch (variant) {
368
+ case "heading":
369
+ return { fontSize: size ? getSize(size) : "24px", fontWeight: 700, Component: as || "h2" };
370
+ case "subheading":
371
+ return { fontSize: size ? getSize(size) : "18px", fontWeight: 600, Component: as || "h3" };
372
+ case "caption":
373
+ return { fontSize: size ? getSize(size) : "12px", fontWeight: 400, Component: as || "span" };
374
+ case "code":
375
+ return { fontSize: size ? getSize(size) : "13px", fontWeight: 400, Component: as || "code" };
376
+ case "label":
377
+ return { fontSize: size ? getSize(size) : "14px", fontWeight: 600, Component: as || "label" };
378
+ case "body":
379
+ default:
380
+ return { fontSize: size ? getSize(size) : "14px", fontWeight: 400, Component: as || "p" };
381
+ }
382
+ };
383
+ const getSize = (s) => {
384
+ const map = {
385
+ xs: "11px",
386
+ sm: "13px",
387
+ md: "15px",
388
+ lg: "18px",
389
+ xl: "24px",
390
+ xxl: "32px"
391
+ };
392
+ return map[s] || "14px";
393
+ };
394
+ const weightMap = {
395
+ light: 300,
396
+ regular: 400,
397
+ medium: 500,
398
+ semibold: 600,
399
+ bold: 700
400
+ };
401
+ const variantInfo = getVariantStyles();
402
+ const Tag = variantInfo.Component;
403
+ return /* @__PURE__ */ jsxRuntime.jsx(
404
+ Tag,
405
+ {
406
+ style: {
407
+ margin: 0,
408
+ padding: 0,
409
+ color: resolveColor(),
410
+ fontSize: variantInfo.fontSize,
411
+ fontWeight: weight ? weightMap[weight] : variantInfo.fontWeight,
412
+ fontFamily: variant === "code" ? "monospace" : "inherit",
413
+ textAlign: align,
414
+ ...style
415
+ },
416
+ ...rest,
417
+ children
418
+ }
419
+ );
420
+ };
421
+ var Card = ({
422
+ padding = "lg",
423
+ borderRadius = "md",
424
+ bordered = true,
425
+ elevation = "none",
426
+ style,
427
+ children,
428
+ ...rest
429
+ }) => {
430
+ const { theme } = chunkM3YLASM2_js.useTheme();
431
+ const paddingVal = resolveWebSpacing(padding) || "16px";
432
+ const radiusVal = resolveWebRadius(borderRadius) || "8px";
433
+ const shadowMap = {
434
+ none: "none",
435
+ sm: "0 1px 3px rgba(0,0,0,0.1)",
436
+ md: "0 4px 6px rgba(0,0,0,0.1)",
437
+ lg: "0 10px 15px rgba(0,0,0,0.1)"
438
+ };
439
+ return /* @__PURE__ */ jsxRuntime.jsx(
440
+ "div",
441
+ {
442
+ style: {
443
+ backgroundColor: theme.card,
444
+ color: theme.foreground,
445
+ padding: paddingVal,
446
+ borderRadius: radiusVal,
447
+ border: bordered ? `1px solid ${theme.border}` : "none",
448
+ boxShadow: shadowMap[elevation],
449
+ boxSizing: "border-box",
450
+ ...style
451
+ },
452
+ ...rest,
453
+ children
454
+ }
455
+ );
456
+ };
457
+ var Badge = ({
458
+ label,
459
+ variant = "primary",
460
+ size = "md",
461
+ style,
462
+ children,
463
+ ...rest
464
+ }) => {
465
+ const { theme } = chunkM3YLASM2_js.useTheme();
466
+ const getVariantStyles = () => {
467
+ switch (variant) {
468
+ case "secondary":
469
+ return { backgroundColor: theme.secondary, color: theme.secondaryForeground, border: "none" };
470
+ case "success":
471
+ return { backgroundColor: theme.success, color: "#ffffff", border: "none" };
472
+ case "warning":
473
+ return { backgroundColor: theme.warning, color: "#ffffff", border: "none" };
474
+ case "error":
475
+ return { backgroundColor: theme.error, color: "#ffffff", border: "none" };
476
+ case "outline":
477
+ return { backgroundColor: "transparent", color: theme.foreground, border: `1px solid ${theme.border}` };
478
+ case "primary":
479
+ default:
480
+ return { backgroundColor: theme.primary, color: theme.primaryForeground, border: "none" };
481
+ }
482
+ };
483
+ const isSmall = size === "sm";
484
+ return /* @__PURE__ */ jsxRuntime.jsx(
485
+ "span",
486
+ {
487
+ style: {
488
+ display: "inline-flex",
489
+ alignItems: "center",
490
+ justifyContent: "center",
491
+ padding: isSmall ? "2px 8px" : "4px 10px",
492
+ fontSize: isSmall ? "11px" : "12px",
493
+ fontWeight: 600,
494
+ borderRadius: "9999px",
495
+ lineHeight: 1,
496
+ whiteSpace: "nowrap",
497
+ ...getVariantStyles(),
498
+ ...style
499
+ },
500
+ ...rest,
501
+ children: children || label
502
+ }
503
+ );
504
+ };
505
+ var Avatar = ({
506
+ src,
507
+ name,
508
+ size = "md",
509
+ shape = "circle",
510
+ style
511
+ }) => {
512
+ const { theme } = chunkM3YLASM2_js.useTheme();
513
+ const getSizePx = () => {
514
+ if (typeof size === "number") return size;
515
+ const map = { sm: 32, md: 40, lg: 56, xl: 72 };
516
+ return map[size] || 40;
517
+ };
518
+ const dim = getSizePx();
519
+ const getInitials = (n) => {
520
+ if (!n) return "?";
521
+ const parts = n.trim().split(" ");
522
+ if (parts.length >= 2) return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
523
+ return n.slice(0, 2).toUpperCase();
524
+ };
525
+ return /* @__PURE__ */ jsxRuntime.jsx(
526
+ "div",
527
+ {
528
+ style: {
529
+ width: `${dim}px`,
530
+ height: `${dim}px`,
531
+ borderRadius: shape === "circle" ? "50%" : "8px",
532
+ backgroundColor: theme.primary,
533
+ color: theme.primaryForeground,
534
+ display: "inline-flex",
535
+ alignItems: "center",
536
+ justifyContent: "center",
537
+ fontWeight: 600,
538
+ fontSize: `${Math.round(dim * 0.4)}px`,
539
+ overflow: "hidden",
540
+ flexShrink: 0,
541
+ ...style
542
+ },
543
+ children: src ? /* @__PURE__ */ jsxRuntime.jsx(
544
+ "img",
545
+ {
546
+ src,
547
+ alt: name || "Avatar",
548
+ style: { width: "100%", height: "100%", objectFit: "cover" }
549
+ }
550
+ ) : getInitials(name)
551
+ }
552
+ );
553
+ };
554
+ var TextInput = ({
555
+ label,
556
+ error,
557
+ helperText,
558
+ leftIcon,
559
+ rightIcon,
560
+ containerStyle,
561
+ style,
562
+ disabled,
563
+ ...rest
564
+ }) => {
565
+ const { theme } = chunkM3YLASM2_js.useTheme();
566
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", width: "100%", ...containerStyle }, children: [
567
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { style: { fontSize: "13px", fontWeight: 600, color: theme.foreground }, children: label }),
568
+ /* @__PURE__ */ jsxRuntime.jsxs(
569
+ "div",
570
+ {
571
+ style: {
572
+ display: "flex",
573
+ alignItems: "center",
574
+ gap: "8px",
575
+ padding: "0 12px",
576
+ height: "40px",
577
+ borderRadius: "8px",
578
+ border: `1px solid ${error ? theme.error : theme.border}`,
579
+ backgroundColor: theme.card,
580
+ color: theme.foreground,
581
+ opacity: disabled ? 0.6 : 1,
582
+ boxSizing: "border-box"
583
+ },
584
+ children: [
585
+ leftIcon,
586
+ /* @__PURE__ */ jsxRuntime.jsx(
587
+ "input",
588
+ {
589
+ disabled,
590
+ style: {
591
+ flex: 1,
592
+ border: "none",
593
+ outline: "none",
594
+ backgroundColor: "transparent",
595
+ color: "inherit",
596
+ fontSize: "14px",
597
+ fontFamily: "inherit",
598
+ width: "100%",
599
+ ...style
600
+ },
601
+ ...rest
602
+ }
603
+ ),
604
+ rightIcon
605
+ ]
606
+ }
607
+ ),
608
+ (error || helperText) && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", color: error ? theme.error : theme.mutedForeground }, children: error || helperText })
609
+ ] });
610
+ };
611
+ var TextArea = ({
612
+ label,
613
+ error,
614
+ helperText,
615
+ containerStyle,
616
+ style,
617
+ disabled,
618
+ rows = 4,
619
+ ...rest
620
+ }) => {
621
+ const { theme } = chunkM3YLASM2_js.useTheme();
622
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", width: "100%", ...containerStyle }, children: [
623
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { style: { fontSize: "13px", fontWeight: 600, color: theme.foreground }, children: label }),
624
+ /* @__PURE__ */ jsxRuntime.jsx(
625
+ "textarea",
626
+ {
627
+ disabled,
628
+ rows,
629
+ style: {
630
+ width: "100%",
631
+ padding: "12px",
632
+ borderRadius: "8px",
633
+ border: `1px solid ${error ? theme.error : theme.border}`,
634
+ backgroundColor: theme.card,
635
+ color: theme.foreground,
636
+ fontSize: "14px",
637
+ fontFamily: "inherit",
638
+ outline: "none",
639
+ resize: "vertical",
640
+ opacity: disabled ? 0.6 : 1,
641
+ boxSizing: "border-box",
642
+ ...style
643
+ },
644
+ ...rest
645
+ }
646
+ ),
647
+ (error || helperText) && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", color: error ? theme.error : theme.mutedForeground }, children: error || helperText })
648
+ ] });
649
+ };
650
+ var Select = ({
651
+ label,
652
+ options = [],
653
+ error,
654
+ containerStyle,
655
+ style,
656
+ disabled,
657
+ children,
658
+ ...rest
659
+ }) => {
660
+ const { theme } = chunkM3YLASM2_js.useTheme();
661
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", width: "100%", ...containerStyle }, children: [
662
+ label && /* @__PURE__ */ jsxRuntime.jsx("label", { style: { fontSize: "13px", fontWeight: 600, color: theme.foreground }, children: label }),
663
+ /* @__PURE__ */ jsxRuntime.jsxs(
664
+ "select",
665
+ {
666
+ disabled,
667
+ style: {
668
+ width: "100%",
669
+ height: "40px",
670
+ padding: "0 12px",
671
+ borderRadius: "8px",
672
+ border: `1px solid ${error ? theme.error : theme.border}`,
673
+ backgroundColor: theme.card,
674
+ color: theme.foreground,
675
+ fontSize: "14px",
676
+ fontFamily: "inherit",
677
+ outline: "none",
678
+ cursor: disabled ? "not-allowed" : "pointer",
679
+ opacity: disabled ? 0.6 : 1,
680
+ boxSizing: "border-box",
681
+ ...style
682
+ },
683
+ ...rest,
684
+ children: [
685
+ options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value)),
686
+ children
687
+ ]
688
+ }
689
+ ),
690
+ error && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", color: theme.error }, children: error })
691
+ ] });
692
+ };
693
+ var Checkbox = ({
694
+ label,
695
+ checked,
696
+ onCheckedChange,
697
+ onChange,
698
+ disabled,
699
+ style,
700
+ ...rest
701
+ }) => {
702
+ const { theme } = chunkM3YLASM2_js.useTheme();
703
+ const handleChange = (e) => {
704
+ onChange?.(e);
705
+ onCheckedChange?.(e.target.checked);
706
+ };
707
+ return /* @__PURE__ */ jsxRuntime.jsxs(
708
+ "label",
709
+ {
710
+ style: {
711
+ display: "inline-flex",
712
+ alignItems: "center",
713
+ gap: "6px",
714
+ cursor: disabled ? "not-allowed" : "pointer",
715
+ opacity: disabled ? 0.6 : 1,
716
+ fontSize: "14px",
717
+ color: theme.foreground,
718
+ userSelect: "none",
719
+ ...style
720
+ },
721
+ children: [
722
+ /* @__PURE__ */ jsxRuntime.jsx(
723
+ "input",
724
+ {
725
+ type: "checkbox",
726
+ checked,
727
+ disabled,
728
+ onChange: handleChange,
729
+ style: {
730
+ width: "18px",
731
+ height: "18px",
732
+ accentColor: theme.primary,
733
+ cursor: "inherit",
734
+ borderRadius: "4px"
735
+ },
736
+ ...rest
737
+ }
738
+ ),
739
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
740
+ ]
741
+ }
742
+ );
743
+ };
744
+ var Switch = ({
745
+ checked = false,
746
+ onCheckedChange,
747
+ disabled = false,
748
+ label,
749
+ style
750
+ }) => {
751
+ const { theme } = chunkM3YLASM2_js.useTheme();
752
+ return /* @__PURE__ */ jsxRuntime.jsxs(
753
+ "label",
754
+ {
755
+ style: {
756
+ display: "inline-flex",
757
+ alignItems: "center",
758
+ gap: "8px",
759
+ cursor: disabled ? "not-allowed" : "pointer",
760
+ opacity: disabled ? 0.6 : 1,
761
+ userSelect: "none",
762
+ ...style
763
+ },
764
+ children: [
765
+ /* @__PURE__ */ jsxRuntime.jsx(
766
+ "div",
767
+ {
768
+ onClick: () => !disabled && onCheckedChange?.(!checked),
769
+ style: {
770
+ width: "40px",
771
+ height: "22px",
772
+ borderRadius: "11px",
773
+ backgroundColor: checked ? theme.primary : theme.border,
774
+ position: "relative",
775
+ transition: "background-color 0.2s ease",
776
+ padding: "2px",
777
+ boxSizing: "border-box"
778
+ },
779
+ children: /* @__PURE__ */ jsxRuntime.jsx(
780
+ "div",
781
+ {
782
+ style: {
783
+ width: "18px",
784
+ height: "18px",
785
+ borderRadius: "50%",
786
+ backgroundColor: "#ffffff",
787
+ transform: checked ? "translateX(18px)" : "translateX(0)",
788
+ transition: "transform 0.2s ease",
789
+ boxShadow: "0 1px 3px rgba(0,0,0,0.2)"
790
+ }
791
+ }
792
+ )
793
+ }
794
+ ),
795
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "14px", color: theme.foreground }, children: label })
796
+ ]
797
+ }
798
+ );
799
+ };
800
+ var Spinner = ({
801
+ size = "md",
802
+ color,
803
+ style
804
+ }) => {
805
+ const { theme } = chunkM3YLASM2_js.useTheme();
806
+ const getSizePx = () => {
807
+ if (typeof size === "number") return size;
808
+ const map = { sm: 16, md: 24, lg: 36 };
809
+ return map[size] || 24;
810
+ };
811
+ const dim = getSizePx();
812
+ const strokeCol = color ? color in theme ? theme[color] : color : theme.primary;
813
+ return /* @__PURE__ */ jsxRuntime.jsx(
814
+ "svg",
815
+ {
816
+ width: dim,
817
+ height: dim,
818
+ viewBox: "0 0 24 24",
819
+ fill: "none",
820
+ stroke: strokeCol,
821
+ strokeWidth: "3",
822
+ strokeLinecap: "round",
823
+ strokeLinejoin: "round",
824
+ style: {
825
+ animation: "spin 0.8s linear infinite",
826
+ ...style
827
+ },
828
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
829
+ }
830
+ );
831
+ };
832
+ var Icon = ({
833
+ name,
834
+ size = 20,
835
+ color,
836
+ style,
837
+ ...rest
838
+ }) => {
839
+ const { theme } = chunkM3YLASM2_js.useTheme();
840
+ const iconColor = color ? resolveWebColor(theme, color) : theme.foreground;
841
+ const formatName = (str) => str.replace(/(^\w|-\w|_\w)/g, (m) => m.replace(/[-_]/, "").toUpperCase());
842
+ const pascalName = formatName(name);
843
+ const IconComponent = LucideIcons__namespace[pascalName] || LucideIcons__namespace.HelpCircle;
844
+ return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size, color: iconColor, style, ...rest });
845
+ };
846
+ var IconButton = ({
847
+ name,
848
+ size = "md",
849
+ variant = "ghost",
850
+ disabled = false,
851
+ style,
852
+ ...rest
853
+ }) => {
854
+ const { theme } = chunkM3YLASM2_js.useTheme();
855
+ const dimMap = { sm: 32, md: 40, lg: 48 };
856
+ const iconSizeMap = { sm: 16, md: 20, lg: 24 };
857
+ const dim = dimMap[size];
858
+ const iconSize = iconSizeMap[size];
859
+ const getVariantStyle = () => {
860
+ switch (variant) {
861
+ case "primary":
862
+ return { backgroundColor: theme.primary, color: theme.primaryForeground, border: "none" };
863
+ case "secondary":
864
+ return { backgroundColor: theme.secondary, color: theme.secondaryForeground, border: "none" };
865
+ case "outline":
866
+ return { backgroundColor: "transparent", color: theme.foreground, border: `1px solid ${theme.border}` };
867
+ case "ghost":
868
+ default:
869
+ return { backgroundColor: "transparent", color: theme.foreground, border: "none" };
870
+ }
871
+ };
872
+ return /* @__PURE__ */ jsxRuntime.jsx(
873
+ "button",
874
+ {
875
+ disabled,
876
+ style: {
877
+ width: `${dim}px`,
878
+ height: `${dim}px`,
879
+ borderRadius: "8px",
880
+ display: "inline-flex",
881
+ alignItems: "center",
882
+ justifyContent: "center",
883
+ cursor: disabled ? "not-allowed" : "pointer",
884
+ opacity: disabled ? 0.5 : 1,
885
+ transition: "background-color 0.15s ease",
886
+ boxSizing: "border-box",
887
+ ...getVariantStyle(),
888
+ ...style
889
+ },
890
+ ...rest,
891
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name, size: iconSize, color: "currentColor" })
892
+ }
893
+ );
894
+ };
895
+ var Tabs = ({
896
+ items,
897
+ activeId,
898
+ onChange,
899
+ style
900
+ }) => {
901
+ const { theme } = chunkM3YLASM2_js.useTheme();
902
+ return /* @__PURE__ */ jsxRuntime.jsx(
903
+ "div",
904
+ {
905
+ style: {
906
+ display: "flex",
907
+ alignItems: "center",
908
+ gap: "8px",
909
+ borderBottom: `1px solid ${theme.border}`,
910
+ ...style
911
+ },
912
+ children: items.map((tab) => {
913
+ const isActive = tab.id === activeId;
914
+ return /* @__PURE__ */ jsxRuntime.jsxs(
915
+ "button",
916
+ {
917
+ onClick: () => onChange(tab.id),
918
+ style: {
919
+ display: "inline-flex",
920
+ alignItems: "center",
921
+ gap: "4px",
922
+ padding: "8px 16px",
923
+ fontSize: "14px",
924
+ fontWeight: isActive ? 600 : 400,
925
+ color: isActive ? theme.primary : theme.mutedForeground,
926
+ border: "none",
927
+ borderBottom: `2px solid ${isActive ? theme.primary : "transparent"}`,
928
+ backgroundColor: "transparent",
929
+ cursor: "pointer",
930
+ marginBottom: "-1px",
931
+ transition: "all 0.15s ease"
932
+ },
933
+ children: [
934
+ tab.icon,
935
+ tab.label
936
+ ]
937
+ },
938
+ tab.id
939
+ );
940
+ })
941
+ }
942
+ );
943
+ };
944
+ var ProgressBar = ({
945
+ progress,
946
+ color,
947
+ height = 8,
948
+ style
949
+ }) => {
950
+ const { theme } = chunkM3YLASM2_js.useTheme();
951
+ const clamped = Math.min(Math.max(progress, 0), 100);
952
+ const barColor = color ? color in theme ? theme[color] : color : theme.primary;
953
+ return /* @__PURE__ */ jsxRuntime.jsx(
954
+ "div",
955
+ {
956
+ style: {
957
+ width: "100%",
958
+ height: `${height}px`,
959
+ backgroundColor: theme.border,
960
+ borderRadius: `${height / 2}px`,
961
+ overflow: "hidden",
962
+ ...style
963
+ },
964
+ children: /* @__PURE__ */ jsxRuntime.jsx(
965
+ "div",
966
+ {
967
+ style: {
968
+ width: `${clamped}%`,
969
+ height: "100%",
970
+ backgroundColor: barColor,
971
+ transition: "width 0.3s ease"
972
+ }
973
+ }
974
+ )
975
+ }
976
+ );
977
+ };
978
+ var Accordion = ({
979
+ title,
980
+ defaultOpen = false,
981
+ children,
982
+ style
983
+ }) => {
984
+ const { theme } = chunkM3YLASM2_js.useTheme();
985
+ const [isOpen, setIsOpen] = React.useState(defaultOpen);
986
+ return /* @__PURE__ */ jsxRuntime.jsxs(
987
+ "div",
988
+ {
989
+ style: {
990
+ border: `1px solid ${theme.border}`,
991
+ borderRadius: "8px",
992
+ overflow: "hidden",
993
+ backgroundColor: theme.card,
994
+ ...style
995
+ },
996
+ children: [
997
+ /* @__PURE__ */ jsxRuntime.jsxs(
998
+ "button",
999
+ {
1000
+ onClick: () => setIsOpen(!isOpen),
1001
+ style: {
1002
+ width: "100%",
1003
+ display: "flex",
1004
+ alignItems: "center",
1005
+ justifyContent: "space-between",
1006
+ padding: "16px",
1007
+ backgroundColor: "transparent",
1008
+ border: "none",
1009
+ color: theme.foreground,
1010
+ fontSize: "14px",
1011
+ fontWeight: 600,
1012
+ cursor: "pointer",
1013
+ textAlign: "left"
1014
+ },
1015
+ children: [
1016
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: title }),
1017
+ /* @__PURE__ */ jsxRuntime.jsx(
1018
+ "span",
1019
+ {
1020
+ style: {
1021
+ transform: isOpen ? "rotate(180deg)" : "rotate(0deg)",
1022
+ transition: "transform 0.2s ease"
1023
+ },
1024
+ children: "\u25BC"
1025
+ }
1026
+ )
1027
+ ]
1028
+ }
1029
+ ),
1030
+ isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "16px", borderTop: `1px solid ${theme.border}` }, children })
1031
+ ]
1032
+ }
1033
+ );
1034
+ };
1035
+ var Chip = ({
1036
+ label,
1037
+ onDismiss,
1038
+ onClick,
1039
+ style
1040
+ }) => {
1041
+ const { theme } = chunkM3YLASM2_js.useTheme();
1042
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1043
+ "span",
1044
+ {
1045
+ onClick,
1046
+ style: {
1047
+ display: "inline-flex",
1048
+ alignItems: "center",
1049
+ gap: resolveWebSpacing("xs") || "4px",
1050
+ padding: `4px ${resolveWebSpacing("sm") || "8px"}`,
1051
+ fontSize: "12px",
1052
+ fontWeight: 500,
1053
+ borderRadius: resolveWebRadius("full") || "9999px",
1054
+ backgroundColor: theme.secondary,
1055
+ color: theme.secondaryForeground,
1056
+ cursor: onClick ? "pointer" : "default",
1057
+ userSelect: "none",
1058
+ ...style
1059
+ },
1060
+ children: [
1061
+ label,
1062
+ onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
1063
+ "button",
1064
+ {
1065
+ onClick: (e) => {
1066
+ e.stopPropagation();
1067
+ onDismiss();
1068
+ },
1069
+ style: {
1070
+ border: "none",
1071
+ background: "transparent",
1072
+ color: "inherit",
1073
+ cursor: "pointer",
1074
+ padding: 0,
1075
+ fontSize: "12px",
1076
+ lineHeight: 1
1077
+ },
1078
+ children: "\u2715"
1079
+ }
1080
+ )
1081
+ ]
1082
+ }
1083
+ );
1084
+ };
1085
+ var Separator = (props) => /* @__PURE__ */ jsxRuntime.jsx(Divider, { ...props });
1086
+ var Image = ({
1087
+ src,
1088
+ alt = "",
1089
+ aspectRatio,
1090
+ borderRadius,
1091
+ style,
1092
+ ...rest
1093
+ }) => {
1094
+ return /* @__PURE__ */ jsxRuntime.jsx(
1095
+ "img",
1096
+ {
1097
+ src,
1098
+ alt,
1099
+ style: {
1100
+ width: "100%",
1101
+ height: aspectRatio ? "auto" : "100%",
1102
+ aspectRatio: aspectRatio ? `${aspectRatio}` : void 0,
1103
+ borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius,
1104
+ objectFit: "cover",
1105
+ display: "block",
1106
+ ...style
1107
+ },
1108
+ ...rest
1109
+ }
1110
+ );
1111
+ };
1112
+ var Video = ({
1113
+ src,
1114
+ poster,
1115
+ borderRadius,
1116
+ controls = true,
1117
+ autoPlay = false,
1118
+ loop = false,
1119
+ style,
1120
+ ...rest
1121
+ }) => {
1122
+ return /* @__PURE__ */ jsxRuntime.jsx(
1123
+ "video",
1124
+ {
1125
+ src,
1126
+ poster,
1127
+ controls,
1128
+ autoPlay,
1129
+ loop,
1130
+ style: {
1131
+ width: "100%",
1132
+ height: "auto",
1133
+ borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius,
1134
+ display: "block",
1135
+ ...style
1136
+ },
1137
+ ...rest
1138
+ }
1139
+ );
1140
+ };
1141
+ var RootLayout = ({ children, style }) => {
1142
+ const { theme } = chunkM3YLASM2_js.useTheme();
1143
+ return /* @__PURE__ */ jsxRuntime.jsx(
1144
+ "div",
1145
+ {
1146
+ style: {
1147
+ minHeight: "100vh",
1148
+ width: "100%",
1149
+ backgroundColor: theme.background,
1150
+ color: theme.foreground,
1151
+ margin: 0,
1152
+ padding: 0,
1153
+ boxSizing: "border-box",
1154
+ ...style
1155
+ },
1156
+ children
1157
+ }
1158
+ );
1159
+ };
1160
+ var AuthLayout = ({
1161
+ title,
1162
+ subtitle,
1163
+ logo,
1164
+ children,
1165
+ style
1166
+ }) => {
1167
+ const { theme } = chunkM3YLASM2_js.useTheme();
1168
+ return /* @__PURE__ */ jsxRuntime.jsx(
1169
+ "div",
1170
+ {
1171
+ style: {
1172
+ minHeight: "100vh",
1173
+ width: "100%",
1174
+ display: "flex",
1175
+ alignItems: "center",
1176
+ justifyContent: "center",
1177
+ backgroundColor: theme.background,
1178
+ padding: "24px",
1179
+ boxSizing: "border-box",
1180
+ ...style
1181
+ },
1182
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1183
+ "div",
1184
+ {
1185
+ style: {
1186
+ width: "100%",
1187
+ maxWidth: "420px",
1188
+ backgroundColor: theme.card,
1189
+ borderRadius: "16px",
1190
+ border: `1px solid ${theme.border}`,
1191
+ padding: "32px",
1192
+ boxSizing: "border-box"
1193
+ },
1194
+ children: [
1195
+ logo && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "center", marginBottom: "24px" }, children: logo }),
1196
+ title && /* @__PURE__ */ jsxRuntime.jsx("h1", { style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 700, color: theme.foreground, textAlign: "center" }, children: title }),
1197
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "0 0 24px 0", fontSize: "14px", color: theme.mutedForeground, textAlign: "center" }, children: subtitle }),
1198
+ children
1199
+ ]
1200
+ }
1201
+ )
1202
+ }
1203
+ );
1204
+ };
1205
+ var DashboardLayout = ({
1206
+ sidebar,
1207
+ header,
1208
+ children,
1209
+ sidebarWidth = 260,
1210
+ headerHeight = 64,
1211
+ style
1212
+ }) => {
1213
+ const { theme } = chunkM3YLASM2_js.useTheme();
1214
+ const widthVal = typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth;
1215
+ const heightVal = typeof headerHeight === "number" ? `${headerHeight}px` : headerHeight;
1216
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1217
+ "div",
1218
+ {
1219
+ style: {
1220
+ display: "flex",
1221
+ minHeight: "100vh",
1222
+ width: "100%",
1223
+ backgroundColor: theme.background,
1224
+ color: theme.foreground,
1225
+ ...style
1226
+ },
1227
+ children: [
1228
+ sidebar && /* @__PURE__ */ jsxRuntime.jsx(
1229
+ "aside",
1230
+ {
1231
+ style: {
1232
+ width: widthVal,
1233
+ flexShrink: 0,
1234
+ borderRight: `1px solid ${theme.border}`,
1235
+ backgroundColor: theme.card
1236
+ },
1237
+ children: sidebar
1238
+ }
1239
+ ),
1240
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column", minWidth: 0 }, children: [
1241
+ header && /* @__PURE__ */ jsxRuntime.jsx(
1242
+ "header",
1243
+ {
1244
+ style: {
1245
+ height: heightVal,
1246
+ flexShrink: 0,
1247
+ borderBottom: `1px solid ${theme.border}`,
1248
+ backgroundColor: theme.card,
1249
+ display: "flex",
1250
+ alignItems: "center",
1251
+ padding: "0 24px"
1252
+ },
1253
+ children: header
1254
+ }
1255
+ ),
1256
+ /* @__PURE__ */ jsxRuntime.jsx("main", { style: { flex: 1, padding: "24px", overflowY: "auto" }, children })
1257
+ ] })
1258
+ ]
1259
+ }
1260
+ );
1261
+ };
1262
+ var SidebarLayout = ({
1263
+ sidebar,
1264
+ sidebarPosition = "left",
1265
+ width = 280,
1266
+ children,
1267
+ style
1268
+ }) => {
1269
+ const { theme } = chunkM3YLASM2_js.useTheme();
1270
+ const widthVal = typeof width === "number" ? `${width}px` : width;
1271
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1272
+ "div",
1273
+ {
1274
+ style: {
1275
+ display: "flex",
1276
+ flexDirection: sidebarPosition === "left" ? "row" : "row-reverse",
1277
+ width: "100%",
1278
+ minHeight: "100vh",
1279
+ backgroundColor: theme.background,
1280
+ ...style
1281
+ },
1282
+ children: [
1283
+ /* @__PURE__ */ jsxRuntime.jsx(
1284
+ "aside",
1285
+ {
1286
+ style: {
1287
+ width: widthVal,
1288
+ flexShrink: 0,
1289
+ backgroundColor: theme.card,
1290
+ borderRight: sidebarPosition === "left" ? `1px solid ${theme.border}` : "none",
1291
+ borderLeft: sidebarPosition === "right" ? `1px solid ${theme.border}` : "none"
1292
+ },
1293
+ children: sidebar
1294
+ }
1295
+ ),
1296
+ /* @__PURE__ */ jsxRuntime.jsx("main", { style: { flex: 1, minWidth: 0, padding: "24px" }, children })
1297
+ ]
1298
+ }
1299
+ );
1300
+ };
1301
+ var HeaderContentLayout = ({
1302
+ header,
1303
+ children,
1304
+ headerHeight = 64,
1305
+ style
1306
+ }) => {
1307
+ const { theme } = chunkM3YLASM2_js.useTheme();
1308
+ const heightVal = typeof headerHeight === "number" ? `${headerHeight}px` : headerHeight;
1309
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1310
+ "div",
1311
+ {
1312
+ style: {
1313
+ display: "flex",
1314
+ flexDirection: "column",
1315
+ minHeight: "100vh",
1316
+ width: "100%",
1317
+ backgroundColor: theme.background,
1318
+ ...style
1319
+ },
1320
+ children: [
1321
+ /* @__PURE__ */ jsxRuntime.jsx(
1322
+ "header",
1323
+ {
1324
+ style: {
1325
+ height: heightVal,
1326
+ borderBottom: `1px solid ${theme.border}`,
1327
+ backgroundColor: theme.card,
1328
+ display: "flex",
1329
+ alignItems: "center",
1330
+ padding: "0 24px",
1331
+ flexShrink: 0
1332
+ },
1333
+ children: header
1334
+ }
1335
+ ),
1336
+ /* @__PURE__ */ jsxRuntime.jsx("main", { style: { flex: 1, padding: "24px" }, children })
1337
+ ]
1338
+ }
1339
+ );
1340
+ };
1341
+ var CenteredLayout = ({
1342
+ maxWidth = 1200,
1343
+ children,
1344
+ style
1345
+ }) => {
1346
+ const { theme } = chunkM3YLASM2_js.useTheme();
1347
+ const maxW = typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
1348
+ return /* @__PURE__ */ jsxRuntime.jsx(
1349
+ "div",
1350
+ {
1351
+ style: {
1352
+ width: "100%",
1353
+ minHeight: "100vh",
1354
+ backgroundColor: theme.background,
1355
+ display: "flex",
1356
+ justifyContent: "center",
1357
+ padding: "24px",
1358
+ boxSizing: "border-box",
1359
+ ...style
1360
+ },
1361
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", maxWidth: maxW, boxSizing: "border-box" }, children })
1362
+ }
1363
+ );
1364
+ };
1365
+ var GridLayout = ({
1366
+ columns = 3,
1367
+ gap = 16,
1368
+ children,
1369
+ style
1370
+ }) => {
1371
+ const gapVal = typeof gap === "number" ? `${gap}px` : gap;
1372
+ const colVal = typeof columns === "number" ? `repeat(${columns}, 1fr)` : columns;
1373
+ return /* @__PURE__ */ jsxRuntime.jsx(
1374
+ "div",
1375
+ {
1376
+ style: {
1377
+ display: "grid",
1378
+ gridTemplateColumns: colVal,
1379
+ gap: gapVal,
1380
+ width: "100%",
1381
+ boxSizing: "border-box",
1382
+ ...style
1383
+ },
1384
+ children
1385
+ }
1386
+ );
1387
+ };
1388
+ var FlexLayout = ({
1389
+ direction = "row",
1390
+ align = "stretch",
1391
+ justify = "flex-start",
1392
+ gap = 0,
1393
+ wrap = false,
1394
+ children,
1395
+ style
1396
+ }) => {
1397
+ const gapVal = typeof gap === "number" ? `${gap}px` : gap;
1398
+ return /* @__PURE__ */ jsxRuntime.jsx(
1399
+ "div",
1400
+ {
1401
+ style: {
1402
+ display: "flex",
1403
+ flexDirection: direction,
1404
+ alignItems: align,
1405
+ justifyContent: justify,
1406
+ gap: gapVal,
1407
+ flexWrap: wrap ? "wrap" : "nowrap",
1408
+ width: "100%",
1409
+ boxSizing: "border-box",
1410
+ ...style
1411
+ },
1412
+ children
1413
+ }
1414
+ );
1415
+ };
1416
+
1417
+ Object.defineProperty(exports, "ThemeProvider", {
1418
+ enumerable: true,
1419
+ get: function () { return chunkM3YLASM2_js.ThemeProvider; }
1420
+ });
1421
+ Object.defineProperty(exports, "createTheme", {
1422
+ enumerable: true,
1423
+ get: function () { return chunkM3YLASM2_js.createTheme; }
1424
+ });
1425
+ Object.defineProperty(exports, "useTheme", {
1426
+ enumerable: true,
1427
+ get: function () { return chunkM3YLASM2_js.useTheme; }
1428
+ });
1429
+ Object.defineProperty(exports, "breakpoints", {
1430
+ enumerable: true,
1431
+ get: function () { return chunkASZEP37D_js.breakpoints; }
1432
+ });
1433
+ Object.defineProperty(exports, "colors", {
1434
+ enumerable: true,
1435
+ get: function () { return chunkASZEP37D_js.colors; }
1436
+ });
1437
+ Object.defineProperty(exports, "motion", {
1438
+ enumerable: true,
1439
+ get: function () { return chunkASZEP37D_js.motion; }
1440
+ });
1441
+ Object.defineProperty(exports, "opacity", {
1442
+ enumerable: true,
1443
+ get: function () { return chunkASZEP37D_js.opacity; }
1444
+ });
1445
+ Object.defineProperty(exports, "radii", {
1446
+ enumerable: true,
1447
+ get: function () { return chunkASZEP37D_js.radii; }
1448
+ });
1449
+ Object.defineProperty(exports, "shadows", {
1450
+ enumerable: true,
1451
+ get: function () { return chunkASZEP37D_js.shadows; }
1452
+ });
1453
+ Object.defineProperty(exports, "spacing", {
1454
+ enumerable: true,
1455
+ get: function () { return chunkASZEP37D_js.spacing; }
1456
+ });
1457
+ Object.defineProperty(exports, "typography", {
1458
+ enumerable: true,
1459
+ get: function () { return chunkASZEP37D_js.typography; }
1460
+ });
1461
+ Object.defineProperty(exports, "zIndex", {
1462
+ enumerable: true,
1463
+ get: function () { return chunkASZEP37D_js.zIndex; }
1464
+ });
1465
+ exports.Accordion = Accordion;
1466
+ exports.AuthLayout = AuthLayout;
1467
+ exports.Avatar = Avatar;
1468
+ exports.Badge = Badge;
1469
+ exports.Box = Box;
1470
+ exports.Button = Button;
1471
+ exports.Card = Card;
1472
+ exports.Center = Center;
1473
+ exports.CenteredLayout = CenteredLayout;
1474
+ exports.Checkbox = Checkbox;
1475
+ exports.Chip = Chip;
1476
+ exports.DashboardLayout = DashboardLayout;
1477
+ exports.Divider = Divider;
1478
+ exports.FlexLayout = FlexLayout;
1479
+ exports.GridLayout = GridLayout;
1480
+ exports.HeaderContentLayout = HeaderContentLayout;
1481
+ exports.Icon = Icon;
1482
+ exports.IconButton = IconButton;
1483
+ exports.Image = Image;
1484
+ exports.Inline = Inline;
1485
+ exports.ProgressBar = ProgressBar;
1486
+ exports.RootLayout = RootLayout;
1487
+ exports.Scroll = Scroll;
1488
+ exports.Select = Select;
1489
+ exports.Separator = Separator;
1490
+ exports.SidebarLayout = SidebarLayout;
1491
+ exports.Spinner = Spinner;
1492
+ exports.Stack = Stack;
1493
+ exports.Switch = Switch;
1494
+ exports.Tabs = Tabs;
1495
+ exports.Text = Text;
1496
+ exports.TextArea = TextArea;
1497
+ exports.TextInput = TextInput;
1498
+ exports.Video = Video;
1499
+ //# sourceMappingURL=index.js.map
1500
+ //# sourceMappingURL=index.js.map