atlas-design-system 1.18.1 → 1.18.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.
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { IOSNativeProps, AndroidNativeProps } from "@react-native-community/datetimepicker";
3
+ import { StyleProp, ViewStyle } from "react-native";
4
+ export type DateTimeInputProps = {
5
+ label: string;
6
+ caption?: string;
7
+ value: Date;
8
+ onChange?: (date: Date) => void;
9
+ onSave?: (date: Date) => void;
10
+ disabled?: boolean;
11
+ testID?: string;
12
+ containerStyle?: StyleProp<ViewStyle>;
13
+ mode?: IOSNativeProps["mode"] | AndroidNativeProps["mode"];
14
+ error?: string;
15
+ display?: IOSNativeProps["display"] | AndroidNativeProps["display"];
16
+ };
17
+ declare const DateTimeInput: ({ value, onChange, testID, containerStyle, label, caption, mode, error, disabled, onSave, }: DateTimeInputProps) => React.JSX.Element;
18
+ export default DateTimeInput;
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const datetimepicker_1 = __importDefault(require("@react-native-community/datetimepicker"));
31
+ const react_native_1 = require("react-native");
32
+ const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
33
+ const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
34
+ const moment_1 = __importDefault(require("moment"));
35
+ const Sheet_1 = __importDefault(require("../Sheet"));
36
+ const Text_1 = __importDefault(require("../Text"));
37
+ const MenuItemDescription_1 = require("../MenuItemDescription");
38
+ const hooks_1 = require("../../hooks");
39
+ const Button_1 = __importDefault(require("../Button"));
40
+ const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
41
+ const FieldError_1 = require("../FieldError/FieldError");
42
+ const animations_1 = require("../../constants/animations");
43
+ const constants_1 = require("../../constants");
44
+ const useInputFieldFontSizeInterpolationOutputRange_1 = require("../../hooks/useInputFieldFontSizeInterpolationOutputRange");
45
+ const getFormat = (mode) => {
46
+ switch (mode) {
47
+ case "date": {
48
+ return "MMM D, YYYY";
49
+ }
50
+ case "time": {
51
+ return "h:mm A";
52
+ }
53
+ case "datetime":
54
+ default: {
55
+ return "MMM D, YYYY h:mm A";
56
+ }
57
+ }
58
+ };
59
+ const DateTimeInput = ({ value, onChange, testID, containerStyle, label, caption, mode = "date", error, disabled = false, onSave, }) => {
60
+ const { styles, theme } = useStyles(disabled);
61
+ const [dateSheetOpen, setDateSheetOpen] = (0, react_1.useState)(false);
62
+ const [date, setDate] = (0, react_1.useState)(value);
63
+ const isInitialMount = (0, react_1.useRef)(true);
64
+ (0, react_1.useEffect)(() => {
65
+ if (dateSheetOpen) {
66
+ return;
67
+ }
68
+ setDate(value);
69
+ }, [dateSheetOpen, value]);
70
+ const animatedValue = (0, react_native_reanimated_1.useSharedValue)(value ? 1 : 0);
71
+ const { animatedBorderStyle, setBorderColor } = (0, useInputFieldAnimatedBorder_1.useInputFieldAnimatedBorder)(styles.itemContainer.borderColor);
72
+ (0, react_1.useEffect)(() => {
73
+ if (isInitialMount.current) {
74
+ // skip animation on initial mount we already have the value
75
+ isInitialMount.current = false;
76
+ animatedValue.value = value ? 1 : 0;
77
+ return;
78
+ }
79
+ else {
80
+ // After initial mount, animate the value changes
81
+ animatedValue.value = (0, react_native_reanimated_1.withTiming)(value ? 1 : 0, animations_1.DEFAULT_TIMING_CONFIG);
82
+ }
83
+ }, [value]);
84
+ (0, react_1.useEffect)(() => {
85
+ if (error) {
86
+ setBorderColor(styles.itemContainerError.borderColor);
87
+ return;
88
+ }
89
+ setBorderColor(dateSheetOpen
90
+ ? styles.itemContainerFocused.borderColor
91
+ : styles.itemContainer.borderColor);
92
+ }, [error, dateSheetOpen]);
93
+ const labelFontSizeInterpolationOutputRange = (0, useInputFieldFontSizeInterpolationOutputRange_1.useInputFieldFontSizeInterpolationOutputRange)();
94
+ const animatedLabelStyles = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
95
+ return {
96
+ transform: [
97
+ {
98
+ translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, animations_1.LABEL_INTERPOLATION_OUTPUT_RANGE),
99
+ },
100
+ ],
101
+ fontSize: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, labelFontSizeInterpolationOutputRange),
102
+ };
103
+ }, [labelFontSizeInterpolationOutputRange]);
104
+ const animatedValueStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
105
+ return {
106
+ flex: 1,
107
+ transform: [
108
+ {
109
+ translateY: animatedValue.value * animations_1.ANIMATED_VALUE_TRANSLATE_Y_MULTIPLIER,
110
+ },
111
+ ],
112
+ };
113
+ });
114
+ return (<>
115
+ <react_native_1.View testID={testID} style={[styles.container, containerStyle]}>
116
+ <react_native_1.TouchableOpacity onPress={() => setDateSheetOpen(true)} disabled={disabled}>
117
+ <react_native_reanimated_1.default.View style={[styles.itemContainer, animatedBorderStyle]}>
118
+ <react_native_1.View pointerEvents="none" style={styles.labelContainer}>
119
+ <react_native_reanimated_1.default.Text style={[styles.label, animatedLabelStyles]}>
120
+ {label}
121
+ </react_native_reanimated_1.default.Text>
122
+ </react_native_1.View>
123
+ <react_native_reanimated_1.default.View style={animatedValueStyle}>
124
+ <Text_1.default contrast="low" style={styles.value}>
125
+ {(0, moment_1.default)(value).format(getFormat(mode)).toString()}
126
+ </Text_1.default>
127
+ </react_native_reanimated_1.default.View>
128
+ <Ionicons_1.default color={!disabled
129
+ ? theme.colors.foreground
130
+ : theme.colors.foregroundLowContrast} name={mode === "time" ? "time-outline" : "calendar-outline"} size={20}/>
131
+ </react_native_reanimated_1.default.View>
132
+ </react_native_1.TouchableOpacity>
133
+ {!!error && <FieldError_1.FieldError error={error}/>}
134
+ {!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
135
+ </react_native_1.View>
136
+ <Sheet_1.default disableScroll header={label} open={dateSheetOpen} setOpen={setDateSheetOpen} footerPadding={70} footer={<Button_1.default text="Save" onPress={() => {
137
+ onSave === null || onSave === void 0 ? void 0 : onSave(date);
138
+ setDateSheetOpen(false);
139
+ }}/>}>
140
+ <react_native_1.View style={styles.pickerContainer}>
141
+ <datetimepicker_1.default value={date} style={styles.datePicker} mode={mode} themeVariant={theme.isDarkTheme ? "dark" : "light"} display="spinner" onChange={(_, newDate) => {
142
+ if (!newDate) {
143
+ return;
144
+ }
145
+ setDate(newDate);
146
+ onChange === null || onChange === void 0 ? void 0 : onChange(newDate);
147
+ }}/>
148
+ </react_native_1.View>
149
+ </Sheet_1.default>
150
+ </>);
151
+ };
152
+ exports.default = DateTimeInput;
153
+ const useStyles = (disabled) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
154
+ container: {},
155
+ pickerContainer: {
156
+ justifyContent: "center",
157
+ alignItems: "center",
158
+ height: t.size.baseSize * 40,
159
+ },
160
+ datePicker: {
161
+ flex: 1,
162
+ },
163
+ itemContainer: {
164
+ backgroundColor: t.colors.backgroundOnPrimary,
165
+ borderRadius: t.borderRadius,
166
+ paddingHorizontal: t.size.baseSize * 2,
167
+ minHeight: t.size.baseSize * constants_1.FIELD_HEIGHT_MULTIPLIER,
168
+ flexDirection: "row",
169
+ justifyContent: "space-between",
170
+ alignItems: "center",
171
+ borderColor: t.colors.backgroundOnPrimary,
172
+ borderWidth: t.borderWidth,
173
+ height: t.size.baseSize * constants_1.FIELD_HEIGHT_MULTIPLIER,
174
+ },
175
+ itemContainerError: {
176
+ borderColor: t.colors.foregroundNegative,
177
+ },
178
+ itemContainerFocused: {
179
+ borderColor: t.colors.border,
180
+ },
181
+ labelContainer: {
182
+ left: t.size.baseSize * 2,
183
+ position: "absolute",
184
+ },
185
+ label: Object.assign({ color: !disabled
186
+ ? t.colors.foregroundHighContrast
187
+ : t.colors.foregroundLowContrast }, t.typography.p1),
188
+ value: {
189
+ paddingHorizontal: t.size.baseSize * 0,
190
+ },
191
+ }), [disabled]));
@@ -1,18 +1,2 @@
1
- import React from "react";
2
- import { IOSNativeProps, AndroidNativeProps } from "@react-native-community/datetimepicker";
3
- import { StyleProp, ViewStyle } from "react-native";
4
- export type DateTimeInputProps = {
5
- label: string;
6
- caption?: string;
7
- value: Date;
8
- onChange?: (date: Date) => void;
9
- onSave?: (date: Date) => void;
10
- disabled?: boolean;
11
- testID?: string;
12
- containerStyle?: StyleProp<ViewStyle>;
13
- mode?: IOSNativeProps["mode"] | AndroidNativeProps["mode"];
14
- error?: string;
15
- display?: IOSNativeProps["display"] | AndroidNativeProps["display"];
16
- };
17
- export declare const DateTimeInput: ({ value, onChange, testID, containerStyle, label, caption, mode, error, disabled, onSave, }: DateTimeInputProps) => React.JSX.Element;
18
- export default DateTimeInput;
1
+ export * from "./DateTimeInput";
2
+ export { default as DateTimeInput } from "./DateTimeInput";
@@ -10,177 +10,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
15
  };
25
16
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
18
  };
28
19
  Object.defineProperty(exports, "__esModule", { value: true });
29
20
  exports.DateTimeInput = void 0;
30
- const react_1 = __importStar(require("react"));
31
- const datetimepicker_1 = __importDefault(require("@react-native-community/datetimepicker"));
32
- const react_native_1 = require("react-native");
33
- const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
34
- const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
35
- const moment_1 = __importDefault(require("moment"));
36
- const Sheet_1 = __importDefault(require("../Sheet"));
37
- const Text_1 = __importDefault(require("../Text"));
38
- const MenuItemDescription_1 = require("../MenuItemDescription");
39
- const hooks_1 = require("../../hooks");
40
- const Button_1 = __importDefault(require("../Button"));
41
- const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
42
- const FieldError_1 = require("../FieldError/FieldError");
43
- const animations_1 = require("../../constants/animations");
44
- const constants_1 = require("../../constants");
45
- const useInputFieldFontSizeInterpolationOutputRange_1 = require("../../hooks/useInputFieldFontSizeInterpolationOutputRange");
46
- const getFormat = (mode) => {
47
- switch (mode) {
48
- case "date": {
49
- return "MMM D, YYYY";
50
- }
51
- case "time": {
52
- return "h:mm A";
53
- }
54
- case "datetime":
55
- default: {
56
- return "MMM D, YYYY h:mm A";
57
- }
58
- }
59
- };
60
- const DateTimeInput = ({ value, onChange, testID, containerStyle, label, caption, mode = "date", error, disabled = false, onSave, }) => {
61
- const { styles, theme } = useStyles(disabled);
62
- const [dateSheetOpen, setDateSheetOpen] = (0, react_1.useState)(false);
63
- const [date, setDate] = (0, react_1.useState)(value);
64
- const isInitialMount = (0, react_1.useRef)(true);
65
- (0, react_1.useEffect)(() => {
66
- if (dateSheetOpen) {
67
- return;
68
- }
69
- setDate(value);
70
- }, [dateSheetOpen, value]);
71
- const animatedValue = (0, react_native_reanimated_1.useSharedValue)(value ? 1 : 0);
72
- const { animatedBorderStyle, setBorderColor } = (0, useInputFieldAnimatedBorder_1.useInputFieldAnimatedBorder)(styles.itemContainer.borderColor);
73
- (0, react_1.useEffect)(() => {
74
- if (isInitialMount.current) {
75
- // skip animation on initial mount we already have the value
76
- isInitialMount.current = false;
77
- animatedValue.value = value ? 1 : 0;
78
- return;
79
- }
80
- else {
81
- // After initial mount, animate the value changes
82
- animatedValue.value = (0, react_native_reanimated_1.withTiming)(value ? 1 : 0, animations_1.DEFAULT_TIMING_CONFIG);
83
- }
84
- }, [value]);
85
- (0, react_1.useEffect)(() => {
86
- if (error) {
87
- setBorderColor(styles.itemContainerError.borderColor);
88
- return;
89
- }
90
- setBorderColor(dateSheetOpen
91
- ? styles.itemContainerFocused.borderColor
92
- : styles.itemContainer.borderColor);
93
- }, [error, dateSheetOpen]);
94
- const labelFontSizeInterpolationOutputRange = (0, useInputFieldFontSizeInterpolationOutputRange_1.useInputFieldFontSizeInterpolationOutputRange)();
95
- const animatedLabelStyles = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
96
- return {
97
- transform: [
98
- {
99
- translateY: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, animations_1.LABEL_INTERPOLATION_OUTPUT_RANGE),
100
- },
101
- ],
102
- fontSize: (0, react_native_reanimated_1.interpolate)(animatedValue.value, animations_1.LABEL_INTERPOLATION_RANGE, labelFontSizeInterpolationOutputRange),
103
- };
104
- }, [labelFontSizeInterpolationOutputRange]);
105
- const animatedValueStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
106
- return {
107
- flex: 1,
108
- transform: [
109
- {
110
- translateY: animatedValue.value * animations_1.ANIMATED_VALUE_TRANSLATE_Y_MULTIPLIER,
111
- },
112
- ],
113
- };
114
- });
115
- return (<>
116
- <react_native_1.View testID={testID} style={[styles.container, containerStyle]}>
117
- <react_native_1.TouchableOpacity onPress={() => setDateSheetOpen(true)} disabled={disabled}>
118
- <react_native_reanimated_1.default.View style={[styles.itemContainer, animatedBorderStyle]}>
119
- <react_native_1.View pointerEvents="none" style={styles.labelContainer}>
120
- <react_native_reanimated_1.default.Text style={[styles.label, animatedLabelStyles]}>
121
- {label}
122
- </react_native_reanimated_1.default.Text>
123
- </react_native_1.View>
124
- <react_native_reanimated_1.default.View style={animatedValueStyle}>
125
- <Text_1.default contrast="low" style={styles.value}>
126
- {(0, moment_1.default)(value).format(getFormat(mode)).toString()}
127
- </Text_1.default>
128
- </react_native_reanimated_1.default.View>
129
- <Ionicons_1.default color={!disabled
130
- ? theme.colors.foreground
131
- : theme.colors.foregroundLowContrast} name={mode === "time" ? "time-outline" : "calendar-outline"} size={20}/>
132
- </react_native_reanimated_1.default.View>
133
- </react_native_1.TouchableOpacity>
134
- {!!error && <FieldError_1.FieldError error={error}/>}
135
- {!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
136
- </react_native_1.View>
137
- <Sheet_1.default disableScroll header={label} open={dateSheetOpen} setOpen={setDateSheetOpen} footer={<Button_1.default text="Save" onPress={() => {
138
- onSave === null || onSave === void 0 ? void 0 : onSave(date);
139
- setDateSheetOpen(false);
140
- }}/>}>
141
- <datetimepicker_1.default value={date} style={styles.datePicker} mode={mode} themeVariant={theme.isDarkTheme ? "dark" : "light"} display="spinner" onChange={(_, newDate) => {
142
- if (!newDate) {
143
- return;
144
- }
145
- setDate(newDate);
146
- onChange === null || onChange === void 0 ? void 0 : onChange(newDate);
147
- }}/>
148
- </Sheet_1.default>
149
- </>);
150
- };
151
- exports.DateTimeInput = DateTimeInput;
152
- exports.default = exports.DateTimeInput;
153
- const useStyles = (disabled) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
154
- container: {},
155
- datePicker: {
156
- height: t.size.baseSize * 60,
157
- },
158
- itemContainer: {
159
- backgroundColor: t.colors.backgroundOnPrimary,
160
- borderRadius: t.borderRadius,
161
- paddingHorizontal: t.size.baseSize * 2,
162
- minHeight: t.size.baseSize * constants_1.FIELD_HEIGHT_MULTIPLIER,
163
- flexDirection: "row",
164
- justifyContent: "space-between",
165
- alignItems: "center",
166
- borderColor: t.colors.backgroundOnPrimary,
167
- borderWidth: t.borderWidth,
168
- height: t.size.baseSize * constants_1.FIELD_HEIGHT_MULTIPLIER,
169
- },
170
- itemContainerError: {
171
- borderColor: t.colors.foregroundNegative,
172
- },
173
- itemContainerFocused: {
174
- borderColor: t.colors.border,
175
- },
176
- labelContainer: {
177
- left: t.size.baseSize * 2,
178
- position: "absolute",
179
- },
180
- label: Object.assign({ color: !disabled
181
- ? t.colors.foregroundHighContrast
182
- : t.colors.foregroundLowContrast }, t.typography.p1),
183
- value: {
184
- paddingHorizontal: t.size.baseSize * 0,
185
- },
186
- }), [disabled]));
21
+ __exportStar(require("./DateTimeInput"), exports);
22
+ var DateTimeInput_1 = require("./DateTimeInput");
23
+ Object.defineProperty(exports, "DateTimeInput", { enumerable: true, get: function () { return __importDefault(DateTimeInput_1).default; } });
@@ -10,6 +10,7 @@ type Props = {
10
10
  transparent?: boolean;
11
11
  disableScroll?: boolean;
12
12
  footer?: React.ReactNode;
13
+ footerPadding?: number;
13
14
  };
14
- export declare const Sheet: ({ open, setOpen, children, containerStyle, defaultMargins, header, transparent, disableScroll, footer, }: Props) => React.JSX.Element | null;
15
+ export declare const Sheet: ({ open, setOpen, children, containerStyle, defaultMargins, header, transparent, disableScroll, footer, footerPadding, }: Props) => React.JSX.Element | null;
15
16
  export default Sheet;
@@ -34,9 +34,9 @@ const react_native_safe_area_context_1 = require("react-native-safe-area-context
34
34
  const useThemedStyle_1 = require("../../hooks/useThemedStyle");
35
35
  const Text_1 = __importDefault(require("../Text"));
36
36
  const BACKGROUND_OPACITY = 0.6;
37
- const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true, header, transparent = false, disableScroll = false, footer, }) => {
38
- const [footerHeight, setFooterHeight] = (0, react_1.useState)(0);
39
- const styles = useStyles(defaultMargins, footerHeight).styles;
37
+ const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true, header, transparent = false, disableScroll = false, footer, footerPadding = 0, }) => {
38
+ const [footerHeight, setFooterHeight] = (0, react_1.useState)(footerPadding);
39
+ const styles = useStyles(defaultMargins, footerPadding ? footerPadding : footerHeight).styles;
40
40
  const [visible, setVisible] = (0, react_1.useState)(open);
41
41
  const opacity = (0, react_native_reanimated_1.useSharedValue)(0);
42
42
  (0, react_1.useEffect)(() => {
@@ -74,14 +74,22 @@ const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true,
74
74
  {!!header && (<react_native_1.View style={styles.headerContainer}>
75
75
  <Text_1.default>{header}</Text_1.default>
76
76
  </react_native_1.View>)}
77
- <react_native_1.ScrollView scrollEnabled={!disableScroll} contentContainerStyle={[
78
- styles.contentContainer,
79
- !!footer && styles.containerWithFooter,
80
- ]}>
81
- {children}
82
- </react_native_1.ScrollView>
77
+ {!disableScroll && (<react_native_1.ScrollView scrollEnabled={!disableScroll} contentContainerStyle={[
78
+ styles.contentContainer,
79
+ !!footer && styles.containerWithFooter,
80
+ ]}>
81
+ {children}
82
+ </react_native_1.ScrollView>)}
83
+ {disableScroll && (<react_native_1.View style={[
84
+ styles.contentContainer,
85
+ !!footer && styles.containerWithFooter,
86
+ ]}>
87
+ {children}
88
+ </react_native_1.View>)}
83
89
  {!!footer && (<react_native_1.View onLayout={(e) => {
84
- setFooterHeight(e.nativeEvent.layout.height);
90
+ if (footerPadding === 0) {
91
+ setFooterHeight(e.nativeEvent.layout.height);
92
+ }
85
93
  }} style={styles.footer}>
86
94
  {footer}
87
95
  </react_native_1.View>)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "description": "A react native design system for the Atlas workout app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",