atlas-design-system 2.0.2 → 2.0.4

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 (95) hide show
  1. package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
  2. package/dist/components/BottomSheet/BottomSheet.js +1 -3
  3. package/dist/components/BottomSheet/index.d.ts +1 -0
  4. package/dist/components/BottomSheet/index.js +8 -0
  5. package/dist/components/Button/Button.d.ts +2 -11
  6. package/dist/components/Button/Button.js +4 -6
  7. package/dist/components/Button/index.d.ts +2 -2
  8. package/dist/components/Button/index.js +3 -3
  9. package/dist/components/Button/styles/ButtonStyle.d.ts +1 -1
  10. package/dist/components/Button/types.d.ts +10 -0
  11. package/dist/components/Button/types.js +2 -0
  12. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts +1 -1
  13. package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js +10 -14
  14. package/dist/components/CheckboxOptionInput/index.d.ts +1 -2
  15. package/dist/components/CheckboxOptionInput/index.js +2 -17
  16. package/dist/components/CheckboxOptionItem/index.d.ts +0 -1
  17. package/dist/components/CheckboxOptionItem/index.js +0 -15
  18. package/dist/components/Chevron/index.d.ts +1 -2
  19. package/dist/components/Chevron/index.js +2 -17
  20. package/dist/components/DateTimeInput/DateTimeInput.js +7 -7
  21. package/dist/components/DateTimeInput/index.d.ts +1 -1
  22. package/dist/components/DateTimeInput/index.js +1 -1
  23. package/dist/components/DragHandle/DragHandle.d.ts +7 -0
  24. package/dist/components/DragHandle/DragHandle.js +53 -0
  25. package/dist/components/DragHandle/index.d.ts +1 -7
  26. package/dist/components/DragHandle/index.js +4 -51
  27. package/dist/components/Forms/Form/Form.d.ts +3 -4
  28. package/dist/components/Forms/Form/Form.js +3 -5
  29. package/dist/components/Forms/Form/index.d.ts +1 -1
  30. package/dist/components/Forms/Form/index.js +5 -14
  31. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts +1 -1
  32. package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js +2 -4
  33. package/dist/components/Forms/FormDateTimeInput/index.d.ts +1 -1
  34. package/dist/components/Forms/FormDateTimeInput/index.js +5 -14
  35. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts +3 -3
  36. package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +3 -6
  37. package/dist/components/Forms/FormSegmentedControl/index.d.ts +2 -1
  38. package/dist/components/Forms/FormSegmentedControl/index.js +5 -14
  39. package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts +3 -3
  40. package/dist/components/Forms/FormSelectInput/FormSelectInput.js +3 -6
  41. package/dist/components/Forms/FormSelectInput/index.d.ts +2 -1
  42. package/dist/components/Forms/FormSelectInput/index.js +5 -14
  43. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts +1 -1
  44. package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js +1 -3
  45. package/dist/components/Forms/FormSwitchToggle/index.d.ts +1 -1
  46. package/dist/components/Forms/FormSwitchToggle/index.js +5 -14
  47. package/dist/components/Forms/FormTextInput/FormTextInput.d.ts +1 -1
  48. package/dist/components/Forms/FormTextInput/FormTextInput.js +1 -3
  49. package/dist/components/Forms/FormTextInput/index.d.ts +1 -1
  50. package/dist/components/Forms/FormTextInput/index.js +5 -14
  51. package/dist/components/MenuItemDescription/MenuItemDescription.d.ts +3 -2
  52. package/dist/components/MenuItemDescription/MenuItemDescription.js +5 -9
  53. package/dist/components/MenuItemDescription/index.d.ts +1 -1
  54. package/dist/components/MenuItemDescription/index.js +5 -14
  55. package/dist/components/NavigationListRow/NavigationListRow.d.ts +14 -0
  56. package/dist/components/NavigationListRow/NavigationListRow.js +59 -0
  57. package/dist/components/NavigationListRow/index.d.ts +1 -14
  58. package/dist/components/NavigationListRow/index.js +2 -55
  59. package/dist/components/RadioOptionInput/RadioOptionInput.js +10 -13
  60. package/dist/components/RadioOptionInput/index.d.ts +0 -1
  61. package/dist/components/RadioOptionInput/index.js +0 -15
  62. package/dist/components/RadioOptionItem/RadioOptionItem.js +2 -5
  63. package/dist/components/RadioOptionItem/index.d.ts +1 -2
  64. package/dist/components/RadioOptionItem/index.js +2 -17
  65. package/dist/components/Search/index.d.ts +0 -1
  66. package/dist/components/Search/index.js +0 -15
  67. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  68. package/dist/components/SegmentedControl/SegmentedControl.js +0 -1
  69. package/dist/components/SegmentedControl/index.d.ts +1 -1
  70. package/dist/components/SegmentedControl/index.js +3 -3
  71. package/dist/components/SelectInput/SelectInput.d.ts +1 -1
  72. package/dist/components/SelectInput/SelectInput.js +8 -9
  73. package/dist/components/SelectInput/index.d.ts +3 -2
  74. package/dist/components/SelectInput/index.js +3 -2
  75. package/dist/components/Sheet/Sheet.d.ts +1 -1
  76. package/dist/components/Sheet/Sheet.js +3 -8
  77. package/dist/components/Sheet/index.d.ts +1 -2
  78. package/dist/components/Sheet/index.js +2 -17
  79. package/dist/components/SwitchToggle/SwitchToggle.d.ts +1 -1
  80. package/dist/components/SwitchToggle/SwitchToggle.js +3 -5
  81. package/dist/components/Text/Text.d.ts +6 -6
  82. package/dist/components/Text/Text.js +11 -13
  83. package/dist/components/Text/index.d.ts +1 -2
  84. package/dist/components/Text/index.js +2 -17
  85. package/dist/components/TextInput/TextInput.d.ts +1 -1
  86. package/dist/components/TextInput/TextInput.js +5 -9
  87. package/dist/components/TitleBar/TitleBar.d.ts +1 -1
  88. package/dist/components/TitleBar/TitleBar.js +7 -9
  89. package/dist/components/TitleBar/index.d.ts +1 -2
  90. package/dist/components/TitleBar/index.js +2 -17
  91. package/dist/components/index.d.ts +1 -0
  92. package/dist/components/index.js +1 -0
  93. package/dist/types/index.d.ts +2 -3
  94. package/dist/types/index.js +0 -1
  95. package/package.json +2 -2
@@ -10,5 +10,5 @@ export type SelectInputProps<T> = {
10
10
  renderOption?: (option: Option<T>, onPress: (option: Option<T>) => void) => React.ReactNode;
11
11
  containerStyle?: StyleProp<ViewStyle>;
12
12
  };
13
- export declare function SelectInput<T>({ caption, label, options, onChange, error, renderOption, containerStyle, }: SelectInputProps<T>): React.JSX.Element;
13
+ declare function SelectInput<T>({ caption, label, options, onChange, error, renderOption, containerStyle, }: SelectInputProps<T>): React.JSX.Element;
14
14
  export default SelectInput;
@@ -26,16 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.SelectInput = SelectInput;
30
29
  const react_1 = __importStar(require("react"));
31
30
  const react_native_1 = require("react-native");
32
31
  const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
33
- const Text_1 = __importDefault(require("../Text"));
34
- const Sheet_1 = __importDefault(require("../Sheet"));
32
+ const Sheet_1 = require("../Sheet");
35
33
  const MenuItemDescription_1 = require("../MenuItemDescription");
34
+ const Text_1 = require("../Text");
36
35
  const hooks_1 = require("../../hooks");
37
36
  const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
38
- const Chevron_1 = __importDefault(require("../Chevron"));
37
+ const Chevron_1 = require("../Chevron");
39
38
  const animations_1 = require("../../constants/animations");
40
39
  const useInputFieldFontSizeInterpolationOutputRange_1 = require("../../hooks/useInputFieldFontSizeInterpolationOutputRange");
41
40
  const constants_1 = require("../../constants");
@@ -109,19 +108,19 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
109
108
  </react_native_reanimated_1.default.Text>
110
109
  </react_native_1.View>
111
110
  <react_native_reanimated_1.default.View style={animatedValueStyle}>
112
- {!!value && (<Text_1.default contrast="low" style={styles.value}>
111
+ {!!value && (<Text_1.Text contrast="low" style={styles.value}>
113
112
  {value.label}
114
- </Text_1.default>)}
113
+ </Text_1.Text>)}
115
114
  </react_native_reanimated_1.default.View>
116
- <Chevron_1.default direction={sheetOpen ? "up" : "down"}/>
115
+ <Chevron_1.Chevron direction={sheetOpen ? "up" : "down"}/>
117
116
  </react_native_reanimated_1.default.View>
118
117
  </react_native_1.TouchableOpacity>
119
118
  {!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
120
- <Sheet_1.default open={sheetOpen} setOpen={setSheetOpen} header={label}>
119
+ <Sheet_1.Sheet open={sheetOpen} setOpen={setSheetOpen} header={label}>
121
120
  {options.map((option, i) => renderOption ? (renderOption(option, handleOptionPress)) : (<react_native_1.TouchableOpacity onPress={() => handleOptionPress(option)} key={i + option.label}>
122
121
  <SelectionItem_1.default option={option}/>
123
122
  </react_native_1.TouchableOpacity>))}
124
- </Sheet_1.default>
123
+ </Sheet_1.Sheet>
125
124
  </react_native_1.View>);
126
125
  }
127
126
  const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((theme) => react_native_1.StyleSheet.create({
@@ -1,2 +1,3 @@
1
- export { default } from './SelectInput';
2
- export * from './SelectInput';
1
+ export { default as SelectInput } from "./SelectInput";
2
+ export * from "./SelectInput";
3
+ export * from "./types";
@@ -17,7 +17,8 @@ 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.default = void 0;
20
+ exports.SelectInput = void 0;
21
21
  var SelectInput_1 = require("./SelectInput");
22
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(SelectInput_1).default; } });
22
+ Object.defineProperty(exports, "SelectInput", { enumerable: true, get: function () { return __importDefault(SelectInput_1).default; } });
23
23
  __exportStar(require("./SelectInput"), exports);
24
+ __exportStar(require("./types"), exports);
@@ -12,5 +12,5 @@ type Props = {
12
12
  footer?: React.ReactNode;
13
13
  footerPadding?: number;
14
14
  };
15
- export declare const Sheet: ({ open, setOpen, children, containerStyle, defaultMargins, header, transparent, disableScroll, footer, footerPadding, }: Props) => React.JSX.Element | null;
15
+ declare const Sheet: ({ open, setOpen, children, containerStyle, defaultMargins, header, transparent, disableScroll, footer, footerPadding, }: Props) => React.JSX.Element | null;
16
16
  export default Sheet;
@@ -22,17 +22,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Sheet = void 0;
30
26
  const react_1 = __importStar(require("react"));
31
27
  const react_native_1 = require("react-native");
32
28
  const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
33
29
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
34
30
  const useThemedStyle_1 = require("../../hooks/useThemedStyle");
35
- const Text_1 = __importDefault(require("../Text"));
31
+ const Text_1 = require("../Text");
36
32
  const BACKGROUND_OPACITY = 0.6;
37
33
  const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true, header, transparent = false, disableScroll = false, footer, footerPadding = 0, }) => {
38
34
  const [footerHeight, setFooterHeight] = (0, react_1.useState)(footerPadding);
@@ -72,7 +68,7 @@ const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true,
72
68
  </react_native_1.Pressable>)}
73
69
  {visible && (<react_native_reanimated_1.default.View entering={react_native_reanimated_1.SlideInDown} exiting={react_native_reanimated_1.SlideOutDown} style={[styles.sheet, containerStyle]}>
74
70
  {!!header && (<react_native_1.View style={styles.headerContainer}>
75
- <Text_1.default>{header}</Text_1.default>
71
+ <Text_1.Text>{header}</Text_1.Text>
76
72
  </react_native_1.View>)}
77
73
  {!disableScroll && (<react_native_1.ScrollView scrollEnabled={!disableScroll} contentContainerStyle={[
78
74
  styles.contentContainer,
@@ -103,8 +99,7 @@ const Sheet = ({ open, setOpen, children, containerStyle, defaultMargins = true,
103
99
  <react_native_1.View style={styles.wrapper}>{content}</react_native_1.View>
104
100
  </react_native_1.Modal>);
105
101
  };
106
- exports.Sheet = Sheet;
107
- exports.default = exports.Sheet;
102
+ exports.default = Sheet;
108
103
  const useStyles = (defaultMargins, footerHeight) => {
109
104
  const { bottom: bottomInset } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
110
105
  return (0, useThemedStyle_1.useThemedStyle)((0, react_1.useCallback)((theme) => react_native_1.StyleSheet.create({
@@ -1,2 +1 @@
1
- export * from "./Sheet";
2
- export { default } from "./Sheet";
1
+ export { default as Sheet } from "./Sheet";
@@ -1,23 +1,8 @@
1
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 __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);
15
- };
16
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
17
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
4
  };
19
5
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.default = void 0;
21
- __exportStar(require("./Sheet"), exports);
6
+ exports.Sheet = void 0;
22
7
  var Sheet_1 = require("./Sheet");
23
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Sheet_1).default; } });
8
+ Object.defineProperty(exports, "Sheet", { enumerable: true, get: function () { return __importDefault(Sheet_1).default; } });
@@ -10,5 +10,5 @@ export type SwitchToggleProps = {
10
10
  containerStyle?: StyleProp<ViewStyle>;
11
11
  error?: string;
12
12
  };
13
- export declare const SwitchToggle: ({ testId, onChange, value, caption, label, touchableStyle, error, containerStyle, }: SwitchToggleProps) => React.JSX.Element;
13
+ declare const SwitchToggle: ({ testId, onChange, value, caption, label, touchableStyle, error, containerStyle, }: SwitchToggleProps) => React.JSX.Element;
14
14
  export default SwitchToggle;
@@ -26,12 +26,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.SwitchToggle = void 0;
30
29
  const react_1 = __importStar(require("react"));
31
30
  const react_native_1 = require("react-native");
32
31
  const react_native_reanimated_1 = __importDefault(require("react-native-reanimated"));
33
- const Text_1 = __importDefault(require("../Text"));
34
32
  const MenuItemDescription_1 = require("../MenuItemDescription");
33
+ const Text_1 = require("../Text");
35
34
  const index_1 = require("../../shared/styles/index");
36
35
  const FieldError_1 = require("../FieldError/FieldError");
37
36
  const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
@@ -48,7 +47,7 @@ const SwitchToggle = ({ testId, onChange, value, caption, label, touchableStyle,
48
47
  return (<react_native_1.View style={[styles.container, containerStyle]}>
49
48
  <react_native_1.TouchableOpacity testID={testId} style={touchableStyle}>
50
49
  <react_native_reanimated_1.default.View style={[styles.itemContainer, animatedBorderStyle]}>
51
- <Text_1.default numberOfLines={1}>{label}</Text_1.default>
50
+ <Text_1.Text numberOfLines={1}>{label}</Text_1.Text>
52
51
  <react_native_1.Switch onValueChange={onChange} value={value}/>
53
52
  </react_native_reanimated_1.default.View>
54
53
  </react_native_1.TouchableOpacity>
@@ -56,5 +55,4 @@ const SwitchToggle = ({ testId, onChange, value, caption, label, touchableStyle,
56
55
  {!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
57
56
  </react_native_1.View>);
58
57
  };
59
- exports.SwitchToggle = SwitchToggle;
60
- exports.default = exports.SwitchToggle;
58
+ exports.default = SwitchToggle;
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';
3
- import { TypographyVariants } from '../../types/typography';
4
- type TextContrast = 'high' | 'medium' | 'low';
5
- type TextStatus = 'error' | 'informative' | 'warning' | 'success';
1
+ import React from "react";
2
+ import { StyleProp, TextProps as RNTextProps, TextStyle } from "react-native";
3
+ import { TypographyVariants } from "../../types/typography";
4
+ type TextContrast = "high" | "medium" | "low";
5
+ type TextStatus = "error" | "informative" | "warning" | "success";
6
6
  export interface TextProps extends RNTextProps {
7
7
  status?: TextStatus;
8
8
  category?: TypographyVariants;
9
9
  contrast?: TextContrast;
10
10
  style?: StyleProp<TextStyle>;
11
11
  }
12
- export declare const Text: ({ category, contrast, style, status, ...rest }: TextProps) => React.JSX.Element;
12
+ declare const Text: ({ category, contrast, style, status, ...rest }: TextProps) => React.JSX.Element;
13
13
  export default Text;
@@ -34,11 +34,10 @@ var __rest = (this && this.__rest) || function (s, e) {
34
34
  return t;
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.Text = void 0;
38
37
  const react_1 = __importStar(require("react"));
39
38
  const react_native_1 = require("react-native");
40
39
  const hooks_1 = require("../../hooks");
41
- const getFontStyle = ({ fontFamily, fontSize, fontWeight, lineHeight }) => {
40
+ const getFontStyle = ({ fontFamily, fontSize, fontWeight, lineHeight, }) => {
42
41
  return {
43
42
  fontFamily,
44
43
  fontSize,
@@ -47,35 +46,34 @@ const getFontStyle = ({ fontFamily, fontSize, fontWeight, lineHeight }) => {
47
46
  };
48
47
  };
49
48
  const Text = (_a) => {
50
- var { category = 'p1', contrast, style, status } = _a, rest = __rest(_a, ["category", "contrast", "style", "status"]);
49
+ var { category = "p1", contrast, style, status } = _a, rest = __rest(_a, ["category", "contrast", "style", "status"]);
51
50
  const styles = useStyles(category, contrast, status).styles;
52
- return <react_native_1.Text style={[styles.fontStyle, styles.colorStyle, style]} {...rest}/>;
51
+ return (<react_native_1.Text style={[styles.fontStyle, styles.colorStyle, style]} {...rest}/>);
53
52
  };
54
- exports.Text = Text;
55
- exports.default = exports.Text;
56
- const useStyles = (category, contrast = 'high', status) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)(theme => {
53
+ exports.default = Text;
54
+ const useStyles = (category, contrast = "high", status) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((theme) => {
57
55
  let color = theme.colors.foregroundHighContrast;
58
56
  if (contrast) {
59
- if (contrast === 'medium') {
57
+ if (contrast === "medium") {
60
58
  color = theme.colors.foreground;
61
59
  }
62
- else if (contrast === 'low') {
60
+ else if (contrast === "low") {
63
61
  color = theme.colors.foregroundLowContrast;
64
62
  }
65
63
  }
66
64
  if (status) {
67
65
  if (status) {
68
66
  switch (status) {
69
- case 'error':
67
+ case "error":
70
68
  color = theme.colors.secondaryNegative;
71
69
  break;
72
- case 'informative':
70
+ case "informative":
73
71
  color = theme.colors.primary;
74
72
  break;
75
- case 'warning':
73
+ case "warning":
76
74
  color = theme.colors.secondaryWarning;
77
75
  break;
78
- case 'success':
76
+ case "success":
79
77
  color = theme.colors.secondaryPositive;
80
78
  break;
81
79
  default:
@@ -1,2 +1 @@
1
- export { default } from './Text';
2
- export * from './Text';
1
+ export { default as Text } from './Text';
@@ -1,23 +1,8 @@
1
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 __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);
15
- };
16
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
17
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
4
  };
19
5
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.default = void 0;
6
+ exports.Text = void 0;
21
7
  var Text_1 = require("./Text");
22
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
23
- __exportStar(require("./Text"), exports);
8
+ Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
@@ -13,7 +13,7 @@ export type TextInputProps = {
13
13
  multiline?: boolean;
14
14
  numberOfLines?: number;
15
15
  } & Omit<RNTextInputProps, "onBlur">;
16
- export declare const TextInput: React.ForwardRefExoticComponent<{
16
+ declare const TextInput: React.ForwardRefExoticComponent<{
17
17
  disabled?: boolean;
18
18
  testId?: string;
19
19
  caption?: string;
@@ -33,16 +33,12 @@ var __rest = (this && this.__rest) || function (s, e) {
33
33
  }
34
34
  return t;
35
35
  };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
36
  Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.TextInput = void 0;
41
37
  const react_1 = __importStar(require("react"));
42
38
  const react_native_1 = require("react-native");
43
39
  const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
44
- const Text_1 = __importDefault(require("../Text"));
45
40
  const MenuItemDescription_1 = require("../MenuItemDescription");
41
+ const Text_1 = require("../Text");
46
42
  const hooks_1 = require("../../hooks");
47
43
  const FieldError_1 = require("../FieldError/FieldError");
48
44
  const useInputFieldAnimatedBorder_1 = require("../../hooks/useInputFieldAnimatedBorder");
@@ -67,7 +63,7 @@ const getTextInputStyle = (disabled, error, style) => {
67
63
  }
68
64
  return style.default;
69
65
  };
70
- exports.TextInput = (0, react_1.forwardRef)((_a, ref) => {
66
+ const TextInput = (0, react_1.forwardRef)((_a, ref) => {
71
67
  var { caption, keyboardType, onChangeText, testId, value, label, onBlur, containerStyle, disabled = false, error, multiline, numberOfLines } = _a, rest = __rest(_a, ["caption", "keyboardType", "onChangeText", "testId", "value", "label", "onBlur", "containerStyle", "disabled", "error", "multiline", "numberOfLines"]);
72
68
  const { styles, theme } = useStyles(disabled, !!error, !!multiline);
73
69
  const inputRef = (0, react_1.useRef)(null);
@@ -168,7 +164,7 @@ exports.TextInput = (0, react_1.forwardRef)((_a, ref) => {
168
164
  </react_native_reanimated_1.default.Text>
169
165
  </react_native_1.View>
170
166
  <react_native_reanimated_1.default.View style={animatedInputStyles}>
171
- {disabled ? (<Text_1.default style={styles.text}>{value}</Text_1.default>) : (<react_native_1.TextInput ref={inputRef} testID={testId} value={value} style={styles.textInput} numberOfLines={numberOfLines} multiline={multiline} keyboardType={keyboardType} onChangeText={handleOnChangeText} maxLength={40} returnKeyType="done" onBlur={handleOnBlur} onFocus={onFocus} keyboardAppearance={theme.keyboardAppearance} {...rest}/>)}
167
+ {disabled ? (<Text_1.Text style={styles.text}>{value}</Text_1.Text>) : (<react_native_1.TextInput ref={inputRef} testID={testId} value={value} style={styles.textInput} numberOfLines={numberOfLines} multiline={multiline} keyboardType={keyboardType} onChangeText={handleOnChangeText} maxLength={40} returnKeyType="done" onBlur={handleOnBlur} onFocus={onFocus} keyboardAppearance={theme.keyboardAppearance} {...rest}/>)}
172
168
  </react_native_reanimated_1.default.View>
173
169
  </react_native_reanimated_1.default.View>
174
170
  </react_native_1.Pressable>
@@ -176,8 +172,8 @@ exports.TextInput = (0, react_1.forwardRef)((_a, ref) => {
176
172
  {!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
177
173
  </react_native_1.View>);
178
174
  });
179
- exports.default = exports.TextInput;
180
- exports.TextInput.displayName = "TextInput";
175
+ exports.default = TextInput;
176
+ TextInput.displayName = "TextInput";
181
177
  const useStyles = (disabled, error, multiline) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((theme) => react_native_1.StyleSheet.create({
182
178
  container: {
183
179
  width: "100%",
@@ -9,5 +9,5 @@ export type TitleBarProps = {
9
9
  type?: "modal" | "default";
10
10
  containerStyle?: ViewStyle;
11
11
  };
12
- export declare const TitleBar: ({ title, onBackPressed, canGoBack, rightItem, titleComponent, type, containerStyle, }: TitleBarProps) => React.JSX.Element;
12
+ declare const TitleBar: ({ title, onBackPressed, canGoBack, rightItem, titleComponent, type, containerStyle, }: TitleBarProps) => React.JSX.Element;
13
13
  export default TitleBar;
@@ -26,13 +26,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.TitleBar = void 0;
30
29
  const react_1 = __importStar(require("react"));
31
30
  const react_native_1 = require("react-native");
32
31
  const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
33
32
  const hooks_1 = require("../../hooks");
34
- const Text_1 = __importDefault(require("../Text"));
35
- const DragHandle_1 = __importDefault(require("../DragHandle"));
33
+ const Text_1 = require("../Text");
34
+ const DragHandle_1 = require("../DragHandle");
36
35
  const TitleBarHeight = 60;
37
36
  const TitleBar = ({ title, onBackPressed, canGoBack = true, rightItem, titleComponent, type = "default", containerStyle = {}, }) => {
38
37
  const isModal = type === "modal";
@@ -52,20 +51,19 @@ const TitleBar = ({ title, onBackPressed, canGoBack = true, rightItem, titleComp
52
51
  </react_native_1.Pressable>);
53
52
  };
54
53
  return (<react_native_1.SafeAreaView style={[styles.container, containerStyle]}>
55
- {isModal && <DragHandle_1.default size="large"/>}
54
+ {isModal && <DragHandle_1.DragHandle size="large"/>}
56
55
  <react_native_1.View style={styles.bar}>
57
56
  {renderBack()}
58
57
  {!!titleComponent && (<react_native_1.View style={styles.titleComponentContainer}>{titleComponent}</react_native_1.View>)}
59
58
  {!titleComponent && !!title && (<react_native_1.View style={styles.titleContainer}>
60
- <Text_1.default category="h1" style={styles.headerTitle} numberOfLines={1}>
59
+ <Text_1.Text category="h1" style={styles.headerTitle} numberOfLines={1}>
61
60
  {title !== null && title !== void 0 ? title : ""}
62
- </Text_1.default>
61
+ </Text_1.Text>
63
62
  </react_native_1.View>)}
64
63
  {!!rightItem && (<react_native_1.View style={styles.rightItemContainer}>{rightItem}</react_native_1.View>)}
65
64
  </react_native_1.View>
66
65
  </react_native_1.SafeAreaView>);
67
66
  };
68
- exports.TitleBar = TitleBar;
69
67
  const useStyles = (canGoBack, isModal) => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((theme) => react_native_1.StyleSheet.create({
70
68
  container: {
71
69
  backgroundColor: theme.colors.backgroundPrimary,
@@ -116,6 +114,6 @@ const useStyles = (canGoBack, isModal) => (0, hooks_1.useThemedStyle)((0, react_
116
114
  },
117
115
  chevronBack: {
118
116
  color: theme.colors.foreground,
119
- }
117
+ },
120
118
  }), []));
121
- exports.default = exports.TitleBar;
119
+ exports.default = TitleBar;
@@ -1,2 +1 @@
1
- export { default } from './TitleBar';
2
- export * from './TitleBar';
1
+ export { default as TitleBar } from './TitleBar';
@@ -1,23 +1,8 @@
1
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 __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);
15
- };
16
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
17
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
4
  };
19
5
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.default = void 0;
6
+ exports.TitleBar = void 0;
21
7
  var TitleBar_1 = require("./TitleBar");
22
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(TitleBar_1).default; } });
23
- __exportStar(require("./TitleBar"), exports);
8
+ Object.defineProperty(exports, "TitleBar", { enumerable: true, get: function () { return __importDefault(TitleBar_1).default; } });
@@ -16,4 +16,5 @@ export * from "./RadioOptionInput";
16
16
  export * from "./Chevron";
17
17
  export * from "./CheckboxOptionInput";
18
18
  export * from "./CheckboxOptionItem";
19
+ export * from "./BottomSheet";
19
20
  export * from "./Forms";
@@ -32,5 +32,6 @@ __exportStar(require("./RadioOptionInput"), exports);
32
32
  __exportStar(require("./Chevron"), exports);
33
33
  __exportStar(require("./CheckboxOptionInput"), exports);
34
34
  __exportStar(require("./CheckboxOptionItem"), exports);
35
+ __exportStar(require("./BottomSheet"), exports);
35
36
  // Forms
36
37
  __exportStar(require("./Forms"), exports);
@@ -1,3 +1,2 @@
1
- export * from './typography';
2
- export * from './theme';
3
- export * from '../components/SelectInput/types';
1
+ export * from "./typography";
2
+ export * from "./theme";
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./typography"), exports);
18
18
  __exportStar(require("./theme"), exports);
19
- __exportStar(require("../components/SelectInput/types"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@react-native-community/datetimepicker": "~8.0.1",
43
- "@types/react": "^18.2.0",
43
+ "@types/react": "^19.0.0",
44
44
  "@types/react-native-vector-icons": "^6.4.18",
45
45
  "@typescript-eslint/eslint-plugin": "^8.4.0",
46
46
  "@typescript-eslint/parser": "^8.4.0",