atlas-design-system 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/DateTimeInput/index.d.ts +2 -1
- package/dist/components/DateTimeInput/index.js +1 -4
- package/dist/components/DragHandle/index.js +1 -1
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +1 -1
- package/dist/components/Forms/FormSelectInput/FormSelectInput.js +1 -1
- package/dist/components/NavigationListRow/index.js +1 -3
- package/dist/components/RadioOptionItem/RadioOptionItem.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +2 -2
- package/dist/components/SelectInput/SelectInput.js +2 -2
- package/dist/components/TitleBar/TitleBar.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/shared/styles/index.js +1 -1
- package/dist/themes/AtlasLightTheme.d.ts +1 -1
- package/dist/themes/AtlasLightTheme.js +23 -34
- package/dist/types/theme.d.ts +3 -14
- package/dist/types/typography.d.ts +2 -2
- package/package.json +1 -1
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Button = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
|
-
const ButtonStyle_1 = require("./styles/ButtonStyle");
|
|
10
9
|
const Text_1 = __importDefault(require("../Text"));
|
|
10
|
+
const ButtonStyle_1 = require("./styles/ButtonStyle");
|
|
11
11
|
const Button = ({ testID, disabled = false, onPress, text, loading, containerStyle = {}, appearance = "primary", }) => {
|
|
12
12
|
const { buttonStyle, styles, textStyle } = (0, ButtonStyle_1.useButtonStyles)(appearance, disabled);
|
|
13
13
|
return (<react_native_1.TouchableOpacity testID={testID} style={[buttonStyle, containerStyle]} onPress={onPress} disabled={disabled || loading}>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { IOSNativeProps, AndroidNativeProps } from "@react-native-community/datetimepicker";
|
|
2
3
|
import { StyleProp, ViewStyle } from "react-native";
|
|
3
4
|
export type DateTimeInputProps = {
|
|
@@ -13,5 +14,5 @@ export type DateTimeInputProps = {
|
|
|
13
14
|
error?: string;
|
|
14
15
|
display?: IOSNativeProps["display"] | AndroidNativeProps["display"];
|
|
15
16
|
};
|
|
16
|
-
export declare const DateTimeInput: ({ value, onChange, testID, containerStyle, label, caption, mode, error, disabled, onSave, }: DateTimeInputProps) =>
|
|
17
|
+
export declare const DateTimeInput: ({ value, onChange, testID, containerStyle, label, caption, mode, error, disabled, onSave, }: DateTimeInputProps) => React.JSX.Element;
|
|
17
18
|
export default DateTimeInput;
|
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.DateTimeInput = void 0;
|
|
30
|
-
const react_1 = require("react");
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
31
|
const datetimepicker_1 = __importDefault(require("@react-native-community/datetimepicker"));
|
|
32
32
|
const react_native_1 = require("react-native");
|
|
33
33
|
const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
@@ -148,9 +148,6 @@ const useStyles = (disabled) => (0, hooks_1.useThemedStyle)((0, react_1.useCallb
|
|
|
148
148
|
itemContainerFocused: {
|
|
149
149
|
borderColor: t.colors.border,
|
|
150
150
|
},
|
|
151
|
-
itemLabel: {
|
|
152
|
-
color: t.textPrimary,
|
|
153
|
-
},
|
|
154
151
|
labelContainer: {
|
|
155
152
|
left: t.size.baseSize * 2,
|
|
156
153
|
position: "absolute",
|
|
@@ -35,7 +35,7 @@ const SIZE_MAP = {
|
|
|
35
35
|
const DragHandle = ({ size = "medium" }) => {
|
|
36
36
|
const styles = useStyles(size).styles;
|
|
37
37
|
return (<react_native_1.View style={styles.container}>
|
|
38
|
-
<react_native_1.View style={styles.handle}
|
|
38
|
+
<react_native_1.View style={styles.handle}/>
|
|
39
39
|
</react_native_1.View>);
|
|
40
40
|
};
|
|
41
41
|
exports.DragHandle = DragHandle;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FormSegmentedControl = FormSegmentedControl;
|
|
7
7
|
const informed_1 = require("informed");
|
|
8
|
-
const SegmentedControl_1 = __importDefault(require("../../SegmentedControl"));
|
|
9
8
|
const react_1 = require("react");
|
|
9
|
+
const SegmentedControl_1 = __importDefault(require("../../SegmentedControl"));
|
|
10
10
|
function FormSegmentedControl(props) {
|
|
11
11
|
const { render, userProps, fieldApi, informed, fieldState } = (0, informed_1.useField)(Object.assign({}, props));
|
|
12
12
|
const { value } = informed;
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FormSelectInput = FormSelectInput;
|
|
7
7
|
const informed_1 = require("informed");
|
|
8
|
-
const SelectInput_1 = __importDefault(require("../../SelectInput"));
|
|
9
8
|
const react_1 = require("react");
|
|
9
|
+
const SelectInput_1 = __importDefault(require("../../SelectInput"));
|
|
10
10
|
function FormSelectInput(props) {
|
|
11
11
|
const { render, userProps, fieldApi, informed, fieldState } = (0, informed_1.useField)(Object.assign({}, props));
|
|
12
12
|
const { value } = informed;
|
|
@@ -57,8 +57,6 @@ const useStyles = (defaultPadding) => (0, useThemedStyle_1.useThemedStyle)((0, r
|
|
|
57
57
|
chevronRight: {
|
|
58
58
|
height: "100%",
|
|
59
59
|
flexGrow: 0,
|
|
60
|
-
|
|
61
|
-
chevronRightTint: {
|
|
62
|
-
color: t.colors.foregroundLowContrast,
|
|
60
|
+
color: t.colors.foregroundHighContrast,
|
|
63
61
|
},
|
|
64
62
|
}), [defaultPadding]));
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.RadioOptionItem = RadioOptionItem;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
|
-
const Text_1 = __importDefault(require("../Text"));
|
|
10
9
|
const hooks_1 = require("../../hooks");
|
|
10
|
+
const Text_1 = __importDefault(require("../Text"));
|
|
11
11
|
function RadioOptionItem({ option, onPress, renderItem, disabled, }) {
|
|
12
12
|
const { label, value, selected } = option;
|
|
13
13
|
const styles = useStyles(selected).styles;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SegmentedControl = SegmentedControl;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
|
-
const Text_1 = require("../Text");
|
|
6
|
-
const hooks_1 = require("../../hooks");
|
|
7
5
|
const react_1 = require("react");
|
|
6
|
+
const hooks_1 = require("../../hooks");
|
|
7
|
+
const Text_1 = require("../Text");
|
|
8
8
|
const FieldError_1 = require("../FieldError/FieldError");
|
|
9
9
|
const MenuItemDescription_1 = require("../MenuItemDescription");
|
|
10
10
|
function SegmentedControl({ label, options = [], silenceWarning, error, caption, onChange, }) {
|
|
@@ -35,8 +35,8 @@ const Sheet_1 = __importDefault(require("../Sheet"));
|
|
|
35
35
|
const MenuItemDescription_1 = require("../MenuItemDescription");
|
|
36
36
|
const hooks_1 = require("../../hooks");
|
|
37
37
|
const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
|
|
38
|
-
const SelectionItem_1 = __importDefault(require("./components/SelectionItem"));
|
|
39
38
|
const Chevron_1 = __importDefault(require("../Chevron"));
|
|
39
|
+
const SelectionItem_1 = __importDefault(require("./components/SelectionItem"));
|
|
40
40
|
function SelectInput({ caption, label, options = [], onChange, error, renderOption, containerStyle, }) {
|
|
41
41
|
const styles = useStyles().styles;
|
|
42
42
|
const value = (0, react_1.useMemo)(() => {
|
|
@@ -125,7 +125,7 @@ const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((th
|
|
|
125
125
|
left: theme.size.baseSize * 2,
|
|
126
126
|
position: "absolute",
|
|
127
127
|
},
|
|
128
|
-
label: Object.assign({ color: theme.
|
|
128
|
+
label: Object.assign({ color: theme.colors.foregroundHighContrast }, theme.typography.p1),
|
|
129
129
|
descriptionContainer: {
|
|
130
130
|
marginHorizontal: theme.size.baseSize * 4,
|
|
131
131
|
marginBottom: theme.size.baseSize * 2,
|
package/dist/components/index.js
CHANGED
|
@@ -31,5 +31,6 @@ __exportStar(require("./RadioOptionItem"), exports);
|
|
|
31
31
|
__exportStar(require("./RadioOptionInput"), exports);
|
|
32
32
|
__exportStar(require("./Chevron"), exports);
|
|
33
33
|
__exportStar(require("./CheckboxOptionInput"), exports);
|
|
34
|
+
__exportStar(require("./CheckboxOptionItem"), exports);
|
|
34
35
|
// Forms
|
|
35
36
|
__exportStar(require("./Forms"), exports);
|
|
@@ -21,7 +21,7 @@ const useMenuItemStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallb
|
|
|
21
21
|
height: theme.size.baseSize * 9,
|
|
22
22
|
},
|
|
23
23
|
itemLabel: {
|
|
24
|
-
color: theme.
|
|
24
|
+
color: theme.colors.foregroundHighContrast,
|
|
25
25
|
},
|
|
26
26
|
}), []));
|
|
27
27
|
exports.useMenuItemStyles = useMenuItemStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AtlasTheme } from
|
|
1
|
+
import { AtlasTheme } from "../types";
|
|
2
2
|
export declare const ATLAS_LIGHT: AtlasTheme;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ATLAS_LIGHT = void 0;
|
|
4
|
-
const fontFamily =
|
|
5
|
-
const fontWeight =
|
|
4
|
+
const fontFamily = "System";
|
|
5
|
+
const fontWeight = "700";
|
|
6
6
|
const typography = {
|
|
7
7
|
h1xl: {
|
|
8
8
|
fontSize: 32,
|
|
9
9
|
lineHeight: 36,
|
|
10
10
|
fontFamily,
|
|
11
|
-
fontWeight:
|
|
11
|
+
fontWeight: "900",
|
|
12
12
|
},
|
|
13
13
|
h1: {
|
|
14
14
|
fontSize: 24,
|
|
@@ -38,13 +38,13 @@ const typography = {
|
|
|
38
38
|
fontSize: 12,
|
|
39
39
|
lineHeight: 18,
|
|
40
40
|
fontFamily,
|
|
41
|
-
fontWeight:
|
|
41
|
+
fontWeight: "200",
|
|
42
42
|
},
|
|
43
43
|
p3: {
|
|
44
44
|
fontSize: 10,
|
|
45
45
|
lineHeight: 16,
|
|
46
46
|
fontFamily,
|
|
47
|
-
fontWeight:
|
|
47
|
+
fontWeight: "200",
|
|
48
48
|
},
|
|
49
49
|
};
|
|
50
50
|
exports.ATLAS_LIGHT = {
|
|
@@ -53,37 +53,26 @@ exports.ATLAS_LIGHT = {
|
|
|
53
53
|
},
|
|
54
54
|
borderWidth: 2,
|
|
55
55
|
borderRadius: 10,
|
|
56
|
-
keyboardAppearance:
|
|
56
|
+
keyboardAppearance: "light",
|
|
57
57
|
colors: {
|
|
58
|
-
primary:
|
|
59
|
-
primaryLowContrast:
|
|
60
|
-
secondaryPositive:
|
|
61
|
-
secondaryNegative:
|
|
62
|
-
secondaryWarning:
|
|
63
|
-
foreground:
|
|
64
|
-
foregroundHighContrast:
|
|
65
|
-
foregroundLowContrast:
|
|
66
|
-
foregroundPrimary:
|
|
67
|
-
foregroundNegative:
|
|
68
|
-
foregroundOnPrimary:
|
|
69
|
-
border:
|
|
70
|
-
borderSecondary:
|
|
71
|
-
backgroundPrimary:
|
|
72
|
-
backgroundOnPrimary:
|
|
58
|
+
primary: "#21b473",
|
|
59
|
+
primaryLowContrast: "#90d9b9",
|
|
60
|
+
secondaryPositive: "#02AD5D",
|
|
61
|
+
secondaryNegative: "#f55555",
|
|
62
|
+
secondaryWarning: "#FFC107",
|
|
63
|
+
foreground: "#2D2D2D",
|
|
64
|
+
foregroundHighContrast: "#0B0B0B",
|
|
65
|
+
foregroundLowContrast: "#8A8A8A",
|
|
66
|
+
foregroundPrimary: "#21b473",
|
|
67
|
+
foregroundNegative: "#f55555",
|
|
68
|
+
foregroundOnPrimary: "#fff",
|
|
69
|
+
border: "#898989",
|
|
70
|
+
borderSecondary: "#00000000",
|
|
71
|
+
backgroundPrimary: "#f1f1f1",
|
|
72
|
+
backgroundOnPrimary: "#e4e4e4",
|
|
73
73
|
},
|
|
74
74
|
typography,
|
|
75
75
|
isDarkTheme: false,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
text: '#000000',
|
|
79
|
-
textPrimary: '#000',
|
|
80
|
-
textSecondary: '#fff',
|
|
81
|
-
menuItemContainerBackground: '#e4e4e4',
|
|
82
|
-
background: '#ffffff',
|
|
83
|
-
LIGHT_BAR_STYLE: 'light-content',
|
|
84
|
-
DARK_BAR_STYLE: 'dark-content',
|
|
85
|
-
card: 'rgb(255, 255, 255)',
|
|
86
|
-
chevronForward: '#afb0b3',
|
|
87
|
-
workoutStatisticsBarItemBackground: '#EDEDED',
|
|
88
|
-
placeholderTextColor: '#8A8A8A',
|
|
76
|
+
LIGHT_BAR_STYLE: "light-content",
|
|
77
|
+
DARK_BAR_STYLE: "dark-content",
|
|
89
78
|
};
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { StatusBarStyle, TextInputProps } from
|
|
2
|
-
import { Typography } from
|
|
1
|
+
import { StatusBarStyle, TextInputProps } from "react-native";
|
|
2
|
+
import { Typography } from "./typography";
|
|
3
3
|
export type AtlasTheme = {
|
|
4
4
|
size: {
|
|
5
5
|
baseSize: number;
|
|
6
6
|
};
|
|
7
7
|
borderRadius: number;
|
|
8
8
|
borderWidth: number;
|
|
9
|
-
keyboardAppearance: TextInputProps[
|
|
9
|
+
keyboardAppearance: TextInputProps["keyboardAppearance"];
|
|
10
10
|
colors: {
|
|
11
11
|
primary: string;
|
|
12
12
|
primaryLowContrast: string;
|
|
@@ -24,19 +24,8 @@ export type AtlasTheme = {
|
|
|
24
24
|
backgroundPrimary: string;
|
|
25
25
|
backgroundOnPrimary: string;
|
|
26
26
|
};
|
|
27
|
-
background: string;
|
|
28
|
-
primary: string;
|
|
29
|
-
text: string;
|
|
30
|
-
modalBackground: string;
|
|
31
|
-
textPrimary: string;
|
|
32
|
-
textSecondary: string;
|
|
33
|
-
menuItemContainerBackground: string;
|
|
34
27
|
LIGHT_BAR_STYLE: string;
|
|
35
28
|
DARK_BAR_STYLE: StatusBarStyle;
|
|
36
29
|
isDarkTheme: boolean;
|
|
37
|
-
card: string;
|
|
38
|
-
chevronForward: string;
|
|
39
|
-
workoutStatisticsBarItemBackground: string;
|
|
40
|
-
placeholderTextColor: string;
|
|
41
30
|
typography: Typography;
|
|
42
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type TypographyVariants =
|
|
2
|
-
export type FontWeights =
|
|
1
|
+
export type TypographyVariants = "h1xl" | "h1" | "h2" | "h3" | "p1" | "p2" | "p3";
|
|
2
|
+
export type FontWeights = "200" | "300" | "400" | "500" | "700" | "800" | "900";
|
|
3
3
|
export interface TypographyStyles {
|
|
4
4
|
fontSize: number;
|
|
5
5
|
lineHeight: number;
|