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.
@@ -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) => import("react").JSX.Element;
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}></react_native_1.View>
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.text }, theme.typography.p1),
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,
@@ -93,6 +93,7 @@ const useStyles = (canGoBack, isModal) => (0, hooks_1.useThemedStyle)((0, react_
93
93
  backButton: {
94
94
  height: "100%",
95
95
  marginLeft: theme.size.baseSize * 4,
96
+ color: theme.colors.foregroundHighContrast,
96
97
  },
97
98
  titleComponentContainer: {
98
99
  flex: 1,
@@ -15,4 +15,5 @@ export * from "./RadioOptionItem";
15
15
  export * from "./RadioOptionInput";
16
16
  export * from "./Chevron";
17
17
  export * from "./CheckboxOptionInput";
18
+ export * from "./CheckboxOptionItem";
18
19
  export * from "./Forms";
@@ -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.textPrimary,
24
+ color: theme.colors.foregroundHighContrast,
25
25
  },
26
26
  }), []));
27
27
  exports.useMenuItemStyles = useMenuItemStyles;
@@ -1,2 +1,2 @@
1
- import { AtlasTheme } from '../types';
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 = 'System';
5
- const fontWeight = '700';
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: '900',
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: '200',
41
+ fontWeight: "200",
42
42
  },
43
43
  p3: {
44
44
  fontSize: 10,
45
45
  lineHeight: 16,
46
46
  fontFamily,
47
- fontWeight: '200',
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: 'light',
56
+ keyboardAppearance: "light",
57
57
  colors: {
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',
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
- modalBackground: '#f6f6f6',
77
- primary: '#21b473',
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
  };
@@ -1,12 +1,12 @@
1
- import { StatusBarStyle, TextInputProps } from 'react-native';
2
- import { Typography } from './typography';
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['keyboardAppearance'];
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 = 'h1xl' | 'h1' | 'h2' | 'h3' | 'p1' | 'p2' | 'p3';
2
- export type FontWeights = '200' | '300' | '400' | '500' | '700' | '800' | '900';
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
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",