@codeleap/mobile 1.0.0

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 (103) hide show
  1. package/dist/components/ActivityIndicator.d.ts +13 -0
  2. package/dist/components/ActivityIndicator.js +49 -0
  3. package/dist/components/ActivityIndicator.js.map +1 -0
  4. package/dist/components/Button.d.ts +116 -0
  5. package/dist/components/Button.js +57 -0
  6. package/dist/components/Button.js.map +1 -0
  7. package/dist/components/Checkbox/index.d.ts +14 -0
  8. package/dist/components/Checkbox/index.js +75 -0
  9. package/dist/components/Checkbox/index.js.map +1 -0
  10. package/dist/components/Checkbox/styles.d.ts +48 -0
  11. package/dist/components/Checkbox/styles.js +49 -0
  12. package/dist/components/Checkbox/styles.js.map +1 -0
  13. package/dist/components/Checkbox.d.ts +12 -0
  14. package/dist/components/Checkbox.js +61 -0
  15. package/dist/components/Checkbox.js.map +1 -0
  16. package/dist/components/Drawer.d.ts +23 -0
  17. package/dist/components/Drawer.js +78 -0
  18. package/dist/components/Drawer.js.map +1 -0
  19. package/dist/components/FileInput.d.ts +2 -0
  20. package/dist/components/FileInput.js +28 -0
  21. package/dist/components/FileInput.js.map +1 -0
  22. package/dist/components/Icon.d.ts +13 -0
  23. package/dist/components/Icon.js +47 -0
  24. package/dist/components/Icon.js.map +1 -0
  25. package/dist/components/Image.d.ts +16 -0
  26. package/dist/components/Image.js +48 -0
  27. package/dist/components/Image.js.map +1 -0
  28. package/dist/components/Navigation.d.ts +30 -0
  29. package/dist/components/Navigation.js +126 -0
  30. package/dist/components/Navigation.js.map +1 -0
  31. package/dist/components/RadioInput/index.d.ts +25 -0
  32. package/dist/components/RadioInput/index.js +75 -0
  33. package/dist/components/RadioInput/index.js.map +1 -0
  34. package/dist/components/RadioInput/styles.d.ts +50 -0
  35. package/dist/components/RadioInput/styles.js +45 -0
  36. package/dist/components/RadioInput/styles.js.map +1 -0
  37. package/dist/components/Scroll.d.ts +104 -0
  38. package/dist/components/Scroll.js +73 -0
  39. package/dist/components/Scroll.js.map +1 -0
  40. package/dist/components/Select/index.d.ts +2 -0
  41. package/dist/components/Select/index.js +31 -0
  42. package/dist/components/Select/index.js.map +1 -0
  43. package/dist/components/Slider.d.ts +20 -0
  44. package/dist/components/Slider.js +130 -0
  45. package/dist/components/Slider.js.map +1 -0
  46. package/dist/components/Switch.d.ts +13 -0
  47. package/dist/components/Switch.js +73 -0
  48. package/dist/components/Switch.js.map +1 -0
  49. package/dist/components/Text.d.ts +12 -0
  50. package/dist/components/Text.js +49 -0
  51. package/dist/components/Text.js.map +1 -0
  52. package/dist/components/TextInput.d.ts +146 -0
  53. package/dist/components/TextInput.js +147 -0
  54. package/dist/components/TextInput.js.map +1 -0
  55. package/dist/components/Touchable.d.ts +19 -0
  56. package/dist/components/Touchable.js +62 -0
  57. package/dist/components/Touchable.js.map +1 -0
  58. package/dist/components/View.d.ts +190 -0
  59. package/dist/components/View.js +53 -0
  60. package/dist/components/View.js.map +1 -0
  61. package/dist/components/index.d.ts +16 -0
  62. package/dist/components/index.js +29 -0
  63. package/dist/components/index.js.map +1 -0
  64. package/dist/index.d.ts +2 -0
  65. package/dist/index.js +20 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/modules/fastImage.d.ts +1 -0
  68. package/dist/modules/fastImage.js +10 -0
  69. package/dist/modules/fastImage.js.map +1 -0
  70. package/dist/types/utility.d.ts +2 -0
  71. package/dist/types/utility.js +3 -0
  72. package/dist/types/utility.js.map +1 -0
  73. package/dist/utils/OSAlert.d.ts +31 -0
  74. package/dist/utils/OSAlert.js +89 -0
  75. package/dist/utils/OSAlert.js.map +1 -0
  76. package/dist/utils/styles.d.ts +1 -0
  77. package/dist/utils/styles.js +13 -0
  78. package/dist/utils/styles.js.map +1 -0
  79. package/package.json +32 -0
  80. package/src/components/ActivityIndicator.tsx +37 -0
  81. package/src/components/Button.tsx +61 -0
  82. package/src/components/Checkbox/index.tsx +68 -0
  83. package/src/components/Checkbox/styles.ts +63 -0
  84. package/src/components/FileInput.tsx +6 -0
  85. package/src/components/Icon.tsx +35 -0
  86. package/src/components/Image.tsx +43 -0
  87. package/src/components/Navigation.tsx +125 -0
  88. package/src/components/RadioInput/index.tsx +76 -0
  89. package/src/components/RadioInput/styles.ts +62 -0
  90. package/src/components/Scroll.tsx +87 -0
  91. package/src/components/Select/index.tsx +8 -0
  92. package/src/components/Slider.tsx +198 -0
  93. package/src/components/Switch.tsx +73 -0
  94. package/src/components/Text.tsx +31 -0
  95. package/src/components/TextInput.tsx +206 -0
  96. package/src/components/Touchable.tsx +54 -0
  97. package/src/components/View.tsx +53 -0
  98. package/src/components/index.ts +16 -0
  99. package/src/index.ts +2 -0
  100. package/src/modules/fastImage.ts +2 -0
  101. package/src/types/utility.ts +3 -0
  102. package/src/utils/OSAlert.ts +122 -0
  103. package/src/utils/styles.ts +17 -0
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { ActivityIndicator as Indicator } from 'react-native';
4
+ import { ActivityIndicatorComposition, ActivityIndicatorStyles, ComponentVariants } from '@codeleap/common';
5
+ import { StylesOf } from '../types/utility';
6
+ export declare type ActivityIndicatorProps = ComponentPropsWithoutRef<typeof Indicator> & {
7
+ variants?: ComponentVariants<typeof ActivityIndicatorStyles>['variants'];
8
+ styles?: StylesOf<ActivityIndicatorComposition>;
9
+ };
10
+ export declare const ActivityIndicator: React.ForwardRefExoticComponent<import("react-native").ActivityIndicatorProps & {
11
+ variants?: ComponentVariants<typeof ActivityIndicatorStyles>['variants'];
12
+ styles?: StylesOf<ActivityIndicatorComposition>;
13
+ } & React.RefAttributes<Indicator>>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.ActivityIndicator = void 0;
34
+ var React = __importStar(require("react"));
35
+ var react_1 = require("react");
36
+ var react_native_1 = require("react-native");
37
+ var common_1 = require("@codeleap/common");
38
+ exports.ActivityIndicator = (0, react_1.forwardRef)(function (activityIndicatorProps, ref) {
39
+ var _a = activityIndicatorProps.variants, variants = _a === void 0 ? [] : _a, style = activityIndicatorProps.style, props = __rest(activityIndicatorProps, ["variants", "style"]);
40
+ var variantStyles = (0, common_1.useComponentStyle)('ActivityIndicator', {
41
+ variants: variants
42
+ });
43
+ var Theme = (0, common_1.useStyle)().Theme;
44
+ var styles = react_native_1.StyleSheet.flatten([variantStyles.wrapper, style]);
45
+ var color = (styles === null || styles === void 0 ? void 0 : styles.color) || Theme.colors.gray;
46
+ var size = (styles === null || styles === void 0 ? void 0 : styles.height) || (styles === null || styles === void 0 ? void 0 : styles.width) || 'large';
47
+ return (<react_native_1.ActivityIndicator size={size} ref={ref} color={color} style={styles} {...props}/>);
48
+ });
49
+ //# sourceMappingURL=ActivityIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../../src/components/ActivityIndicator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,6CAAyE;AACzE,2CAC0E;AAU7D,QAAA,iBAAiB,GAC5B,IAAA,kBAAU,EAAoC,UAAC,sBAAsB,EAAE,GAAG;IAGxE,IAAA,KAGE,sBAAsB,SAHX,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAAK,GAEH,sBAAsB,MAFnB,EACF,KAAK,UACN,sBAAsB,EAJpB,qBAIL,CADS,CACgB;IAE1B,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,mBAAmB,EAAE;QAC3D,QAAQ,UAAA;KACT,CAAC,CAAA;IAEM,IAAA,KAAK,GAAK,IAAA,iBAAQ,GAAE,MAAf,CAAe;IAE5B,IAAM,MAAM,GAAG,yBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IACjE,IAAM,KAAK,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA;IAChD,IAAM,IAAI,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,MAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAA,IAAI,OAAO,CAAA;IACvD,OAAO,CACL,CAAC,gCAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAC5E,CAAA;AAEH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,116 @@
1
+ import * as React from 'react';
2
+ import { ButtonStyles, ComponentVariants, ButtonComposition } from '@codeleap/common';
3
+ import { StylesOf } from '../types/utility';
4
+ import { TouchableProps } from './Touchable';
5
+ import { IconPlaceholder } from '@codeleap/common';
6
+ import { TouchableOpacity } from 'react-native';
7
+ export declare type ButtonProps = Omit<TouchableProps, 'variants'> & ComponentVariants<typeof ButtonStyles> & {
8
+ text?: string;
9
+ rightIcon?: IconPlaceholder;
10
+ icon?: IconPlaceholder;
11
+ styles?: StylesOf<ButtonComposition>;
12
+ loading?: boolean;
13
+ };
14
+ export declare const Button: React.ForwardRefExoticComponent<Omit<TouchableProps, "variants"> & ComponentVariants<{
15
+ default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
16
+ negative: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
17
+ circle: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
18
+ pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
19
+ icon: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
20
+ fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
21
+ block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
22
+ flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
23
+ absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
24
+ sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
25
+ row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
26
+ center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
27
+ column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
28
+ wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
29
+ inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
30
+ inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
31
+ hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
32
+ full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
33
+ noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
34
+ fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
35
+ fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
36
+ fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
37
+ fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
38
+ fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
39
+ whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
40
+ centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
41
+ listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
42
+ alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
43
+ alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
44
+ alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
45
+ justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
46
+ justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
47
+ justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
48
+ justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
49
+ textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
50
+ textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
51
+ textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
52
+ blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
53
+ elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
54
+ neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
55
+ scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
56
+ scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
57
+ scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
58
+ debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
59
+ debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
60
+ debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
61
+ debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
62
+ }, import("@codeleap/common").EnhancedTheme<any>, import("@codeleap/common").VariantProp<{
63
+ default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
64
+ negative: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
65
+ circle: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
66
+ pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
67
+ icon: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
68
+ fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
69
+ block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
70
+ flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
71
+ absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
72
+ sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
73
+ row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
74
+ center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
75
+ column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
76
+ wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
77
+ inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
78
+ inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
79
+ hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
80
+ full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
81
+ noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
82
+ fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
83
+ fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
84
+ fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
85
+ fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
86
+ fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
87
+ whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
88
+ centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
89
+ listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
90
+ alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
91
+ alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
92
+ alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
93
+ justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
94
+ justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
95
+ justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
96
+ justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
97
+ textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
98
+ textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
99
+ textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
100
+ blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
101
+ elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
102
+ neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
103
+ scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
104
+ scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
105
+ scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
106
+ debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
107
+ debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
108
+ debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
109
+ debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
110
+ }>> & {
111
+ text?: string;
112
+ rightIcon?: IconPlaceholder;
113
+ icon?: IconPlaceholder;
114
+ styles?: StylesOf<ButtonComposition>;
115
+ loading?: boolean;
116
+ } & React.RefAttributes<TouchableOpacity>>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.Button = void 0;
34
+ var React = __importStar(require("react"));
35
+ var common_1 = require("@codeleap/common");
36
+ var react_1 = require("react");
37
+ var Text_1 = require("./Text");
38
+ var Touchable_1 = require("./Touchable");
39
+ var Icon_1 = require("./Icon");
40
+ var ActivityIndicator_1 = require("./ActivityIndicator");
41
+ var react_native_1 = require("react-native");
42
+ exports.Button = (0, react_1.forwardRef)(function (buttonProps, ref) {
43
+ var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a, _b = buttonProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, children = buttonProps.children, icon = buttonProps.icon, text = buttonProps.text, loading = buttonProps.loading, _c = buttonProps.styles, styles = _c === void 0 ? {} : _c, onPress = buttonProps.onPress, rightIcon = buttonProps.rightIcon, props = __rest(buttonProps, ["variants", "responsiveVariants", "children", "icon", "text", "loading", "styles", "onPress", "rightIcon"]);
44
+ var variantStyles = (0, common_1.useComponentStyle)('Button', {
45
+ variants: variants,
46
+ });
47
+ function handlePress(e) {
48
+ onPress && onPress(e);
49
+ }
50
+ return (<Touchable_1.Touchable style={[variantStyles.wrapper, styles.wrapper]} onPress={handlePress} ref={ref} {...props}>
51
+ {loading && <ActivityIndicator_1.ActivityIndicator style={[variantStyles.loader, styles.loader]}/>}
52
+ {!loading && <Icon_1.Icon name={icon} style={react_native_1.StyleSheet.flatten([variantStyles.icon, styles.icon, variantStyles.leftIcon, styles.leftIcon])}/>}
53
+ {children || <Text_1.Text text={text} style={[variantStyles.text, styles.text]}/>}
54
+ <Icon_1.Icon name={rightIcon} style={react_native_1.StyleSheet.flatten([variantStyles.icon, styles.icon, variantStyles.rightIcon, styles.rightIcon])}/>
55
+ </Touchable_1.Touchable>);
56
+ });
57
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAAyG;AACzG,+BAAmC;AAEnC,+BAA8B;AAC9B,yCAAwD;AACxD,+BAA8B;AAC9B,yDAAwD;AAExD,6CAA4D;AAa/C,QAAA,MAAM,GAAG,IAAA,kBAAU,EAAiC,UAAC,WAAW,EAAC,GAAG;IAE7E,IAAA,KAUE,WAAW,SAVA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KASE,WAAW,mBATU,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,QAAQ,GAQN,WAAW,SARL,EACR,IAAI,GAOF,WAAW,KAPT,EACJ,IAAI,GAMF,WAAW,KANT,EACJ,OAAO,GAKL,WAAW,QALN,EACP,KAIE,WAAW,OAJF,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,OAAO,GAGL,WAAW,QAHN,EACP,SAAS,GAEP,WAAW,UAFJ,EACN,KAAK,UACN,WAAW,EAXT,2GAWL,CADS,CACK;IAGf,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,QAAQ,EAAE;QAChD,QAAQ,UAAA;KACT,CAAC,CAAA;IAGF,SAAS,WAAW,CAAC,CAAuC;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,CAAC;IAGD,OAAO,CACL,CAAC,qBAAS,CACR,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAC/C,OAAO,CAAC,CAAC,WAAW,CAAC,CACrB,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,IAAI,CAAC,qCAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAG,CAC/E;MAAA,CAAC,CAAC,OAAO,IAAI,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CACvI;MAAA,CAAC,QAAQ,IAAI,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAC1E;MAAA,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EACjI;IAAA,EAAE,qBAAS,CAAC,CACb,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { ComponentVariants, StylesOf, Form } from '@codeleap/common';
3
+ import { ComponentPropsWithRef, ReactNode } from 'react';
4
+ import { Switch as NativeCheckbox } from 'react-native';
5
+ import { MobileCheckboxStyles as CheckboxStyles, MobileCheckboxComposition as CheckboxComposition } from './styles';
6
+ export * from './styles';
7
+ declare type NativeCheckboxProps = Omit<ComponentPropsWithRef<typeof NativeCheckbox>, 'thumbColor' | 'trackColor'>;
8
+ declare type CheckboxProps = NativeCheckboxProps & {
9
+ variants?: ComponentVariants<typeof CheckboxStyles>['variants'];
10
+ label?: ReactNode;
11
+ styles?: StylesOf<CheckboxComposition>;
12
+ validate?: Form.ValidatorFunction | string;
13
+ };
14
+ export declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "label" | "variants" | "key" | "disabled" | "styles" | "onChange" | "value" | "validate" | "onValueChange" | "ios_backgroundColor" | "onTintColor" | "thumbTintColor" | "tintColor"> & React.RefAttributes<NativeCheckbox>>;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ var __rest = (this && this.__rest) || function (s, e) {
25
+ var t = {};
26
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
27
+ t[p] = s[p];
28
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
29
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
30
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
31
+ t[p[i]] = s[p[i]];
32
+ }
33
+ return t;
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Checkbox = void 0;
37
+ var React = __importStar(require("react"));
38
+ var common_1 = require("@codeleap/common");
39
+ var react_1 = require("react");
40
+ var TextInput_1 = require("../TextInput");
41
+ var View_1 = require("../View");
42
+ var Touchable_1 = require("../Touchable");
43
+ __exportStar(require("./styles"), exports);
44
+ exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
45
+ var _a = checkboxProps.variants, variants = _a === void 0 ? [] : _a, _b = checkboxProps.style, style = _b === void 0 ? {} : _b, _c = checkboxProps.styles, styles = _c === void 0 ? {} : _c, label = checkboxProps.label, value = checkboxProps.value, onValueChange = checkboxProps.onValueChange, validate = checkboxProps.validate, props = __rest(checkboxProps, ["variants", "style", "styles", "label", "value", "onValueChange", "validate"]);
46
+ var variantStyles = (0, common_1.useComponentStyle)('Checkbox', {
47
+ // @ts-ignore
48
+ variants: variants,
49
+ });
50
+ var _d = (0, common_1.useValidate)(value, validate), error = _d.error, showError = _d.showError;
51
+ function getStyles(key) {
52
+ return [
53
+ variantStyles[key],
54
+ variantStyles[key],
55
+ key === 'wrapper' ? style : {},
56
+ value ? variantStyles[key + ':checked'] : {},
57
+ value ? styles[key + ':checked'] : {},
58
+ showError ? variantStyles[key + ':error'] : {},
59
+ showError ? styles[key + ':error'] : {},
60
+ checkboxProps.disabled ? variantStyles[key + ':disabled'] : {},
61
+ checkboxProps.disabled ? styles[key + ':disabled'] : {},
62
+ ];
63
+ }
64
+ return <View_1.View style={getStyles('wrapper')} {...props}>
65
+ <Touchable_1.Touchable style={getStyles('input')} onPress={function () { return onValueChange(!value); }}>
66
+ <View_1.View style={getStyles('checkmarkWrapper')}>
67
+ <View_1.View style={getStyles('checkmark')}/>
68
+ </View_1.View>
69
+ <TextInput_1.InputLabel label={label} style={getStyles('label')}/>
70
+
71
+ </Touchable_1.Touchable>
72
+ <TextInput_1.FormError message={error.message} style={getStyles('error')}/>
73
+ </View_1.View>;
74
+ });
75
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAAsG;AACtG,+BAAoE;AAEpE,0CAAoD;AACpD,gCAA8B;AAC9B,0CAAwC;AAIxC,2CAAwB;AAaX,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAA+B,UAAC,aAAa,EAAC,GAAG;IAE3E,IAAA,KAQA,aAAa,SARA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAOA,aAAa,MAPH,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAMA,aAAa,OANF,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,KAAK,GAKL,aAAa,MALR,EACL,KAAK,GAIL,aAAa,MAJR,EACL,aAAa,GAGb,aAAa,cAHA,EACb,QAAQ,GAER,aAAa,SAFL,EACL,KAAK,UACR,aAAa,EATV,8EASN,CADW,CACK;IAEjB,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,UAAU,EAAE;QAChD,aAAa;QACb,QAAQ,UAAA;KACX,CAAC,CAAA;IAEI,IAAA,KAAqB,IAAA,oBAAW,EAAC,KAAK,EAAC,QAAQ,CAAC,EAA/C,KAAK,WAAA,EAAE,SAAS,eAA+B,CAAA;IAGtD,SAAS,SAAS,CAAC,GAAuB;QACtC,OAAO;YACH,aAAa,CAAC,GAAG,CAAC;YAClB,aAAa,CAAC,GAAG,CAAC;YAClB,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAC9B,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;YAC5C,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;YACrC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YAC9C,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;YAC9D,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;SAC1D,CAAA;IACL,CAAC;IAED,OAAO,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAChD;QAAA,CAAC,qBAAS,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAE,OAAO,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC,CACxE;YAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CACvC;gBAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EACxC;YAAA,EAAE,WAAI,CACN;YAAA,CAAC,sBAAU,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAExD;;QAAA,EAAE,qBAAS,CACX;QAAA,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EACjE;IAAA,EAAE,WAAI,CAAC,CAAA;AACX,CAAC,CAAC,CAAA"}
@@ -0,0 +1,48 @@
1
+ declare type CheckboxParts = 'wrapper' | 'label' | 'input' | 'checkmark' | 'checkmarkWrapper' | 'error';
2
+ export declare type MobileCheckboxComposition = CheckboxParts | `${CheckboxParts}:checked` | `${CheckboxParts}:disabled` | `${CheckboxParts}:error`;
3
+ export declare const MobileCheckboxStyles: {
4
+ default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
5
+ fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
6
+ block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
7
+ flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
8
+ absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
9
+ sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
10
+ row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
11
+ center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
12
+ column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
13
+ wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
14
+ inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
15
+ inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
16
+ hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
17
+ full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
18
+ noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
19
+ fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
20
+ fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
21
+ fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
22
+ fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
23
+ fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
24
+ whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
25
+ centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
26
+ listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
27
+ alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
28
+ alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
29
+ alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
30
+ justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
31
+ justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
32
+ justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
33
+ justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
34
+ textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
35
+ textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
36
+ textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
37
+ blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
38
+ elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
39
+ neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
40
+ scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
41
+ scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
42
+ scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
43
+ debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
44
+ debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
45
+ debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
46
+ debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
47
+ };
48
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.MobileCheckboxStyles = void 0;
15
+ var common_1 = require("@codeleap/common");
16
+ var createCheckboxStyle = (0, common_1.createDefaultVariantFactory)();
17
+ var presets = (0, common_1.includePresets)(function (styles) { return createCheckboxStyle(function () { return ({ wrapper: styles }); }); });
18
+ exports.MobileCheckboxStyles = __assign(__assign({}, presets), { default: createCheckboxStyle(function (theme) {
19
+ var size = theme.typography.baseFontSize * 1.2;
20
+ var markHeight = size * 0.5;
21
+ var markWidth = size * 0.25;
22
+ var translateX = -(markWidth / 2);
23
+ var translateY = -(markHeight / 2);
24
+ return {
25
+ wrapper: {},
26
+ input: __assign(__assign({ flexDirection: 'row' }, theme.presets.alignCenter), { borderRadius: theme.borderRadius.small }),
27
+ label: __assign({}, theme.spacing.marginLeft(0.5)),
28
+ checkmark: {
29
+ position: 'absolute',
30
+ top: '40%',
31
+ left: '50%',
32
+ height: markHeight,
33
+ width: markWidth,
34
+ transform: [{ translateX: translateX }, { translateY: translateY }, { rotate: '45deg' },]
35
+ },
36
+ "checkmark:checked": __assign({}, theme.border.white({
37
+ width: 2,
38
+ directions: ['right', 'bottom']
39
+ })),
40
+ checkmarkWrapper: __assign({ position: 'relative', width: size, height: size }, theme.border.gray(1)),
41
+ "checkmarkWrapper:checked": {
42
+ backgroundColor: theme.colors.primary
43
+ },
44
+ error: {
45
+ color: theme.colors.negative
46
+ }
47
+ };
48
+ }) });
49
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Checkbox/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA4E;AAK5E,IAAM,mBAAmB,GAAG,IAAA,oCAA2B,GAA6B,CAAA;AAEpF,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,mBAAmB,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAArB,CAAqB,CAAC,EAAhD,CAAgD,CAAC,CAAA;AAE/E,QAAA,oBAAoB,yBAC5B,OAAO,KACV,OAAO,EAAE,mBAAmB,CAAC,UAAC,KAAK;QACjC,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,GAAG,GAAG,CAAA;QAEhD,IAAM,UAAU,GAAG,IAAI,GAAG,GAAG,CAAA;QAC7B,IAAM,SAAS,GAAG,IAAI,GAAG,IAAI,CAAA;QAE7B,IAAM,UAAU,GAAG,CAAC,CAAC,SAAS,GAAC,CAAC,CAAC,CAAA;QACjC,IAAM,UAAU,GAAG,CAAC,CAAC,UAAU,GAAC,CAAC,CAAC,CAAA;QAClC,OAAO;YACL,OAAO,EAAE,EAER;YACD,KAAK,sBACH,aAAa,EAAE,KAAK,IACjB,KAAK,CAAC,OAAO,CAAC,WAAW,KAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,GACvC;YACD,KAAK,eACA,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CACjC;YAED,SAAS,EAAE;gBACP,QAAQ,EAAE,UAAU;gBACpB,GAAG,EAAE,KAAK;gBACV,IAAI,EAAE,KAAK;gBAEX,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE,SAAS;gBAChB,SAAS,EAAE,CAAC,EAAC,UAAU,YAAA,EAAC,EAAE,EAAC,UAAU,YAAA,EAAC,EAAE,EAAC,MAAM,EAAE,OAAO,EAAC,EAAE;aAC9D;YACD,mBAAmB,eACd,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;gBACpB,KAAK,EAAE,CAAC;gBACR,UAAU,EAAE,CAAC,OAAO,EAAC,QAAQ,CAAC;aAC/B,CAAC,CACH;YACD,gBAAgB,aACZ,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,IACT,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAC1B;YACD,0BAA0B,EAAE;gBACxB,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;aACxC;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;aAC7B;SACF,CAAA;IACH,CAAC,CAAC,IAEH"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { CheckboxStyles, CheckboxComposition, ComponentVariants, StylesOf } from '@codeleap/common';
3
+ import { ComponentPropsWithRef, ReactNode } from 'react';
4
+ import { Switch as NativeCheckbox } from 'react-native';
5
+ declare type NativeCheckboxProps = Omit<ComponentPropsWithRef<typeof NativeCheckbox>, 'thumbColor' | 'trackColor'>;
6
+ declare type CheckboxProps = NativeCheckboxProps & {
7
+ variants?: ComponentVariants<typeof CheckboxStyles>['variants'];
8
+ label?: ReactNode;
9
+ styles?: StylesOf<CheckboxComposition>;
10
+ };
11
+ export declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "label" | "variants" | "disabled" | "onChange" | "value" | "styles" | "onValueChange" | "ios_backgroundColor" | "onTintColor" | "thumbTintColor" | "tintColor" | "key"> & React.RefAttributes<NativeCheckbox>>;
12
+ export {};
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.Checkbox = void 0;
34
+ var React = __importStar(require("react"));
35
+ var common_1 = require("@codeleap/common");
36
+ var react_1 = require("react");
37
+ var TextInput_1 = require("./TextInput");
38
+ var View_1 = require("./View");
39
+ exports.Checkbox = (0, react_1.forwardRef)(function (switchProps, ref) {
40
+ var _a = switchProps.variants, variants = _a === void 0 ? [] : _a, _b = switchProps.style, style = _b === void 0 ? {} : _b, _c = switchProps.styles, styles = _c === void 0 ? {} : _c, label = switchProps.label, props = __rest(switchProps, ["variants", "style", "styles", "label"]);
41
+ var variantStyles = (0, common_1.useComponentStyle)('Checkbox', {
42
+ variants: variants,
43
+ styles: styles
44
+ });
45
+ function getStyles(key) {
46
+ return [
47
+ variantStyles[key],
48
+ key === 'wrapper' ? style : {},
49
+ switchProps.value ? variantStyles[key + ':on'] : {},
50
+ switchProps.disabled ? variantStyles[key + ':disabled'] : {},
51
+ ];
52
+ }
53
+ return <View_1.View style={getStyles('wrapper')}>
54
+ <View_1.View style={getStyles('checkmarkWrapper')}>
55
+ <View_1.View style={getStyles('checkmark')}/>
56
+ </View_1.View>
57
+ <TextInput_1.InputLabel label={label} style={getStyles('label')}/>
58
+
59
+ </View_1.View>;
60
+ });
61
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAA+H;AAC/H,+BAAoE;AAEpE,yCAAwC;AACxC,+BAA6B;AAYhB,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAA+B,UAAC,WAAW,EAAC,GAAG;IAEzE,IAAA,KAKA,WAAW,SALE,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAIA,WAAW,MAJD,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAGA,WAAW,OAHA,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,KAAK,GAEL,WAAW,MAFN,EACF,KAAK,UACR,WAAW,EANR,wCAMN,CADW,CACG;IAEf,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,UAAU,EAAE;QAChD,QAAQ,UAAA;QACR,MAAM,QAAA;KACT,CAAC,CAAA;IAEF,SAAS,SAAS,CAAC,GAAuB;QACtC,OAAO;YACH,aAAa,CAAC,GAAG,CAAC;YAClB,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAC9B,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YACnD,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;SAE/D,CAAA;IACL,CAAC;IAGD,OAAO,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CACrC;QAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CACvC;YAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EACxC;QAAA,EAAE,WAAI,CACN;QAAA,CAAC,sBAAU,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAExD;;IAAA,EAAE,WAAI,CAAC,CAAA;AACX,CAAC,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { AnyFunction, ComponentVariants, DrawerComposition, DrawerStyles, StylesOf } from "@codeleap/common";
3
+ import { ReactNode } from "react";
4
+ declare const axisMap: {
5
+ readonly top: readonly [-1, "Y"];
6
+ readonly bottom: readonly [1, "Y"];
7
+ readonly left: readonly [-1, "X"];
8
+ readonly right: readonly [1, "X"];
9
+ };
10
+ export declare type DrawerProps = {
11
+ open: boolean;
12
+ toggle: AnyFunction;
13
+ darkenBackground?: boolean;
14
+ size: number;
15
+ showCloseButton?: boolean;
16
+ title?: ReactNode;
17
+ footer?: ReactNode;
18
+ position?: keyof typeof axisMap;
19
+ styles?: StylesOf<DrawerComposition>;
20
+ animationDuration?: string;
21
+ } & ComponentVariants<typeof DrawerStyles>;
22
+ export declare const Drawer: React.FC<DrawerProps>;
23
+ export {};