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
@@ -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,89 @@ 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
+ styles.wrapper,
364
+ {
365
+ borderColor: theme.colors.border,
366
+ borderRadius: theme.borderRadius.md
367
+ },
368
+ style
369
+ ],
370
+ testID
371
+ },
372
+ /* @__PURE__ */ import_react3.default.createElement(
373
+ import_react_native3.TouchableOpacity,
374
+ {
375
+ activeOpacity: 0.7,
376
+ onPress: toggleExpanded,
377
+ style: [
378
+ styles.header,
379
+ {
380
+ padding: theme.spacing.md,
381
+ backgroundColor: theme.colors.surface
382
+ }
383
+ ]
384
+ },
385
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.body1, styles.headerText, { color: theme.colors.text }] }, title),
386
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.h3, { color: theme.colors.textSecondary }] }, expanded ? "\u2212" : "+")
387
+ ),
388
+ expanded && /* @__PURE__ */ import_react3.default.createElement(
389
+ import_react_native3.View,
390
+ {
391
+ style: [
392
+ styles.content,
393
+ {
394
+ padding: theme.spacing.md,
395
+ backgroundColor: theme.colors.background
396
+ }
397
+ ]
398
+ },
399
+ children
400
+ )
401
+ );
402
+ }
403
+ var styles = import_react_native3.StyleSheet.create({
404
+ wrapper: {
405
+ borderWidth: 1,
406
+ overflow: "hidden"
407
+ },
408
+ header: {
409
+ flexDirection: "row",
410
+ justifyContent: "space-between",
411
+ alignItems: "center"
412
+ },
413
+ headerText: {
414
+ fontWeight: "600"
415
+ },
416
+ content: {}
417
+ });
418
+
419
+ // src/components/typography/Text.tsx
420
+ var import_react4 = __toESM(require("react"));
421
+ var import_react_native4 = require("react-native");
422
+ function Text({ children, variant = "body1", color, textAlign, style, testID }) {
305
423
  const { theme } = useTheme();
306
424
  const textStyle = [
307
425
  theme.typography[variant],
@@ -309,60 +427,60 @@ function Text({
309
427
  textAlign && { textAlign },
310
428
  style
311
429
  ];
312
- return /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: textStyle, testID }, children);
430
+ return /* @__PURE__ */ import_react4.default.createElement(import_react_native4.Text, { style: textStyle, testID }, children);
313
431
  }
314
432
  function H1(props) {
315
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h1" });
433
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h1" });
316
434
  }
317
435
  function H2(props) {
318
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h2" });
436
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h2" });
319
437
  }
320
438
  function H3(props) {
321
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h3" });
439
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h3" });
322
440
  }
323
441
  function H4(props) {
324
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h4" });
442
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h4" });
325
443
  }
326
444
  function H5(props) {
327
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h5" });
445
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h5" });
328
446
  }
329
447
  function H6(props) {
330
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h6" });
448
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h6" });
331
449
  }
332
450
  function Body1(props) {
333
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body1" });
451
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body1" });
334
452
  }
335
453
  function Body2(props) {
336
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body2" });
454
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body2" });
337
455
  }
338
456
  function Body3(props) {
339
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body3" });
457
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body3" });
340
458
  }
341
459
  function Body4(props) {
342
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body4" });
460
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body4" });
343
461
  }
344
462
  function Body5(props) {
345
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body5" });
463
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body5" });
346
464
  }
347
465
  function Body6(props) {
348
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body6" });
466
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body6" });
349
467
  }
350
468
  function SubTitle1(props) {
351
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle1" });
469
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle1" });
352
470
  }
353
471
  function SubTitle2(props) {
354
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle2" });
472
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle2" });
355
473
  }
356
474
  function Caption(props) {
357
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "caption" });
475
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "caption" });
358
476
  }
359
477
  function Overline(props) {
360
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "overline" });
478
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "overline" });
361
479
  }
362
480
 
363
481
  // src/components/inputs/Button.tsx
364
- var import_react4 = __toESM(require("react"));
365
- var import_react_native4 = require("react-native");
482
+ var import_react5 = __toESM(require("react"));
483
+ var import_react_native5 = require("react-native");
366
484
  function Button({
367
485
  label,
368
486
  onPress,
@@ -429,7 +547,7 @@ function Button({
429
547
  }
430
548
  };
431
549
  const buttonStyle = [
432
- styles.button,
550
+ styles2.button,
433
551
  {
434
552
  ...getVariantStyle(),
435
553
  ...getSizeStyle(),
@@ -439,32 +557,26 @@ function Button({
439
557
  style
440
558
  ];
441
559
  const textColor = variant === "ghost" ? theme.colors.primary : theme.colors.white;
442
- return /* @__PURE__ */ import_react4.default.createElement(
443
- import_react_native4.TouchableOpacity,
560
+ return /* @__PURE__ */ import_react5.default.createElement(
561
+ import_react_native5.TouchableOpacity,
444
562
  {
445
563
  style: buttonStyle,
446
564
  onPress,
447
565
  disabled: disabled || loading,
448
566
  testID
449
567
  },
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(
568
+ /* @__PURE__ */ import_react5.default.createElement(import_react_native5.View, { style: styles2.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: styles2.icon }, icon), /* @__PURE__ */ import_react5.default.createElement(
457
569
  Text,
458
570
  {
459
571
  variant: size === "small" ? "body3" : "body1",
460
572
  color: textColor,
461
- style: styles.label
573
+ style: styles2.label
462
574
  },
463
575
  label
464
576
  )))
465
577
  );
466
578
  }
467
- var styles = import_react_native4.StyleSheet.create({
579
+ var styles2 = import_react_native5.StyleSheet.create({
468
580
  button: {
469
581
  justifyContent: "center",
470
582
  alignItems: "center",
@@ -482,4 +594,402 @@ var styles = import_react_native4.StyleSheet.create({
482
594
  fontWeight: "600"
483
595
  }
484
596
  });
597
+
598
+ // src/components/inputs/Input.tsx
599
+ var import_react6 = __toESM(require("react"));
600
+ var import_react_native6 = require("react-native");
601
+ function Input({
602
+ value,
603
+ onChangeText,
604
+ placeholder,
605
+ label,
606
+ error,
607
+ editable = true,
608
+ secureTextEntry = false,
609
+ keyboardType = "default",
610
+ multiline = false,
611
+ numberOfLines = 1,
612
+ style,
613
+ testID
614
+ }) {
615
+ const { theme } = useTheme();
616
+ return /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: [styles3.container, style] }, label && /* @__PURE__ */ import_react6.default.createElement(
617
+ import_react_native6.Text,
618
+ {
619
+ style: [
620
+ theme.typography.body2,
621
+ {
622
+ color: error ? theme.colors.error : theme.colors.textSecondary,
623
+ marginBottom: theme.spacing.xs
624
+ }
625
+ ]
626
+ },
627
+ label
628
+ ), /* @__PURE__ */ import_react6.default.createElement(
629
+ import_react_native6.TextInput,
630
+ {
631
+ value,
632
+ onChangeText,
633
+ placeholder,
634
+ placeholderTextColor: theme.colors.textTertiary,
635
+ editable,
636
+ secureTextEntry,
637
+ keyboardType,
638
+ multiline,
639
+ numberOfLines: multiline ? numberOfLines : 1,
640
+ testID,
641
+ style: [
642
+ theme.typography.body1,
643
+ styles3.input,
644
+ {
645
+ borderColor: error ? theme.colors.error : theme.colors.border,
646
+ borderRadius: theme.borderRadius.sm,
647
+ padding: theme.spacing.md,
648
+ color: theme.colors.text,
649
+ backgroundColor: editable ? theme.colors.surface : theme.colors.disabled,
650
+ minHeight: multiline ? numberOfLines * 24 + theme.spacing.md * 2 : void 0
651
+ }
652
+ ]
653
+ }
654
+ ), error && /* @__PURE__ */ import_react6.default.createElement(
655
+ import_react_native6.Text,
656
+ {
657
+ style: [
658
+ theme.typography.caption,
659
+ { color: theme.colors.error, marginTop: theme.spacing.xs }
660
+ ]
661
+ },
662
+ error
663
+ ));
664
+ }
665
+ var styles3 = import_react_native6.StyleSheet.create({
666
+ container: {
667
+ width: "100%"
668
+ },
669
+ input: {
670
+ borderWidth: 1
671
+ }
672
+ });
673
+
674
+ // src/components/inputs/CheckBox.tsx
675
+ var import_react7 = __toESM(require("react"));
676
+ var import_react_native7 = require("react-native");
677
+ function CheckBox({
678
+ value,
679
+ onValueChange,
680
+ label,
681
+ disabled = false,
682
+ style,
683
+ testID
684
+ }) {
685
+ const { theme } = useTheme();
686
+ return /* @__PURE__ */ import_react7.default.createElement(
687
+ import_react_native7.TouchableOpacity,
688
+ {
689
+ activeOpacity: 0.7,
690
+ onPress: () => !disabled && onValueChange(!value),
691
+ disabled,
692
+ style: [styles4.container, style],
693
+ testID
694
+ },
695
+ /* @__PURE__ */ import_react7.default.createElement(
696
+ import_react_native7.View,
697
+ {
698
+ style: [
699
+ styles4.checkbox,
700
+ {
701
+ borderColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : theme.colors.border,
702
+ backgroundColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : "transparent",
703
+ borderRadius: theme.borderRadius.xs
704
+ }
705
+ ]
706
+ },
707
+ value && /* @__PURE__ */ import_react7.default.createElement(import_react_native7.Text, { style: [styles4.checkmark, { color: theme.colors.white }] }, "\u2713")
708
+ ),
709
+ label && /* @__PURE__ */ import_react7.default.createElement(
710
+ import_react_native7.Text,
711
+ {
712
+ style: [
713
+ theme.typography.body1,
714
+ {
715
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
716
+ marginLeft: theme.spacing.sm
717
+ }
718
+ ]
719
+ },
720
+ label
721
+ )
722
+ );
723
+ }
724
+ var styles4 = import_react_native7.StyleSheet.create({
725
+ container: {
726
+ flexDirection: "row",
727
+ alignItems: "center"
728
+ },
729
+ checkbox: {
730
+ justifyContent: "center",
731
+ alignItems: "center",
732
+ borderWidth: 2,
733
+ width: 24,
734
+ height: 24
735
+ },
736
+ checkmark: {
737
+ fontSize: 16,
738
+ fontWeight: "bold"
739
+ }
740
+ });
741
+
742
+ // src/components/inputs/RadioButton.tsx
743
+ var import_react8 = __toESM(require("react"));
744
+ var import_react_native8 = require("react-native");
745
+ function RadioButton({
746
+ value,
747
+ selected,
748
+ onSelect,
749
+ label,
750
+ disabled = false,
751
+ style,
752
+ testID
753
+ }) {
754
+ const { theme } = useTheme();
755
+ const isSelected = value === selected;
756
+ return /* @__PURE__ */ import_react8.default.createElement(
757
+ import_react_native8.TouchableOpacity,
758
+ {
759
+ activeOpacity: 0.7,
760
+ onPress: () => !disabled && onSelect(value),
761
+ disabled,
762
+ style: [styles5.container, style],
763
+ testID
764
+ },
765
+ /* @__PURE__ */ import_react8.default.createElement(
766
+ import_react_native8.View,
767
+ {
768
+ style: [
769
+ styles5.radio,
770
+ {
771
+ borderColor: disabled ? theme.colors.disabled : isSelected ? theme.colors.primary : theme.colors.border
772
+ }
773
+ ]
774
+ },
775
+ isSelected && /* @__PURE__ */ import_react8.default.createElement(
776
+ import_react_native8.View,
777
+ {
778
+ style: [
779
+ styles5.radioInner,
780
+ {
781
+ backgroundColor: disabled ? theme.colors.disabled : theme.colors.primary
782
+ }
783
+ ]
784
+ }
785
+ )
786
+ ),
787
+ label && /* @__PURE__ */ import_react8.default.createElement(
788
+ import_react_native8.Text,
789
+ {
790
+ style: [
791
+ theme.typography.body1,
792
+ {
793
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
794
+ marginLeft: theme.spacing.sm
795
+ }
796
+ ]
797
+ },
798
+ label
799
+ )
800
+ );
801
+ }
802
+ var styles5 = import_react_native8.StyleSheet.create({
803
+ container: {
804
+ flexDirection: "row",
805
+ alignItems: "center"
806
+ },
807
+ radio: {
808
+ justifyContent: "center",
809
+ alignItems: "center",
810
+ borderWidth: 2,
811
+ width: 24,
812
+ height: 24,
813
+ borderRadius: 12
814
+ },
815
+ radioInner: {
816
+ width: 12,
817
+ height: 12,
818
+ borderRadius: 6
819
+ }
820
+ });
821
+
822
+ // src/components/inputs/Switch.tsx
823
+ var import_react9 = __toESM(require("react"));
824
+ var import_react_native9 = require("react-native");
825
+ function Switch({ value, onValueChange, disabled = false, style, testID }) {
826
+ const { theme } = useTheme();
827
+ return /* @__PURE__ */ import_react9.default.createElement(
828
+ import_react_native9.Switch,
829
+ {
830
+ value,
831
+ onValueChange,
832
+ disabled,
833
+ trackColor: {
834
+ false: theme.colors.border,
835
+ true: theme.colors.primary
836
+ },
837
+ thumbColor: theme.colors.white,
838
+ ios_backgroundColor: theme.colors.border,
839
+ style,
840
+ testID
841
+ }
842
+ );
843
+ }
844
+
845
+ // src/components/display/ProgressBar.tsx
846
+ var import_react10 = __toESM(require("react"));
847
+ var import_react_native10 = require("react-native");
848
+ function ProgressBar({
849
+ progress,
850
+ height = 8,
851
+ color,
852
+ backgroundColor,
853
+ borderRadius = "full",
854
+ style,
855
+ testID
856
+ }) {
857
+ const { theme } = useTheme();
858
+ const clampedProgress = Math.max(0, Math.min(1, progress));
859
+ return /* @__PURE__ */ import_react10.default.createElement(
860
+ import_react_native10.View,
861
+ {
862
+ style: [
863
+ styles6.track,
864
+ {
865
+ height,
866
+ backgroundColor: backgroundColor || theme.colors.border,
867
+ borderRadius: theme.borderRadius[borderRadius]
868
+ },
869
+ style
870
+ ],
871
+ testID
872
+ },
873
+ /* @__PURE__ */ import_react10.default.createElement(
874
+ import_react_native10.View,
875
+ {
876
+ style: [
877
+ styles6.fill,
878
+ {
879
+ width: `${clampedProgress * 100}%`,
880
+ backgroundColor: color || theme.colors.primary
881
+ }
882
+ ]
883
+ }
884
+ )
885
+ );
886
+ }
887
+ var styles6 = import_react_native10.StyleSheet.create({
888
+ track: {
889
+ overflow: "hidden"
890
+ },
891
+ fill: {
892
+ height: "100%"
893
+ }
894
+ });
895
+
896
+ // src/components/display/Badge.tsx
897
+ var import_react11 = __toESM(require("react"));
898
+ var import_react_native11 = require("react-native");
899
+ function Badge({
900
+ children,
901
+ variant = "primary",
902
+ size = "medium",
903
+ style,
904
+ testID
905
+ }) {
906
+ const { theme } = useTheme();
907
+ const variantColors = {
908
+ primary: theme.colors.primary,
909
+ secondary: theme.colors.secondary,
910
+ success: theme.colors.success,
911
+ error: theme.colors.error,
912
+ warning: theme.colors.warning,
913
+ info: theme.colors.info
914
+ };
915
+ const sizeStyles = {
916
+ small: {
917
+ paddingHorizontal: theme.spacing.xs,
918
+ paddingVertical: theme.spacing.xs / 2,
919
+ fontSize: 10
920
+ },
921
+ medium: {
922
+ paddingHorizontal: theme.spacing.sm,
923
+ paddingVertical: theme.spacing.xs,
924
+ fontSize: 12
925
+ },
926
+ large: {
927
+ paddingHorizontal: theme.spacing.md,
928
+ paddingVertical: theme.spacing.sm,
929
+ fontSize: 14
930
+ }
931
+ };
932
+ return /* @__PURE__ */ import_react11.default.createElement(
933
+ import_react_native11.View,
934
+ {
935
+ style: [
936
+ styles7.badge,
937
+ {
938
+ backgroundColor: variantColors[variant],
939
+ borderRadius: theme.borderRadius.full,
940
+ ...sizeStyles[size]
941
+ },
942
+ style
943
+ ],
944
+ testID
945
+ },
946
+ /* @__PURE__ */ import_react11.default.createElement(
947
+ import_react_native11.Text,
948
+ {
949
+ style: [
950
+ styles7.text,
951
+ {
952
+ color: theme.colors.white,
953
+ fontSize: sizeStyles[size].fontSize
954
+ }
955
+ ]
956
+ },
957
+ children
958
+ )
959
+ );
960
+ }
961
+ var styles7 = import_react_native11.StyleSheet.create({
962
+ badge: {
963
+ alignSelf: "flex-start"
964
+ },
965
+ text: {
966
+ fontWeight: "600"
967
+ }
968
+ });
969
+
970
+ // src/components/display/Divider.tsx
971
+ var import_react12 = __toESM(require("react"));
972
+ var import_react_native12 = require("react-native");
973
+ function Divider({
974
+ orientation = "horizontal",
975
+ thickness = 1,
976
+ color,
977
+ style,
978
+ testID
979
+ }) {
980
+ const { theme } = useTheme();
981
+ return /* @__PURE__ */ import_react12.default.createElement(
982
+ import_react_native12.View,
983
+ {
984
+ style: [
985
+ {
986
+ backgroundColor: color || theme.colors.border,
987
+ ...orientation === "horizontal" ? { height: thickness, width: "100%" } : { width: thickness, height: "100%" }
988
+ },
989
+ style
990
+ ],
991
+ testID
992
+ }
993
+ );
994
+ }
485
995
  //# sourceMappingURL=index.js.map