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.
- 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.d.ts +3 -4
- package/dist/components/Forms/Form/Form.js +3 -5
- package/dist/components/Forms/Form/index.d.ts +1 -1
- package/dist/components/Forms/Form/index.js +5 -14
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.d.ts +1 -1
- package/dist/components/Forms/FormDateTimeInput/FormDateTimeInput.js +2 -4
- package/dist/components/Forms/FormDateTimeInput/index.d.ts +1 -1
- package/dist/components/Forms/FormDateTimeInput/index.js +5 -14
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.d.ts +3 -3
- package/dist/components/Forms/FormSegmentedControl/FormSegmentedControl.js +3 -6
- package/dist/components/Forms/FormSegmentedControl/index.d.ts +2 -1
- package/dist/components/Forms/FormSegmentedControl/index.js +5 -14
- package/dist/components/Forms/FormSelectInput/FormSelectInput.d.ts +3 -3
- package/dist/components/Forms/FormSelectInput/FormSelectInput.js +3 -6
- package/dist/components/Forms/FormSelectInput/index.d.ts +2 -1
- package/dist/components/Forms/FormSelectInput/index.js +5 -14
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.d.ts +1 -1
- package/dist/components/Forms/FormSwitchToggle/FormSwitchToggle.js +1 -3
- package/dist/components/Forms/FormSwitchToggle/index.d.ts +1 -1
- package/dist/components/Forms/FormSwitchToggle/index.js +5 -14
- package/dist/components/Forms/FormTextInput/FormTextInput.d.ts +1 -1
- package/dist/components/Forms/FormTextInput/FormTextInput.js +1 -3
- package/dist/components/Forms/FormTextInput/index.d.ts +1 -1
- package/dist/components/Forms/FormTextInput/index.js +5 -14
- 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 +2 -2
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as FormSegmentedControl } from "./FormSegmentedControl";
|
|
2
|
+
export type { FormSegmentedControlProps } from "./FormSegmentedControl";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.FormSegmentedControl = void 0;
|
|
7
|
+
var FormSegmentedControl_1 = require("./FormSegmentedControl");
|
|
8
|
+
Object.defineProperty(exports, "FormSegmentedControl", { enumerable: true, get: function () { return __importDefault(FormSegmentedControl_1).default; } });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FieldProps } from "informed";
|
|
2
2
|
import { SelectInputProps } from "../../SelectInput";
|
|
3
3
|
import { Option } from "../../SelectInput/types";
|
|
4
|
-
type FormSelectInputProps<T> = Omit<SelectInputProps<T>, "options"> & {
|
|
4
|
+
export type FormSelectInputProps<T> = Omit<SelectInputProps<T>, "options"> & {
|
|
5
5
|
options: Omit<Option<T>, "selected">[];
|
|
6
6
|
};
|
|
7
7
|
type Props<T> = FieldProps<FormSelectInputProps<T>>;
|
|
8
|
-
|
|
9
|
-
export
|
|
8
|
+
declare function FormSelectInput<T>(props: Props<T>): JSX.Element;
|
|
9
|
+
export default FormSelectInput;
|
|
@@ -1,12 +1,8 @@
|
|
|
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
|
-
exports.FormSelectInput = FormSelectInput;
|
|
7
3
|
const informed_1 = require("informed");
|
|
8
4
|
const react_1 = require("react");
|
|
9
|
-
const SelectInput_1 =
|
|
5
|
+
const SelectInput_1 = require("../../SelectInput");
|
|
10
6
|
function FormSelectInput(props) {
|
|
11
7
|
const { render, userProps, fieldApi, informed, fieldState } = (0, informed_1.useField)(Object.assign({}, props));
|
|
12
8
|
const { value } = informed;
|
|
@@ -16,9 +12,10 @@ function FormSelectInput(props) {
|
|
|
16
12
|
return Object.assign(Object.assign({}, v), { selected: v.value === value });
|
|
17
13
|
});
|
|
18
14
|
}, [userProps.options, value]);
|
|
19
|
-
return render(<SelectInput_1.
|
|
15
|
+
return render(<SelectInput_1.SelectInput onChange={(v) => {
|
|
20
16
|
fieldApi.setValue(v.value);
|
|
21
17
|
}}
|
|
22
18
|
//@ts-expect-error no types yet :(
|
|
23
19
|
error={error} {...userProps} options={options}/>);
|
|
24
20
|
}
|
|
21
|
+
exports.default = FormSelectInput;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as FormSelectInput } from "./FormSelectInput";
|
|
2
|
+
export type { FormSelectInputProps } from "./FormSelectInput";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.FormSelectInput = void 0;
|
|
7
|
+
var FormSelectInput_1 = require("./FormSelectInput");
|
|
8
|
+
Object.defineProperty(exports, "FormSelectInput", { enumerable: true, get: function () { return __importDefault(FormSelectInput_1).default; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FieldProps } from "informed";
|
|
2
2
|
import { SwitchToggleProps } from "../../SwitchToggle";
|
|
3
|
-
|
|
3
|
+
declare const FormSwitchToggle: (props: FieldProps<SwitchToggleProps>) => JSX.Element;
|
|
4
4
|
export default FormSwitchToggle;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FormSwitchToggle = void 0;
|
|
4
3
|
const informed_1 = require("informed");
|
|
5
4
|
const SwitchToggle_1 = require("../../SwitchToggle");
|
|
6
5
|
const FormSwitchToggle = (props) => {
|
|
@@ -8,5 +7,4 @@ const FormSwitchToggle = (props) => {
|
|
|
8
7
|
const { value } = informed;
|
|
9
8
|
return render(<SwitchToggle_1.SwitchToggle value={value} onChange={fieldApi.setValue} {...userProps}/>);
|
|
10
9
|
};
|
|
11
|
-
exports.
|
|
12
|
-
exports.default = exports.FormSwitchToggle;
|
|
10
|
+
exports.default = FormSwitchToggle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as FormSwitchToggle } from "./FormSwitchToggle";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.FormSwitchToggle = void 0;
|
|
7
|
+
var FormSwitchToggle_1 = require("./FormSwitchToggle");
|
|
8
|
+
Object.defineProperty(exports, "FormSwitchToggle", { enumerable: true, get: function () { return __importDefault(FormSwitchToggle_1).default; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FieldProps } from 'informed';
|
|
2
2
|
import { TextInputProps } from '../../TextInput';
|
|
3
|
-
|
|
3
|
+
declare const FormTextInput: (props: FieldProps<TextInputProps>) => JSX.Element;
|
|
4
4
|
export default FormTextInput;
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FormTextInput = void 0;
|
|
7
6
|
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const informed_1 = require("informed");
|
|
9
8
|
const TextInput_1 = require("../../TextInput");
|
|
@@ -15,5 +14,4 @@ const FormTextInput = (props) => {
|
|
|
15
14
|
//@ts-expect-error no types yet
|
|
16
15
|
error={error} onChangeText={fieldApi.setValue} {...userProps} value={value}/>);
|
|
17
16
|
};
|
|
18
|
-
exports.
|
|
19
|
-
exports.default = exports.FormTextInput;
|
|
17
|
+
exports.default = FormTextInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as FormTextInput } from "./FormTextInput";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.FormTextInput = void 0;
|
|
7
|
+
var FormTextInput_1 = require("./FormTextInput");
|
|
8
|
+
Object.defineProperty(exports, "FormTextInput", { enumerable: true, get: function () { return __importDefault(FormTextInput_1).default; } });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
export type MenuItemDescriptionProps = {
|
|
3
3
|
description: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
declare const MenuItemDescription: ({ description }: MenuItemDescriptionProps) => React.JSX.Element;
|
|
6
|
+
export default MenuItemDescription;
|
|
@@ -22,27 +22,23 @@ 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.MenuItemDescription = void 0;
|
|
30
26
|
const react_1 = __importStar(require("react"));
|
|
31
27
|
const react_native_1 = require("react-native");
|
|
32
|
-
const Text_1 = __importDefault(require("../Text"));
|
|
33
28
|
const hooks_1 = require("../../hooks");
|
|
29
|
+
const Text_1 = require("../Text");
|
|
34
30
|
const MenuItemDescription = ({ description }) => {
|
|
35
31
|
const styles = useStyles().styles;
|
|
36
32
|
return (<react_native_1.View style={styles.descriptionContainer}>
|
|
37
|
-
<Text_1.
|
|
33
|
+
<Text_1.Text category="p2" contrast="low">
|
|
38
34
|
{description}
|
|
39
|
-
</Text_1.
|
|
35
|
+
</Text_1.Text>
|
|
40
36
|
</react_native_1.View>);
|
|
41
37
|
};
|
|
42
|
-
|
|
43
|
-
const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)(theme => react_native_1.StyleSheet.create({
|
|
38
|
+
const useStyles = () => (0, hooks_1.useThemedStyle)((0, react_1.useCallback)((theme) => react_native_1.StyleSheet.create({
|
|
44
39
|
descriptionContainer: {
|
|
45
40
|
marginHorizontal: theme.size.baseSize * 2,
|
|
46
41
|
marginTop: theme.size.baseSize,
|
|
47
42
|
},
|
|
48
43
|
}), []));
|
|
44
|
+
exports.default = MenuItemDescription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as MenuItemDescription } from "./MenuItemDescription";
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.MenuItemDescription = void 0;
|
|
7
|
+
var MenuItemDescription_1 = require("./MenuItemDescription");
|
|
8
|
+
Object.defineProperty(exports, "MenuItemDescription", { enumerable: true, get: function () { return __importDefault(MenuItemDescription_1).default; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
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
|
+
declare const NavigationListRow: ({ label, caption, onPress, disabled, defaultPadding, containerStyle, iconRight, iconRightName, }: NavigationListRowProps) => React.JSX.Element;
|
|
14
|
+
export default NavigationListRow;
|
|
@@ -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);
|