@idea-fragments/react-components-zendesk 0.1.1 → 0.1.2
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/alert.js +2701 -3288
- package/dist/alert.js.map +1 -1
- package/dist/index.js +1002 -0
- package/dist/index.js.map +1 -0
- package/dist/types/components/forms/selectors/Dropdown/Item.d.ts +1 -1
- package/dist/types/components/tags/Chip.d.ts +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +14 -3
- package/.node-version +0 -1
- package/.storybook/ThemeProvider.tsx +0 -15
- package/.storybook/main.js +0 -13
- package/.storybook/preview.js +0 -20
- package/dist/forms.js +0 -101816
- package/dist/forms.js.map +0 -1
- package/entries/alert.ts +0 -1
- package/entries/forms.ts +0 -46
- package/entries/hooks.ts +0 -3
- package/entries/icon.ts +0 -1
- package/entries/layouts.ts +0 -15
- package/entries/loaders.ts +0 -3
- package/entries/mobx.ts +0 -6
- package/entries/modal.ts +0 -1
- package/entries/navigation.ts +0 -3
- package/entries/notifications.ts +0 -2
- package/entries/styles.ts +0 -16
- package/entries/tables.ts +0 -4
- package/entries/tags.ts +0 -2
- package/entries/text.ts +0 -7
- package/entries/tooltips.ts +0 -2
- package/entries/types.ts +0 -3
- package/entries/utils.ts +0 -4
- package/react_components_zendesk.iml +0 -9
- package/rollup.config.js +0 -40
- package/src/GlobalStyle.js +0 -43
- package/src/calendarCss.js +0 -2
- package/src/components/Alert.tsx +0 -175
- package/src/components/Drawer.tsx +0 -244
- package/src/components/Icon.tsx +0 -43
- package/src/components/Modal.tsx +0 -206
- package/src/components/StyledComponentProps.type.ts +0 -3
- package/src/components/StyledProps.type.ts +0 -4
- package/src/components/calendars/Legendable.type.tsx +0 -4
- package/src/components/calendars/TinyCalendar.tsx +0 -185
- package/src/components/calendars/TinyMonthYearCalendar.tsx +0 -57
- package/src/components/calendars/blocks/Legend.tsx +0 -44
- package/src/components/calendars/blocks/MonthPicker.tsx +0 -54
- package/src/components/calendars/blocks/MonthYearPicker.tsx +0 -101
- package/src/components/calendars/blocks/YearPicker.tsx +0 -44
- package/src/components/forms/Button.tsx +0 -214
- package/src/components/forms/Checkbox.tsx +0 -99
- package/src/components/forms/CycleButton.stories.tsx +0 -23
- package/src/components/forms/CycleButton.tsx +0 -52
- package/src/components/forms/Form.tsx +0 -43
- package/src/components/forms/Hint.tsx +0 -12
- package/src/components/forms/IconButton.tsx +0 -29
- package/src/components/forms/Label.tsx +0 -9
- package/src/components/forms/TaggedToggle.stories.tsx +0 -18
- package/src/components/forms/TaggedToggle.tsx +0 -19
- package/src/components/forms/Toggle.stories.tsx +0 -30
- package/src/components/forms/Toggle.tsx +0 -62
- package/src/components/forms/ValidatedFormProps.type.ts +0 -3
- package/src/components/forms/Validation.type.ts +0 -10
- package/src/components/forms/buttonMixins.ts +0 -74
- package/src/components/forms/formField.types.ts +0 -26
- package/src/components/forms/selectors/BooleanSelector.tsx +0 -71
- package/src/components/forms/selectors/DatePickerSelector.tsx +0 -88
- package/src/components/forms/selectors/Dropdown/Item.tsx +0 -34
- package/src/components/forms/selectors/Dropdown.tsx +0 -410
- package/src/components/forms/selectors/MonthYearSelector.tsx +0 -54
- package/src/components/forms/selectors/MultiSelector.tsx +0 -58
- package/src/components/forms/selectors/SearchableSelector.tsx +0 -120
- package/src/components/forms/selectors/Selector.tsx +0 -55
- package/src/components/forms/selectors/SelectorEmptyState.tsx +0 -5
- package/src/components/forms/selectors/types.ts +0 -43
- package/src/components/forms/textfields/EmailTextField.tsx +0 -7
- package/src/components/forms/textfields/NumberTextField.tsx +0 -17
- package/src/components/forms/textfields/PasswordTextField.tsx +0 -12
- package/src/components/forms/textfields/TextArea.tsx +0 -25
- package/src/components/forms/textfields/TextField.tsx +0 -45
- package/src/components/forms/textfields/TextFieldWrapper.tsx +0 -120
- package/src/components/forms/validationStates.ts +0 -6
- package/src/components/layout/AppBar.tsx +0 -137
- package/src/components/layout/AppBarLayout.tsx +0 -55
- package/src/components/layout/Carousel.tsx +0 -44
- package/src/components/layout/Container.tsx +0 -43
- package/src/components/layout/FlexBlock.tsx +0 -122
- package/src/components/layout/FlexBox.tsx +0 -69
- package/src/components/layout/Grid.tsx +0 -23
- package/src/components/layout/Line.tsx +0 -13
- package/src/components/layout/OpacityTransition.tsx +0 -6
- package/src/components/layout/OverflowMenu.tsx +0 -45
- package/src/components/layout/Section.tsx +0 -41
- package/src/components/layout/Sidebar.tsx +0 -107
- package/src/components/layout/SidebarLayout.tsx +0 -32
- package/src/components/layout/Tabs.tsx +0 -39
- package/src/components/loaders/AsyncLoadable.tsx +0 -57
- package/src/components/loaders/Dots.tsx +0 -16
- package/src/components/loaders/Loadable.tsx +0 -99
- package/src/components/loaders/Loader.tsx +0 -52
- package/src/components/loaders/TranslucentLoader.tsx +0 -49
- package/src/components/mobx/Alert.tsx +0 -33
- package/src/components/mobx/Drawer.tsx +0 -13
- package/src/components/mobx/ErrorBoundary.tsx +0 -56
- package/src/components/mobx/Modal.tsx +0 -44
- package/src/components/navigation/Breadcrumbs.tsx +0 -49
- package/src/components/navigation/ButtonLink.tsx +0 -55
- package/src/components/navigation/InlineButtonLink.tsx +0 -9
- package/src/components/notification/InfoPanel.tsx +0 -70
- package/src/components/notification/Notification.tsx +0 -51
- package/src/components/tables/MobileTable/Row.tsx +0 -147
- package/src/components/tables/MobileTable.tsx +0 -67
- package/src/components/tables/NiceTable.tsx +0 -81
- package/src/components/tables/Row.tsx +0 -84
- package/src/components/tables/SimpleTable.tsx +0 -99
- package/src/components/tables/Table.tsx +0 -153
- package/src/components/tables/blocks/Header.tsx +0 -119
- package/src/components/tables/blocks/HelpText.tsx +0 -9
- package/src/components/tables/blocks/Pagination.tsx +0 -85
- package/src/components/tables/blocks/TableFilter.tsx +0 -56
- package/src/components/tables/blocks/Title.tsx +0 -6
- package/src/components/tables/index.tsx +0 -106
- package/src/components/tables/utils.ts +0 -1
- package/src/components/tags/Chip.tsx +0 -44
- package/src/components/tags/Tag.tsx +0 -23
- package/src/components/text/Header.js +0 -55
- package/src/components/text/Hint.js +0 -25
- package/src/components/text/Label.js +0 -18
- package/src/components/text/Paragraph.js +0 -35
- package/src/components/text/Text.tsx +0 -33
- package/src/components/tooltips/IconTooltip.stories.tsx +0 -20
- package/src/components/tooltips/IconTooltip.tsx +0 -25
- package/src/components/tooltips/Tooltip.tsx +0 -30
- package/src/global.d.ts +0 -29
- package/src/hooks/useIsMounted.ts +0 -11
- package/src/hooks/useLoader.tsx +0 -73
- package/src/hooks/useLoaderV2.tsx +0 -51
- package/src/index.css +0 -34
- package/src/index.js +0 -4
- package/src/stores/useStores.tsx +0 -11
- package/src/stories/Introduction.stories.mdx +0 -211
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/styles/DeviceSizeWatcher.ts +0 -113
- package/src/styles/alignments.ts +0 -9
- package/src/styles/colors.ts +0 -51
- package/src/styles/deviceSizes.ts +0 -28
- package/src/styles/mediaQueries.ts +0 -83
- package/src/styles/mixins.ts +0 -23
- package/src/styles/spacings.ts +0 -16
- package/src/styles/theme/Theme.type.ts +0 -76
- package/src/styles/theme/base.ts +0 -47
- package/src/styles/theme/dark.ts +0 -36
- package/src/styles/theme/light.ts +0 -44
- package/src/styles/theme/light2.ts +0 -22
- package/src/styles/theme/useTheme.ts +0 -5
- package/src/styles/types.ts +0 -18
- package/src/styles/typography.ts +0 -67
- package/src/utils/NavBarScrollWatcher.ts +0 -59
- package/src/utils/arrayHelpers.ts +0 -56
- package/src/utils/dateTime/DateRange.type.ts +0 -6
- package/src/utils/dateTime/calendar.ts +0 -23
- package/src/utils/dateTimeHelpers.ts +0 -105
- package/src/utils/function.types.ts +0 -1
- package/src/utils/functionHelpers.ts +0 -23
- package/src/utils/idGenerator.ts +0 -8
- package/src/utils/logging/Logger.ts +0 -34
- package/src/utils/logging/Logger.type.ts +0 -7
- package/src/utils/logging/loggable.tsx +0 -17
- package/src/utils/logging/with_module_logging.ts +0 -8
- package/src/utils/numberHelpers.ts +0 -4
- package/src/utils/typeCheckers.ts +0 -6
- package/src/utils/types.d.ts +0 -1
- package/src/utils/validateFields.ts +0 -14
- package/src/zendeskGardenCss.js +0 -15
- package/tsconfig.json +0 -30
- package/type_defs/GlobalStyle.d.ts +0 -2
- package/type_defs/GlobalStyle.d.ts.map +0 -1
- package/type_defs/calendarCss.d.ts +0 -2
- package/type_defs/calendarCss.d.ts.map +0 -1
- package/type_defs/components/Alert.d.ts +0 -24
- package/type_defs/components/Alert.d.ts.map +0 -1
- package/type_defs/components/Drawer.d.ts +0 -18
- package/type_defs/components/Drawer.d.ts.map +0 -1
- package/type_defs/components/Icon.d.ts +0 -15
- package/type_defs/components/Icon.d.ts.map +0 -1
- package/type_defs/components/Modal.d.ts +0 -31
- package/type_defs/components/Modal.d.ts.map +0 -1
- package/type_defs/components/StyledComponentProps.type.d.ts +0 -4
- package/type_defs/components/StyledComponentProps.type.d.ts.map +0 -1
- package/type_defs/components/StyledProps.type.d.ts +0 -4
- package/type_defs/components/StyledProps.type.d.ts.map +0 -1
- package/type_defs/components/calendars/Legendable.type.d.ts +0 -5
- package/type_defs/components/calendars/Legendable.type.d.ts.map +0 -1
- package/type_defs/components/calendars/TinyCalendar.d.ts +0 -25
- package/type_defs/components/calendars/TinyCalendar.d.ts.map +0 -1
- package/type_defs/components/calendars/TinyMonthYearCalendar.d.ts +0 -11
- package/type_defs/components/calendars/TinyMonthYearCalendar.d.ts.map +0 -1
- package/type_defs/components/calendars/blocks/Legend.d.ts +0 -12
- package/type_defs/components/calendars/blocks/Legend.d.ts.map +0 -1
- package/type_defs/components/calendars/blocks/MonthPicker.d.ts +0 -8
- package/type_defs/components/calendars/blocks/MonthPicker.d.ts.map +0 -1
- package/type_defs/components/calendars/blocks/MonthYearPicker.d.ts +0 -16
- package/type_defs/components/calendars/blocks/MonthYearPicker.d.ts.map +0 -1
- package/type_defs/components/calendars/blocks/YearPicker.d.ts +0 -10
- package/type_defs/components/calendars/blocks/YearPicker.d.ts.map +0 -1
- package/type_defs/components/forms/Button.d.ts +0 -41
- package/type_defs/components/forms/Button.d.ts.map +0 -1
- package/type_defs/components/forms/Checkbox.d.ts +0 -10
- package/type_defs/components/forms/Checkbox.d.ts.map +0 -1
- package/type_defs/components/forms/CycleButton.d.ts +0 -14
- package/type_defs/components/forms/CycleButton.d.ts.map +0 -1
- package/type_defs/components/forms/CycleButton.stories.d.ts +0 -16
- package/type_defs/components/forms/CycleButton.stories.d.ts.map +0 -1
- package/type_defs/components/forms/Form.d.ts +0 -9
- package/type_defs/components/forms/Form.d.ts.map +0 -1
- package/type_defs/components/forms/Hint.d.ts +0 -2
- package/type_defs/components/forms/Hint.d.ts.map +0 -1
- package/type_defs/components/forms/IconButton.d.ts +0 -6
- package/type_defs/components/forms/IconButton.d.ts.map +0 -1
- package/type_defs/components/forms/Label.d.ts +0 -2
- package/type_defs/components/forms/Label.d.ts.map +0 -1
- package/type_defs/components/forms/TaggedToggle.d.ts +0 -8
- package/type_defs/components/forms/TaggedToggle.d.ts.map +0 -1
- package/type_defs/components/forms/TaggedToggle.stories.d.ts +0 -12
- package/type_defs/components/forms/TaggedToggle.stories.d.ts.map +0 -1
- package/type_defs/components/forms/Toggle.d.ts +0 -12
- package/type_defs/components/forms/Toggle.d.ts.map +0 -1
- package/type_defs/components/forms/Toggle.stories.d.ts +0 -18
- package/type_defs/components/forms/Toggle.stories.d.ts.map +0 -1
- package/type_defs/components/forms/ValidatedFormProps.type.d.ts +0 -6
- package/type_defs/components/forms/ValidatedFormProps.type.d.ts.map +0 -1
- package/type_defs/components/forms/Validation.type.d.ts +0 -9
- package/type_defs/components/forms/Validation.type.d.ts.map +0 -1
- package/type_defs/components/forms/buttonMixins.d.ts +0 -23
- package/type_defs/components/forms/buttonMixins.d.ts.map +0 -1
- package/type_defs/components/forms/formField.types.d.ts +0 -23
- package/type_defs/components/forms/formField.types.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/BooleanSelector.d.ts +0 -11
- package/type_defs/components/forms/selectors/BooleanSelector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/DatePickerSelector.d.ts +0 -19
- package/type_defs/components/forms/selectors/DatePickerSelector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/Dropdown/Item.d.ts +0 -19
- package/type_defs/components/forms/selectors/Dropdown/Item.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/Dropdown.d.ts +0 -28
- package/type_defs/components/forms/selectors/Dropdown.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/MonthYearSelector.d.ts +0 -9
- package/type_defs/components/forms/selectors/MonthYearSelector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/MultiSelector.d.ts +0 -9
- package/type_defs/components/forms/selectors/MultiSelector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/SearchableSelector.d.ts +0 -8
- package/type_defs/components/forms/selectors/SearchableSelector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/Selector.d.ts +0 -4
- package/type_defs/components/forms/selectors/Selector.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/SelectorEmptyState.d.ts +0 -2
- package/type_defs/components/forms/selectors/SelectorEmptyState.d.ts.map +0 -1
- package/type_defs/components/forms/selectors/types.d.ts +0 -41
- package/type_defs/components/forms/selectors/types.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/EmailTextField.d.ts +0 -4
- package/type_defs/components/forms/textfields/EmailTextField.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/NumberTextField.d.ts +0 -4
- package/type_defs/components/forms/textfields/NumberTextField.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/PasswordTextField.d.ts +0 -8
- package/type_defs/components/forms/textfields/PasswordTextField.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/TextArea.d.ts +0 -9
- package/type_defs/components/forms/textfields/TextArea.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/TextField.d.ts +0 -14
- package/type_defs/components/forms/textfields/TextField.d.ts.map +0 -1
- package/type_defs/components/forms/textfields/TextFieldWrapper.d.ts +0 -13
- package/type_defs/components/forms/textfields/TextFieldWrapper.d.ts.map +0 -1
- package/type_defs/components/forms/validationStates.d.ts +0 -7
- package/type_defs/components/forms/validationStates.d.ts.map +0 -1
- package/type_defs/components/layout/AppBar.d.ts +0 -14
- package/type_defs/components/layout/AppBar.d.ts.map +0 -1
- package/type_defs/components/layout/AppBarLayout.d.ts +0 -15
- package/type_defs/components/layout/AppBarLayout.d.ts.map +0 -1
- package/type_defs/components/layout/Carousel.d.ts +0 -13
- package/type_defs/components/layout/Carousel.d.ts.map +0 -1
- package/type_defs/components/layout/Container.d.ts +0 -4
- package/type_defs/components/layout/Container.d.ts.map +0 -1
- package/type_defs/components/layout/FlexBlock.d.ts +0 -19
- package/type_defs/components/layout/FlexBlock.d.ts.map +0 -1
- package/type_defs/components/layout/FlexBox.d.ts +0 -18
- package/type_defs/components/layout/FlexBox.d.ts.map +0 -1
- package/type_defs/components/layout/Grid.d.ts +0 -4
- package/type_defs/components/layout/Grid.d.ts.map +0 -1
- package/type_defs/components/layout/Line.d.ts +0 -6
- package/type_defs/components/layout/Line.d.ts.map +0 -1
- package/type_defs/components/layout/OpacityTransition.d.ts +0 -4
- package/type_defs/components/layout/OpacityTransition.d.ts.map +0 -1
- package/type_defs/components/layout/OverflowMenu.d.ts +0 -13
- package/type_defs/components/layout/OverflowMenu.d.ts.map +0 -1
- package/type_defs/components/layout/Section.d.ts +0 -6
- package/type_defs/components/layout/Section.d.ts.map +0 -1
- package/type_defs/components/layout/Sidebar.d.ts +0 -12
- package/type_defs/components/layout/Sidebar.d.ts.map +0 -1
- package/type_defs/components/layout/SidebarLayout.d.ts +0 -5
- package/type_defs/components/layout/SidebarLayout.d.ts.map +0 -1
- package/type_defs/components/layout/Tabs.d.ts +0 -3
- package/type_defs/components/layout/Tabs.d.ts.map +0 -1
- package/type_defs/components/loaders/AsyncLoadable.d.ts +0 -13
- package/type_defs/components/loaders/AsyncLoadable.d.ts.map +0 -1
- package/type_defs/components/loaders/Dots.d.ts +0 -9
- package/type_defs/components/loaders/Dots.d.ts.map +0 -1
- package/type_defs/components/loaders/Loadable.d.ts +0 -10
- package/type_defs/components/loaders/Loadable.d.ts.map +0 -1
- package/type_defs/components/loaders/Loader.d.ts +0 -15
- package/type_defs/components/loaders/Loader.d.ts.map +0 -1
- package/type_defs/components/loaders/TranslucentLoader.d.ts +0 -9
- package/type_defs/components/loaders/TranslucentLoader.d.ts.map +0 -1
- package/type_defs/components/mobx/Alert.d.ts +0 -4
- package/type_defs/components/mobx/Alert.d.ts.map +0 -1
- package/type_defs/components/mobx/Drawer.d.ts +0 -5
- package/type_defs/components/mobx/Drawer.d.ts.map +0 -1
- package/type_defs/components/mobx/ErrorBoundary.d.ts +0 -24
- package/type_defs/components/mobx/ErrorBoundary.d.ts.map +0 -1
- package/type_defs/components/mobx/Modal.d.ts +0 -4
- package/type_defs/components/mobx/Modal.d.ts.map +0 -1
- package/type_defs/components/navigation/Breadcrumbs.d.ts +0 -3
- package/type_defs/components/navigation/Breadcrumbs.d.ts.map +0 -1
- package/type_defs/components/navigation/ButtonLink.d.ts +0 -25
- package/type_defs/components/navigation/ButtonLink.d.ts.map +0 -1
- package/type_defs/components/navigation/InlineButtonLink.d.ts +0 -3
- package/type_defs/components/navigation/InlineButtonLink.d.ts.map +0 -1
- package/type_defs/components/notification/InfoPanel.d.ts +0 -18
- package/type_defs/components/notification/InfoPanel.d.ts.map +0 -1
- package/type_defs/components/notification/Notification.d.ts +0 -14
- package/type_defs/components/notification/Notification.d.ts.map +0 -1
- package/type_defs/components/tables/MobileTable/Row.d.ts +0 -14
- package/type_defs/components/tables/MobileTable/Row.d.ts.map +0 -1
- package/type_defs/components/tables/MobileTable.d.ts +0 -9
- package/type_defs/components/tables/MobileTable.d.ts.map +0 -1
- package/type_defs/components/tables/NiceTable.d.ts +0 -12
- package/type_defs/components/tables/NiceTable.d.ts.map +0 -1
- package/type_defs/components/tables/Row.d.ts +0 -19
- package/type_defs/components/tables/Row.d.ts.map +0 -1
- package/type_defs/components/tables/SimpleTable.d.ts +0 -9
- package/type_defs/components/tables/SimpleTable.d.ts.map +0 -1
- package/type_defs/components/tables/Table.d.ts +0 -73
- package/type_defs/components/tables/Table.d.ts.map +0 -1
- package/type_defs/components/tables/blocks/Header.d.ts +0 -17
- package/type_defs/components/tables/blocks/Header.d.ts.map +0 -1
- package/type_defs/components/tables/blocks/HelpText.d.ts +0 -5
- package/type_defs/components/tables/blocks/HelpText.d.ts.map +0 -1
- package/type_defs/components/tables/blocks/Pagination.d.ts +0 -8
- package/type_defs/components/tables/blocks/Pagination.d.ts.map +0 -1
- package/type_defs/components/tables/blocks/TableFilter.d.ts +0 -9
- package/type_defs/components/tables/blocks/TableFilter.d.ts.map +0 -1
- package/type_defs/components/tables/blocks/Title.d.ts +0 -7
- package/type_defs/components/tables/blocks/Title.d.ts.map +0 -1
- package/type_defs/components/tables/index.d.ts +0 -9
- package/type_defs/components/tables/index.d.ts.map +0 -1
- package/type_defs/components/tables/utils.d.ts +0 -2
- package/type_defs/components/tables/utils.d.ts.map +0 -1
- package/type_defs/components/tags/Chip.d.ts +0 -18
- package/type_defs/components/tags/Chip.d.ts.map +0 -1
- package/type_defs/components/tags/Tag.d.ts +0 -8
- package/type_defs/components/tags/Tag.d.ts.map +0 -1
- package/type_defs/components/text/Header.d.ts +0 -31
- package/type_defs/components/text/Header.d.ts.map +0 -1
- package/type_defs/components/text/Hint.d.ts +0 -10
- package/type_defs/components/text/Hint.d.ts.map +0 -1
- package/type_defs/components/text/Label.d.ts +0 -7
- package/type_defs/components/text/Label.d.ts.map +0 -1
- package/type_defs/components/text/Paragraph.d.ts +0 -37
- package/type_defs/components/text/Paragraph.d.ts.map +0 -1
- package/type_defs/components/text/Text.d.ts +0 -7
- package/type_defs/components/text/Text.d.ts.map +0 -1
- package/type_defs/components/tooltips/IconTooltip.d.ts +0 -10
- package/type_defs/components/tooltips/IconTooltip.d.ts.map +0 -1
- package/type_defs/components/tooltips/IconTooltip.stories.d.ts +0 -18
- package/type_defs/components/tooltips/IconTooltip.stories.d.ts.map +0 -1
- package/type_defs/components/tooltips/Tooltip.d.ts +0 -14
- package/type_defs/components/tooltips/Tooltip.d.ts.map +0 -1
- package/type_defs/hooks/useIsMounted.d.ts +0 -2
- package/type_defs/hooks/useIsMounted.d.ts.map +0 -1
- package/type_defs/hooks/useLoader.d.ts +0 -10
- package/type_defs/hooks/useLoader.d.ts.map +0 -1
- package/type_defs/hooks/useLoaderV2.d.ts +0 -15
- package/type_defs/hooks/useLoaderV2.d.ts.map +0 -1
- package/type_defs/index.d.ts +0 -2
- package/type_defs/index.d.ts.map +0 -1
- package/type_defs/stores/useStores.d.ts +0 -5
- package/type_defs/stores/useStores.d.ts.map +0 -1
- package/type_defs/styles/DeviceSizeWatcher.d.ts +0 -21
- package/type_defs/styles/DeviceSizeWatcher.d.ts.map +0 -1
- package/type_defs/styles/alignments.d.ts +0 -8
- package/type_defs/styles/alignments.d.ts.map +0 -1
- package/type_defs/styles/colors.d.ts +0 -35
- package/type_defs/styles/colors.d.ts.map +0 -1
- package/type_defs/styles/deviceSizes.d.ts +0 -9
- package/type_defs/styles/deviceSizes.d.ts.map +0 -1
- package/type_defs/styles/mediaQueries.d.ts +0 -21
- package/type_defs/styles/mediaQueries.d.ts.map +0 -1
- package/type_defs/styles/mixins.d.ts +0 -8
- package/type_defs/styles/mixins.d.ts.map +0 -1
- package/type_defs/styles/spacings.d.ts +0 -15
- package/type_defs/styles/spacings.d.ts.map +0 -1
- package/type_defs/styles/theme/Theme.type.d.ts +0 -79
- package/type_defs/styles/theme/Theme.type.d.ts.map +0 -1
- package/type_defs/styles/theme/base.d.ts +0 -3
- package/type_defs/styles/theme/base.d.ts.map +0 -1
- package/type_defs/styles/theme/dark.d.ts +0 -3
- package/type_defs/styles/theme/dark.d.ts.map +0 -1
- package/type_defs/styles/theme/light.d.ts +0 -3
- package/type_defs/styles/theme/light.d.ts.map +0 -1
- package/type_defs/styles/theme/light2.d.ts +0 -3
- package/type_defs/styles/theme/light2.d.ts.map +0 -1
- package/type_defs/styles/theme/useTheme.d.ts +0 -3
- package/type_defs/styles/theme/useTheme.d.ts.map +0 -1
- package/type_defs/styles/types.d.ts +0 -17
- package/type_defs/styles/types.d.ts.map +0 -1
- package/type_defs/styles/typography.d.ts +0 -56
- package/type_defs/styles/typography.d.ts.map +0 -1
- package/type_defs/utils/NavBarScrollWatcher.d.ts +0 -7
- package/type_defs/utils/NavBarScrollWatcher.d.ts.map +0 -1
- package/type_defs/utils/arrayHelpers.d.ts +0 -23
- package/type_defs/utils/arrayHelpers.d.ts.map +0 -1
- package/type_defs/utils/dateTime/DateRange.type.d.ts +0 -6
- package/type_defs/utils/dateTime/DateRange.type.d.ts.map +0 -1
- package/type_defs/utils/dateTime/calendar.d.ts +0 -18
- package/type_defs/utils/dateTime/calendar.d.ts.map +0 -1
- package/type_defs/utils/dateTimeHelpers.d.ts +0 -23
- package/type_defs/utils/dateTimeHelpers.d.ts.map +0 -1
- package/type_defs/utils/function.types.d.ts +0 -2
- package/type_defs/utils/function.types.d.ts.map +0 -1
- package/type_defs/utils/functionHelpers.d.ts +0 -7
- package/type_defs/utils/functionHelpers.d.ts.map +0 -1
- package/type_defs/utils/idGenerator.d.ts +0 -3
- package/type_defs/utils/idGenerator.d.ts.map +0 -1
- package/type_defs/utils/logging/Logger.d.ts +0 -10
- package/type_defs/utils/logging/Logger.d.ts.map +0 -1
- package/type_defs/utils/logging/Logger.type.d.ts +0 -7
- package/type_defs/utils/logging/Logger.type.d.ts.map +0 -1
- package/type_defs/utils/logging/loggable.d.ts +0 -7
- package/type_defs/utils/logging/loggable.d.ts.map +0 -1
- package/type_defs/utils/logging/with_module_logging.d.ts +0 -3
- package/type_defs/utils/logging/with_module_logging.d.ts.map +0 -1
- package/type_defs/utils/numberHelpers.d.ts +0 -3
- package/type_defs/utils/numberHelpers.d.ts.map +0 -1
- package/type_defs/utils/typeCheckers.d.ts +0 -5
- package/type_defs/utils/typeCheckers.d.ts.map +0 -1
- package/type_defs/utils/validateFields.d.ts +0 -13
- package/type_defs/utils/validateFields.d.ts.map +0 -1
- package/type_defs/zendeskGardenCss.d.ts +0 -2
- package/type_defs/zendeskGardenCss.d.ts.map +0 -1
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { FormFieldProps } from "components/forms/formField.types"
|
|
2
|
-
import { StateChangeOptions } from "downshift"
|
|
3
|
-
|
|
4
|
-
export type SelectorItemKey = string | number | null | undefined
|
|
5
|
-
export type SelectorOptionOptionalAttrs = {
|
|
6
|
-
isClearingItem?: boolean,
|
|
7
|
-
isNextItem?: boolean,
|
|
8
|
-
isBackItem?: boolean,
|
|
9
|
-
isAddItem?: boolean,
|
|
10
|
-
isHeaderItem?: boolean,
|
|
11
|
-
}
|
|
12
|
-
export type SelectorOption =
|
|
13
|
-
{ [key: string]: any }
|
|
14
|
-
& SelectorOptionOptionalAttrs
|
|
15
|
-
export type OnMultiSelectItemRemoveFunc<T = SelectorItemKey> = (k: T) => void
|
|
16
|
-
export type OnItemSelectedFunc =
|
|
17
|
-
((k: SelectorItemKey) => void)
|
|
18
|
-
| ((o: SelectorOption | null) => void)
|
|
19
|
-
export type StateChange = StateChangeOptions<SelectorOption>
|
|
20
|
-
|
|
21
|
-
type Common = FormFieldProps & {
|
|
22
|
-
clearable?: boolean,
|
|
23
|
-
options: Array<SelectorOption>,
|
|
24
|
-
optionsKeyMap?: { [key: string]: SelectorOption },
|
|
25
|
-
keyField: string,
|
|
26
|
-
valueField: string,
|
|
27
|
-
onChange?: OnItemSelectedFunc,
|
|
28
|
-
onStateChange?: (s: StateChange) => void,
|
|
29
|
-
invalidOnNoSelection?: boolean,
|
|
30
|
-
flat?: boolean,
|
|
31
|
-
open?: boolean,
|
|
32
|
-
small?: boolean,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type SelectorProps = {
|
|
36
|
-
selectedKey?: SelectorItemKey,
|
|
37
|
-
onChange?: OnItemSelectedFunc,
|
|
38
|
-
} & Common
|
|
39
|
-
|
|
40
|
-
export type MultiSelectorProps = {
|
|
41
|
-
selectedKeys?: SelectorItemKey[],
|
|
42
|
-
onChange?: OnItemSelectedFunc,
|
|
43
|
-
} & Common
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TextFieldProps } from "components/forms/formField.types"
|
|
2
|
-
import { TextField } from "components/forms/textfields/TextField"
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
|
|
5
|
-
export const EmailTextField = (props :TextFieldProps<any>) => {
|
|
6
|
-
return <TextField type={"email"} {...props} />
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TextFieldProps } from "components/forms/formField.types"
|
|
2
|
-
import { TextField } from "components/forms/textfields/TextField"
|
|
3
|
-
import React, { ChangeEvent } from "react"
|
|
4
|
-
|
|
5
|
-
export let NumberTextField = ({
|
|
6
|
-
onChange,
|
|
7
|
-
...props
|
|
8
|
-
}: TextFieldProps<number, number>) => {
|
|
9
|
-
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
10
|
-
const val = e.target.value || "0"
|
|
11
|
-
onChange(
|
|
12
|
-
parseInt(val.replace(/[^0-9.]+/g, "")),
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
return <TextField {...props} onChange={handleChange} />
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TextFieldProps } from "components/forms/formField.types"
|
|
2
|
-
import { TextField } from "components/forms/textfields/TextField"
|
|
3
|
-
import React from "react"
|
|
4
|
-
|
|
5
|
-
type Props = TextFieldProps<any> & {
|
|
6
|
-
newPassword?: boolean
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const PasswordTextField = ({ newPassword, ...props }: Props) => {
|
|
10
|
-
const autoCompleteAttr = newPassword ? { autoComplete: "new-password" } : {}
|
|
11
|
-
return <TextField {...autoCompleteAttr} type={"password"} {...props} />
|
|
12
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { Textarea } from "@zendeskgarden/react-forms"
|
|
3
|
-
import { FormFieldProps } from "components/forms/formField.types"
|
|
4
|
-
import { TextFieldWrapper } from "components/forms/textfields/TextFieldWrapper"
|
|
5
|
-
import React, { ChangeEvent, FC } from "react"
|
|
6
|
-
|
|
7
|
-
export type TextAreaProps = FormFieldProps & {
|
|
8
|
-
resizable?: boolean,
|
|
9
|
-
value?: string,
|
|
10
|
-
onChange: (text: string, e: ChangeEvent<HTMLTextAreaElement>) => void,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const TextArea: FC<TextAreaProps> = ({ onChange, ...props }) => {
|
|
15
|
-
const notifyParentOfChange = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
|
16
|
-
onChange(e.target.value, e)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return <TextFieldWrapper {...props}
|
|
20
|
-
onChange={notifyParentOfChange}
|
|
21
|
-
WrappedComponent={Textarea} />
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
TextArea.COMPONENT_NAME = "TextArea"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { Input } from "@zendeskgarden/react-forms"
|
|
3
|
-
import { TextFieldProps } from "components/forms/formField.types"
|
|
4
|
-
import { TextFieldWrapper } from "components/forms/textfields/TextFieldWrapper"
|
|
5
|
-
import React, { ChangeEvent, FC } from "react"
|
|
6
|
-
import styled from "styled-components"
|
|
7
|
-
|
|
8
|
-
type NewOnChangeFunc = (
|
|
9
|
-
value: string,
|
|
10
|
-
event: ChangeEvent<HTMLInputElement>
|
|
11
|
-
) => void
|
|
12
|
-
type OldOnChangeFunc = (event: ChangeEvent<HTMLInputElement>) => void
|
|
13
|
-
|
|
14
|
-
type OriginalProps = TextFieldProps & { useNewOnChange?: false }
|
|
15
|
-
type PropsWithNewOnChange = Omit<TextFieldProps, "onChange"> & {
|
|
16
|
-
onChange: NewOnChangeFunc,
|
|
17
|
-
useNewOnChange: true,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type Props = PropsWithNewOnChange | OriginalProps
|
|
21
|
-
|
|
22
|
-
export let TextField: FC<Props> = ({
|
|
23
|
-
onChange,
|
|
24
|
-
useNewOnChange = false,
|
|
25
|
-
...props
|
|
26
|
-
}) => {
|
|
27
|
-
|
|
28
|
-
const notifyParentOfChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
29
|
-
if (useNewOnChange === true) {
|
|
30
|
-
(onChange as NewOnChangeFunc)(e.target.value, e)
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
(onChange as OldOnChangeFunc)(e)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return <TextFieldWrapper {...props}
|
|
38
|
-
onChange={notifyParentOfChange}
|
|
39
|
-
WrappedComponent={Input} />
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
TextField = styled(TextField)``
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
TextField.COMPONENT_NAME = "TextField"
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Field as ZField,
|
|
3
|
-
Hint,
|
|
4
|
-
Label,
|
|
5
|
-
Message,
|
|
6
|
-
/* @ts-ignore */
|
|
7
|
-
} from "@zendeskgarden/react-forms"
|
|
8
|
-
import { TextFieldProps } from "components/forms/formField.types"
|
|
9
|
-
import { TextAreaProps } from "components/forms/textfields/TextArea"
|
|
10
|
-
import { VALIDATION_STATES } from "components/forms/validationStates"
|
|
11
|
-
import { FlexBox } from "components/layout/FlexBox"
|
|
12
|
-
import { useObserver } from "mobx-react"
|
|
13
|
-
import { ComponentType } from "react"
|
|
14
|
-
import React, { ChangeEvent, FC } from "react"
|
|
15
|
-
import styled, { css } from "styled-components"
|
|
16
|
-
import { dark, fade } from "styles/colors"
|
|
17
|
-
import { FONT_SIZES } from "styles/typography"
|
|
18
|
-
|
|
19
|
-
type FieldProps = TextFieldProps | (
|
|
20
|
-
Omit<TextAreaProps, "onChange">
|
|
21
|
-
& { onChange: (e: ChangeEvent<HTMLTextAreaElement>) => void }
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
type Props = {
|
|
25
|
-
WrappedComponent: ComponentType<FieldProps & any>
|
|
26
|
-
} & FieldProps
|
|
27
|
-
|
|
28
|
-
const Field = styled(ZField)`
|
|
29
|
-
width: ${({ compact }: Props) => compact ? "auto" : "100%"};
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
export let TextFieldWrapper: FC<Props> = ({
|
|
33
|
-
className,
|
|
34
|
-
compact,
|
|
35
|
-
emptyState,
|
|
36
|
-
fluid,
|
|
37
|
-
hint,
|
|
38
|
-
label,
|
|
39
|
-
message,
|
|
40
|
-
validation,
|
|
41
|
-
value,
|
|
42
|
-
WrappedComponent,
|
|
43
|
-
onChange,
|
|
44
|
-
...props
|
|
45
|
-
}) => {
|
|
46
|
-
message = validation?.message || message
|
|
47
|
-
return useObserver(() => (
|
|
48
|
-
<Container className={className}
|
|
49
|
-
withRows
|
|
50
|
-
gap={"unset"}
|
|
51
|
-
fluid={fluid}>
|
|
52
|
-
<Field compact={compact}>
|
|
53
|
-
{label ? <Label>{label}</Label> : null}
|
|
54
|
-
{
|
|
55
|
-
hint
|
|
56
|
-
? <Hint
|
|
57
|
-
css={`&&& {
|
|
58
|
-
font-size: ${FONT_SIZES.XS};
|
|
59
|
-
}`}>
|
|
60
|
-
{hint}
|
|
61
|
-
</Hint>
|
|
62
|
-
: null
|
|
63
|
-
}
|
|
64
|
-
<WrappedComponent
|
|
65
|
-
placeholder={emptyState}
|
|
66
|
-
validation={validation?.validation}
|
|
67
|
-
{...props}
|
|
68
|
-
resizable={true}
|
|
69
|
-
value={value}
|
|
70
|
-
onChange={onChange}
|
|
71
|
-
/>
|
|
72
|
-
{
|
|
73
|
-
message
|
|
74
|
-
? <Message
|
|
75
|
-
css={`&&& {
|
|
76
|
-
font-size: ${FONT_SIZES.XS};
|
|
77
|
-
}`}
|
|
78
|
-
validation={validation?.validation}>
|
|
79
|
-
{message}
|
|
80
|
-
</Message>
|
|
81
|
-
: null
|
|
82
|
-
}
|
|
83
|
-
</Field>
|
|
84
|
-
</Container>
|
|
85
|
-
))
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const hoverFocusStyling = css`
|
|
89
|
-
:hover {
|
|
90
|
-
border-color: ${({ theme }) => theme.styles.colorPrimary};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
:focus {
|
|
94
|
-
border-color: ${({ theme }) => dark(theme.styles.colorPrimary)};
|
|
95
|
-
box-shadow: ${({ theme }) => `0 0 0 3px ${fade(theme.styles.colorPrimary)}`};
|
|
96
|
-
}
|
|
97
|
-
`
|
|
98
|
-
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
TextFieldWrapper = styled(TextFieldWrapper)`
|
|
101
|
-
&&&& {
|
|
102
|
-
font-size: inherit;
|
|
103
|
-
${(p) => !p.disabled ? hoverFocusStyling : ""}
|
|
104
|
-
}
|
|
105
|
-
`
|
|
106
|
-
|
|
107
|
-
TextFieldWrapper.defaultProps = {
|
|
108
|
-
disabled: false,
|
|
109
|
-
validation: { validation: VALIDATION_STATES.NONE },
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// @ts-ignore
|
|
113
|
-
TextFieldWrapper.COMPONENT_NAME = "TextFieldWrapper"
|
|
114
|
-
|
|
115
|
-
const Container = styled(FlexBox)`
|
|
116
|
-
${({ fluid }) => fluid ? "width: 100%;" : ""}
|
|
117
|
-
&& * {
|
|
118
|
-
font-size: inherit;
|
|
119
|
-
}
|
|
120
|
-
`
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { mdiArrowLeft, mdiMenu } from "@mdi/js"
|
|
2
|
-
import { IconButton } from "components/forms/IconButton"
|
|
3
|
-
import { Container } from "components/layout/Container"
|
|
4
|
-
import { FlexBox } from "components/layout/FlexBox"
|
|
5
|
-
import React, { ElementType, FC, ReactNode } from "react"
|
|
6
|
-
import { useStores } from "stores/useStores"
|
|
7
|
-
import styled, { css } from "styled-components"
|
|
8
|
-
import { mediaQueries } from "styles/mediaQueries"
|
|
9
|
-
import { SPACINGS } from "styles/spacings"
|
|
10
|
-
import { useTheme } from "styles/theme/useTheme"
|
|
11
|
-
import { ContainerProps } from "styles/types"
|
|
12
|
-
import { DO_NOTHING } from "utils/functionHelpers"
|
|
13
|
-
|
|
14
|
-
const { forSmallComputersAndUp } = mediaQueries()
|
|
15
|
-
const { SM } = SPACINGS
|
|
16
|
-
|
|
17
|
-
type Props = {
|
|
18
|
-
actions: Array<ReactNode>,
|
|
19
|
-
fixed?: boolean,
|
|
20
|
-
logo?: ElementType,
|
|
21
|
-
onBackClicked?: () => void,
|
|
22
|
-
onLogoClicked: () => void,
|
|
23
|
-
showBackButton?: boolean,
|
|
24
|
-
title: ElementType,
|
|
25
|
-
} & ContainerProps
|
|
26
|
-
|
|
27
|
-
export let AppBar: FC<Props> = ({
|
|
28
|
-
actions = [],
|
|
29
|
-
className,
|
|
30
|
-
fixed,
|
|
31
|
-
fluid,
|
|
32
|
-
logo,
|
|
33
|
-
onBackClicked = DO_NOTHING,
|
|
34
|
-
onLogoClicked = DO_NOTHING,
|
|
35
|
-
showBackButton = false,
|
|
36
|
-
title,
|
|
37
|
-
}) => {
|
|
38
|
-
|
|
39
|
-
// TODO this should not use MobX...switch to react context
|
|
40
|
-
const { ui } = useStores()
|
|
41
|
-
const theme = useTheme()
|
|
42
|
-
const appBarHeight = theme.styles.appBar.height
|
|
43
|
-
|
|
44
|
-
const openNavDrawer = () => {
|
|
45
|
-
ui.openDrawerWith({
|
|
46
|
-
body: <FlexBox css={`padding-bottom: ${SM};`} withRows>
|
|
47
|
-
{actions}
|
|
48
|
-
</FlexBox>,
|
|
49
|
-
withNoActions: true,
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return <>
|
|
54
|
-
{fixed ? <FixedPlaceHolder height={`${appBarHeight}`} /> : null}
|
|
55
|
-
<BarWrapper fixed={fixed} className={className}>
|
|
56
|
-
<Content height={appBarHeight} fluid={fluid}>
|
|
57
|
-
{
|
|
58
|
-
showBackButton
|
|
59
|
-
? <IconButton icon={mdiArrowLeft}
|
|
60
|
-
flat
|
|
61
|
-
onClick={onBackClicked} />
|
|
62
|
-
: null
|
|
63
|
-
}
|
|
64
|
-
{/*@ts-ignore*/}
|
|
65
|
-
<FlexBox alignItems={"center"}
|
|
66
|
-
onClick={onLogoClicked}
|
|
67
|
-
css={`cursor: pointer;`}>
|
|
68
|
-
{logo ? logo : null}
|
|
69
|
-
{title}
|
|
70
|
-
</FlexBox>
|
|
71
|
-
<MobileNav
|
|
72
|
-
color={
|
|
73
|
-
theme.styles.nav.linkColor ||
|
|
74
|
-
theme.styles.getTextColorForBackground({
|
|
75
|
-
color: theme.styles.appBar.background ?? "$fff",
|
|
76
|
-
theme,
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
onClick={openNavDrawer} />
|
|
80
|
-
<DesktopNav alignItems={"center"}>
|
|
81
|
-
{actions}
|
|
82
|
-
</DesktopNav>
|
|
83
|
-
</Content>
|
|
84
|
-
</BarWrapper>
|
|
85
|
-
</>
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
AppBar = styled(AppBar)``
|
|
89
|
-
|
|
90
|
-
const BarWrapper = styled.header<{ fixed?: boolean }>`
|
|
91
|
-
background: ${({ theme }) => theme.styles.appBar.background};
|
|
92
|
-
box-shadow: ${({ theme }) => theme.styles.appBar.shadow};
|
|
93
|
-
position: ${({ fixed }) => fixed ? "fixed" : "unset"};
|
|
94
|
-
top: ${({ fixed }) => fixed ? "0" : "unset"};
|
|
95
|
-
left: ${({ fixed }) => fixed ? "0" : "unset"};
|
|
96
|
-
width: 100%;
|
|
97
|
-
z-index: ${({ theme }) => theme.styles.appBar.zIndex};
|
|
98
|
-
`
|
|
99
|
-
|
|
100
|
-
const Content = styled(Container).attrs({
|
|
101
|
-
withRows: false,
|
|
102
|
-
spacing: SM,
|
|
103
|
-
justify: "space-between",
|
|
104
|
-
alignItems: "center",
|
|
105
|
-
})`
|
|
106
|
-
height: ${({ height }: { height?: string }) => height
|
|
107
|
-
? height
|
|
108
|
-
: "fit-content"};
|
|
109
|
-
`
|
|
110
|
-
|
|
111
|
-
const DesktopNav = styled(FlexBox).attrs({
|
|
112
|
-
as: "nav",
|
|
113
|
-
})`
|
|
114
|
-
&& {
|
|
115
|
-
display: none;
|
|
116
|
-
${forSmallComputersAndUp(css`
|
|
117
|
-
display: flex;
|
|
118
|
-
`)}
|
|
119
|
-
}
|
|
120
|
-
`
|
|
121
|
-
|
|
122
|
-
const FixedPlaceHolder = styled.div<{ height: string }>`
|
|
123
|
-
height: ${({ height }) => height};
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
const MobileNav = styled(IconButton).attrs({
|
|
127
|
-
flat: true,
|
|
128
|
-
icon: mdiMenu,
|
|
129
|
-
})`
|
|
130
|
-
&& {
|
|
131
|
-
margin-right: 0;
|
|
132
|
-
${forSmallComputersAndUp(css`
|
|
133
|
-
display: none;
|
|
134
|
-
`)}
|
|
135
|
-
}
|
|
136
|
-
`
|
|
137
|
-
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { FlexBlock } from "components/layout/FlexBlock"
|
|
2
|
-
import React, { ReactNode, useEffect, useRef } from "react"
|
|
3
|
-
import styled from "styled-components"
|
|
4
|
-
import { useTheme } from "styles/theme/useTheme"
|
|
5
|
-
import { NavBarScrollWatcher } from "utils/NavBarScrollWatcher"
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
alertView: ReactNode,
|
|
9
|
-
appBar: ReactNode,
|
|
10
|
-
appBarHeight: string,
|
|
11
|
-
className?: string,
|
|
12
|
-
content: ReactNode,
|
|
13
|
-
drawerView: ReactNode,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const AppBarLayout = ({
|
|
17
|
-
alertView,
|
|
18
|
-
appBar,
|
|
19
|
-
className,
|
|
20
|
-
content,
|
|
21
|
-
drawerView,
|
|
22
|
-
}: Props) => {
|
|
23
|
-
const theme = useTheme()
|
|
24
|
-
const appBarHeight = theme.styles.appBar.height
|
|
25
|
-
const appBarRef = useRef<HTMLDivElement>(null)
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
NavBarScrollWatcher.setNavBar(appBarRef.current!)
|
|
29
|
-
}, [])
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<FlexBlock data-component-name={AppBarLayout.COMPONENT_NAME}
|
|
33
|
-
withRows
|
|
34
|
-
spacing={null}
|
|
35
|
-
className={className}>
|
|
36
|
-
<div ref={appBarRef}>{appBar}</div>
|
|
37
|
-
<FlexBlock css={`min-height: calc(100vh - ${appBarHeight});`}
|
|
38
|
-
spacing={null}
|
|
39
|
-
withRows
|
|
40
|
-
fluid>
|
|
41
|
-
{content}
|
|
42
|
-
{alertView}
|
|
43
|
-
</FlexBlock>
|
|
44
|
-
<DrawerWrapper>
|
|
45
|
-
{drawerView}
|
|
46
|
-
</DrawerWrapper>
|
|
47
|
-
</FlexBlock>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
AppBarLayout.COMPONENT_NAME = "AppBarLayout"
|
|
52
|
-
|
|
53
|
-
const DrawerWrapper = styled.div`
|
|
54
|
-
z-index: ${({ theme }) => theme.styles.sidebar.zIndex};
|
|
55
|
-
`
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js"
|
|
2
|
-
import { IconButton } from "components/forms/IconButton"
|
|
3
|
-
import { FlexBox } from "components/layout/FlexBox"
|
|
4
|
-
import React, { ReactNode } from "react"
|
|
5
|
-
import styled from "styled-components"
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
children: ReactNode,
|
|
9
|
-
className?: string,
|
|
10
|
-
disableNextButton?: boolean,
|
|
11
|
-
disablePreviousButton?: boolean,
|
|
12
|
-
inline?: boolean,
|
|
13
|
-
onNextClick: () => void,
|
|
14
|
-
onPreviousClick: () => void,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export let Carousel = ({
|
|
18
|
-
children,
|
|
19
|
-
className,
|
|
20
|
-
disableNextButton,
|
|
21
|
-
disablePreviousButton,
|
|
22
|
-
inline,
|
|
23
|
-
onNextClick,
|
|
24
|
-
onPreviousClick,
|
|
25
|
-
}: Props) => (
|
|
26
|
-
<FlexBox alignItems={"center"} className={className} inline={inline}>
|
|
27
|
-
<NavButton disabled={disablePreviousButton}
|
|
28
|
-
icon={mdiArrowLeft}
|
|
29
|
-
onClick={onPreviousClick} />
|
|
30
|
-
<FlexBox css={`flex: 1;`} justifyContent={"center"}>
|
|
31
|
-
{children}
|
|
32
|
-
</FlexBox>
|
|
33
|
-
<NavButton disabled={disableNextButton}
|
|
34
|
-
icon={mdiArrowRight}
|
|
35
|
-
onClick={onNextClick} />
|
|
36
|
-
</FlexBox>
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
Carousel = styled(Carousel)``
|
|
40
|
-
|
|
41
|
-
const NavButton = styled(IconButton).attrs({
|
|
42
|
-
flat: false,
|
|
43
|
-
primary: true,
|
|
44
|
-
})``
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { FlexBlock } from "components/layout/FlexBlock"
|
|
2
|
-
import styled from "styled-components"
|
|
3
|
-
import { deviseSizes } from "styles/deviceSizes"
|
|
4
|
-
import { mediaQueries, unit } from "styles/mediaQueries"
|
|
5
|
-
import { css } from "styled-components"
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
forLargeComputers,
|
|
9
|
-
forLargeTabletsAndUp,
|
|
10
|
-
forSmallComputersAndUp,
|
|
11
|
-
} = mediaQueries()
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
tabletSize,
|
|
15
|
-
largeTabletSize,
|
|
16
|
-
smallComputerSize,
|
|
17
|
-
} = deviseSizes()
|
|
18
|
-
|
|
19
|
-
const deviceSettings = css`
|
|
20
|
-
${forLargeTabletsAndUp(css`
|
|
21
|
-
width: ${unit(tabletSize + 1)};
|
|
22
|
-
`)}
|
|
23
|
-
|
|
24
|
-
${forSmallComputersAndUp(css`
|
|
25
|
-
width: ${unit(largeTabletSize + 1)};
|
|
26
|
-
min-width: ${unit(tabletSize + 1)};
|
|
27
|
-
`)}
|
|
28
|
-
|
|
29
|
-
${forLargeComputers(css`
|
|
30
|
-
width: ${unit(smallComputerSize + 1)};
|
|
31
|
-
`)}
|
|
32
|
-
`
|
|
33
|
-
|
|
34
|
-
export const Container = styled(FlexBlock).attrs({
|
|
35
|
-
withRows: true,
|
|
36
|
-
})`
|
|
37
|
-
margin: 0 auto;
|
|
38
|
-
flex: 1;
|
|
39
|
-
width: 100%;
|
|
40
|
-
padding: 0 ${({ theme }) => theme.styles.container.horizontalPadding};
|
|
41
|
-
|
|
42
|
-
${({ fluid }) => fluid ? "" : deviceSettings}
|
|
43
|
-
`
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import styled from "styled-components"
|
|
3
|
-
import { SPACINGS } from "styles/spacings"
|
|
4
|
-
|
|
5
|
-
const COMPONENT_NAME = "FlexBlock"
|
|
6
|
-
|
|
7
|
-
type ResponsiveProps = {
|
|
8
|
-
mediaQueryFunc: Function,
|
|
9
|
-
// eslint-disable-next-line no-use-before-define
|
|
10
|
-
props: Props
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type Props = {
|
|
14
|
-
alignItems?: string,
|
|
15
|
-
compactAxis?: boolean,
|
|
16
|
-
compact?: boolean,
|
|
17
|
-
fluid?: boolean,
|
|
18
|
-
hidden?: boolean,
|
|
19
|
-
withRows?: boolean,
|
|
20
|
-
justify?: string,
|
|
21
|
-
/*
|
|
22
|
-
When deriving a new Styled Component based off any Block/FlexBlock
|
|
23
|
-
component, if spacing is being used, flexDirection needs to be set as
|
|
24
|
-
a attrs prop, rather as a css property.
|
|
25
|
-
|
|
26
|
-
ex:
|
|
27
|
-
CORRECT
|
|
28
|
-
const FormContainer = styled(FlexBlock).attrs({
|
|
29
|
-
spacing: SPACINGS.SM,
|
|
30
|
-
withRows: true,
|
|
31
|
-
})``
|
|
32
|
-
|
|
33
|
-
INCORRECT
|
|
34
|
-
const FormContainer = styled(FlexBlock).attrs({
|
|
35
|
-
spacing: SPACINGS.SM,
|
|
36
|
-
})`
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
`
|
|
39
|
-
*/
|
|
40
|
-
spacing?: string | null,
|
|
41
|
-
responsivePropsList?: Array<ResponsiveProps>
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const getFlexDirection = ({ withRows }: Props) => {
|
|
45
|
-
return withRows ? "column" : "row"
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const getSpacingDirection = (direction: string) => {
|
|
49
|
-
return direction === "column" ? "margin-bottom" : "margin-right"
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const getDisplay = ({ compact, hidden }: Props) => {
|
|
53
|
-
if (hidden) return "none"
|
|
54
|
-
return compact ? "inline-flex" : "flex"
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const getSpacing = ({ spacing, ...props }: Props) => {
|
|
58
|
-
if (!spacing) return ""
|
|
59
|
-
|
|
60
|
-
return `& > *:not(:last-child) {
|
|
61
|
-
margin: 0;
|
|
62
|
-
${getSpacingDirection(getFlexDirection(props))}: ${spacing};
|
|
63
|
-
}`
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const responsiveStyles = ({ responsivePropsList, ...originalProps }: Props) => (
|
|
67
|
-
responsivePropsList?.map(({
|
|
68
|
-
mediaQueryFunc,
|
|
69
|
-
props: rProps,
|
|
70
|
-
}: ResponsiveProps): string => {
|
|
71
|
-
const props = { ...originalProps, ...rProps }
|
|
72
|
-
const {
|
|
73
|
-
alignItems,
|
|
74
|
-
justify,
|
|
75
|
-
compactAxis,
|
|
76
|
-
fluid,
|
|
77
|
-
} = props
|
|
78
|
-
|
|
79
|
-
return mediaQueryFunc(`
|
|
80
|
-
display: ${getDisplay(props)};
|
|
81
|
-
justify-content: ${justify || "initial"};
|
|
82
|
-
align-items: ${alignItems ? alignItems : "initial"};
|
|
83
|
-
// align-self: ${compactAxis ? "initial" : "stretch"};
|
|
84
|
-
flex-direction: ${getFlexDirection(props)};
|
|
85
|
-
flex: ${fluid ? 1 : "unset"};
|
|
86
|
-
${getSpacing(props)}
|
|
87
|
-
`).join("")
|
|
88
|
-
})
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
export const FlexBlock = styled.div.attrs<Props>(({
|
|
92
|
-
spacing,
|
|
93
|
-
}) => ({
|
|
94
|
-
spacing: spacing === undefined ? SPACINGS.SM : spacing,
|
|
95
|
-
}))`
|
|
96
|
-
display: ${getDisplay};
|
|
97
|
-
justify-content: ${(p) => p.justify || "initial"};
|
|
98
|
-
align-items: ${({ alignItems }) => alignItems ? alignItems : "initial"};
|
|
99
|
-
// align-self: ${({ compactAxis }) => compactAxis ? "initial" : "stretch"};
|
|
100
|
-
flex-direction: ${getFlexDirection};
|
|
101
|
-
flex: ${({ fluid }: Props) => fluid ? 1 : "unset"};
|
|
102
|
-
${getSpacing}
|
|
103
|
-
|
|
104
|
-
${responsiveStyles}
|
|
105
|
-
`
|
|
106
|
-
|
|
107
|
-
// @ts-ignore
|
|
108
|
-
FlexBlock.COMPONENT_NAME = COMPONENT_NAME
|
|
109
|
-
|
|
110
|
-
FlexBlock.defaultProps = {
|
|
111
|
-
compactAxis: false,
|
|
112
|
-
compact: false,
|
|
113
|
-
withRows: false,
|
|
114
|
-
responsivePropsList: [],
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export const PaddedFlexBlock = styled(FlexBlock).attrs((props) => ({
|
|
118
|
-
}))`
|
|
119
|
-
padding: ${SPACINGS.SM};
|
|
120
|
-
`
|
|
121
|
-
// @ts-ignore
|
|
122
|
-
PaddedFlexBlock.COMPONENT_NAME = "PaddedFlexBlock"
|