@hero-design/rn 7.18.0 → 7.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +155 -143
- package/lib/index.js +155 -143
- package/package.json +2 -2
- package/src/components/Accordion/AccordionItem.tsx +5 -4
- package/src/components/Accordion/__tests__/index.spec.tsx +2 -1
- package/src/components/Accordion/index.tsx +3 -2
- package/src/components/Alert/StyledAlert.tsx +3 -2
- package/src/components/Alert/index.tsx +5 -3
- package/src/components/Avatar/index.tsx +2 -2
- package/src/components/Badge/Status.tsx +4 -2
- package/src/components/Badge/index.tsx +2 -1
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +4 -2
- package/src/components/BottomNavigation/index.tsx +6 -8
- package/src/components/BottomSheet/Footer.tsx +2 -1
- package/src/components/BottomSheet/Header.tsx +2 -1
- package/src/components/BottomSheet/StyledBottomSheet.tsx +2 -2
- package/src/components/BottomSheet/index.tsx +4 -8
- package/src/components/Button/Button.tsx +5 -6
- package/src/components/Button/IconButton.tsx +4 -7
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +5 -3
- package/src/components/Button/LoadingIndicator/index.tsx +2 -8
- package/src/components/Button/StyledButton.tsx +4 -5
- package/src/components/Button/UtilityButton/index.tsx +5 -4
- package/src/components/Button/index.tsx +3 -2
- package/src/components/Calendar/StyledCalendar.tsx +2 -1
- package/src/components/Card/DataCard/index.tsx +3 -2
- package/src/components/Card/index.tsx +3 -2
- package/src/components/Checkbox/StyledCheckbox.tsx +44 -14
- package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +28 -3
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +95 -9
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +337 -23
- package/src/components/Checkbox/__tests__/index.spec.tsx +38 -7
- package/src/components/Checkbox/index.tsx +35 -18
- package/src/components/Collapse/index.tsx +4 -8
- package/src/components/ContentNavigator/index.tsx +1 -1
- package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
- package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
- package/src/components/DatePicker/StyledDatePicker.tsx +2 -1
- package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +1 -2
- package/src/components/DatePicker/index.tsx +1 -1
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/Drawer/DragableDrawer/index.tsx +3 -2
- package/src/components/Drawer/StyledDrawer.tsx +3 -2
- package/src/components/Drawer/index.tsx +2 -1
- package/src/components/Empty/index.tsx +1 -2
- package/src/components/FAB/ActionGroup/ActionItem.tsx +3 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +4 -3
- package/src/components/FAB/ActionGroup/StyledActionItem.tsx +4 -2
- package/src/components/FAB/ActionGroup/index.tsx +5 -3
- package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
- package/src/components/FAB/FAB.tsx +2 -2
- package/src/components/FAB/StyledFAB.tsx +4 -7
- package/src/components/Icon/AnimatedIcon.tsx +2 -1
- package/src/components/Icon/index.tsx +1 -1
- package/src/components/List/BasicListItem.tsx +3 -3
- package/src/components/List/ListItem.tsx +6 -3
- package/src/components/List/StyledListItem.tsx +2 -1
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +13 -27
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -0
- package/src/components/PinInput/PinCell.tsx +1 -1
- package/src/components/PinInput/index.tsx +3 -7
- package/src/components/Progress/ProgressBar.tsx +2 -1
- package/src/components/Progress/ProgressCircle.tsx +3 -9
- package/src/components/Progress/StyledProgressBar.tsx +3 -3
- package/src/components/Progress/StyledProgressCircle.tsx +3 -3
- package/src/components/Radio/Radio.tsx +20 -14
- package/src/components/Radio/RadioGroup.tsx +5 -3
- package/src/components/Radio/StyledRadio.tsx +12 -29
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +84 -50
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +124 -73
- package/src/components/RichTextEditor/EditorToolbar.tsx +4 -8
- package/src/components/RichTextEditor/RichTextEditor.tsx +5 -14
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -6
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +2 -6
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +4 -7
- package/src/components/RichTextEditor/index.tsx +6 -6
- package/src/components/SectionHeading/index.tsx +5 -4
- package/src/components/Select/MultiSelect/Option.tsx +2 -1
- package/src/components/Select/MultiSelect/OptionList.tsx +3 -3
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +605 -585
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/index.tsx +20 -16
- package/src/components/Select/SingleSelect/Option.tsx +2 -1
- package/src/components/Select/SingleSelect/OptionList.tsx +3 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +602 -582
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/SingleSelect/index.tsx +20 -16
- package/src/components/Select/StyledOptionList.tsx +11 -9
- package/src/components/Select/helpers.tsx +1 -1
- package/src/components/Select/index.tsx +6 -4
- package/src/components/Select/types.ts +3 -3
- package/src/components/Spinner/StyledSpinner.tsx +2 -1
- package/src/components/Spinner/index.tsx +3 -3
- package/src/components/Switch/StyledSwitch.tsx +10 -26
- package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +25 -0
- package/src/components/Switch/__tests__/__snapshots__/{StyledHeading.spec.tsx.snap → StyledSwitch.spec.tsx.snap} +45 -18
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +26 -52
- package/src/components/Switch/index.tsx +23 -20
- package/src/components/Tabs/ScrollableTabs.tsx +1 -1
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +4 -2
- package/src/components/Tabs/__tests__/index.spec.tsx +4 -2
- package/src/components/Tabs/index.tsx +7 -13
- package/src/components/Tag/index.tsx +1 -1
- package/src/components/TextInput/index.tsx +5 -5
- package/src/components/TimePicker/StyledTimePicker.tsx +2 -1
- package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
- package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +1 -2
- package/src/components/TimePicker/index.tsx +1 -1
- package/src/components/TimePicker/types.ts +1 -1
- package/src/components/Toast/StyledToast.tsx +3 -8
- package/src/components/Toast/Toast.tsx +3 -2
- package/src/components/Toast/ToastContainer.tsx +2 -2
- package/src/components/Toast/ToastContext.ts +1 -1
- package/src/components/Toast/ToastProvider.tsx +5 -7
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +1 -1
- package/src/components/Toast/types.ts +3 -3
- package/src/components/Toolbar/StyledToolbar.tsx +2 -1
- package/src/components/Toolbar/ToolbarGroup.tsx +2 -1
- package/src/components/Toolbar/ToolbarItem.tsx +2 -1
- package/src/components/Toolbar/index.tsx +2 -1
- package/src/components/Typography/Text/index.tsx +3 -2
- package/src/testHelpers/renderWithTheme.tsx +2 -1
- package/src/theme/ThemeProvider.ts +1 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +24 -26
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +1 -1
- package/src/theme/components/avatar.ts +1 -1
- package/src/theme/components/badge.ts +1 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +1 -1
- package/src/theme/components/button.ts +1 -1
- package/src/theme/components/calendar.ts +1 -1
- package/src/theme/components/card.ts +1 -1
- package/src/theme/components/checkbox.ts +12 -8
- package/src/theme/components/contentNavigator.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +1 -1
- package/src/theme/components/empty.ts +1 -1
- package/src/theme/components/fab.ts +1 -1
- package/src/theme/components/icon.ts +1 -1
- package/src/theme/components/list.ts +5 -4
- package/src/theme/components/pinInput.ts +1 -1
- package/src/theme/components/progress.ts +1 -1
- package/src/theme/components/radio.ts +3 -11
- package/src/theme/components/richTextEditor.ts +1 -1
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/spinner.ts +1 -1
- package/src/theme/components/switch.ts +7 -8
- package/src/theme/components/tabs.ts +1 -1
- package/src/theme/components/tag.ts +1 -1
- package/src/theme/components/textInput.ts +1 -1
- package/src/theme/components/toast.ts +1 -1
- package/src/theme/components/toolbar.ts +1 -1
- package/src/theme/components/typography.ts +1 -1
- package/src/theme/getTheme.ts +4 -11
- package/src/theme/global/borders.ts +2 -1
- package/src/theme/global/colors/swag.ts +2 -3
- package/src/theme/global/colors/work.ts +1 -2
- package/src/theme/global/index.ts +6 -11
- package/src/theme/global/scale.ts +2 -1
- package/src/theme/global/space.ts +2 -1
- package/src/theme/global/typography.ts +2 -8
- package/src/theme/index.ts +5 -2
- package/src/types.ts +9 -10
- package/testUtils/setup.tsx +2 -0
- package/tsconfig.json +4 -9
- package/types/components/Accordion/AccordionItem.d.ts +3 -3
- package/types/components/Accordion/index.d.ts +3 -2
- package/types/components/Alert/StyledAlert.d.ts +2 -1
- package/types/components/Alert/index.d.ts +3 -3
- package/types/components/Avatar/index.d.ts +1 -1
- package/types/components/Badge/Status.d.ts +2 -2
- package/types/components/Badge/index.d.ts +2 -1
- package/types/components/BottomNavigation/index.d.ts +3 -3
- package/types/components/BottomSheet/Footer.d.ts +1 -1
- package/types/components/BottomSheet/Header.d.ts +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +2 -1
- package/types/components/BottomSheet/index.d.ts +2 -2
- package/types/components/Button/Button.d.ts +4 -4
- package/types/components/Button/IconButton.d.ts +2 -2
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +3 -2
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +3 -2
- package/types/components/Button/UtilityButton/index.d.ts +3 -3
- package/types/components/Button/index.d.ts +2 -2
- package/types/components/Calendar/StyledCalendar.d.ts +2 -1
- package/types/components/Card/DataCard/index.d.ts +2 -2
- package/types/components/Card/index.d.ts +2 -2
- package/types/components/Checkbox/StyledCheckbox.d.ts +21 -3
- package/types/components/Checkbox/index.d.ts +11 -3
- package/types/components/Collapse/index.d.ts +2 -2
- package/types/components/ContentNavigator/index.d.ts +1 -1
- package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +2 -1
- package/types/components/DatePicker/index.d.ts +1 -1
- package/types/components/DatePicker/types.d.ts +1 -1
- package/types/components/Divider/index.d.ts +1 -1
- package/types/components/Drawer/DragableDrawer/index.d.ts +1 -1
- package/types/components/Drawer/StyledDrawer.d.ts +2 -1
- package/types/components/Drawer/index.d.ts +1 -1
- package/types/components/Empty/index.d.ts +1 -1
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -2
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +3 -2
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -2
- package/types/components/FAB/ActionGroup/index.d.ts +3 -3
- package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
- package/types/components/FAB/FAB.d.ts +2 -2
- package/types/components/FAB/StyledFAB.d.ts +3 -2
- package/types/components/Icon/AnimatedIcon.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/List/BasicListItem.d.ts +2 -2
- package/types/components/List/ListItem.d.ts +4 -3
- package/types/components/PinInput/PinCell.d.ts +1 -1
- package/types/components/PinInput/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +1 -1
- package/types/components/Progress/StyledProgressBar.d.ts +3 -2
- package/types/components/Progress/StyledProgressCircle.d.ts +3 -2
- package/types/components/Radio/Radio.d.ts +2 -2
- package/types/components/Radio/RadioGroup.d.ts +3 -3
- package/types/components/Radio/StyledRadio.d.ts +2 -12
- package/types/components/RichTextEditor/RichTextEditor.d.ts +3 -2
- package/types/components/RichTextEditor/index.d.ts +3 -2
- package/types/components/SectionHeading/index.d.ts +3 -3
- package/types/components/Select/MultiSelect/Option.d.ts +1 -1
- package/types/components/Select/MultiSelect/OptionList.d.ts +2 -2
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +1 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +2 -2
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/StyledOptionList.d.ts +4 -4
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Select/index.d.ts +4 -3
- package/types/components/Select/types.d.ts +3 -3
- package/types/components/Spinner/StyledSpinner.d.ts +2 -1
- package/types/components/Spinner/index.d.ts +2 -2
- package/types/components/Switch/StyledSwitch.d.ts +3 -18
- package/types/components/{Radio/__tests__/StyledRadio.spec.d.ts → Switch/__tests__/StyledSwitch.spec.d.ts} +0 -0
- package/types/components/Switch/index.d.ts +3 -2
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/index.d.ts +3 -3
- package/types/components/Tag/index.d.ts +1 -1
- package/types/components/TextInput/index.d.ts +3 -3
- package/types/components/TimePicker/StyledTimePicker.d.ts +2 -1
- package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
- package/types/components/TimePicker/index.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +1 -1
- package/types/components/Toast/StyledToast.d.ts +2 -1
- package/types/components/Toast/Toast.d.ts +1 -1
- package/types/components/Toast/ToastContainer.d.ts +2 -2
- package/types/components/Toast/ToastContext.d.ts +1 -1
- package/types/components/Toast/ToastProvider.d.ts +2 -2
- package/types/components/Toast/types.d.ts +3 -3
- package/types/components/Toolbar/StyledToolbar.d.ts +2 -1
- package/types/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/components/Toolbar/index.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +2 -2
- package/types/testHelpers/renderWithTheme.d.ts +1 -1
- package/types/theme/ThemeProvider.d.ts +1 -1
- package/types/theme/components/accordion.d.ts +1 -1
- package/types/theme/components/alert.d.ts +1 -1
- package/types/theme/components/avatar.d.ts +1 -1
- package/types/theme/components/badge.d.ts +1 -1
- package/types/theme/components/bottomNavigation.d.ts +1 -1
- package/types/theme/components/bottomSheet.d.ts +1 -1
- package/types/theme/components/button.d.ts +1 -1
- package/types/theme/components/calendar.d.ts +1 -1
- package/types/theme/components/card.d.ts +1 -1
- package/types/theme/components/checkbox.d.ts +10 -7
- package/types/theme/components/contentNavigator.d.ts +1 -1
- package/types/theme/components/divider.d.ts +1 -1
- package/types/theme/components/drawer.d.ts +1 -1
- package/types/theme/components/empty.d.ts +1 -1
- package/types/theme/components/fab.d.ts +1 -1
- package/types/theme/components/icon.d.ts +1 -1
- package/types/theme/components/list.d.ts +8 -7
- package/types/theme/components/pinInput.d.ts +1 -1
- package/types/theme/components/progress.d.ts +1 -1
- package/types/theme/components/radio.d.ts +1 -8
- package/types/theme/components/richTextEditor.d.ts +1 -1
- package/types/theme/components/sectionHeading.d.ts +1 -1
- package/types/theme/components/select.d.ts +1 -1
- package/types/theme/components/spinner.d.ts +1 -1
- package/types/theme/components/switch.d.ts +7 -6
- package/types/theme/components/tabs.d.ts +1 -1
- package/types/theme/components/tag.d.ts +1 -1
- package/types/theme/components/textInput.d.ts +1 -1
- package/types/theme/components/toast.d.ts +1 -1
- package/types/theme/components/toolbar.d.ts +1 -1
- package/types/theme/components/typography.d.ts +1 -1
- package/types/theme/getTheme.d.ts +2 -2
- package/types/theme/global/borders.d.ts +2 -1
- package/types/theme/global/colors/swag.d.ts +1 -1
- package/types/theme/global/colors/work.d.ts +1 -1
- package/types/theme/global/index.d.ts +5 -3
- package/types/theme/global/scale.d.ts +2 -1
- package/types/theme/global/space.d.ts +2 -1
- package/types/theme/global/typography.d.ts +2 -1
- package/types/theme/index.d.ts +4 -2
- package/types/types.d.ts +9 -8
- package/src/components/Radio/__tests__/StyledRadio.spec.tsx +0 -43
- package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +0 -124
- package/src/components/Switch/__tests__/StyledHeading.spec.tsx +0 -42
- package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[32m@hero-design/rn:build[0m: cache hit, replaying output [
|
|
1
|
+
[32m@hero-design/rn:build[0m: cache hit, replaying output [2m06ac3ee82e3be55b[0m
|
|
2
2
|
[32m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
3
|
[32m@hero-design/rn:build: [0m$ rollup -c
|
|
4
4
|
[32m@hero-design/rn:build: [0m[36m
|
|
5
5
|
[32m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
6
|
[32m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
7
|
[32m@hero-design/rn:build: [0m[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
8
|
-
[32m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
8
|
+
[32m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m21.1s[22m[39m
|
|
9
9
|
[32m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly
|
package/es/index.js
CHANGED
|
@@ -1761,23 +1761,26 @@ var getCardTheme = function getCardTheme(theme) {
|
|
|
1761
1761
|
|
|
1762
1762
|
var getCheckboxTheme = function getCheckboxTheme(theme) {
|
|
1763
1763
|
var colors = {
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
disabled: theme.colors.inactiveBackground
|
|
1764
|
+
"default": theme.colors.globalPrimary,
|
|
1765
|
+
disabledBorder: theme.colors.globalPrimaryLight
|
|
1767
1766
|
};
|
|
1768
1767
|
var space = {
|
|
1769
1768
|
// to remove the empty space above the check icon
|
|
1770
1769
|
// and also to center the check mark
|
|
1771
|
-
iconTop: -
|
|
1770
|
+
iconTop: -scale(3),
|
|
1771
|
+
wrapperPadding: theme.space.medium,
|
|
1772
|
+
iconDescriptionPadding: theme.space.smallMedium
|
|
1772
1773
|
};
|
|
1773
1774
|
var sizes = {
|
|
1774
|
-
|
|
1775
|
+
icon: scale(20)
|
|
1775
1776
|
};
|
|
1776
1777
|
var radii = {
|
|
1777
|
-
|
|
1778
|
+
wrapper: theme.radii.medium,
|
|
1779
|
+
icon: theme.radii.base
|
|
1778
1780
|
};
|
|
1779
1781
|
var borderWidths = {
|
|
1780
|
-
|
|
1782
|
+
wrapper: theme.borderWidths.base,
|
|
1783
|
+
icon: theme.borderWidths.medium
|
|
1781
1784
|
};
|
|
1782
1785
|
return {
|
|
1783
1786
|
colors: colors,
|
|
@@ -2007,11 +2010,12 @@ var getListTheme = function getListTheme(theme) {
|
|
|
2007
2010
|
cardShadow: theme.radii.base,
|
|
2008
2011
|
leadingStatus: theme.radii.rounded
|
|
2009
2012
|
};
|
|
2010
|
-
var
|
|
2011
|
-
|
|
2013
|
+
var shadows = {
|
|
2014
|
+
cardOffset: {
|
|
2012
2015
|
width: 0,
|
|
2013
2016
|
height: 2
|
|
2014
|
-
}
|
|
2017
|
+
},
|
|
2018
|
+
cardElevation: 10
|
|
2015
2019
|
};
|
|
2016
2020
|
var widths = {
|
|
2017
2021
|
leadingStatus: 8
|
|
@@ -2025,9 +2029,9 @@ var getListTheme = function getListTheme(theme) {
|
|
|
2025
2029
|
colors: colors,
|
|
2026
2030
|
space: space,
|
|
2027
2031
|
radii: radii,
|
|
2028
|
-
offsets: offsets,
|
|
2029
2032
|
widths: widths,
|
|
2030
|
-
opacity: opacity
|
|
2033
|
+
opacity: opacity,
|
|
2034
|
+
shadows: shadows
|
|
2031
2035
|
};
|
|
2032
2036
|
};
|
|
2033
2037
|
|
|
@@ -2100,13 +2104,9 @@ var getProgressTheme = function getProgressTheme(theme) {
|
|
|
2100
2104
|
|
|
2101
2105
|
var getRadioTheme = function getRadioTheme(theme) {
|
|
2102
2106
|
var colors = {
|
|
2103
|
-
circle: theme.colors.
|
|
2104
|
-
checkedCircle: theme.colors.primary,
|
|
2105
|
-
wrapper: theme.colors.platformBackground,
|
|
2106
|
-
checkedWrapper: theme.colors.primaryBackground
|
|
2107
|
+
circle: theme.colors.globalPrimary
|
|
2107
2108
|
};
|
|
2108
2109
|
var space = {
|
|
2109
|
-
wrapperPadding: theme.space.medium,
|
|
2110
2110
|
circleLeftMargin: theme.space.small,
|
|
2111
2111
|
groupTopMargin: theme.space.xsmall
|
|
2112
2112
|
};
|
|
@@ -2117,15 +2117,11 @@ var getRadioTheme = function getRadioTheme(theme) {
|
|
|
2117
2117
|
var borderWidths = {
|
|
2118
2118
|
circle: theme.borderWidths.medium
|
|
2119
2119
|
};
|
|
2120
|
-
var radii = {
|
|
2121
|
-
wrapper: theme.radii.base
|
|
2122
|
-
};
|
|
2123
2120
|
return {
|
|
2124
2121
|
sizes: sizes,
|
|
2125
2122
|
borderWidths: borderWidths,
|
|
2126
2123
|
space: space,
|
|
2127
|
-
colors: colors
|
|
2128
|
-
radii: radii
|
|
2124
|
+
colors: colors
|
|
2129
2125
|
};
|
|
2130
2126
|
};
|
|
2131
2127
|
|
|
@@ -2221,9 +2217,13 @@ var getSpinnerTheme = function getSpinnerTheme(theme) {
|
|
|
2221
2217
|
|
|
2222
2218
|
var getSwitchTheme = function getSwitchTheme(theme) {
|
|
2223
2219
|
var colors = {
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2220
|
+
backgroundColors: {
|
|
2221
|
+
checked: theme.colors.primary,
|
|
2222
|
+
unchecked: theme.colors.globalPrimaryLight,
|
|
2223
|
+
'disabled-checked': theme.colors.primaryLight,
|
|
2224
|
+
'disabled-unchecked': theme.colors.archived
|
|
2225
|
+
},
|
|
2226
|
+
thumb: theme.colors.platformBackground
|
|
2227
2227
|
};
|
|
2228
2228
|
var thumbSizes = {
|
|
2229
2229
|
small: theme.space.medium,
|
|
@@ -2245,17 +2245,13 @@ var getSwitchTheme = function getSwitchTheme(theme) {
|
|
|
2245
2245
|
var radii = {
|
|
2246
2246
|
rounded: theme.radii.rounded
|
|
2247
2247
|
};
|
|
2248
|
-
var borderWidths = {
|
|
2249
|
-
"default": theme.borderWidths.base
|
|
2250
|
-
};
|
|
2251
2248
|
return {
|
|
2252
2249
|
colors: colors,
|
|
2253
2250
|
thumbSizes: thumbSizes,
|
|
2254
2251
|
widths: widths,
|
|
2255
2252
|
heights: heights,
|
|
2256
2253
|
spaces: spaces,
|
|
2257
|
-
radii: radii
|
|
2258
|
-
borderWidths: borderWidths
|
|
2254
|
+
radii: radii
|
|
2259
2255
|
};
|
|
2260
2256
|
};
|
|
2261
2257
|
|
|
@@ -14563,7 +14559,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
14563
14559
|
fontSize: "large",
|
|
14564
14560
|
fontWeight: "semi-bold"
|
|
14565
14561
|
}, header) : header, /*#__PURE__*/React.createElement(Icon, {
|
|
14566
|
-
icon:
|
|
14562
|
+
icon: open ? 'arrow-up' : 'arrow-down',
|
|
14567
14563
|
intent: "primary",
|
|
14568
14564
|
size: "small"
|
|
14569
14565
|
})), /*#__PURE__*/React.createElement(StyledCollapse, {
|
|
@@ -18309,7 +18305,7 @@ function convertToFP(fn, arity, a) {
|
|
|
18309
18305
|
var format = convertToFP(format$1, 2);
|
|
18310
18306
|
var formatTime = format;
|
|
18311
18307
|
|
|
18312
|
-
var Wrapper
|
|
18308
|
+
var Wrapper = index$7(View)(function () {
|
|
18313
18309
|
return {
|
|
18314
18310
|
flex: 1,
|
|
18315
18311
|
flexDirection: 'row',
|
|
@@ -18336,7 +18332,7 @@ function ContentNavigator(_ref) {
|
|
|
18336
18332
|
fontSize = _ref$fontSize === void 0 ? 'medium' : _ref$fontSize,
|
|
18337
18333
|
testID = _ref.testID,
|
|
18338
18334
|
style = _ref.style;
|
|
18339
|
-
return /*#__PURE__*/React.createElement(Wrapper
|
|
18335
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
18340
18336
|
testID: testID,
|
|
18341
18337
|
style: style
|
|
18342
18338
|
}, /*#__PURE__*/React.createElement(CompoundButton.Icon, {
|
|
@@ -18683,42 +18679,73 @@ var index$6 = Object.assign(Card, {
|
|
|
18683
18679
|
|
|
18684
18680
|
var StyledWrapper$5 = index$7(TouchableOpacity)(function (_ref) {
|
|
18685
18681
|
var theme = _ref.theme,
|
|
18686
|
-
|
|
18682
|
+
themeWithBorder = _ref.themeWithBorder,
|
|
18683
|
+
themeDisabled = _ref.themeDisabled;
|
|
18684
|
+
var borderStyle = {
|
|
18685
|
+
borderRadius: theme.__hd__.checkbox.radii.wrapper,
|
|
18686
|
+
borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
|
|
18687
|
+
padding: theme.__hd__.checkbox.space.wrapperPadding,
|
|
18688
|
+
borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
|
|
18689
|
+
};
|
|
18690
|
+
return _objectSpread2({
|
|
18691
|
+
flexDirection: 'row'
|
|
18692
|
+
}, themeWithBorder && borderStyle);
|
|
18693
|
+
});
|
|
18694
|
+
var StyledDescription$1 = index$7(Typography.Text)(function (_ref2) {
|
|
18695
|
+
var theme = _ref2.theme;
|
|
18696
|
+
return {
|
|
18697
|
+
paddingRight: theme.__hd__.checkbox.space.iconDescriptionPadding,
|
|
18698
|
+
flex: 1
|
|
18699
|
+
};
|
|
18700
|
+
});
|
|
18701
|
+
var StyledCheckbox = index$7(View)(function (_ref3) {
|
|
18702
|
+
var theme = _ref3.theme,
|
|
18703
|
+
themeDisabled = _ref3.themeDisabled;
|
|
18687
18704
|
return {
|
|
18688
|
-
display: 'flex',
|
|
18689
18705
|
flexDirection: 'row',
|
|
18690
18706
|
justifyContent: 'center',
|
|
18691
|
-
height: theme.__hd__.checkbox.sizes.
|
|
18692
|
-
width: theme.__hd__.checkbox.sizes.
|
|
18693
|
-
borderRadius: theme.__hd__.checkbox.radii.
|
|
18694
|
-
borderWidth: theme.__hd__.checkbox.borderWidths
|
|
18695
|
-
borderColor:
|
|
18707
|
+
height: theme.__hd__.checkbox.sizes.icon,
|
|
18708
|
+
width: theme.__hd__.checkbox.sizes.icon,
|
|
18709
|
+
borderRadius: theme.__hd__.checkbox.radii.icon,
|
|
18710
|
+
borderWidth: theme.__hd__.checkbox.borderWidths.icon,
|
|
18711
|
+
borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"],
|
|
18696
18712
|
overflow: 'hidden'
|
|
18697
18713
|
};
|
|
18698
18714
|
});
|
|
18715
|
+
var StyledCheckMark = index$7(Icon)(function (_ref4) {
|
|
18716
|
+
var theme = _ref4.theme;
|
|
18717
|
+
return {
|
|
18718
|
+
position: 'absolute',
|
|
18719
|
+
top: theme.__hd__.checkbox.space.iconTop
|
|
18720
|
+
};
|
|
18721
|
+
});
|
|
18699
18722
|
|
|
18700
|
-
var
|
|
18723
|
+
var Checkbox = function Checkbox(_ref) {
|
|
18701
18724
|
var checked = _ref.checked,
|
|
18702
|
-
|
|
18725
|
+
description = _ref.description,
|
|
18726
|
+
_ref$withBorder = _ref.withBorder,
|
|
18727
|
+
withBorder = _ref$withBorder === void 0 ? false : _ref$withBorder,
|
|
18728
|
+
_ref$disabled = _ref.disabled,
|
|
18729
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
18703
18730
|
onPress = _ref.onPress,
|
|
18704
18731
|
style = _ref.style,
|
|
18705
18732
|
testID = _ref.testID;
|
|
18706
18733
|
return /*#__PURE__*/React.createElement(StyledWrapper$5, {
|
|
18707
18734
|
onPress: onPress,
|
|
18708
18735
|
disabled: disabled,
|
|
18736
|
+
themeDisabled: disabled,
|
|
18737
|
+
themeWithBorder: withBorder,
|
|
18709
18738
|
style: style,
|
|
18710
18739
|
testID: testID
|
|
18711
|
-
},
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
|
|
18717
|
-
|
|
18718
|
-
|
|
18719
|
-
|
|
18720
|
-
} : {})
|
|
18721
|
-
}));
|
|
18740
|
+
}, !!description && /*#__PURE__*/React.createElement(StyledDescription$1, {
|
|
18741
|
+
intent: disabled ? 'subdued' : 'body'
|
|
18742
|
+
}, description), /*#__PURE__*/React.createElement(StyledCheckbox, {
|
|
18743
|
+
themeDisabled: disabled
|
|
18744
|
+
}, checked && /*#__PURE__*/React.createElement(StyledCheckMark, {
|
|
18745
|
+
icon: "box-check",
|
|
18746
|
+
intent: disabled ? 'disabled-text' : 'text',
|
|
18747
|
+
testID: "check-mark"
|
|
18748
|
+
})));
|
|
18722
18749
|
};
|
|
18723
18750
|
|
|
18724
18751
|
var StyledContainer$3 = index$7(View)(function (_ref) {
|
|
@@ -18869,7 +18896,7 @@ var StyledErrorAndMaxLengthContainer = index$7(View)(function () {
|
|
|
18869
18896
|
});
|
|
18870
18897
|
|
|
18871
18898
|
var _excluded$5 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue"];
|
|
18872
|
-
var getVariant = function getVariant(_ref) {
|
|
18899
|
+
var getVariant$1 = function getVariant(_ref) {
|
|
18873
18900
|
var disabled = _ref.disabled,
|
|
18874
18901
|
error = _ref.error,
|
|
18875
18902
|
editable = _ref.editable,
|
|
@@ -18934,7 +18961,7 @@ var TextInput = function TextInput(_ref2) {
|
|
|
18934
18961
|
isFocused = _React$useState2[0],
|
|
18935
18962
|
setIsFocused = _React$useState2[1];
|
|
18936
18963
|
|
|
18937
|
-
var variant = getVariant({
|
|
18964
|
+
var variant = getVariant$1({
|
|
18938
18965
|
disabled: disabled,
|
|
18939
18966
|
error: error,
|
|
18940
18967
|
editable: editable,
|
|
@@ -19857,8 +19884,9 @@ var StyledListItemContainer$1 = index$7(TouchableHighlight)(function (_ref) {
|
|
|
19857
19884
|
borderRadius: theme.__hd__.list.radii.card,
|
|
19858
19885
|
shadowColor: theme.colors.shadow,
|
|
19859
19886
|
shadowRadius: theme.__hd__.list.radii.cardShadow,
|
|
19860
|
-
shadowOffset: theme.__hd__.list.
|
|
19861
|
-
shadowOpacity: theme.__hd__.list.opacity.cardShadow
|
|
19887
|
+
shadowOffset: theme.__hd__.list.shadows.cardOffset,
|
|
19888
|
+
shadowOpacity: theme.__hd__.list.opacity.cardShadow,
|
|
19889
|
+
elevation: theme.__hd__.list.shadows.cardElevation
|
|
19862
19890
|
});
|
|
19863
19891
|
|
|
19864
19892
|
default:
|
|
@@ -20613,70 +20641,60 @@ var Spinner = function Spinner(_ref) {
|
|
|
20613
20641
|
}, /*#__PURE__*/React.createElement(AnimatedSpinner, null)));
|
|
20614
20642
|
};
|
|
20615
20643
|
|
|
20616
|
-
var
|
|
20617
|
-
var theme = _ref.theme
|
|
20618
|
-
themeChecked = _ref.themeChecked;
|
|
20619
|
-
return {
|
|
20620
|
-
flexDirection: 'row',
|
|
20621
|
-
justifyContent: 'space-between',
|
|
20622
|
-
alignItems: 'center',
|
|
20623
|
-
borderRadius: theme.__hd__.radio.radii.wrapper,
|
|
20624
|
-
padding: theme.__hd__.radio.space.wrapperPadding,
|
|
20625
|
-
backgroundColor: themeChecked ? theme.__hd__.radio.colors.checkedWrapper : theme.__hd__.radio.colors.wrapper
|
|
20626
|
-
};
|
|
20627
|
-
});
|
|
20628
|
-
var Circle = index$7(View)(function (_ref2) {
|
|
20629
|
-
var theme = _ref2.theme,
|
|
20630
|
-
themeChecked = _ref2.themeChecked;
|
|
20644
|
+
var Circle = index$7(View)(function (_ref) {
|
|
20645
|
+
var theme = _ref.theme;
|
|
20631
20646
|
return {
|
|
20632
20647
|
height: theme.__hd__.radio.sizes.circle,
|
|
20633
20648
|
width: theme.__hd__.radio.sizes.circle,
|
|
20634
20649
|
borderRadius: theme.radii.rounded,
|
|
20635
20650
|
borderWidth: theme.__hd__.radio.borderWidths.circle,
|
|
20636
|
-
borderColor:
|
|
20651
|
+
borderColor: theme.__hd__.radio.colors.circle,
|
|
20637
20652
|
alignItems: 'center',
|
|
20638
20653
|
justifyContent: 'center'
|
|
20639
20654
|
};
|
|
20640
20655
|
});
|
|
20641
|
-
var InnerCircle = index$7(View)(function (
|
|
20642
|
-
var theme =
|
|
20656
|
+
var InnerCircle = index$7(View)(function (_ref2) {
|
|
20657
|
+
var theme = _ref2.theme;
|
|
20643
20658
|
return {
|
|
20644
20659
|
height: theme.__hd__.radio.sizes.innerCircle,
|
|
20645
20660
|
width: theme.__hd__.radio.sizes.innerCircle,
|
|
20646
20661
|
borderRadius: theme.radii.rounded,
|
|
20647
|
-
backgroundColor: theme.__hd__.radio.colors.
|
|
20662
|
+
backgroundColor: theme.__hd__.radio.colors.circle
|
|
20648
20663
|
};
|
|
20649
20664
|
});
|
|
20650
|
-
var Spacer = index$7(View)(function (
|
|
20651
|
-
var theme =
|
|
20665
|
+
var Spacer = index$7(View)(function (_ref3) {
|
|
20666
|
+
var theme = _ref3.theme;
|
|
20652
20667
|
return {
|
|
20653
20668
|
marginTop: theme.__hd__.radio.space.groupTopMargin
|
|
20654
20669
|
};
|
|
20655
20670
|
});
|
|
20656
20671
|
|
|
20657
|
-
var
|
|
20658
|
-
var
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20672
|
+
var RadioCircle = function RadioCircle(_ref) {
|
|
20673
|
+
var checked = _ref.checked,
|
|
20674
|
+
text = _ref.text;
|
|
20675
|
+
return /*#__PURE__*/React.createElement(Circle, null, checked && /*#__PURE__*/React.createElement(InnerCircle, {
|
|
20676
|
+
testID: "".concat(text, "-selected-circle")
|
|
20677
|
+
}));
|
|
20678
|
+
};
|
|
20679
|
+
|
|
20680
|
+
var Radio = function Radio(_ref2) {
|
|
20681
|
+
var text = _ref2.text,
|
|
20682
|
+
_ref2$checked = _ref2.checked,
|
|
20683
|
+
checked = _ref2$checked === void 0 ? false : _ref2$checked,
|
|
20684
|
+
onPress = _ref2.onPress,
|
|
20685
|
+
style = _ref2.style,
|
|
20686
|
+
testID = _ref2.testID;
|
|
20687
|
+
return /*#__PURE__*/React.createElement(List.BasicItem, {
|
|
20665
20688
|
onPress: onPress,
|
|
20666
|
-
|
|
20689
|
+
selected: checked,
|
|
20690
|
+
title: text,
|
|
20691
|
+
suffix: /*#__PURE__*/React.createElement(RadioCircle, {
|
|
20692
|
+
checked: checked,
|
|
20693
|
+
text: text
|
|
20694
|
+
}),
|
|
20667
20695
|
style: style,
|
|
20668
20696
|
testID: testID
|
|
20669
|
-
}
|
|
20670
|
-
style: {
|
|
20671
|
-
flex: 1
|
|
20672
|
-
}
|
|
20673
|
-
}, /*#__PURE__*/React.createElement(Typography.Text, {
|
|
20674
|
-
fontSize: "large"
|
|
20675
|
-
}, text)), /*#__PURE__*/React.createElement(Circle, {
|
|
20676
|
-
themeChecked: checked
|
|
20677
|
-
}, checked && /*#__PURE__*/React.createElement(InnerCircle, {
|
|
20678
|
-
testID: "".concat(text, "-selected-circle")
|
|
20679
|
-
})));
|
|
20697
|
+
});
|
|
20680
20698
|
};
|
|
20681
20699
|
|
|
20682
20700
|
function getKey(option, index, keyExtractor) {
|
|
@@ -21067,6 +21085,8 @@ function MultiSelect(_ref) {
|
|
|
21067
21085
|
onPress: function onPress() {
|
|
21068
21086
|
return setOpen(true);
|
|
21069
21087
|
}
|
|
21088
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
21089
|
+
pointerEvents: "none"
|
|
21070
21090
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
21071
21091
|
label: label,
|
|
21072
21092
|
value: displayedValue,
|
|
@@ -21080,7 +21100,7 @@ function MultiSelect(_ref) {
|
|
|
21080
21100
|
pointerEvents: "none",
|
|
21081
21101
|
style: style,
|
|
21082
21102
|
testID: testID
|
|
21083
|
-
}))), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
21103
|
+
})))), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
21084
21104
|
open: open,
|
|
21085
21105
|
onRequestClose: function onRequestClose() {
|
|
21086
21106
|
return setOpen(false);
|
|
@@ -21221,6 +21241,8 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21221
21241
|
onPress: function onPress() {
|
|
21222
21242
|
return setOpen(true);
|
|
21223
21243
|
}
|
|
21244
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
21245
|
+
pointerEvents: "none"
|
|
21224
21246
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
21225
21247
|
label: label,
|
|
21226
21248
|
value: displayedValue,
|
|
@@ -21234,7 +21256,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
21234
21256
|
pointerEvents: "none",
|
|
21235
21257
|
style: style,
|
|
21236
21258
|
testID: testID
|
|
21237
|
-
}))), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
21259
|
+
})))), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
21238
21260
|
open: open,
|
|
21239
21261
|
onRequestClose: function onRequestClose() {
|
|
21240
21262
|
return setOpen(false);
|
|
@@ -21270,43 +21292,21 @@ var index$3 = Object.assign(SingleSelect, {
|
|
|
21270
21292
|
|
|
21271
21293
|
var StyledWrapper = index$7(View)(function (_ref) {
|
|
21272
21294
|
var theme = _ref.theme,
|
|
21273
|
-
|
|
21295
|
+
themeVariant = _ref.themeVariant,
|
|
21274
21296
|
themeSize = _ref.themeSize;
|
|
21275
21297
|
return {
|
|
21276
21298
|
height: theme.__hd__["switch"].heights[themeSize],
|
|
21277
21299
|
width: theme.__hd__["switch"].widths[themeSize],
|
|
21278
21300
|
paddingHorizontal: theme.__hd__["switch"].spaces[themeSize],
|
|
21279
21301
|
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
21280
|
-
backgroundColor:
|
|
21281
|
-
};
|
|
21282
|
-
});
|
|
21283
|
-
var StyledDisabledWrapper = index$7(View)(function (_ref2) {
|
|
21284
|
-
var theme = _ref2.theme,
|
|
21285
|
-
themeSize = _ref2.themeSize;
|
|
21286
|
-
return {
|
|
21287
|
-
position: 'absolute',
|
|
21288
|
-
height: theme.__hd__["switch"].heights[themeSize],
|
|
21289
|
-
width: theme.__hd__["switch"].widths[themeSize],
|
|
21290
|
-
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
21291
|
-
backgroundColor: theme.__hd__["switch"].colors.thumb,
|
|
21292
|
-
zIndex: 9999,
|
|
21293
|
-
opacity: 0.8
|
|
21294
|
-
};
|
|
21295
|
-
});
|
|
21296
|
-
var StyledThumbWrapper = index$7(View)(function (_ref3) {
|
|
21297
|
-
var theme = _ref3.theme,
|
|
21298
|
-
themeSize = _ref3.themeSize;
|
|
21299
|
-
return {
|
|
21300
|
-
height: theme.__hd__["switch"].heights[themeSize],
|
|
21301
|
-
width: theme.__hd__["switch"].widths[themeSize],
|
|
21302
|
-
borderRadius: theme.__hd__["switch"].radii.rounded,
|
|
21302
|
+
backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
|
|
21303
21303
|
display: 'flex',
|
|
21304
21304
|
justifyContent: 'center'
|
|
21305
21305
|
};
|
|
21306
21306
|
});
|
|
21307
|
-
var StyledKnot = index$7(Animated.View)(function (
|
|
21308
|
-
var theme =
|
|
21309
|
-
themeSize =
|
|
21307
|
+
var StyledKnot = index$7(Animated.View)(function (_ref2) {
|
|
21308
|
+
var theme = _ref2.theme,
|
|
21309
|
+
themeSize = _ref2.themeSize;
|
|
21310
21310
|
return {
|
|
21311
21311
|
width: theme.__hd__["switch"].thumbSizes[themeSize],
|
|
21312
21312
|
height: theme.__hd__["switch"].thumbSizes[themeSize],
|
|
@@ -21315,16 +21315,32 @@ var StyledKnot = index$7(Animated.View)(function (_ref4) {
|
|
|
21315
21315
|
};
|
|
21316
21316
|
});
|
|
21317
21317
|
|
|
21318
|
-
var
|
|
21319
|
-
var
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21318
|
+
var getVariant = function getVariant(_ref) {
|
|
21319
|
+
var disabled = _ref.disabled,
|
|
21320
|
+
checked = _ref.checked;
|
|
21321
|
+
|
|
21322
|
+
if (disabled) {
|
|
21323
|
+
return checked ? 'disabled-checked' : 'disabled-unchecked';
|
|
21324
|
+
}
|
|
21325
|
+
|
|
21326
|
+
return checked ? 'checked' : 'unchecked';
|
|
21327
|
+
};
|
|
21328
|
+
|
|
21329
|
+
var Switch = function Switch(_ref2) {
|
|
21330
|
+
var _ref2$size = _ref2.size,
|
|
21331
|
+
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
21332
|
+
_ref2$disabled = _ref2.disabled,
|
|
21333
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
21334
|
+
_ref2$checked = _ref2.checked,
|
|
21335
|
+
checked = _ref2$checked === void 0 ? false : _ref2$checked,
|
|
21336
|
+
onPress = _ref2.onPress,
|
|
21337
|
+
style = _ref2.style,
|
|
21338
|
+
testID = _ref2.testID;
|
|
21327
21339
|
var theme = useTheme$1();
|
|
21340
|
+
var variant = getVariant({
|
|
21341
|
+
disabled: disabled,
|
|
21342
|
+
checked: checked
|
|
21343
|
+
});
|
|
21328
21344
|
var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].thumbSizes[size] - theme.__hd__["switch"].spaces[size] * 2 : theme.__hd__["switch"].spaces.inactive;
|
|
21329
21345
|
|
|
21330
21346
|
var _useState = useState(function () {
|
|
@@ -21345,19 +21361,15 @@ var Switch = function Switch(_ref) {
|
|
|
21345
21361
|
onPress: onPress,
|
|
21346
21362
|
disabled: disabled
|
|
21347
21363
|
}, /*#__PURE__*/React.createElement(StyledWrapper, {
|
|
21348
|
-
|
|
21364
|
+
themeVariant: variant,
|
|
21349
21365
|
themeSize: size,
|
|
21350
21366
|
style: style
|
|
21351
|
-
}, disabled && /*#__PURE__*/React.createElement(StyledDisabledWrapper, {
|
|
21352
|
-
themeSize: size
|
|
21353
|
-
}), /*#__PURE__*/React.createElement(StyledThumbWrapper, {
|
|
21354
|
-
themeSize: size
|
|
21355
21367
|
}, /*#__PURE__*/React.createElement(StyledKnot, {
|
|
21356
21368
|
themeSize: size,
|
|
21357
21369
|
style: {
|
|
21358
21370
|
left: animatedOffset
|
|
21359
21371
|
}
|
|
21360
|
-
})))
|
|
21372
|
+
})));
|
|
21361
21373
|
};
|
|
21362
21374
|
|
|
21363
21375
|
var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
|
|
@@ -40654,4 +40666,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
40654
40666
|
Toolbar: EditorToolbar
|
|
40655
40667
|
});
|
|
40656
40668
|
|
|
40657
|
-
export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, Calendar, index$6 as Card,
|
|
40669
|
+
export { Accordion, Alert, Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet, CompoundButton as Button, Calendar, index$6 as Card, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$5 as Drawer, Empty, index$4 as FAB, Icon, List, PinInput, Progress, CompoundRadio as Radio, index as RichTextEditor, SectionHeading, index$3 as Select, Spinner, Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, TimePicker, Toast, index$1 as Toolbar, Typography, getTheme$1 as getTheme, scale, swagSystemPalette, defaultTheme as theme, useTheme, workSystemPalette };
|