@pega/cosmos-react-core 4.0.0-dev.1.1 → 4.0.0-dev.10.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/lib/components/Actions/Actions.d.ts.map +1 -1
- package/lib/components/Actions/Actions.js +11 -5
- package/lib/components/Actions/Actions.js.map +1 -1
- package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +2 -0
- package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
- package/lib/components/AdditionalInfo/AdditionalInfo.js +24 -15
- package/lib/components/AdditionalInfo/AdditionalInfo.js.map +1 -1
- package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +4 -3
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.d.ts +2 -0
- package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.js +43 -33
- package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +37 -13
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +4 -1
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +45 -14
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +30 -0
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts +2 -0
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js +2 -0
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.d.ts +1 -1
- package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.js +6 -2
- package/lib/components/AppShell/AppShellList.js.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.d.ts +1 -1
- package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.js +21 -19
- package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.js +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
- package/lib/components/AppShell/ContextSwitcher.d.ts +6 -0
- package/lib/components/AppShell/ContextSwitcher.d.ts.map +1 -0
- package/lib/components/AppShell/ContextSwitcher.js +18 -0
- package/lib/components/AppShell/ContextSwitcher.js.map +1 -0
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +8 -9
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.styles.js +7 -4
- package/lib/components/AppShell/Drawer.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationList.js +15 -12
- package/lib/components/AppShell/NavigationList.js.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js +4 -2
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/AppShell/index.d.ts +2 -1
- package/lib/components/AppShell/index.d.ts.map +1 -1
- package/lib/components/AppShell/index.js +1 -0
- package/lib/components/AppShell/index.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +1 -1
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.js +22 -2
- package/lib/components/Backdrop/Backdrop.js.map +1 -1
- package/lib/components/Badges/Count.d.ts +2 -2
- package/lib/components/Badges/Count.d.ts.map +1 -1
- package/lib/components/Badges/Count.js +22 -25
- package/lib/components/Badges/Count.js.map +1 -1
- package/lib/components/Badges/Selection.js +1 -1
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Badges/Tag.js +1 -1
- package/lib/components/Badges/Tag.js.map +1 -1
- package/lib/components/Banner/Banner.d.ts +28 -21
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +138 -96
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/index.d.ts +1 -1
- package/lib/components/Banner/index.d.ts.map +1 -1
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Card/Card.d.ts +4 -7
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +2 -9
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.js +0 -3
- package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -3
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +4 -1
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +2 -0
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/CreditCard/CreditCard.types.d.ts +1 -1
- package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
- package/lib/components/DateTime/DateTime.types.d.ts +10 -7
- package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
- package/lib/components/DateTime/DateTime.types.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +19 -4
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts +4 -2
- package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +71 -34
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +26 -5
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
- package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +1 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
- package/lib/components/DateTime/Input/Duration/Time.d.ts +1 -1
- package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +8 -3
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/PartInput.js +2 -2
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +13 -3
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts +4 -2
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +70 -27
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +7 -2
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/usePickerButton.d.ts.map +1 -1
- package/lib/components/DateTime/Input/usePickerButton.js +19 -27
- package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +2 -2
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +6 -17
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.js +3 -1
- package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.js +2 -8
- package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.d.ts +1 -1
- package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +3 -30
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +7 -147
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/Dialog/Dialog.styles.d.ts +3 -0
- package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.styles.js +18 -0
- package/lib/components/Dialog/Dialog.styles.js.map +1 -0
- package/lib/components/Dialog/Dialog.types.d.ts +87 -0
- package/lib/components/Dialog/Dialog.types.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.types.js +3 -0
- package/lib/components/Dialog/Dialog.types.js.map +1 -0
- package/lib/components/Dialog/FormDialog.d.ts +7 -0
- package/lib/components/Dialog/FormDialog.d.ts.map +1 -0
- package/lib/components/Dialog/FormDialog.js +58 -0
- package/lib/components/Dialog/FormDialog.js.map +1 -0
- package/lib/components/Dialog/InfoDialog.d.ts +6 -0
- package/lib/components/Dialog/InfoDialog.d.ts.map +1 -0
- package/lib/components/Dialog/InfoDialog.js +43 -0
- package/lib/components/Dialog/InfoDialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +3 -2
- package/lib/components/Dialog/index.d.ts.map +1 -1
- package/lib/components/Dialog/index.js +2 -2
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/Drawer/Drawer.d.ts +1 -1
- package/lib/components/Drawer/Drawer.d.ts.map +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.d.ts +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +2 -1
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +5 -36
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/FieldValueList/index.d.ts +1 -1
- package/lib/components/FieldValueList/index.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.js.map +1 -1
- package/lib/components/File/utils.d.ts +1 -1
- package/lib/components/File/utils.d.ts.map +1 -1
- package/lib/components/Flex/Flex.d.ts +2 -2
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/FormControl/FormControl.d.ts +4 -0
- package/lib/components/FormControl/FormControl.d.ts.map +1 -1
- package/lib/components/FormControl/FormControl.js +3 -1
- package/lib/components/FormControl/FormControl.js.map +1 -1
- package/lib/components/FormControl/index.d.ts +1 -0
- package/lib/components/FormControl/index.d.ts.map +1 -1
- package/lib/components/FormControl/index.js.map +1 -1
- package/lib/components/Grid/Grid.types.d.ts +2 -2
- package/lib/components/Grid/Grid.types.d.ts.map +1 -1
- package/lib/components/HTML/HTML.d.ts.map +1 -1
- package/lib/components/HTML/HTML.js +1 -0
- package/lib/components/HTML/HTML.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +2 -2
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +2 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/user-question-mark-solid.icon.d.ts +4 -0
- package/lib/components/Icon/icons/user-question-mark-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/user-question-mark-solid.icon.js +6 -0
- package/lib/components/Icon/icons/user-question-mark-solid.icon.js.map +1 -0
- package/lib/components/Icon/icons/user-question-mark.icon.d.ts +4 -0
- package/lib/components/Icon/icons/user-question-mark.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/user-question-mark.icon.js +6 -0
- package/lib/components/Icon/icons/user-question-mark.icon.js.map +1 -0
- package/lib/components/Lightbox/Lightbox.styles.js +2 -2
- package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +13 -4
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
- package/lib/components/List/CommaSeparatedList.js +5 -37
- package/lib/components/List/CommaSeparatedList.js.map +1 -1
- package/lib/components/List/List.d.ts.map +1 -1
- package/lib/components/List/List.js +11 -1
- package/lib/components/List/List.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +106 -68
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +5 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +50 -5
- package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +5 -5
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/LiveLog/Context.d.ts +3 -0
- package/lib/components/LiveLog/Context.d.ts.map +1 -0
- package/lib/components/LiveLog/Context.js +9 -0
- package/lib/components/LiveLog/Context.js.map +1 -0
- package/lib/components/LiveLog/LiveLog.d.ts +10 -0
- package/lib/components/LiveLog/LiveLog.d.ts.map +1 -0
- package/lib/components/LiveLog/LiveLog.js +99 -0
- package/lib/components/LiveLog/LiveLog.js.map +1 -0
- package/lib/components/LiveLog/LiveLog.styles.d.ts +3 -0
- package/lib/components/LiveLog/LiveLog.styles.d.ts.map +1 -0
- package/lib/components/LiveLog/LiveLog.styles.js +9 -0
- package/lib/components/LiveLog/LiveLog.styles.js.map +1 -0
- package/lib/components/LiveLog/LiveLog.types.d.ts +93 -0
- package/lib/components/LiveLog/LiveLog.types.d.ts.map +1 -0
- package/lib/components/LiveLog/LiveLog.types.js +2 -0
- package/lib/components/LiveLog/LiveLog.types.js.map +1 -0
- package/lib/components/LiveLog/index.d.ts +4 -0
- package/lib/components/LiveLog/index.d.ts.map +1 -0
- package/lib/components/LiveLog/index.js +3 -0
- package/lib/components/LiveLog/index.js.map +1 -0
- package/lib/components/Location/CurrentLocationButton.d.ts +1 -1
- package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +1 -2
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Location/LocationView.js +4 -4
- package/lib/components/Location/LocationView.js.map +1 -1
- package/lib/components/Location/MapsContext.d.ts +1 -1
- package/lib/components/Location/MapsContext.d.ts.map +1 -1
- package/lib/components/Location/utils.d.ts +1 -1
- package/lib/components/Location/utils.d.ts.map +1 -1
- package/lib/components/Location/utils.js.map +1 -1
- package/lib/components/Menu/Menu.js +3 -3
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.styles.js +1 -1
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +3 -5
- package/lib/components/Menu/Menu.types.d.ts.map +1 -1
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/MenuList.d.ts.map +1 -1
- package/lib/components/Menu/MenuList.js +4 -3
- package/lib/components/Menu/MenuList.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +18 -4
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +6 -8
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/Modal/Modal.types.d.ts +2 -1
- package/lib/components/Modal/Modal.types.d.ts.map +1 -1
- package/lib/components/Modal/Modal.types.js.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.js +15 -6
- package/lib/components/MultiStepForm/FormProgress.js.map +1 -1
- package/lib/components/Number/NumberInput.types.d.ts +3 -1
- package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.types.js.map +1 -1
- package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
- package/lib/components/Number/NumberRangeInput.js +71 -4
- package/lib/components/Number/NumberRangeInput.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.js +15 -4
- package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.js +5 -0
- package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.js +16 -2
- package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +20 -3
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts +1 -1
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +2 -5
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.styles.d.ts +0 -1
- package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
- package/lib/components/Popover/Popover.styles.js +0 -6
- package/lib/components/Popover/Popover.styles.js.map +1 -1
- package/lib/components/Popover/modifiers.d.ts +0 -2
- package/lib/components/Popover/modifiers.d.ts.map +1 -1
- package/lib/components/Popover/modifiers.js +1 -32
- package/lib/components/Popover/modifiers.js.map +1 -1
- package/lib/components/Progress/Bar.d.ts +0 -3
- package/lib/components/Progress/Bar.d.ts.map +1 -1
- package/lib/components/Progress/Bar.js +1 -54
- package/lib/components/Progress/Bar.js.map +1 -1
- package/lib/components/Progress/Ellipsis.d.ts +0 -1
- package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
- package/lib/components/Progress/Ellipsis.js +1 -72
- package/lib/components/Progress/Ellipsis.js.map +1 -1
- package/lib/components/Progress/Progress.d.ts.map +1 -1
- package/lib/components/Progress/Progress.js +99 -60
- package/lib/components/Progress/Progress.js.map +1 -1
- package/lib/components/Progress/Progress.styles.d.ts +12 -0
- package/lib/components/Progress/Progress.styles.d.ts.map +1 -0
- package/lib/components/Progress/Progress.styles.js +217 -0
- package/lib/components/Progress/Progress.styles.js.map +1 -0
- package/lib/components/Progress/Progress.types.d.ts +19 -2
- package/lib/components/Progress/Progress.types.d.ts.map +1 -1
- package/lib/components/Progress/Progress.types.js.map +1 -1
- package/lib/components/Progress/Ring.d.ts +0 -3
- package/lib/components/Progress/Ring.d.ts.map +1 -1
- package/lib/components/Progress/Ring.js +1 -58
- package/lib/components/Progress/Ring.js.map +1 -1
- package/lib/components/Progress/index.d.ts +1 -3
- package/lib/components/Progress/index.d.ts.map +1 -1
- package/lib/components/Progress/index.js +1 -3
- package/lib/components/Progress/index.js.map +1 -1
- package/lib/components/QRCode/QRCode.d.ts +14 -0
- package/lib/components/QRCode/QRCode.d.ts.map +1 -0
- package/lib/components/QRCode/QRCode.js +39 -0
- package/lib/components/QRCode/QRCode.js.map +1 -0
- package/lib/components/QRCode/index.d.ts +3 -0
- package/lib/components/QRCode/index.d.ts.map +1 -0
- package/lib/components/QRCode/index.js +2 -0
- package/lib/components/QRCode/index.js.map +1 -0
- package/lib/components/RadioCheck/RadioCheck.js +1 -1
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts +2 -2
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +28 -8
- package/lib/components/SearchInput/SearchInput.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
- package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +9 -0
- package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -0
- package/lib/components/ShowMoreLess/ShowMoreLess.js +41 -0
- package/lib/components/ShowMoreLess/ShowMoreLess.js.map +1 -0
- package/lib/components/ShowMoreLess/index.d.ts +3 -0
- package/lib/components/ShowMoreLess/index.d.ts.map +1 -0
- package/lib/components/ShowMoreLess/index.js +2 -0
- package/lib/components/ShowMoreLess/index.js.map +1 -0
- package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
- package/lib/components/SkipLinks/SkipLinks.js +3 -26
- package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
- package/lib/components/Slider/Slider.styles.d.ts +1 -1
- package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.js +2 -2
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.js +8 -10
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/TextArea/TextArea.js +2 -2
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/Toaster/Context.d.ts +1 -0
- package/lib/components/Toaster/Context.d.ts.map +1 -1
- package/lib/components/Toaster/Context.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +6 -2
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Tree/StandardTree.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.js +70 -27
- package/lib/components/Tree/StandardTree.js.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +1 -0
- package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.styles.js +32 -18
- package/lib/components/Tree/StandardTree.styles.js.map +1 -1
- package/lib/components/Tree/StandardTree.types.d.ts +28 -1
- package/lib/components/Tree/StandardTree.types.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.types.js.map +1 -1
- package/lib/components/Tree/Tree.d.ts +2 -2
- package/lib/components/Tree/Tree.d.ts.map +1 -1
- package/lib/components/Tree/helpers.d.ts +11 -9
- package/lib/components/Tree/helpers.d.ts.map +1 -1
- package/lib/components/Tree/helpers.js +25 -5
- package/lib/components/Tree/helpers.js.map +1 -1
- package/lib/components/Tree/index.d.ts +1 -1
- package/lib/components/Tree/index.d.ts.map +1 -1
- package/lib/components/Tree/index.js.map +1 -1
- package/lib/components/URL/URLDisplay.d.ts +2 -2
- package/lib/components/URL/URLDisplay.d.ts.map +1 -1
- package/lib/components/URL/URLDisplay.js +8 -1
- package/lib/components/URL/URLDisplay.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useActiveDescendant.d.ts +2 -2
- package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
- package/lib/hooks/useArrows.d.ts.map +1 -1
- package/lib/hooks/useArrows.js +3 -3
- package/lib/hooks/useArrows.js.map +1 -1
- package/lib/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/hooks/useBreakpoint.js +3 -2
- package/lib/hooks/useBreakpoint.js.map +1 -1
- package/lib/hooks/useEvent.d.ts +2 -2
- package/lib/hooks/useEvent.d.ts.map +1 -1
- package/lib/hooks/useI18n.d.ts +90 -19
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useLiveLog.d.ts +8 -0
- package/lib/hooks/useLiveLog.d.ts.map +1 -0
- package/lib/hooks/useLiveLog.js +16 -0
- package/lib/hooks/useLiveLog.js.map +1 -0
- package/lib/hooks/useOverride.d.ts +1 -1
- package/lib/hooks/useOverride.d.ts.map +1 -1
- package/lib/hooks/useScrollStick.d.ts +1 -1
- package/lib/hooks/useScrollStick.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +90 -19
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +100 -27
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +92 -21
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/i18n/translate.d.ts +1 -1
- package/lib/i18n/translate.d.ts.map +1 -1
- package/lib/index.d.ts +6 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/lib/register-contexts.js +2 -0
- package/lib/register-contexts.js.map +1 -1
- package/lib/styles/gradients.d.ts +1 -1
- package/lib/styles/gradients.d.ts.map +1 -1
- package/lib/styles/utils.d.ts +1 -1
- package/lib/styles/utils.d.ts.map +1 -1
- package/lib/styles/utils.js +10 -10
- package/lib/styles/utils.js.map +1 -1
- package/lib/theme/ThemeMachine.d.ts +3 -3
- package/lib/theme/ThemeMachine.d.ts.map +1 -1
- package/lib/theme/ThemeMachine.js +30 -30
- package/lib/theme/ThemeMachine.js.map +1 -1
- package/lib/theme/theme.d.ts +45 -75
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +14 -30
- package/lib/theme/themeOverrides.schema.json +1 -4
- package/lib/theme/themes/darkTheme.json +4 -1
- package/lib/theme/themes/legacyBuildTheme.json +2 -3
- package/lib/types/types.d.ts +19 -11
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/lib/utils/bindAll.d.ts +4 -0
- package/lib/utils/bindAll.d.ts.map +1 -0
- package/lib/utils/bindAll.js +9 -0
- package/lib/utils/bindAll.js.map +1 -0
- package/lib/utils/cap.d.ts +4 -0
- package/lib/utils/cap.d.ts.map +1 -0
- package/lib/utils/cap.js +6 -0
- package/lib/utils/cap.js.map +1 -0
- package/lib/utils/createStringMatcher.d.ts +10 -0
- package/lib/utils/createStringMatcher.d.ts.map +1 -0
- package/lib/utils/createStringMatcher.js +21 -0
- package/lib/utils/createStringMatcher.js.map +1 -0
- package/lib/utils/createUID.d.ts +4 -0
- package/lib/utils/createUID.d.ts.map +1 -0
- package/lib/utils/createUID.js +6 -0
- package/lib/utils/createUID.js.map +1 -0
- package/lib/utils/debounce.d.ts +4 -0
- package/lib/utils/debounce.d.ts.map +1 -0
- package/lib/utils/debounce.js +14 -0
- package/lib/utils/debounce.js.map +1 -0
- package/lib/utils/deepGet.d.ts +3 -0
- package/lib/utils/deepGet.d.ts.map +1 -0
- package/lib/utils/deepGet.js +15 -0
- package/lib/utils/deepGet.js.map +1 -0
- package/lib/utils/deepObjectComparison.d.ts +4 -0
- package/lib/utils/deepObjectComparison.d.ts.map +1 -0
- package/lib/utils/deepObjectComparison.js +35 -0
- package/lib/utils/deepObjectComparison.js.map +1 -0
- package/lib/utils/defineSmartGetter.d.ts +3 -0
- package/lib/utils/defineSmartGetter.d.ts.map +1 -0
- package/lib/utils/defineSmartGetter.js +14 -0
- package/lib/utils/defineSmartGetter.js.map +1 -0
- package/lib/utils/documentIsAvailable.d.ts +3 -0
- package/lib/utils/documentIsAvailable.d.ts.map +1 -0
- package/lib/utils/documentIsAvailable.js +3 -0
- package/lib/utils/documentIsAvailable.js.map +1 -0
- package/lib/utils/escapeRegExp.d.ts +8 -0
- package/lib/utils/escapeRegExp.d.ts.map +1 -0
- package/lib/utils/escapeRegExp.js +8 -0
- package/lib/utils/escapeRegExp.js.map +1 -0
- package/lib/utils/focusHeadingOrContainer.d.ts +8 -0
- package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -0
- package/lib/utils/focusHeadingOrContainer.js +29 -0
- package/lib/utils/focusHeadingOrContainer.js.map +1 -0
- package/lib/utils/formatListToLocaleString.d.ts +15 -0
- package/lib/utils/formatListToLocaleString.d.ts.map +1 -0
- package/lib/utils/formatListToLocaleString.js +17 -0
- package/lib/utils/formatListToLocaleString.js.map +1 -0
- package/lib/utils/getActiveElement.d.ts +8 -0
- package/lib/utils/getActiveElement.d.ts.map +1 -0
- package/lib/utils/getActiveElement.js +18 -0
- package/lib/utils/getActiveElement.js.map +1 -0
- package/lib/utils/getFocusables.d.ts +9 -0
- package/lib/utils/getFocusables.d.ts.map +1 -0
- package/lib/utils/getFocusables.js +15 -0
- package/lib/utils/getFocusables.js.map +1 -0
- package/lib/utils/getScrollbarWidth.d.ts +4 -0
- package/lib/utils/getScrollbarWidth.d.ts.map +1 -0
- package/lib/utils/getScrollbarWidth.js +17 -0
- package/lib/utils/getScrollbarWidth.js.map +1 -0
- package/lib/utils/hasProp.d.ts +4 -0
- package/lib/utils/hasProp.d.ts.map +1 -0
- package/lib/utils/hasProp.js +6 -0
- package/lib/utils/hasProp.js.map +1 -0
- package/lib/utils/index.d.ts +27 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +27 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/loadScript.d.ts +3 -0
- package/lib/utils/loadScript.d.ts.map +1 -0
- package/lib/utils/loadScript.js +9 -0
- package/lib/utils/loadScript.js.map +1 -0
- package/lib/utils/navigatorIsAvailable.d.ts +3 -0
- package/lib/utils/navigatorIsAvailable.d.ts.map +1 -0
- package/lib/utils/navigatorIsAvailable.js +3 -0
- package/lib/utils/navigatorIsAvailable.js.map +1 -0
- package/lib/utils/normalizeElements.d.ts +9 -0
- package/lib/utils/normalizeElements.d.ts.map +1 -0
- package/lib/utils/normalizeElements.js +14 -0
- package/lib/utils/normalizeElements.js.map +1 -0
- package/lib/utils/range.d.ts +4 -0
- package/lib/utils/range.d.ts.map +1 -0
- package/lib/utils/range.js +8 -0
- package/lib/utils/range.js.map +1 -0
- package/lib/utils/reflow.d.ts +4 -0
- package/lib/utils/reflow.d.ts.map +1 -0
- package/lib/utils/reflow.js +7 -0
- package/lib/utils/reflow.js.map +1 -0
- package/lib/utils/replaceMatchWithElement.d.ts +4 -0
- package/lib/utils/replaceMatchWithElement.d.ts.map +1 -0
- package/lib/utils/replaceMatchWithElement.js +32 -0
- package/lib/utils/replaceMatchWithElement.js.map +1 -0
- package/lib/utils/sameOrigin.d.ts +7 -0
- package/lib/utils/sameOrigin.d.ts.map +1 -0
- package/lib/utils/sameOrigin.js +25 -0
- package/lib/utils/sameOrigin.js.map +1 -0
- package/lib/utils/testElForOverflow.d.ts +4 -0
- package/lib/utils/testElForOverflow.d.ts.map +1 -0
- package/lib/utils/testElForOverflow.js +6 -0
- package/lib/utils/testElForOverflow.js.map +1 -0
- package/lib/utils/triple.d.ts +12 -0
- package/lib/utils/triple.d.ts.map +1 -0
- package/lib/utils/triple.js +13 -0
- package/lib/utils/triple.js.map +1 -0
- package/lib/utils/tryCatch.d.ts +5 -0
- package/lib/utils/tryCatch.d.ts.map +1 -0
- package/lib/utils/tryCatch.js +16 -0
- package/lib/utils/tryCatch.js.map +1 -0
- package/lib/utils/windowIsAvailable.d.ts +3 -0
- package/lib/utils/windowIsAvailable.d.ts.map +1 -0
- package/lib/utils/windowIsAvailable.js +3 -0
- package/lib/utils/windowIsAvailable.js.map +1 -0
- package/package.json +4 -2
- package/lib/components/ListToolbar/QueryOptionPopover.d.ts +0 -12
- package/lib/components/ListToolbar/QueryOptionPopover.d.ts.map +0 -1
- package/lib/components/ListToolbar/QueryOptionPopover.js +0 -36
- package/lib/components/ListToolbar/QueryOptionPopover.js.map +0 -1
- package/lib/utils/utils.d.ts +0 -93
- package/lib/utils/utils.d.ts.map +0 -1
- package/lib/utils/utils.js +0 -287
- package/lib/utils/utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAc,MAAM,OAAO,CAAC;AAGxF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE;QAChB,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QACrC,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;KAC1C,CAAC;IACF,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAc,MAAM,OAAO,CAAC;AAGxF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE;QAChB,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QACrC,SAAS,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;KAC1C,CAAC;IACF,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAoD3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { useI18n } from '../../hooks';
|
|
3
|
+
import { useConsolidatedRef, useI18n } from '../../hooks';
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import Icon from '../Icon';
|
|
6
6
|
import MenuButton from '../MenuButton';
|
|
7
7
|
const Actions = forwardRef(({ items, menuAt = 2, iconOnly = true, menuButtonProps }, ref) => {
|
|
8
8
|
const t = useI18n();
|
|
9
|
+
const menuButtonRef = useConsolidatedRef(ref);
|
|
9
10
|
if (!items || items.length === 0) {
|
|
10
11
|
return null;
|
|
11
12
|
}
|
|
12
|
-
return items.length >= menuAt ? (_jsx(MenuButton, { ref:
|
|
13
|
-
items: items.map(({ text, ...restProps }) => ({
|
|
13
|
+
return items.length >= menuAt ? (_jsx(MenuButton, { ref: menuButtonRef, text: t('actions'), iconOnly: true, icon: 'more', variant: 'simple', onClick: menuButtonProps?.onClick, onKeyDown: menuButtonProps?.onKeyDown, menu: {
|
|
14
|
+
items: items.map(({ text, onClick, ...restProps }) => ({
|
|
15
|
+
...restProps,
|
|
14
16
|
primary: text,
|
|
15
|
-
|
|
17
|
+
onClick: onClick
|
|
18
|
+
? (id, e) => {
|
|
19
|
+
onClick(id, e, menuButtonRef.current ?? undefined);
|
|
20
|
+
}
|
|
21
|
+
: undefined
|
|
16
22
|
}))
|
|
17
23
|
} })) : (_jsx(_Fragment, { children: items.map(({ id, icon, text, onClick, ...restProps }) => {
|
|
18
|
-
return (_jsx(Button, {
|
|
24
|
+
return (_jsx(Button, { variant: icon && iconOnly ? 'simple' : undefined, onClick: (event) => onClick?.(id, event), label: icon ? text : undefined, icon: !!icon && iconOnly, ...restProps, children: icon && iconOnly ? _jsx(Icon, { name: icon }) : text }, id));
|
|
19
25
|
}) }));
|
|
20
26
|
});
|
|
21
27
|
export default Actions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sourceRoot":"","sources":["../../../src/components/Actions/Actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuD,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Actions.js","sourceRoot":"","sources":["../../../src/components/Actions/Actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuD,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,UAA+B,MAAM,eAAe,CAAC;AAe5D,MAAM,OAAO,GAAmD,UAAU,CACxE,CACE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,EAAE,eAAe,EAAiC,EACtF,GAAwB,EACxB,EAAE;IACF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,aAAa,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE9C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAA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,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAP1C,EAAE,CAQA,CACV,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref, MouseEvent } from 'react';\n\nimport { useConsolidatedRef, useI18n } from '../../hooks';\nimport { Action, ForwardProps, NoChildrenProp } from '../../types';\nimport Button from '../Button';\nimport Icon from '../Icon';\nimport MenuButton, { MenuButtonProps } from '../MenuButton';\n\nexport interface ActionsProps extends NoChildrenProp {\n items: Action[];\n /** @default 2 */\n menuAt?: number;\n menuButtonProps?: {\n onClick?: MenuButtonProps['onClick'];\n onKeyDown?: MenuButtonProps['onKeyDown'];\n };\n /** @default true */\n iconOnly?: boolean;\n ref?: Ref<HTMLButtonElement>;\n}\n\nconst Actions: FunctionComponent<ActionsProps & ForwardProps> = forwardRef(\n (\n { items, menuAt = 2, iconOnly = true, menuButtonProps }: PropsWithoutRef<ActionsProps>,\n ref: ActionsProps['ref']\n ) => {\n const t = useI18n();\n const menuButtonRef = useConsolidatedRef(ref);\n\n if (!items || items.length === 0) {\n return null;\n }\n\n return items.length >= menuAt ? (\n <MenuButton\n ref={menuButtonRef}\n text={t('actions')}\n iconOnly\n icon='more'\n variant='simple'\n onClick={menuButtonProps?.onClick}\n onKeyDown={menuButtonProps?.onKeyDown}\n menu={{\n items: items.map(({ text, onClick, ...restProps }) => ({\n ...restProps,\n primary: text,\n onClick: onClick\n ? (id, e) => {\n onClick(id, e, menuButtonRef.current ?? undefined);\n }\n : undefined\n }))\n }}\n />\n ) : (\n <>\n {items.map(({ id, icon, text, onClick, ...restProps }) => {\n return (\n <Button\n key={id}\n variant={icon && iconOnly ? 'simple' : undefined}\n onClick={(event: MouseEvent<HTMLButtonElement>) => onClick?.(id, event)}\n label={icon ? text : undefined}\n icon={!!icon && iconOnly}\n {...restProps}\n >\n {icon && iconOnly ? <Icon name={icon} /> : text}\n </Button>\n );\n })}\n </>\n );\n }\n);\n\nexport default Actions;\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FunctionComponent, Ref } from 'react';
|
|
2
2
|
import { BaseProps, ForwardProps } from '../../types';
|
|
3
|
+
import { DialogHandleValue } from '../Dialog';
|
|
3
4
|
export interface AdditionalInfoProps extends BaseProps {
|
|
4
5
|
heading: string;
|
|
5
6
|
children: string | JSX.Element;
|
|
7
|
+
dialogHandle?: Ref<DialogHandleValue>;
|
|
6
8
|
ref?: Ref<HTMLDivElement>;
|
|
7
9
|
}
|
|
8
10
|
export declare const StyledAdditionalInfo: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../src/components/AdditionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../src/components/AdditionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAE,iBAAiB,EAAc,MAAM,WAAW,CAAC;AAM1D,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,oBAAoB,yGAAe,CAAC;AAEjD,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CAiDzE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import styled
|
|
2
|
+
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
import Icon, { registerIcon } from '../Icon';
|
|
5
|
-
import { defaultThemeProp } from '../../theme';
|
|
6
5
|
import HTML from '../HTML';
|
|
7
6
|
import Button from '../Button';
|
|
8
|
-
import
|
|
7
|
+
import { InfoDialog } from '../Dialog';
|
|
9
8
|
import * as informationIcon from '../Icon/icons/information.icon';
|
|
10
|
-
import { useI18n } from '../../hooks';
|
|
11
|
-
import { StyledDialog } from '../Dialog/Dialog';
|
|
9
|
+
import { useConsolidatedRef, useI18n } from '../../hooks';
|
|
12
10
|
registerIcon(informationIcon);
|
|
13
|
-
export const StyledAdditionalInfo = styled.div
|
|
14
|
-
|
|
15
|
-
max-width: ${theme.base['content-width'].md};
|
|
16
|
-
}
|
|
17
|
-
`);
|
|
18
|
-
StyledAdditionalInfo.defaultProps = defaultThemeProp;
|
|
19
|
-
const AdditionalInfo = forwardRef(({ heading, children, ...restProps }, ref) => {
|
|
20
|
-
const { target, events } = useDialog();
|
|
11
|
+
export const StyledAdditionalInfo = styled.div ``;
|
|
12
|
+
const AdditionalInfo = forwardRef(({ heading, children, dialogHandle, ...restProps }, ref) => {
|
|
21
13
|
const t = useI18n();
|
|
22
|
-
|
|
14
|
+
const [target, setTarget] = useState(null);
|
|
15
|
+
const buttonRef = useRef(null);
|
|
16
|
+
const handleRef = useConsolidatedRef(dialogHandle);
|
|
17
|
+
useImperativeHandle(handleRef, () => {
|
|
18
|
+
return {
|
|
19
|
+
open: () => {
|
|
20
|
+
setTarget(buttonRef.current);
|
|
21
|
+
},
|
|
22
|
+
close: () => {
|
|
23
|
+
setTarget(null);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
return (_jsxs(StyledAdditionalInfo, { ref: ref, ...restProps, children: [_jsx(Button, { variant: 'simple', label: t('additional_info'), compact: true, icon: true, ref: buttonRef, onClick: () => {
|
|
28
|
+
handleRef.current?.open();
|
|
29
|
+
}, children: _jsx(Icon, { name: 'information' }) }), target && (_jsx(InfoDialog, { heading: heading, target: target, onDismiss: () => {
|
|
30
|
+
handleRef.current?.close();
|
|
31
|
+
}, children: typeof children === 'string' ? _jsx(HTML, { content: children }) : children }))] }));
|
|
23
32
|
});
|
|
24
33
|
export default AdditionalInfo;
|
|
25
34
|
//# sourceMappingURL=AdditionalInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalInfo.js","sourceRoot":"","sources":["../../../src/components/AdditionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AdditionalInfo.js","sourceRoot":"","sources":["../../../src/components/AdditionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAIV,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAqB,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,eAAe,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,YAAY,CAAC,eAAe,CAAC,CAAC;AAS9B,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AA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GAAI,CAAC,CAAC,CAAC,QAAQ,GAC3D,CACd,IACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useImperativeHandle,\n useRef,\n useState\n} from 'react';\nimport styled from 'styled-components';\n\nimport Icon, { registerIcon } from '../Icon';\nimport { BaseProps, ForwardProps } from '../../types';\nimport HTML from '../HTML';\nimport Button from '../Button';\nimport { DialogHandleValue, InfoDialog } from '../Dialog';\nimport * as informationIcon from '../Icon/icons/information.icon';\nimport { useConsolidatedRef, useI18n } from '../../hooks';\n\nregisterIcon(informationIcon);\n\nexport interface AdditionalInfoProps extends BaseProps {\n heading: string;\n children: string | JSX.Element;\n dialogHandle?: Ref<DialogHandleValue>;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledAdditionalInfo = styled.div``;\n\nconst AdditionalInfo: FunctionComponent<AdditionalInfoProps & ForwardProps> = forwardRef(\n (\n { heading, children, dialogHandle, ...restProps }: PropsWithoutRef<AdditionalInfoProps>,\n ref: AdditionalInfoProps['ref']\n ) => {\n const t = useI18n();\n const [target, setTarget] = useState<HTMLButtonElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const handleRef = useConsolidatedRef(dialogHandle);\n\n useImperativeHandle(handleRef, () => {\n return {\n open: () => {\n setTarget(buttonRef.current);\n },\n close: () => {\n setTarget(null);\n }\n };\n });\n\n return (\n <StyledAdditionalInfo ref={ref} {...restProps}>\n <Button\n variant='simple'\n label={t('additional_info')}\n compact\n icon\n ref={buttonRef}\n onClick={() => {\n handleRef.current?.open();\n }}\n >\n <Icon name='information' />\n </Button>\n {target && (\n <InfoDialog\n heading={heading}\n target={target}\n onDismiss={() => {\n handleRef.current?.close();\n }}\n >\n {typeof children === 'string' ? <HTML content={children} /> : children}\n </InfoDialog>\n )}\n </StyledAdditionalInfo>\n );\n }\n);\n\nexport default AdditionalInfo;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAM/F,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAM/F,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,QAAA,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,GAAG,YAAY,CA0G/D,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -7,12 +7,13 @@ import { useBreakpoint, useElement } from '../../hooks';
|
|
|
7
7
|
import BareButton from '../Button/BareButton';
|
|
8
8
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
9
9
|
import AppShellOperator from './Operator';
|
|
10
|
+
import ContextSwitcher from './ContextSwitcher';
|
|
10
11
|
import { StyledAppHeader, StyledAppHeaderInfo, StyledAppHeaderSearchForm, StyledAppHeaderSpacer, StyledAppHeaderText, StyledAppHeaderOperator } from './AppHeader.styles';
|
|
11
12
|
import AppShellContext from './AppShellContext';
|
|
12
|
-
const AppHeader = forwardRef(({ appName, fullImageSrc, imageSrc, href, onClick, portalName, target, appNameHidden, operator, searchInput, searchLabel, searchPage }, ref) => {
|
|
13
|
+
const AppHeader = forwardRef(({ appName, contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {}, fullImageSrc, imageSrc, href, onClick, portalName, target, appNameHidden, operator, searchInput, searchLabel, searchPage }, ref) => {
|
|
13
14
|
const isMediumOrAbove = useBreakpoint('md');
|
|
14
15
|
const [searchContainer, setSearchContainer] = useElement();
|
|
15
|
-
const { setSearchContainerEl } = useContext(AppShellContext);
|
|
16
|
+
const { drawerOpen, setSearchContainerEl } = useContext(AppShellContext);
|
|
16
17
|
useEffect(() => {
|
|
17
18
|
if (searchPage && searchContainer) {
|
|
18
19
|
setSearchContainerEl(searchContainer);
|
|
@@ -26,7 +27,7 @@ const AppHeader = forwardRef(({ appName, fullImageSrc, imageSrc, href, onClick,
|
|
|
26
27
|
appInfoAs = 'a';
|
|
27
28
|
else if (onClick)
|
|
28
29
|
appInfoAs = BareButton;
|
|
29
|
-
return (_jsxs(Flex, { as: StyledAppHeader, container: { alignItems: 'center', pad: 1 }, hideTitle: !isMediumOrAbove, ref: ref, children: [_jsx(StyledAppHeaderInfo, { centerLogo: !fullImageSrc, children: _jsxs(Flex, { container: { inline: true, alignItems: 'center', gap: 1 }, as: appInfoAs, href: href, onClick: onClick, target: target, children: [_jsx(Image, { src: fullImageSrc || imageSrc, alt: '', "aria-hidden": 'true' }), isMediumOrAbove && (_jsxs(_Fragment, { children: [_jsx(StyledAppHeaderText, { as: appNameHidden ? VisuallyHiddenText : 'span', variant: 'primary', children: appName }), portalName && (_jsx(StyledAppHeaderText, { as: appNameHidden ? VisuallyHiddenText : 'span', variant: 'secondary', children: portalName }))] }))] }) }), _jsx(Flex, { item: { grow: 1 }, container: { justify: 'end' }, children: searchInput ? (_jsx(StyledAppHeaderSearchForm, { ref: setSearchContainer, role: 'search', "aria-label": searchLabel, onSubmit: e => e.preventDefault(), isMediumOrAbove: isMediumOrAbove, children: !searchPage && _jsx(SearchInput, { ...searchInput }) })) : (_jsx(StyledAppHeaderSpacer, {})) }), _jsx(AppShellOperator, { as: StyledAppHeaderOperator, actions: operator.actions, popover: { placement: 'bottom-start' }, children: operator.avatar })] }));
|
|
30
|
+
return (_jsxs(Flex, { as: StyledAppHeader, container: { alignItems: 'center', pad: 1 }, hideTitle: !isMediumOrAbove, drawerOpen: drawerOpen, ref: ref, children: [contexts && contexts.length > 1 && onContextClick && (_jsx(ContextSwitcher, { contexts: contexts, onContextClick: onContextClick, label: contextSwitcherLabel })), _jsx(StyledAppHeaderInfo, { centerLogo: !fullImageSrc, children: _jsxs(Flex, { container: { inline: true, alignItems: 'center', gap: 1 }, as: appInfoAs, href: href, onClick: onClick, target: target, children: [_jsx(Image, { src: fullImageSrc || imageSrc, alt: '', "aria-hidden": 'true' }), isMediumOrAbove && (_jsxs(_Fragment, { children: [_jsx(StyledAppHeaderText, { as: appNameHidden ? VisuallyHiddenText : 'span', variant: 'primary', children: appName }), portalName && (_jsx(StyledAppHeaderText, { as: appNameHidden ? VisuallyHiddenText : 'span', variant: 'secondary', children: portalName }))] }))] }) }), _jsx(Flex, { item: { grow: 1 }, container: { justify: 'end' }, children: searchInput ? (_jsx(StyledAppHeaderSearchForm, { ref: setSearchContainer, role: 'search', "aria-label": searchLabel, onSubmit: e => e.preventDefault(), isMediumOrAbove: isMediumOrAbove, children: !searchPage && _jsx(SearchInput, { ...searchInput }) })) : (_jsx(StyledAppHeaderSpacer, {})) }), _jsx(AppShellOperator, { as: StyledAppHeaderOperator, actions: operator.actions, popover: { placement: 'bottom-start' }, children: operator.avatar })] }));
|
|
30
31
|
});
|
|
31
32
|
export default AppHeader;
|
|
32
33
|
//# sourceMappingURL=AppHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuC,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/F,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,UAA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BAAqB,KAAG,CAC1B,GACI,EAEP,KAAC,gBAAgB,IACf,EAAE,EAAE,uBAAuB,EAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO,EACzB,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,YAErC,QAAQ,CAAC,MAAM,GACC,IACd,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, Ref, ElementType, useContext, useEffect } from 'react';\n\nimport Flex from '../Flex';\nimport Image from '../Image';\nimport SearchInput from '../SearchInput';\nimport { useBreakpoint, useElement } from '../../hooks';\nimport { ForwardProps } from '../../types';\nimport BareButton from '../Button/BareButton';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport { AppHeaderProps } from './AppShell.types';\nimport AppShellOperator from './Operator';\nimport ContextSwitcher from './ContextSwitcher';\nimport {\n StyledAppHeader,\n StyledAppHeaderInfo,\n StyledAppHeaderSearchForm,\n StyledAppHeaderSpacer,\n StyledAppHeaderText,\n StyledAppHeaderOperator\n} from './AppHeader.styles';\nimport AppShellContext from './AppShellContext';\n\nconst AppHeader: FunctionComponent<AppHeaderProps & ForwardProps> = forwardRef(\n (\n {\n appName,\n contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {},\n fullImageSrc,\n imageSrc,\n href,\n onClick,\n portalName,\n target,\n appNameHidden,\n operator,\n searchInput,\n searchLabel,\n searchPage\n }: AppHeaderProps,\n ref: Ref<Element>\n ) => {\n const isMediumOrAbove = useBreakpoint('md');\n const [searchContainer, setSearchContainer] = useElement<HTMLElement>();\n const { drawerOpen, setSearchContainerEl } = useContext(AppShellContext);\n\n useEffect(() => {\n if (searchPage && searchContainer) {\n setSearchContainerEl(searchContainer);\n } else {\n setSearchContainerEl(null);\n }\n }, [searchPage, searchContainer, setSearchContainerEl]);\n\n let appInfoAs: ElementType = 'div';\n if (href) appInfoAs = 'a';\n else if (onClick) appInfoAs = BareButton;\n\n return (\n <Flex\n as={StyledAppHeader}\n container={{ alignItems: 'center', pad: 1 }}\n hideTitle={!isMediumOrAbove}\n drawerOpen={drawerOpen}\n ref={ref}\n >\n {contexts && contexts.length > 1 && onContextClick && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n />\n )}\n\n <StyledAppHeaderInfo centerLogo={!fullImageSrc}>\n <Flex\n container={{ inline: true, alignItems: 'center', gap: 1 }}\n as={appInfoAs}\n href={href}\n onClick={onClick}\n target={target}\n >\n <Image src={fullImageSrc || imageSrc} alt='' aria-hidden='true' />\n {isMediumOrAbove && (\n <>\n <StyledAppHeaderText\n as={appNameHidden ? VisuallyHiddenText : 'span'}\n variant='primary'\n >\n {appName}\n </StyledAppHeaderText>\n {portalName && (\n <StyledAppHeaderText\n as={appNameHidden ? VisuallyHiddenText : 'span'}\n variant='secondary'\n >\n {portalName}\n </StyledAppHeaderText>\n )}\n </>\n )}\n </Flex>\n </StyledAppHeaderInfo>\n <Flex item={{ grow: 1 }} container={{ justify: 'end' }}>\n {searchInput ? (\n <StyledAppHeaderSearchForm\n ref={setSearchContainer}\n role='search'\n aria-label={searchLabel}\n onSubmit={e => e.preventDefault()}\n isMediumOrAbove={isMediumOrAbove}\n >\n {!searchPage && <SearchInput {...searchInput} />}\n </StyledAppHeaderSearchForm>\n ) : (\n <StyledAppHeaderSpacer />\n )}\n </Flex>\n\n <AppShellOperator\n as={StyledAppHeaderOperator}\n actions={operator.actions}\n popover={{ placement: 'bottom-start' }}\n >\n {operator.avatar}\n </AppShellOperator>\n </Flex>\n );\n }\n);\n\nexport default AppHeader;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TextProps } from '../Text';
|
|
2
|
+
export declare const StyledContextSwitcher: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
3
|
export declare const StyledAppHeaderInfo: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
4
|
centerLogo: boolean;
|
|
4
5
|
}, never>;
|
|
@@ -12,5 +13,6 @@ export declare const StyledAppHeaderText: import("styled-components").StyledComp
|
|
|
12
13
|
export declare const StyledAppHeaderOperator: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
13
14
|
export declare const StyledAppHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {
|
|
14
15
|
hideTitle: boolean;
|
|
16
|
+
drawerOpen: boolean;
|
|
15
17
|
}, never>;
|
|
16
18
|
//# sourceMappingURL=AppHeader.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAaA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,mBAAmB;gBAA4B,OAAO;SAuBjE,CAAC;AAIH,eAAO,MAAM,yBAAyB;qBAAkC,OAAO;SAwC9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,yGAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;aAA2B,SAAS,CAAC,SAAS,CAAC;SA0B9E,CAAC;AAIF,eAAO,MAAM,uBAAuB,4GAQnC,CAAC;AAIF,eAAO,MAAM,eAAe;eAA8B,OAAO;
|
|
1
|
+
{"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAaA,OAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,qBAAqB,yGAIhC,CAAC;AAIH,eAAO,MAAM,mBAAmB;gBAA4B,OAAO;SAuBjE,CAAC;AAIH,eAAO,MAAM,yBAAyB;qBAAkC,OAAO;SAwC9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,yGAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;aAA2B,SAAS,CAAC,SAAS,CAAC;SA0B9E,CAAC;AAIF,eAAO,MAAM,uBAAuB,4GAQnC,CAAC;AAIF,eAAO,MAAM,eAAe;eAA8B,OAAO;gBAAc,OAAO;SAqDrF,CAAC"}
|
|
@@ -10,7 +10,13 @@ import { StyledPopover } from '../Popover';
|
|
|
10
10
|
import { StyledSearchInput } from '../SearchInput';
|
|
11
11
|
import { StyledSearchButton, StyledSearchTextInput } from '../SearchInput/SearchInput.styles';
|
|
12
12
|
import Text from '../Text';
|
|
13
|
-
import { headerHeight } from './AppShell.styles';
|
|
13
|
+
import { headerHeight, navWidth } from './AppShell.styles';
|
|
14
|
+
export const StyledContextSwitcher = styled.div(({ theme }) => {
|
|
15
|
+
return css `
|
|
16
|
+
width: calc(${navWidth} - 2 * ${theme.base.spacing});
|
|
17
|
+
`;
|
|
18
|
+
});
|
|
19
|
+
StyledContextSwitcher.defaultProps = defaultThemeProp;
|
|
14
20
|
export const StyledAppHeaderInfo = styled.div(({ centerLogo, theme }) => {
|
|
15
21
|
return css `
|
|
16
22
|
& > :first-child {
|
|
@@ -104,52 +110,56 @@ export const StyledAppHeaderOperator = styled.button(({ theme }) => css `
|
|
|
104
110
|
}
|
|
105
111
|
`);
|
|
106
112
|
StyledAppHeaderOperator.defaultProps = defaultThemeProp;
|
|
107
|
-
export const StyledAppHeader = styled.header(({ hideTitle, theme }) => {
|
|
113
|
+
export const StyledAppHeader = styled.header(({ hideTitle, drawerOpen, theme }) => {
|
|
108
114
|
const headerColor = theme.components['app-shell'].header['background-color'];
|
|
109
115
|
const contrastColor = tryCatch(() => readableColor(headerColor));
|
|
110
116
|
const hoverColors = getHoverColors(mix(0.01, theme.base.palette.interactive, headerColor));
|
|
111
117
|
return css `
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
position: sticky;
|
|
119
|
+
z-index: calc(${theme.base['z-index'].backdrop} - 1);
|
|
120
|
+
${drawerOpen &&
|
|
121
|
+
css `
|
|
122
|
+
z-index: calc(${theme.base['z-index'].backdrop} - 2);
|
|
123
|
+
`}
|
|
124
|
+
top: 0;
|
|
125
|
+
gap: ${theme.base.spacing};
|
|
126
|
+
max-width: 100%;
|
|
127
|
+
height: ${headerHeight};
|
|
128
|
+
background-color: ${headerColor};
|
|
129
|
+
border-bottom: solid 0.0625rem ${theme.base.palette['border-line']};
|
|
120
130
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
131
|
+
${StyledAppHeaderInfo} {
|
|
132
|
+
justify-self: flex-start;
|
|
133
|
+
min-width: 33vw;
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
${hideTitle &&
|
|
126
136
|
css `
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
min-width: fit-content;
|
|
138
|
+
`}
|
|
139
|
+
}
|
|
130
140
|
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
> ${StyledAppHeaderOperator} {
|
|
142
|
+
justify-self: flex-end;
|
|
133
143
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
144
|
+
+ ${StyledPopover} {
|
|
145
|
+
&,
|
|
146
|
+
${StyledMenuListContainer} {
|
|
147
|
+
background-color: ${headerColor};
|
|
148
|
+
}
|
|
139
149
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
${StyledMenuListContainer} li {
|
|
151
|
+
color: ${contrastColor};
|
|
152
|
+
background-color: transparent;
|
|
143
153
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
&:hover,
|
|
155
|
+
&[data-current='true'] {
|
|
156
|
+
color: ${hoverColors.foreground};
|
|
157
|
+
background-color: ${hoverColors.background};
|
|
158
|
+
}
|
|
148
159
|
}
|
|
149
160
|
}
|
|
150
161
|
}
|
|
151
|
-
|
|
152
|
-
`;
|
|
162
|
+
`;
|
|
153
163
|
});
|
|
154
164
|
StyledAppHeader.defaultProps = defaultThemeProp;
|
|
155
165
|
//# sourceMappingURL=AppHeader.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAAA,sBAAsB;AAEtB,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,IAAmB,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHeader.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.styles.ts"],"names":[],"mappings":"AAAA,sBAAsB;AAEtB,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC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CAAA;;SAEF;;;UAGC,uBAAuB;;;YAGrB,aAAa;;YAEb,uBAAuB;gCACH,WAAW;;;YAG/B,uBAAuB;qBACd,aAAa;;;;;uBAKX,WAAW,CAAC,UAAU;kCACX,WAAW,CAAC,UAAU;;;;;KAKnD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["/* AppHeader styles */\n\nimport { mix, readableColor, rgba } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { calculateFontSize, getHoverColors } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledImage } from '../Image';\nimport { StyledMenuListContainer } from '../Menu/Menu.styles';\nimport { StyledPopover } from '../Popover';\nimport { StyledSearchInput } from '../SearchInput';\nimport { StyledSearchButton, StyledSearchTextInput } from '../SearchInput/SearchInput.styles';\nimport Text, { TextProps } from '../Text';\n\nimport { headerHeight, navWidth } from './AppShell.styles';\n\nexport const StyledContextSwitcher = styled.div(({ theme }) => {\n return css`\n width: calc(${navWidth} - 2 * ${theme.base.spacing});\n `;\n});\n\nStyledContextSwitcher.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderInfo = styled.div<{ centerLogo: boolean }>(({ centerLogo, theme }) => {\n return css`\n & > :first-child {\n vertical-align: top;\n }\n\n & > a,\n & > button {\n cursor: pointer;\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n ${StyledImage} {\n height: 1.625rem;\n\n ${centerLogo &&\n css`\n padding-inline-start: ${theme.base.spacing};\n `}\n }\n `;\n});\n\nStyledAppHeaderInfo.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearchForm = styled.form<{ isMediumOrAbove: boolean }>(\n ({ isMediumOrAbove, theme }) => {\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n\n return css`\n max-width: 33vw;\n min-width: 10rem;\n width: 100%;\n justify-self: center;\n margin-inline-start: 0;\n margin-inline-end: auto;\n transition: max-width ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n ${!isMediumOrAbove &&\n css`\n max-width: 75%;\n min-width: 2rem;\n margin-inline-start: auto;\n\n &:not([focused]) {\n ${StyledSearchInput} {\n ${StyledSearchButton} {\n background: ${headerColor};\n color: ${contrastColor};\n }\n\n ${StyledSearchTextInput} {\n background: ${headerColor};\n }\n }\n }\n\n &:focus-within {\n /* max-width: 100%; */\n min-width: 10rem;\n }\n `}\n `;\n }\n);\n\nStyledAppHeaderSearchForm.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSpacer = styled.div`\n margin: auto;\n`;\n\nexport const StyledAppHeaderText = styled(Text)<{ variant: TextProps['variant'] }>(\n ({ theme, variant }) => {\n const contrastColor = tryCatch(() =>\n readableColor(theme.components['app-shell'].header['background-color'])\n );\n const secondaryColor = tryCatch(() =>\n rgba(\n contrastColor ?? theme.base.palette['foreground-color'],\n theme.base.transparency['transparent-2']\n )\n );\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${variant === 'secondary' ? secondaryColor : contrastColor};\n font-size: ${fontSize.s};\n\n ${variant !== 'secondary' &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n `;\n }\n);\n\nStyledAppHeaderText.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledAppHeaderOperator.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeader = styled.header<{ hideTitle: boolean; drawerOpen: boolean }>(\n ({ hideTitle, drawerOpen, theme }) => {\n const headerColor = theme.components['app-shell'].header['background-color'];\n const contrastColor = tryCatch(() => readableColor(headerColor));\n const hoverColors = getHoverColors(mix(0.01, theme.base.palette.interactive, headerColor));\n\n return css`\n position: sticky;\n z-index: calc(${theme.base['z-index'].backdrop} - 1);\n ${drawerOpen &&\n css`\n z-index: calc(${theme.base['z-index'].backdrop} - 2);\n `}\n top: 0;\n gap: ${theme.base.spacing};\n max-width: 100%;\n height: ${headerHeight};\n background-color: ${headerColor};\n border-bottom: solid 0.0625rem ${theme.base.palette['border-line']};\n\n ${StyledAppHeaderInfo} {\n justify-self: flex-start;\n min-width: 33vw;\n\n ${hideTitle &&\n css`\n min-width: fit-content;\n `}\n }\n\n > ${StyledAppHeaderOperator} {\n justify-self: flex-end;\n\n + ${StyledPopover} {\n &,\n ${StyledMenuListContainer} {\n background-color: ${headerColor};\n }\n\n ${StyledMenuListContainer} li {\n color: ${contrastColor};\n background-color: transparent;\n\n &:hover,\n &[data-current='true'] {\n color: ${hoverColors.foreground};\n background-color: ${hoverColors.background};\n }\n }\n }\n }\n `;\n }\n);\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAWjB,EAAE,EAEH,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuChD,OAAO,EACL,aAAa,EAMb,UAAU,EACX,MAAM,kBAAkB,CAAC;AAsG1B,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAWjB,EAAE,EAEH,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuChD,OAAO,EACL,aAAa,EAMb,UAAU,EACX,MAAM,kBAAkB,CAAC;AAsG1B,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA0IhC,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAsV7D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -20,10 +20,11 @@ import Backdrop from '../Backdrop';
|
|
|
20
20
|
import Tooltip from '../Tooltip/Tooltip';
|
|
21
21
|
import SkipLinks from '../SkipLinks';
|
|
22
22
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
23
|
+
import Progress from '../Progress';
|
|
23
24
|
import AppShellContext, { AppShellDrawerContext } from './AppShellContext';
|
|
24
25
|
import AppShellDrawer from './Drawer';
|
|
25
26
|
import AppHeader from './AppHeader';
|
|
26
|
-
import { StyledAppNav, StyledAppInfo, StyledCaseTypes, StyledScrollWrap, StyledUtils, StyledAppMain,
|
|
27
|
+
import { StyledAppNav, StyledAppInfo, StyledCaseTypes, StyledScrollWrap, StyledUtils, StyledAppMain, StyledNavCasesList, StyledAppEnvironment, StyledBannerRegion, StyledCountIcon, StyledUtilIconCount, StyledMobileNav, StyledAppShellTooltip, StyledAppShellToggleButton } from './AppShell.styles';
|
|
27
28
|
import NavigationList from './NavigationList';
|
|
28
29
|
import { AppShellSearch } from './AppShellSearch';
|
|
29
30
|
registerIcon(timesIcon, plusIcon, caseSolidIcon, barsIcon, caretRightIcon, caretLeftIcon);
|
|
@@ -38,7 +39,7 @@ const CaseTypes = ({ caseTypes }) => {
|
|
|
38
39
|
return useMemo(() => (_jsx(StyledCaseTypes, { children: _jsx(NavigationList, { items: [
|
|
39
40
|
{
|
|
40
41
|
primary: t('app_shell_create'),
|
|
41
|
-
visual: _jsx(Icon, { name: 'plus'
|
|
42
|
+
visual: _jsx(Icon, { name: 'plus' }),
|
|
42
43
|
items: transformedCaseTypes
|
|
43
44
|
}
|
|
44
45
|
] }) })), [caseTypes]);
|
|
@@ -53,7 +54,7 @@ const Links = (props) => {
|
|
|
53
54
|
...link,
|
|
54
55
|
primary: link.name,
|
|
55
56
|
'aria-current': link.active ? 'page' : null,
|
|
56
|
-
visual: link.icon ? _jsx(Icon, { name: link.icon
|
|
57
|
+
visual: link.icon ? _jsx(Icon, { name: link.icon }) : null,
|
|
57
58
|
onClick: link.links ? undefined : link.onClick,
|
|
58
59
|
items: link.links ? mergedNavLinks(link.links) : undefined
|
|
59
60
|
};
|
|
@@ -68,7 +69,7 @@ const Cases = (props) => {
|
|
|
68
69
|
const { cases } = props;
|
|
69
70
|
const setupCases = (items) => {
|
|
70
71
|
return items.map((item) => {
|
|
71
|
-
const { id, primary, secondary, visual = _jsx(Icon, { name: 'case-solid'
|
|
72
|
+
const { id, primary, secondary, visual = _jsx(Icon, { name: 'case-solid' }), active, onClick, onDismiss } = item;
|
|
72
73
|
return {
|
|
73
74
|
id,
|
|
74
75
|
'aria-current': active ? 'page' : undefined,
|
|
@@ -84,10 +85,11 @@ const Cases = (props) => {
|
|
|
84
85
|
};
|
|
85
86
|
return (_jsx(StyledNavCasesList, { children: _jsx(NavigationList, { items: setupCases(cases) }) }));
|
|
86
87
|
};
|
|
87
|
-
export const Utils = ({ operator, items, appHeader }) => {
|
|
88
|
-
const
|
|
88
|
+
export const Utils = ({ contextSwitcher = {}, operator, items, appHeader }) => {
|
|
89
|
+
const t = useI18n();
|
|
90
|
+
const { contexts, onContextClick, label: contextSwitcherLabel = t('switch_to') } = contextSwitcher;
|
|
91
|
+
const { navOpen, navState, drawerOpen, setDrawerOpen } = useContext(AppShellContext);
|
|
89
92
|
const [item, setItem] = useState();
|
|
90
|
-
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
91
93
|
useEffect(() => {
|
|
92
94
|
if (drawerOpen && item) {
|
|
93
95
|
setItem(items?.find((utilItem) => !isValidElement(utilItem) && utilItem.name === item.name));
|
|
@@ -102,6 +104,24 @@ export const Utils = ({ operator, items, appHeader }) => {
|
|
|
102
104
|
items: operator.actions
|
|
103
105
|
}
|
|
104
106
|
], [appHeader, operator.name, operator.avatar, operator.actions]);
|
|
107
|
+
const contextSwitcherUtilItem = useMemo(() => {
|
|
108
|
+
if (!appHeader && contexts && contexts?.length > 1 && !!onContextClick) {
|
|
109
|
+
return {
|
|
110
|
+
name: contextSwitcherLabel,
|
|
111
|
+
primary: contextSwitcherLabel,
|
|
112
|
+
visual: _jsx(Icon, { name: 'dot-9-solid' }),
|
|
113
|
+
drawerView: (_jsx(NavigationList, { items: contexts.map(context => ({
|
|
114
|
+
...context,
|
|
115
|
+
primary: context.primary,
|
|
116
|
+
'aria-current': !!context.selected,
|
|
117
|
+
visual: context.visual,
|
|
118
|
+
onClick: e => {
|
|
119
|
+
onContextClick(context.id, e);
|
|
120
|
+
}
|
|
121
|
+
})), singleSelect: true }))
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}, [appHeader, contexts, contextSwitcherLabel, onContextClick]);
|
|
105
125
|
const transform = useCallback((utilItem) => {
|
|
106
126
|
const uItem = { ...utilItem };
|
|
107
127
|
delete uItem.onDrawerClose;
|
|
@@ -114,7 +134,7 @@ export const Utils = ({ operator, items, appHeader }) => {
|
|
|
114
134
|
},
|
|
115
135
|
...uItem,
|
|
116
136
|
primary: utilItem.name,
|
|
117
|
-
visual: utilItem.count ? (_jsxs(StyledUtilIconCount, { children: [utilItem.visual, _jsx(Count, { as: StyledCountIcon, variant: 'urgent', children: utilItem.count })] })) : (utilItem.visual),
|
|
137
|
+
visual: utilItem.count ? (_jsxs(StyledUtilIconCount, { children: [utilItem.visual, _jsx(Count, { as: StyledCountIcon, variant: 'urgent', id: `${utilItem.name}-count`, children: utilItem.count })] })) : (utilItem.visual),
|
|
118
138
|
collapseItems: !navOpen
|
|
119
139
|
};
|
|
120
140
|
}, [navOpen]);
|
|
@@ -123,6 +143,7 @@ export const Utils = ({ operator, items, appHeader }) => {
|
|
|
123
143
|
...(items ?? []).map(uItem => {
|
|
124
144
|
return isValidElement(uItem) ? uItem : transform(uItem);
|
|
125
145
|
}),
|
|
146
|
+
...(contextSwitcherUtilItem ? [transform(contextSwitcherUtilItem)] : []),
|
|
126
147
|
...operatorInfo
|
|
127
148
|
];
|
|
128
149
|
}, [items, operatorInfo, transform]);
|
|
@@ -147,7 +168,7 @@ export const Utils = ({ operator, items, appHeader }) => {
|
|
|
147
168
|
};
|
|
148
169
|
const AppShell = forwardRef((props, ref) => {
|
|
149
170
|
const t = useI18n();
|
|
150
|
-
const { appInfo, searchInput, appHeader, searchPage, searchLabel = t('sitewide'), caseTypes, links, banners, environment: { name: envName, color: envColor } = {}, main, operator, utils, cases, defaultExpanded = false, collapsedHoverMenus = false, ...restProps } = props;
|
|
171
|
+
const { appInfo, contextSwitcher, searchInput, appHeader, searchPage, searchLabel = t('sitewide'), caseTypes, links, banners, progress, environment: { name: envName, color: envColor } = {}, main, operator, utils, cases, defaultExpanded = false, collapsedHoverMenus = false, ...restProps } = props;
|
|
151
172
|
const { appName, portalName, href: appInfoHref, onClick: appInfoOnClick, imageSrc: logoSrc, appNameHidden, ...appInfoRestProps } = appInfo;
|
|
152
173
|
let appInfoAs = 'div';
|
|
153
174
|
if (appInfoHref)
|
|
@@ -159,6 +180,7 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
159
180
|
const navRef = useConsolidatedRef(ref);
|
|
160
181
|
const [mobileNavOpen, setMobileNavOpen] = useState(false);
|
|
161
182
|
const [mobileNavBackdrop, setMobileNavBackdrop] = useState(false);
|
|
183
|
+
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
162
184
|
const focusedImperatively = useRef(false);
|
|
163
185
|
const [headerEl, setHeaderEl] = useElement();
|
|
164
186
|
const [mobileHeaderEl, setMobileHeaderEl] = useElement();
|
|
@@ -224,7 +246,7 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
224
246
|
}, ref: isSmallOrAbove ? navRef : undefined, as: StyledAppNav, appHeader: showAppHeader, navOpen: mobileNavOpen, showEnv: !!envName, onFocus: onFocus, children: [envName && (_jsx(StyledAppEnvironment, { item: { shrink: 0 }, color: envColor ?? theme.base.colors.red['extra-light'], children: envName })), !showAppHeader && (_jsxs(_Fragment, { children: [_jsxs(StyledAppInfo, { as: Grid, forwardedAs: appInfoAs, variant: 'link', href: appInfoHref, onClick: appInfoOnClick, "aria-label": `${appName}${portalName ? ` - ${portalName}` : ''}`, ...appInfoRestProps, container: {
|
|
225
247
|
alignItems: 'center',
|
|
226
248
|
areas: portalName ? '"logo app" "logo portal"' : '"logo app"'
|
|
227
|
-
}, ref: setAppInfoEl, children: [_jsx(Grid, { item: { area: 'logo' }, as: Image, src: logoSrc, alt: appName }), _jsx(Grid, { item: { area: 'app' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: appName }), portalName && (_jsx(Grid, { item: { area: 'portal' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: portalName }))] }), navState === 'closed' && !appNameHidden && (_jsx(Tooltip, { target: appInfoEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: appName }))] })), searchInput && !showAppHeader && (_jsx(AppShellSearch, { searchLabel: searchLabel, collapsed: !mobileNavOpen && ['closed', 'closing'].includes(navState), searchInput: searchInput })), _jsxs(StyledScrollWrap, { onClick: isSmallOrAbove
|
|
249
|
+
}, ref: setAppInfoEl, icon: true, children: [_jsx(Grid, { item: { area: 'logo' }, as: Image, src: logoSrc, alt: appName }), _jsx(Grid, { item: { area: 'app' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: appName }), portalName && (_jsx(Grid, { item: { area: 'portal' }, as: appNameHidden ? VisuallyHiddenText : 'span', children: portalName }))] }), navState === 'closed' && !appNameHidden && (_jsx(Tooltip, { target: appInfoEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: appName }))] })), searchInput && !showAppHeader && (_jsx(AppShellSearch, { searchLabel: searchLabel, collapsed: !mobileNavOpen && ['closed', 'closing'].includes(navState), searchInput: searchInput })), _jsxs(StyledScrollWrap, { onClick: isSmallOrAbove
|
|
228
250
|
? () => {
|
|
229
251
|
if (['closing', 'closed'].includes(navState)) {
|
|
230
252
|
openNav(0);
|
|
@@ -233,11 +255,13 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
233
255
|
closeNav(0);
|
|
234
256
|
}
|
|
235
257
|
}
|
|
236
|
-
: undefined, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes }), links && _jsx(Links, { links: links }), cases && _jsx(Cases, { cases: cases })] }), _jsx(Utils, { appHeader: showAppHeader, operator: operator, items: utils }), !mobileNavOpen && (_jsxs(Flex, { container: { justify: 'center' }, children: [_jsx(StyledAppShellToggleButton, { icon: true, ref: setExpandCollapseEl, compact: true, variant: 'simple', onClick: () => {
|
|
258
|
+
: undefined, children: [caseTypes && caseTypes.length > 0 && _jsx(CaseTypes, { caseTypes: caseTypes }), links && _jsx(Links, { links: links }), cases && _jsx(Cases, { cases: cases })] }), _jsx(Utils, { appHeader: showAppHeader, operator: operator, contextSwitcher: contextSwitcher, items: utils }), !mobileNavOpen && (_jsxs(Flex, { container: { justify: 'center' }, children: [_jsx(StyledAppShellToggleButton, { icon: true, ref: setExpandCollapseEl, compact: true, variant: 'simple', onClick: () => {
|
|
237
259
|
setNavState(navState === 'closed' ? 'open' : 'closed');
|
|
238
260
|
}, open: ['open', 'opening'].includes(navState), "aria-label": navState === 'closed' ? t('expand') : t('collapse'), children: ['closed', 'closing'].includes(navState) ? (_jsx(Icon, { name: `arrow-micro-${end}` })) : (_jsx(Icon, { name: `arrow-micro-${start}` })) }), ['open', 'closed'].includes(navState) && (_jsx(Tooltip, { target: expandCollapseEl, placement: 'right', as: StyledAppShellTooltip, showDelay: 'none', hideDelay: 'none', children: navState === 'closed' ? t('expand') : t('collapse') }))] }))] }));
|
|
239
261
|
return (_jsxs(AppShellContext.Provider, { value: useMemo(() => ({
|
|
240
262
|
navOpen: mobileNavOpen || navState === 'open' || navState === 'opening',
|
|
263
|
+
drawerOpen,
|
|
264
|
+
setDrawerOpen,
|
|
241
265
|
collapsedHoverMenus,
|
|
242
266
|
navState,
|
|
243
267
|
focusedImperatively,
|
|
@@ -246,12 +270,12 @@ const AppShell = forwardRef((props, ref) => {
|
|
|
246
270
|
searchContainerEl,
|
|
247
271
|
setSearchContainerEl,
|
|
248
272
|
mobileNavOpen
|
|
249
|
-
}), [navState, mobileNavOpen, headerEl, mobileHeaderEl, searchContainerEl]), children: [_jsx(SkipLinks, { items: skipLinks }), showAppHeader && (_jsx(AppHeader, { ...appInfo, searchInput: searchInput, searchLabel: searchLabel, operator: operator, searchPage: searchPage, ref: setHeaderEl })), isSmallOrAbove ? (appShellJSX) : (_jsxs(_Fragment, { children: [_jsx(Flex, { as: StyledMobileNav, container: { alignItems: 'center' }, ref: setMobileHeaderEl, children: _jsx(Button, { variant: 'simple', onClick: () => setMobileNavBackdrop(true), "aria-label": t('app_shell_open_nav'), icon: true, children: _jsx(Icon, { name: 'bars' }) }) }), _jsx(Backdrop, { open: mobileNavBackdrop, transitionSpeed: 'none', onAfterTransitionIn: () => setMobileNavOpen(true), onBeforeTransitionOut: () => setMobileNavOpen(false), onClick: e => {
|
|
273
|
+
}), [navState, drawerOpen, mobileNavOpen, headerEl, mobileHeaderEl, searchContainerEl]), children: [_jsx(SkipLinks, { items: skipLinks }), showAppHeader && (_jsx(AppHeader, { ...appInfo, contextSwitcher: contextSwitcher, searchInput: searchInput, searchLabel: searchLabel, operator: operator, searchPage: searchPage, ref: setHeaderEl })), isSmallOrAbove ? (appShellJSX) : (_jsxs(_Fragment, { children: [_jsx(Flex, { as: StyledMobileNav, container: { alignItems: 'center' }, ref: setMobileHeaderEl, children: _jsx(Button, { variant: 'simple', onClick: () => setMobileNavBackdrop(true), "aria-label": t('app_shell_open_nav'), icon: true, children: _jsx(Icon, { name: 'bars' }) }) }), _jsx(Backdrop, { open: mobileNavBackdrop, transitionSpeed: 'none', onAfterTransitionIn: () => setMobileNavOpen(true), onBeforeTransitionOut: () => setMobileNavOpen(false), onClick: e => {
|
|
250
274
|
if (e.currentTarget === e.target)
|
|
251
275
|
setMobileNavOpen(false);
|
|
252
276
|
}, children: _jsx(Drawer, { open: mobileNavOpen, onAfterClose: () => {
|
|
253
277
|
setMobileNavBackdrop(false);
|
|
254
|
-
}, position: 'fixed', placement: start, size: 'min(18.75rem, calc(100vw - 3.5rem))', nullWhenClosed: true, children: appShellJSX }) })] })), showMainContent && (_jsxs(StyledAppMain, { appHeader: showAppHeader, mobileNav: !isSmallOrAbove, headerOffset: isSmallOrAbove ? headerEl?.offsetHeight : mobileHeaderEl?.offsetHeight, navOpen: ['open', 'opening'].includes(navState), children: [banners && _jsx(StyledBannerRegion, { children: banners }), main] }))] }));
|
|
278
|
+
}, position: 'fixed', placement: start, size: 'min(18.75rem, calc(100vw - 3.5rem))', nullWhenClosed: true, children: appShellJSX }) })] })), showMainContent && (_jsxs(StyledAppMain, { appHeader: showAppHeader, mobileNav: !isSmallOrAbove, headerOffset: isSmallOrAbove ? headerEl?.offsetHeight : mobileHeaderEl?.offsetHeight, navOpen: ['open', 'opening'].includes(navState), "aria-busy": progress ? 'true' : 'false', children: [_jsx(Progress, { visible: !!progress, placement: 'local', message: typeof progress === 'string' ? progress : t('loading') }), banners && _jsx(StyledBannerRegion, { children: banners }), main] }))] }));
|
|
255
279
|
});
|
|
256
280
|
export default AppShell;
|
|
257
281
|
//# sourceMappingURL=AppShell.js.map
|