@codeleap/mobile 1.2.1 → 1.4.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 (194) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +3 -0
  3. package/.vscode/settings.json +11 -0
  4. package/CodeLeap-Mobile-Packages.code-workspace +8 -0
  5. package/dist/components/ActivityIndicator.js +9 -6
  6. package/dist/components/ActivityIndicator.js.map +1 -1
  7. package/dist/components/Animated.d.ts +15 -0
  8. package/dist/components/Animated.js +55 -0
  9. package/dist/components/Animated.js.map +1 -0
  10. package/dist/components/Button.d.ts +107 -104
  11. package/dist/components/Button.js +30 -9
  12. package/dist/components/Button.js.map +1 -1
  13. package/dist/components/Checkbox/index.d.ts +1 -1
  14. package/dist/components/Checkbox/index.js +7 -8
  15. package/dist/components/Checkbox/index.js.map +1 -1
  16. package/dist/components/Checkbox/styles.d.ts +47 -43
  17. package/dist/components/Checkbox/styles.js +8 -8
  18. package/dist/components/Checkbox/styles.js.map +1 -1
  19. package/dist/components/ContentView.js +4 -2
  20. package/dist/components/ContentView.js.map +1 -1
  21. package/dist/components/FileInput.d.ts +26 -2
  22. package/dist/components/FileInput.js +151 -4
  23. package/dist/components/FileInput.js.map +1 -1
  24. package/dist/components/Icon.d.ts +4 -6
  25. package/dist/components/Icon.js +25 -11
  26. package/dist/components/Icon.js.map +1 -1
  27. package/dist/components/Image.d.ts +7 -6
  28. package/dist/components/Image.js +4 -4
  29. package/dist/components/Image.js.map +1 -1
  30. package/dist/components/List.d.ts +11 -0
  31. package/dist/components/List.js +77 -0
  32. package/dist/components/List.js.map +1 -0
  33. package/dist/components/Modal/index.d.ts +25 -0
  34. package/dist/components/Modal/index.js +109 -0
  35. package/dist/components/Modal/index.js.map +1 -0
  36. package/dist/components/Modal/styles.d.ts +66 -0
  37. package/dist/components/Modal/styles.js +57 -0
  38. package/dist/components/Modal/styles.js.map +1 -0
  39. package/dist/components/Navigation/Navigation.d.ts +3 -0
  40. package/dist/components/Navigation/Navigation.js +76 -0
  41. package/dist/components/Navigation/Navigation.js.map +1 -0
  42. package/dist/components/Navigation/constants.d.ts +5 -0
  43. package/dist/components/Navigation/constants.js +11 -0
  44. package/dist/components/Navigation/constants.js.map +1 -0
  45. package/dist/components/Navigation/index.d.ts +3 -0
  46. package/dist/components/Navigation/index.js +16 -0
  47. package/dist/components/Navigation/index.js.map +1 -0
  48. package/dist/components/Navigation/types.d.ts +26 -0
  49. package/dist/components/Navigation/types.js +8 -0
  50. package/dist/components/Navigation/types.js.map +1 -0
  51. package/dist/components/Navigation/utils.d.ts +3 -0
  52. package/dist/components/Navigation/utils.js +67 -0
  53. package/dist/components/Navigation/utils.js.map +1 -0
  54. package/dist/components/Overlay.d.ts +16 -0
  55. package/dist/components/Overlay.js +66 -0
  56. package/dist/components/Overlay.js.map +1 -0
  57. package/dist/components/Pager/index.d.ts +19 -0
  58. package/dist/components/Pager/index.js +164 -0
  59. package/dist/components/Pager/index.js.map +1 -0
  60. package/dist/components/Pager/styles.d.ts +51 -0
  61. package/dist/components/Pager/styles.js +44 -0
  62. package/dist/components/Pager/styles.js.map +1 -0
  63. package/dist/components/RadioInput/index.d.ts +1 -0
  64. package/dist/components/RadioInput/index.js +13 -19
  65. package/dist/components/RadioInput/index.js.map +1 -1
  66. package/dist/components/RadioInput/styles.d.ts +48 -44
  67. package/dist/components/RadioInput/styles.js +4 -4
  68. package/dist/components/RadioInput/styles.js.map +1 -1
  69. package/dist/components/Scroll.d.ts +3 -96
  70. package/dist/components/Scroll.js +11 -8
  71. package/dist/components/Scroll.js.map +1 -1
  72. package/dist/components/Sections.d.ts +11 -0
  73. package/dist/components/Sections.js +77 -0
  74. package/dist/components/Sections.js.map +1 -0
  75. package/dist/components/Select/index.d.ts +5 -2
  76. package/dist/components/Select/index.js +118 -5
  77. package/dist/components/Select/index.js.map +1 -1
  78. package/dist/components/Select/styles.d.ts +9 -0
  79. package/dist/components/Select/styles.js +57 -0
  80. package/dist/components/Select/styles.js.map +1 -0
  81. package/dist/components/Select/types.d.ts +33 -0
  82. package/dist/components/Select/types.js +3 -0
  83. package/dist/components/Select/types.js.map +1 -0
  84. package/dist/components/Slider/Mark.d.ts +3 -0
  85. package/dist/components/Slider/Mark.js +32 -0
  86. package/dist/components/Slider/Mark.js.map +1 -0
  87. package/dist/components/Slider/Thumb.d.ts +7 -0
  88. package/dist/components/Slider/Thumb.js +30 -0
  89. package/dist/components/Slider/Thumb.js.map +1 -0
  90. package/dist/components/Slider/index.d.ts +3 -0
  91. package/dist/components/Slider/index.js +94 -0
  92. package/dist/components/Slider/index.js.map +1 -0
  93. package/dist/components/{Slider.d.ts → Slider/types.d.ts} +12 -7
  94. package/dist/components/Slider/types.js +3 -0
  95. package/dist/components/Slider/types.js.map +1 -0
  96. package/dist/components/Switch.d.ts +2 -2
  97. package/dist/components/Switch.js +6 -7
  98. package/dist/components/Switch.js.map +1 -1
  99. package/dist/components/Text.js +5 -5
  100. package/dist/components/Text.js.map +1 -1
  101. package/dist/components/TextInput.d.ts +108 -94
  102. package/dist/components/TextInput.js +42 -35
  103. package/dist/components/TextInput.js.map +1 -1
  104. package/dist/components/Touchable.d.ts +9 -14
  105. package/dist/components/Touchable.js +11 -15
  106. package/dist/components/Touchable.js.map +1 -1
  107. package/dist/components/View.d.ts +105 -181
  108. package/dist/components/View.js +6 -8
  109. package/dist/components/View.js.map +1 -1
  110. package/dist/components/{index.d.ts → components.d.ts} +6 -0
  111. package/dist/components/{index.js → components.js} +7 -1
  112. package/dist/components/components.js.map +1 -0
  113. package/dist/index.d.ts +4 -1
  114. package/dist/index.js +7 -2
  115. package/dist/index.js.map +1 -1
  116. package/dist/modules/documentPicker.d.ts +3 -0
  117. package/dist/modules/documentPicker.js +12 -0
  118. package/dist/modules/documentPicker.js.map +1 -0
  119. package/dist/modules/fastImage.js +1 -1
  120. package/dist/modules/fastImage.js.map +1 -1
  121. package/dist/modules/reactNavigation.d.ts +3 -0
  122. package/dist/modules/reactNavigation.js +11 -0
  123. package/dist/modules/reactNavigation.js.map +1 -0
  124. package/dist/modules/types/fileTypes.d.ts +138 -0
  125. package/dist/modules/types/fileTypes.js +3 -0
  126. package/dist/modules/types/fileTypes.js.map +1 -0
  127. package/dist/types/utility.d.ts +1 -1
  128. package/dist/utils/OSAlert.d.ts +3 -3
  129. package/dist/utils/OSAlert.js.map +1 -1
  130. package/dist/utils/misc.d.ts +2 -0
  131. package/dist/utils/misc.js +26 -0
  132. package/dist/utils/misc.js.map +1 -0
  133. package/dist/utils/styles.js +1 -1
  134. package/dist/utils/styles.js.map +1 -1
  135. package/package.json +10 -4
  136. package/src/components/ActivityIndicator.tsx +38 -28
  137. package/src/components/Animated.tsx +34 -0
  138. package/src/components/Button.tsx +68 -34
  139. package/src/components/Checkbox/index.tsx +60 -48
  140. package/src/components/Checkbox/styles.ts +39 -30
  141. package/src/components/ContentView.tsx +24 -18
  142. package/src/components/FileInput.tsx +177 -5
  143. package/src/components/Icon.tsx +36 -23
  144. package/src/components/Image.tsx +41 -35
  145. package/src/components/List.tsx +100 -0
  146. package/src/components/Modal/index.tsx +158 -0
  147. package/src/components/Modal/styles.ts +118 -0
  148. package/src/components/Navigation/Navigation.tsx +51 -0
  149. package/src/components/Navigation/constants.ts +8 -0
  150. package/src/components/Navigation/index.tsx +3 -0
  151. package/src/components/Navigation/types.ts +37 -0
  152. package/src/components/Navigation/utils.tsx +54 -0
  153. package/src/components/Overlay.tsx +76 -0
  154. package/src/components/Pager/index.tsx +241 -0
  155. package/src/components/Pager/styles.ts +51 -0
  156. package/src/components/RadioInput/index.tsx +76 -52
  157. package/src/components/RadioInput/styles.ts +23 -18
  158. package/src/components/Scroll.tsx +84 -73
  159. package/src/components/Select/index.tsx +179 -6
  160. package/src/components/Select/styles.ts +81 -0
  161. package/src/components/Select/types.ts +41 -0
  162. package/src/components/Slider/Mark.tsx +46 -0
  163. package/src/components/Slider/Thumb.tsx +29 -0
  164. package/src/components/Slider/index.tsx +123 -0
  165. package/src/components/Slider/types.ts +25 -0
  166. package/src/components/Switch.tsx +63 -54
  167. package/src/components/Text.tsx +22 -23
  168. package/src/components/TextInput.tsx +194 -191
  169. package/src/components/Touchable.tsx +45 -35
  170. package/src/components/View.tsx +33 -40
  171. package/src/components/components.ts +26 -0
  172. package/src/index.ts +6 -2
  173. package/src/modules/documentPicker.ts +8 -0
  174. package/src/modules/fastImage.ts +2 -2
  175. package/src/modules/index.d.ts +496 -0
  176. package/src/modules/reactNavigation.ts +4 -0
  177. package/src/modules/types/documentPicker.d.ts +215 -0
  178. package/src/modules/types/fileTypes.ts +138 -0
  179. package/src/types/utility.ts +2 -2
  180. package/src/utils/OSAlert.ts +35 -33
  181. package/src/utils/misc.ts +24 -0
  182. package/src/utils/styles.ts +13 -16
  183. package/dist/components/Drawer.d.ts +0 -23
  184. package/dist/components/Drawer.js +0 -78
  185. package/dist/components/Drawer.js.map +0 -1
  186. package/dist/components/Navigation.d.ts +0 -30
  187. package/dist/components/Navigation.js +0 -126
  188. package/dist/components/Navigation.js.map +0 -1
  189. package/dist/components/Slider.js +0 -130
  190. package/dist/components/Slider.js.map +0 -1
  191. package/dist/components/index.js.map +0 -1
  192. package/src/components/Navigation.tsx +0 -125
  193. package/src/components/Slider.tsx +0 -198
  194. package/src/components/index.ts +0 -19
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ node_modules
2
+ dist
package/.eslintrc.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ ...require('@codeleap/config/.eslintrc'),
3
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "eslint.alwaysShowStatus": true,
3
+ "editor.codeActionsOnSave": {
4
+ "source.fixAll.eslint": true
5
+ },
6
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint",
7
+ "eslint.format.enable": true,
8
+ "[html]": {
9
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
10
+ },
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {}
8
+ }
@@ -36,14 +36,17 @@ var react_1 = require("react");
36
36
  var react_native_1 = require("react-native");
37
37
  var common_1 = require("@codeleap/common");
38
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
39
+ var _a, _b, _c;
40
+ var _d = activityIndicatorProps.variants, variants = _d === void 0 ? [] : _d, style = activityIndicatorProps.style, propStyles = activityIndicatorProps.styles, props = __rest(activityIndicatorProps, ["variants", "style", "styles"]);
41
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('ActivityIndicator', {
42
+ variants: variants,
43
+ transform: react_native_1.StyleSheet.flatten,
44
+ styles: propStyles,
42
45
  });
43
- var Theme = (0, common_1.useStyle)().Theme;
46
+ var Theme = (0, common_1.useCodeleapContext)().Theme;
47
+ var color = ((_a = variantStyles.wrapper) === null || _a === void 0 ? void 0 : _a.color) || Theme.colors.gray;
48
+ var size = ((_b = variantStyles.wrapper) === null || _b === void 0 ? void 0 : _b.height) || ((_c = variantStyles.wrapper) === null || _c === void 0 ? void 0 : _c.width) || 'large';
44
49
  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
50
  return (<react_native_1.ActivityIndicator size={size} ref={ref} color={color} style={styles} {...props}/>);
48
51
  });
49
52
  //# sourceMappingURL=ActivityIndicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../../src/components/ActivityIndicator.tsx"],"names":[],"mappings":";;;;;;;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AAC5D,6CAAyE;AACzE,2CAMyB;AAUZ,QAAA,iBAAiB,GAAG,IAAA,kBAAU,EACzC,UAAC,sBAAsB,EAAE,GAAG;;IAClB,IAAA,KAAuD,sBAAsB,SAAhE,EAAb,QAAQ,mBAAG,EAAE,KAAA,EAAE,KAAK,GAAmC,sBAAsB,MAAzD,EAAU,UAAU,GAAe,sBAAsB,OAArC,EAAK,KAAK,UAAK,sBAAsB,EAA/E,+BAAsD,CAAF,CAA2B;IAErF,IAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,mBAAmB,EAAE;QAClE,QAAQ,UAAA;QACR,SAAS,EAAE,yBAAU,CAAC,OAAO;QAC7B,MAAM,EAAE,UAAU;KACnB,CAAC,CAAA;IAEM,IAAA,KAAK,GAAK,IAAA,2BAAkB,GAAE,MAAzB,CAAyB;IAEtC,IAAM,KAAK,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,KAAK,KAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA;IAC/D,IAAM,IAAI,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,MAAM,MAAI,MAAA,aAAa,CAAC,OAAO,0CAAE,KAAK,CAAA,IAAI,OAAO,CAAA;IAErF,IAAM,MAAM,GAAG,yBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IAEjE,OAAO,CACL,CAAC,gCAAS,CACR,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,IAAI,KAAK,CAAC,EACV,CACH,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ declare const Components: {
3
+ Touchable: React.FC<import("./Touchable").TouchableProps>;
4
+ View: React.FC<import("./View").ViewProps>;
5
+ };
6
+ declare type AnimatedComponents = typeof Components;
7
+ declare type CP = keyof AnimatedComponents;
8
+ declare type AnimatedProps<T extends CP, CFG = Record<string, any>> = {
9
+ component: T;
10
+ config: CFG;
11
+ pose: keyof CFG;
12
+ initialPose?: keyof CFG;
13
+ } & Omit<Parameters<AnimatedComponents[T]>[0], 'component'>;
14
+ export declare const Animated: <T extends "View" | "Touchable", CFG = any>({ config, component, ...props }: AnimatedProps<T, CFG>) => JSX.Element;
15
+ export {};
@@ -0,0 +1,55 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
33
+ return (mod && mod.__esModule) ? mod : { "default": mod };
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Animated = void 0;
37
+ var react_1 = __importStar(require("react"));
38
+ var react_native_pose_1 = __importDefault(require("react-native-pose"));
39
+ var Touchable_1 = require("./Touchable");
40
+ var View_1 = require("./View");
41
+ var Components = {
42
+ Touchable: Touchable_1.Touchable,
43
+ View: View_1.View,
44
+ };
45
+ var PosedComponents = Object.fromEntries(Object.entries(Components).map(function (_a) {
46
+ var key = _a[0], Render = _a[1];
47
+ return [key, (0, react_native_pose_1.default)(Render)];
48
+ }));
49
+ var Animated = function (_a) {
50
+ var config = _a.config, component = _a.component, props = __rest(_a, ["config", "component"]);
51
+ var Component = (0, react_1.useRef)(PosedComponents[component](config)).current;
52
+ return <Component withParent={false} {...props}/>;
53
+ };
54
+ exports.Animated = Animated;
55
+ //# sourceMappingURL=Animated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Animated.js","sourceRoot":"","sources":["../../src/components/Animated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAqC;AAErC,wEAAqC;AACrC,yCAAuC;AACvC,+BAA6B;AAC7B,IAAM,UAAU,GAAG;IACjB,SAAS,uBAAA;IACT,IAAI,aAAA;CACL,CAAA;AAED,IAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAC,EAAa;QAAZ,GAAG,QAAA,EAAE,MAAM,QAAA;IAAM,OAAA,CAAC,GAAG,EAAE,IAAA,2BAAK,EAAC,MAAM,CAAC,CAAC;AAApB,CAAoB,CAAC,CACxE,CAAA;AAYM,IAAM,QAAQ,GAAG,UAA0B,EAI1B;IAHtB,IAAA,MAAM,YAAA,EACN,SAAS,eAAA,EACN,KAAK,cAHwC,uBAIjD,CADS;IAER,IAAM,SAAS,GAAG,IAAA,cAAM,EAAC,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;IAEpE,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAAA;AACpD,CAAC,CAAA;AARY,QAAA,QAAQ,YAQpB"}
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
- import { ButtonStyles, ComponentVariants, ButtonComposition } from '@codeleap/common';
2
+ import { ButtonStyles, ComponentVariants, ButtonComposition, IconPlaceholder } from '@codeleap/common';
3
3
  import { StylesOf } from '../types/utility';
4
4
  import { TouchableProps } from './Touchable';
5
- import { IconPlaceholder } from '@codeleap/common';
6
5
  import { TouchableOpacity } from 'react-native';
7
6
  export declare type ButtonProps = Omit<TouchableProps, 'variants'> & ComponentVariants<typeof ButtonStyles> & {
8
7
  text?: string;
@@ -10,107 +9,111 @@ export declare type ButtonProps = Omit<TouchableProps, 'variants'> & ComponentVa
10
9
  icon?: IconPlaceholder;
11
10
  styles?: StylesOf<ButtonComposition>;
12
11
  loading?: boolean;
12
+ debounce?: number;
13
+ debugName?: string;
13
14
  };
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>>;
15
+ export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "children" | "hitSlop" | "onLayout" | "style" | "testID" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "text" | "component" | keyof import("@codeleap/common").BaseViewProps | "activeOpacity" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "debugName" | "debugComponent" | "icon" | "styles" | "rightIcon" | keyof ComponentVariants<{
16
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
17
+ negative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
18
+ circle: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
19
+ pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
20
+ icon: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
21
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
22
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
23
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
24
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
25
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
26
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
27
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
28
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
29
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
30
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
31
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
32
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
33
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
34
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
35
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
36
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
37
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
38
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
39
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
40
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
41
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
42
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
43
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
44
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
45
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
46
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
47
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
48
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
49
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
50
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
51
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
52
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
53
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
54
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
55
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
56
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
57
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
58
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
59
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
60
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
61
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
62
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
63
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
64
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
65
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
66
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
62
67
  }, 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>>;
68
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
69
+ negative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
70
+ circle: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
71
+ pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
72
+ icon: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
73
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
74
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
75
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
76
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
77
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
78
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
79
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
80
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
81
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
82
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
83
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
84
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
85
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
86
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
87
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
88
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
89
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
90
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
91
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
92
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
93
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
94
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
95
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
96
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
97
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
98
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
99
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
100
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
101
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
102
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
103
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
104
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
105
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
106
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
107
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
108
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
109
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
110
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
111
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
112
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
113
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
114
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
115
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
116
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
117
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
118
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
119
+ }>> | "loading" | "debounce"> & React.RefAttributes<TouchableOpacity>>;
@@ -40,18 +40,39 @@ var Icon_1 = require("./Icon");
40
40
  var ActivityIndicator_1 = require("./ActivityIndicator");
41
41
  var react_native_1 = require("react-native");
42
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', {
43
+ var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a, children = buttonProps.children, icon = buttonProps.icon, text = buttonProps.text, loading = buttonProps.loading, _b = buttonProps.styles, styles = _b === void 0 ? {} : _b, onPress = buttonProps.onPress, disabled = buttonProps.disabled, rightIcon = buttonProps.rightIcon, _c = buttonProps.debounce, debounce = _c === void 0 ? 600 : _c, props = __rest(buttonProps, ["variants", "children", "icon", "text", "loading", "styles", "onPress", "disabled", "rightIcon", "debounce"]);
44
+ var _d = React.useState(false), pressed = _d[0], setPressed = _d[1];
45
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('Button', {
45
46
  variants: variants,
47
+ transform: react_native_1.StyleSheet.flatten,
48
+ styles: styles,
46
49
  });
47
- function handlePress(e) {
48
- onPress && onPress(e);
50
+ function handlePress() {
51
+ if (!pressed) {
52
+ setPressed(true);
53
+ setTimeout(function () { return setPressed(false); }, debounce);
54
+ onPress && onPress();
55
+ }
56
+ }
57
+ function getStyles(key) {
58
+ return [
59
+ variantStyles[key],
60
+ disabled && variantStyles[key + ':disabled'],
61
+ styles[key],
62
+ disabled && styles[key + ':disabled'],
63
+ ];
49
64
  }
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])}/>
65
+ var iconStyle = getStyles('icon');
66
+ var leftIconStyle = react_native_1.StyleSheet.flatten([iconStyle, getStyles('leftIcon')]);
67
+ var rightIconStyle = react_native_1.StyleSheet.flatten([iconStyle, getStyles('rightIcon')]);
68
+ var hasText = !!(text || children);
69
+ return (<Touchable_1.Touchable style={getStyles('wrapper')} onPress={handlePress} ref={ref} disabled={disabled} debugComponent={'Button'} {...props}>
70
+
71
+ {loading && <ActivityIndicator_1.ActivityIndicator style={getStyles('loader')}/>}
72
+ {!loading && <Icon_1.Icon name={icon} style={leftIconStyle} renderEmptySpace={hasText}/>}
73
+ {text ? <Text_1.Text text={text} style={getStyles('text')}/> : null}
74
+ {children}
75
+ <Icon_1.Icon name={rightIcon} style={rightIconStyle} renderEmptySpace={hasText}/>
55
76
  </Touchable_1.Touchable>);
56
77
  });
57
78
  //# sourceMappingURL=Button.js.map
@@ -1 +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,KAA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AC,CAAC,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CAC7D;MAAA,CAAC,QAAQ,CACT;MAAA,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAC1E;IAAA,EAAE,qBAAS,CAAC,CACb,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -9,6 +9,6 @@ declare type CheckboxProps = NativeCheckboxProps & {
9
9
  variants?: ComponentVariants<typeof CheckboxStyles>['variants'];
10
10
  label?: ReactNode;
11
11
  styles?: StylesOf<CheckboxComposition>;
12
- validate?: Form.ValidatorFunction | string;
12
+ validate?: Form.ValidatorFunctionWithoutForm | string;
13
13
  };
14
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>>;
@@ -43,7 +43,7 @@ var Touchable_1 = require("../Touchable");
43
43
  __exportStar(require("./styles"), exports);
44
44
  exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
45
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', {
46
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('Checkbox', {
47
47
  // @ts-ignore
48
48
  variants: variants,
49
49
  });
@@ -61,15 +61,14 @@ exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
61
61
  checkboxProps.disabled ? styles[key + ':disabled'] : {},
62
62
  ];
63
63
  }
64
- return <View_1.View style={getStyles('wrapper')} {...props}>
64
+ return (<View_1.View style={getStyles('wrapper')} {...props}>
65
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
-
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')}/>
71
70
  </Touchable_1.Touchable>
72
71
  <TextInput_1.FormError message={error.message} style={getStyles('error')}/>
73
- </View_1.View>;
72
+ </View_1.View>);
74
73
  });
75
74
  //# sourceMappingURL=index.js.map
@@ -1 +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;Y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