atlas-design-system 1.12.0 → 1.14.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/CheckboxOptionInput/CheckboxOptionInput.js +2 -2
- package/dist/components/CheckboxOptionItem/CheckboxOptionItem.d.ts +1 -2
- package/dist/components/CheckboxOptionItem/index.d.ts +1 -1
- package/dist/components/CheckboxOptionItem/index.js +2 -2
- package/dist/components/DateTimeInput/index.d.ts +2 -1
- package/dist/components/DateTimeInput/index.js +2 -5
- package/dist/components/NavigationListRow/index.js +1 -3
- package/dist/components/SelectInput/SelectInput.js +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/TitleBar/TitleBar.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/package.json +1 -1
|
@@ -34,7 +34,7 @@ const Sheet_1 = __importDefault(require("../Sheet"));
|
|
|
34
34
|
const Text_1 = __importDefault(require("../Text"));
|
|
35
35
|
const Chevron_1 = __importDefault(require("../Chevron"));
|
|
36
36
|
const MenuItemDescription_1 = require("../MenuItemDescription");
|
|
37
|
-
const CheckboxOptionItem_1 =
|
|
37
|
+
const CheckboxOptionItem_1 = require("../CheckboxOptionItem");
|
|
38
38
|
const Button_1 = __importDefault(require("../Button"));
|
|
39
39
|
function CheckboxOptionInput({ caption, label, options = [], onChange, renderOption, renderValues, containerStyle = {}, placeholder = "No Option selected", }) {
|
|
40
40
|
const styles = useStyles().styles;
|
|
@@ -73,7 +73,7 @@ function CheckboxOptionInput({ caption, label, options = [], onChange, renderOpt
|
|
|
73
73
|
</react_native_1.View>
|
|
74
74
|
<Sheet_1.default header={label} open={sheetOpen} setOpen={setSheetOpen} footer={<Button_1.default text="Save" onPress={handleSave}/>}>
|
|
75
75
|
{options.map((option) => {
|
|
76
|
-
return renderOption ? (renderOption(option, handleOptionPress)) : (<CheckboxOptionItem_1.
|
|
76
|
+
return renderOption ? (renderOption(option, handleOptionPress)) : (<CheckboxOptionItem_1.CheckboxOptionItem option={Object.assign(Object.assign({}, option), { selected: !!values.find((v) => v === option.value) })} onPress={() => handleOptionPress(option)} key={option.label}/>);
|
|
77
77
|
})}
|
|
78
78
|
</Sheet_1.default>
|
|
79
79
|
</>);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Option } from "../SelectInput/types";
|
|
2
|
-
type CheckboxOptionItemProps<T> = {
|
|
2
|
+
export type CheckboxOptionItemProps<T> = {
|
|
3
3
|
option: Option<T>;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
onPress?: (value: T) => void;
|
|
6
6
|
renderItem?: (option: Option<T>) => React.ReactNode;
|
|
7
7
|
};
|
|
8
8
|
export default function CheckboxOptionItem<T>({ option, onPress, renderItem, disabled, }: CheckboxOptionItemProps<T>): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from "./CheckboxOptionItem";
|
|
1
|
+
export { default as CheckboxOptionItem } from "./CheckboxOptionItem";
|
|
2
2
|
export * from "./CheckboxOptionItem";
|
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.CheckboxOptionItem = void 0;
|
|
21
21
|
var CheckboxOptionItem_1 = require("./CheckboxOptionItem");
|
|
22
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "CheckboxOptionItem", { enumerable: true, get: function () { return __importDefault(CheckboxOptionItem_1).default; } });
|
|
23
23
|
__exportStar(require("./CheckboxOptionItem"), exports);
|
|
@@ -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,15 +148,12 @@ 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",
|
|
157
154
|
},
|
|
158
155
|
label: Object.assign({ color: !disabled
|
|
159
|
-
? t.colors.
|
|
156
|
+
? t.colors.foregroundHighContrast
|
|
160
157
|
: t.colors.foregroundLowContrast }, t.typography.p1),
|
|
161
158
|
iconRight: {},
|
|
162
159
|
value: {
|
|
@@ -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]));
|
|
@@ -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,
|
|
@@ -214,7 +214,7 @@ const useStyles = (disabled, error) => (0, hooks_1.useThemedStyle)((0, react_1.u
|
|
|
214
214
|
position: "absolute",
|
|
215
215
|
},
|
|
216
216
|
label: getLabelStyle(disabled, error, {
|
|
217
|
-
default: Object.assign({ color: theme.colors.
|
|
217
|
+
default: Object.assign({ color: theme.colors.foregroundHighContrast }, theme.typography.p1),
|
|
218
218
|
disabled: Object.assign({ color: theme.colors.foregroundLowContrast }, theme.typography.p1),
|
|
219
219
|
error: Object.assign({ color: theme.colors.foregroundNegative }, theme.typography.p1),
|
|
220
220
|
}),
|
|
@@ -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
|
};
|