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
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ Badge: () => Badge,
33
34
  Body1: () => Body1,
34
35
  Body2: () => Body2,
35
36
  Body3: () => Body3,
@@ -39,17 +40,24 @@ __export(index_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
  ThemeProvider: () => ThemeProvider,
55
63
  darkTheme: () => darkTheme,
@@ -192,10 +200,7 @@ var darkTheme = {
192
200
 
193
201
  // src/theme/index.tsx
194
202
  var ThemeContext = (0, import_react.createContext)(null);
195
- function ThemeProvider({
196
- children,
197
- defaultTheme = "system"
198
- }) {
203
+ function ThemeProvider({ children, defaultTheme = "system" }) {
199
204
  const systemColorScheme = (0, import_react_native.useColorScheme)();
200
205
  const isSystemDark = systemColorScheme === "dark";
201
206
  const [isDark, setIsDark] = (0, import_react.useState)(() => {
@@ -233,6 +238,11 @@ var import_react2 = __toESM(require("react"));
233
238
  var import_react_native2 = require("react-native");
234
239
  function Box({
235
240
  children,
241
+ flex,
242
+ flexDirection,
243
+ alignItems,
244
+ justifyContent,
245
+ flexWrap,
236
246
  padding,
237
247
  paddingHorizontal,
238
248
  paddingVertical,
@@ -242,11 +252,20 @@ function Box({
242
252
  gap,
243
253
  backgroundColor,
244
254
  borderRadius,
255
+ width,
256
+ height,
245
257
  style,
246
258
  testID
247
259
  }) {
248
260
  const { theme } = useTheme();
249
261
  const boxStyle = [
262
+ flex !== void 0 && { flex },
263
+ flexDirection && { flexDirection },
264
+ alignItems && { alignItems },
265
+ justifyContent && { justifyContent },
266
+ flexWrap && { flexWrap },
267
+ width !== void 0 && { width },
268
+ height !== void 0 && { height },
250
269
  padding && { padding: theme.spacing[padding] },
251
270
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
252
271
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -262,6 +281,10 @@ function Box({
262
281
  }
263
282
  function Row({
264
283
  children,
284
+ flex,
285
+ alignItems = "center",
286
+ justifyContent,
287
+ flexWrap,
265
288
  padding,
266
289
  paddingHorizontal,
267
290
  paddingVertical,
@@ -271,12 +294,20 @@ function Row({
271
294
  gap,
272
295
  backgroundColor,
273
296
  borderRadius,
297
+ width,
298
+ height,
274
299
  style,
275
300
  testID
276
301
  }) {
277
302
  const { theme } = useTheme();
278
303
  const rowStyle = [
279
- { flexDirection: "row", alignItems: "center" },
304
+ { flexDirection: "row" },
305
+ flex !== void 0 && { flex },
306
+ alignItems && { alignItems },
307
+ justifyContent && { justifyContent },
308
+ flexWrap && { flexWrap },
309
+ width !== void 0 && { width },
310
+ height !== void 0 && { height },
280
311
  padding && { padding: theme.spacing[padding] },
281
312
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
282
313
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -292,6 +323,10 @@ function Row({
292
323
  }
293
324
  function Column({
294
325
  children,
326
+ flex,
327
+ alignItems,
328
+ justifyContent,
329
+ flexWrap,
295
330
  padding,
296
331
  paddingHorizontal,
297
332
  paddingVertical,
@@ -301,12 +336,20 @@ function Column({
301
336
  gap,
302
337
  backgroundColor,
303
338
  borderRadius,
339
+ width,
340
+ height,
304
341
  style,
305
342
  testID
306
343
  }) {
307
344
  const { theme } = useTheme();
308
345
  const columnStyle = [
309
346
  { flexDirection: "column" },
347
+ flex !== void 0 && { flex },
348
+ alignItems && { alignItems },
349
+ justifyContent && { justifyContent },
350
+ flexWrap && { flexWrap },
351
+ width !== void 0 && { width },
352
+ height !== void 0 && { height },
310
353
  padding && { padding: theme.spacing[padding] },
311
354
  paddingHorizontal && { paddingHorizontal: theme.spacing[paddingHorizontal] },
312
355
  paddingVertical && { paddingVertical: theme.spacing[paddingVertical] },
@@ -321,17 +364,89 @@ function Column({
321
364
  return /* @__PURE__ */ import_react2.default.createElement(import_react_native2.View, { style: columnStyle, testID }, children);
322
365
  }
323
366
 
324
- // src/components/typography/Text.tsx
367
+ // src/components/layouts/Collapsible.tsx
325
368
  var import_react3 = __toESM(require("react"));
326
369
  var import_react_native3 = require("react-native");
327
- function Text({
370
+ if (import_react_native3.Platform.OS === "android" && import_react_native3.UIManager.setLayoutAnimationEnabledExperimental) {
371
+ import_react_native3.UIManager.setLayoutAnimationEnabledExperimental(true);
372
+ }
373
+ function Collapsible({
374
+ title,
328
375
  children,
329
- variant = "body1",
330
- color,
331
- textAlign,
376
+ initiallyExpanded = false,
332
377
  style,
333
378
  testID
334
379
  }) {
380
+ const { theme } = useTheme();
381
+ const [expanded, setExpanded] = (0, import_react3.useState)(initiallyExpanded);
382
+ const toggleExpanded = () => {
383
+ import_react_native3.LayoutAnimation.configureNext(import_react_native3.LayoutAnimation.Presets.easeInEaseOut);
384
+ setExpanded(!expanded);
385
+ };
386
+ return /* @__PURE__ */ import_react3.default.createElement(
387
+ import_react_native3.View,
388
+ {
389
+ style: [
390
+ styles.wrapper,
391
+ {
392
+ borderColor: theme.colors.border,
393
+ borderRadius: theme.borderRadius.md
394
+ },
395
+ style
396
+ ],
397
+ testID
398
+ },
399
+ /* @__PURE__ */ import_react3.default.createElement(
400
+ import_react_native3.TouchableOpacity,
401
+ {
402
+ activeOpacity: 0.7,
403
+ onPress: toggleExpanded,
404
+ style: [
405
+ styles.header,
406
+ {
407
+ padding: theme.spacing.md,
408
+ backgroundColor: theme.colors.surface
409
+ }
410
+ ]
411
+ },
412
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.body1, styles.headerText, { color: theme.colors.text }] }, title),
413
+ /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: [theme.typography.h3, { color: theme.colors.textSecondary }] }, expanded ? "\u2212" : "+")
414
+ ),
415
+ expanded && /* @__PURE__ */ import_react3.default.createElement(
416
+ import_react_native3.View,
417
+ {
418
+ style: [
419
+ styles.content,
420
+ {
421
+ padding: theme.spacing.md,
422
+ backgroundColor: theme.colors.background
423
+ }
424
+ ]
425
+ },
426
+ children
427
+ )
428
+ );
429
+ }
430
+ var styles = import_react_native3.StyleSheet.create({
431
+ wrapper: {
432
+ borderWidth: 1,
433
+ overflow: "hidden"
434
+ },
435
+ header: {
436
+ flexDirection: "row",
437
+ justifyContent: "space-between",
438
+ alignItems: "center"
439
+ },
440
+ headerText: {
441
+ fontWeight: "600"
442
+ },
443
+ content: {}
444
+ });
445
+
446
+ // src/components/typography/Text.tsx
447
+ var import_react4 = __toESM(require("react"));
448
+ var import_react_native4 = require("react-native");
449
+ function Text({ children, variant = "body1", color, textAlign, style, testID }) {
335
450
  const { theme } = useTheme();
336
451
  const textStyle = [
337
452
  theme.typography[variant],
@@ -339,60 +454,60 @@ function Text({
339
454
  textAlign && { textAlign },
340
455
  style
341
456
  ];
342
- return /* @__PURE__ */ import_react3.default.createElement(import_react_native3.Text, { style: textStyle, testID }, children);
457
+ return /* @__PURE__ */ import_react4.default.createElement(import_react_native4.Text, { style: textStyle, testID }, children);
343
458
  }
344
459
  function H1(props) {
345
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h1" });
460
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h1" });
346
461
  }
347
462
  function H2(props) {
348
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h2" });
463
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h2" });
349
464
  }
350
465
  function H3(props) {
351
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h3" });
466
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h3" });
352
467
  }
353
468
  function H4(props) {
354
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h4" });
469
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h4" });
355
470
  }
356
471
  function H5(props) {
357
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h5" });
472
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h5" });
358
473
  }
359
474
  function H6(props) {
360
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "h6" });
475
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "h6" });
361
476
  }
362
477
  function Body1(props) {
363
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body1" });
478
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body1" });
364
479
  }
365
480
  function Body2(props) {
366
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body2" });
481
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body2" });
367
482
  }
368
483
  function Body3(props) {
369
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body3" });
484
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body3" });
370
485
  }
371
486
  function Body4(props) {
372
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body4" });
487
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body4" });
373
488
  }
374
489
  function Body5(props) {
375
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body5" });
490
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body5" });
376
491
  }
377
492
  function Body6(props) {
378
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "body6" });
493
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "body6" });
379
494
  }
380
495
  function SubTitle1(props) {
381
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle1" });
496
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle1" });
382
497
  }
383
498
  function SubTitle2(props) {
384
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "subtitle2" });
499
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "subtitle2" });
385
500
  }
386
501
  function Caption(props) {
387
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "caption" });
502
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "caption" });
388
503
  }
389
504
  function Overline(props) {
390
- return /* @__PURE__ */ import_react3.default.createElement(Text, { ...props, variant: "overline" });
505
+ return /* @__PURE__ */ import_react4.default.createElement(Text, { ...props, variant: "overline" });
391
506
  }
392
507
 
393
508
  // src/components/inputs/Button.tsx
394
- var import_react4 = __toESM(require("react"));
395
- var import_react_native4 = require("react-native");
509
+ var import_react5 = __toESM(require("react"));
510
+ var import_react_native5 = require("react-native");
396
511
  function Button({
397
512
  label,
398
513
  onPress,
@@ -459,7 +574,7 @@ function Button({
459
574
  }
460
575
  };
461
576
  const buttonStyle = [
462
- styles.button,
577
+ styles2.button,
463
578
  {
464
579
  ...getVariantStyle(),
465
580
  ...getSizeStyle(),
@@ -469,32 +584,26 @@ function Button({
469
584
  style
470
585
  ];
471
586
  const textColor = variant === "ghost" ? theme.colors.primary : theme.colors.white;
472
- return /* @__PURE__ */ import_react4.default.createElement(
473
- import_react_native4.TouchableOpacity,
587
+ return /* @__PURE__ */ import_react5.default.createElement(
588
+ import_react_native5.TouchableOpacity,
474
589
  {
475
590
  style: buttonStyle,
476
591
  onPress,
477
592
  disabled: disabled || loading,
478
593
  testID
479
594
  },
480
- /* @__PURE__ */ import_react4.default.createElement(import_react_native4.View, { style: styles.content }, loading ? /* @__PURE__ */ import_react4.default.createElement(
481
- import_react_native4.ActivityIndicator,
482
- {
483
- color: textColor,
484
- size: size === "small" ? "small" : "large"
485
- }
486
- ) : /* @__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(
595
+ /* @__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(
487
596
  Text,
488
597
  {
489
598
  variant: size === "small" ? "body3" : "body1",
490
599
  color: textColor,
491
- style: styles.label
600
+ style: styles2.label
492
601
  },
493
602
  label
494
603
  )))
495
604
  );
496
605
  }
497
- var styles = import_react_native4.StyleSheet.create({
606
+ var styles2 = import_react_native5.StyleSheet.create({
498
607
  button: {
499
608
  justifyContent: "center",
500
609
  alignItems: "center",
@@ -512,4 +621,402 @@ var styles = import_react_native4.StyleSheet.create({
512
621
  fontWeight: "600"
513
622
  }
514
623
  });
624
+
625
+ // src/components/inputs/Input.tsx
626
+ var import_react6 = __toESM(require("react"));
627
+ var import_react_native6 = require("react-native");
628
+ function Input({
629
+ value,
630
+ onChangeText,
631
+ placeholder,
632
+ label,
633
+ error,
634
+ editable = true,
635
+ secureTextEntry = false,
636
+ keyboardType = "default",
637
+ multiline = false,
638
+ numberOfLines = 1,
639
+ style,
640
+ testID
641
+ }) {
642
+ const { theme } = useTheme();
643
+ return /* @__PURE__ */ import_react6.default.createElement(import_react_native6.View, { style: [styles3.container, style] }, label && /* @__PURE__ */ import_react6.default.createElement(
644
+ import_react_native6.Text,
645
+ {
646
+ style: [
647
+ theme.typography.body2,
648
+ {
649
+ color: error ? theme.colors.error : theme.colors.textSecondary,
650
+ marginBottom: theme.spacing.xs
651
+ }
652
+ ]
653
+ },
654
+ label
655
+ ), /* @__PURE__ */ import_react6.default.createElement(
656
+ import_react_native6.TextInput,
657
+ {
658
+ value,
659
+ onChangeText,
660
+ placeholder,
661
+ placeholderTextColor: theme.colors.textTertiary,
662
+ editable,
663
+ secureTextEntry,
664
+ keyboardType,
665
+ multiline,
666
+ numberOfLines: multiline ? numberOfLines : 1,
667
+ testID,
668
+ style: [
669
+ theme.typography.body1,
670
+ styles3.input,
671
+ {
672
+ borderColor: error ? theme.colors.error : theme.colors.border,
673
+ borderRadius: theme.borderRadius.sm,
674
+ padding: theme.spacing.md,
675
+ color: theme.colors.text,
676
+ backgroundColor: editable ? theme.colors.surface : theme.colors.disabled,
677
+ minHeight: multiline ? numberOfLines * 24 + theme.spacing.md * 2 : void 0
678
+ }
679
+ ]
680
+ }
681
+ ), error && /* @__PURE__ */ import_react6.default.createElement(
682
+ import_react_native6.Text,
683
+ {
684
+ style: [
685
+ theme.typography.caption,
686
+ { color: theme.colors.error, marginTop: theme.spacing.xs }
687
+ ]
688
+ },
689
+ error
690
+ ));
691
+ }
692
+ var styles3 = import_react_native6.StyleSheet.create({
693
+ container: {
694
+ width: "100%"
695
+ },
696
+ input: {
697
+ borderWidth: 1
698
+ }
699
+ });
700
+
701
+ // src/components/inputs/CheckBox.tsx
702
+ var import_react7 = __toESM(require("react"));
703
+ var import_react_native7 = require("react-native");
704
+ function CheckBox({
705
+ value,
706
+ onValueChange,
707
+ label,
708
+ disabled = false,
709
+ style,
710
+ testID
711
+ }) {
712
+ const { theme } = useTheme();
713
+ return /* @__PURE__ */ import_react7.default.createElement(
714
+ import_react_native7.TouchableOpacity,
715
+ {
716
+ activeOpacity: 0.7,
717
+ onPress: () => !disabled && onValueChange(!value),
718
+ disabled,
719
+ style: [styles4.container, style],
720
+ testID
721
+ },
722
+ /* @__PURE__ */ import_react7.default.createElement(
723
+ import_react_native7.View,
724
+ {
725
+ style: [
726
+ styles4.checkbox,
727
+ {
728
+ borderColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : theme.colors.border,
729
+ backgroundColor: disabled ? theme.colors.disabled : value ? theme.colors.primary : "transparent",
730
+ borderRadius: theme.borderRadius.xs
731
+ }
732
+ ]
733
+ },
734
+ value && /* @__PURE__ */ import_react7.default.createElement(import_react_native7.Text, { style: [styles4.checkmark, { color: theme.colors.white }] }, "\u2713")
735
+ ),
736
+ label && /* @__PURE__ */ import_react7.default.createElement(
737
+ import_react_native7.Text,
738
+ {
739
+ style: [
740
+ theme.typography.body1,
741
+ {
742
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
743
+ marginLeft: theme.spacing.sm
744
+ }
745
+ ]
746
+ },
747
+ label
748
+ )
749
+ );
750
+ }
751
+ var styles4 = import_react_native7.StyleSheet.create({
752
+ container: {
753
+ flexDirection: "row",
754
+ alignItems: "center"
755
+ },
756
+ checkbox: {
757
+ justifyContent: "center",
758
+ alignItems: "center",
759
+ borderWidth: 2,
760
+ width: 24,
761
+ height: 24
762
+ },
763
+ checkmark: {
764
+ fontSize: 16,
765
+ fontWeight: "bold"
766
+ }
767
+ });
768
+
769
+ // src/components/inputs/RadioButton.tsx
770
+ var import_react8 = __toESM(require("react"));
771
+ var import_react_native8 = require("react-native");
772
+ function RadioButton({
773
+ value,
774
+ selected,
775
+ onSelect,
776
+ label,
777
+ disabled = false,
778
+ style,
779
+ testID
780
+ }) {
781
+ const { theme } = useTheme();
782
+ const isSelected = value === selected;
783
+ return /* @__PURE__ */ import_react8.default.createElement(
784
+ import_react_native8.TouchableOpacity,
785
+ {
786
+ activeOpacity: 0.7,
787
+ onPress: () => !disabled && onSelect(value),
788
+ disabled,
789
+ style: [styles5.container, style],
790
+ testID
791
+ },
792
+ /* @__PURE__ */ import_react8.default.createElement(
793
+ import_react_native8.View,
794
+ {
795
+ style: [
796
+ styles5.radio,
797
+ {
798
+ borderColor: disabled ? theme.colors.disabled : isSelected ? theme.colors.primary : theme.colors.border
799
+ }
800
+ ]
801
+ },
802
+ isSelected && /* @__PURE__ */ import_react8.default.createElement(
803
+ import_react_native8.View,
804
+ {
805
+ style: [
806
+ styles5.radioInner,
807
+ {
808
+ backgroundColor: disabled ? theme.colors.disabled : theme.colors.primary
809
+ }
810
+ ]
811
+ }
812
+ )
813
+ ),
814
+ label && /* @__PURE__ */ import_react8.default.createElement(
815
+ import_react_native8.Text,
816
+ {
817
+ style: [
818
+ theme.typography.body1,
819
+ {
820
+ color: disabled ? theme.colors.textTertiary : theme.colors.text,
821
+ marginLeft: theme.spacing.sm
822
+ }
823
+ ]
824
+ },
825
+ label
826
+ )
827
+ );
828
+ }
829
+ var styles5 = import_react_native8.StyleSheet.create({
830
+ container: {
831
+ flexDirection: "row",
832
+ alignItems: "center"
833
+ },
834
+ radio: {
835
+ justifyContent: "center",
836
+ alignItems: "center",
837
+ borderWidth: 2,
838
+ width: 24,
839
+ height: 24,
840
+ borderRadius: 12
841
+ },
842
+ radioInner: {
843
+ width: 12,
844
+ height: 12,
845
+ borderRadius: 6
846
+ }
847
+ });
848
+
849
+ // src/components/inputs/Switch.tsx
850
+ var import_react9 = __toESM(require("react"));
851
+ var import_react_native9 = require("react-native");
852
+ function Switch({ value, onValueChange, disabled = false, style, testID }) {
853
+ const { theme } = useTheme();
854
+ return /* @__PURE__ */ import_react9.default.createElement(
855
+ import_react_native9.Switch,
856
+ {
857
+ value,
858
+ onValueChange,
859
+ disabled,
860
+ trackColor: {
861
+ false: theme.colors.border,
862
+ true: theme.colors.primary
863
+ },
864
+ thumbColor: theme.colors.white,
865
+ ios_backgroundColor: theme.colors.border,
866
+ style,
867
+ testID
868
+ }
869
+ );
870
+ }
871
+
872
+ // src/components/display/ProgressBar.tsx
873
+ var import_react10 = __toESM(require("react"));
874
+ var import_react_native10 = require("react-native");
875
+ function ProgressBar({
876
+ progress,
877
+ height = 8,
878
+ color,
879
+ backgroundColor,
880
+ borderRadius = "full",
881
+ style,
882
+ testID
883
+ }) {
884
+ const { theme } = useTheme();
885
+ const clampedProgress = Math.max(0, Math.min(1, progress));
886
+ return /* @__PURE__ */ import_react10.default.createElement(
887
+ import_react_native10.View,
888
+ {
889
+ style: [
890
+ styles6.track,
891
+ {
892
+ height,
893
+ backgroundColor: backgroundColor || theme.colors.border,
894
+ borderRadius: theme.borderRadius[borderRadius]
895
+ },
896
+ style
897
+ ],
898
+ testID
899
+ },
900
+ /* @__PURE__ */ import_react10.default.createElement(
901
+ import_react_native10.View,
902
+ {
903
+ style: [
904
+ styles6.fill,
905
+ {
906
+ width: `${clampedProgress * 100}%`,
907
+ backgroundColor: color || theme.colors.primary
908
+ }
909
+ ]
910
+ }
911
+ )
912
+ );
913
+ }
914
+ var styles6 = import_react_native10.StyleSheet.create({
915
+ track: {
916
+ overflow: "hidden"
917
+ },
918
+ fill: {
919
+ height: "100%"
920
+ }
921
+ });
922
+
923
+ // src/components/display/Badge.tsx
924
+ var import_react11 = __toESM(require("react"));
925
+ var import_react_native11 = require("react-native");
926
+ function Badge({
927
+ children,
928
+ variant = "primary",
929
+ size = "medium",
930
+ style,
931
+ testID
932
+ }) {
933
+ const { theme } = useTheme();
934
+ const variantColors = {
935
+ primary: theme.colors.primary,
936
+ secondary: theme.colors.secondary,
937
+ success: theme.colors.success,
938
+ error: theme.colors.error,
939
+ warning: theme.colors.warning,
940
+ info: theme.colors.info
941
+ };
942
+ const sizeStyles = {
943
+ small: {
944
+ paddingHorizontal: theme.spacing.xs,
945
+ paddingVertical: theme.spacing.xs / 2,
946
+ fontSize: 10
947
+ },
948
+ medium: {
949
+ paddingHorizontal: theme.spacing.sm,
950
+ paddingVertical: theme.spacing.xs,
951
+ fontSize: 12
952
+ },
953
+ large: {
954
+ paddingHorizontal: theme.spacing.md,
955
+ paddingVertical: theme.spacing.sm,
956
+ fontSize: 14
957
+ }
958
+ };
959
+ return /* @__PURE__ */ import_react11.default.createElement(
960
+ import_react_native11.View,
961
+ {
962
+ style: [
963
+ styles7.badge,
964
+ {
965
+ backgroundColor: variantColors[variant],
966
+ borderRadius: theme.borderRadius.full,
967
+ ...sizeStyles[size]
968
+ },
969
+ style
970
+ ],
971
+ testID
972
+ },
973
+ /* @__PURE__ */ import_react11.default.createElement(
974
+ import_react_native11.Text,
975
+ {
976
+ style: [
977
+ styles7.text,
978
+ {
979
+ color: theme.colors.white,
980
+ fontSize: sizeStyles[size].fontSize
981
+ }
982
+ ]
983
+ },
984
+ children
985
+ )
986
+ );
987
+ }
988
+ var styles7 = import_react_native11.StyleSheet.create({
989
+ badge: {
990
+ alignSelf: "flex-start"
991
+ },
992
+ text: {
993
+ fontWeight: "600"
994
+ }
995
+ });
996
+
997
+ // src/components/display/Divider.tsx
998
+ var import_react12 = __toESM(require("react"));
999
+ var import_react_native12 = require("react-native");
1000
+ function Divider({
1001
+ orientation = "horizontal",
1002
+ thickness = 1,
1003
+ color,
1004
+ style,
1005
+ testID
1006
+ }) {
1007
+ const { theme } = useTheme();
1008
+ return /* @__PURE__ */ import_react12.default.createElement(
1009
+ import_react_native12.View,
1010
+ {
1011
+ style: [
1012
+ {
1013
+ backgroundColor: color || theme.colors.border,
1014
+ ...orientation === "horizontal" ? { height: thickness, width: "100%" } : { width: thickness, height: "100%" }
1015
+ },
1016
+ style
1017
+ ],
1018
+ testID
1019
+ }
1020
+ );
1021
+ }
515
1022
  //# sourceMappingURL=index.js.map