react-native-atomic-ui 1.0.2 → 1.0.3

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 (77) hide show
  1. package/README.md +14 -0
  2. package/dist/advanced/date-picker/index.js.map +1 -1
  3. package/dist/advanced/date-picker/index.mjs.map +1 -1
  4. package/dist/advanced/file-picker/index.js.map +1 -1
  5. package/dist/advanced/file-picker/index.mjs.map +1 -1
  6. package/dist/advanced/picker/index.js.map +1 -1
  7. package/dist/advanced/picker/index.mjs.map +1 -1
  8. package/dist/advanced/rich-text/index.js.map +1 -1
  9. package/dist/advanced/rich-text/index.mjs.map +1 -1
  10. package/dist/{chunk-IOIXIQ2F.mjs → chunk-56IADPYY.mjs} +2 -5
  11. package/dist/chunk-56IADPYY.mjs.map +7 -0
  12. package/dist/chunk-GSLM4BKO.mjs +789 -0
  13. package/dist/chunk-GSLM4BKO.mjs.map +7 -0
  14. package/dist/components/display/Badge.d.ts +7 -0
  15. package/dist/components/display/Badge.d.ts.map +1 -0
  16. package/dist/components/display/Badge.js +52 -0
  17. package/dist/components/display/Badge.js.map +1 -0
  18. package/dist/components/display/Divider.d.ts +7 -0
  19. package/dist/components/display/Divider.d.ts.map +1 -0
  20. package/dist/components/display/Divider.js +19 -0
  21. package/dist/components/display/Divider.js.map +1 -0
  22. package/dist/components/display/ProgressBar.d.ts +7 -0
  23. package/dist/components/display/ProgressBar.d.ts.map +1 -0
  24. package/dist/components/display/ProgressBar.js +27 -0
  25. package/dist/components/display/ProgressBar.js.map +1 -0
  26. package/dist/components/index.d.ts +8 -0
  27. package/dist/components/index.d.ts.map +1 -1
  28. package/dist/components/index.js +504 -35
  29. package/dist/components/index.js.map +4 -4
  30. package/dist/components/index.mjs +18 -2
  31. package/dist/components/inputs/Button.d.ts.map +1 -1
  32. package/dist/components/inputs/Button.js +1 -1
  33. package/dist/components/inputs/Button.js.map +1 -1
  34. package/dist/components/inputs/CheckBox.d.ts +7 -0
  35. package/dist/components/inputs/CheckBox.d.ts.map +1 -0
  36. package/dist/components/inputs/CheckBox.js +56 -0
  37. package/dist/components/inputs/CheckBox.js.map +1 -0
  38. package/dist/components/inputs/Input.d.ts +7 -0
  39. package/dist/components/inputs/Input.d.ts.map +1 -0
  40. package/dist/components/inputs/Input.js +44 -0
  41. package/dist/components/inputs/Input.js.map +1 -0
  42. package/dist/components/inputs/RadioButton.d.ts +7 -0
  43. package/dist/components/inputs/RadioButton.d.ts.map +1 -0
  44. package/dist/components/inputs/RadioButton.js +57 -0
  45. package/dist/components/inputs/RadioButton.js.map +1 -0
  46. package/dist/components/inputs/Switch.d.ts +7 -0
  47. package/dist/components/inputs/Switch.d.ts.map +1 -0
  48. package/dist/components/inputs/Switch.js +14 -0
  49. package/dist/components/inputs/Switch.js.map +1 -0
  50. package/dist/components/layouts/Box.d.ts +3 -3
  51. package/dist/components/layouts/Box.d.ts.map +1 -1
  52. package/dist/components/layouts/Box.js +23 -4
  53. package/dist/components/layouts/Box.js.map +1 -1
  54. package/dist/components/layouts/Collapsible.d.ts +7 -0
  55. package/dist/components/layouts/Collapsible.d.ts.map +1 -0
  56. package/dist/components/layouts/Collapsible.js +49 -0
  57. package/dist/components/layouts/Collapsible.js.map +1 -0
  58. package/dist/components/typography/Text.d.ts +1 -1
  59. package/dist/components/typography/Text.d.ts.map +1 -1
  60. package/dist/components/typography/Text.js +17 -17
  61. package/dist/components/typography/Text.js.map +1 -1
  62. package/dist/index.d.ts +3 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +505 -39
  65. package/dist/index.js.map +4 -4
  66. package/dist/index.mjs +18 -2
  67. package/dist/theme/index.d.ts +1 -1
  68. package/dist/theme/index.d.ts.map +1 -1
  69. package/dist/theme/index.js +1 -4
  70. package/dist/theme/index.js.map +2 -2
  71. package/dist/theme/index.mjs +1 -1
  72. package/dist/types/index.d.ts +64 -0
  73. package/dist/types/index.d.ts.map +1 -1
  74. package/package.json +4 -1
  75. package/dist/chunk-IOIXIQ2F.mjs.map +0 -7
  76. package/dist/chunk-NUUZYCND.mjs +0 -318
  77. package/dist/chunk-NUUZYCND.mjs.map +0 -7
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/components/index.ts
31
31
  var components_exports = {};
32
32
  __export(components_exports, {
33
+ Badge: () => Badge,
33
34
  Body1: () => Body1,
34
35
  Body2: () => Body2,
35
36
  Body3: () => Body3,
@@ -39,17 +40,24 @@ __export(components_exports, {
39
40
  Box: () => Box,
40
41
  Button: () => Button,
41
42
  Caption: () => Caption,
43
+ CheckBox: () => CheckBox,
44
+ Collapsible: () => Collapsible,
42
45
  Column: () => Column,
46
+ Divider: () => Divider,
43
47
  H1: () => H1,
44
48
  H2: () => H2,
45
49
  H3: () => H3,
46
50
  H4: () => H4,
47
51
  H5: () => H5,
48
52
  H6: () => H6,
53
+ Input: () => Input,
49
54
  Overline: () => Overline,
55
+ ProgressBar: () => ProgressBar,
56
+ RadioButton: () => RadioButton,
50
57
  Row: () => Row,
51
58
  SubTitle1: () => SubTitle1,
52
59
  SubTitle2: () => SubTitle2,
60
+ Switch: () => Switch,
53
61
  Text: () => Text
54
62
  });
55
63
  module.exports = __toCommonJS(components_exports);
@@ -203,6 +211,11 @@ function useTheme() {
203
211
  // src/components/layouts/Box.tsx
204
212
  function Box({
205
213
  children,
214
+ flex,
215
+ flexDirection,
216
+ alignItems,
217
+ justifyContent,
218
+ flexWrap,
206
219
  padding,
207
220
  paddingHorizontal,
208
221
  paddingVertical,
@@ -212,11 +225,20 @@ function Box({
212
225
  gap,
213
226
  backgroundColor,
214
227
  borderRadius,
228
+ width,
229
+ height,
215
230
  style,
216
231
  testID
217
232
  }) {
218
233
  const { theme } = useTheme();
219
234
  const boxStyle = [
235
+ flex !== void 0 && { flex },
236
+ flexDirection && { flexDirection },
237
+ alignItems && { alignItems },
238
+ justifyContent && { justifyContent },
239
+ flexWrap && { flexWrap },
240
+ width !== void 0 && { width },
241
+ height !== void 0 && { height },
220
242
  padding && { padding: theme.spacing[padding] },
221
243
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
222
244
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -232,6 +254,10 @@ function Box({
232
254
  }
233
255
  function Row({
234
256
  children,
257
+ flex,
258
+ alignItems = "center",
259
+ justifyContent,
260
+ flexWrap,
235
261
  padding,
236
262
  paddingHorizontal,
237
263
  paddingVertical,
@@ -241,12 +267,20 @@ function Row({
241
267
  gap,
242
268
  backgroundColor,
243
269
  borderRadius,
270
+ width,
271
+ height,
244
272
  style,
245
273
  testID
246
274
  }) {
247
275
  const { theme } = useTheme();
248
276
  const rowStyle = [
249
- { flexDirection: "row", alignItems: "center" },
277
+ { flexDirection: "row" },
278
+ flex !== void 0 && { flex },
279
+ alignItems && { alignItems },
280
+ justifyContent && { justifyContent },
281
+ flexWrap && { flexWrap },
282
+ width !== void 0 && { width },
283
+ height !== void 0 && { height },
250
284
  padding && { padding: theme.spacing[padding] },
251
285
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
252
286
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -262,6 +296,10 @@ function Row({
262
296
  }
263
297
  function Column({
264
298
  children,
299
+ flex,
300
+ alignItems,
301
+ justifyContent,
302
+ flexWrap,
265
303
  padding,
266
304
  paddingHorizontal,
267
305
  paddingVertical,
@@ -271,12 +309,20 @@ function Column({
271
309
  gap,
272
310
  backgroundColor,
273
311
  borderRadius,
312
+ width,
313
+ height,
274
314
  style,
275
315
  testID
276
316
  }) {
277
317
  const { theme } = useTheme();
278
318
  const columnStyle = [
279
319
  { flexDirection: "column" },
320
+ flex !== void 0 && { flex },
321
+ alignItems && { alignItems },
322
+ justifyContent && { justifyContent },
323
+ flexWrap && { flexWrap },
324
+ width !== void 0 && { width },
325
+ height !== void 0 && { height },
280
326
  padding && { padding: theme.spacing[padding] },
281
327
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
282
328
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -291,17 +337,72 @@ function Column({
291
337
  return /* @__PURE__ */ import_react2.default.createElement(import_react_native2.View, { style: columnStyle, testID }, children);
292
338
  }
293
339
 
294
- // src/components/typography/Text.tsx
340
+ // src/components/layouts/Collapsible.tsx
295
341
  var import_react3 = __toESM(require("react"));
296
342
  var import_react_native3 = require("react-native");
297
- function Text({
343
+ if (import_react_native3.Platform.OS === "android" && import_react_native3.UIManager.setLayoutAnimationEnabledExperimental) {
344
+ import_react_native3.UIManager.setLayoutAnimationEnabledExperimental(true);
345
+ }
346
+ function Collapsible({
347
+ title,
298
348
  children,
299
- variant = "body1",
300
- color,
301
- textAlign,
349
+ initiallyExpanded = false,
302
350
  style,
303
351
  testID
304
352
  }) {
353
+ const { theme } = useTheme();
354
+ const [expanded, setExpanded] = (0, import_react3.useState)(initiallyExpanded);
355
+ const toggleExpanded = () => {
356
+ import_react_native3.LayoutAnimation.configureNext(import_react_native3.LayoutAnimation.Presets.easeInEaseOut);
357
+ setExpanded(!expanded);
358
+ };
359
+ return /* @__PURE__ */ import_react3.default.createElement(
360
+ import_react_native3.View,
361
+ {
362
+ style: [
363
+ {
364
+ borderWidth: 1,
365
+ borderColor: theme.colors.border,
366
+ borderRadius: theme.borderRadius.md,
367
+ overflow: "hidden"
368
+ },
369
+ style
370
+ ],
371
+ testID
372
+ },
373
+ /* @__PURE__ */ import_react3.default.createElement(
374
+ import_react_native3.TouchableOpacity,
375
+ {
376
+ activeOpacity: 0.7,
377
+ onPress: toggleExpanded,
378
+ style: {
379
+ flexDirection: "row",
380
+ justifyContent: "space-between",
381
+ alignItems: "center",
382
+ padding: theme.spacing.md,
383
+ backgroundColor: theme.colors.surface
384
+ }
385
+ },
386
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.body1, { color: theme.colors.text, fontWeight: "600" }] }, title),
387
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.h3, { color: theme.colors.textSecondary }] }, expanded ? "\u2212" : "+")
388
+ ),
389
+ expanded && /* @__PURE__ */ import_react3.default.createElement(
390
+ import_react_native3.View,
391
+ {
392
+ style: {
393
+ padding: theme.spacing.md,
394
+ backgroundColor: theme.colors.background
395
+ }
396
+ },
397
+ children
398
+ )
399
+ );
400
+ }
401
+
402
+ // src/components/typography/Text.tsx
403
+ var import_react4 = __toESM(require("react"));
404
+ var import_react_native4 = require("react-native");
405
+ function Text({ children, variant = "body1", color, textAlign, style, testID }) {
305
406
  const { theme } = useTheme();
306
407
  const textStyle = [
307
408
  theme.typography[variant],
@@ -309,60 +410,60 @@ function Text({
309
410
  textAlign && { textAlign },
310
411
  style
311
412
  ];
312
- return /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: textStyle, testID }, children);
413
+ return /* @__PURE__ */ import_react4.default.createElement(import_react_native4.Text, { style: textStyle, testID }, children);
313
414
  }
314
415
  function H1(props) {
315
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h1" });
416
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h1" });
316
417
  }
317
418
  function H2(props) {
318
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h2" });
419
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h2" });
319
420
  }
320
421
  function H3(props) {
321
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h3" });
422
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h3" });
322
423
  }
323
424
  function H4(props) {
324
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h4" });
425
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h4" });
325
426
  }
326
427
  function H5(props) {
327
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h5" });
428
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h5" });
328
429
  }
329
430
  function H6(props) {
330
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h6" });
431
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h6" });
331
432
  }
332
433
  function Body1(props) {
333
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body1" });
434
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body1" });
334
435
  }
335
436
  function Body2(props) {
336
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body2" });
437
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body2" });
337
438
  }
338
439
  function Body3(props) {
339
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body3" });
440
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body3" });
340
441
  }
341
442
  function Body4(props) {
342
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body4" });
443
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body4" });
343
444
  }
344
445
  function Body5(props) {
345
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body5" });
446
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body5" });
346
447
  }
347
448
  function Body6(props) {
348
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body6" });
449
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body6" });
349
450
  }
350
451
  function SubTitle1(props) {
351
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle1" });
452
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle1" });
352
453
  }
353
454
  function SubTitle2(props) {
354
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle2" });
455
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle2" });
355
456
  }
356
457
  function Caption(props) {
357
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "caption" });
458
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "caption" });
358
459
  }
359
460
  function Overline(props) {
360
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "overline" });
461
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "overline" });
361
462
  }
362
463
 
363
464
  // src/components/inputs/Button.tsx
364
- var import_react4 = __toESM(require("react"));
365
- var import_react_native4 = require("react-native");
465
+ var import_react5 = __toESM(require("react"));
466
+ var import_react_native5 = require("react-native");
366
467
  function Button({
367
468
  label,
368
469
  onPress,
@@ -439,21 +540,15 @@ function Button({
439
540
  style
440
541
  ];
441
542
  const textColor = variant === "ghost" ? theme.colors.primary : theme.colors.white;
442
- return /* @__PURE__ */ import_react4.default.createElement(
443
- import_react_native4.TouchableOpacity,
543
+ return /* @__PURE__ */ import_react5.default.createElement(
544
+ import_react_native5.TouchableOpacity,
444
545
  {
445
546
  style: buttonStyle,
446
547
  onPress,
447
548
  disabled: disabled || loading,
448
549
  testID
449
550
  },
450
- /* @__PURE__ */ import_react4.default.createElement(import_react_native4.View, { style: styles.content }, loading ? /* @__PURE__ */ import_react4.default.createElement(
451
- import_react_native4.ActivityIndicator,
452
- {
453
- color: textColor,
454
- size: size === "small" ? "small" : "large"
455
- }
456
- ) : /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, icon && /* @__PURE__ */ import_react4.default.createElement(import_react_native4.View, { style: styles.icon }, icon), /* @__PURE__ */ import_react4.default.createElement(
551
+ /* @__PURE__ */ import_react5.default.createElement(import_react_native5.View, { style: styles.content }, loading ? /* @__PURE__ */ import_react5.default.createElement(import_react_native5.ActivityIndicator, { color: textColor, size: size === "small" ? "small" : "large" }) : /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, icon && /* @__PURE__ */ import_react5.default.createElement(import_react_native5.View, { style: styles.icon }, icon), /* @__PURE__ */ import_react5.default.createElement(
457
552
  Text,
458
553
  {
459
554
  variant: size === "small" ? "body3" : "body1",
@@ -464,7 +559,7 @@ function Button({
464
559
  )))
465
560
  );
466
561
  }
467
- var styles = import_react_native4.StyleSheet.create({
562
+ var styles = import_react_native5.StyleSheet.create({
468
563
  button: {
469
564
  justifyContent: "center",
470
565
  alignItems: "center",
@@ -482,4 +577,378 @@ var styles = import_react_native4.StyleSheet.create({
482
577
  fontWeight: "600"
483
578
  }
484
579
  });
580
+
581
+ // src/components/inputs/Input.tsx
582
+ var import_react6 = __toESM(require("react"));
583
+ var import_react_native6 = require("react-native");
584
+ function Input({
585
+ value,
586
+ onChangeText,
587
+ placeholder,
588
+ label,
589
+ error,
590
+ editable = true,
591
+ secureTextEntry = false,
592
+ keyboardType = "default",
593
+ multiline = false,
594
+ numberOfLines = 1,
595
+ style,
596
+ testID
597
+ }) {
598
+ const { theme } = useTheme();
599
+ return /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: [styles2.container, style] }, label && /* @__PURE__ */ import_react6.default.createElement(
600
+ import_react_native6.Text,
601
+ {
602
+ style: [
603
+ theme.typography.body2,
604
+ {
605
+ color: error ? theme.colors.error : theme.colors.textSecondary,
606
+ marginBottom: theme.spacing.xs
607
+ }
608
+ ]
609
+ },
610
+ label
611
+ ), /* @__PURE__ */ import_react6.default.createElement(
612
+ import_react_native6.TextInput,
613
+ {
614
+ value,
615
+ onChangeText,
616
+ placeholder,
617
+ placeholderTextColor: theme.colors.textTertiary,
618
+ editable,
619
+ secureTextEntry,
620
+ keyboardType,
621
+ multiline,
622
+ numberOfLines: multiline ? numberOfLines : 1,
623
+ testID,
624
+ style: [
625
+ theme.typography.body1,
626
+ {
627
+ borderWidth: 1,
628
+ borderColor: error ? theme.colors.error : theme.colors.border,
629
+ borderRadius: theme.borderRadius.sm,
630
+ padding: theme.spacing.md,
631
+ color: theme.colors.text,
632
+ backgroundColor: editable ? theme.colors.surface : theme.colors.disabled,
633
+ minHeight: multiline ? numberOfLines * 24 + theme.spacing.md * 2 : void 0
634
+ }
635
+ ]
636
+ }
637
+ ), error && /* @__PURE__ */ import_react6.default.createElement(
638
+ import_react_native6.Text,
639
+ {
640
+ style: [
641
+ theme.typography.caption,
642
+ { color: theme.colors.error, marginTop: theme.spacing.xs }
643
+ ]
644
+ },
645
+ error
646
+ ));
647
+ }
648
+ var styles2 = import_react_native6.StyleSheet.create({
649
+ container: {
650
+ width: "100%"
651
+ }
652
+ });
653
+
654
+ // src/components/inputs/CheckBox.tsx
655
+ var import_react7 = __toESM(require("react"));
656
+ var import_react_native7 = require("react-native");
657
+ function CheckBox({
658
+ value,
659
+ onValueChange,
660
+ label,
661
+ disabled = false,
662
+ style,
663
+ testID
664
+ }) {
665
+ const { theme } = useTheme();
666
+ return /* @__PURE__ */ import_react7.default.createElement(
667
+ import_react_native7.TouchableOpacity,
668
+ {
669
+ activeOpacity: 0.7,
670
+ onPress: () => !disabled && onValueChange(!value),
671
+ disabled,
672
+ style: [styles3.container, style],
673
+ testID
674
+ },
675
+ /* @__PURE__ */ import_react7.default.createElement(
676
+ import_react_native7.View,
677
+ {
678
+ style: [
679
+ styles3.checkbox,
680
+ {
681
+ borderWidth: 2,
682
+ borderColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : theme.colors.border,
683
+ backgroundColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : "transparent",
684
+ borderRadius: theme.borderRadius.xs,
685
+ width: 24,
686
+ height: 24
687
+ }
688
+ ]
689
+ },
690
+ value && /* @__PURE__ */ import_react7.default.createElement(import_react_native7.Text, { style: [styles3.checkmark, { color: theme.colors.white }] }, "\u2713")
691
+ ),
692
+ label && /* @__PURE__ */ import_react7.default.createElement(
693
+ import_react_native7.Text,
694
+ {
695
+ style: [
696
+ theme.typography.body1,
697
+ {
698
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
699
+ marginLeft: theme.spacing.sm
700
+ }
701
+ ]
702
+ },
703
+ label
704
+ )
705
+ );
706
+ }
707
+ var styles3 = import_react_native7.StyleSheet.create({
708
+ container: {
709
+ flexDirection: "row",
710
+ alignItems: "center"
711
+ },
712
+ checkbox: {
713
+ justifyContent: "center",
714
+ alignItems: "center"
715
+ },
716
+ checkmark: {
717
+ fontSize: 16,
718
+ fontWeight: "bold"
719
+ }
720
+ });
721
+
722
+ // src/components/inputs/RadioButton.tsx
723
+ var import_react8 = __toESM(require("react"));
724
+ var import_react_native8 = require("react-native");
725
+ function RadioButton({
726
+ value,
727
+ selected,
728
+ onSelect,
729
+ label,
730
+ disabled = false,
731
+ style,
732
+ testID
733
+ }) {
734
+ const { theme } = useTheme();
735
+ const isSelected = value === selected;
736
+ return /* @__PURE__ */ import_react8.default.createElement(
737
+ import_react_native8.TouchableOpacity,
738
+ {
739
+ activeOpacity: 0.7,
740
+ onPress: () => !disabled && onSelect(value),
741
+ disabled,
742
+ style: [styles4.container, style],
743
+ testID
744
+ },
745
+ /* @__PURE__ */ import_react8.default.createElement(
746
+ import_react_native8.View,
747
+ {
748
+ style: [
749
+ styles4.radio,
750
+ {
751
+ borderWidth: 2,
752
+ borderColor: disabled ? theme.colors.disabled : isSelected ? theme.colors.primary : theme.colors.border,
753
+ width: 24,
754
+ height: 24,
755
+ borderRadius: 12
756
+ }
757
+ ]
758
+ },
759
+ isSelected && /* @__PURE__ */ import_react8.default.createElement(
760
+ import_react_native8.View,
761
+ {
762
+ style: [
763
+ styles4.radioInner,
764
+ {
765
+ backgroundColor: disabled ? theme.colors.disabled : theme.colors.primary,
766
+ width: 12,
767
+ height: 12,
768
+ borderRadius: 6
769
+ }
770
+ ]
771
+ }
772
+ )
773
+ ),
774
+ label && /* @__PURE__ */ import_react8.default.createElement(
775
+ import_react_native8.Text,
776
+ {
777
+ style: [
778
+ theme.typography.body1,
779
+ {
780
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
781
+ marginLeft: theme.spacing.sm
782
+ }
783
+ ]
784
+ },
785
+ label
786
+ )
787
+ );
788
+ }
789
+ var styles4 = import_react_native8.StyleSheet.create({
790
+ container: {
791
+ flexDirection: "row",
792
+ alignItems: "center"
793
+ },
794
+ radio: {
795
+ justifyContent: "center",
796
+ alignItems: "center"
797
+ },
798
+ radioInner: {}
799
+ });
800
+
801
+ // src/components/inputs/Switch.tsx
802
+ var import_react9 = __toESM(require("react"));
803
+ var import_react_native9 = require("react-native");
804
+ function Switch({ value, onValueChange, disabled = false, style, testID }) {
805
+ const { theme } = useTheme();
806
+ return /* @__PURE__ */ import_react9.default.createElement(
807
+ import_react_native9.Switch,
808
+ {
809
+ value,
810
+ onValueChange,
811
+ disabled,
812
+ trackColor: {
813
+ false: theme.colors.border,
814
+ true: theme.colors.primary
815
+ },
816
+ thumbColor: theme.colors.white,
817
+ ios_backgroundColor: theme.colors.border,
818
+ style,
819
+ testID
820
+ }
821
+ );
822
+ }
823
+
824
+ // src/components/display/ProgressBar.tsx
825
+ var import_react10 = __toESM(require("react"));
826
+ var import_react_native10 = require("react-native");
827
+ function ProgressBar({
828
+ progress,
829
+ height = 8,
830
+ color,
831
+ backgroundColor,
832
+ borderRadius = "full",
833
+ style,
834
+ testID
835
+ }) {
836
+ const { theme } = useTheme();
837
+ const clampedProgress = Math.max(0, Math.min(1, progress));
838
+ return /* @__PURE__ */ import_react10.default.createElement(
839
+ import_react_native10.View,
840
+ {
841
+ style: [
842
+ {
843
+ height,
844
+ backgroundColor: backgroundColor || theme.colors.border,
845
+ borderRadius: theme.borderRadius[borderRadius],
846
+ overflow: "hidden"
847
+ },
848
+ style
849
+ ],
850
+ testID
851
+ },
852
+ /* @__PURE__ */ import_react10.default.createElement(
853
+ import_react_native10.View,
854
+ {
855
+ style: {
856
+ height: "100%",
857
+ width: `${clampedProgress * 100}%`,
858
+ backgroundColor: color || theme.colors.primary
859
+ }
860
+ }
861
+ )
862
+ );
863
+ }
864
+
865
+ // src/components/display/Badge.tsx
866
+ var import_react11 = __toESM(require("react"));
867
+ var import_react_native11 = require("react-native");
868
+ function Badge({
869
+ children,
870
+ variant = "primary",
871
+ size = "medium",
872
+ style,
873
+ testID
874
+ }) {
875
+ const { theme } = useTheme();
876
+ const variantColors = {
877
+ primary: theme.colors.primary,
878
+ secondary: theme.colors.secondary,
879
+ success: theme.colors.success,
880
+ error: theme.colors.error,
881
+ warning: theme.colors.warning,
882
+ info: theme.colors.info
883
+ };
884
+ const sizeStyles = {
885
+ small: {
886
+ paddingHorizontal: theme.spacing.xs,
887
+ paddingVertical: theme.spacing.xs / 2,
888
+ fontSize: 10
889
+ },
890
+ medium: {
891
+ paddingHorizontal: theme.spacing.sm,
892
+ paddingVertical: theme.spacing.xs,
893
+ fontSize: 12
894
+ },
895
+ large: {
896
+ paddingHorizontal: theme.spacing.md,
897
+ paddingVertical: theme.spacing.sm,
898
+ fontSize: 14
899
+ }
900
+ };
901
+ return /* @__PURE__ */ import_react11.default.createElement(
902
+ import_react_native11.View,
903
+ {
904
+ style: [
905
+ {
906
+ backgroundColor: variantColors[variant],
907
+ borderRadius: theme.borderRadius.full,
908
+ alignSelf: "flex-start",
909
+ ...sizeStyles[size]
910
+ },
911
+ style
912
+ ],
913
+ testID
914
+ },
915
+ /* @__PURE__ */ import_react11.default.createElement(
916
+ import_react_native11.Text,
917
+ {
918
+ style: {
919
+ color: theme.colors.white,
920
+ fontSize: sizeStyles[size].fontSize,
921
+ fontWeight: "600"
922
+ }
923
+ },
924
+ children
925
+ )
926
+ );
927
+ }
928
+
929
+ // src/components/display/Divider.tsx
930
+ var import_react12 = __toESM(require("react"));
931
+ var import_react_native12 = require("react-native");
932
+ function Divider({
933
+ orientation = "horizontal",
934
+ thickness = 1,
935
+ color,
936
+ style,
937
+ testID
938
+ }) {
939
+ const { theme } = useTheme();
940
+ return /* @__PURE__ */ import_react12.default.createElement(
941
+ import_react_native12.View,
942
+ {
943
+ style: [
944
+ {
945
+ backgroundColor: color || theme.colors.border,
946
+ ...orientation === "horizontal" ? { height: thickness, width: "100%" } : { width: thickness, height: "100%" }
947
+ },
948
+ style
949
+ ],
950
+ testID
951
+ }
952
+ );
953
+ }
485
954
  //# sourceMappingURL=index.js.map