react-native-atomic-ui 1.0.2 → 1.0.4

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.
Files changed (85) hide show
  1. package/README.md +336 -34
  2. package/dist/advanced/date-picker/index.d.ts +2 -1
  3. package/dist/advanced/date-picker/index.d.ts.map +1 -1
  4. package/dist/advanced/date-picker/index.js.map +2 -2
  5. package/dist/advanced/date-picker/index.mjs.map +2 -2
  6. package/dist/advanced/file-picker/index.d.ts +9 -2
  7. package/dist/advanced/file-picker/index.d.ts.map +1 -1
  8. package/dist/advanced/file-picker/index.js.map +2 -2
  9. package/dist/advanced/file-picker/index.mjs.map +2 -2
  10. package/dist/advanced/picker/index.d.ts +2 -1
  11. package/dist/advanced/picker/index.d.ts.map +1 -1
  12. package/dist/advanced/picker/index.js.map +2 -2
  13. package/dist/advanced/picker/index.mjs.map +2 -2
  14. package/dist/advanced/rich-text/index.d.ts +3 -2
  15. package/dist/advanced/rich-text/index.d.ts.map +1 -1
  16. package/dist/advanced/rich-text/index.js.map +2 -2
  17. package/dist/advanced/rich-text/index.mjs.map +2 -2
  18. package/dist/{chunk-IOIXIQ2F.mjs → chunk-56IADPYY.mjs} +2 -5
  19. package/dist/chunk-56IADPYY.mjs.map +7 -0
  20. package/dist/chunk-IJBHWAI6.mjs +831 -0
  21. package/dist/chunk-IJBHWAI6.mjs.map +7 -0
  22. package/dist/components/display/Badge.d.ts +7 -0
  23. package/dist/components/display/Badge.d.ts.map +1 -0
  24. package/dist/components/display/Badge.js +62 -0
  25. package/dist/components/display/Badge.js.map +1 -0
  26. package/dist/components/display/Divider.d.ts +7 -0
  27. package/dist/components/display/Divider.d.ts.map +1 -0
  28. package/dist/components/display/Divider.js +19 -0
  29. package/dist/components/display/Divider.js.map +1 -0
  30. package/dist/components/display/ProgressBar.d.ts +7 -0
  31. package/dist/components/display/ProgressBar.d.ts.map +1 -0
  32. package/dist/components/display/ProgressBar.js +37 -0
  33. package/dist/components/display/ProgressBar.js.map +1 -0
  34. package/dist/components/index.d.ts +8 -0
  35. package/dist/components/index.d.ts.map +1 -1
  36. package/dist/components/index.js +547 -37
  37. package/dist/components/index.js.map +4 -4
  38. package/dist/components/index.mjs +18 -2
  39. package/dist/components/inputs/Button.d.ts.map +1 -1
  40. package/dist/components/inputs/Button.js +1 -1
  41. package/dist/components/inputs/Button.js.map +1 -1
  42. package/dist/components/inputs/CheckBox.d.ts +7 -0
  43. package/dist/components/inputs/CheckBox.d.ts.map +1 -0
  44. package/dist/components/inputs/CheckBox.js +56 -0
  45. package/dist/components/inputs/CheckBox.js.map +1 -0
  46. package/dist/components/inputs/Input.d.ts +7 -0
  47. package/dist/components/inputs/Input.d.ts.map +1 -0
  48. package/dist/components/inputs/Input.js +47 -0
  49. package/dist/components/inputs/Input.js.map +1 -0
  50. package/dist/components/inputs/RadioButton.d.ts +7 -0
  51. package/dist/components/inputs/RadioButton.d.ts.map +1 -0
  52. package/dist/components/inputs/RadioButton.js +58 -0
  53. package/dist/components/inputs/RadioButton.js.map +1 -0
  54. package/dist/components/inputs/Switch.d.ts +7 -0
  55. package/dist/components/inputs/Switch.d.ts.map +1 -0
  56. package/dist/components/inputs/Switch.js +14 -0
  57. package/dist/components/inputs/Switch.js.map +1 -0
  58. package/dist/components/layouts/Box.d.ts +3 -3
  59. package/dist/components/layouts/Box.d.ts.map +1 -1
  60. package/dist/components/layouts/Box.js +23 -4
  61. package/dist/components/layouts/Box.js.map +1 -1
  62. package/dist/components/layouts/Collapsible.d.ts +7 -0
  63. package/dist/components/layouts/Collapsible.d.ts.map +1 -0
  64. package/dist/components/layouts/Collapsible.js +66 -0
  65. package/dist/components/layouts/Collapsible.js.map +1 -0
  66. package/dist/components/typography/Text.d.ts +1 -1
  67. package/dist/components/typography/Text.d.ts.map +1 -1
  68. package/dist/components/typography/Text.js +17 -17
  69. package/dist/components/typography/Text.js.map +1 -1
  70. package/dist/index.d.ts +3 -3
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +548 -41
  73. package/dist/index.js.map +4 -4
  74. package/dist/index.mjs +18 -2
  75. package/dist/theme/index.d.ts +1 -1
  76. package/dist/theme/index.d.ts.map +1 -1
  77. package/dist/theme/index.js +1 -4
  78. package/dist/theme/index.js.map +2 -2
  79. package/dist/theme/index.mjs +1 -1
  80. package/dist/types/index.d.ts +82 -7
  81. package/dist/types/index.d.ts.map +1 -1
  82. package/package.json +22 -19
  83. package/dist/chunk-IOIXIQ2F.mjs.map +0 -7
  84. package/dist/chunk-NUUZYCND.mjs +0 -318
  85. package/dist/chunk-NUUZYCND.mjs.map +0 -7
@@ -0,0 +1,831 @@
1
+ import {
2
+ useTheme
3
+ } from "./chunk-56IADPYY.mjs";
4
+
5
+ // src/components/layouts/Box.tsx
6
+ import React from "react";
7
+ import { View } from "react-native";
8
+ function Box({
9
+ children,
10
+ flex,
11
+ flexDirection,
12
+ alignItems,
13
+ justifyContent,
14
+ flexWrap,
15
+ padding,
16
+ paddingHorizontal,
17
+ paddingVertical,
18
+ margin,
19
+ marginHorizontal,
20
+ marginVertical,
21
+ gap,
22
+ backgroundColor,
23
+ borderRadius,
24
+ width,
25
+ height,
26
+ style,
27
+ testID
28
+ }) {
29
+ const { theme } = useTheme();
30
+ const boxStyle = [
31
+ flex !== void 0 && { flex },
32
+ flexDirection && { flexDirection },
33
+ alignItems && { alignItems },
34
+ justifyContent && { justifyContent },
35
+ flexWrap && { flexWrap },
36
+ width !== void 0 && { width },
37
+ height !== void 0 && { height },
38
+ padding && { padding: theme.spacing[padding] },
39
+ paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
40
+ paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
41
+ margin && { margin: theme.spacing[margin] },
42
+ marginHorizontal && { marginHorizontal: theme.spacing[marginHorizontal] },
43
+ marginVertical && { marginVertical: theme.spacing[marginVertical] },
44
+ gap && { gap: theme.spacing[gap] },
45
+ backgroundColor && { backgroundColor },
46
+ borderRadius && { borderRadius: theme.borderRadius[borderRadius] },
47
+ style
48
+ ];
49
+ return /* @__PURE__ */ React.createElement(View, { style: boxStyle, testID }, children);
50
+ }
51
+ function Row({
52
+ children,
53
+ flex,
54
+ alignItems = "center",
55
+ justifyContent,
56
+ flexWrap,
57
+ padding,
58
+ paddingHorizontal,
59
+ paddingVertical,
60
+ margin,
61
+ marginHorizontal,
62
+ marginVertical,
63
+ gap,
64
+ backgroundColor,
65
+ borderRadius,
66
+ width,
67
+ height,
68
+ style,
69
+ testID
70
+ }) {
71
+ const { theme } = useTheme();
72
+ const rowStyle = [
73
+ { flexDirection: "row" },
74
+ flex !== void 0 && { flex },
75
+ alignItems && { alignItems },
76
+ justifyContent && { justifyContent },
77
+ flexWrap && { flexWrap },
78
+ width !== void 0 && { width },
79
+ height !== void 0 && { height },
80
+ padding && { padding: theme.spacing[padding] },
81
+ paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
82
+ paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
83
+ margin && { margin: theme.spacing[margin] },
84
+ marginHorizontal && { marginHorizontal: theme.spacing[marginHorizontal] },
85
+ marginVertical && { marginVertical: theme.spacing[marginVertical] },
86
+ gap && { gap: theme.spacing[gap] },
87
+ backgroundColor && { backgroundColor },
88
+ borderRadius && { borderRadius: theme.borderRadius[borderRadius] },
89
+ style
90
+ ];
91
+ return /* @__PURE__ */ React.createElement(View, { style: rowStyle, testID }, children);
92
+ }
93
+ function Column({
94
+ children,
95
+ flex,
96
+ alignItems,
97
+ justifyContent,
98
+ flexWrap,
99
+ padding,
100
+ paddingHorizontal,
101
+ paddingVertical,
102
+ margin,
103
+ marginHorizontal,
104
+ marginVertical,
105
+ gap,
106
+ backgroundColor,
107
+ borderRadius,
108
+ width,
109
+ height,
110
+ style,
111
+ testID
112
+ }) {
113
+ const { theme } = useTheme();
114
+ const columnStyle = [
115
+ { flexDirection: "column" },
116
+ flex !== void 0 && { flex },
117
+ alignItems && { alignItems },
118
+ justifyContent && { justifyContent },
119
+ flexWrap && { flexWrap },
120
+ width !== void 0 && { width },
121
+ height !== void 0 && { height },
122
+ padding && { padding: theme.spacing[padding] },
123
+ paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
124
+ paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
125
+ margin && { margin: theme.spacing[margin] },
126
+ marginHorizontal && { marginHorizontal: theme.spacing[marginHorizontal] },
127
+ marginVertical && { marginVertical: theme.spacing[marginVertical] },
128
+ gap && { gap: theme.spacing[gap] },
129
+ backgroundColor && { backgroundColor },
130
+ borderRadius && { borderRadius: theme.borderRadius[borderRadius] },
131
+ style
132
+ ];
133
+ return /* @__PURE__ */ React.createElement(View, { style: columnStyle, testID }, children);
134
+ }
135
+
136
+ // src/components/layouts/Collapsible.tsx
137
+ import React2, { useState } from "react";
138
+ import {
139
+ TouchableOpacity,
140
+ View as View2,
141
+ Text as RNText,
142
+ LayoutAnimation,
143
+ Platform,
144
+ UIManager,
145
+ StyleSheet
146
+ } from "react-native";
147
+ if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
148
+ UIManager.setLayoutAnimationEnabledExperimental(true);
149
+ }
150
+ function Collapsible({
151
+ title,
152
+ children,
153
+ initiallyExpanded = false,
154
+ style,
155
+ testID
156
+ }) {
157
+ const { theme } = useTheme();
158
+ const [expanded, setExpanded] = useState(initiallyExpanded);
159
+ const toggleExpanded = () => {
160
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
161
+ setExpanded(!expanded);
162
+ };
163
+ return /* @__PURE__ */ React2.createElement(
164
+ View2,
165
+ {
166
+ style: [
167
+ styles.wrapper,
168
+ {
169
+ borderColor: theme.colors.border,
170
+ borderRadius: theme.borderRadius.md
171
+ },
172
+ style
173
+ ],
174
+ testID
175
+ },
176
+ /* @__PURE__ */ React2.createElement(
177
+ TouchableOpacity,
178
+ {
179
+ activeOpacity: 0.7,
180
+ onPress: toggleExpanded,
181
+ style: [
182
+ styles.header,
183
+ {
184
+ padding: theme.spacing.md,
185
+ backgroundColor: theme.colors.surface
186
+ }
187
+ ]
188
+ },
189
+ /* @__PURE__ */ React2.createElement(RNText, { style: [theme.typography.body1, styles.headerText, { color: theme.colors.text }] }, title),
190
+ /* @__PURE__ */ React2.createElement(RNText, { style: [theme.typography.h3, { color: theme.colors.textSecondary }] }, expanded ? "\u2212" : "+")
191
+ ),
192
+ expanded && /* @__PURE__ */ React2.createElement(
193
+ View2,
194
+ {
195
+ style: [
196
+ styles.content,
197
+ {
198
+ padding: theme.spacing.md,
199
+ backgroundColor: theme.colors.background
200
+ }
201
+ ]
202
+ },
203
+ children
204
+ )
205
+ );
206
+ }
207
+ var styles = StyleSheet.create({
208
+ wrapper: {
209
+ borderWidth: 1,
210
+ overflow: "hidden"
211
+ },
212
+ header: {
213
+ flexDirection: "row",
214
+ justifyContent: "space-between",
215
+ alignItems: "center"
216
+ },
217
+ headerText: {
218
+ fontWeight: "600"
219
+ },
220
+ content: {}
221
+ });
222
+
223
+ // src/components/typography/Text.tsx
224
+ import React3 from "react";
225
+ import { Text as RNText2 } from "react-native";
226
+ function Text({ children, variant = "body1", color, textAlign, style, testID }) {
227
+ const { theme } = useTheme();
228
+ const textStyle = [
229
+ theme.typography[variant],
230
+ { color: color || theme.colors.text },
231
+ textAlign && { textAlign },
232
+ style
233
+ ];
234
+ return /* @__PURE__ */ React3.createElement(RNText2, { style: textStyle, testID }, children);
235
+ }
236
+ function H1(props) {
237
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h1" });
238
+ }
239
+ function H2(props) {
240
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h2" });
241
+ }
242
+ function H3(props) {
243
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h3" });
244
+ }
245
+ function H4(props) {
246
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h4" });
247
+ }
248
+ function H5(props) {
249
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h5" });
250
+ }
251
+ function H6(props) {
252
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "h6" });
253
+ }
254
+ function Body1(props) {
255
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body1" });
256
+ }
257
+ function Body2(props) {
258
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body2" });
259
+ }
260
+ function Body3(props) {
261
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body3" });
262
+ }
263
+ function Body4(props) {
264
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body4" });
265
+ }
266
+ function Body5(props) {
267
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body5" });
268
+ }
269
+ function Body6(props) {
270
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "body6" });
271
+ }
272
+ function SubTitle1(props) {
273
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "subtitle1" });
274
+ }
275
+ function SubTitle2(props) {
276
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "subtitle2" });
277
+ }
278
+ function Caption(props) {
279
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "caption" });
280
+ }
281
+ function Overline(props) {
282
+ return /* @__PURE__ */ React3.createElement(Text, { ...props, variant: "overline" });
283
+ }
284
+
285
+ // src/components/inputs/Button.tsx
286
+ import React4 from "react";
287
+ import { TouchableOpacity as TouchableOpacity2, View as View3, StyleSheet as StyleSheet2, ActivityIndicator } from "react-native";
288
+ function Button({
289
+ label,
290
+ onPress,
291
+ variant = "primary",
292
+ size = "medium",
293
+ disabled = false,
294
+ loading = false,
295
+ icon,
296
+ style,
297
+ testID
298
+ }) {
299
+ const { theme } = useTheme();
300
+ const getVariantStyle = () => {
301
+ switch (variant) {
302
+ case "primary":
303
+ return {
304
+ backgroundColor: theme.colors.primary,
305
+ borderColor: theme.colors.primary
306
+ };
307
+ case "secondary":
308
+ return {
309
+ backgroundColor: theme.colors.secondary,
310
+ borderColor: theme.colors.secondary
311
+ };
312
+ case "danger":
313
+ return {
314
+ backgroundColor: theme.colors.error,
315
+ borderColor: theme.colors.error
316
+ };
317
+ case "ghost":
318
+ return {
319
+ backgroundColor: "transparent",
320
+ borderColor: theme.colors.primary,
321
+ borderWidth: 1
322
+ };
323
+ default:
324
+ return {
325
+ backgroundColor: theme.colors.primary,
326
+ borderColor: theme.colors.primary
327
+ };
328
+ }
329
+ };
330
+ const getSizeStyle = () => {
331
+ switch (size) {
332
+ case "small":
333
+ return {
334
+ paddingHorizontal: theme.spacing.md,
335
+ paddingVertical: theme.spacing.sm,
336
+ minHeight: 32
337
+ };
338
+ case "large":
339
+ return {
340
+ paddingHorizontal: theme.spacing.lg,
341
+ paddingVertical: theme.spacing.md,
342
+ minHeight: 56
343
+ };
344
+ case "medium":
345
+ default:
346
+ return {
347
+ paddingHorizontal: theme.spacing.lg,
348
+ paddingVertical: theme.spacing.md,
349
+ minHeight: 48
350
+ };
351
+ }
352
+ };
353
+ const buttonStyle = [
354
+ styles2.button,
355
+ {
356
+ ...getVariantStyle(),
357
+ ...getSizeStyle(),
358
+ borderRadius: theme.borderRadius.md,
359
+ opacity: disabled || loading ? 0.5 : 1
360
+ },
361
+ style
362
+ ];
363
+ const textColor = variant === "ghost" ? theme.colors.primary : theme.colors.white;
364
+ return /* @__PURE__ */ React4.createElement(
365
+ TouchableOpacity2,
366
+ {
367
+ style: buttonStyle,
368
+ onPress,
369
+ disabled: disabled || loading,
370
+ testID
371
+ },
372
+ /* @__PURE__ */ React4.createElement(View3, { style: styles2.content }, loading ? /* @__PURE__ */ React4.createElement(ActivityIndicator, { color: textColor, size: size === "small" ? "small" : "large" }) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, icon && /* @__PURE__ */ React4.createElement(View3, { style: styles2.icon }, icon), /* @__PURE__ */ React4.createElement(
373
+ Text,
374
+ {
375
+ variant: size === "small" ? "body3" : "body1",
376
+ color: textColor,
377
+ style: styles2.label
378
+ },
379
+ label
380
+ )))
381
+ );
382
+ }
383
+ var styles2 = StyleSheet2.create({
384
+ button: {
385
+ justifyContent: "center",
386
+ alignItems: "center",
387
+ flexDirection: "row"
388
+ },
389
+ content: {
390
+ flexDirection: "row",
391
+ alignItems: "center",
392
+ justifyContent: "center"
393
+ },
394
+ icon: {
395
+ marginRight: 8
396
+ },
397
+ label: {
398
+ fontWeight: "600"
399
+ }
400
+ });
401
+
402
+ // src/components/inputs/Input.tsx
403
+ import React5 from "react";
404
+ import { TextInput, View as View4, Text as RNText3, StyleSheet as StyleSheet3 } from "react-native";
405
+ function Input({
406
+ value,
407
+ onChangeText,
408
+ placeholder,
409
+ label,
410
+ error,
411
+ editable = true,
412
+ secureTextEntry = false,
413
+ keyboardType = "default",
414
+ multiline = false,
415
+ numberOfLines = 1,
416
+ style,
417
+ testID
418
+ }) {
419
+ const { theme } = useTheme();
420
+ return /* @__PURE__ */ React5.createElement(View4, { style: [styles3.container, style] }, label && /* @__PURE__ */ React5.createElement(
421
+ RNText3,
422
+ {
423
+ style: [
424
+ theme.typography.body2,
425
+ {
426
+ color: error ? theme.colors.error : theme.colors.textSecondary,
427
+ marginBottom: theme.spacing.xs
428
+ }
429
+ ]
430
+ },
431
+ label
432
+ ), /* @__PURE__ */ React5.createElement(
433
+ TextInput,
434
+ {
435
+ value,
436
+ onChangeText,
437
+ placeholder,
438
+ placeholderTextColor: theme.colors.textTertiary,
439
+ editable,
440
+ secureTextEntry,
441
+ keyboardType,
442
+ multiline,
443
+ numberOfLines: multiline ? numberOfLines : 1,
444
+ testID,
445
+ style: [
446
+ theme.typography.body1,
447
+ styles3.input,
448
+ {
449
+ borderColor: error ? theme.colors.error : theme.colors.border,
450
+ borderRadius: theme.borderRadius.sm,
451
+ padding: theme.spacing.md,
452
+ color: theme.colors.text,
453
+ backgroundColor: editable ? theme.colors.surface : theme.colors.disabled,
454
+ minHeight: multiline ? numberOfLines * 24 + theme.spacing.md * 2 : void 0
455
+ }
456
+ ]
457
+ }
458
+ ), error && /* @__PURE__ */ React5.createElement(
459
+ RNText3,
460
+ {
461
+ style: [
462
+ theme.typography.caption,
463
+ { color: theme.colors.error, marginTop: theme.spacing.xs }
464
+ ]
465
+ },
466
+ error
467
+ ));
468
+ }
469
+ var styles3 = StyleSheet3.create({
470
+ container: {
471
+ width: "100%"
472
+ },
473
+ input: {
474
+ borderWidth: 1
475
+ }
476
+ });
477
+
478
+ // src/components/inputs/CheckBox.tsx
479
+ import React6 from "react";
480
+ import { TouchableOpacity as TouchableOpacity3, View as View5, Text as RNText4, StyleSheet as StyleSheet4 } from "react-native";
481
+ function CheckBox({
482
+ value,
483
+ onValueChange,
484
+ label,
485
+ disabled = false,
486
+ style,
487
+ testID
488
+ }) {
489
+ const { theme } = useTheme();
490
+ return /* @__PURE__ */ React6.createElement(
491
+ TouchableOpacity3,
492
+ {
493
+ activeOpacity: 0.7,
494
+ onPress: () => !disabled && onValueChange(!value),
495
+ disabled,
496
+ style: [styles4.container, style],
497
+ testID
498
+ },
499
+ /* @__PURE__ */ React6.createElement(
500
+ View5,
501
+ {
502
+ style: [
503
+ styles4.checkbox,
504
+ {
505
+ borderColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : theme.colors.border,
506
+ backgroundColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : "transparent",
507
+ borderRadius: theme.borderRadius.xs
508
+ }
509
+ ]
510
+ },
511
+ value && /* @__PURE__ */ React6.createElement(RNText4, { style: [styles4.checkmark, { color: theme.colors.white }] }, "\u2713")
512
+ ),
513
+ label && /* @__PURE__ */ React6.createElement(
514
+ RNText4,
515
+ {
516
+ style: [
517
+ theme.typography.body1,
518
+ {
519
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
520
+ marginLeft: theme.spacing.sm
521
+ }
522
+ ]
523
+ },
524
+ label
525
+ )
526
+ );
527
+ }
528
+ var styles4 = StyleSheet4.create({
529
+ container: {
530
+ flexDirection: "row",
531
+ alignItems: "center"
532
+ },
533
+ checkbox: {
534
+ justifyContent: "center",
535
+ alignItems: "center",
536
+ borderWidth: 2,
537
+ width: 24,
538
+ height: 24
539
+ },
540
+ checkmark: {
541
+ fontSize: 16,
542
+ fontWeight: "bold"
543
+ }
544
+ });
545
+
546
+ // src/components/inputs/RadioButton.tsx
547
+ import React7 from "react";
548
+ import { TouchableOpacity as TouchableOpacity4, View as View6, Text as RNText5, StyleSheet as StyleSheet5 } from "react-native";
549
+ function RadioButton({
550
+ value,
551
+ selected,
552
+ onSelect,
553
+ label,
554
+ disabled = false,
555
+ style,
556
+ testID
557
+ }) {
558
+ const { theme } = useTheme();
559
+ const isSelected = value === selected;
560
+ return /* @__PURE__ */ React7.createElement(
561
+ TouchableOpacity4,
562
+ {
563
+ activeOpacity: 0.7,
564
+ onPress: () => !disabled && onSelect(value),
565
+ disabled,
566
+ style: [styles5.container, style],
567
+ testID
568
+ },
569
+ /* @__PURE__ */ React7.createElement(
570
+ View6,
571
+ {
572
+ style: [
573
+ styles5.radio,
574
+ {
575
+ borderColor: disabled ? theme.colors.disabled : isSelected ? theme.colors.primary : theme.colors.border
576
+ }
577
+ ]
578
+ },
579
+ isSelected && /* @__PURE__ */ React7.createElement(
580
+ View6,
581
+ {
582
+ style: [
583
+ styles5.radioInner,
584
+ {
585
+ backgroundColor: disabled ? theme.colors.disabled : theme.colors.primary
586
+ }
587
+ ]
588
+ }
589
+ )
590
+ ),
591
+ label && /* @__PURE__ */ React7.createElement(
592
+ RNText5,
593
+ {
594
+ style: [
595
+ theme.typography.body1,
596
+ {
597
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
598
+ marginLeft: theme.spacing.sm
599
+ }
600
+ ]
601
+ },
602
+ label
603
+ )
604
+ );
605
+ }
606
+ var styles5 = StyleSheet5.create({
607
+ container: {
608
+ flexDirection: "row",
609
+ alignItems: "center"
610
+ },
611
+ radio: {
612
+ justifyContent: "center",
613
+ alignItems: "center",
614
+ borderWidth: 2,
615
+ width: 24,
616
+ height: 24,
617
+ borderRadius: 12
618
+ },
619
+ radioInner: {
620
+ width: 12,
621
+ height: 12,
622
+ borderRadius: 6
623
+ }
624
+ });
625
+
626
+ // src/components/inputs/Switch.tsx
627
+ import React8 from "react";
628
+ import { Switch as RNSwitch } from "react-native";
629
+ function Switch({ value, onValueChange, disabled = false, style, testID }) {
630
+ const { theme } = useTheme();
631
+ return /* @__PURE__ */ React8.createElement(
632
+ RNSwitch,
633
+ {
634
+ value,
635
+ onValueChange,
636
+ disabled,
637
+ trackColor: {
638
+ false: theme.colors.border,
639
+ true: theme.colors.primary
640
+ },
641
+ thumbColor: theme.colors.white,
642
+ ios_backgroundColor: theme.colors.border,
643
+ style,
644
+ testID
645
+ }
646
+ );
647
+ }
648
+
649
+ // src/components/display/ProgressBar.tsx
650
+ import React9 from "react";
651
+ import { View as View7, StyleSheet as StyleSheet6 } from "react-native";
652
+ function ProgressBar({
653
+ progress,
654
+ height = 8,
655
+ color,
656
+ backgroundColor,
657
+ borderRadius = "full",
658
+ style,
659
+ testID
660
+ }) {
661
+ const { theme } = useTheme();
662
+ const clampedProgress = Math.max(0, Math.min(1, progress));
663
+ return /* @__PURE__ */ React9.createElement(
664
+ View7,
665
+ {
666
+ style: [
667
+ styles6.track,
668
+ {
669
+ height,
670
+ backgroundColor: backgroundColor || theme.colors.border,
671
+ borderRadius: theme.borderRadius[borderRadius]
672
+ },
673
+ style
674
+ ],
675
+ testID
676
+ },
677
+ /* @__PURE__ */ React9.createElement(
678
+ View7,
679
+ {
680
+ style: [
681
+ styles6.fill,
682
+ {
683
+ width: `${clampedProgress * 100}%`,
684
+ backgroundColor: color || theme.colors.primary
685
+ }
686
+ ]
687
+ }
688
+ )
689
+ );
690
+ }
691
+ var styles6 = StyleSheet6.create({
692
+ track: {
693
+ overflow: "hidden"
694
+ },
695
+ fill: {
696
+ height: "100%"
697
+ }
698
+ });
699
+
700
+ // src/components/display/Badge.tsx
701
+ import React10 from "react";
702
+ import { View as View8, Text as RNText6, StyleSheet as StyleSheet7 } from "react-native";
703
+ function Badge({
704
+ children,
705
+ variant = "primary",
706
+ size = "medium",
707
+ style,
708
+ testID
709
+ }) {
710
+ const { theme } = useTheme();
711
+ const variantColors = {
712
+ primary: theme.colors.primary,
713
+ secondary: theme.colors.secondary,
714
+ success: theme.colors.success,
715
+ error: theme.colors.error,
716
+ warning: theme.colors.warning,
717
+ info: theme.colors.info
718
+ };
719
+ const sizeStyles = {
720
+ small: {
721
+ paddingHorizontal: theme.spacing.xs,
722
+ paddingVertical: theme.spacing.xs / 2,
723
+ fontSize: 10
724
+ },
725
+ medium: {
726
+ paddingHorizontal: theme.spacing.sm,
727
+ paddingVertical: theme.spacing.xs,
728
+ fontSize: 12
729
+ },
730
+ large: {
731
+ paddingHorizontal: theme.spacing.md,
732
+ paddingVertical: theme.spacing.sm,
733
+ fontSize: 14
734
+ }
735
+ };
736
+ return /* @__PURE__ */ React10.createElement(
737
+ View8,
738
+ {
739
+ style: [
740
+ styles7.badge,
741
+ {
742
+ backgroundColor: variantColors[variant],
743
+ borderRadius: theme.borderRadius.full,
744
+ ...sizeStyles[size]
745
+ },
746
+ style
747
+ ],
748
+ testID
749
+ },
750
+ /* @__PURE__ */ React10.createElement(
751
+ RNText6,
752
+ {
753
+ style: [
754
+ styles7.text,
755
+ {
756
+ color: theme.colors.white,
757
+ fontSize: sizeStyles[size].fontSize
758
+ }
759
+ ]
760
+ },
761
+ children
762
+ )
763
+ );
764
+ }
765
+ var styles7 = StyleSheet7.create({
766
+ badge: {
767
+ alignSelf: "flex-start"
768
+ },
769
+ text: {
770
+ fontWeight: "600"
771
+ }
772
+ });
773
+
774
+ // src/components/display/Divider.tsx
775
+ import React11 from "react";
776
+ import { View as View9 } from "react-native";
777
+ function Divider({
778
+ orientation = "horizontal",
779
+ thickness = 1,
780
+ color,
781
+ style,
782
+ testID
783
+ }) {
784
+ const { theme } = useTheme();
785
+ return /* @__PURE__ */ React11.createElement(
786
+ View9,
787
+ {
788
+ style: [
789
+ {
790
+ backgroundColor: color || theme.colors.border,
791
+ ...orientation === "horizontal" ? { height: thickness, width: "100%" } : { width: thickness, height: "100%" }
792
+ },
793
+ style
794
+ ],
795
+ testID
796
+ }
797
+ );
798
+ }
799
+
800
+ export {
801
+ Box,
802
+ Row,
803
+ Column,
804
+ Collapsible,
805
+ Text,
806
+ H1,
807
+ H2,
808
+ H3,
809
+ H4,
810
+ H5,
811
+ H6,
812
+ Body1,
813
+ Body2,
814
+ Body3,
815
+ Body4,
816
+ Body5,
817
+ Body6,
818
+ SubTitle1,
819
+ SubTitle2,
820
+ Caption,
821
+ Overline,
822
+ Button,
823
+ Input,
824
+ CheckBox,
825
+ RadioButton,
826
+ Switch,
827
+ ProgressBar,
828
+ Badge,
829
+ Divider
830
+ };
831
+ //# sourceMappingURL=chunk-IJBHWAI6.mjs.map