@brickslab./ui-mobile 0.1.1

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 ADDED
@@ -0,0 +1,1897 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Accordion: () => Accordion,
34
+ AccordionItem: () => AccordionItem,
35
+ Alert: () => Alert,
36
+ AppShell: () => AppShell,
37
+ Badge: () => Badge,
38
+ Button: () => Button,
39
+ Callout: () => Callout,
40
+ Card: () => Card,
41
+ Checkbox: () => Checkbox,
42
+ Heading: () => Heading,
43
+ Input: () => Input,
44
+ ProgressBar: () => ProgressBar,
45
+ Radio: () => Radio,
46
+ RadioGroup: () => RadioGroup,
47
+ Screen: () => Screen,
48
+ Select: () => Select,
49
+ Spinner: () => Spinner,
50
+ StatusLabel: () => StatusLabel,
51
+ TabPanel: () => TabPanel,
52
+ Tabs: () => Tabs,
53
+ TagChip: () => TagChip,
54
+ Text: () => Text16,
55
+ Textarea: () => Textarea,
56
+ ToggleSwitch: () => ToggleSwitch,
57
+ tokens: () => tokens
58
+ });
59
+ module.exports = __toCommonJS(index_exports);
60
+
61
+ // src/components/ui/button/Button.tsx
62
+ var import_react_native = require("react-native");
63
+
64
+ // src/tokens.ts
65
+ var tokens = {
66
+ // Colors
67
+ colorBg: "#ffffff",
68
+ colorFg: "#0b1220",
69
+ colorMuted: "#52607a",
70
+ colorBrand: "#CC4A48",
71
+ colorSuccess: "#4ADE80",
72
+ colorWarning: "#F59E0B",
73
+ colorError: "#CC4A48",
74
+ colorInfo: "#3B82F6",
75
+ colorTransparent: "transparent",
76
+ // Badge colors
77
+ cSurfaceElevated: "#f8f9fa",
78
+ cBorder: "#e9ecef",
79
+ cBrandSubtle: "#fef2f2",
80
+ cBrandBorder: "#fecaca",
81
+ cSuccessSubtle: "#f0fdf4",
82
+ cSuccessBorder: "#bbf7d0",
83
+ cWarningSubtle: "#fffbeb",
84
+ cWarningBorder: "#fde68a",
85
+ // Font sizes
86
+ fontsize2xs: 10,
87
+ fontsizeXs: 12,
88
+ fontsizeSm: 14,
89
+ fontsizeMedium: 16,
90
+ fontsizeLg: 18,
91
+ // Simplified, no clamp
92
+ fontsizeXl: 20,
93
+ fontsize2xl: 24,
94
+ fontsize3xl: 30,
95
+ fontsize4xl: 36,
96
+ fontsize5xl: 32,
97
+ // Font weights
98
+ fontweightThin: "100",
99
+ fontweightNormal: "400",
100
+ fontweightLight: "300",
101
+ fontweightMedium: "500",
102
+ fontweightSemibold: "600",
103
+ fontweightBold: "700",
104
+ fontweightExtrabold: "800",
105
+ fontweightBlack: "900",
106
+ // Heights
107
+ heightXm: 1,
108
+ heightSm: 8,
109
+ heightMd: 32,
110
+ heightInput: 38,
111
+ heightLg: 42,
112
+ heightXl: 62,
113
+ height2xl: 150,
114
+ // Spaces
115
+ space1: 2,
116
+ space15: 4,
117
+ space2: 8,
118
+ space3: 12,
119
+ space4: 16,
120
+ space5: 20,
121
+ space6: 24,
122
+ space7: 28,
123
+ space8: 32,
124
+ space10: 40,
125
+ space12: 48,
126
+ space16: 60,
127
+ // Radii
128
+ radiusSm: 6,
129
+ radiusMd: 12,
130
+ radiusLg: 16,
131
+ radiusFull: 999,
132
+ // Other
133
+ borderXm: 1,
134
+ borderSm: 2,
135
+ borderMd: 4
136
+ };
137
+
138
+ // src/components/ui/button/Button.tsx
139
+ var import_jsx_runtime = require("react/jsx-runtime");
140
+ var variantStyles = (variant, customBg, customColor) => {
141
+ switch (variant) {
142
+ case "primary":
143
+ return { backgroundColor: tokens.colorBrand, borderWidth: 0 };
144
+ case "secondary":
145
+ return { backgroundColor: tokens.colorBg, borderWidth: 1, borderColor: tokens.colorMuted };
146
+ case "ghost":
147
+ return { backgroundColor: "transparent", borderWidth: 0 };
148
+ case "danger":
149
+ return { backgroundColor: tokens.colorError, borderWidth: 0 };
150
+ case "custom":
151
+ return { backgroundColor: customBg || tokens.colorBrand, borderWidth: 0 };
152
+ default:
153
+ return {};
154
+ }
155
+ };
156
+ var sizeStyles = (size) => {
157
+ switch (size) {
158
+ case "sm":
159
+ return { height: 28, paddingHorizontal: tokens.space3, paddingVertical: tokens.space2 };
160
+ case "md":
161
+ return { height: tokens.heightInput, paddingHorizontal: tokens.space5, paddingVertical: tokens.space3 };
162
+ case "lg":
163
+ return { height: 44, paddingHorizontal: tokens.space6, paddingVertical: tokens.space4 };
164
+ default:
165
+ return {};
166
+ }
167
+ };
168
+ var textStyles = (variant, size, customColor) => {
169
+ const base = { fontWeight: "600" };
170
+ switch (size) {
171
+ case "sm":
172
+ base.fontSize = tokens.fontsizeXs;
173
+ break;
174
+ case "md":
175
+ base.fontSize = tokens.fontsizeSm;
176
+ break;
177
+ case "lg":
178
+ base.fontSize = tokens.fontsizeMedium;
179
+ break;
180
+ }
181
+ switch (variant) {
182
+ case "primary":
183
+ case "danger":
184
+ base.color = "#FBFBFB";
185
+ break;
186
+ case "secondary":
187
+ base.color = tokens.colorFg;
188
+ break;
189
+ case "ghost":
190
+ base.color = tokens.colorFg;
191
+ break;
192
+ case "custom":
193
+ base.color = customColor || tokens.colorFg;
194
+ break;
195
+ }
196
+ return base;
197
+ };
198
+ function Button({
199
+ variant = "primary",
200
+ size = "md",
201
+ disabled = false,
202
+ isLoading = false,
203
+ leftIcon,
204
+ rightIcon,
205
+ fullWidth = false,
206
+ onPress,
207
+ children,
208
+ customBg,
209
+ customColor,
210
+ style: userStyle
211
+ }) {
212
+ const isDisabled = disabled || isLoading;
213
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
214
+ import_react_native.TouchableOpacity,
215
+ {
216
+ style: [
217
+ styles.button,
218
+ variantStyles(variant, customBg, customColor),
219
+ sizeStyles(size),
220
+ fullWidth && { width: "100%" },
221
+ isDisabled && { opacity: 0.6 },
222
+ userStyle
223
+ ],
224
+ onPress: isDisabled ? void 0 : onPress,
225
+ disabled: isDisabled,
226
+ activeOpacity: 0.8,
227
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, { style: styles.content, children: [
228
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.ActivityIndicator, { size: "small", color: textStyles(variant, size, customColor).color }) : leftIcon,
229
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { style: [styles.text, textStyles(variant, size, customColor)], children }),
230
+ !isLoading && rightIcon
231
+ ] })
232
+ }
233
+ );
234
+ }
235
+ var styles = import_react_native.StyleSheet.create({
236
+ button: {
237
+ borderRadius: tokens.radiusSm,
238
+ alignItems: "center",
239
+ justifyContent: "center",
240
+ flexDirection: "row"
241
+ },
242
+ content: {
243
+ flexDirection: "row",
244
+ alignItems: "center",
245
+ gap: tokens.space2
246
+ },
247
+ text: {
248
+ textAlign: "center"
249
+ }
250
+ });
251
+
252
+ // src/components/ui/input/Input.tsx
253
+ var import_react_native2 = require("react-native");
254
+ var import_jsx_runtime2 = require("react/jsx-runtime");
255
+ var sizeStyles2 = (size) => {
256
+ switch (size) {
257
+ case "sm":
258
+ return { height: 28, paddingHorizontal: tokens.space3, fontSize: tokens.fontsizeXs };
259
+ case "md":
260
+ return { height: tokens.heightInput, paddingHorizontal: tokens.space4, fontSize: tokens.fontsizeSm };
261
+ case "lg":
262
+ return { height: 44, paddingHorizontal: tokens.space5, fontSize: tokens.fontsizeMedium };
263
+ default:
264
+ return {};
265
+ }
266
+ };
267
+ function Input({
268
+ value,
269
+ onChangeText,
270
+ keyboardType = "default",
271
+ label,
272
+ placeholder,
273
+ helperText,
274
+ errorText,
275
+ disabled = false,
276
+ editable = true,
277
+ leftIcon,
278
+ rightIcon,
279
+ size = "md",
280
+ fullWidth = false,
281
+ style: userStyle,
282
+ inputStyle: userInputStyle
283
+ }) {
284
+ const hasError = Boolean(errorText);
285
+ const isEditable = editable && !disabled;
286
+ const config = sizeStyles2(size);
287
+ const containerStyle = [
288
+ styles2.container,
289
+ fullWidth && { width: "100%" },
290
+ !isEditable && { opacity: 0.5 },
291
+ userStyle
292
+ ];
293
+ const inputContainerStyle = [
294
+ styles2.inputContainer,
295
+ { borderColor: hasError ? tokens.colorError : tokens.colorMuted },
296
+ !isEditable && { backgroundColor: tokens.colorMuted }
297
+ ];
298
+ const textInputStyle = [
299
+ styles2.input,
300
+ config,
301
+ { color: tokens.colorFg },
302
+ userInputStyle
303
+ ];
304
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: containerStyle, children: [
305
+ label && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles2.label, children: label }),
306
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: inputContainerStyle, children: [
307
+ leftIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: styles2.leftIcon, children: leftIcon }),
308
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
309
+ import_react_native2.TextInput,
310
+ {
311
+ value,
312
+ onChangeText,
313
+ placeholder,
314
+ placeholderTextColor: tokens.colorMuted,
315
+ keyboardType,
316
+ editable: isEditable,
317
+ style: textInputStyle
318
+ }
319
+ ),
320
+ rightIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: styles2.rightIcon, children: rightIcon })
321
+ ] }),
322
+ (errorText || helperText) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: [styles2.helper, hasError && { color: tokens.colorError }], children: errorText ?? helperText })
323
+ ] });
324
+ }
325
+ var styles2 = import_react_native2.StyleSheet.create({
326
+ container: {
327
+ marginBottom: tokens.space2
328
+ },
329
+ label: {
330
+ marginBottom: tokens.space1,
331
+ fontSize: tokens.fontsizeSm,
332
+ fontWeight: tokens.fontweightMedium,
333
+ color: tokens.colorFg
334
+ },
335
+ inputContainer: {
336
+ flexDirection: "row",
337
+ alignItems: "center",
338
+ borderWidth: 1,
339
+ borderRadius: tokens.radiusSm,
340
+ backgroundColor: tokens.colorBg
341
+ },
342
+ input: {
343
+ flex: 1,
344
+ color: tokens.colorFg
345
+ },
346
+ leftIcon: {
347
+ marginLeft: tokens.space3
348
+ },
349
+ rightIcon: {
350
+ marginRight: tokens.space3
351
+ },
352
+ helper: {
353
+ marginTop: tokens.space1,
354
+ fontSize: tokens.fontsizeXs,
355
+ color: tokens.colorMuted,
356
+ lineHeight: 14
357
+ }
358
+ });
359
+
360
+ // src/components/ui/checkbox/Checkbox.tsx
361
+ var import_react = require("react");
362
+ var import_react_native3 = require("react-native");
363
+ var import_jsx_runtime3 = require("react/jsx-runtime");
364
+ var sizeMap = {
365
+ sm: 14,
366
+ md: 16,
367
+ lg: 20
368
+ };
369
+ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: styles3.checkmark, children: "\u2713" });
370
+ function Checkbox({
371
+ checked,
372
+ defaultChecked,
373
+ onValueChange,
374
+ label,
375
+ disabled = false,
376
+ size = "md",
377
+ style: userStyle
378
+ }) {
379
+ const [internalChecked, setInternalChecked] = (0, import_react.useState)(defaultChecked || false);
380
+ const isChecked = checked !== void 0 ? checked : internalChecked;
381
+ const handlePress = () => {
382
+ if (disabled) return;
383
+ const newChecked = !isChecked;
384
+ if (checked === void 0) {
385
+ setInternalChecked(newChecked);
386
+ }
387
+ onValueChange?.(newChecked);
388
+ };
389
+ const px = sizeMap[size];
390
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
391
+ import_react_native3.TouchableOpacity,
392
+ {
393
+ style: [styles3.container, userStyle],
394
+ onPress: handlePress,
395
+ disabled,
396
+ activeOpacity: 0.8,
397
+ children: [
398
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
399
+ import_react_native3.View,
400
+ {
401
+ style: [
402
+ styles3.checkbox,
403
+ { width: px, height: px },
404
+ isChecked && styles3.checked,
405
+ disabled && styles3.disabled
406
+ ],
407
+ children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, {})
408
+ }
409
+ ),
410
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [styles3.label, disabled && styles3.disabledText], children: label })
411
+ ]
412
+ }
413
+ );
414
+ }
415
+ var styles3 = import_react_native3.StyleSheet.create({
416
+ container: {
417
+ flexDirection: "row",
418
+ alignItems: "center",
419
+ gap: tokens.space2
420
+ },
421
+ checkbox: {
422
+ borderWidth: 1.5,
423
+ borderColor: tokens.colorMuted,
424
+ borderRadius: 3,
425
+ backgroundColor: tokens.colorBg,
426
+ alignItems: "center",
427
+ justifyContent: "center"
428
+ },
429
+ checked: {
430
+ backgroundColor: tokens.colorBrand,
431
+ borderColor: tokens.colorBrand
432
+ },
433
+ disabled: {
434
+ opacity: 0.45
435
+ },
436
+ checkmark: {
437
+ color: "#FBFBFB",
438
+ fontSize: 10,
439
+ fontWeight: "bold"
440
+ },
441
+ label: {
442
+ fontSize: tokens.fontsizeSm,
443
+ color: tokens.colorFg,
444
+ lineHeight: 14
445
+ },
446
+ disabledText: {
447
+ opacity: 0.45
448
+ }
449
+ });
450
+
451
+ // src/components/ui/radio/Radio.tsx
452
+ var import_react2 = __toESM(require("react"), 1);
453
+ var import_react_native4 = require("react-native");
454
+ var import_jsx_runtime4 = require("react/jsx-runtime");
455
+ var sizeMap2 = {
456
+ sm: 14,
457
+ md: 16,
458
+ lg: 20
459
+ };
460
+ function Radio({
461
+ value,
462
+ checked,
463
+ onChange,
464
+ label,
465
+ name,
466
+ disabled = false,
467
+ size = "md",
468
+ style: userStyle
469
+ }) {
470
+ const handlePress = () => {
471
+ if (disabled) return;
472
+ onChange?.(value);
473
+ };
474
+ const px = sizeMap2[size];
475
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
476
+ import_react_native4.TouchableOpacity,
477
+ {
478
+ style: [styles4.container, userStyle],
479
+ onPress: handlePress,
480
+ disabled,
481
+ activeOpacity: 0.8,
482
+ children: [
483
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
484
+ import_react_native4.View,
485
+ {
486
+ style: [
487
+ styles4.radio,
488
+ { width: px, height: px },
489
+ checked && styles4.checked,
490
+ disabled && styles4.disabled
491
+ ],
492
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.View, { style: styles4.dot })
493
+ }
494
+ ),
495
+ label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native4.Text, { style: [styles4.label, disabled && styles4.disabledText], children: label })
496
+ ]
497
+ }
498
+ );
499
+ }
500
+ function RadioGroup({
501
+ name,
502
+ value,
503
+ onChange,
504
+ children,
505
+ direction = "vertical",
506
+ gap = 10,
507
+ style: userStyle
508
+ }) {
509
+ const cloned = import_react2.default.Children.map(children, (child) => {
510
+ if (!import_react2.default.isValidElement(child)) return child;
511
+ const childProps = child.props;
512
+ return import_react2.default.cloneElement(child, {
513
+ name,
514
+ ...value !== void 0 && { checked: childProps.value === value },
515
+ ...onChange && { onChange }
516
+ });
517
+ });
518
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
519
+ import_react_native4.View,
520
+ {
521
+ style: [
522
+ styles4.group,
523
+ { flexDirection: direction === "horizontal" ? "row" : "column", gap },
524
+ userStyle
525
+ ],
526
+ children: cloned
527
+ }
528
+ );
529
+ }
530
+ var styles4 = import_react_native4.StyleSheet.create({
531
+ container: {
532
+ flexDirection: "row",
533
+ alignItems: "center",
534
+ gap: tokens.space2
535
+ },
536
+ radio: {
537
+ borderWidth: 1.5,
538
+ borderColor: tokens.colorMuted,
539
+ borderRadius: 50,
540
+ backgroundColor: tokens.colorBg,
541
+ alignItems: "center",
542
+ justifyContent: "center"
543
+ },
544
+ checked: {
545
+ borderColor: tokens.colorBrand
546
+ },
547
+ disabled: {
548
+ opacity: 0.45
549
+ },
550
+ dot: {
551
+ width: 6,
552
+ height: 6,
553
+ borderRadius: 3,
554
+ backgroundColor: tokens.colorBrand
555
+ },
556
+ label: {
557
+ fontSize: tokens.fontsizeSm,
558
+ color: tokens.colorFg,
559
+ lineHeight: 14
560
+ },
561
+ disabledText: {
562
+ opacity: 0.45
563
+ },
564
+ group: {
565
+ flexWrap: "wrap"
566
+ }
567
+ });
568
+
569
+ // src/components/ui/toggle_switch/ToggleSwitch.tsx
570
+ var import_react_native5 = require("react-native");
571
+ var import_jsx_runtime5 = require("react/jsx-runtime");
572
+ function ToggleSwitch({
573
+ checked,
574
+ onValueChange,
575
+ label,
576
+ disabled = false,
577
+ style: userStyle
578
+ }) {
579
+ const handlePress = () => {
580
+ if (disabled) return;
581
+ onValueChange(!checked);
582
+ };
583
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
584
+ import_react_native5.TouchableOpacity,
585
+ {
586
+ style: [styles5.container, userStyle],
587
+ onPress: handlePress,
588
+ disabled,
589
+ activeOpacity: 0.8,
590
+ children: [
591
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
592
+ import_react_native5.View,
593
+ {
594
+ style: [
595
+ styles5.switch,
596
+ { backgroundColor: checked ? tokens.colorBrand : tokens.colorMuted },
597
+ disabled && styles5.disabled
598
+ ],
599
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
600
+ import_react_native5.View,
601
+ {
602
+ style: [
603
+ styles5.thumb,
604
+ { transform: [{ translateX: checked ? 18 : 0 }] }
605
+ ]
606
+ }
607
+ )
608
+ }
609
+ ),
610
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.Text, { style: [styles5.label, disabled && styles5.disabledText], children: label })
611
+ ]
612
+ }
613
+ );
614
+ }
615
+ var styles5 = import_react_native5.StyleSheet.create({
616
+ container: {
617
+ flexDirection: "row",
618
+ alignItems: "center",
619
+ gap: tokens.space3
620
+ },
621
+ switch: {
622
+ width: 40,
623
+ height: 22,
624
+ borderRadius: 11,
625
+ justifyContent: "center",
626
+ paddingHorizontal: 3
627
+ },
628
+ thumb: {
629
+ width: 16,
630
+ height: 16,
631
+ borderRadius: 8,
632
+ backgroundColor: tokens.colorBg,
633
+ shadowColor: "#000",
634
+ shadowOffset: { width: 0, height: 1 },
635
+ shadowOpacity: 0.2,
636
+ shadowRadius: 1,
637
+ elevation: 2
638
+ },
639
+ disabled: {
640
+ opacity: 0.5
641
+ },
642
+ label: {
643
+ fontSize: tokens.fontsizeSm,
644
+ color: tokens.colorFg
645
+ },
646
+ disabledText: {
647
+ opacity: 0.5
648
+ }
649
+ });
650
+
651
+ // src/components/ui/badge/Badge.tsx
652
+ var import_react_native6 = require("react-native");
653
+ var import_jsx_runtime6 = require("react/jsx-runtime");
654
+ var variantMap = {
655
+ default: {
656
+ bg: tokens.cSurfaceElevated,
657
+ border: tokens.cBorder,
658
+ color: tokens.colorFg
659
+ },
660
+ info: {
661
+ bg: tokens.cBrandSubtle,
662
+ border: tokens.cBrandBorder,
663
+ color: tokens.colorBrand
664
+ },
665
+ success: {
666
+ bg: tokens.cSuccessSubtle,
667
+ border: tokens.cSuccessBorder,
668
+ color: tokens.colorSuccess
669
+ },
670
+ warning: {
671
+ bg: tokens.cWarningSubtle,
672
+ border: tokens.cWarningBorder,
673
+ color: tokens.colorWarning
674
+ },
675
+ error: {
676
+ bg: tokens.cBrandSubtle,
677
+ border: tokens.cBrandBorder,
678
+ color: tokens.colorError
679
+ }
680
+ };
681
+ var sizeMap3 = {
682
+ sm: { fontSize: tokens.fontsize2xs, paddingHorizontal: 6, paddingVertical: 1, dotSize: 6 },
683
+ md: { fontSize: tokens.fontsizeXs, paddingHorizontal: 8, paddingVertical: 2, dotSize: 8 },
684
+ lg: { fontSize: tokens.fontsizeXs, paddingHorizontal: 10, paddingVertical: 3, dotSize: 10 }
685
+ };
686
+ function Badge({
687
+ variant = "default",
688
+ size = "md",
689
+ children,
690
+ dot = false,
691
+ outlined = false,
692
+ max,
693
+ style: userStyle,
694
+ textStyle: userTextStyle
695
+ }) {
696
+ const { bg, border, color } = variantMap[variant];
697
+ const { fontSize, paddingHorizontal, paddingVertical, dotSize } = sizeMap3[size];
698
+ let content = children;
699
+ if (!dot && max !== void 0 && typeof children === "number" && children > max) {
700
+ content = `${max}+`;
701
+ }
702
+ if (dot) {
703
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
704
+ import_react_native6.View,
705
+ {
706
+ style: [
707
+ styles6.dot,
708
+ { width: dotSize, height: dotSize, backgroundColor: outlined ? "transparent" : color, borderColor: color },
709
+ userStyle
710
+ ]
711
+ }
712
+ );
713
+ }
714
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
715
+ import_react_native6.View,
716
+ {
717
+ style: [
718
+ styles6.badge,
719
+ {
720
+ paddingHorizontal,
721
+ paddingVertical,
722
+ backgroundColor: outlined ? "transparent" : bg,
723
+ borderColor: border
724
+ },
725
+ userStyle
726
+ ],
727
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
728
+ import_react_native6.Text,
729
+ {
730
+ style: [
731
+ styles6.text,
732
+ { fontSize, color },
733
+ userTextStyle
734
+ ],
735
+ children: content
736
+ }
737
+ )
738
+ }
739
+ );
740
+ }
741
+ var styles6 = import_react_native6.StyleSheet.create({
742
+ badge: {
743
+ borderWidth: 1,
744
+ borderRadius: tokens.radiusFull,
745
+ alignSelf: "flex-start"
746
+ },
747
+ text: {
748
+ fontWeight: "600",
749
+ textAlign: "center"
750
+ },
751
+ dot: {
752
+ borderWidth: 1.5,
753
+ borderRadius: 50
754
+ }
755
+ });
756
+
757
+ // src/components/ui/tabs/Tabs.tsx
758
+ var import_react_native7 = require("react-native");
759
+ var import_jsx_runtime7 = require("react/jsx-runtime");
760
+ var sizeMap4 = {
761
+ sm: { fontSize: tokens.fontsizeXs, paddingHorizontal: tokens.space3, paddingVertical: tokens.space2 },
762
+ md: { fontSize: tokens.fontsizeSm, paddingHorizontal: tokens.space4, paddingVertical: tokens.space2 },
763
+ lg: { fontSize: tokens.fontsizeMedium, paddingHorizontal: tokens.space5, paddingVertical: tokens.space3 }
764
+ };
765
+ var getVariantStyles = (variant) => {
766
+ switch (variant) {
767
+ case "underline":
768
+ return {
769
+ container: { borderBottomWidth: 1, borderBottomColor: tokens.cBorder },
770
+ tab: { borderBottomWidth: 2, borderBottomColor: "transparent" },
771
+ activeTab: { borderBottomColor: tokens.colorBrand }
772
+ };
773
+ case "pills":
774
+ return {
775
+ container: {},
776
+ tab: { borderRadius: tokens.radiusSm },
777
+ activeTab: { backgroundColor: tokens.cBrandSubtle }
778
+ };
779
+ case "boxed":
780
+ return {
781
+ container: { backgroundColor: tokens.cSurfaceElevated, padding: 4, borderRadius: tokens.radiusMd },
782
+ tab: { borderRadius: tokens.radiusSm },
783
+ activeTab: { backgroundColor: tokens.colorBg, shadowColor: "#000", shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.08, shadowRadius: 3, elevation: 1 }
784
+ };
785
+ default:
786
+ return {};
787
+ }
788
+ };
789
+ function Tabs({
790
+ tabs,
791
+ value,
792
+ onChange,
793
+ variant = "underline",
794
+ size = "md",
795
+ fullWidth = false,
796
+ style: userStyle
797
+ }) {
798
+ const config = sizeMap4[size];
799
+ const variantStyles3 = getVariantStyles(variant);
800
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
801
+ import_react_native7.ScrollView,
802
+ {
803
+ horizontal: true,
804
+ showsHorizontalScrollIndicator: false,
805
+ style: [styles7.container, variantStyles3.container, userStyle],
806
+ contentContainerStyle: fullWidth ? { flex: 1 } : void 0,
807
+ children: tabs.map((tab) => {
808
+ const isActive = tab.value === value;
809
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
810
+ import_react_native7.TouchableOpacity,
811
+ {
812
+ style: [
813
+ styles7.tab,
814
+ config,
815
+ variantStyles3.tab,
816
+ isActive && variantStyles3.activeTab,
817
+ fullWidth && { flex: 1 },
818
+ tab.disabled && styles7.disabled
819
+ ],
820
+ onPress: () => !tab.disabled && onChange(tab.value),
821
+ disabled: tab.disabled,
822
+ activeOpacity: 0.8,
823
+ children: [
824
+ tab.icon,
825
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native7.Text, { style: [styles7.label, { fontSize: config.fontSize, color: isActive ? tokens.colorFg : tokens.colorMuted }], children: tab.label })
826
+ ]
827
+ },
828
+ tab.value
829
+ );
830
+ })
831
+ }
832
+ );
833
+ }
834
+ function TabPanel({ value, activeValue, children, style: userStyle }) {
835
+ if (value !== activeValue) return null;
836
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native7.View, { style: userStyle, children });
837
+ }
838
+ var styles7 = import_react_native7.StyleSheet.create({
839
+ container: {
840
+ flexDirection: "row"
841
+ },
842
+ tab: {
843
+ flexDirection: "row",
844
+ alignItems: "center",
845
+ gap: 6,
846
+ marginRight: 2
847
+ },
848
+ label: {
849
+ fontWeight: "500"
850
+ },
851
+ disabled: {
852
+ opacity: 0.4
853
+ }
854
+ });
855
+
856
+ // src/components/ui/alert/Alert.tsx
857
+ var import_react_native8 = require("react-native");
858
+ var import_jsx_runtime8 = require("react/jsx-runtime");
859
+ var variantMap2 = {
860
+ info: {
861
+ bg: tokens.cBrandSubtle,
862
+ border: tokens.cBrandBorder,
863
+ accent: tokens.colorBrand,
864
+ icon: "\u2139\uFE0F"
865
+ },
866
+ success: {
867
+ bg: tokens.cSuccessSubtle,
868
+ border: tokens.cSuccessBorder,
869
+ accent: tokens.colorSuccess,
870
+ icon: "\u2705"
871
+ },
872
+ warning: {
873
+ bg: tokens.cWarningSubtle,
874
+ border: tokens.cWarningBorder,
875
+ accent: tokens.colorWarning,
876
+ icon: "\u26A0\uFE0F"
877
+ },
878
+ error: {
879
+ bg: tokens.cBrandSubtle,
880
+ border: tokens.cBrandBorder,
881
+ accent: tokens.colorError,
882
+ icon: "\u274C"
883
+ }
884
+ };
885
+ function Alert({
886
+ variant = "info",
887
+ title,
888
+ children,
889
+ dismissible = false,
890
+ onDismiss,
891
+ icon = true,
892
+ fullWidth = false,
893
+ style: userStyle
894
+ }) {
895
+ const config = variantMap2[variant];
896
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
897
+ import_react_native8.View,
898
+ {
899
+ style: [
900
+ styles8.alert,
901
+ { backgroundColor: config.bg, borderColor: config.border },
902
+ fullWidth && { width: "100%" },
903
+ userStyle
904
+ ],
905
+ children: [
906
+ icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: styles8.icon, children: config.icon }),
907
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { style: styles8.content, children: [
908
+ title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: styles8.title, children: title }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: styles8.message, children })
910
+ ] }),
911
+ dismissible && onDismiss && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.TouchableOpacity, { onPress: onDismiss, style: styles8.dismiss, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { style: styles8.dismissText, children: "\u2715" }) })
912
+ ]
913
+ }
914
+ );
915
+ }
916
+ var styles8 = import_react_native8.StyleSheet.create({
917
+ alert: {
918
+ borderWidth: 1,
919
+ borderRadius: tokens.radiusMd,
920
+ padding: tokens.space3,
921
+ flexDirection: "row",
922
+ alignItems: "flex-start"
923
+ },
924
+ icon: {
925
+ fontSize: 16,
926
+ marginRight: tokens.space3,
927
+ marginTop: 2
928
+ },
929
+ content: {
930
+ flex: 1
931
+ },
932
+ title: {
933
+ fontWeight: "600",
934
+ fontSize: tokens.fontsizeSm,
935
+ color: tokens.colorFg,
936
+ marginBottom: 4
937
+ },
938
+ message: {
939
+ fontSize: tokens.fontsizeSm,
940
+ color: tokens.colorFg,
941
+ lineHeight: 20
942
+ },
943
+ dismiss: {
944
+ padding: tokens.space1,
945
+ borderRadius: tokens.radiusSm,
946
+ marginLeft: tokens.space3
947
+ },
948
+ dismissText: {
949
+ fontSize: 14,
950
+ color: tokens.colorFg,
951
+ opacity: 0.6
952
+ }
953
+ });
954
+
955
+ // src/components/ui/progress_bar/ProgressBar.tsx
956
+ var import_react3 = require("react");
957
+ var import_react_native9 = require("react-native");
958
+ var import_jsx_runtime9 = require("react/jsx-runtime");
959
+ var colorMap = {
960
+ brand: tokens.colorBrand,
961
+ green: tokens.colorSuccess,
962
+ amber: tokens.colorWarning,
963
+ red: tokens.colorError
964
+ };
965
+ var trackColorMap = {
966
+ brand: tokens.cBrandSubtle,
967
+ green: tokens.cSuccessSubtle,
968
+ amber: tokens.cWarningSubtle,
969
+ red: tokens.cBrandSubtle
970
+ };
971
+ var sizeMap5 = {
972
+ sm: 4,
973
+ md: 8
974
+ };
975
+ function ProgressBar({
976
+ value,
977
+ max = 100,
978
+ label,
979
+ colorScheme = "brand",
980
+ size = "md",
981
+ showValue = false,
982
+ animate = true,
983
+ duration = 800,
984
+ style: userStyle
985
+ }) {
986
+ const clamped = Math.min(Math.max(value, 0), max);
987
+ const percent = clamped / max * 100;
988
+ const barColor = colorMap[colorScheme];
989
+ const trackColor = trackColorMap[colorScheme];
990
+ const height = sizeMap5[size];
991
+ const animatedWidth = (0, import_react3.useRef)(new import_react_native9.Animated.Value(0)).current;
992
+ (0, import_react3.useEffect)(() => {
993
+ if (animate) {
994
+ import_react_native9.Animated.timing(animatedWidth, {
995
+ toValue: percent,
996
+ duration,
997
+ useNativeDriver: false
998
+ }).start();
999
+ } else {
1000
+ animatedWidth.setValue(percent);
1001
+ }
1002
+ }, [percent, animate, duration, animatedWidth]);
1003
+ const widthInterpolation = animatedWidth.interpolate({
1004
+ inputRange: [0, 100],
1005
+ outputRange: ["0%", "100%"]
1006
+ });
1007
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.View, { style: [styles9.container, userStyle], children: [
1008
+ (label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.View, { style: styles9.header, children: [
1009
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.Text, { style: styles9.label, children: label }),
1010
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native9.Text, { style: styles9.value, children: [
1011
+ Math.round(percent),
1012
+ "%"
1013
+ ] })
1014
+ ] }),
1015
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1016
+ import_react_native9.View,
1017
+ {
1018
+ style: [styles9.track, { height, backgroundColor: trackColor }],
1019
+ accessible: true,
1020
+ accessibilityRole: "progressbar",
1021
+ accessibilityValue: { now: clamped, min: 0, max },
1022
+ accessibilityLabel: label,
1023
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1024
+ import_react_native9.Animated.View,
1025
+ {
1026
+ style: [
1027
+ styles9.bar,
1028
+ { height, backgroundColor: barColor, width: widthInterpolation }
1029
+ ]
1030
+ }
1031
+ )
1032
+ }
1033
+ )
1034
+ ] });
1035
+ }
1036
+ var styles9 = import_react_native9.StyleSheet.create({
1037
+ container: {
1038
+ gap: tokens.space1
1039
+ },
1040
+ header: {
1041
+ flexDirection: "row",
1042
+ justifyContent: "space-between",
1043
+ alignItems: "center"
1044
+ },
1045
+ label: {
1046
+ fontSize: tokens.fontsizeXs,
1047
+ color: tokens.colorMuted,
1048
+ fontWeight: "500"
1049
+ },
1050
+ value: {
1051
+ fontSize: tokens.fontsizeXs,
1052
+ color: tokens.colorMuted,
1053
+ fontWeight: "600",
1054
+ fontVariant: ["tabular-nums"]
1055
+ },
1056
+ track: {
1057
+ width: "100%",
1058
+ borderRadius: tokens.radiusFull,
1059
+ overflow: "hidden"
1060
+ },
1061
+ bar: {
1062
+ borderRadius: tokens.radiusFull
1063
+ }
1064
+ });
1065
+
1066
+ // src/components/ui/spinner/Spinner.tsx
1067
+ var import_react_native10 = require("react-native");
1068
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1069
+ var variantMap3 = {
1070
+ default: tokens.colorMuted,
1071
+ brand: tokens.colorBrand,
1072
+ success: tokens.colorSuccess,
1073
+ warning: tokens.colorWarning,
1074
+ error: tokens.colorError,
1075
+ white: "#FBFBFB"
1076
+ };
1077
+ function Spinner({
1078
+ size = "large",
1079
+ variant = "brand",
1080
+ label = "Loading...",
1081
+ style: userStyle
1082
+ }) {
1083
+ const color = variantMap3[variant];
1084
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { style: [styles10.container, userStyle], accessible: true, accessibilityRole: "progressbar", accessibilityLabel: label, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.ActivityIndicator, { size, color }) });
1085
+ }
1086
+ var styles10 = import_react_native10.StyleSheet.create({
1087
+ container: {
1088
+ justifyContent: "center",
1089
+ alignItems: "center"
1090
+ }
1091
+ });
1092
+
1093
+ // src/components/ui/select/Select.tsx
1094
+ var import_react4 = require("react");
1095
+ var import_react_native11 = require("react-native");
1096
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1097
+ var sizeStyles3 = (size) => {
1098
+ switch (size) {
1099
+ case "sm":
1100
+ return { height: 28, paddingHorizontal: tokens.space3, fontSize: tokens.fontsizeXs };
1101
+ case "md":
1102
+ return { height: tokens.heightInput, paddingHorizontal: tokens.space4, fontSize: tokens.fontsizeSm };
1103
+ case "lg":
1104
+ return { height: 44, paddingHorizontal: tokens.space5, fontSize: tokens.fontsizeMedium };
1105
+ default:
1106
+ return {};
1107
+ }
1108
+ };
1109
+ function Select({
1110
+ value,
1111
+ onChange,
1112
+ options,
1113
+ label,
1114
+ placeholder,
1115
+ helperText,
1116
+ errorText,
1117
+ disabled = false,
1118
+ size = "md",
1119
+ fullWidth = false,
1120
+ style: userStyle
1121
+ }) {
1122
+ const [modalVisible, setModalVisible] = (0, import_react4.useState)(false);
1123
+ const hasError = Boolean(errorText);
1124
+ const config = sizeStyles3(size);
1125
+ const selectedOption = options.find((opt) => opt.value === value);
1126
+ const displayText = selectedOption ? selectedOption.label : placeholder || "Select...";
1127
+ const handleSelect = (option) => {
1128
+ if (!option.disabled) {
1129
+ onChange(option.value);
1130
+ setModalVisible(false);
1131
+ }
1132
+ };
1133
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native11.View, { style: [styles11.container, fullWidth && { width: "100%" }, userStyle], children: [
1134
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: styles11.label, children: label }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1136
+ import_react_native11.TouchableOpacity,
1137
+ {
1138
+ style: [
1139
+ styles11.select,
1140
+ config,
1141
+ hasError && { borderColor: tokens.colorError },
1142
+ disabled && { opacity: 0.5 }
1143
+ ],
1144
+ onPress: () => !disabled && setModalVisible(true),
1145
+ disabled,
1146
+ activeOpacity: 0.8,
1147
+ children: [
1148
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: [styles11.selectText, { fontSize: config.fontSize, color: selectedOption ? tokens.colorFg : tokens.colorMuted }], children: displayText }),
1149
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: styles11.arrow, children: "\u25BC" })
1150
+ ]
1151
+ }
1152
+ ),
1153
+ (errorText || helperText) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: [styles11.helper, hasError && { color: tokens.colorError }], children: errorText ?? helperText }),
1154
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1155
+ import_react_native11.Modal,
1156
+ {
1157
+ visible: modalVisible,
1158
+ transparent: true,
1159
+ animationType: "slide",
1160
+ onRequestClose: () => setModalVisible(false),
1161
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { style: styles11.modalOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native11.View, { style: styles11.modalContent, children: [
1162
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1163
+ import_react_native11.FlatList,
1164
+ {
1165
+ data: options,
1166
+ keyExtractor: (item) => item.value,
1167
+ renderItem: ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1168
+ import_react_native11.TouchableOpacity,
1169
+ {
1170
+ style: [styles11.option, item.disabled && styles11.disabledOption],
1171
+ onPress: () => handleSelect(item),
1172
+ disabled: item.disabled,
1173
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: [styles11.optionText, item.disabled && styles11.disabledText], children: item.label })
1174
+ }
1175
+ )
1176
+ }
1177
+ ),
1178
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.TouchableOpacity, { style: styles11.closeButton, onPress: () => setModalVisible(false), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { style: styles11.closeText, children: "Close" }) })
1179
+ ] }) })
1180
+ }
1181
+ )
1182
+ ] });
1183
+ }
1184
+ var styles11 = import_react_native11.StyleSheet.create({
1185
+ container: {
1186
+ marginBottom: tokens.space2
1187
+ },
1188
+ label: {
1189
+ marginBottom: tokens.space1,
1190
+ fontSize: tokens.fontsizeSm,
1191
+ fontWeight: "500",
1192
+ color: tokens.colorFg
1193
+ },
1194
+ select: {
1195
+ flexDirection: "row",
1196
+ alignItems: "center",
1197
+ justifyContent: "space-between",
1198
+ borderWidth: 1,
1199
+ borderColor: tokens.cBorder,
1200
+ borderRadius: tokens.radiusSm,
1201
+ backgroundColor: tokens.colorBg
1202
+ },
1203
+ selectText: {
1204
+ flex: 1,
1205
+ color: tokens.colorFg
1206
+ },
1207
+ arrow: {
1208
+ marginRight: tokens.space3,
1209
+ fontSize: 12,
1210
+ color: tokens.colorMuted
1211
+ },
1212
+ helper: {
1213
+ marginTop: tokens.space1,
1214
+ fontSize: tokens.fontsizeXs,
1215
+ color: tokens.colorMuted,
1216
+ lineHeight: 14
1217
+ },
1218
+ modalOverlay: {
1219
+ flex: 1,
1220
+ justifyContent: "flex-end",
1221
+ backgroundColor: "rgba(0,0,0,0.5)"
1222
+ },
1223
+ modalContent: {
1224
+ backgroundColor: tokens.colorBg,
1225
+ borderTopLeftRadius: tokens.radiusMd,
1226
+ borderTopRightRadius: tokens.radiusMd,
1227
+ maxHeight: "50%"
1228
+ },
1229
+ option: {
1230
+ padding: tokens.space4,
1231
+ borderBottomWidth: 1,
1232
+ borderBottomColor: tokens.cBorder
1233
+ },
1234
+ optionText: {
1235
+ fontSize: tokens.fontsizeSm,
1236
+ color: tokens.colorFg
1237
+ },
1238
+ disabledOption: {
1239
+ opacity: 0.5
1240
+ },
1241
+ disabledText: {
1242
+ color: tokens.colorMuted
1243
+ },
1244
+ closeButton: {
1245
+ padding: tokens.space4,
1246
+ alignItems: "center",
1247
+ backgroundColor: tokens.cSurfaceElevated
1248
+ },
1249
+ closeText: {
1250
+ fontSize: tokens.fontsizeSm,
1251
+ color: tokens.colorBrand,
1252
+ fontWeight: "600"
1253
+ }
1254
+ });
1255
+
1256
+ // src/components/ui/textarea/Textarea.tsx
1257
+ var import_react_native12 = require("react-native");
1258
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1259
+ var sizeStyles4 = (size) => {
1260
+ switch (size) {
1261
+ case "sm":
1262
+ return { paddingHorizontal: tokens.space3, paddingVertical: tokens.space2, fontSize: tokens.fontsizeXs };
1263
+ case "md":
1264
+ return { paddingHorizontal: tokens.space4, paddingVertical: tokens.space3, fontSize: tokens.fontsizeSm };
1265
+ case "lg":
1266
+ return { paddingHorizontal: tokens.space5, paddingVertical: tokens.space4, fontSize: tokens.fontsizeMedium };
1267
+ default:
1268
+ return {};
1269
+ }
1270
+ };
1271
+ function Textarea({
1272
+ value,
1273
+ onChangeText,
1274
+ label,
1275
+ placeholder,
1276
+ helperText,
1277
+ errorText,
1278
+ disabled = false,
1279
+ editable = true,
1280
+ size = "md",
1281
+ fullWidth = false,
1282
+ numberOfLines = 4,
1283
+ maxLength,
1284
+ style: userStyle,
1285
+ inputStyle: userInputStyle
1286
+ }) {
1287
+ const hasError = Boolean(errorText);
1288
+ const isEditable = editable && !disabled;
1289
+ const config = sizeStyles4(size);
1290
+ const isAtLimit = maxLength !== void 0 && value.length >= maxLength;
1291
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: [styles12.container, fullWidth && { width: "100%" }, userStyle], children: [
1292
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: styles12.label, children: label }),
1293
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1294
+ import_react_native12.TextInput,
1295
+ {
1296
+ value,
1297
+ onChangeText,
1298
+ placeholder,
1299
+ placeholderTextColor: tokens.colorMuted,
1300
+ multiline: true,
1301
+ numberOfLines,
1302
+ editable: isEditable,
1303
+ maxLength,
1304
+ style: [
1305
+ styles12.input,
1306
+ config,
1307
+ { borderColor: hasError ? tokens.colorError : tokens.cBorder },
1308
+ !isEditable && { backgroundColor: tokens.colorMuted },
1309
+ userInputStyle
1310
+ ]
1311
+ }
1312
+ ),
1313
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.View, { style: styles12.footer, children: [
1314
+ (errorText || helperText) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Text, { style: [styles12.helper, hasError && { color: tokens.colorError }], children: errorText ?? helperText }),
1315
+ maxLength !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native12.Text, { style: [styles12.counter, isAtLimit && { color: tokens.colorError }], children: [
1316
+ value.length,
1317
+ "/",
1318
+ maxLength
1319
+ ] })
1320
+ ] })
1321
+ ] });
1322
+ }
1323
+ var styles12 = import_react_native12.StyleSheet.create({
1324
+ container: {
1325
+ marginBottom: tokens.space2
1326
+ },
1327
+ label: {
1328
+ marginBottom: tokens.space1,
1329
+ fontSize: tokens.fontsizeSm,
1330
+ fontWeight: "500",
1331
+ color: tokens.colorFg
1332
+ },
1333
+ input: {
1334
+ borderWidth: 1,
1335
+ borderRadius: tokens.radiusSm,
1336
+ backgroundColor: tokens.colorBg,
1337
+ color: tokens.colorFg,
1338
+ textAlignVertical: "top",
1339
+ minHeight: 80
1340
+ },
1341
+ footer: {
1342
+ flexDirection: "row",
1343
+ justifyContent: "space-between",
1344
+ alignItems: "flex-start",
1345
+ marginTop: tokens.space1
1346
+ },
1347
+ helper: {
1348
+ flex: 1,
1349
+ fontSize: tokens.fontsizeXs,
1350
+ color: tokens.colorMuted,
1351
+ lineHeight: 14
1352
+ },
1353
+ counter: {
1354
+ fontSize: tokens.fontsizeXs,
1355
+ color: tokens.colorMuted,
1356
+ marginLeft: tokens.space2
1357
+ }
1358
+ });
1359
+
1360
+ // src/components/ui/accordion/Accordion.tsx
1361
+ var import_react5 = __toESM(require("react"), 1);
1362
+ var import_react_native13 = require("react-native");
1363
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1364
+ var sizeMap6 = {
1365
+ sm: { paddingVertical: 8, paddingHorizontal: 12, fontSize: tokens.fontsizeXs },
1366
+ md: { paddingVertical: 12, paddingHorizontal: 16, fontSize: tokens.fontsizeSm },
1367
+ lg: { paddingVertical: 16, paddingHorizontal: 20, fontSize: tokens.fontsizeMedium }
1368
+ };
1369
+ var getVariantStyles2 = (variant) => {
1370
+ switch (variant) {
1371
+ case "bordered":
1372
+ return {
1373
+ container: { borderWidth: 1, borderColor: tokens.cBorder, borderRadius: tokens.radiusMd, overflow: "hidden" },
1374
+ item: {},
1375
+ separator: { borderTopWidth: 1, borderTopColor: tokens.cBorder }
1376
+ };
1377
+ case "separated":
1378
+ return {
1379
+ container: { gap: 8 },
1380
+ item: { borderWidth: 1, borderColor: tokens.cBorder, borderRadius: tokens.radiusMd, overflow: "hidden" },
1381
+ separator: {}
1382
+ };
1383
+ case "ghost":
1384
+ return {
1385
+ container: {},
1386
+ item: {},
1387
+ separator: { borderTopWidth: 1, borderTopColor: tokens.cBorder }
1388
+ };
1389
+ default:
1390
+ return {
1391
+ container: {},
1392
+ item: {},
1393
+ separator: {}
1394
+ };
1395
+ }
1396
+ };
1397
+ function Accordion({
1398
+ children,
1399
+ variant = "bordered",
1400
+ size = "md",
1401
+ style: userStyle
1402
+ }) {
1403
+ const variantStyles3 = getVariantStyles2(variant);
1404
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: [variantStyles3.container, userStyle], children: import_react5.default.Children.map(children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native13.View, { children: [
1405
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: variantStyles3.separator }),
1406
+ child
1407
+ ] }, index)) });
1408
+ }
1409
+ function AccordionItem({
1410
+ title,
1411
+ children,
1412
+ open: controlledOpen,
1413
+ onToggle,
1414
+ disabled = false,
1415
+ icon,
1416
+ style: userStyle
1417
+ }) {
1418
+ const [internalOpen, setInternalOpen] = (0, import_react5.useState)(false);
1419
+ const isControlled = controlledOpen !== void 0;
1420
+ const isOpen = isControlled ? controlledOpen : internalOpen;
1421
+ const animatedHeight = (0, import_react5.useRef)(new import_react_native13.Animated.Value(0)).current;
1422
+ const toggle = () => {
1423
+ if (disabled) return;
1424
+ const newOpen = !isOpen;
1425
+ if (isControlled) {
1426
+ onToggle?.(newOpen);
1427
+ } else {
1428
+ setInternalOpen(newOpen);
1429
+ }
1430
+ };
1431
+ import_react5.default.useEffect(() => {
1432
+ import_react_native13.Animated.timing(animatedHeight, {
1433
+ toValue: isOpen ? 1 : 0,
1434
+ duration: 200,
1435
+ useNativeDriver: false
1436
+ }).start();
1437
+ }, [isOpen, animatedHeight]);
1438
+ const contentHeight = animatedHeight.interpolate({
1439
+ inputRange: [0, 1],
1440
+ outputRange: [0, 200]
1441
+ // Adjust based on content
1442
+ });
1443
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native13.View, { style: [styles13.item, userStyle], children: [
1444
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1445
+ import_react_native13.TouchableOpacity,
1446
+ {
1447
+ style: [styles13.header, disabled && styles13.disabled],
1448
+ onPress: toggle,
1449
+ disabled,
1450
+ activeOpacity: 0.8,
1451
+ children: [
1452
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native13.View, { style: styles13.titleContainer, children: [
1453
+ icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: styles13.icon, children: icon }),
1454
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: [styles13.title, disabled && styles13.disabledText], children: title })
1455
+ ] }),
1456
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Text, { style: [styles13.arrow, { transform: [{ rotate: isOpen ? "180deg" : "0deg" }] }], children: "\u25BC" })
1457
+ ]
1458
+ }
1459
+ ),
1460
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.Animated.View, { style: [styles13.content, { height: contentHeight }], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native13.View, { style: styles13.contentInner, children }) })
1461
+ ] });
1462
+ }
1463
+ var styles13 = import_react_native13.StyleSheet.create({
1464
+ item: {
1465
+ overflow: "hidden"
1466
+ },
1467
+ header: {
1468
+ flexDirection: "row",
1469
+ alignItems: "center",
1470
+ justifyContent: "space-between",
1471
+ paddingVertical: 12,
1472
+ paddingHorizontal: 16,
1473
+ backgroundColor: "transparent"
1474
+ },
1475
+ titleContainer: {
1476
+ flexDirection: "row",
1477
+ alignItems: "center",
1478
+ flex: 1
1479
+ },
1480
+ icon: {
1481
+ marginRight: 8
1482
+ },
1483
+ title: {
1484
+ fontSize: tokens.fontsizeSm,
1485
+ fontWeight: "500",
1486
+ color: tokens.colorFg,
1487
+ flex: 1
1488
+ },
1489
+ arrow: {
1490
+ fontSize: 12,
1491
+ color: tokens.colorMuted
1492
+ },
1493
+ disabled: {
1494
+ opacity: 0.45
1495
+ },
1496
+ disabledText: {
1497
+ opacity: 0.45
1498
+ },
1499
+ content: {
1500
+ overflow: "hidden"
1501
+ },
1502
+ contentInner: {
1503
+ paddingHorizontal: 16,
1504
+ paddingBottom: 12
1505
+ }
1506
+ });
1507
+
1508
+ // src/components/ui/callout/Callout.tsx
1509
+ var import_react_native14 = require("react-native");
1510
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1511
+ var variantMap4 = {
1512
+ info: {
1513
+ bg: tokens.cBrandSubtle,
1514
+ border: tokens.cBrandBorder,
1515
+ accent: tokens.colorBrand,
1516
+ icon: "\u2139\uFE0F",
1517
+ defaultTitle: "Info"
1518
+ },
1519
+ warning: {
1520
+ bg: tokens.cWarningSubtle,
1521
+ border: tokens.cWarningBorder,
1522
+ accent: tokens.colorWarning,
1523
+ icon: "\u26A0\uFE0F",
1524
+ defaultTitle: "Attention"
1525
+ },
1526
+ tip: {
1527
+ bg: tokens.cSuccessSubtle,
1528
+ border: tokens.cSuccessBorder,
1529
+ accent: tokens.colorSuccess,
1530
+ icon: "\u{1F4A1}",
1531
+ defaultTitle: "Astuce"
1532
+ },
1533
+ danger: {
1534
+ bg: tokens.cBrandSubtle,
1535
+ border: tokens.cBrandBorder,
1536
+ accent: tokens.colorError,
1537
+ icon: "\u{1F6A8}",
1538
+ defaultTitle: "Danger"
1539
+ }
1540
+ };
1541
+ function Callout({
1542
+ variant = "info",
1543
+ title,
1544
+ children,
1545
+ style: userStyle
1546
+ }) {
1547
+ const config = variantMap4[variant];
1548
+ const displayTitle = title ?? config.defaultTitle;
1549
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: [styles14.callout, { backgroundColor: config.bg, borderColor: config.border }, userStyle], children: [
1550
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native14.Text, { style: styles14.icon, children: config.icon }),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native14.View, { style: styles14.content, children: [
1552
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native14.Text, { style: [styles14.title, { color: config.accent, marginBottom: children ? tokens.space1 : 0 }], children: displayTitle }),
1553
+ children && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native14.Text, { style: styles14.body, children })
1554
+ ] })
1555
+ ] });
1556
+ }
1557
+ var styles14 = import_react_native14.StyleSheet.create({
1558
+ callout: {
1559
+ borderWidth: 1,
1560
+ borderLeftWidth: 3,
1561
+ borderRadius: tokens.radiusMd,
1562
+ padding: tokens.space3,
1563
+ flexDirection: "row",
1564
+ alignItems: "flex-start"
1565
+ },
1566
+ icon: {
1567
+ fontSize: 16,
1568
+ marginRight: tokens.space3,
1569
+ marginTop: 2
1570
+ },
1571
+ content: {
1572
+ flex: 1
1573
+ },
1574
+ title: {
1575
+ fontSize: tokens.fontsizeSm,
1576
+ fontWeight: "600"
1577
+ },
1578
+ body: {
1579
+ fontSize: tokens.fontsizeSm,
1580
+ color: tokens.colorFg,
1581
+ lineHeight: 20
1582
+ }
1583
+ });
1584
+
1585
+ // src/components/ui/status_label/StatusLabel.tsx
1586
+ var import_react_native15 = require("react-native");
1587
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1588
+ var statusConfig = {
1589
+ active: { icon: "\u2705", color: tokens.colorSuccess, defaultLabel: "Active" },
1590
+ inactive: { icon: "\u274C", color: tokens.colorMuted, defaultLabel: "Inactive" },
1591
+ pending: { icon: "\u23F3", color: tokens.colorWarning, defaultLabel: "Pending" },
1592
+ error: { icon: "\u26A0\uFE0F", color: tokens.colorError, defaultLabel: "Error" }
1593
+ };
1594
+ function StatusLabel({
1595
+ status,
1596
+ label,
1597
+ style: userStyle
1598
+ }) {
1599
+ const config = statusConfig[status];
1600
+ const displayLabel = label ?? config.defaultLabel;
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native15.View, { style: [styles15.container, userStyle], children: [
1602
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.Text, { style: styles15.icon, children: config.icon }),
1603
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native15.Text, { style: [styles15.label, { color: config.color }], children: displayLabel })
1604
+ ] });
1605
+ }
1606
+ var styles15 = import_react_native15.StyleSheet.create({
1607
+ container: {
1608
+ flexDirection: "row",
1609
+ alignItems: "center",
1610
+ gap: 6
1611
+ },
1612
+ icon: {
1613
+ fontSize: 14
1614
+ },
1615
+ label: {
1616
+ fontSize: 13,
1617
+ fontWeight: "500"
1618
+ }
1619
+ });
1620
+
1621
+ // src/components/ui/tag_chip/TagChip.tsx
1622
+ var import_react_native16 = require("react-native");
1623
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1624
+ var variantStyles2 = {
1625
+ default: { color: tokens.colorFg, backgroundColor: tokens.cSurfaceElevated },
1626
+ brand: { color: tokens.colorBrand, backgroundColor: tokens.cBrandSubtle },
1627
+ muted: { color: tokens.colorMuted, backgroundColor: "transparent" }
1628
+ };
1629
+ var sizeStyles5 = {
1630
+ sm: { fontSize: tokens.fontsizeXs, paddingHorizontal: 8, paddingVertical: 2 },
1631
+ md: { fontSize: tokens.fontsizeXs, paddingHorizontal: 10, paddingVertical: 3 }
1632
+ };
1633
+ function TagChip({
1634
+ label,
1635
+ variant = "default",
1636
+ size = "md",
1637
+ style: userStyle,
1638
+ textStyle: userTextStyle
1639
+ }) {
1640
+ const variantStyle = variantStyles2[variant];
1641
+ const sizeStyle = sizeStyles5[size];
1642
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.View, { style: [styles16.chip, variantStyle, sizeStyle, userStyle], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native16.Text, { style: [styles16.label, { color: variantStyle.color }, userTextStyle], children: label }) });
1643
+ }
1644
+ var styles16 = import_react_native16.StyleSheet.create({
1645
+ chip: {
1646
+ borderWidth: 1,
1647
+ borderColor: tokens.cBorder,
1648
+ borderRadius: tokens.radiusSm,
1649
+ alignSelf: "flex-start"
1650
+ },
1651
+ label: {
1652
+ fontWeight: "500"
1653
+ }
1654
+ });
1655
+
1656
+ // src/components/typographie/text/Text.tsx
1657
+ var import_react_native17 = require("react-native");
1658
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1659
+ var textConfig = {
1660
+ "body-sm": {
1661
+ fontSize: tokens.fontsizeMedium,
1662
+ fontWeight: tokens.fontweightMedium
1663
+ },
1664
+ "body-md": {
1665
+ fontSize: tokens.fontsizeXl,
1666
+ fontWeight: tokens.fontweightMedium
1667
+ },
1668
+ "body-lg": {
1669
+ fontSize: tokens.fontsize2xl,
1670
+ fontWeight: tokens.fontweightMedium
1671
+ },
1672
+ caption: {
1673
+ fontSize: tokens.fontsizeXs,
1674
+ fontWeight: tokens.fontweightLight
1675
+ }
1676
+ };
1677
+ var getToneColor = (tone) => {
1678
+ switch (tone) {
1679
+ case "muted":
1680
+ return tokens.colorMuted;
1681
+ case "brand":
1682
+ return tokens.colorBrand;
1683
+ default:
1684
+ return tokens.colorFg;
1685
+ }
1686
+ };
1687
+ function Text16({
1688
+ texte,
1689
+ variant = "body-sm",
1690
+ align = "left",
1691
+ tone = "default",
1692
+ opacity,
1693
+ blurPx,
1694
+ style: userStyle
1695
+ }) {
1696
+ const config = textConfig[variant] || textConfig["body-sm"];
1697
+ const color = getToneColor(tone);
1698
+ const textStyle = {
1699
+ ...config,
1700
+ color,
1701
+ textAlign: align,
1702
+ opacity
1703
+ // Note: blur is not directly supported in RN Text, might need a wrapper View with blur
1704
+ };
1705
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native17.Text, { style: [textStyle, userStyle], children: texte });
1706
+ }
1707
+
1708
+ // src/components/typographie/heading/Heading.tsx
1709
+ var import_react_native18 = require("react-native");
1710
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1711
+ var headingConfig = {
1712
+ 1: {
1713
+ fontSize: tokens.fontsize5xl,
1714
+ fontWeight: tokens.fontweightBlack
1715
+ },
1716
+ 2: {
1717
+ fontSize: tokens.fontsize4xl,
1718
+ fontWeight: tokens.fontweightExtrabold
1719
+ },
1720
+ 3: {
1721
+ fontSize: tokens.fontsize3xl,
1722
+ fontWeight: tokens.fontweightBold
1723
+ },
1724
+ 4: {
1725
+ fontSize: tokens.fontsize2xl,
1726
+ fontWeight: tokens.fontweightSemibold
1727
+ },
1728
+ 5: {
1729
+ fontSize: tokens.fontsizeXl,
1730
+ fontWeight: tokens.fontweightBold
1731
+ },
1732
+ 6: {
1733
+ fontSize: tokens.fontsizeLg,
1734
+ fontWeight: tokens.fontweightMedium
1735
+ }
1736
+ };
1737
+ var getToneColor2 = (tone) => {
1738
+ return tone === "muted" ? tokens.colorMuted : tokens.colorBrand;
1739
+ };
1740
+ function Heading({
1741
+ title,
1742
+ level = 1,
1743
+ align = "left",
1744
+ opacity = 1,
1745
+ blurPx = 0,
1746
+ tone = "brand",
1747
+ style: userStyle
1748
+ }) {
1749
+ const config = headingConfig[level];
1750
+ const color = getToneColor2(tone);
1751
+ const safeOpacity = Math.min(Math.max(opacity, 0), 1);
1752
+ const textStyle = {
1753
+ ...config,
1754
+ color,
1755
+ textAlign: align,
1756
+ opacity: safeOpacity,
1757
+ margin: tokens.space2
1758
+ };
1759
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native18.Text, { style: [textStyle, userStyle], children: title });
1760
+ }
1761
+
1762
+ // src/components/layout/app_shell/AppShell.tsx
1763
+ var import_react_native19 = require("react-native");
1764
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1765
+ function AppShell({
1766
+ header,
1767
+ sidebar,
1768
+ footer,
1769
+ children,
1770
+ sidebarWidth = 232,
1771
+ headerHeight = 60,
1772
+ footerHeight = 60,
1773
+ style: userStyle
1774
+ }) {
1775
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native19.SafeAreaView, { style: [styles17.container, userStyle], children: [
1776
+ header && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: [styles17.header, { height: headerHeight }], children: header }),
1777
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native19.View, { style: styles17.content, children: [
1778
+ sidebar && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: [styles17.sidebar, { width: sidebarWidth }], children: sidebar }),
1779
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: styles17.main, children })
1780
+ ] }),
1781
+ footer && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native19.View, { style: [styles17.footer, { height: footerHeight }], children: footer })
1782
+ ] });
1783
+ }
1784
+ var styles17 = import_react_native19.StyleSheet.create({
1785
+ container: {
1786
+ flex: 1,
1787
+ backgroundColor: tokens.colorBg
1788
+ },
1789
+ header: {
1790
+ backgroundColor: tokens.colorBg
1791
+ },
1792
+ content: {
1793
+ flex: 1,
1794
+ flexDirection: "row"
1795
+ },
1796
+ sidebar: {
1797
+ backgroundColor: tokens.colorBg,
1798
+ borderRightWidth: 1,
1799
+ borderRightColor: tokens.colorMuted
1800
+ },
1801
+ main: {
1802
+ flex: 1,
1803
+ padding: tokens.space6
1804
+ },
1805
+ footer: {
1806
+ backgroundColor: tokens.colorBg,
1807
+ borderTopWidth: 1,
1808
+ borderTopColor: tokens.colorMuted
1809
+ }
1810
+ });
1811
+
1812
+ // src/components/layout/screen/Screen.tsx
1813
+ var import_react_native20 = require("react-native");
1814
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1815
+ function Screen({ children, scrollable = false, style: userStyle }) {
1816
+ const content = scrollable ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.ScrollView, { contentInsetAdjustmentBehavior: "automatic", style: styles18.scroll, children }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.View, { style: styles18.content, children });
1817
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native20.SafeAreaView, { style: [styles18.container, userStyle], children: content });
1818
+ }
1819
+ var styles18 = import_react_native20.StyleSheet.create({
1820
+ container: {
1821
+ flex: 1,
1822
+ backgroundColor: tokens.colorBg
1823
+ },
1824
+ content: {
1825
+ flex: 1
1826
+ },
1827
+ scroll: {
1828
+ flex: 1
1829
+ }
1830
+ });
1831
+
1832
+ // src/components/ui/card/Card.tsx
1833
+ var import_react_native21 = require("react-native");
1834
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1835
+ function Card({
1836
+ children,
1837
+ style,
1838
+ variant = "default",
1839
+ padding = "md"
1840
+ }) {
1841
+ const paddingValue = padding === "sm" ? tokens.space2 : padding === "lg" ? tokens.space6 : tokens.space4;
1842
+ const cardStyle = {
1843
+ backgroundColor: tokens.colorBg,
1844
+ borderRadius: tokens.radiusMd,
1845
+ padding: paddingValue,
1846
+ ...getVariantStyle(variant),
1847
+ ...style
1848
+ };
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native21.View, { style: cardStyle, children });
1850
+ }
1851
+ function getVariantStyle(variant) {
1852
+ switch (variant) {
1853
+ case "elevated":
1854
+ return {
1855
+ shadowColor: "#000",
1856
+ shadowOffset: { width: 0, height: 2 },
1857
+ shadowOpacity: 0.1,
1858
+ shadowRadius: 4,
1859
+ elevation: 3
1860
+ };
1861
+ case "outlined":
1862
+ return {
1863
+ borderWidth: 1,
1864
+ borderColor: tokens.cBorder
1865
+ };
1866
+ default:
1867
+ return {};
1868
+ }
1869
+ }
1870
+ // Annotate the CommonJS export names for ESM import in node:
1871
+ 0 && (module.exports = {
1872
+ Accordion,
1873
+ AccordionItem,
1874
+ Alert,
1875
+ AppShell,
1876
+ Badge,
1877
+ Button,
1878
+ Callout,
1879
+ Card,
1880
+ Checkbox,
1881
+ Heading,
1882
+ Input,
1883
+ ProgressBar,
1884
+ Radio,
1885
+ RadioGroup,
1886
+ Screen,
1887
+ Select,
1888
+ Spinner,
1889
+ StatusLabel,
1890
+ TabPanel,
1891
+ Tabs,
1892
+ TagChip,
1893
+ Text,
1894
+ Textarea,
1895
+ ToggleSwitch,
1896
+ tokens
1897
+ });