atlas-design-system 2.0.3 → 2.0.5
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/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -3
- package/dist/components/BottomSheet/index.d.ts +1 -0
- package/dist/components/BottomSheet/index.js +8 -0
- package/dist/components/Button/Button.d.ts +2 -11
- package/dist/components/Button/Button.js +4 -6
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.js +3 -3
- package/dist/components/Button/styles/ButtonStyle.d.ts +1 -1
- package/dist/components/Button/types.d.ts +10 -0
- package/dist/components/Button/types.js +2 -0
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.d.ts +1 -1
- package/dist/components/CheckboxOptionInput/CheckboxOptionInput.js +10 -14
- package/dist/components/CheckboxOptionInput/index.d.ts +1 -2
- package/dist/components/CheckboxOptionInput/index.js +2 -17
- package/dist/components/CheckboxOptionItem/index.d.ts +0 -1
- package/dist/components/CheckboxOptionItem/index.js +0 -15
- package/dist/components/Chevron/index.d.ts +1 -2
- package/dist/components/Chevron/index.js +2 -17
- package/dist/components/DateTimeInput/DateTimeInput.js +7 -7
- package/dist/components/DateTimeInput/index.d.ts +1 -1
- package/dist/components/DateTimeInput/index.js +1 -1
- package/dist/components/DragHandle/DragHandle.d.ts +7 -0
- package/dist/components/DragHandle/DragHandle.js +53 -0
- package/dist/components/DragHandle/index.d.ts +1 -7
- package/dist/components/DragHandle/index.js +4 -51
- package/dist/components/Forms/Form/Form.js +0 -4
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +2 -5
- package/dist/components/Forms/FormSelectInput/FormSelectInput.js +2 -5
- package/dist/components/MenuItemDescription/MenuItemDescription.d.ts +3 -2
- package/dist/components/MenuItemDescription/MenuItemDescription.js +5 -9
- package/dist/components/MenuItemDescription/index.d.ts +1 -1
- package/dist/components/MenuItemDescription/index.js +5 -14
- package/dist/components/NavigationListRow/NavigationListRow.d.ts +14 -0
- package/dist/components/NavigationListRow/NavigationListRow.js +59 -0
- package/dist/components/NavigationListRow/index.d.ts +1 -14
- package/dist/components/NavigationListRow/index.js +2 -55
- package/dist/components/RadioOptionInput/RadioOptionInput.js +10 -13
- package/dist/components/RadioOptionInput/index.d.ts +0 -1
- package/dist/components/RadioOptionInput/index.js +0 -15
- package/dist/components/RadioOptionItem/RadioOptionItem.js +2 -5
- package/dist/components/RadioOptionItem/index.d.ts +1 -2
- package/dist/components/RadioOptionItem/index.js +2 -17
- package/dist/components/Search/index.d.ts +0 -1
- package/dist/components/Search/index.js +0 -15
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -1
- package/dist/components/SegmentedControl/index.d.ts +1 -1
- package/dist/components/SegmentedControl/index.js +3 -3
- package/dist/components/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/SelectInput/SelectInput.js +8 -9
- package/dist/components/SelectInput/index.d.ts +3 -2
- package/dist/components/SelectInput/index.js +3 -2
- package/dist/components/Sheet/Sheet.d.ts +1 -1
- package/dist/components/Sheet/Sheet.js +3 -8
- package/dist/components/Sheet/index.d.ts +1 -2
- package/dist/components/Sheet/index.js +2 -17
- package/dist/components/SwitchToggle/SwitchToggle.d.ts +1 -1
- package/dist/components/SwitchToggle/SwitchToggle.js +3 -5
- package/dist/components/Text/Text.d.ts +6 -6
- package/dist/components/Text/Text.js +11 -13
- package/dist/components/Text/index.d.ts +1 -2
- package/dist/components/Text/index.js +2 -17
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/TextInput/TextInput.js +5 -9
- package/dist/components/TitleBar/TitleBar.d.ts +1 -1
- package/dist/components/TitleBar/TitleBar.js +7 -9
- package/dist/components/TitleBar/index.d.ts +1 -2
- package/dist/components/TitleBar/index.js +2 -17
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.js +0 -1
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
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 react_native_1 = require("react-native");
|
|
31
|
+
const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
|
|
32
|
+
const Text_1 = require("../Text");
|
|
33
|
+
const useThemedStyle_1 = require("../../hooks/useThemedStyle");
|
|
34
|
+
const NavigationListRow = ({ label, caption, onPress, disabled, defaultPadding = true, containerStyle = {}, iconRight, iconRightName = "chevron-forward-outline", }) => {
|
|
35
|
+
const styles = useStyles(defaultPadding).styles;
|
|
36
|
+
return (<react_native_1.TouchableOpacity disabled={disabled} style={[styles.container, containerStyle]} onPress={onPress}>
|
|
37
|
+
<react_native_1.View style={styles.content}>
|
|
38
|
+
<Text_1.Text category="h3">{label}</Text_1.Text>
|
|
39
|
+
{caption && <Text_1.Text contrast="low">{caption}</Text_1.Text>}
|
|
40
|
+
</react_native_1.View>
|
|
41
|
+
{iconRight ? (iconRight) : (<Ionicons_1.default style={styles.chevronRight} size={18} name={iconRightName}/>)}
|
|
42
|
+
</react_native_1.TouchableOpacity>);
|
|
43
|
+
};
|
|
44
|
+
exports.default = NavigationListRow;
|
|
45
|
+
const useStyles = (defaultPadding) => (0, useThemedStyle_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
|
|
46
|
+
container: {
|
|
47
|
+
flexDirection: "row",
|
|
48
|
+
justifyContent: "flex-start",
|
|
49
|
+
columnGap: t.size.baseSize * 0,
|
|
50
|
+
paddingVertical: t.size.baseSize * 2,
|
|
51
|
+
paddingHorizontal: defaultPadding ? t.size.baseSize * 4 : 0,
|
|
52
|
+
},
|
|
53
|
+
content: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
},
|
|
56
|
+
chevronRight: {
|
|
57
|
+
color: t.colors.foregroundHighContrast,
|
|
58
|
+
},
|
|
59
|
+
}), [defaultPadding]));
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export type NavigationListRowProps = {
|
|
4
|
-
label: string;
|
|
5
|
-
caption?: string;
|
|
6
|
-
onPress?: () => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
defaultPadding?: boolean;
|
|
9
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
10
|
-
iconRight?: React.ReactNode;
|
|
11
|
-
iconRightName?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const NavigationListRow: ({ label, caption, onPress, disabled, defaultPadding, containerStyle, iconRight, iconRightName, }: NavigationListRowProps) => React.JSX.Element;
|
|
14
|
-
export default NavigationListRow;
|
|
1
|
+
export { default as NavigationListRow } from "./NavigationListRow";
|
|
@@ -1,61 +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 __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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
exports.NavigationListRow = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const Ionicons_1 = __importDefault(require("react-native-vector-icons/Ionicons"));
|
|
33
|
-
const Text_1 = __importDefault(require("../Text"));
|
|
34
|
-
const useThemedStyle_1 = require("../../hooks/useThemedStyle");
|
|
35
|
-
const NavigationListRow = ({ label, caption, onPress, disabled, defaultPadding = true, containerStyle = {}, iconRight, iconRightName = "chevron-forward-outline", }) => {
|
|
36
|
-
const styles = useStyles(defaultPadding).styles;
|
|
37
|
-
return (<react_native_1.TouchableOpacity disabled={disabled} style={[styles.container, containerStyle]} onPress={onPress}>
|
|
38
|
-
<react_native_1.View style={styles.content}>
|
|
39
|
-
<Text_1.default category="h3">{label}</Text_1.default>
|
|
40
|
-
{caption && <Text_1.default contrast="low">{caption}</Text_1.default>}
|
|
41
|
-
</react_native_1.View>
|
|
42
|
-
{iconRight ? (iconRight) : (<Ionicons_1.default style={styles.chevronRight} size={18} name={iconRightName}/>)}
|
|
43
|
-
</react_native_1.TouchableOpacity>);
|
|
44
|
-
};
|
|
45
|
-
exports.NavigationListRow = NavigationListRow;
|
|
46
|
-
exports.default = exports.NavigationListRow;
|
|
47
|
-
const useStyles = (defaultPadding) => (0, useThemedStyle_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
flexDirection: "row",
|
|
50
|
-
justifyContent: "flex-start",
|
|
51
|
-
columnGap: t.size.baseSize * 0,
|
|
52
|
-
paddingVertical: t.size.baseSize * 2,
|
|
53
|
-
paddingHorizontal: defaultPadding ? t.size.baseSize * 4 : 0,
|
|
54
|
-
},
|
|
55
|
-
content: {
|
|
56
|
-
flex: 1,
|
|
57
|
-
},
|
|
58
|
-
chevronRight: {
|
|
59
|
-
color: t.colors.foregroundHighContrast,
|
|
60
|
-
},
|
|
61
|
-
}), [defaultPadding]));
|
|
7
|
+
var NavigationListRow_1 = require("./NavigationListRow");
|
|
8
|
+
Object.defineProperty(exports, "NavigationListRow", { enumerable: true, get: function () { return __importDefault(NavigationListRow_1).default; } });
|
|
@@ -22,18 +22,15 @@ 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
26
|
exports.RadioOptionInput = RadioOptionInput;
|
|
30
27
|
const react_1 = __importStar(require("react"));
|
|
31
28
|
const react_native_1 = require("react-native");
|
|
32
29
|
const hooks_1 = require("../../hooks");
|
|
33
|
-
const Sheet_1 =
|
|
34
|
-
const Text_1 =
|
|
35
|
-
const Chevron_1 =
|
|
36
|
-
const RadioOptionItem_1 =
|
|
30
|
+
const Sheet_1 = require("../Sheet");
|
|
31
|
+
const Text_1 = require("../Text");
|
|
32
|
+
const Chevron_1 = require("../Chevron");
|
|
33
|
+
const RadioOptionItem_1 = require("../RadioOptionItem");
|
|
37
34
|
const MenuItemDescription_1 = require("../MenuItemDescription");
|
|
38
35
|
function RadioOptionInput({ caption, label, options = [], onChange, renderOption, renderValue, containerStyle = {}, }) {
|
|
39
36
|
const styles = useStyles().styles;
|
|
@@ -47,19 +44,19 @@ function RadioOptionInput({ caption, label, options = [], onChange, renderOption
|
|
|
47
44
|
}, [onChange]);
|
|
48
45
|
return (<>
|
|
49
46
|
<react_native_1.View style={[styles.container, containerStyle]}>
|
|
50
|
-
<Text_1.
|
|
47
|
+
<Text_1.Text>{label}</Text_1.Text>
|
|
51
48
|
<react_native_1.TouchableOpacity onPress={() => setSheetOpen(true)} style={styles.valueDisplayContainer}>
|
|
52
|
-
{!renderValue && <Text_1.
|
|
49
|
+
{!renderValue && <Text_1.Text>{value === null || value === void 0 ? void 0 : value.label}</Text_1.Text>}
|
|
53
50
|
{renderValue && renderValue(value)}
|
|
54
|
-
<Chevron_1.
|
|
51
|
+
<Chevron_1.Chevron direction={sheetOpen ? "up" : "down"}/>
|
|
55
52
|
</react_native_1.TouchableOpacity>
|
|
56
53
|
{!!caption && <MenuItemDescription_1.MenuItemDescription description={caption}/>}
|
|
57
54
|
</react_native_1.View>
|
|
58
|
-
<Sheet_1.
|
|
55
|
+
<Sheet_1.Sheet header={label} open={sheetOpen} setOpen={setSheetOpen}>
|
|
59
56
|
{options.map((option) => {
|
|
60
|
-
return renderOption ? (renderOption(option, handleOptionPress)) : (<RadioOptionItem_1.
|
|
57
|
+
return renderOption ? (renderOption(option, handleOptionPress)) : (<RadioOptionItem_1.RadioOptionItem option={option} onPress={() => handleOptionPress(option)} key={option.value}/>);
|
|
61
58
|
})}
|
|
62
|
-
</Sheet_1.
|
|
59
|
+
</Sheet_1.Sheet>
|
|
63
60
|
</>);
|
|
64
61
|
}
|
|
65
62
|
const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((t) => react_native_1.StyleSheet.create({
|
|
@@ -1,18 +1,4 @@
|
|
|
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
|
};
|
|
@@ -20,4 +6,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
6
|
exports.RadioOptionInput = void 0;
|
|
21
7
|
var RadioOptionInput_1 = require("./RadioOptionInput");
|
|
22
8
|
Object.defineProperty(exports, "RadioOptionInput", { enumerable: true, get: function () { return __importDefault(RadioOptionInput_1).default; } });
|
|
23
|
-
__exportStar(require("./RadioOptionInput"), exports);
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.RadioOptionItem = RadioOptionItem;
|
|
7
4
|
const react_1 = require("react");
|
|
8
5
|
const react_native_1 = require("react-native");
|
|
9
6
|
const hooks_1 = require("../../hooks");
|
|
10
|
-
const Text_1 =
|
|
7
|
+
const Text_1 = require("../Text");
|
|
11
8
|
function RadioOptionItem({ option, onPress, renderItem, disabled, }) {
|
|
12
9
|
const { label, value, selected } = option;
|
|
13
10
|
const styles = useStyles(selected).styles;
|
|
@@ -19,7 +16,7 @@ function RadioOptionItem({ option, onPress, renderItem, disabled, }) {
|
|
|
19
16
|
]}>
|
|
20
17
|
{selected && <react_native_1.View style={styles.radio}/>}
|
|
21
18
|
</react_native_1.View>
|
|
22
|
-
{!renderItem && (<Text_1.
|
|
19
|
+
{!renderItem && (<Text_1.Text contrast={disabled ? "low" : "high"}>{label}</Text_1.Text>)}
|
|
23
20
|
{renderItem && renderItem(option)}
|
|
24
21
|
</react_native_1.View>
|
|
25
22
|
</react_native_1.Pressable>);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default } from "./RadioOptionItem";
|
|
2
|
-
export * from "./RadioOptionItem";
|
|
1
|
+
export { default as RadioOptionItem } from "./RadioOptionItem";
|
|
@@ -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.
|
|
6
|
+
exports.RadioOptionItem = void 0;
|
|
21
7
|
var RadioOptionItem_1 = require("./RadioOptionItem");
|
|
22
|
-
Object.defineProperty(exports, "
|
|
23
|
-
__exportStar(require("./RadioOptionItem"), exports);
|
|
8
|
+
Object.defineProperty(exports, "RadioOptionItem", { enumerable: true, get: function () { return __importDefault(RadioOptionItem_1).default; } });
|
|
@@ -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
6
|
exports.Search = void 0;
|
|
21
|
-
__exportStar(require("./Search"), exports);
|
|
22
7
|
var Search_1 = require("./Search");
|
|
23
8
|
Object.defineProperty(exports, "Search", { enumerable: true, get: function () { return __importDefault(Search_1).default; } });
|
|
@@ -7,5 +7,5 @@ export type SegmentedControlProps<T> = {
|
|
|
7
7
|
caption?: string;
|
|
8
8
|
onChange: (newValue: Option<T>) => void;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
declare function SegmentedControl<T>({ label, options, silenceWarning, error, caption, onChange, }: SegmentedControlProps<T>): import("react").JSX.Element;
|
|
11
11
|
export default SegmentedControl;
|
|
@@ -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.
|
|
21
|
-
__exportStar(require("./SegmentedControl"), exports);
|
|
20
|
+
exports.SegmentedControl = void 0;
|
|
22
21
|
var SegmentedControl_1 = require("./SegmentedControl");
|
|
23
|
-
Object.defineProperty(exports, "
|
|
22
|
+
Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return __importDefault(SegmentedControl_1).default; } });
|
|
23
|
+
__exportStar(require("./SegmentedControl"), exports);
|
|
@@ -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
|
-
|
|
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
|
|
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 =
|
|
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.
|
|
111
|
+
{!!value && (<Text_1.Text contrast="low" style={styles.value}>
|
|
113
112
|
{value.label}
|
|
114
|
-
</Text_1.
|
|
113
|
+
</Text_1.Text>)}
|
|
115
114
|
</react_native_reanimated_1.default.View>
|
|
116
|
-
<Chevron_1.
|
|
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.
|
|
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.
|
|
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
|
|
2
|
-
export * from
|
|
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.
|
|
20
|
+
exports.SelectInput = void 0;
|
|
21
21
|
var SelectInput_1 = require("./SelectInput");
|
|
22
|
-
Object.defineProperty(exports, "
|
|
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
|
-
|
|
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 =
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
21
|
-
__exportStar(require("./Sheet"), exports);
|
|
6
|
+
exports.Sheet = void 0;
|
|
22
7
|
var Sheet_1 = require("./Sheet");
|
|
23
|
-
Object.defineProperty(exports, "
|
|
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
|
-
|
|
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.
|
|
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.
|
|
60
|
-
exports.default = exports.SwitchToggle;
|
|
58
|
+
exports.default = SwitchToggle;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, TextProps as RNTextProps, TextStyle } from
|
|
3
|
-
import { TypographyVariants } from
|
|
4
|
-
type TextContrast =
|
|
5
|
-
type TextStatus =
|
|
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
|
-
|
|
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 =
|
|
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.
|
|
55
|
-
|
|
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 ===
|
|
57
|
+
if (contrast === "medium") {
|
|
60
58
|
color = theme.colors.foreground;
|
|
61
59
|
}
|
|
62
|
-
else if (contrast ===
|
|
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
|
|
67
|
+
case "error":
|
|
70
68
|
color = theme.colors.secondaryNegative;
|
|
71
69
|
break;
|
|
72
|
-
case
|
|
70
|
+
case "informative":
|
|
73
71
|
color = theme.colors.primary;
|
|
74
72
|
break;
|
|
75
|
-
case
|
|
73
|
+
case "warning":
|
|
76
74
|
color = theme.colors.secondaryWarning;
|
|
77
75
|
break;
|
|
78
|
-
case
|
|
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';
|