@hazelcast/ui 1.3.3-next.8 → 2.0.1-canary.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/README.md +223 -6
- package/lib/{Alert.d.ts → components/Alert.d.ts} +1 -1
- package/lib/{Alert.js → components/Alert.js} +2 -2
- package/lib/components/Alert.js.map +1 -0
- package/lib/{Alert.module.scss → components/Alert.module.scss} +3 -2
- package/lib/components/AppHeader/AppHeader.d.ts +16 -0
- package/lib/components/AppHeader/AppHeader.js +17 -0
- package/lib/components/AppHeader/AppHeader.js.map +1 -0
- package/lib/components/AppHeader/AppHeader.module.scss +29 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.d.ts +12 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js +7 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss +29 -0
- package/lib/components/AppHeader/AppHeaderLogo/index.d.ts +1 -0
- package/lib/components/AppHeader/AppHeaderLogo/index.js +2 -0
- package/lib/components/AppHeader/AppHeaderLogo/index.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.d.ts +8 -0
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js +15 -0
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js.map +1 -0
- package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss +20 -0
- package/lib/components/AppHeader/AppHeaderMenu/index.d.ts +1 -0
- package/lib/components/AppHeader/AppHeaderMenu/index.js +2 -0
- package/lib/components/AppHeader/AppHeaderMenu/index.js.map +1 -0
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.d.ts +5 -0
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js +10 -0
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js.map +1 -0
- package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss +13 -0
- package/lib/components/AppHeader/EnvironmentBadge/index.d.ts +1 -0
- package/lib/components/AppHeader/EnvironmentBadge/index.js +2 -0
- package/lib/components/AppHeader/EnvironmentBadge/index.js.map +1 -0
- package/lib/components/AppHeader/SelectCluster/SelectCluster.d.ts +9 -0
- package/lib/components/AppHeader/SelectCluster/SelectCluster.js +37 -0
- package/lib/components/AppHeader/SelectCluster/SelectCluster.js.map +1 -0
- package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss +101 -0
- package/lib/components/AppHeader/SelectCluster/index.d.ts +1 -0
- package/lib/components/AppHeader/SelectCluster/index.js +2 -0
- package/lib/components/AppHeader/SelectCluster/index.js.map +1 -0
- package/lib/components/AppHeader/index.d.ts +1 -0
- package/lib/components/AppHeader/index.js +2 -0
- package/lib/components/AppHeader/index.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebar.d.ts +11 -0
- package/lib/components/AppSidebar/AppSidebar.js +31 -0
- package/lib/components/AppSidebar/AppSidebar.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebar.module.scss +66 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.d.ts +6 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js +22 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss +16 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js +2 -0
- package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.d.ts +7 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js +11 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss +13 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/index.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/index.js +2 -0
- package/lib/components/AppSidebar/AppSidebarFavorites/index.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.d.ts +28 -0
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js +23 -0
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss +92 -0
- package/lib/components/AppSidebar/AppSidebarItem/index.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarItem/index.js +2 -0
- package/lib/components/AppSidebar/AppSidebarItem/index.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.d.ts +6 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js +6 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss +24 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js +2 -0
- package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.d.ts +13 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js +15 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss +58 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.d.ts +12 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js +54 -0
- package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js +3 -0
- package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js.map +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/index.d.ts +1 -0
- package/lib/components/AppSidebar/AppSidebarSection/index.js +2 -0
- package/lib/components/AppSidebar/AppSidebarSection/index.js.map +1 -0
- package/lib/components/AppSidebar/appSidebarContext.d.ts +9 -0
- package/lib/components/AppSidebar/appSidebarContext.js +11 -0
- package/lib/components/AppSidebar/appSidebarContext.js.map +1 -0
- package/lib/components/AppSidebar/index.d.ts +5 -0
- package/lib/components/AppSidebar/index.js +6 -0
- package/lib/components/AppSidebar/index.js.map +1 -0
- package/lib/{AutocompleteField.js → components/AutocompleteField.js} +4 -7
- package/lib/components/AutocompleteField.js.map +1 -0
- package/lib/{AutocompleteField.module.scss → components/AutocompleteField.module.scss} +2 -2
- package/lib/{AutocompleteFieldFormik.d.ts → components/AutocompleteFieldFormik.d.ts} +1 -1
- package/lib/{AutocompleteFieldFormik.js → components/AutocompleteFieldFormik.js} +1 -1
- package/lib/components/AutocompleteFieldFormik.js.map +1 -0
- package/lib/{Badge.js → components/Badge.js} +4 -4
- package/lib/components/Badge.js.map +1 -0
- package/lib/{Badge.module.scss → components/Badge.module.scss} +1 -1
- package/lib/{Button.d.ts → components/Button.d.ts} +8 -8
- package/lib/{Button.js → components/Button.js} +14 -42
- package/lib/components/Button.js.map +1 -0
- package/lib/{Button.module.scss → components/Button.module.scss} +42 -12
- package/lib/{Calendar → components/Calendar}/Calendar.d.ts +3 -2
- package/lib/{Calendar → components/Calendar}/Calendar.js +6 -9
- package/lib/components/Calendar/Calendar.js.map +1 -0
- package/lib/{Calendar → components/Calendar}/Calendar.module.scss +2 -2
- package/lib/components/Calendar/CalendarRange.js.map +1 -0
- package/lib/{Calendar → components/Calendar}/CalendarRange.module.scss +1 -1
- package/lib/{Calendar → components/Calendar}/components/CalendarHeader.js +1 -1
- package/lib/components/Calendar/components/CalendarHeader.js.map +1 -0
- package/lib/{Calendar → components/Calendar}/components/CalendarInput.d.ts +3 -2
- package/lib/{Calendar → components/Calendar}/components/CalendarInput.js +1 -1
- package/lib/components/Calendar/components/CalendarInput.js.map +1 -0
- package/lib/{Calendar → components/Calendar}/components/CalendarTime.d.ts +3 -2
- package/lib/{Calendar → components/Calendar}/components/CalendarTime.js +6 -6
- package/lib/components/Calendar/components/CalendarTime.js.map +1 -0
- package/lib/{Calendar → components/Calendar}/components/CalendarTime.module.scss +2 -2
- package/lib/{Calendar → components/Calendar}/helpers/consts.js.map +1 -1
- package/lib/{Card.d.ts → components/Card.d.ts} +3 -1
- package/lib/{Card.js → components/Card.js} +3 -2
- package/lib/components/Card.js.map +1 -0
- package/lib/{Card.module.scss → components/Card.module.scss} +52 -19
- package/lib/{Carousel.d.ts → components/Carousel.d.ts} +1 -1
- package/lib/{Carousel.js → components/Carousel.js} +1 -1
- package/lib/components/Carousel.js.map +1 -0
- package/lib/{Carousel.module.scss → components/Carousel.module.scss} +2 -2
- package/lib/components/CenteredLoader.d.ts +5 -0
- package/lib/components/CenteredLoader.js +6 -0
- package/lib/components/CenteredLoader.js.map +1 -0
- package/lib/components/CenteredLoader.module.scss +11 -0
- package/lib/{Checkbox.d.ts → components/Checkbox.d.ts} +1 -1
- package/lib/{Checkbox.js → components/Checkbox.js} +2 -2
- package/lib/components/Checkbox.js.map +1 -0
- package/lib/{Checkbox.module.scss → components/Checkbox.module.scss} +2 -2
- package/lib/{CheckboxFormik.d.ts → components/CheckboxFormik.d.ts} +2 -2
- package/lib/{CheckboxFormik.js → components/CheckboxFormik.js} +1 -1
- package/lib/components/CheckboxFormik.js.map +1 -0
- package/lib/components/CircularProgressBar.js.map +1 -0
- package/lib/{CircularProgressBar.module.scss → components/CircularProgressBar.module.scss} +1 -1
- package/lib/{ContextMenu.js → components/ContextMenu.js} +1 -1
- package/lib/components/ContextMenu.js.map +1 -0
- package/lib/{ContextMenu.module.scss → components/ContextMenu.module.scss} +2 -2
- package/lib/{Dialog.js → components/Dialog.js} +22 -18
- package/lib/components/Dialog.js.map +1 -0
- package/lib/{Dialog.module.scss → components/Dialog.module.scss} +1 -1
- package/lib/{EmptyState.d.ts → components/EmptyState.d.ts} +4 -4
- package/lib/components/EmptyState.js.map +1 -0
- package/lib/{EmptyState.module.scss → components/EmptyState.module.scss} +1 -1
- package/lib/{Error.d.ts → components/Error.d.ts} +2 -1
- package/lib/components/Error.js +8 -0
- package/lib/components/Error.js.map +1 -0
- package/lib/{Error.module.scss → components/Error.module.scss} +1 -1
- package/lib/{FieldHeader.d.ts → components/FieldHeader.d.ts} +3 -3
- package/lib/components/FieldHeader.js.map +1 -0
- package/lib/{FieldHeader.module.scss → components/FieldHeader.module.scss} +1 -1
- package/lib/{Help.d.ts → components/Help.d.ts} +2 -1
- package/lib/{Help.js → components/Help.js} +3 -3
- package/lib/components/Help.js.map +1 -0
- package/lib/{Help.module.scss → components/Help.module.scss} +1 -1
- package/lib/{Icon.d.ts → components/Icon.d.ts} +2 -1
- package/lib/{Icon.js → components/Icon.js} +3 -3
- package/lib/components/Icon.js.map +1 -0
- package/lib/{Icon.module.scss → components/Icon.module.scss} +1 -1
- package/lib/{IconButton.d.ts → components/IconButton.d.ts} +1 -1
- package/lib/{IconButton.js → components/IconButton.js} +3 -3
- package/lib/components/IconButton.js.map +1 -0
- package/lib/{IconButton.module.scss → components/IconButton.module.scss} +2 -2
- package/lib/{InteractiveList.d.ts → components/InteractiveList.d.ts} +8 -8
- package/lib/{InteractiveList.js → components/InteractiveList.js} +11 -13
- package/lib/components/InteractiveList.js.map +1 -0
- package/lib/{InteractiveList.module.scss → components/InteractiveList.module.scss} +1 -1
- package/lib/{InteractiveListFormik.d.ts → components/InteractiveListFormik.d.ts} +1 -1
- package/lib/{InteractiveListFormik.js → components/InteractiveListFormik.js} +1 -1
- package/lib/components/InteractiveListFormik.js.map +1 -0
- package/lib/{Label.d.ts → components/Label.d.ts} +2 -1
- package/lib/components/Label.js +5 -0
- package/lib/components/Label.js.map +1 -0
- package/lib/{Label.module.scss → components/Label.module.scss} +1 -1
- package/lib/{Link.d.ts → components/Link.d.ts} +2 -2
- package/lib/{Link.js → components/Link.js} +2 -0
- package/lib/components/Link.js.map +1 -0
- package/lib/{Link.module.scss → components/Link.module.scss} +7 -2
- package/lib/{Loader.d.ts → components/Loader.d.ts} +2 -1
- package/lib/{Loader.js → components/Loader.js} +2 -2
- package/lib/components/Loader.js.map +1 -0
- package/lib/{Loader.module.scss → components/Loader.module.scss} +1 -1
- package/lib/{Modal.d.ts → components/Modal.d.ts} +1 -1
- package/lib/{Modal.js → components/Modal.js} +4 -4
- package/lib/components/Modal.js.map +1 -0
- package/lib/{Modal.module.scss → components/Modal.module.scss} +4 -3
- package/lib/components/Notification.js.map +1 -0
- package/lib/{Notification.module.scss → components/Notification.module.scss} +1 -1
- package/lib/components/NumberBadge.js.map +1 -0
- package/lib/{NumberBadge.module.scss → components/NumberBadge.module.scss} +1 -1
- package/lib/{NumberField.d.ts → components/NumberField.d.ts} +1 -1
- package/lib/{NumberField.js → components/NumberField.js} +10 -12
- package/lib/components/NumberField.js.map +1 -0
- package/lib/{NumberField.module.scss → components/NumberField.module.scss} +1 -1
- package/lib/{NumberFieldFormik.d.ts → components/NumberFieldFormik.d.ts} +2 -2
- package/lib/{NumberFieldFormik.js → components/NumberFieldFormik.js} +1 -3
- package/lib/components/NumberFieldFormik.js.map +1 -0
- package/lib/{Overlay.d.ts → components/Overlay.d.ts} +1 -1
- package/lib/components/Overlay.js.map +1 -0
- package/lib/{Overlay.module.scss → components/Overlay.module.scss} +4 -3
- package/lib/{Pagination.js → components/Pagination.js} +13 -13
- package/lib/components/Pagination.js.map +1 -0
- package/lib/{Pagination.module.scss → components/Pagination.module.scss} +2 -2
- package/lib/{PasswordField.d.ts → components/PasswordField.d.ts} +1 -1
- package/lib/{PasswordField.js → components/PasswordField.js} +4 -4
- package/lib/components/PasswordField.js.map +1 -0
- package/lib/{PasswordField.module.scss → components/PasswordField.module.scss} +1 -1
- package/lib/{PasswordFieldFormik.d.ts → components/PasswordFieldFormik.d.ts} +2 -2
- package/lib/{PasswordFieldFormik.js → components/PasswordFieldFormik.js} +1 -1
- package/lib/components/PasswordFieldFormik.js.map +1 -0
- package/lib/{Popover.d.ts → components/Popover.d.ts} +4 -4
- package/lib/{Popover.js → components/Popover.js} +34 -7
- package/lib/components/Popover.js.map +1 -0
- package/lib/{Popover.module.scss → components/Popover.module.scss} +1 -1
- package/lib/{Radio.d.ts → components/Radio.d.ts} +1 -1
- package/lib/{Radio.js → components/Radio.js} +3 -3
- package/lib/components/Radio.js.map +1 -0
- package/lib/{Radio.module.scss → components/Radio.module.scss} +2 -2
- package/lib/components/RadioFormik.js.map +1 -0
- package/lib/{RadioGroup.d.ts → components/RadioGroup.d.ts} +1 -1
- package/lib/{RadioGroup.js → components/RadioGroup.js} +3 -3
- package/lib/components/RadioGroup.js.map +1 -0
- package/lib/{RadioGroup.module.scss → components/RadioGroup.module.scss} +2 -2
- package/lib/{RadioGroupContext.d.ts → components/RadioGroupContext.d.ts} +2 -2
- package/lib/components/RadioGroupContext.js.map +1 -0
- package/lib/{RadioGroupFormik.d.ts → components/RadioGroupFormik.d.ts} +2 -2
- package/lib/{RadioGroupFormik.js → components/RadioGroupFormik.js} +1 -1
- package/lib/components/RadioGroupFormik.js.map +1 -0
- package/lib/{SegmentedControl.d.ts → components/SegmentedControl.d.ts} +3 -3
- package/lib/components/SegmentedControl.js.map +1 -0
- package/lib/{SegmentedControl.module.scss → components/SegmentedControl.module.scss} +2 -2
- package/lib/{SegmentedControlFormik.d.ts → components/SegmentedControlFormik.d.ts} +2 -2
- package/lib/{SegmentedControlFormik.js → components/SegmentedControlFormik.js} +1 -1
- package/lib/components/SegmentedControlFormik.js.map +1 -0
- package/lib/{Select → components/Select}/CheckableSelectField.d.ts +2 -2
- package/lib/{Select → components/Select}/CheckableSelectField.js +5 -5
- package/lib/components/Select/CheckableSelectField.js.map +1 -0
- package/lib/{Select → components/Select}/CheckableSelectField.module.scss +2 -2
- package/lib/{Select → components/Select}/CheckableSelectFieldFormik.d.ts +2 -2
- package/lib/{Select → components/Select}/CheckableSelectFieldFormik.js +1 -1
- package/lib/components/Select/CheckableSelectFieldFormik.js.map +1 -0
- package/lib/{Select → components/Select}/Common.js +8 -15
- package/lib/components/Select/Common.js.map +1 -0
- package/lib/{Select → components/Select}/Common.module.scss +3 -3
- package/lib/{Select → components/Select}/MultiSelectField.d.ts +3 -3
- package/lib/{Select → components/Select}/MultiSelectField.js +15 -13
- package/lib/components/Select/MultiSelectField.js.map +1 -0
- package/lib/{Select → components/Select}/MultiSelectField.module.scss +2 -2
- package/lib/{Select → components/Select}/MultiSelectFieldFormik.d.ts +4 -3
- package/lib/{Select → components/Select}/MultiSelectFieldFormik.js +1 -1
- package/lib/components/Select/MultiSelectFieldFormik.js.map +1 -0
- package/lib/{Select → components/Select}/SelectField.d.ts +4 -3
- package/lib/{Select → components/Select}/SelectField.js +12 -8
- package/lib/components/Select/SelectField.js.map +1 -0
- package/lib/{Select → components/Select}/SelectField.module.scss +2 -2
- package/lib/{Select → components/Select}/SelectFieldFormik.d.ts +2 -2
- package/lib/{Select → components/Select}/SelectFieldFormik.js +1 -1
- package/lib/components/Select/SelectFieldFormik.js.map +1 -0
- package/lib/{Select → components/Select}/helpers.d.ts +2 -2
- package/lib/{Select → components/Select}/helpers.js +1 -1
- package/lib/components/Select/helpers.js.map +1 -0
- package/lib/components/Select/index.js.map +1 -0
- package/lib/components/SimpleTable.d.ts +11 -0
- package/lib/components/SimpleTable.js.map +1 -0
- package/lib/{SimpleTable.module.scss → components/SimpleTable.module.scss} +1 -1
- package/lib/{Slider.d.ts → components/Slider.d.ts} +3 -3
- package/lib/{Slider.js → components/Slider.js} +1 -1
- package/lib/components/Slider.js.map +1 -0
- package/lib/{Slider.module.scss → components/Slider.module.scss} +2 -2
- package/lib/{SliderFormik.d.ts → components/SliderFormik.d.ts} +1 -1
- package/lib/{SliderFormik.js → components/SliderFormik.js} +1 -1
- package/lib/components/SliderFormik.js.map +1 -0
- package/lib/{Table → components/Table}/Cell.d.ts +6 -4
- package/lib/{Table → components/Table}/Cell.js +5 -4
- package/lib/components/Table/Cell.js.map +1 -0
- package/lib/{Table → components/Table}/Cell.module.scss +16 -7
- package/lib/components/Table/CellWrapper.d.ts +11 -0
- package/lib/{Table → components/Table}/CellWrapper.js +6 -6
- package/lib/components/Table/CellWrapper.js.map +1 -0
- package/lib/{Table → components/Table}/EnhancedRenderers.d.ts +8 -10
- package/lib/components/Table/EnhancedRenderers.js +13 -0
- package/lib/components/Table/EnhancedRenderers.js.map +1 -0
- package/lib/{Table → components/Table}/Header.d.ts +9 -5
- package/lib/{Table → components/Table}/Header.js +22 -11
- package/lib/components/Table/Header.js.map +1 -0
- package/lib/{Table → components/Table}/Header.module.scss +14 -9
- package/lib/components/Table/Row.d.ts +19 -0
- package/lib/{Table → components/Table}/Row.js +6 -7
- package/lib/components/Table/Row.js.map +1 -0
- package/lib/{Table → components/Table}/Row.module.scss +17 -14
- package/lib/components/Table/Table.d.ts +85 -0
- package/lib/components/Table/Table.js +259 -0
- package/lib/components/Table/Table.js.map +1 -0
- package/lib/{Table → components/Table}/Table.module.scss +8 -2
- package/lib/{Table → components/Table}/TableContent.d.ts +9 -9
- package/lib/components/Table/TableContent.js +58 -0
- package/lib/components/Table/TableContent.js.map +1 -0
- package/lib/components/Table/constants.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.d.ts +8 -0
- package/lib/{Table → components/Table}/features/columnsSelection/CellCopyablePopover.js +1 -1
- package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js.map +1 -0
- package/lib/{Table → components/Table}/features/columnsSelection/CellCopyablePopover.module.scss +1 -1
- package/lib/{Table → components/Table}/features/columnsSelection/ContextMenu/ContextMenu.d.ts +2 -2
- package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/ContextMenu/index.js.map +1 -0
- package/lib/{Table → components/Table}/features/columnsSelection/columnsSelection.d.ts +0 -1
- package/lib/{Table → components/Table}/features/columnsSelection/columnsSelection.js +1 -1
- package/lib/components/Table/features/columnsSelection/columnsSelection.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/helpers.js.map +1 -0
- package/lib/components/Table/features/columnsSelection/index.js.map +1 -0
- package/lib/components/Table/helpers.d.ts +2 -0
- package/lib/components/Table/helpers.js +10 -0
- package/lib/components/Table/helpers.js.map +1 -0
- package/lib/components/Table/tableTypes.d.ts +80 -0
- package/lib/components/Table/tableTypes.js +2 -0
- package/lib/components/Table/tableTypes.js.map +1 -0
- package/lib/components/Table/useTrackTableState.d.ts +3 -0
- package/lib/components/Table/useTrackTableState.js +30 -0
- package/lib/components/Table/useTrackTableState.js.map +1 -0
- package/lib/components/Table/utils.d.ts +16 -0
- package/lib/components/Table/utils.js +121 -0
- package/lib/components/Table/utils.js.map +1 -0
- package/lib/{Tabs → components/Tabs}/Tab.d.ts +1 -19
- package/lib/{Tabs → components/Tabs}/Tab.js +3 -17
- package/lib/components/Tabs/Tab.js.map +1 -0
- package/lib/{Tabs → components/Tabs}/Tab.module.scss +2 -6
- package/lib/components/Tabs/TabContext.js.map +1 -0
- package/lib/{Tabs → components/Tabs}/TabList.js +1 -3
- package/lib/components/Tabs/TabList.js.map +1 -0
- package/lib/{Tabs → components/Tabs}/TabPanel.d.ts +2 -1
- package/lib/{Tabs → components/Tabs}/TabPanel.js +2 -2
- package/lib/components/Tabs/TabPanel.js.map +1 -0
- package/lib/components/Tabs/index.js.map +1 -0
- package/lib/{Terminal.d.ts → components/Terminal.d.ts} +1 -1
- package/lib/{Terminal.js → components/Terminal.js} +0 -1
- package/lib/components/Terminal.js.map +1 -0
- package/lib/{Terminal.module.scss → components/Terminal.module.scss} +2 -2
- package/lib/{TextArea.d.ts → components/TextArea.d.ts} +1 -1
- package/lib/{TextArea.js → components/TextArea.js} +10 -14
- package/lib/components/TextArea.js.map +1 -0
- package/lib/{TextArea.module.scss → components/TextArea.module.scss} +2 -2
- package/lib/{TextAreaFormik.d.ts → components/TextAreaFormik.d.ts} +1 -1
- package/lib/components/TextAreaFormik.js.map +1 -0
- package/lib/{TextField.d.ts → components/TextField.d.ts} +5 -4
- package/lib/{TextField.js → components/TextField.js} +7 -7
- package/lib/components/TextField.js.map +1 -0
- package/lib/{TextField.module.scss → components/TextField.module.scss} +2 -2
- package/lib/{TextFieldFormik.d.ts → components/TextFieldFormik.d.ts} +2 -2
- package/lib/{TextFieldFormik.js → components/TextFieldFormik.js} +1 -1
- package/lib/components/TextFieldFormik.js.map +1 -0
- package/lib/{TimeField.d.ts → components/TimeField.d.ts} +1 -1
- package/lib/{TimeField.js → components/TimeField.js} +3 -3
- package/lib/components/TimeField.js.map +1 -0
- package/lib/{TimeFieldFormik.d.ts → components/TimeFieldFormik.d.ts} +2 -2
- package/lib/components/TimeFieldFormik.js.map +1 -0
- package/lib/{Toast.d.ts → components/Toast.d.ts} +2 -1
- package/lib/{Toast.js → components/Toast.js} +6 -6
- package/lib/components/Toast.js.map +1 -0
- package/lib/{Toast.module.scss → components/Toast.module.scss} +1 -1
- package/lib/{Toggle.d.ts → components/Toggle.d.ts} +1 -1
- package/lib/{Toggle.js → components/Toggle.js} +5 -5
- package/lib/components/Toggle.js.map +1 -0
- package/lib/{Toggle.module.scss → components/Toggle.module.scss} +2 -2
- package/lib/{ToggleFormik.d.ts → components/ToggleFormik.d.ts} +2 -2
- package/lib/{ToggleFormik.js → components/ToggleFormik.js} +1 -1
- package/lib/components/ToggleFormik.js.map +1 -0
- package/lib/{Tooltip.d.ts → components/Tooltip.d.ts} +4 -1
- package/lib/{Tooltip.js → components/Tooltip.js} +23 -17
- package/lib/components/Tooltip.js.map +1 -0
- package/lib/{Tooltip.module.scss → components/Tooltip.module.scss} +104 -72
- package/lib/{TruncatedText.d.ts → components/TruncatedText.d.ts} +6 -4
- package/lib/{TruncatedText.js → components/TruncatedText.js} +3 -3
- package/lib/components/TruncatedText.js.map +1 -0
- package/lib/{TruncatedText.module.scss → components/TruncatedText.module.scss} +1 -1
- package/lib/helpers/array.d.ts +5 -0
- package/lib/helpers/array.js +19 -0
- package/lib/helpers/array.js.map +1 -0
- package/lib/helpers/escapeHtml.d.ts +1 -0
- package/lib/helpers/escapeHtml.js +7 -0
- package/lib/helpers/escapeHtml.js.map +1 -0
- package/lib/helpers/forms.d.ts +1 -0
- package/lib/helpers/forms.js +16 -0
- package/lib/helpers/forms.js.map +1 -0
- package/lib/helpers/math.d.ts +1 -0
- package/lib/helpers/math.js +7 -0
- package/lib/helpers/math.js.map +1 -0
- package/lib/helpers/types.d.ts +35 -0
- package/lib/helpers/types.js +2 -0
- package/lib/helpers/types.js.map +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useCloseOnResize.js.map +1 -1
- package/lib/hooks/useDeepEqual.js +0 -1
- package/lib/hooks/useDeepEqual.js.map +1 -1
- package/lib/hooks/useDimensions.js.map +1 -1
- package/lib/hooks/useOnClickOutside.d.ts +1 -1
- package/lib/hooks/useOnClickOutside.js +7 -1
- package/lib/hooks/useOnClickOutside.js.map +1 -1
- package/lib/hooks/usePagination.js +1 -1
- package/lib/hooks/usePagination.js.map +1 -1
- package/lib/hooks/usePersistedState.d.ts +2 -0
- package/lib/hooks/usePersistedState.js +35 -0
- package/lib/hooks/usePersistedState.js.map +1 -0
- package/lib/hooks/useResizeAware.d.ts +3 -0
- package/lib/hooks/useResizeAware.js +25 -0
- package/lib/hooks/useResizeAware.js.map +1 -0
- package/lib/icons/Cluster.d.ts +2 -0
- package/lib/icons/Cluster.js +7 -0
- package/lib/icons/Cluster.js.map +1 -0
- package/lib/icons/Compare.d.ts +7 -0
- package/lib/icons/Compare.js +7 -0
- package/lib/icons/Compare.js.map +1 -0
- package/lib/icons/Compute.d.ts +2 -0
- package/lib/icons/Compute.js +7 -0
- package/lib/icons/Compute.js.map +1 -0
- package/lib/icons/Folder.d.ts +2 -0
- package/lib/icons/Folder.js +4 -0
- package/lib/icons/Folder.js.map +1 -0
- package/lib/icons/PlusCircle.d.ts +2 -0
- package/lib/icons/PlusCircle.js +6 -0
- package/lib/icons/PlusCircle.js.map +1 -0
- package/lib/icons/Streaming.d.ts +2 -0
- package/lib/icons/Streaming.js +8 -0
- package/lib/icons/Streaming.js.map +1 -0
- package/lib/index.d.ts +70 -53
- package/lib/index.js +73 -53
- package/lib/index.js.map +1 -1
- package/lib/services/logger.d.ts +13 -0
- package/lib/services/logger.js +84 -0
- package/lib/services/logger.js.map +1 -0
- package/lib/services/time.d.ts +7 -0
- package/lib/services/time.js +17 -0
- package/lib/services/time.js.map +1 -0
- package/lib/test-helpers/render.d.ts +10 -0
- package/lib/test-helpers/render.js +24 -0
- package/lib/test-helpers/render.js.map +1 -0
- package/lib/test-helpers/time.d.ts +1 -0
- package/lib/test-helpers/time.js +2 -0
- package/lib/test-helpers/time.js.map +1 -0
- package/lib/test-helpers/utils.d.ts +5 -0
- package/lib/test-helpers/utils.js +11 -0
- package/lib/test-helpers/utils.js.map +1 -0
- package/lib/types.d.ts +6 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/formik.js.map +1 -1
- package/lib/utils/portal.js.map +1 -1
- package/package.json +130 -88
- package/styles/constants/_colors.scss +36 -12
- package/styles/constants/_typography.scss +0 -7
- package/styles/helpers/_a11y.scss +8 -0
- package/styles/helpers/_gradients.scss +39 -6
- package/styles/typography/fonts/UbuntuMono-Bold.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-BoldItalic.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-Italic.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-Regular.woff2 +0 -0
- package/styles/typography/ubuntu-mono.css +31 -0
- package/lib/Alert.js.map +0 -1
- package/lib/AutocompleteField.js.map +0 -1
- package/lib/AutocompleteFieldFormik.js.map +0 -1
- package/lib/Badge.js.map +0 -1
- package/lib/Button.js.map +0 -1
- package/lib/Calendar/Calendar.js.map +0 -1
- package/lib/Calendar/CalendarRange.js.map +0 -1
- package/lib/Calendar/components/CalendarHeader.js.map +0 -1
- package/lib/Calendar/components/CalendarInput.js.map +0 -1
- package/lib/Calendar/components/CalendarTime.js.map +0 -1
- package/lib/Card.js.map +0 -1
- package/lib/Carousel.js.map +0 -1
- package/lib/Checkbox.js.map +0 -1
- package/lib/CheckboxFormik.js.map +0 -1
- package/lib/CircularProgressBar.js.map +0 -1
- package/lib/ContextMenu.js.map +0 -1
- package/lib/Dialog.js.map +0 -1
- package/lib/EmptyState.js.map +0 -1
- package/lib/Error.js +0 -8
- package/lib/Error.js.map +0 -1
- package/lib/FieldHeader.js.map +0 -1
- package/lib/Help.js.map +0 -1
- package/lib/Icon.js.map +0 -1
- package/lib/IconButton.js.map +0 -1
- package/lib/InteractiveList.js.map +0 -1
- package/lib/InteractiveListFormik.js.map +0 -1
- package/lib/Label.js +0 -5
- package/lib/Label.js.map +0 -1
- package/lib/Link.js.map +0 -1
- package/lib/Loader.js.map +0 -1
- package/lib/Modal.js.map +0 -1
- package/lib/Notification.js.map +0 -1
- package/lib/NumberBadge.js.map +0 -1
- package/lib/NumberField.js.map +0 -1
- package/lib/NumberFieldFormik.js.map +0 -1
- package/lib/Overlay.js.map +0 -1
- package/lib/Pagination.js.map +0 -1
- package/lib/PasswordField.js.map +0 -1
- package/lib/PasswordFieldFormik.js.map +0 -1
- package/lib/Popover.js.map +0 -1
- package/lib/Radio.js.map +0 -1
- package/lib/RadioFormik.js.map +0 -1
- package/lib/RadioGroup.js.map +0 -1
- package/lib/RadioGroupContext.js.map +0 -1
- package/lib/RadioGroupFormik.js.map +0 -1
- package/lib/SegmentedControl.js.map +0 -1
- package/lib/SegmentedControlFormik.js.map +0 -1
- package/lib/Select/CheckableSelectField.js.map +0 -1
- package/lib/Select/CheckableSelectFieldFormik.js.map +0 -1
- package/lib/Select/Common.js.map +0 -1
- package/lib/Select/MultiSelectField.js.map +0 -1
- package/lib/Select/MultiSelectFieldFormik.js.map +0 -1
- package/lib/Select/SelectField.js.map +0 -1
- package/lib/Select/SelectFieldFormik.js.map +0 -1
- package/lib/Select/helpers.js.map +0 -1
- package/lib/Select/index.js.map +0 -1
- package/lib/SimpleTable.d.ts +0 -11
- package/lib/SimpleTable.js.map +0 -1
- package/lib/Slider.js.map +0 -1
- package/lib/SliderFormik.js.map +0 -1
- package/lib/Table/Cell.js.map +0 -1
- package/lib/Table/CellWrapper.d.ts +0 -11
- package/lib/Table/CellWrapper.js.map +0 -1
- package/lib/Table/EnhancedRenderers.js +0 -16
- package/lib/Table/EnhancedRenderers.js.map +0 -1
- package/lib/Table/Header.js.map +0 -1
- package/lib/Table/Row.d.ts +0 -17
- package/lib/Table/Row.js.map +0 -1
- package/lib/Table/Table.d.ts +0 -100
- package/lib/Table/Table.js +0 -261
- package/lib/Table/Table.js.map +0 -1
- package/lib/Table/TableContent.js +0 -53
- package/lib/Table/TableContent.js.map +0 -1
- package/lib/Table/constants.js.map +0 -1
- package/lib/Table/features/columnsSelection/CellCopyablePopover.d.ts +0 -8
- package/lib/Table/features/columnsSelection/CellCopyablePopover.js.map +0 -1
- package/lib/Table/features/columnsSelection/ContextMenu/ContextMenu.js.map +0 -1
- package/lib/Table/features/columnsSelection/ContextMenu/index.js.map +0 -1
- package/lib/Table/features/columnsSelection/columnsSelection.js.map +0 -1
- package/lib/Table/features/columnsSelection/helpers.js.map +0 -1
- package/lib/Table/features/columnsSelection/index.js.map +0 -1
- package/lib/Tabs/Tab.js.map +0 -1
- package/lib/Tabs/TabContext.js.map +0 -1
- package/lib/Tabs/TabList.js.map +0 -1
- package/lib/Tabs/TabPanel.js.map +0 -1
- package/lib/Tabs/index.js.map +0 -1
- package/lib/Terminal.js.map +0 -1
- package/lib/TextArea.js.map +0 -1
- package/lib/TextAreaFormik.js.map +0 -1
- package/lib/TextField.js.map +0 -1
- package/lib/TextFieldFormik.js.map +0 -1
- package/lib/TimeField.js.map +0 -1
- package/lib/TimeFieldFormik.js.map +0 -1
- package/lib/Toast.js.map +0 -1
- package/lib/Toggle.js.map +0 -1
- package/lib/ToggleFormik.js.map +0 -1
- package/lib/Tooltip.js.map +0 -1
- package/lib/TruncatedText.js.map +0 -1
- package/lib/utils/test.d.ts +0 -3
- package/lib/utils/test.js +0 -8
- package/lib/utils/test.js.map +0 -1
- /package/lib/{AutocompleteField.d.ts → components/AutocompleteField.d.ts} +0 -0
- /package/lib/{Badge.d.ts → components/Badge.d.ts} +0 -0
- /package/lib/{Calendar → components/Calendar}/CalendarRange.d.ts +0 -0
- /package/lib/{Calendar → components/Calendar}/CalendarRange.js +0 -0
- /package/lib/{Calendar → components/Calendar}/components/CalendarHeader.d.ts +0 -0
- /package/lib/{Calendar → components/Calendar}/helpers/consts.d.ts +0 -0
- /package/lib/{Calendar → components/Calendar}/helpers/consts.js +0 -0
- /package/lib/{CircularProgressBar.d.ts → components/CircularProgressBar.d.ts} +0 -0
- /package/lib/{CircularProgressBar.js → components/CircularProgressBar.js} +0 -0
- /package/lib/{ContextMenu.d.ts → components/ContextMenu.d.ts} +0 -0
- /package/lib/{Dialog.d.ts → components/Dialog.d.ts} +0 -0
- /package/lib/{EmptyState.js → components/EmptyState.js} +0 -0
- /package/lib/{FieldHeader.js → components/FieldHeader.js} +0 -0
- /package/lib/{Notification.d.ts → components/Notification.d.ts} +0 -0
- /package/lib/{Notification.js → components/Notification.js} +0 -0
- /package/lib/{NumberBadge.d.ts → components/NumberBadge.d.ts} +0 -0
- /package/lib/{NumberBadge.js → components/NumberBadge.js} +0 -0
- /package/lib/{Overlay.js → components/Overlay.js} +0 -0
- /package/lib/{Pagination.d.ts → components/Pagination.d.ts} +0 -0
- /package/lib/{RadioFormik.d.ts → components/RadioFormik.d.ts} +0 -0
- /package/lib/{RadioFormik.js → components/RadioFormik.js} +0 -0
- /package/lib/{RadioGroupContext.js → components/RadioGroupContext.js} +0 -0
- /package/lib/{SegmentedControl.js → components/SegmentedControl.js} +0 -0
- /package/lib/{Select → components/Select}/Common.d.ts +0 -0
- /package/lib/{Select → components/Select}/index.d.ts +0 -0
- /package/lib/{Select → components/Select}/index.js +0 -0
- /package/lib/{SimpleTable.js → components/SimpleTable.js} +0 -0
- /package/lib/{Table → components/Table}/TableContent.module.scss +0 -0
- /package/lib/{Table → components/Table}/constants.d.ts +0 -0
- /package/lib/{Table → components/Table}/constants.js +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/ContextMenu/ContextMenu.js +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/ContextMenu/ContextMenu.module.scss +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/ContextMenu/index.d.ts +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/ContextMenu/index.js +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/helpers.d.ts +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/helpers.js +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/index.d.ts +0 -0
- /package/lib/{Table → components/Table}/features/columnsSelection/index.js +0 -0
- /package/lib/{Tabs → components/Tabs}/TabContext.d.ts +0 -0
- /package/lib/{Tabs → components/Tabs}/TabContext.js +0 -0
- /package/lib/{Tabs → components/Tabs}/TabList.d.ts +0 -0
- /package/lib/{Tabs → components/Tabs}/TabList.module.scss +0 -0
- /package/lib/{Tabs → components/Tabs}/TabPanel.module.scss +0 -0
- /package/lib/{Tabs → components/Tabs}/index.d.ts +0 -0
- /package/lib/{Tabs → components/Tabs}/index.js +0 -0
- /package/lib/{TextAreaFormik.js → components/TextAreaFormik.js} +0 -0
- /package/lib/{TimeField.module.scss → components/TimeField.module.scss} +0 -0
- /package/lib/{TimeFieldFormik.js → components/TimeFieldFormik.js} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use '../../../../styles/constants' as c;
|
|
2
|
+
|
|
3
|
+
$transitionLength: 125ms;
|
|
4
|
+
$sideBarMenuSectionTransitionMaxHeight: 1000px;
|
|
5
|
+
|
|
6
|
+
.root {
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: c.$grid * 2;
|
|
9
|
+
align-items: stretch;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
padding-top: c.$grid * 2;
|
|
12
|
+
border-top: 1px solid transparent;
|
|
13
|
+
|
|
14
|
+
h3 {
|
|
15
|
+
margin: 0;
|
|
16
|
+
color: c.$colorNeutralLight;
|
|
17
|
+
font-size: c.$fontSizeBodySmall;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.collapsed {
|
|
22
|
+
border-color: c.$colorNeutralLight;
|
|
23
|
+
|
|
24
|
+
h3 {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: c.$grid;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.icon {
|
|
36
|
+
margin-left: auto;
|
|
37
|
+
color: c.$colorNeutralLighter;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.toggle {
|
|
41
|
+
margin-bottom: c.$grid;
|
|
42
|
+
|
|
43
|
+
.adornment {
|
|
44
|
+
margin-right: -#{c.$grid * 1.5};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.transitionLeave {
|
|
49
|
+
max-height: 0;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
transition: max-height $transitionLength ease-out;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.transitionEnter {
|
|
55
|
+
max-height: $sideBarMenuSectionTransitionMaxHeight;
|
|
56
|
+
overflow: visible;
|
|
57
|
+
transition: max-height $transitionLength ease-in;
|
|
58
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Icon as FeatherIcon } from 'react-feather';
|
|
3
|
+
import { DataTestProp } from '../../../../src';
|
|
4
|
+
export type AppSidebarSectionExpandableProps = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
icon: FeatherIcon;
|
|
9
|
+
ariaLabel: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
} & DataTestProp;
|
|
12
|
+
export declare const AppSidebarSectionExpandable: ({ id, active, icon, title, ariaLabel, children, "data-test": dataTest, }: AppSidebarSectionExpandableProps) => React.JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { useContext, useEffect, useRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { ChevronDown, ChevronUp } from 'react-feather';
|
|
4
|
+
import { useRefValue, createPersistedState } from '../../../hooks';
|
|
5
|
+
import { Icon } from '../../Icon';
|
|
6
|
+
import { AppSidebarItem } from '../AppSidebarItem';
|
|
7
|
+
import { appSidebarContext } from '../appSidebarContext';
|
|
8
|
+
import { appSidebarSectionContext } from './appSidebarSectionContext';
|
|
9
|
+
import styles from './AppSidebarSection.module.scss';
|
|
10
|
+
const kebabCase = (str) => str.toLowerCase().split(' ').join('-');
|
|
11
|
+
export const AppSidebarSectionExpandable = ({ id, active, icon, title, ariaLabel, children, 'data-test': dataTest = 'sidebar-menu-section-title', }) => {
|
|
12
|
+
const rootEl = useRef(null);
|
|
13
|
+
const clicked = useRef(false);
|
|
14
|
+
const { isOpen, open: openSidebar } = useContext(appSidebarContext);
|
|
15
|
+
const usePersistedMenuStorageState = createPersistedState(`isOpen::${title}`);
|
|
16
|
+
const [open, setOpen] = usePersistedMenuStorageState(false);
|
|
17
|
+
const getIsActive = useRefValue(active);
|
|
18
|
+
const getSetOpen = useRefValue(setOpen);
|
|
19
|
+
const chevronButtonProps = open
|
|
20
|
+
? { icon: ChevronUp, ariaLabel: 'Section Open' }
|
|
21
|
+
: { icon: ChevronDown, ariaLabel: 'Section Closed' };
|
|
22
|
+
const isSectionOpen = open && isOpen;
|
|
23
|
+
const handleClick = () => {
|
|
24
|
+
if (!isOpen) {
|
|
25
|
+
openSidebar();
|
|
26
|
+
setOpen(true);
|
|
27
|
+
clicked.current = true;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
setOpen(!open);
|
|
31
|
+
clicked.current = false;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const handleTransitionEnd = () => {
|
|
35
|
+
if (isOpen && active && rootEl.current && clicked.current) {
|
|
36
|
+
rootEl.current.scrollIntoView();
|
|
37
|
+
clicked.current = false;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const cb = getSetOpen();
|
|
42
|
+
if (getIsActive() && cb) {
|
|
43
|
+
setTimeout(() => cb(true));
|
|
44
|
+
}
|
|
45
|
+
}, [getIsActive, getSetOpen]);
|
|
46
|
+
return (React.createElement("section", { ref: rootEl, "data-test": `sidebar-menu-section-${kebabCase(id)}` },
|
|
47
|
+
React.createElement(AppSidebarItem, { title: title, "aria-label": ariaLabel, icon: icon, iconAriaLabel: title, onClick: handleClick, active: active, className: styles.toggle, adornmentClassName: styles.adornment, adornment: React.createElement(Icon, { "data-test": "sidebar-menu-section-chevron", size: "medium", containerClassName: styles.icon, ...chevronButtonProps }), "data-test": dataTest }),
|
|
48
|
+
React.createElement(appSidebarSectionContext.Provider, { value: {} },
|
|
49
|
+
React.createElement("div", { onTransitionEnd: handleTransitionEnd, className: cn(styles.content, {
|
|
50
|
+
[styles.transitionEnter]: isSectionOpen,
|
|
51
|
+
[styles.transitionLeave]: !isSectionOpen,
|
|
52
|
+
}) }, children))));
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=AppSidebarSectionExpandable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppSidebarSectionExpandable.js","sourceRoot":"","sources":["../../../../src/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAuB,MAAM,eAAe,CAAA;AAG3E,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAa,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,OAAO,MAAM,MAAM,iCAAiC,CAAA;AAWpD,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAEzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,EAAE,EACF,MAAM,EACN,IAAI,EACJ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,WAAW,EAAE,QAAQ,GAAG,4BAA4B,GACnB,EAAE,EAAE;IACrC,MAAM,MAAM,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IACxC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAC7B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IACnE,MAAM,4BAA4B,GAAG,oBAAoB,CAAU,WAAW,KAAK,EA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,EAAE,UAAU,CAAC,CAAC,CAAA;IAE7B,OAAO,CACL,iCAAS,GAAG,EAAE,MAAM,eAAa,wBAAwB,SAAS,CAAC,EAAE,CAAC,EAAE;QACtE,oBAAC,cAAc,IACb,KAAK,EAAE,KAAK,gBACA,SAAS,EACrB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,KAAK,EACpB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,kBAAkB,EAAE,MAAM,CAAC,SAAS,EACpC,SAAS,EAAE,oBAAC,IAAI,iBAAW,8BAA8B,EAAC,IAAI,EAAC,QAAQ,EAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,KAAM,kBAAkB,GAAI,eACxH,QAAQ,GACnB;QAEF,oBAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE;YAC1C,6BACE,eAAe,EAAE,mBAAmB,EACpC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE;oBAC5B,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,aAAa;oBACvC,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,aAAa;iBACzC,CAAC,IAED,QAAQ,CACL,CAC4B,CAC5B,CACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const appSidebarSectionContext: import("react").Context<object | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appSidebarSectionContext.js","sourceRoot":"","sources":["../../../../src/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAgB,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppSidebarSection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/AppSidebar/AppSidebarSection/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface AppSidebarContext {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
open: () => void;
|
|
4
|
+
close: () => void;
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
favorites: string[];
|
|
7
|
+
setFavorites: (cb: (value: string[]) => string[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const appSidebarContext: import("react").Context<AppSidebarContext>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
const noOp = () => undefined;
|
|
3
|
+
export const appSidebarContext = createContext({
|
|
4
|
+
open: noOp,
|
|
5
|
+
close: noOp,
|
|
6
|
+
toggle: noOp,
|
|
7
|
+
isOpen: true,
|
|
8
|
+
favorites: [],
|
|
9
|
+
setFavorites: () => [],
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=appSidebarContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appSidebarContext.js","sourceRoot":"","sources":["../../../src/components/AppSidebar/appSidebarContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,MAAM,IAAI,GAAe,GAAG,EAAE,CAAC,SAAS,CAAA;AAUxC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAoB;IAChE,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE;CACvB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AppSidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,6BAA6B,CAAA"}
|
|
@@ -6,7 +6,7 @@ import { Search, X } from 'react-feather';
|
|
|
6
6
|
import useIsomorphicLayoutEffect from 'react-use/lib/useIsomorphicLayoutEffect';
|
|
7
7
|
import styles from './AutocompleteField.module.scss';
|
|
8
8
|
import { Error, errorId } from './Error';
|
|
9
|
-
import { canUseDOM } from '
|
|
9
|
+
import { canUseDOM } from '../utils/ssr';
|
|
10
10
|
import { IconButton } from './IconButton';
|
|
11
11
|
import { FieldHeader } from './FieldHeader';
|
|
12
12
|
/**
|
|
@@ -38,7 +38,6 @@ const DropdownIndicator = (props) => {
|
|
|
38
38
|
// innerProps set event handling
|
|
39
39
|
const ClearIndicator = ({ innerProps }) => {
|
|
40
40
|
// Visually impaired people will use the keyboard (backspace) to remove the value. We do not want to confuse them by allowing to focus this button.
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
41
|
// @ts-ignore
|
|
43
42
|
return React.createElement(IconButton, { ...innerProps, icon: X, ariaHidden: true, kind: "primary", size: "medium", className: styles.clear, tabIndex: -1 });
|
|
44
43
|
};
|
|
@@ -55,7 +54,7 @@ export const highlightOptionText = (labelText, inputValue) => {
|
|
|
55
54
|
}), key: val + `${i}` }, val)))
|
|
56
55
|
: labelText;
|
|
57
56
|
};
|
|
58
|
-
export const AutocompleteField = ({ 'data-test': dataTest, className, disabled, error, errorClassName, isClearable, label, labelClassName, helperText, size = 'medium', menuPortalTarget = 'body', name, onChange, onFocus, onBlur, onInputChange, options, required, value, placeholder = 'Search...', showAriaLabel = false, renderOption, openMenuOnClick = true, ...rest }) => {
|
|
57
|
+
export const AutocompleteField = ({ 'data-test': dataTest = 'autocomplete-field', className, disabled, error, errorClassName, isClearable, label, labelClassName, helperText, size = 'medium', menuPortalTarget = 'body', name, onChange, onFocus, onBlur, onInputChange, options, required, value, placeholder = 'Search...', showAriaLabel = false, renderOption, openMenuOnClick = true, ...rest }) => {
|
|
59
58
|
// when the user clicks on an input with the value, the value should disappear,
|
|
60
59
|
// but then it should appear after the user selects something or blurs the input
|
|
61
60
|
const [isValueHidden, setValueHidden] = useState(false);
|
|
@@ -114,7 +113,6 @@ export const AutocompleteField = ({ 'data-test': dataTest, className, disabled,
|
|
|
114
113
|
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-invalid_attribute
|
|
115
114
|
'aria-errormessage': error && errorId(id),
|
|
116
115
|
'aria-invalid': !!error,
|
|
117
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
118
116
|
// @ts-ignore
|
|
119
117
|
'aria-required': required,
|
|
120
118
|
error,
|
|
@@ -149,11 +147,10 @@ export const AutocompleteField = ({ 'data-test': dataTest, className, disabled,
|
|
|
149
147
|
// We can always add this class to the select itself because even if the menu container is any parent it won't break it
|
|
150
148
|
// However, if it is the select itself, it will properly add necessary specificity level to the menu styles.
|
|
151
149
|
styles.menuContainer, className) },
|
|
152
|
-
React.createElement(FieldHeader, { label: label, id: id, size: size, helperText: helperText, showAriaLabel: showAriaLabel, labelClassName: labelClassName }),
|
|
150
|
+
React.createElement(FieldHeader, { label: label, id: id, size: size, "data-test": dataTest, helperText: helperText, showAriaLabel: showAriaLabel, labelClassName: labelClassName }),
|
|
153
151
|
React.createElement("div", { className: styles.selectBlock },
|
|
154
152
|
React.createElement(ReactSelect, { onInputChange: onInputChange, formatOptionLabel: formatOptionLabelFn, styles: {
|
|
155
153
|
...props.styles,
|
|
156
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
157
154
|
// @ts-ignore
|
|
158
155
|
singleValue: (base) => {
|
|
159
156
|
var _a;
|
|
@@ -164,6 +161,6 @@ export const AutocompleteField = ({ 'data-test': dataTest, className, disabled,
|
|
|
164
161
|
});
|
|
165
162
|
},
|
|
166
163
|
}, ...props })),
|
|
167
|
-
React.createElement(Error, { truncated: true, error: error, className: cn(styles.errorContainer, errorClassName), inputId: id })));
|
|
164
|
+
React.createElement(Error, { "data-test": `${dataTest}-error`, truncated: true, error: error, className: cn(styles.errorContainer, errorClassName), inputId: id })));
|
|
168
165
|
};
|
|
169
166
|
//# sourceMappingURL=AutocompleteField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutocompleteField.js","sourceRoot":"","sources":["../../src/components/AutocompleteField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAwC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtF,OAAO,WAAW,EAAE,EAAc,UAAU,EAAmE,MAAM,cAAc,CAAA;AACnI,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,yBAAyB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,MAAM,MAAM,iCAAiC,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAA;AA2C7D;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAE,KAAK,EAAE,UAAU,EAAmC;;IAC/F,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,GAAG,MAAA,UAAU,CAAC,KAAK,CAAC,mCAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IAC9D,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;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N,oBAAC,KAAK,iBAAY,GAAG,QAAQ,QAAQ,EAAE,SAAS,QAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAI,CAChI,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { AutocompleteFieldProps } from './AutocompleteField';
|
|
3
|
-
import { FieldValidatorGeneric } from '
|
|
3
|
+
import { FieldValidatorGeneric } from '../utils/formik';
|
|
4
4
|
type AutocompleteFieldFormikProps = AutocompleteFieldProps & {
|
|
5
5
|
validate?: FieldValidatorGeneric<string | null>;
|
|
6
6
|
onChange?: (value: string | null) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useField } from 'formik';
|
|
3
3
|
import { AutocompleteField } from './AutocompleteField';
|
|
4
|
-
import { formikTouchAndUpdate, getFieldError } from '
|
|
4
|
+
import { formikTouchAndUpdate, getFieldError } from '../utils/formik';
|
|
5
5
|
export const AutocompleteFieldFormik = ({ name, validate, onChange, ...props }) => {
|
|
6
6
|
const [{ value, onBlur }, meta, { setValue, setTouched }] = useField({
|
|
7
7
|
name,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutocompleteFieldFormik.js","sourceRoot":"","sources":["../../src/components/AutocompleteFieldFormik.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAA;AAC/E,OAAO,EAAyB,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAO5F,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgC,EAAgB,EAAE;IAC5H,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,GAAG,QAAQ,CAAgB;QAClF,IAAI;QACJ,QAAQ;KACT,CAAC,CAAA;IAEF,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAgB,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAA;IACvH,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,QAAgB,EAAE,EAAE;QACnB,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,QAAQ,CAAC,CAAA;QACpB,CAAC;QAED,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC1B,CAAC,EACD,CAAC,cAAc,EAAE,QAAQ,CAAC,CAC3B,CAAA;IAED,OAAO,oBAAC,iBAAiB,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,GAAI,CAAA;AACvI,CAAC,CAAA"}
|
|
@@ -12,14 +12,14 @@ export const BadgeIcon = {
|
|
|
12
12
|
icon: CheckCircle,
|
|
13
13
|
ariaLabel: 'Check circle icon',
|
|
14
14
|
},
|
|
15
|
-
info: {
|
|
16
|
-
icon: Info,
|
|
17
|
-
ariaLabel: 'Info circle icon',
|
|
18
|
-
},
|
|
19
15
|
warning: {
|
|
20
16
|
icon: AlertTriangle,
|
|
21
17
|
ariaLabel: 'Warning triangle icon',
|
|
22
18
|
},
|
|
19
|
+
info: {
|
|
20
|
+
icon: Info,
|
|
21
|
+
ariaLabel: 'Info circle icon',
|
|
22
|
+
},
|
|
23
23
|
critical: {
|
|
24
24
|
icon: AlertCircle,
|
|
25
25
|
ariaLabel: 'Info critical circle icon',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAoB,MAAM,eAAe,CAAA;AAE/F,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,MAAM,MAAM,qBAAqB,CAAA;AASxC,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE,OAAO,EAAE;QACP,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,kBAAkB;KAC9B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,mBAAmB;KAC/B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,uBAAuB;KACnC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,kBAAkB;KAC9B;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,2BAA2B;KACvC;CACF,CAAA;AAWD,MAAM,CAAC,MAAM,KAAK,GAAmB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;IACrF,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;IAE3C,OAAO,CACL,0CACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,MAAM,CAAC,KAAK,EACZ;YACE,SAAS;YACT,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,KAAK,SAAS;YACpC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,KAAK,SAAS;YACpC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,MAAM;YAC9B,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,KAAK,SAAS;YACpC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,KAAK,UAAU;YACtC,OAAO;YACP,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,KAAK,QAAQ;YAClC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,OAAO;SACjC,EACD,SAAS,CACV;QAED,oBAAC,IAAI,iBACO,YAAY,EACtB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,GAC5C;QACF,0CAAe,eAAe,EAAC,SAAS,EAAE,MAAM,CAAC,OAAO,IACrD,OAAO,CACJ,CACF,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { ButtonHTMLAttributes, HTMLAttributes, ReactElement } from 'react';
|
|
2
|
-
import { IconProps } from './Icon';
|
|
2
|
+
import { IconProps, IconSize } from './Icon';
|
|
3
3
|
import { TooltipProps } from './Tooltip';
|
|
4
4
|
import { LinkRel, LinkTarget } from './Link';
|
|
5
|
-
|
|
5
|
+
import { DataTestProp } from '../../src';
|
|
6
6
|
export type ButtonVariant = 'contained' | 'outlined' | 'text';
|
|
7
|
-
export type ButtonColor = 'primary' | 'secondary' | 'warning' | 'brand' | 'authPrimary' | 'authSecondary';
|
|
7
|
+
export type ButtonColor = 'primary' | 'secondary' | 'warning' | 'brand' | 'authPrimary' | 'authSecondary' | 'light';
|
|
8
8
|
export type ButtonSize = 'medium' | 'small';
|
|
9
9
|
export type ButtonAccessibleIconLeftProps = {
|
|
10
10
|
iconLeft: IconProps['icon'];
|
|
@@ -42,12 +42,9 @@ export type ButtonDisabledProps = {
|
|
|
42
42
|
};
|
|
43
43
|
export type ButtonOutlineType = 'outline' | 'inset';
|
|
44
44
|
export type ButtonCommonProps = {
|
|
45
|
-
/**
|
|
46
|
-
* @deprecated Use variant + color instead
|
|
47
|
-
*/
|
|
48
|
-
kind?: ButtonKind;
|
|
49
45
|
children: string | ReactElement;
|
|
50
46
|
size?: ButtonSize;
|
|
47
|
+
iconSize?: IconSize;
|
|
51
48
|
color?: ButtonColor;
|
|
52
49
|
capitalize?: boolean;
|
|
53
50
|
bodyClassName?: string;
|
|
@@ -55,6 +52,9 @@ export type ButtonCommonProps = {
|
|
|
55
52
|
outlineClassName?: string;
|
|
56
53
|
outline?: ButtonOutlineType;
|
|
57
54
|
tooltip?: string;
|
|
55
|
+
tooltipColor?: TooltipProps['color'];
|
|
56
|
+
active?: boolean;
|
|
57
|
+
truncate?: boolean;
|
|
58
58
|
} & (ButtonDisabledProps | ButtonNotDisabledProps) & Pick<HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, 'className' | 'onClick' | 'tabIndex' | 'style'>;
|
|
59
59
|
export type ButtonTypeAnchorProps = {
|
|
60
60
|
component: 'a';
|
|
@@ -72,7 +72,7 @@ export type ButtonTypeButtonProps = {
|
|
|
72
72
|
loading?: boolean;
|
|
73
73
|
} & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'autoFocus' | 'type'>;
|
|
74
74
|
export type ButtonTypeProps = ButtonTypeAnchorProps | ButtonTypeButtonProps;
|
|
75
|
-
export type ButtonProps<T = ButtonTypeProps> = ButtonCommonProps & T & ButtonAccessibleIconLeftProps & ButtonAccessibleIconRightProps;
|
|
75
|
+
export type ButtonProps<T = ButtonTypeProps> = ButtonCommonProps & T & ButtonAccessibleIconLeftProps & ButtonAccessibleIconRightProps & DataTestProp;
|
|
76
76
|
/**
|
|
77
77
|
* ### Purpose
|
|
78
78
|
* Make it clear what users should do to continue with their main flow by using buttons to highlight the main actions they can take.
|
|
@@ -8,31 +8,6 @@ import { Tooltip } from './Tooltip';
|
|
|
8
8
|
import { Loader } from './Loader';
|
|
9
9
|
import styles from './Button.module.scss';
|
|
10
10
|
const capitalizeFirstCharacter = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
|
|
11
|
-
const resolveButtonKindStyles = (kind) => {
|
|
12
|
-
switch (kind) {
|
|
13
|
-
case 'secondary':
|
|
14
|
-
return {
|
|
15
|
-
[styles.colorPrimary]: true,
|
|
16
|
-
[styles.variantOutlined]: true,
|
|
17
|
-
};
|
|
18
|
-
case 'transparent':
|
|
19
|
-
return {
|
|
20
|
-
[styles.colorPrimary]: true,
|
|
21
|
-
[styles.variantText]: true,
|
|
22
|
-
};
|
|
23
|
-
case 'danger': {
|
|
24
|
-
return {
|
|
25
|
-
[styles.colorSecondary]: true,
|
|
26
|
-
[styles.variantContained]: true,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
default:
|
|
30
|
-
return {
|
|
31
|
-
[styles.colorPrimary]: true,
|
|
32
|
-
[styles.variantContained]: true,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
11
|
/**
|
|
37
12
|
* ### Purpose
|
|
38
13
|
* Make it clear what users should do to continue with their main flow by using buttons to highlight the main actions they can take.
|
|
@@ -53,38 +28,35 @@ const resolveButtonKindStyles = (kind) => {
|
|
|
53
28
|
* - **Danger**: Use danger button for potentially destructive actions.
|
|
54
29
|
* - **Transparent**: Use for IconButton and similar use-cases.
|
|
55
30
|
*/
|
|
56
|
-
export const Button = forwardRef(({
|
|
31
|
+
export const Button = forwardRef(({ component: Component = 'button', className, bodyClassName, outlineClassName, outline = 'outline', children, capitalize = true,
|
|
57
32
|
// Disabled tooltip
|
|
58
33
|
disabled, disabledTooltip, disabledTooltipVisible, disabledTooltipPlacement,
|
|
59
34
|
// Left icon
|
|
60
35
|
iconLeft, iconLeftAriaLabel, iconLeftColor, iconLeftClassName,
|
|
61
36
|
// Right icon
|
|
62
|
-
iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, variant = 'contained', color = 'primary', tooltip, size = 'small', ...rest }, ref) => {
|
|
37
|
+
iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, variant = 'contained', color = 'primary', tooltip, size = 'small', active, truncate = true, iconSize: propIconSize, tooltipColor, ...rest }, ref) => {
|
|
63
38
|
const tooltipId = useUID();
|
|
64
|
-
const iconSize = size === 'medium' ? 'smallMedium' : 'small';
|
|
39
|
+
const iconSize = propIconSize || (size === 'medium' ? 'smallMedium' : 'small');
|
|
65
40
|
const relFinal = Array.isArray(rel) ? rel.join(' ') : rel;
|
|
66
41
|
const loadingAnimationOnRight = loading && iconRight && iconRightAriaLabel && !(iconLeft && iconLeftAriaLabel);
|
|
67
|
-
return (React.createElement(Tooltip, { id: tooltipId, content: disabled ? disabledTooltip : tooltip, visible: disabled && disabledTooltipVisible, placement: disabledTooltipPlacement }, (tooltipRef, onMouseEnter, onMouseLeave) => (React.createElement(Component, { "data-test": "button", className: cn(styles.button, {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
[styles[`color${capitalizeFirstCharacter(color)}`]]: true,
|
|
72
|
-
[styles[`variant${capitalizeFirstCharacter(variant)}`]]: true,
|
|
73
|
-
}),
|
|
42
|
+
return (React.createElement(Tooltip, { id: tooltipId, color: tooltipColor, content: disabled ? disabledTooltip : tooltip, visible: disabled && disabledTooltipVisible, placement: disabledTooltipPlacement }, (tooltipRef, onMouseEnter, onMouseLeave) => (React.createElement(Component, { "data-test": "button", className: cn(styles.button, {
|
|
43
|
+
[styles[`color${capitalizeFirstCharacter(color)}`]]: true,
|
|
44
|
+
[styles[`variant${capitalizeFirstCharacter(variant)}`]]: true,
|
|
45
|
+
[styles.active]: active,
|
|
74
46
|
[styles[size]]: size !== 'small',
|
|
75
47
|
}, className), "aria-describedby": disabled ? tooltipId : undefined, disabled: disabled !== null && disabled !== void 0 ? disabled : loading, rel: Component === 'a' ? relFinal : undefined, target: Component === 'a' ? target : undefined, type: Component === 'button' ? type : undefined, ref: mergeRefs([ref, tooltipRef]), ...rest },
|
|
76
48
|
React.createElement("span", { "data-test": "button-outline", className: cn(styles.outline, { [styles.inset]: outline === 'inset' }, outlineClassName) }),
|
|
77
49
|
React.createElement("span", { className: cn(styles.body, bodyClassName), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave },
|
|
78
50
|
loading && !loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconLeft, size: iconSize }),
|
|
79
51
|
iconLeft && iconLeftAriaLabel && !loading && (React.createElement(Icon, { icon: iconLeft, ariaLabel: iconLeftAriaLabel, "data-test": "button-icon-left", className: cn(styles.iconLeft, iconLeftClassName), size: iconSize, color: iconLeftColor })),
|
|
80
|
-
React.createElement(TruncatedText, { text: capitalize && typeof children === 'string' ? children.toUpperCase() : children,
|
|
52
|
+
truncate ? (React.createElement(TruncatedText, { text: capitalize && typeof children === 'string' ? children.toUpperCase() : children,
|
|
81
53
|
/*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
tooltipVisible: disabled && disabledTooltipVisible !== false ? false : undefined }),
|
|
54
|
+
If a button is disabled and text is long we don't want to show 2 popups.
|
|
55
|
+
1. In case a button is disabled and no `disabledTooltipVisible` is enforced, we just hide truncated popup.
|
|
56
|
+
2. In case a button is disabled and disabledTooltip is hidden with a false flag, there is a space to show
|
|
57
|
+
the truncated popup -> setting it to undefined will leave the default behaviour.
|
|
58
|
+
*/
|
|
59
|
+
tooltipVisible: disabled && disabledTooltipVisible !== false ? false : undefined })) : (children),
|
|
88
60
|
loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconRight, size: iconSize }),
|
|
89
61
|
!loadingAnimationOnRight && iconRight && iconRightAriaLabel && (React.createElement(Icon, { icon: iconRight, ariaLabel: iconRightAriaLabel, "data-test": "button-icon-right", className: cn(styles.iconRight, iconRightClassName), size: iconSize, color: iconRightColor })))))));
|
|
90
62
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAwB,UAAU,EAAgC,MAAM,OAAO,CAAA;AAC7F,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,IAAI,EAAuB,MAAM,QAAQ,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAA;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,MAAM,MAAM,sBAAsB,CAAA;AAiGzC,MAAM,wBAAwB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CACE,EACE,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,UAAU,GAAG,IAAI;AACjB,mBAAmB;AACnB,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,wBAAwB;AACxB,YAAY;AACZ,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,iBAAiB;AACjB,aAAa;AACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,GAAG,GAAG,UAAU,EAChB,MAAM,EACN,IAAI,GAAG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AAQ,CAAC,CAAC,CAAC,CACV,oBAAC,aAAa,IACZ,IAAI,EAAE,UAAU,IAAI,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ;gBACpF;;;;;gBAKA;gBACA,cAAc,EAAE,QAAQ,IAAI,sBAAsB,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,GAChF,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CACT;YACA,uBAAuB,IAAI,oBAAC,MAAM,IAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAI;YAClF,CAAC,uBAAuB,IAAI,SAAS,IAAI,kBAAkB,IAAI,CAC9D,oBAAC,IAAI,IACH,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,kBAAkB,eACnB,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,EACnD,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,cAAc,GACrB,CACH,CACI,CACG,CACb,CACO,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use '../../styles/constants' as c;
|
|
3
|
+
@use '../../styles/helpers' as h;
|
|
3
4
|
|
|
4
5
|
@mixin buttonColor($color: c.$colorPrimary) {
|
|
5
6
|
color: $color;
|
|
@@ -174,12 +175,12 @@
|
|
|
174
175
|
&.hover,
|
|
175
176
|
&:focus-visible,
|
|
176
177
|
&.focus {
|
|
177
|
-
@include buttonColor(
|
|
178
|
+
@include buttonColor(color.adjust(c.$colorBrand, $lightness: 20%));
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
&:active,
|
|
181
182
|
&.active {
|
|
182
|
-
@include buttonColor(
|
|
183
|
+
@include buttonColor(color.adjust(c.$colorBrand, $lightness: -10%));
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
&.variantContained {
|
|
@@ -192,18 +193,18 @@
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
&AuthPrimary {
|
|
195
|
-
@include buttonColor(c.$
|
|
196
|
+
@include buttonColor(c.$colorBrandPrimary);
|
|
196
197
|
|
|
197
198
|
&:hover,
|
|
198
199
|
&.hover,
|
|
199
200
|
&:focus-visible,
|
|
200
201
|
&.focus {
|
|
201
|
-
@include buttonColor(
|
|
202
|
+
@include buttonColor(color.adjust(c.$colorBrandPrimary, $lightness: 10%));
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
&:active,
|
|
205
206
|
&.active {
|
|
206
|
-
@include buttonColor(
|
|
207
|
+
@include buttonColor(color.adjust(c.$colorBrandPrimary, $lightness: -10%));
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
&.variantContained {
|
|
@@ -216,7 +217,7 @@
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
&AuthSecondary {
|
|
219
|
-
@include buttonColor(c.$
|
|
220
|
+
@include buttonColor(c.$colorAuthSecondary);
|
|
220
221
|
|
|
221
222
|
border-color: c.$colorNeutralWhite;
|
|
222
223
|
|
|
@@ -224,12 +225,12 @@
|
|
|
224
225
|
&.hover,
|
|
225
226
|
&:focus-visible,
|
|
226
227
|
&.focus {
|
|
227
|
-
@include buttonColor(
|
|
228
|
+
@include buttonColor(color.adjust(c.$colorAuthSecondary, $lightness: 10%));
|
|
228
229
|
}
|
|
229
230
|
|
|
230
231
|
&:active,
|
|
231
232
|
&.active {
|
|
232
|
-
@include buttonColor(
|
|
233
|
+
@include buttonColor(color.adjust(c.$colorAuthSecondary, $lightness: -10%));
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
&.variantContained {
|
|
@@ -237,7 +238,7 @@
|
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
&.variantOutlined {
|
|
240
|
-
border-color: c.$
|
|
241
|
+
border-color: c.$colorAuthSecondary;
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
&:disabled {
|
|
@@ -245,6 +246,36 @@
|
|
|
245
246
|
background-color: c.$colorNeutralWhite;
|
|
246
247
|
}
|
|
247
248
|
}
|
|
249
|
+
|
|
250
|
+
&Light {
|
|
251
|
+
@include buttonColor(c.$colorNeutralLighter);
|
|
252
|
+
|
|
253
|
+
border-color: c.$colorNeutralLighter;
|
|
254
|
+
|
|
255
|
+
&:hover,
|
|
256
|
+
&.hover,
|
|
257
|
+
&:focus-visible,
|
|
258
|
+
&.focus {
|
|
259
|
+
@include buttonColor(color.adjust(c.$colorBrandText, $lightness: 10%));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&:active,
|
|
263
|
+
&.active {
|
|
264
|
+
@include buttonColor(c.$colorBrandText);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&.variantContained {
|
|
268
|
+
color: c.$colorText;
|
|
269
|
+
|
|
270
|
+
&:disabled {
|
|
271
|
+
@include disabledButtonColor;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
&:disabled {
|
|
276
|
+
@include buttonColor(c.$colorNeutralLight);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
248
279
|
}
|
|
249
280
|
|
|
250
281
|
&.variant {
|
|
@@ -281,7 +312,6 @@
|
|
|
281
312
|
}
|
|
282
313
|
|
|
283
314
|
&Text {
|
|
284
|
-
color: inherit;
|
|
285
315
|
background: none;
|
|
286
316
|
|
|
287
317
|
&:hover,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
|
-
import {
|
|
3
|
+
import { DataTestProp } from '../../../src';
|
|
4
|
+
import { PortalContainer } from '../../utils/portal';
|
|
4
5
|
export type CalendarSize = 'medium' | 'small';
|
|
5
6
|
export type CalendarProps = {
|
|
6
7
|
containerClassName?: string;
|
|
@@ -12,5 +13,5 @@ export type CalendarProps = {
|
|
|
12
13
|
container?: PortalContainer;
|
|
13
14
|
inPortal?: boolean;
|
|
14
15
|
dateFormat?: string;
|
|
15
|
-
} & Omit<ReactDatePickerProps, 'value' | 'onChange' | 'dateFormat'
|
|
16
|
+
} & Omit<ReactDatePickerProps, 'value' | 'onChange' | 'dateFormat'> & DataTestProp;
|
|
16
17
|
export declare const Calendar: FC<CalendarProps>;
|