@codeleap/mobile 2.3.19 → 2.3.21

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 (87) hide show
  1. package/dist/components/AutoComplete/index.d.ts +1 -0
  2. package/dist/components/AutoComplete/index.js +2 -1
  3. package/dist/components/AutoComplete/index.js.map +1 -1
  4. package/dist/components/AutoComplete/styles.js +67 -3
  5. package/dist/components/AutoComplete/styles.js.map +1 -1
  6. package/dist/components/Checkbox/index.d.ts +1 -1
  7. package/dist/components/EmptyPlaceholder/index.d.ts +5 -2
  8. package/dist/components/EmptyPlaceholder/index.js +19 -5
  9. package/dist/components/EmptyPlaceholder/index.js.map +1 -1
  10. package/dist/components/EmptyPlaceholder/styles.d.ts +1 -1
  11. package/dist/components/EmptyPlaceholder/styles.js +5 -7
  12. package/dist/components/EmptyPlaceholder/styles.js.map +1 -1
  13. package/dist/components/Grid/styles.d.ts +49 -0
  14. package/dist/components/Image/index.d.ts +1 -0
  15. package/dist/components/Image/index.js +21 -3
  16. package/dist/components/Image/index.js.map +1 -1
  17. package/dist/components/List/styles.d.ts +49 -0
  18. package/dist/components/List/styles.js +5 -4
  19. package/dist/components/List/styles.js.map +1 -1
  20. package/dist/components/Modal/index.d.ts +2 -0
  21. package/dist/components/Modal/index.js +11 -9
  22. package/dist/components/Modal/index.js.map +1 -1
  23. package/dist/components/Modal/styles.d.ts +2 -2
  24. package/dist/components/Modal/styles.js +18 -19
  25. package/dist/components/Modal/styles.js.map +1 -1
  26. package/dist/components/MultiSelect/index.js +7 -5
  27. package/dist/components/MultiSelect/index.js.map +1 -1
  28. package/dist/components/MultiSelect/styles.d.ts +0 -51
  29. package/dist/components/MultiSelect/styles.js +67 -5
  30. package/dist/components/MultiSelect/styles.js.map +1 -1
  31. package/dist/components/MultiSelect/types.d.ts +8 -1
  32. package/dist/components/Scroll/styles.d.ts +49 -0
  33. package/dist/components/Scroll/styles.js +3 -4
  34. package/dist/components/Scroll/styles.js.map +1 -1
  35. package/dist/components/SegmentedControl/index.js +5 -4
  36. package/dist/components/SegmentedControl/index.js.map +1 -1
  37. package/dist/components/SegmentedControl/styles.d.ts +1 -1
  38. package/dist/components/SegmentedControl/styles.js +9 -9
  39. package/dist/components/SegmentedControl/styles.js.map +1 -1
  40. package/dist/components/Select/index.d.ts +4 -1
  41. package/dist/components/Select/index.js +16 -21
  42. package/dist/components/Select/index.js.map +1 -1
  43. package/dist/components/Select/styles.d.ts +54 -53
  44. package/dist/components/Select/styles.js +61 -10
  45. package/dist/components/Select/styles.js.map +1 -1
  46. package/dist/components/Select/types.d.ts +8 -1
  47. package/dist/components/TextInput/index.js +4 -1
  48. package/dist/components/TextInput/index.js.map +1 -1
  49. package/dist/components/Touchable/index.js +5 -1
  50. package/dist/components/Touchable/index.js.map +1 -1
  51. package/dist/components/View/index.js +19 -13
  52. package/dist/components/View/index.js.map +1 -1
  53. package/dist/components/defaultStyles.d.ts +147 -51
  54. package/dist/utils/KeyboardAware/context.js +1 -6
  55. package/dist/utils/KeyboardAware/context.js.map +1 -1
  56. package/dist/utils/PermissionManager/context.js +3 -2
  57. package/dist/utils/PermissionManager/context.js.map +1 -1
  58. package/dist/utils/hooks.d.ts +2 -0
  59. package/dist/utils/hooks.js +44 -1
  60. package/dist/utils/hooks.js.map +1 -1
  61. package/dist/utils/theme.js +3 -3
  62. package/dist/utils/theme.js.map +1 -1
  63. package/package.json +3 -2
  64. package/src/components/AutoComplete/index.tsx +5 -1
  65. package/src/components/AutoComplete/styles.ts +112 -6
  66. package/src/components/EmptyPlaceholder/index.tsx +32 -8
  67. package/src/components/EmptyPlaceholder/styles.ts +18 -15
  68. package/src/components/Image/index.tsx +33 -3
  69. package/src/components/List/styles.ts +7 -1
  70. package/src/components/Modal/index.tsx +12 -7
  71. package/src/components/Modal/styles.ts +36 -46
  72. package/src/components/MultiSelect/index.tsx +10 -4
  73. package/src/components/MultiSelect/styles.ts +117 -4
  74. package/src/components/MultiSelect/types.ts +8 -0
  75. package/src/components/Scroll/styles.ts +4 -1
  76. package/src/components/SegmentedControl/index.tsx +5 -4
  77. package/src/components/SegmentedControl/styles.ts +13 -10
  78. package/src/components/Select/index.tsx +50 -27
  79. package/src/components/Select/styles.ts +103 -25
  80. package/src/components/Select/types.ts +11 -1
  81. package/src/components/TextInput/index.tsx +3 -1
  82. package/src/components/Touchable/index.tsx +5 -3
  83. package/src/components/View/index.tsx +25 -13
  84. package/src/utils/KeyboardAware/context.tsx +2 -7
  85. package/src/utils/PermissionManager/context.tsx +1 -1
  86. package/src/utils/hooks.ts +50 -0
  87. package/src/utils/theme.ts +1 -1
@@ -16,6 +16,7 @@ export declare type AutoCompleteHeaderProps = ReactStateProps<'search', string>
16
16
  debugName: string;
17
17
  icon?: IconPlaceholder;
18
18
  toggle: ModalHeaderProps['toggle'];
19
+ description?: React.ReactElement;
19
20
  };
20
21
  export declare const AutoCompleteHeader: React.FC<AutoCompleteHeaderProps>;
21
22
  export declare type AutoCompleteOption<T> = CustomSelectProps<T>['options'][number] & {
@@ -58,12 +58,13 @@ var react_native_1 = require("react-native");
58
58
  var Text_1 = require("../Text");
59
59
  var Button_1 = require("../Button");
60
60
  var AutoCompleteHeader = function (props) {
61
- var search = props.search, setSearch = props.setSearch, _a = props.icon, icon = _a === void 0 ? 'search' : _a, debugName = props.debugName, label = props.label, styles = props.styles, toggle = props.toggle, searchInputProps = props.searchInputProps, viewProps = __rest(props, ["search", "setSearch", "icon", "debugName", "label", "styles", "toggle", "searchInputProps"]);
61
+ var search = props.search, setSearch = props.setSearch, _a = props.icon, icon = _a === void 0 ? 'search' : _a, _b = props.description, description = _b === void 0 ? null : _b, debugName = props.debugName, label = props.label, styles = props.styles, toggle = props.toggle, searchInputProps = props.searchInputProps, viewProps = __rest(props, ["search", "setSearch", "icon", "description", "debugName", "label", "styles", "toggle", "searchInputProps"]);
62
62
  return <View_1.View style={[styles.wrapper]} {...viewProps}>
63
63
  <View_1.View style={styles.titleWrapper}>
64
64
  <Text_1.Text style={styles.title} text={label}/>
65
65
  <Button_1.Button icon={'close'} debugName={"Close Autocomplete ".concat(debugName, " button")} onPress={toggle} variants={['icon']} styles={styles.closeButton}/>
66
66
  </View_1.View>
67
+ {description}
67
68
  <TextInput_1.TextInput subtitle={function () { return null; }} leftIcon={{
68
69
  icon: icon,
69
70
  }} debugName={"AutoComplete ".concat(debugName, " search input")} value={search} onChangeText={setSearch} styles={styles.searchInput} {...searchInputProps}/>
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AutoComplete/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAYyB;AAEzB,0CAAwD;AACxD,gCAAyC;AACzC,oCAAqD;AAGrD,6CAAyC;AACzC,gCAA8B;AAC9B,oCAAkC;AAa3B,IAAM,kBAAkB,GAAqC,UAAC,KAAK;IAChE,IAAA,MAAM,GAAmG,KAAK,OAAxG,EAAE,SAAS,GAAwF,KAAK,UAA7F,EAAE,KAAsF,KAAK,KAA5E,EAAf,IAAI,mBAAG,QAAQ,KAAA,EAAE,SAAS,GAA4D,KAAK,UAAjE,EAAE,KAAK,GAAqD,KAAK,MAA1D,EAAE,MAAM,GAA6C,KAAK,OAAlD,EAAE,MAAM,GAAqC,KAAK,OAA1C,EAAE,gBAAgB,GAAmB,KAAK,iBAAxB,EAAK,SAAS,UAAK,KAAK,EAAhH,6FAAwG,CAAF,CAAU;IAEtH,OAAO,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAClD;IAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAC/B;MAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAA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C,MAAM;gBAC7B,WAAW,EAAE,iBAAiB;gBAC9B,KAAK,EAAE,aAAa,CAAC,KAAK;gBAC1B,WAAW,EAAE,iBAAiB;gBAC9B,YAAY,EAAE,aAAa,CAAC,YAAY;aACzC,CAAC,CAEF,IAAI,WAAW,CAAC,EAChB,CACH,CAED,IAAI,WAAW,CAAC,CAChB,SAAS,CAAC,uBACL,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,KACzB,WAAW,aACT,OAAO,SAAA,IACJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,0CAAE,WAAW,KAExC,EACF,CAAA;AAEJ,CAAC,CAAA;AA9FY,QAAA,YAAY,gBA8FxB;AACD,2CAAwB"}
@@ -16,10 +16,74 @@ var common_1 = require("@codeleap/common");
16
16
  var Select_1 = require("../Select");
17
17
  var createAutoCompleteStyle = (0, common_1.createDefaultVariantFactory)();
18
18
  exports.AutoCompleteStyles = __assign(__assign({}, Select_1.SelectStyles), { default: createAutoCompleteStyle(function (theme) {
19
- var defaultStyle = Select_1.SelectStyles.default(theme);
20
- return __assign(__assign({}, defaultStyle), { header: __assign(__assign(__assign(__assign({}, theme.spacing.paddingHorizontal(2)), theme.spacing.paddingTop(1)), theme.presets.column), theme.presets.alignStart), searchInputWrapper: __assign(__assign({}, theme.presets.fullWidth), theme.spacing.marginTop(2)), titleWrapper: __assign(__assign(__assign(__assign({}, theme.presets.row), theme.presets.alignCenter), theme.presets.fullWidth), theme.presets.justifyCenter), title: __assign(__assign({}, theme.presets.textCenter), { flex: 1 }), closeButtonWrapper: {
19
+ return {
20
+ wrapper: __assign(__assign(__assign({}, theme.presets.absolute), theme.presets.fullHeight), theme.presets.fullWidth),
21
+ 'box:transition': {
22
+ scale: {
23
+ duration: theme.values.transitions.modal.duration,
24
+ type: 'timing',
25
+ },
26
+ opacity: {
27
+ duration: theme.values.transitions.modal.duration,
28
+ type: 'timing',
29
+ },
30
+ },
31
+ 'backdrop:transition': {
32
+ opacity: {
33
+ duration: theme.values.transitions.modal.duration,
34
+ type: 'timing',
35
+ },
36
+ },
37
+ backdrop: __assign(__assign(__assign({}, theme.presets.absolute), theme.presets.whole), { backgroundColor: theme.colors.black }),
38
+ backdropTouchable: __assign(__assign({}, theme.presets.absolute), theme.presets.whole),
39
+ 'backdrop:visible': {
40
+ opacity: 0.5,
41
+ },
42
+ 'backdrop:hidden': {
43
+ opacity: 0,
44
+ },
45
+ innerWrapper: {},
46
+ scroll: {
47
+ flex: 1,
48
+ // maxHeight: theme.values.height,
49
+ },
50
+ scrollContent: __assign(__assign(__assign(__assign(__assign({}, theme.presets.alignCenter), theme.presets.justifyCenter), { minHeight: '100%' }), theme.presets.safeAreaTop(theme.values.innerSpacing.Y)), theme.presets.safeAreaBottom(theme.values.innerSpacing.Y)),
51
+ box: __assign(__assign({ backgroundColor: theme.colors.background, width: theme.values.width - theme.spacing.value(theme.values.innerSpacing.X * 2), borderRadius: theme.borderRadius.modalOuter }, theme.spacing.paddingHorizontal(theme.values.innerSpacing.X)), theme.spacing.paddingVertical(theme.values.innerSpacing.Y)),
52
+ 'box:hidden': {
53
+ opacity: 0,
54
+ scale: 0.8,
55
+ },
56
+ 'box:visible': {
57
+ opacity: 1,
58
+ scale: 1,
59
+ },
60
+ closeButtonTouchableWrapper: __assign({ alignSelf: 'center' }, theme.spacing.marginLeft('auto')),
61
+ closeButtonIcon: {
62
+ color: theme.colors.text,
63
+ },
64
+ listWrapper: {
65
+ height: 'auto',
66
+ },
67
+ itemWrapper: __assign(__assign(__assign(__assign(__assign(__assign({}, theme.presets.row), theme.presets.justifySpaceBetween), theme.presets.alignCenter), { borderRadius: theme.borderRadius.medium }), theme.spacing.padding(1)), { backgroundColor: theme.colors.backgroundSecondary }),
68
+ 'itemWrapper:selected': {
69
+ backgroundColor: theme.colors.primary,
70
+ },
71
+ 'itemIcon:selected': __assign({ color: theme.colors.backgroundSecondary }, theme.sized(2)),
72
+ 'itemText:selected': {
73
+ color: theme.colors.backgroundSecondary,
74
+ },
75
+ itemIcon: {
76
+ height: 0,
77
+ width: 0,
78
+ },
79
+ header: __assign(__assign(__assign(__assign({}, theme.spacing.paddingHorizontal(theme.values.innerSpacing.X)), theme.spacing.paddingVertical(theme.values.innerSpacing.Y)), theme.presets.column), theme.presets.alignStart),
80
+ searchInputWrapper: __assign(__assign({}, theme.presets.fullWidth), theme.spacing.marginTop(2)),
81
+ titleWrapper: __assign(__assign(__assign(__assign({}, theme.presets.row), theme.presets.alignCenter), theme.presets.fullWidth), theme.presets.justifyCenter),
82
+ title: __assign(__assign(__assign({}, theme.presets.textCenter), (0, common_1.assignTextStyle)('h3')(theme).text), { flex: 1 }),
83
+ closeButtonWrapper: {
21
84
  position: 'absolute',
22
85
  right: 0,
23
- } });
86
+ },
87
+ };
24
88
  }) });
25
89
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/AutoComplete/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA+E;AAC/E,oCAA2D;AAK3D,IAAM,uBAAuB,GAAG,IAAA,oCAA2B,GAA2B,CAAA;AAEzE,QAAA,kBAAkB,yBAC1B,qBAAY,KACf,OAAO,EAAE,uBAAuB,CAAC,UAAC,KAAK;QACrC,IAAM,YAAY,GAAG,qBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAEhD,6BACK,YAAY,KACf,MAAM,0CACD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAClC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAC3B,KAAK,CAAC,OAAO,CAAC,MAAM,GACpB,KAAK,CAAC,OAAO,CAAC,UAAU,GAG7B,kBAAkB,wBACb,KAAK,CAAC,OAAO,CAAC,SAAS,GACvB,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAG/B,YAAY,0CACP,KAAK,CAAC,OAAO,CAA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jB,KAAK,CAAC,OAAO,CAAC,WAAW,GACzB,KAAK,CAAC,OAAO,CAAC,SAAS,GACvB,KAAK,CAAC,OAAO,CAAC,aAAa,CAC/B;YACD,KAAK,iCACA,KAAK,CAAC,OAAO,CAAC,UAAU,GACxB,IAAA,wBAAe,EAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KACpC,IAAI,EAAE,CAAC,GACR;YACD,kBAAkB,EAAE;gBAClB,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,CAAC;aACT;SACF,CAAA;IACH,CAAC,CAAC,IACH"}
@@ -12,4 +12,4 @@ declare type CheckboxProps = NativeCheckboxProps & {
12
12
  validate?: Form.ValidatorFunctionWithoutForm | string;
13
13
  required?: boolean;
14
14
  };
15
- export declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "style" | "disabled" | "key" | "value" | "children" | "label" | "removeClippedSubviews" | "hitSlop" | "onLayout" | "pointerEvents" | "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" | "variants" | "styles" | "tintColor" | "onChange" | "required" | "validate" | "onValueChange" | "ios_backgroundColor" | "onTintColor" | "thumbTintColor"> & React.RefAttributes<unknown>>;
15
+ export declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "style" | "disabled" | "value" | "key" | "children" | "label" | "removeClippedSubviews" | "hitSlop" | "onLayout" | "pointerEvents" | "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" | "variants" | "styles" | "tintColor" | "onChange" | "required" | "validate" | "onValueChange" | "ios_backgroundColor" | "onTintColor" | "thumbTintColor"> & React.RefAttributes<unknown>>;
@@ -2,15 +2,18 @@ import React from 'react';
2
2
  import { ActivityIndicatorComposition } from '../ActivityIndicator';
3
3
  import { ComponentVariants, IconPlaceholder } from '@codeleap/common';
4
4
  import { EmptyPlaceholderComposition, EmptyPlaceholderStyles } from './styles';
5
+ import { ImageSourcePropType } from 'react-native';
5
6
  import { StylesOf } from '../../types';
6
7
  export * from './styles';
7
8
  export declare type EmptyPlaceholderProps = {
8
9
  itemName?: string;
9
- title?: React.ReactElement;
10
+ title?: React.ReactElement | string;
11
+ description?: React.ReactElement | string;
12
+ image?: ImageSourcePropType;
13
+ icon?: IconPlaceholder;
10
14
  loading?: boolean;
11
15
  styles?: StylesOf<EmptyPlaceholderComposition>;
12
16
  variants?: ComponentVariants<typeof EmptyPlaceholderStyles>['variants'];
13
- emptyIconName?: IconPlaceholder;
14
17
  renderEmpty?: (props: {
15
18
  emptyText: string | React.ReactElement;
16
19
  emptyIconName?: IconPlaceholder;
@@ -45,11 +45,12 @@ var Text_1 = require("../Text");
45
45
  var ActivityIndicator_1 = require("../ActivityIndicator");
46
46
  var common_1 = require("@codeleap/common");
47
47
  var react_native_1 = require("react-native");
48
+ var Image_1 = require("../Image");
48
49
  __exportStar(require("./styles"), exports);
49
50
  var EmptyPlaceholder = function (props) {
50
- var itemName = props.itemName, title = props.title, loading = props.loading, _a = props.styles, styles = _a === void 0 ? {} : _a, _b = props.variants, variants = _b === void 0 ? [] : _b, _c = props.emptyIconName, emptyIconName = _c === void 0 ? 'placeholder' : _c, renderEmpty = props.renderEmpty;
51
+ var itemName = props.itemName, title = props.title, loading = props.loading, description = props.description, image = props.image, _a = props.styles, styles = _a === void 0 ? {} : _a, _b = props.variants, variants = _b === void 0 ? [] : _b, _c = props.icon, icon = _c === void 0 ? null : _c, renderEmpty = props.renderEmpty;
51
52
  var emptyText = title || (itemName && "No ".concat(itemName, " found.")) || 'No items.';
52
- var componentStyles = (0, common_1.useDefaultComponentStyle)('EmptyPlaceholder', {
53
+ var componentStyles = (0, common_1.useDefaultComponentStyle)('u:EmptyPlaceholder', {
53
54
  variants: variants,
54
55
  transform: react_native_1.StyleSheet.flatten,
55
56
  styles: styles,
@@ -64,14 +65,27 @@ var EmptyPlaceholder = function (props) {
64
65
  return (<View_1.View style={componentStyles.wrapper}>
65
66
  {renderEmpty({
66
67
  emptyText: emptyText,
67
- emptyIconName: emptyIconName,
68
+ emptyIconName: icon,
68
69
  styles: __assign(__assign({}, componentStyles), { activityIndicatorStyles: activityIndicatorStyles }),
69
70
  })}
70
71
  </View_1.View>);
71
72
  }
73
+ var _image = null;
74
+ if (icon) {
75
+ _image = <Icon_1.Icon name={icon} style={componentStyles.icon}/>;
76
+ }
77
+ else if (image) {
78
+ _image = <Image_1.Image source={image} style={[
79
+ componentStyles.image,
80
+ ]}/>;
81
+ }
72
82
  return (<View_1.View style={componentStyles.wrapper}>
73
- <Icon_1.Icon name={emptyIconName} style={componentStyles.icon}/>
74
- <Text_1.Text text={emptyText} style={componentStyles.text}/>
83
+ <View_1.View style={componentStyles.imageWrapper}>
84
+ {_image}
85
+ </View_1.View>
86
+
87
+ {react_1.default.isValidElement(emptyText) ? emptyText : <Text_1.Text text={emptyText} style={componentStyles.title}/>}
88
+ {react_1.default.isValidElement(description) ? description : <Text_1.Text text={description} style={componentStyles.description}/>}
75
89
  </View_1.View>);
76
90
  };
77
91
  exports.EmptyPlaceholder = EmptyPlaceholder;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/EmptyPlaceholder/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAsC;AACtC,gCAA8B;AAC9B,gCAA8B;AAC9B,gCAA8B;AAC9B,0DAAsF;AACtF,2CAMyB;AAOzB,6CAAyC;AAGzC,2CAAwB;AAgBjB,IAAM,gBAAgB,GAAmC,UAAC,KAA4B;IAEzF,IAAA,QAAQ,GAON,KAAK,SAPC,EACR,KAAK,GAMH,KAAK,MANF,EACL,OAAO,GAKL,KAAK,QALA,EACP,KAIE,KAAK,OAJI,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,KAGE,KAAK,SAHM,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAEE,KAAK,cAFsB,EAA7B,aAAa,mBAAG,aAAa,KAAA,EAC7B,WAAW,G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E,CACrG;MAAA,CAAC,eAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,CACnH;IAAA,EAAE,WAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAnEY,QAAA,gBAAgB,oBAmE5B"}
@@ -1,5 +1,5 @@
1
1
  import { ActivityIndicatorComposition } from '../ActivityIndicator';
2
- export declare type EmptyPlaceholderComposition = 'wrapper:loading' | `loader${Capitalize<ActivityIndicatorComposition>}` | 'wrapper' | 'text' | 'icon';
2
+ export declare type EmptyPlaceholderComposition = 'wrapper:loading' | `loader${Capitalize<ActivityIndicatorComposition>}` | 'wrapper' | 'title' | 'description' | 'image' | 'imageWrapper' | 'icon';
3
3
  export declare const EmptyPlaceholderStyles: {
4
4
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<EmptyPlaceholderComposition, any>>;
5
5
  compact: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<EmptyPlaceholderComposition, any>>;
@@ -16,13 +16,11 @@ var common_1 = require("@codeleap/common");
16
16
  var createEmptyPlaceholderStyle = (0, common_1.createDefaultVariantFactory)();
17
17
  var presets = (0, common_1.includePresets)(function (styles) { return createEmptyPlaceholderStyle(function () { return ({ wrapper: styles }); }); });
18
18
  exports.EmptyPlaceholderStyles = __assign(__assign({}, presets), { default: createEmptyPlaceholderStyle(function (theme) { return ({
19
- wrapper: __assign(__assign({}, theme.presets.center), { minHeight: theme.values.window.height / 2, height: '100%', flex: 1 }),
20
- loaderWrapper: __assign(__assign(__assign({}, theme.spacing.marginVertical(8)), theme.presets.center), theme.presets.flex),
21
- icon: {
22
- color: theme.colors.placeholder,
23
- size: theme.spacing.value(24),
24
- },
25
- text: __assign(__assign({}, (0, common_1.assignTextStyle)('p1')(theme).text), theme.presets.textCenter),
19
+ wrapper: __assign({ flexGrow: 1 }, theme.presets.center),
20
+ title: __assign(__assign({}, (0, common_1.assignTextStyle)('h3')(theme).text), theme.spacing.marginBottom(theme.values.innerSpacing.Y)),
21
+ description: __assign({}, (0, common_1.assignTextStyle)('p1')(theme).text),
22
+ imageWrapper: __assign(__assign(__assign(__assign({}, theme.spacing.paddingBottom(theme.values.innerSpacing.Y * 2)), theme.presets.fullWidth), theme.presets.alignCenter), { height: '45%' }),
23
+ image: __assign({}, theme.presets.fullHeight),
26
24
  }); }), compact: createEmptyPlaceholderStyle(function (theme) { return ({
27
25
  wrapper: __assign(__assign({}, theme.spacing.marginVertical(0)), { marginBottom: theme.spacing.value(6) }),
28
26
  }); }), absolute: createEmptyPlaceholderStyle(function (theme) { return ({
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/EmptyPlaceholder/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA+F;AAU/F,IAAM,2BAA2B,GAAG,IAAA,oCAA2B,GAA+B,CAAA;AAE9F,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,2BAA2B,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAArB,CAAqB,CAAC,EAAxD,CAAwD,CAClG,CAAA;AAEY,QAAA,sBAAsB,yBAC9B,OAAO,KACV,OAAO,EAAE,2BAA2B,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC;QAC/C,OAAO,wBACF,KAAK,CAAC,OAAO,CAAC,MAAM,KACvB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EACzC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,CAAC,GACR;QACD,aAAa,iCAER,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAA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B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,GACzC;QACD,OAAO,iCACF,KAAK,CAAC,OAAO,CAAC,QAAQ,GACtB,KAAK,CAAC,OAAO,CAAC,KAAK,KACtB,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,GACzC;KACF,CAAC,EAX+C,CAW/C,CAAC,IACJ"}
@@ -2,4 +2,53 @@ import { ListComposition } from '../List';
2
2
  export declare type GridComposition = ListComposition;
3
3
  export declare const GridStyles: {
4
4
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
5
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
6
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
7
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
8
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
9
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
10
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
11
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
12
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
13
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
14
+ relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
15
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
16
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
17
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
18
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
19
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
20
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
21
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
22
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
23
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
24
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
25
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
26
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
27
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
28
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
29
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
30
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
31
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
32
+ alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
33
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
34
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
35
+ alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
36
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
37
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
38
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
39
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
40
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
41
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
42
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
43
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
44
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
45
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
46
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
47
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
48
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
49
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
50
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
51
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
52
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
53
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
5
54
  };
@@ -15,6 +15,7 @@ export declare type ImageProps = Omit<NativeImageProps, 'source' | 'style'> & {
15
15
  }) | FormTypes.AnyFile | string | number;
16
16
  resizeMode?: keyof typeof FastImage.resizeMode;
17
17
  spotlight?: string;
18
+ maintainAspectRatioFrom?: 'width' | 'height' | 'none';
18
19
  };
19
20
  export declare const ImageComponent: React.FC<ImageProps>;
20
21
  export declare const Image: React.NamedExoticComponent<ImageProps>;
@@ -47,7 +47,7 @@ var Touchable_1 = require("../Touchable");
47
47
  var utils_1 = require("../../utils");
48
48
  __exportStar(require("./styles"), exports);
49
49
  var ImageComponent = function (props) {
50
- var variants = props.variants, style = props.style, _a = props.fast, fast = _a === void 0 ? true : _a, _b = props.spotlight, spotlight = _b === void 0 ? null : _b, _c = props.resizeMode, resizeMode = _c === void 0 ? 'contain' : _c, source = props.source, imageProps = __rest(props, ["variants", "style", "fast", "spotlight", "resizeMode", "source"]);
50
+ var variants = props.variants, style = props.style, _a = props.fast, fast = _a === void 0 ? true : _a, _b = props.spotlight, spotlight = _b === void 0 ? null : _b, _c = props.resizeMode, resizeMode = _c === void 0 ? 'contain' : _c, source = props.source, _d = props.maintainAspectRatioFrom, maintainAspectRatioFrom = _d === void 0 ? 'height' : _d, imageProps = __rest(props, ["variants", "style", "fast", "spotlight", "resizeMode", "source", "maintainAspectRatioFrom"]);
51
51
  var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Image', { variants: variants });
52
52
  var styles = react_native_1.StyleSheet.flatten([variantStyles.wrapper, style]);
53
53
  var imSource = source;
@@ -68,16 +68,34 @@ var ImageComponent = function (props) {
68
68
  style: [variantStyles.touchable],
69
69
  android_ripple: null,
70
70
  };
71
+ var aspectRatioStyle = React.useMemo(function () {
72
+ if (maintainAspectRatioFrom === 'none' || !imSource)
73
+ return null;
74
+ try {
75
+ // @ts-ignore
76
+ var assetSource = react_native_1.Image.resolveAssetSource(imSource);
77
+ var aspectRatio = assetSource.width / assetSource.height;
78
+ if (Number.isNaN(aspectRatio)) {
79
+ return null;
80
+ }
81
+ return {
82
+ aspectRatio: aspectRatio,
83
+ };
84
+ }
85
+ catch (e) {
86
+ return null;
87
+ }
88
+ }, [maintainAspectRatioFrom, imSource]);
71
89
  if (fast) {
72
90
  return (<Wrapper {...wrapperProps}>
73
91
 
74
- <fastImage_1.FastImage style={styles}
92
+ <fastImage_1.FastImage style={[aspectRatioStyle, styles]}
75
93
  // @ts-ignore
76
94
  tintColor={styles === null || styles === void 0 ? void 0 : styles.tintColor} source={imSource} resizeMode={fastImage_1.FastImage.resizeMode[resizeMode || 'contain']} {...imageProps}/>
77
95
  </Wrapper>);
78
96
  }
79
97
  return <Wrapper {...wrapperProps}>
80
- <react_native_1.Image style={styles} resizeMode={resizeMode} source={imSource} {...imageProps}/>
98
+ <react_native_1.Image style={[aspectRatioStyle, styles]} resizeMode={resizeMode} source={imSource} {...imageProps}/>
81
99
 
82
100
  </Wrapper>;
83
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Image/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAOyB;AAEzB,6CAOqB;AACrB,qDAAmD;AAInD,oDAA0D;AAC1D,0CAAwC;AACxC,qCAAqD;AACrD,2CAAwB;AAiBjB,IAAM,cAAc,GAAyB,UAAC,KAAK;IAChD,IAAA,QAAQ,GAA0F,KAAK,SAA/F,EAAE,KAAK,GAAmF,KAAK,MAAxF,EAAE,KAAiF,KAAK,KAA3E,EAAX,IAAI,mBAAG,IAAI,KAAA,EAAE,KAAoE,KAAK,UAAzD,EAAhB,SAAS,mBAAG,IAAI,KAAA,EAAE,KAAkD,KAAK,WAAjC,EAAtB,UAAU,mBAAG,SAAS,KAAA,EAAE,MAAM,GAAoB,KAAK,OAAzB,EAAK,UAAU,UAAK,KAAK,EAAzG,kEAAiG,CAAF,CAAU;IAE/G,IAAM,aAAa,GAAG,IAAA,iCAAwB,EAAgC,SAAS,EAAE,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAA;IAEtG,IAAM,MAAM,GAAG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Aa,EAAC,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,CAAA;IAC1D,OAAO,GAAG,CAAA;AACZ,CAAC;AAEY,QAAA,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAc,EAAE,QAAQ,CAAC,CAAA"}
@@ -2,4 +2,53 @@ import { ScrollComposition } from '../Scroll/styles';
2
2
  export declare type ListComposition = ScrollComposition | 'separator';
3
3
  export declare const ListStyles: {
4
4
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
5
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
6
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
7
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
8
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
9
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
10
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
11
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
12
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
13
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
14
+ relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
15
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
16
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
17
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
18
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
19
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
20
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
21
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
22
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
23
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
24
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
25
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
26
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
27
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
28
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
29
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
30
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
31
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
32
+ alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
33
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
34
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
35
+ alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
36
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
37
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
38
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
39
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
40
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
41
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
42
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
43
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
44
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
45
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
46
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
47
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
48
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
49
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
50
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
51
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
52
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
53
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
5
54
  };
@@ -15,13 +15,14 @@ exports.ListStyles = void 0;
15
15
  var common_1 = require("@codeleap/common");
16
16
  var styles_1 = require("../Scroll/styles");
17
17
  var createListStyle = (0, common_1.createDefaultVariantFactory)();
18
- exports.ListStyles = {
19
- default: createListStyle(function (theme) {
18
+ var presets = (0, common_1.includePresets)(function (style) { return createListStyle(function () { return ({ content: style }); }); });
19
+ exports.ListStyles = __assign(__assign({}, presets), { default: createListStyle(function (theme) {
20
20
  var defaultStyles = styles_1.ScrollStyles.default(theme);
21
21
  return __assign(__assign({}, defaultStyles), { separator: {
22
22
  width: '100%',
23
23
  height: theme.spacing.value(1),
24
+ }, content: {
25
+ flexGrow: 1,
24
26
  } });
25
- }),
26
- };
27
+ }) });
27
28
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/List/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAAkE;AAIlE,IAAM,eAAe,GAAG,IAAA,oCAA2B,GAAmB,CAAA;AAEzD,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,eAAe,CAAC,UAAC,KAAK;QAC7B,IAAM,aAAa,GAAG,qBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACjD,6BACK,aAAa,KAChB,SAAS,EAAE;gBACT,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;aAC/B,IACF;IACH,CAAC,CAAC;CACH,CAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/List/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8E;AAC9E,2CAAkE;AAIlE,IAAM,eAAe,GAAG,IAAA,oCAA2B,GAAmB,CAAA;AAEtE,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAA,KAAK,IAAI,OAAA,eAAe,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAApB,CAAoB,CAAC,EAA3C,CAA2C,CAAC,CAAA;AAEvE,QAAA,UAAU,yBAClB,OAAO,KACV,OAAO,EAAE,eAAe,CAAC,UAAC,KAAK;QAC7B,IAAM,aAAa,GAAG,qBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACjD,6BACK,aAAa,KAChB,SAAS,EAAE;gBACT,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;aAC/B,EACD,OAAO,EAAE;gBACP,QAAQ,EAAE,CAAC;aACZ,IACF;IACH,CAAC,CAAC,IACH"}
@@ -23,6 +23,7 @@ export declare type ModalProps = Omit<ViewProps, 'variants' | 'styles'> & {
23
23
  visible: boolean;
24
24
  toggle?: () => void;
25
25
  zIndex?: number;
26
+ description?: React.ReactElement;
26
27
  scroll?: boolean;
27
28
  header?: React.ReactElement;
28
29
  closeOnHardwareBackPress?: boolean;
@@ -36,6 +37,7 @@ export declare type ModalHeaderProps = Omit<ModalProps, 'styles' | 'renderHeader
36
37
  title: TextProps['style'];
37
38
  closeButton: ButtonProps['styles'];
38
39
  };
40
+ description?: React.ReactElement;
39
41
  };
40
42
  export declare const Modal: React.FC<ModalProps>;
41
43
  export default Modal;
@@ -51,7 +51,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.Modal = void 0;
52
52
  var React = __importStar(require("react"));
53
53
  var View_1 = require("../View");
54
- var Button_1 = require("../Button");
55
54
  var Scroll_1 = require("../Scroll");
56
55
  var common_1 = require("@codeleap/common");
57
56
  var react_native_1 = require("react-native");
@@ -60,14 +59,15 @@ var Backdrop_1 = require("../Backdrop");
60
59
  var hooks_1 = require("../../utils/hooks");
61
60
  var Text_1 = require("../Text");
62
61
  var Touchable_1 = require("../Touchable");
62
+ var ActionIcon_1 = require("../ActionIcon");
63
63
  __exportStar(require("./styles"), exports);
64
64
  var DefaultHeader = function (props) {
65
- var styles = props.styles, _a = props.title, title = _a === void 0 ? null : _a, _b = props.showClose, showClose = _b === void 0 ? false : _b, closable = props.closable, debugName = props.debugName, _c = props.closeIconName, closeIconName = _c === void 0 ? 'close' : _c, toggle = props.toggle;
65
+ var styles = props.styles, _a = props.title, title = _a === void 0 ? null : _a, _b = props.showClose, showClose = _b === void 0 ? false : _b, _c = props.description, description = _c === void 0 ? null : _c, closable = props.closable, debugName = props.debugName, _d = props.closeIconName, closeIconName = _d === void 0 ? 'close' : _d, toggle = props.toggle;
66
66
  return <>
67
- {(title || showClose) && (<View_1.View style={styles.wrapper}>
67
+ {(title || showClose || description) && (<View_1.View style={styles.wrapper}>
68
68
  {typeof title === 'string' ? (<Text_1.Text text={title} style={styles.title}/>) : (title)}
69
69
 
70
- {(showClose && closable) && (<Button_1.Button debugName={"".concat(debugName, " modal close button")} icon={closeIconName} variants={['icon']} onPress={toggle} styles={styles.closeButton}/>)}
70
+ {(showClose && closable) && (<ActionIcon_1.ActionIcon debugName={"".concat(debugName, " modal close button")} icon={closeIconName} onPress={toggle} styles={styles.closeButton}/>)}
71
71
  </View_1.View>)}</>;
72
72
  };
73
73
  var Modal = function (modalProps) {
@@ -95,7 +95,7 @@ var Modal = function (modalProps) {
95
95
  var wrapperStyle = getStyles('wrapper');
96
96
  var ScrollComponent = scroll ? Scroll_1.Scroll : View_1.View;
97
97
  var scrollStyle = scroll ? getStyles('scroll') : getStyles('innerWrapper');
98
- var headerProps = __assign(__assign({}, modalProps), { styles: {
98
+ var headerProps = __assign(__assign({}, modalProps), { closable: closable, styles: {
99
99
  wrapper: getStyles('header'),
100
100
  title: getStyles('title'),
101
101
  closeButton: buttonStyles,
@@ -116,13 +116,15 @@ var Modal = function (modalProps) {
116
116
  }} wrapperProps={{
117
117
  transition: __assign({}, variantStyles['backdrop:transition']),
118
118
  }}/>
119
- <ScrollComponent style={scrollStyle} contentContainerStyle={getStyles('scrollContent')} keyboardAware={{
120
- adapt: 'marginBottom',
119
+ <ScrollComponent style={scrollStyle} contentContainerStyle={getStyles('scrollContent')} showsVerticalScrollIndicator={false} keyboardAware={{
120
+ adapt: 'maxHeight',
121
121
  baseStyleProp: 'style',
122
122
  animated: true,
123
123
  enabled: visible,
124
- enableOnAndroid: true,
125
- }} animated {...scrollProps}>
124
+ // enableOnAndroid: true,
125
+ }} animated
126
+ // ref={scrollRef}
127
+ {...scrollProps}>
126
128
  {dismissOnBackdrop &&
127
129
  <Touchable_1.Touchable onPress={closable ? toggle : (function () { })} debounce={400} debugName={'Modal backdrop touchable'} style={variantStyles.backdropTouchable} android_ripple={null} noFeedback/>}
128
130