@codeleap/mobile 2.0.1 → 2.0.2

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 (105) hide show
  1. package/dist/components/ActionIcon/styles.d.ts +58 -58
  2. package/dist/components/Backdrop/index.js +1 -1
  3. package/dist/components/Backdrop/index.js.map +1 -1
  4. package/dist/components/Button/index.d.ts +109 -109
  5. package/dist/components/Button/index.js +5 -7
  6. package/dist/components/Button/index.js.map +1 -1
  7. package/dist/components/Button/styles.d.ts +60 -55
  8. package/dist/components/Button/styles.js +4 -2
  9. package/dist/components/Button/styles.js.map +1 -1
  10. package/dist/components/Checkbox/index.js +4 -2
  11. package/dist/components/Checkbox/index.js.map +1 -1
  12. package/dist/components/Checkbox/styles.d.ts +1 -1
  13. package/dist/components/Checkbox/styles.js +4 -0
  14. package/dist/components/Checkbox/styles.js.map +1 -1
  15. package/dist/components/FileInput/index.d.ts +1 -1
  16. package/dist/components/Image/index.js +3 -0
  17. package/dist/components/Image/index.js.map +1 -1
  18. package/dist/components/Modal/index.js +1 -1
  19. package/dist/components/Modal/index.js.map +1 -1
  20. package/dist/components/MultiSelect/styles.js +1 -4
  21. package/dist/components/MultiSelect/styles.js.map +1 -1
  22. package/dist/components/Navigation/utils.js +0 -1
  23. package/dist/components/Navigation/utils.js.map +1 -1
  24. package/dist/components/Pager/styles.js +13 -11
  25. package/dist/components/Pager/styles.js.map +1 -1
  26. package/dist/components/RadioInput/index.js +3 -1
  27. package/dist/components/RadioInput/index.js.map +1 -1
  28. package/dist/components/RadioInput/styles.d.ts +1 -1
  29. package/dist/components/RadioInput/styles.js +1 -0
  30. package/dist/components/RadioInput/styles.js.map +1 -1
  31. package/dist/components/SegmentedControl/index.d.ts +10 -1
  32. package/dist/components/SegmentedControl/index.js +27 -27
  33. package/dist/components/SegmentedControl/index.js.map +1 -1
  34. package/dist/components/SegmentedControl/styles.d.ts +56 -51
  35. package/dist/components/SegmentedControl/styles.js +10 -3
  36. package/dist/components/SegmentedControl/styles.js.map +1 -1
  37. package/dist/components/Select/index.js +1 -2
  38. package/dist/components/Select/index.js.map +1 -1
  39. package/dist/components/Select/styles.d.ts +1 -1
  40. package/dist/components/Select/styles.js +4 -1
  41. package/dist/components/Select/styles.js.map +1 -1
  42. package/dist/components/Switch/index.js +1 -1
  43. package/dist/components/Switch/index.js.map +1 -1
  44. package/dist/components/Text/index.d.ts +2 -0
  45. package/dist/components/Text/index.js +46 -2
  46. package/dist/components/Text/index.js.map +1 -1
  47. package/dist/components/Text/styles.d.ts +57 -52
  48. package/dist/components/Text/styles.js +11 -3
  49. package/dist/components/Text/styles.js.map +1 -1
  50. package/dist/components/TextInput/index.d.ts +8 -4
  51. package/dist/components/TextInput/index.js +35 -15
  52. package/dist/components/TextInput/index.js.map +1 -1
  53. package/dist/components/TextInput/styles.d.ts +1 -1
  54. package/dist/components/TextInput/styles.js +11 -3
  55. package/dist/components/TextInput/styles.js.map +1 -1
  56. package/dist/components/Touchable/index.d.ts +1 -1
  57. package/dist/components/Touchable/index.js +77 -42
  58. package/dist/components/Touchable/index.js.map +1 -1
  59. package/dist/components/Touchable/styles.d.ts +56 -51
  60. package/dist/components/Touchable/styles.js +6 -1
  61. package/dist/components/Touchable/styles.js.map +1 -1
  62. package/dist/components/defaultStyles.d.ts +263 -263
  63. package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.d.ts +2 -0
  64. package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js +287 -286
  65. package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js.map +1 -1
  66. package/dist/utils/OSAlert.d.ts +6 -5
  67. package/dist/utils/OSAlert.js +7 -6
  68. package/dist/utils/OSAlert.js.map +1 -1
  69. package/dist/utils/hooks.d.ts +34 -1
  70. package/dist/utils/hooks.js +54 -1
  71. package/dist/utils/hooks.js.map +1 -1
  72. package/dist/utils/index.d.ts +1 -1
  73. package/dist/utils/index.js +2 -6
  74. package/dist/utils/index.js.map +1 -1
  75. package/dist/utils/notifications.js +4 -4
  76. package/dist/utils/notifications.js.map +1 -1
  77. package/package.json +1 -1
  78. package/src/components/Backdrop/index.tsx +1 -1
  79. package/src/components/Button/index.tsx +7 -11
  80. package/src/components/Button/styles.ts +34 -10
  81. package/src/components/Checkbox/index.tsx +4 -1
  82. package/src/components/Checkbox/styles.ts +5 -0
  83. package/src/components/Image/index.tsx +3 -0
  84. package/src/components/Modal/index.tsx +1 -1
  85. package/src/components/MultiSelect/styles.ts +1 -8
  86. package/src/components/Navigation/utils.tsx +0 -2
  87. package/src/components/Pager/styles.ts +16 -11
  88. package/src/components/RadioInput/index.tsx +3 -1
  89. package/src/components/RadioInput/styles.ts +2 -1
  90. package/src/components/SegmentedControl/index.tsx +31 -18
  91. package/src/components/SegmentedControl/styles.ts +29 -7
  92. package/src/components/Select/index.tsx +2 -1
  93. package/src/components/Select/styles.ts +12 -2
  94. package/src/components/Switch/index.tsx +1 -1
  95. package/src/components/Text/index.tsx +60 -5
  96. package/src/components/Text/styles.ts +25 -9
  97. package/src/components/TextInput/index.tsx +44 -9
  98. package/src/components/TextInput/styles.ts +14 -4
  99. package/src/components/Touchable/index.tsx +84 -35
  100. package/src/components/Touchable/styles.ts +15 -3
  101. package/src/utils/KeyboardAware/lib/KeyboardAwareHOC.tsx +34 -24
  102. package/src/utils/OSAlert.ts +10 -10
  103. package/src/utils/hooks.ts +82 -2
  104. package/src/utils/index.ts +2 -2
  105. package/src/utils/notifications.ts +4 -4
@@ -36,6 +36,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
36
36
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
37
37
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
38
38
  };
39
+ var __rest = (this && this.__rest) || function (s, e) {
40
+ var t = {};
41
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
42
+ t[p] = s[p];
43
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
44
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
45
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
46
+ t[p[i]] = s[p[i]];
47
+ }
48
+ return t;
49
+ };
39
50
  Object.defineProperty(exports, "__esModule", { value: true });
40
51
  exports.SegmentedControl = void 0;
41
52
  var react_1 = __importStar(require("react"));
@@ -47,12 +58,12 @@ var Text_1 = require("../Text");
47
58
  var View_1 = require("../View");
48
59
  __exportStar(require("./styles"), exports);
49
60
  var defaultAnimation = {
61
+ type: 'timing',
50
62
  duration: 200,
51
- // easing: Easing.linear,
63
+ easing: react_native_1.Easing.linear,
52
64
  };
53
65
  var _SegmentedControl = react_1.default.forwardRef(function (props, ref) {
54
- var _a = props.options, options = _a === void 0 ? [] : _a, onValueChange = props.onValueChange, debugName = props.debugName, value = props.value, _b = props.styles, styles = _b === void 0 ? {} : _b, _c = props.animation, animation = _c === void 0 ? {} : _c, _d = props.variants, variants = _d === void 0 ? [] : _d, _e = props.scrollProps, scrollProps = _e === void 0 ? {} : _e, RenderAnimatedView = props.RenderAnimatedView, RenderButton = props.RenderButton;
55
- var Theme = (0, common_1.useCodeleapContext)().Theme;
66
+ var _a = props.options, options = _a === void 0 ? [] : _a, onValueChange = props.onValueChange, debugName = props.debugName, value = props.value, _b = props.styles, styles = _b === void 0 ? {} : _b, _c = props.animation, animation = _c === void 0 ? {} : _c, _d = props.variants, variants = _d === void 0 ? [] : _d, _e = props.scrollProps, scrollProps = _e === void 0 ? {} : _e, _f = props.getItemWidth, getItemWidth = _f === void 0 ? function (i) { return i.label.length * 20; } : _f, RenderAnimatedView = props.RenderAnimatedView, RenderButton = props.RenderButton, viewProps = __rest(props, ["options", "onValueChange", "debugName", "value", "styles", "animation", "variants", "scrollProps", "getItemWidth", "RenderAnimatedView", "RenderButton"]);
56
67
  var _animation = __assign(__assign({}, defaultAnimation), animation);
57
68
  var variantStyles = (0, common_1.useDefaultComponentStyle)('u:SegmentedControl', {
58
69
  styles: styles,
@@ -69,15 +80,9 @@ var _SegmentedControl = react_1.default.forwardRef(function (props, ref) {
69
80
  });
70
81
  }
71
82
  var widthStyle = (0, react_1.useMemo)(function () {
72
- var maxWordLength = Object.assign([], options)
73
- .sort(function (a, b) {
74
- return a.label.length - b.label.length;
75
- })[0].label.length;
76
- var fitMaxWidth = Theme.values.width - Theme.spacing.value(4);
77
- var fitItemWidth = maxWordLength * options.length * 6;
78
- if (fitItemWidth * options.length < fitMaxWidth)
79
- fitItemWidth = fitMaxWidth / options.length;
80
- return { width: fitItemWidth };
83
+ var sizes = options.map(getItemWidth);
84
+ var maxWidth = sizes.sort(function (a, b) { return b - a; })[0];
85
+ return { width: maxWidth };
81
86
  }, [options]);
82
87
  var currentOptionIdx = options.findIndex(function (o) { return o.value === value; }) || 0;
83
88
  var translateX = widthStyle.width * currentOptionIdx;
@@ -103,29 +108,24 @@ var _SegmentedControl = react_1.default.forwardRef(function (props, ref) {
103
108
  }
104
109
  var AnimatedView = RenderAnimatedView || View_1.View;
105
110
  variantStyles = JSON.parse(JSON.stringify(variantStyles));
111
+ _animation = JSON.parse(JSON.stringify(_animation));
106
112
  return (<Scroll_1.Scroll horizontal showsHorizontalScrollIndicator={false} style={variantStyles.scroll} contentContainerStyle={variantStyles.scrollContent} {...scrollProps} ref={scrollRef}>
107
113
  <View_1.View style={variantStyles.wrapper}>
108
- <AnimatedView {...props} animated style={[variantStyles.selectedBubble, widthStyle]} animate={{
114
+ <AnimatedView options={options} styles={variantStyles} animated style={[variantStyles.selectedBubble, widthStyle]} animate={{
109
115
  translateX: translateX,
110
- }} transition={_animation}/>
116
+ }} transition={{
117
+ translateX: _animation,
118
+ }}/>
111
119
  {options.map(function (o, idx) {
112
120
  var selected = value === o.value;
113
- var touchableProps = {
114
- key: idx,
115
- debugName: "Segmented Control ".concat(debugName, ", option ").concat(o.label),
116
- onPress: onPress(o.value, idx),
117
- style: [widthStyle, variantStyles.button],
118
- };
119
- var textProps = {
120
- text: o.label,
121
- colorChangeConfig: _animation,
122
- style: react_native_1.StyleSheet.flatten([variantStyles.text, selected && variantStyles['text:selected']]),
123
- animated: true,
124
- };
121
+ var touchableProps = __assign({ key: idx, debugName: "Segmented Control ".concat(debugName, ", option ").concat(o.label), onPress: onPress(o.value, idx), style: [widthStyle, variantStyles.button] }, props.touchableProps);
122
+ var textProps = __assign({ text: o.label, colorChangeConfig: _animation, style: react_native_1.StyleSheet.flatten([variantStyles.text, selected && variantStyles['text:selected']]), animated: true }, props.textProps);
125
123
  if (RenderButton) {
126
124
  return (<RenderButton {...props} touchableProps={touchableProps} key={touchableProps.key} textProps={textProps} option={o}/>);
127
125
  }
128
- return <Touchable_1.Touchable {...touchableProps} key={touchableProps.key}>
126
+ return <Touchable_1.Touchable {...touchableProps} noFeedback={selected} key={touchableProps.key} styles={{
127
+ feedback: variantStyles.buttonFeedback,
128
+ }}>
129
129
  <Text_1.Text {...textProps}/>
130
130
 
131
131
  </Touchable_1.Touchable>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAiF;AACjF,oCAA+C;AAE/C,6CAAyD;AACzD,2CAAwF;AAExF,0CAAwC;AAExC,gCAA8B;AAE9B,gCAA8B;AAC9B,2CAAwB;AAyBxB,IAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,GAAG;IACb,yBAAyB;CAC1B,CAAA;AAED,IAAM,iBAAiB,GAAG,eAAK,CAAC,UAAU,CAA6C,UAAC,KAAK,EAAE,GAAG;IAE9F,IAAA,KAWE,KAAK,QAXK,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,aAAa,GAUX,KAAK,cAVM,EACb,SAAS,GASP,KAAK,UATE,EACT,KAAK,GAQH,KAAK,MARF,EACL,KAOE,KAAK,OAPI,EAAX,MAA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AAe,CAAC,CAAC,CAAC,EAC3F,QAAQ,EAAE,IAAI,IACX,KAAK,CAAC,SAAS,CACnB,CAAA;YAED,IAAI,YAAY,EAAE;gBAChB,OAAO,CACL,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CACrH,CAAA;aACF;YACD,OAAO,CAAC,qBAAS,CACf,IAAI,cAAc,CAAC,CACnB,UAAU,CAAC,CAAC,QAAQ,CAAC,CACrB,GAAG,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CACxB,MAAM,CAAC,CAAC;oBACN,QAAQ,EAAE,aAAa,CAAC,cAAc;iBACvC,CAAC,CAEF;YAAA,CAAC,WAAI,CAEH,IAAI,SAAS,CAAC,EAGlB;;UAAA,EAAE,qBAAS,CAAC,CAAA;QAEd,CAAC,CAAC,CACJ;MAAA,EAAE,WAAI,CACR;IAAA,EAAE,eAAM,CAAC,CACV,CAAA;AAEH,CAAC,CAAC,CAAA;AAIW,QAAA,gBAAgB,GAAG,iBAAwC,CAAA"}
@@ -1,54 +1,59 @@
1
+ import { StylesOf } from '@codeleap/common';
2
+ import { TouchableStylesGen } from '../Touchable';
1
3
  export declare type SegmentedControlStates = 'selected';
2
- export declare type SegmentedControlComposition = 'selectedBubble' | 'wrapper' | 'scroll' | 'scrollContent' | 'text' | `text:${SegmentedControlStates}` | 'button' | `button:${SegmentedControlStates}`;
4
+ export declare type SegmentedControlComposition = 'selectedBubble' | 'wrapper' | 'scroll' | 'scrollContent' | 'text' | `text:${SegmentedControlStates}` | 'button' | 'buttonFeedback' | `button:${SegmentedControlStates}`;
5
+ export declare type SegmentedControlStylesGen<TCSS = any> = StylesOf<Exclude<SegmentedControlComposition, 'buttonFeedback'>> & {
6
+ buttonFeedback?: TouchableStylesGen['feedback'];
7
+ };
3
8
  export declare const SegmentedControlStyles: {
4
- default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
5
- inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
6
- block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
7
- flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
8
- inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
9
- absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
10
- relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
11
- fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
12
- sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
13
- hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
14
- full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
15
- noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
16
- fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
17
- fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
18
- fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
19
- fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
20
- fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
21
- whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
22
- centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
23
- row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
24
- listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
25
- column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
26
- center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
27
- alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
28
- alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
29
- alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
30
- alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
31
- alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
32
- alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
33
- alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
34
- alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
35
- justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
36
- justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
37
- justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
38
- justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
39
- justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
40
- textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
41
- textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
42
- textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
43
- blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
44
- elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
45
- neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
46
- scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
47
- scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
48
- scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
49
- wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
50
- debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
51
- debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
52
- debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
53
- debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SegmentedControlComposition, any>>;
9
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
10
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
11
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
12
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
13
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
14
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
15
+ relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
16
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
17
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
18
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
19
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
20
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
21
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
22
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
23
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
24
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
25
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
26
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
27
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
28
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
29
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
30
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
31
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
32
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
33
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
34
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
35
+ alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
36
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
37
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
38
+ alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
39
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
40
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
41
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
42
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
43
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
44
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
45
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
46
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
47
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
48
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
49
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
50
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
51
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
52
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
53
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
54
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
55
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
56
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
57
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
58
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => SegmentedControlStylesGen<any>;
54
59
  };
@@ -17,6 +17,10 @@ var createSegmentedControlStyle = (0, common_1.createDefaultVariantFactory)();
17
17
  var presets = (0, common_1.includePresets)(function (style) { return createSegmentedControlStyle(function () { return ({ scrollContent: style }); }); });
18
18
  exports.SegmentedControlStyles = __assign(__assign({}, presets), { default: createSegmentedControlStyle(function (theme) {
19
19
  return {
20
+ buttonFeedback: {
21
+ type: 'opacity',
22
+ value: 0.5,
23
+ },
20
24
  text: {
21
25
  color: theme.colors.text,
22
26
  },
@@ -27,9 +31,12 @@ exports.SegmentedControlStyles = __assign(__assign({}, presets), { default: crea
27
31
  height: theme.values.buttons.default.height,
28
32
  // borderRadius: Theme.borderRadius.large,
29
33
  },
30
- scrollContent: __assign({}, theme.spacing.paddingHorizontal(2)),
31
- button: __assign(__assign(__assign(__assign({ backgroundColor: 'transparent' }, theme.presets.alignCenter), { color: 'red' }), theme.spacing.padding(2)), theme.presets.justifyCenter),
32
- selectedBubble: __assign(__assign({ position: 'absolute', zIndex: -1 }, theme.spacing.padding(2)), { maxHeight: 50, minHeight: 50, borderRadius: theme.borderRadius.large, backgroundColor: theme.colors.primary }),
34
+ scrollContent: __assign(__assign(__assign({}, theme.presets.row), theme.spacing.paddingHorizontal(2)), theme.presets.alignStretch),
35
+ button: __assign(__assign(__assign(__assign(__assign({ backgroundColor: 'transparent' }, theme.presets.alignCenter), theme.presets.justifyCenter), { borderRadius: theme.borderRadius.large }), theme.spacing.padding(1)), { minHeight: '100%' }),
36
+ selectedBubble: __assign(__assign({ position: 'absolute', zIndex: -1 }, theme.spacing.padding(2)), {
37
+ // maxHeight: 50,
38
+ // minHeight: 50,
39
+ top: 0, bottom: 0, borderRadius: theme.borderRadius.large, backgroundColor: theme.colors.primary }),
33
40
  wrapper: __assign(__assign({ borderRadius: theme.borderRadius.large, backgroundColor: theme.colors.backgroundSecondary }, theme.presets.row), { position: 'relative' }),
34
41
  };
35
42
  }) });
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/SegmentedControl/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8E;AAc9E,IAAM,2BAA2B,GAAG,IAAA,oCAA2B,GAA+B,CAAA;AAE9F,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,KAAK,IAAK,OAAA,2BAA2B,CAAC,cAAM,OAAA,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAA1B,CAA0B,CAAC,EAA7D,CAA6D,CAAC,CAAA;AAE3F,QAAA,sBAAsB,yBAC9B,OAAO,KACV,OAAO,EAAE,2BAA2B,CAAC,UAAC,KAAK;QAEzC,OAAO;YAEL,IAAI,EAAE;gBACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;aACzB;YACD,eAAe,EAAE;gBACf,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;aAC1B;YACD,MAAM,EAAE;gBACN,MAAM,EAAE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GACrB;SAEF,CAAA;IAEH,CAAC,CAAC,IACH"}
@@ -92,9 +92,8 @@ var Select = function (selectProps) {
92
92
  return <>
93
93
  {!hideInput && (<TextInput_1.TextInput caretHidden value={selectedLabel} rightIcon={{
94
94
  icon: arrowIconName,
95
- }} editable={false} touchableWrapper wrapperProps={{
95
+ }} editable={false} touchableWrapper onPress={close} wrapperProps={{
96
96
  debugName: 'Select',
97
- onPress: close,
98
97
  }} pointerEvents={'none'} label={label} debugName={'Select input'} styles={inputStyles} style={style} {...inputProps}/>)}
99
98
 
100
99
  <utils_1.ModalManager.Drawer scroll={false} title={label} {...drawerProps} styles={variantStyles}>
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAGsC;AACtC,6CAAsC;AACtC,6CAAyC;AACzC,gCAA8B;AAC9B,gCAA8B;AAC9B,0CAAwC;AACxC,0CAAwC;AAGxC,qCAA0C;AAC1C,gCAA8B;AAEvB,IAAM,UAAU,GAAG,UAAC,EAAkD;QAAhD,IAAI,UAAA,EAAE,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EAAE,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAE,OAAO,aAAA;IACzE,OAAO,CAAC,qBAAS,CAAC,KAAK,CAAC,CAAC;YACvB,MAAM,CAAC,WAAW;YAClB,UAAU,IAAI,MAAM,CAAC,sBAAsB,CAAC;SAC7C,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAU,IAAI,CAAC,KAAK,CAAE,CAAC,CACrD;IAAA,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;YAC7B,MAAM,CAAC,QAAQ;YACf,UAAU,IAAI,MAAM,CAAC,mBAAmB,CAAC;SAC1C,CAAC,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U,CAAC,EACf,CACH,CAGH;;IAAA,CAAC,oBAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CACvF;MAAA,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,OAAO,CAAC,CACd,KAAK,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAC1B,qBAAqB,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CACjD,YAAY,CAAC,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAC7B,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,IAAI,SAAS,CAAC,EAElB;IAAA,EAAE,oBAAY,CAAC,MAAM,CAEvB;;EAAA,GAAG,CAAA;AACL,CAAC,CAAA;AAjGY,QAAA,MAAM,UAiGlB;AAED,2CAAwB;AACxB,0CAAuB"}
@@ -1,7 +1,7 @@
1
1
  import { TextInputComposition } from '@codeleap/common';
2
2
  import { DrawerComposition } from '../Drawer';
3
3
  declare type ItemStates = '' | ':selected';
4
- export declare type SelectComposition = DrawerComposition | `input${TextInputComposition}` | 'list' | 'listContent' | `itemWrapper${ItemStates}` | `itemText${ItemStates}` | 'scroll' | 'scrollContent';
4
+ export declare type SelectComposition = DrawerComposition | `input${TextInputComposition}` | 'list' | 'listContent' | `itemWrapper${ItemStates}` | `itemText${ItemStates}` | 'scroll' | 'scrollContent' | `itemIcon${ItemStates}`;
5
5
  export declare const SelectStyles: {
6
6
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<SelectComposition, any>>;
7
7
  popup: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("../Modal").ModalComposition, any>>;
@@ -17,10 +17,13 @@ var Drawer_1 = require("../Drawer");
17
17
  var createSelectStyle = (0, common_1.createDefaultVariantFactory)();
18
18
  exports.SelectStyles = __assign(__assign({}, Drawer_1.DrawerStyles), { default: createSelectStyle(function (theme) {
19
19
  var defaultStyle = Drawer_1.DrawerStyles.default(theme);
20
- return __assign(__assign({}, defaultStyle), { box: __assign({}, theme.spacing.paddingHorizontal(0)), itemWrapper: __assign(__assign(__assign(__assign({}, theme.spacing.padding(2)), theme.presets.row), theme.presets.justifySpaceBetween), theme.presets.alignCenter), 'itemWrapper:selected': {
20
+ return __assign(__assign({}, defaultStyle), { box: __assign({}, theme.spacing.paddingHorizontal(0)), itemWrapper: __assign(__assign(__assign(__assign(__assign({}, theme.presets.row), theme.presets.justifySpaceBetween), theme.presets.alignCenter), theme.spacing.padding(1.4)), { height: 50 }), 'itemWrapper:selected': {
21
21
  backgroundColor: theme.colors.primary,
22
22
  }, 'itemText:selected': {
23
23
  color: theme.colors.white,
24
+ }, 'itemIcon:selected': __assign({ color: theme.colors.white }, theme.sized(3)), itemIcon: {
25
+ width: 0,
26
+ height: 0,
24
27
  }, list: {
25
28
  height: 'auto',
26
29
  }, listContent: {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Select/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAoF;AACpF,oCAA2D;AAY3D,IAAM,iBAAiB,GAAG,IAAA,oCAA2B,GAAqB,CAAA;AAE7D,QAAA,YAAY,yBACpB,qBAAY,KACf,OAAO,EAAE,iBAAiB,CAAC,UAAC,KAAK;QAC/B,IAAM,YAAY,GAAG,qBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAChD,6BACK,YAAY,KACf,GAAG,eACE,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAGvC,WAAW,0CACN,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,OAAO,CAAC,GAAG,GACjB,KAAK,CAAC,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IACtB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAEnB,QAAQ,EAAE;gBACR,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,CAAC;aACV,EACD,IAAI,EAAE;gBACJ,MAAM,EAAE,MAAM;aAEf,EACD,WAAW,EAAE;gBACX,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;aACrE,IAEF;IACH,CAAC,CAAC,IACH"}
@@ -74,7 +74,7 @@ exports.Switch = (0, react_1.forwardRef)(function (switchProps, ref) {
74
74
  <react_native_1.Switch thumbColor={thumbColor} trackColor={{ false: trackColor, true: trackColor }} ios_backgroundColor={trackColor} value={value} ref={ref} {...props}/>
75
75
  <TextInput_1.InputLabel label={label} style={getStyles('label')}/>
76
76
  </View_1.View>
77
- <TextInput_1.FormError message={error.message} style={getStyles('error')}/>
77
+ <TextInput_1.FormError text={error.message} style={getStyles('error')}/>
78
78
  </View_1.View>);
79
79
  });
80
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAQyB;AACzB,+BAAoE;AACpE,6CAAiE;AACjE,0CAAoD;AACpD,gCAA8B;AAM9B,2CAAwB;AAYX,QAAA,MAAM,GAAG,IAAA,kBAAU,EAC9B,UAAC,WAAW,EAAE,GAAG;IAEb,IAAA,KAOE,WAAW,SAPA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAME,WAAW,MANH,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAKE,WAAW,OALF,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,QAAQ,GAIN,WAAW,SAJL,EACR,KAAK,GAGH,WAAW,MAHR,EACL,KAAK,GAEH,WAAW,MAFR,EACF,KA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: ComponentVariants<typeof TextStyles>['variants'];
11
11
  animated?: boolean;
12
12
  colorChangeConfig?: Partial<Animated.TimingAnimationConfig>;
13
+ debugName?: string;
13
14
  } & BaseViewProps & MotiProps;
14
15
  export declare const Text: React.ForwardRefExoticComponent<import("react-native").TextProps & {
15
16
  text?: React.ReactNode;
16
17
  variants?: ComponentVariants<typeof TextStyles>['variants'];
17
18
  animated?: boolean;
18
19
  colorChangeConfig?: Partial<Animated.TimingAnimationConfig>;
20
+ debugName?: string;
19
21
  } & BaseViewProps & MotiProps<any, import("moti").StyleValueWithReplacedTransforms<any>, Partial<import("moti").StyleValueWithSequenceArraysWithoutTransform<import("moti").StyleValueWithReplacedTransforms<any>, string | number | symbol, string | number | symbol> & import("moti").StyleValueWithSequenceArraysWithTransform>> & React.RefAttributes<NativeText>>;
@@ -48,17 +48,61 @@ __exportStar(require("./styles"), exports);
48
48
  var MotiText = react_native_1.Animated.createAnimatedComponent(moti_1.MotiText);
49
49
  exports.Text = (0, react_1.forwardRef)(function (textProps, ref) {
50
50
  var _a = textProps.variants, variants = _a === void 0 ? [] : _a, text = textProps.text, children = textProps.children, style = textProps.style, colorChangeConfig = textProps.colorChangeConfig, props = __rest(textProps, ["variants", "text", "children", "style", "colorChangeConfig"]);
51
- var variantStyles = (0, common_1.useDefaultComponentStyle)('Text', {
51
+ var pressPolyfillEnabled = react_native_1.Platform.OS === 'android' && !!props.onPress;
52
+ var _b = (0, common_1.useState)(false), pressed = _b[0], setPressed = _b[1];
53
+ var handlePress = function (pressed) {
54
+ if (!pressPolyfillEnabled)
55
+ return;
56
+ return function () {
57
+ if (props.onPress) {
58
+ setPressed(pressed);
59
+ }
60
+ };
61
+ };
62
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Text', {
52
63
  variants: variants,
64
+ transform: react_native_1.StyleSheet.flatten,
53
65
  rootElement: 'text',
54
66
  });
55
67
  var styles = react_native_1.StyleSheet.flatten([variantStyles.text, style]);
56
68
  var animatedColor = (0, utils_1.useAnimateColor)(styles.color, colorChangeConfig);
69
+ if (!!text && !common_1.TypeGuards.isString(text))
70
+ return <>{text}</>;
57
71
  var Component = textProps.animated ? MotiText : react_native_1.Text;
58
72
  var colorStyle = { color: props.animated ? animatedColor : styles.color };
73
+ var getFeedbackStyle = (0, utils_1.usePressableFeedback)(styles, {
74
+ disabled: !pressPolyfillEnabled,
75
+ feedbackConfig: variantStyles.pressFeedback,
76
+ hightlightPropertyIn: 'color',
77
+ hightlightPropertyOut: 'backgroundColor',
78
+ }).getFeedbackStyle;
79
+ var feedbackStyle = pressPolyfillEnabled ? getFeedbackStyle(pressed) : undefined;
80
+ return <Component {...props} onPressIn={handlePress(true)} onPressOut={handlePress(false)} style={[styles, colorStyle, feedbackStyle]}
81
+ // @ts-ignore
82
+ ref={ref}>
83
+ {text}
84
+ </Component>;
59
85
  // @ts-ignore
60
86
  return <Component {...props} style={[styles, colorStyle]} ref={ref}>
61
- {text || children}
87
+ {text}
88
+ {children}
62
89
  </Component>;
63
90
  });
91
+ // const childArr = React.Children.toArray([
92
+ // text,
93
+ // children,
94
+ // ])
95
+ // return <View style={[styles, colorStyle]}>
96
+ // {
97
+ // childArr.map((child) => {
98
+ // if (TypeGuards.isString(child)) {
99
+ // // @ts-ignore
100
+ // return <Component {...props} ref={ref}>
101
+ // {child}
102
+ // </Component>
103
+ // }
104
+ // return child
105
+ // })
106
+ // }
107
+ // </View>
64
108
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,2CAKyB;AACzB,6CAAuE;AACvE,6BAAuD;AACvD,qCAA6C;AAG7C,2CAAwB;AASxB,IAAM,QAAQ,GAAG,uBAAQ,CAAC,uBAAuB,CAAC,eAAS,CAAC,CAAA;AAE/C,QAAA,IAAI,GAAG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