@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":"AppShell.types.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n KeyboardEvent,\n MouseEvent,\n MouseEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n RefObject\n} from 'react';\n\nimport { AsProp, BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { ImageProps } from '../Image';\nimport { SearchInputProps } from '../SearchInput';\n\n/** AppShell props */\n\nexport interface AppInfoProps {\n /** The primary text to render in the header. */\n appName: string;\n /** If true, the appName will not be visibly displayed on screen. */\n appNameHidden?: boolean;\n /** The source for a small application image or logo that is rendered in the nav bar. */\n imageSrc: ImageProps['src'];\n /** The source for the full size application image or logo that is rendered in the app header, if enabled. */\n fullImageSrc?: ImageProps['src'];\n /** URL or DOM id to navigate to. */\n href?: string;\n /** Click handler for the header. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n /** The secondary text to render in the header. */\n portalName?: string;\n /** Specifies where to open the link href. */\n target?: string;\n}\n\nexport interface AppShellProps extends BaseProps, NoChildrenProp {\n /** Props related to the App Shell header. */\n appInfo: AppInfoProps;\n /** The content of the application. */\n main: ReactNode;\n /** The active user of the application. */\n operator: OperatorProps;\n /** If true, a header will render containing the logo and name of the app as well as search and operator regions. */\n appHeader?: boolean;\n /** If true, the search results page will replace the search input in the app header with its own */\n searchPage?: boolean;\n /** Props related to the Search Input. */\n searchInput?: SearchInputProps;\n /**\n * The aria-label for the search input.\n * @default \"Sitewide\"\n */\n searchLabel?: string;\n /** A set of cases that will render in an expanded list within the App Shell. */\n caseTypes?: CaseTypeProps[];\n /** A set of links that will render as a flat list in the App Shell. */\n links?: LinkProps[];\n /** A set of cases that will render as a flat list in the App Shell. */\n cases?: CaseProps[];\n /** Used for alternate environments, such as \"dev\" or \"staging\". */\n environment?: {\n name: string;\n /** @default theme.base.colors.red['extra-light'] */\n color?: string;\n };\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n utils?: (UtilItemProps | ReactElement)[];\n /** Banners will render above the main content if they are provided. */\n banners?: ReactNode;\n defaultExpanded?: boolean;\n /** When the navigation is collapsed menus will be shown on hover instead of on click */\n collapsedHoverMenus?: boolean;\n}\nexport interface CaseTypeProps {\n /** The display name of the case. */\n name: string;\n /** Click handler for the case. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface LinkProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** The display name of the link. */\n name: string;\n /** URL or DOM id to navigate to. */\n href: string;\n /** The name of the Cosmos Icon to render as a visual. */\n icon?: string;\n /** Determines if the link represents the active page. */\n active?: boolean;\n /** A set of nested links. */\n links?: LinkProps[];\n /** Click handler for the link. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n}\n\nexport interface CaseProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** Name of the case or some primary information like title. */\n primary: string;\n /** Additional info of a case like timestamp. */\n secondary?: string;\n /** A visual element identifying the case. If not passed will render case-solid icon */\n visual?: ReactNode;\n /** Determines if the case represents the active page. */\n active?: boolean;\n /** Click handler for the case . */\n onClick?: MouseEventHandler<HTMLElement>;\n /** Dismiss handler for the case. */\n onDismiss?: MouseEventHandler<HTMLElement>;\n}\n\nexport interface OperatorProps {\n /** A visual element identifying the operator. */\n avatar: ReactNode;\n /** A list of actions that will populate a menu attached to the operator. */\n actions: Pick<NavListItemProps, 'id' | 'primary' | 'href' | 'onClick' | 'visual'>[];\n /** The name of the operator. */\n name: string;\n}\n\nexport interface UtilItemProps extends Pick<NavListItemProps, 'visual' | 'actions' | 'onClick'> {\n /** The display name of an utility item. */\n name: string;\n /* Number when given displays on top-right of a given icon. */\n count?: number;\n /** View that renders on an appShell drawer onClick of an item */\n drawerView?: ReactNode;\n /** Heading for view that renders */\n drawerHeader?: string;\n /** Callback that fires on appshell drawer open */\n onDrawerOpen?: () => void;\n /** Callback that fires on appshell drawer close */\n onDrawerClose?: () => void;\n}\n\nexport interface UtilsProps {\n /** The active user of the application. */\n operator: AppShellProps['operator'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n items?: (UtilItemProps | ReactElement)[];\n appHeader?: boolean;\n}\n\nexport interface NavListProps extends AsProp, BaseProps {\n items?: (NavListItemProps | ReactElement)[];\n nestedList?: boolean;\n collapsed?: boolean;\n id?: string;\n}\n\nexport interface NavListItemWrapperProps extends ForwardProps {\n label: string;\n tooltipLabel: string;\n content?: ReactNode;\n items?: NavListItemProps[];\n onMenuToggle?: (state: 'open' | 'close') => void;\n childElementRef: RefObject<HTMLElement>;\n}\n\nexport interface NavListItemProps extends AsProp, BaseProps, ForwardProps, NoChildrenProp {\n id?: string;\n visual?: ReactNode;\n primary: string;\n secondary?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>;\n items?: NavListItemProps[];\n collapseItems?: boolean;\n actions?: OperatorProps['actions'];\n dismissible?: boolean;\n onDismiss?: MouseEventHandler<HTMLElement>;\n forwardedRef?: Ref<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;\n isMenuItem?: boolean;\n}\n\nexport interface NavMenuProps extends NavListItemProps {\n forwardedRef?: Ref<HTMLButtonElement>;\n}\n\n/** AppHeader props */\n\nexport interface AppHeaderProps extends BaseProps, AppInfoProps {\n operator: AppShellProps['operator'];\n searchInput?: AppShellProps['searchInput'];\n searchLabel?: AppShellProps['searchLabel'];\n searchPage?: AppShellProps['searchPage'];\n}\n\n/** Drawer props */\n\nexport interface DrawerListProps {\n items: (DrawerItemProps & ForwardProps)[];\n loading?: boolean;\n viewAll?: {\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n onItemClick?: (id: string, event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n onItemPinToggle?: (id: string) => void;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n}\n\nexport interface DrawerItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** A flag indicating if the item has been pinned or not. */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nexport interface ListProps extends DrawerListProps {\n headingText?: string;\n emptyText: string;\n displayRecents: boolean;\n displayPins?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.types.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n KeyboardEvent,\n MouseEvent,\n MouseEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n RefObject\n} from 'react';\n\nimport { AsProp, BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { ImageProps } from '../Image';\nimport { ProgressProps } from '../Progress';\nimport { SearchInputProps } from '../SearchInput';\nimport { MenuItemProps } from '../Menu';\n\n/** AppShell props */\n\nexport interface AppInfoProps {\n /** The primary text to render in the header. */\n appName: string;\n /** If true, the appName will not be visibly displayed on screen. */\n appNameHidden?: boolean;\n /** The source for a small application image or logo that is rendered in the nav bar. */\n imageSrc: ImageProps['src'];\n /** The source for the full size application image or logo that is rendered in the app header, if enabled. */\n fullImageSrc?: ImageProps['src'];\n /** URL or DOM id to navigate to. */\n href?: string;\n /** Click handler for the header. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n /** The secondary text to render in the header. */\n portalName?: string;\n /** Specifies where to open the link href. */\n target?: string;\n}\n\nexport interface ContextItem extends Pick<MenuItemProps, 'id' | 'primary' | 'visual' | 'href'> {\n selected: MenuItemProps['selected'];\n}\n\ninterface ContextSwitcherOptions extends BaseProps {\n /** Application contexts available to user. */\n contexts: ContextItem[];\n /** Callback on click of item in context switcher. */\n onContextClick: (\n id: MenuItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLDivElement>\n ) => void;\n /** Label of context being modified; i.e: \"Switch Application\", \"Switch Studio\"\n * @default \"Switch to…\"\n */\n label?: string;\n}\n\nexport type ContextSwitcherProps = ContextSwitcherOptions | Record<string, never>;\n\nexport interface AppShellProps extends BaseProps, NoChildrenProp {\n /** Props related to the App Shell header. */\n appInfo: AppInfoProps;\n /** The content of the application. */\n main: ReactNode;\n /** The active user of the application. */\n operator: OperatorProps;\n /** If true, a header will render containing the logo and name of the app as well as search and operator regions. */\n appHeader?: boolean;\n /** Context switcher configuration. */\n contextSwitcher?: ContextSwitcherProps;\n /** If true, the search results page will replace the search input in the app header with its own */\n searchPage?: boolean;\n /** Props related to the Search Input. */\n searchInput?: SearchInputProps;\n /**\n * The aria-label for the search input.\n * @default \"Sitewide\"\n */\n searchLabel?: string;\n /** A set of cases that will render in an expanded list within the App Shell. */\n caseTypes?: CaseTypeProps[];\n /** A set of links that will render as a flat list in the App Shell. */\n links?: LinkProps[];\n /** A set of cases that will render as a flat list in the App Shell. */\n cases?: CaseProps[];\n /** Used for alternate environments, such as \"dev\" or \"staging\". */\n environment?: {\n name: string;\n /** @default theme.base.colors.red['extra-light'] */\n color?: string;\n };\n /** Place the main content of the application into a loading state by way of a boolean or a custom message. */\n progress?: boolean | ProgressProps['message'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n utils?: (UtilItemProps | ReactElement)[];\n /** Banners will render above the main content if they are provided. */\n banners?: ReactNode;\n defaultExpanded?: boolean;\n /** When the navigation is collapsed menus will be shown on hover instead of on click */\n collapsedHoverMenus?: boolean;\n}\n\nexport interface CaseTypeProps {\n /** The display name of the case. */\n name: string;\n /** Click handler for the case. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface LinkProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** The display name of the link. */\n name: string;\n /** URL or DOM id to navigate to. */\n href: string;\n /** The name of the Cosmos Icon to render as a visual. */\n icon?: string;\n /** Determines if the link represents the active page. */\n active?: boolean;\n /** A set of nested links. */\n links?: LinkProps[];\n /** Click handler for the link. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n}\n\nexport interface CaseProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** Name of the case or some primary information like title. */\n primary: string;\n /** Additional info of a case like timestamp. */\n secondary?: string;\n /** A visual element identifying the case. If not passed will render case-solid icon */\n visual?: ReactNode;\n /** Determines if the case represents the active page. */\n active?: boolean;\n /** Click handler for the case . */\n onClick?: MouseEventHandler<HTMLElement>;\n /** Dismiss handler for the case. */\n onDismiss?: MouseEventHandler<HTMLElement>;\n}\n\nexport interface OperatorProps {\n /** A visual element identifying the operator. */\n avatar: ReactNode;\n /** A list of actions that will populate a menu attached to the operator. */\n actions: Pick<NavListItemProps, 'id' | 'primary' | 'href' | 'onClick' | 'visual'>[];\n /** The name of the operator. */\n name: string;\n}\n\nexport interface UtilItemProps extends Pick<NavListItemProps, 'visual' | 'actions' | 'onClick'> {\n /** The display name of an utility item. */\n name: string;\n /* Number when given displays on top-right of a given icon. */\n count?: number;\n /** View that renders on an appShell drawer onClick of an item */\n drawerView?: ReactNode;\n /** Heading for view that renders */\n drawerHeader?: string;\n /** Callback that fires on appshell drawer open */\n onDrawerOpen?: () => void;\n /** Callback that fires on appshell drawer close */\n onDrawerClose?: () => void;\n}\n\nexport interface UtilsProps {\n /** Context switcher config. */\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n /** The active user of the application. */\n operator: AppShellProps['operator'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n items?: (UtilItemProps | ReactElement)[];\n appHeader?: boolean;\n}\n\nexport interface NavListProps extends AsProp, BaseProps {\n items?: (NavListItemProps | ReactElement)[];\n nestedList?: boolean;\n collapsed?: boolean;\n id?: string;\n /** Whether the list is of single-select style options */\n singleSelect?: boolean;\n}\n\nexport interface NavListItemWrapperProps extends ForwardProps {\n label: string;\n tooltipLabel: string;\n content?: ReactNode;\n items?: NavListItemProps[];\n onMenuToggle?: (state: 'open' | 'close') => void;\n childElementRef: RefObject<HTMLElement>;\n}\n\nexport interface NavListItemProps extends AsProp, BaseProps, ForwardProps, NoChildrenProp {\n id?: string;\n visual?: ReactNode;\n primary: string;\n secondary?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>;\n items?: NavListItemProps[];\n collapseItems?: boolean;\n actions?: OperatorProps['actions'];\n dismissible?: boolean;\n onDismiss?: MouseEventHandler<HTMLElement>;\n forwardedRef?: Ref<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;\n isMenuItem?: boolean;\n /** Whether the item is a single-select option */\n singleSelect?: NavListProps['singleSelect'];\n /** Whether the item is selected */\n selected?: boolean;\n}\n\nexport interface NavMenuProps extends NavListItemProps {\n forwardedRef?: Ref<HTMLButtonElement>;\n}\n\n/** AppHeader props */\n\nexport interface AppHeaderProps extends BaseProps, AppInfoProps {\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n operator: AppShellProps['operator'];\n searchInput?: AppShellProps['searchInput'];\n searchLabel?: AppShellProps['searchLabel'];\n searchPage?: AppShellProps['searchPage'];\n}\n\n/** Drawer props */\n\nexport interface DrawerListProps {\n items: (DrawerItemProps & ForwardProps)[];\n loading?: boolean;\n viewAll?: {\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n onItemClick?: (id: string, event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n onItemPinToggle?: (id: string) => void;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n}\n\nexport interface DrawerItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** A flag indicating if the item has been pinned or not. */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nexport interface ListProps extends DrawerListProps {\n headingText?: string;\n emptyText: string;\n displayRecents: boolean;\n displayPins?: boolean;\n}\n"]}
|
|
@@ -9,6 +9,8 @@ export interface AppShellDrawerContextValue {
|
|
|
9
9
|
export declare const AppShellDrawerContext: import("react").Context<AppShellDrawerContextValue>;
|
|
10
10
|
export interface AppShellContextValue {
|
|
11
11
|
navOpen: boolean;
|
|
12
|
+
drawerOpen: boolean;
|
|
13
|
+
setDrawerOpen: (val: boolean) => void;
|
|
12
14
|
navState: typeof openCloseStates[keyof typeof openCloseStates];
|
|
13
15
|
focusedImperatively: MutableRefObject<boolean>;
|
|
14
16
|
headerEl: HTMLDivElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellContext.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEhE,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EA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AK,IAAI,CAAC;IACtC,QAAQ,EAAE,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;IAC/D,mBAAmB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxD,iBAAiB,EAAE,WAAW,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,mBAAmB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC3D,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,+CAsBnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellContext.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,OAAO,CAAC;AAYxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAA6B;IAC7E,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;CACtB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShellContext.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,OAAO,CAAC;AAYxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAA6B;IAC7E,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;CACtB,CAAC,CAAC;AAgBH,MAAM,eAAe,GAAG,aAAa,CAAuB;IAC1D,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;IACvB,QAAQ,EAAE,QAAQ;IAClB,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE;QACnB,IAAI,OAAO;YACT,OAAO,KAAK,CAAC;QACf,CAAC;KACF;IACD,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE;QACjB,IAAI,OAAO;YACT,OAAO,IAAI,CAAC;QACd,CAAC;QACD,gEAAgE;QAChE,IAAI,OAAO,CAAC,GAAG,IAAG,CAAC;KACpB;IACD,iBAAiB,EAAE,IAAI;IACvB,oBAAoB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC9B,aAAa,EAAE,KAAK;CACrB,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC","sourcesContent":["import { createContext, MutableRefObject } from 'react';\n\nimport { openCloseStates } from '../../hooks/useTransitionState';\n\nimport { AppShellProps, UtilItemProps } from './AppShell.types';\n\nexport interface AppShellDrawerContextValue {\n drawerOpen: boolean;\n openDrawer: (item: UtilItemProps) => void;\n closeDrawer: () => void;\n}\n\nexport const AppShellDrawerContext = createContext<AppShellDrawerContextValue>({\n drawerOpen: false,\n openDrawer: () => {},\n closeDrawer: () => {}\n});\n\nexport interface AppShellContextValue {\n navOpen: boolean;\n drawerOpen: boolean;\n setDrawerOpen: (val: boolean) => void;\n navState: typeof openCloseStates[keyof typeof openCloseStates];\n focusedImperatively: MutableRefObject<boolean>;\n headerEl: HTMLDivElement | null;\n previewTriggerRef: MutableRefObject<HTMLElement | null>;\n searchContainerEl: HTMLElement | null;\n setSearchContainerEl: (el: HTMLElement | null) => void;\n collapsedHoverMenus?: AppShellProps['collapsedHoverMenus'];\n mobileNavOpen: boolean;\n}\n\nconst AppShellContext = createContext<AppShellContextValue>({\n navOpen: false,\n drawerOpen: false,\n setDrawerOpen: () => {},\n navState: 'closed',\n collapsedHoverMenus: false,\n focusedImperatively: {\n get current() {\n return false;\n }\n },\n headerEl: null,\n previewTriggerRef: {\n get current() {\n return null;\n },\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n set current(val) {}\n },\n searchContainerEl: null,\n setSearchContainerEl: () => {},\n mobileNavOpen: false\n});\n\nexport default AppShellContext;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent, Ref, MouseEvent, ReactNode, KeyboardEvent } from 'react';
|
|
2
2
|
import { BaseProps, ForwardProps } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type ListInteractionEvent = MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>;
|
|
4
4
|
export interface ListProps {
|
|
5
5
|
/** An id representing the item. */
|
|
6
6
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellList.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,UAAU,EACV,SAAS,EACT,aAAa,EAGd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiCtD,
|
|
1
|
+
{"version":3,"file":"AppShellList.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,UAAU,EACV,SAAS,EACT,aAAa,EAGd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiCtD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AACxF,MAAM,WAAW,SAAS;IACxB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,qBAAqB,GAA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;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -14,7 +14,7 @@ import SummaryItem from '../SummaryItem';
|
|
|
14
14
|
import Text from '../Text';
|
|
15
15
|
import { useI18n } from '../../hooks';
|
|
16
16
|
import { StyledLoading } from './AppShell.styles';
|
|
17
|
-
import { StyledAppShellListWrapper, StyledAppShellList,
|
|
17
|
+
import { StyledAppShellListWrapper, StyledAppShellList, StyledAppShellSummaryList, StyledAppShellMetaList, StyledNotificationPrimary, StyledNotificationSecondary, StyledAppShellPinButton, EmptyStateColorContrast, StyledAppShellListSection, StyledAppShellListHeading, StyledNotificationVisual } from './AppShellList.styles';
|
|
18
18
|
import { StyledDrawerViewAll } from './Drawer.styles';
|
|
19
19
|
import { AppShellDrawerContext } from './AppShellContext';
|
|
20
20
|
registerIcon(pinIcon, pinSolidIcon);
|
|
@@ -30,7 +30,11 @@ const List = ({ headingText, emptyText, items, loading = false, displayPins = fa
|
|
|
30
30
|
closeDrawer();
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
return (_jsx(
|
|
33
|
+
return (_jsx(StyledAppShellSummaryList, { children: _jsx(SummaryItem, { ...restProps, as: href ? 'a' : 'button', primary: _jsx(StyledNotificationPrimary, { unread: unread, children: primary }), secondary: secondary?.length ? (_jsx(StyledNotificationSecondary, { unread: unread, children: _jsx(MetaList, { as: StyledAppShellMetaList, items: secondary }) })) : undefined, visual: visual || unread ? (_jsxs(StyledNotificationVisual, { unread: unread, visualIncluded: !!visual, children: [visual, " ", _jsx(Alert, { variant: 'urgent' })] })) : undefined, href: href, onClick: onSummaryItemClick, onKeyDown: (e) => {
|
|
34
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
35
|
+
onSummaryItemClick(e);
|
|
36
|
+
}
|
|
37
|
+
}, actions: displayPins ? (_jsx(Button, { ref: el => {
|
|
34
38
|
if (!el)
|
|
35
39
|
delete pinButtons.current[id];
|
|
36
40
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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B,eAAC,IAAI,OAAK,QAAQ,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAI,CACzC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {\n FunctionComponent,\n Ref,\n MouseEvent,\n ReactNode,\n KeyboardEvent,\n useContext,\n useRef\n} from 'react';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport Alert from '../Badges/Alert';\nimport Button from '../Button';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as pinIcon from '../Icon/icons/pin.icon';\nimport * as pinSolidIcon from '../Icon/icons/pin-solid.icon';\nimport MetaList from '../MetaList';\nimport EmptyState from '../EmptyState';\nimport Progress from '../Progress';\nimport SummaryItem from '../SummaryItem';\nimport Text from '../Text';\nimport { useI18n } from '../../hooks';\n\nimport { StyledLoading } from './AppShell.styles';\nimport {\n StyledAppShellListWrapper,\n StyledAppShellList,\n StyledAppShellSummaryItem,\n StyledAppShellMetaList,\n StyledNotificationPrimary,\n StyledNotificationSecondary,\n StyledAppShellPinButton,\n EmptyStateColorContrast,\n StyledAppShellListSection,\n StyledAppShellListHeading,\n StyledNotificationVisual\n} from './AppShellList.styles';\nimport { StyledDrawerViewAll } from './Drawer.styles';\nimport { AppShellDrawerContext } from './AppShellContext';\n\nregisterIcon(pinIcon, pinSolidIcon);\n\nexport type ListInteractionEvent = MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>;\nexport interface ListProps {\n /** An id representing the item. */\n id: string;\n ref?: Ref<HTMLDivElement>;\n items: (AppShellListItemProps & ForwardProps)[];\n headingText?: string;\n emptyText: string;\n loading?: boolean;\n viewAll?: {\n onClick?: (e: MouseEvent) => void;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n displayPins?: boolean;\n onItemClick?: (id: string, event: ListInteractionEvent) => void;\n onItemPinToggle?: (id: string) => void;\n}\nexport interface AppShellListProps {\n listView: ListProps[];\n}\nexport interface AppShellListItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** Icon for displaying at the end of items */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: ListInteractionEvent) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nconst List = ({\n headingText,\n emptyText,\n items,\n loading = false,\n displayPins = false,\n onItemClick,\n onItemPinToggle,\n viewAll: viewAllProps\n}: ListProps) => {\n const t = useI18n();\n const { closeDrawer } = useContext(AppShellDrawerContext);\n const pinButtons = useRef<Record<string, HTMLButtonElement>>({});\n\n const renderContent = items.length ? (\n <Flex as={StyledAppShellList} item={{ grow: 1 }}>\n {items.map(\n ({\n id,\n primary,\n secondary,\n visual,\n unread,\n href,\n onClick,\n pinned,\n onPinToggle,\n ...restProps\n }: AppShellListItemProps) => {\n const onSummaryItemClick = (e: ListInteractionEvent) => {\n onClick?.(id, e);\n onItemClick?.(id, e);\n\n if (!pinButtons.current[id]?.contains(e.target as Node)) {\n closeDrawer();\n }\n };\n\n return (\n <li key={id}>\n <SummaryItem\n {...restProps}\n as={StyledAppShellSummaryItem}\n forwardedAs={href ? 'a' : 'button'}\n primary={\n <StyledNotificationPrimary unread={unread}>{primary}</StyledNotificationPrimary>\n }\n secondary={\n secondary?.length ? (\n <StyledNotificationSecondary unread={unread}>\n <MetaList as={StyledAppShellMetaList} items={secondary} />\n </StyledNotificationSecondary>\n ) : undefined\n }\n visual={\n visual || unread ? (\n <StyledNotificationVisual unread={unread} visualIncluded={!!visual}>\n {visual} <Alert variant='urgent' />\n </StyledNotificationVisual>\n ) : undefined\n }\n href={href}\n onClick={onSummaryItemClick}\n actions={\n displayPins ? (\n <Button\n ref={el => {\n if (!el) delete pinButtons.current[id];\n else pinButtons.current[id] = el;\n }}\n icon\n as={StyledAppShellPinButton}\n forwardedAs='div'\n onClick={() => {\n onPinToggle?.(id);\n onItemPinToggle?.(id);\n }}\n onKeyDown={(e: KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter') {\n onPinToggle?.(id);\n onItemPinToggle?.(id);\n }\n }}\n role='button'\n tabIndex={0}\n >\n <Icon name={pinned ? 'pin-solid' : 'pin'} />\n </Button>\n ) : undefined\n }\n tabIndex={0}\n />\n </li>\n );\n }\n )}\n </Flex>\n ) : (\n <Flex\n as={EmptyStateColorContrast}\n container={{ justify: 'center', alignItems: 'center' }}\n item={{ grow: 1 }}\n >\n <EmptyState message={emptyText} />\n </Flex>\n );\n\n return (\n <Flex as={StyledAppShellListSection} container={{ direction: 'column' }}>\n {headingText && (\n <Text variant='h3' as={StyledAppShellListHeading}>\n {headingText}\n </Text>\n )}\n {loading ? (\n <Flex container={{ justify: 'center', alignItems: 'center' }} item={{ grow: 1 }}>\n <Progress as={StyledLoading} placement='inline' />\n </Flex>\n ) : (\n renderContent\n )}\n {(viewAllProps?.href || viewAllProps?.onClick) && !!items.length && !loading && (\n <StyledDrawerViewAll {...viewAllProps} as={viewAllProps.href ? 'a' : 'button'}>\n {t('view_all')}\n </StyledDrawerViewAll>\n )}\n </Flex>\n );\n};\nconst AppShellList: FunctionComponent<AppShellListProps> = ({ listView }) => {\n return (\n <Flex as={StyledAppShellListWrapper} container={{ direction: 'column' }}>\n {listView.map(listItem => (\n <List {...listItem} key={listItem.id} />\n ))}\n </Flex>\n );\n};\n\nexport default AppShellList;\n"]}
|
|
1
|
+
{"version":3,"file":"AppShellList.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAML,UAAU,EACV,MAAM,EACP,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,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AAG,EAAE,QAAQ,CAAC,EAAE,GAAI,CACzC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {\n FunctionComponent,\n Ref,\n MouseEvent,\n ReactNode,\n KeyboardEvent,\n useContext,\n useRef\n} from 'react';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport Alert from '../Badges/Alert';\nimport Button from '../Button';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as pinIcon from '../Icon/icons/pin.icon';\nimport * as pinSolidIcon from '../Icon/icons/pin-solid.icon';\nimport MetaList from '../MetaList';\nimport EmptyState from '../EmptyState';\nimport Progress from '../Progress';\nimport SummaryItem from '../SummaryItem';\nimport Text from '../Text';\nimport { useI18n } from '../../hooks';\n\nimport { StyledLoading } from './AppShell.styles';\nimport {\n StyledAppShellListWrapper,\n StyledAppShellList,\n StyledAppShellSummaryList,\n StyledAppShellMetaList,\n StyledNotificationPrimary,\n StyledNotificationSecondary,\n StyledAppShellPinButton,\n EmptyStateColorContrast,\n StyledAppShellListSection,\n StyledAppShellListHeading,\n StyledNotificationVisual\n} from './AppShellList.styles';\nimport { StyledDrawerViewAll } from './Drawer.styles';\nimport { AppShellDrawerContext } from './AppShellContext';\n\nregisterIcon(pinIcon, pinSolidIcon);\n\nexport type ListInteractionEvent = MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>;\nexport interface ListProps {\n /** An id representing the item. */\n id: string;\n ref?: Ref<HTMLDivElement>;\n items: (AppShellListItemProps & ForwardProps)[];\n headingText?: string;\n emptyText: string;\n loading?: boolean;\n viewAll?: {\n onClick?: (e: MouseEvent) => void;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n displayPins?: boolean;\n onItemClick?: (id: string, event: ListInteractionEvent) => void;\n onItemPinToggle?: (id: string) => void;\n}\nexport interface AppShellListProps {\n listView: ListProps[];\n}\nexport interface AppShellListItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** Icon for displaying at the end of items */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: ListInteractionEvent) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nconst List = ({\n headingText,\n emptyText,\n items,\n loading = false,\n displayPins = false,\n onItemClick,\n onItemPinToggle,\n viewAll: viewAllProps\n}: ListProps) => {\n const t = useI18n();\n const { closeDrawer } = useContext(AppShellDrawerContext);\n const pinButtons = useRef<Record<string, HTMLButtonElement>>({});\n\n const renderContent = items.length ? (\n <Flex as={StyledAppShellList} item={{ grow: 1 }}>\n {items.map(\n ({\n id,\n primary,\n secondary,\n visual,\n unread,\n href,\n onClick,\n pinned,\n onPinToggle,\n ...restProps\n }: AppShellListItemProps) => {\n const onSummaryItemClick = (e: ListInteractionEvent) => {\n onClick?.(id, e);\n onItemClick?.(id, e);\n\n if (!pinButtons.current[id]?.contains(e.target as Node)) {\n closeDrawer();\n }\n };\n\n return (\n <StyledAppShellSummaryList key={id}>\n <SummaryItem\n {...restProps}\n as={href ? 'a' : 'button'}\n primary={\n <StyledNotificationPrimary unread={unread}>{primary}</StyledNotificationPrimary>\n }\n secondary={\n secondary?.length ? (\n <StyledNotificationSecondary unread={unread}>\n <MetaList as={StyledAppShellMetaList} items={secondary} />\n </StyledNotificationSecondary>\n ) : undefined\n }\n visual={\n visual || unread ? (\n <StyledNotificationVisual unread={unread} visualIncluded={!!visual}>\n {visual} <Alert variant='urgent' />\n </StyledNotificationVisual>\n ) : undefined\n }\n href={href}\n onClick={onSummaryItemClick}\n onKeyDown={(e: KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n onSummaryItemClick(e);\n }\n }}\n actions={\n displayPins ? (\n <Button\n ref={el => {\n if (!el) delete pinButtons.current[id];\n else pinButtons.current[id] = el;\n }}\n icon\n as={StyledAppShellPinButton}\n forwardedAs='div'\n onClick={() => {\n onPinToggle?.(id);\n onItemPinToggle?.(id);\n }}\n onKeyDown={(e: KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter') {\n onPinToggle?.(id);\n onItemPinToggle?.(id);\n }\n }}\n role='button'\n tabIndex={0}\n >\n <Icon name={pinned ? 'pin-solid' : 'pin'} />\n </Button>\n ) : undefined\n }\n tabIndex={0}\n />\n </StyledAppShellSummaryList>\n );\n }\n )}\n </Flex>\n ) : (\n <Flex\n as={EmptyStateColorContrast}\n container={{ justify: 'center', alignItems: 'center' }}\n item={{ grow: 1 }}\n >\n <EmptyState message={emptyText} />\n </Flex>\n );\n\n return (\n <Flex as={StyledAppShellListSection} container={{ direction: 'column' }}>\n {headingText && (\n <Text variant='h3' as={StyledAppShellListHeading}>\n {headingText}\n </Text>\n )}\n {loading ? (\n <Flex container={{ justify: 'center', alignItems: 'center' }} item={{ grow: 1 }}>\n <Progress as={StyledLoading} placement='inline' />\n </Flex>\n ) : (\n renderContent\n )}\n {(viewAllProps?.href || viewAllProps?.onClick) && !!items.length && !loading && (\n <StyledDrawerViewAll {...viewAllProps} as={viewAllProps.href ? 'a' : 'button'}>\n {t('view_all')}\n </StyledDrawerViewAll>\n )}\n </Flex>\n );\n};\nconst AppShellList: FunctionComponent<AppShellListProps> = ({ listView }) => {\n return (\n <Flex as={StyledAppShellListWrapper} container={{ direction: 'column' }}>\n {listView.map(listItem => (\n <List {...listItem} key={listItem.id} />\n ))}\n </Flex>\n );\n};\n\nexport default AppShellList;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const StyledAppShellListWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
export declare const StyledAppShellList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const StyledAppShellSummaryList: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const StyledAppShellMetaList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
5
5
|
export declare const StyledAppShellPinButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
6
6
|
export declare const StyledNotificationVisual: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellList.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,yBAAyB,yGAkBpC,CAAC;AAIH,eAAO,MAAM,kBAAkB,wGAAc,CAAC;AAI9C,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"AppShellList.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,yBAAyB,yGAkBpC,CAAC;AAIH,eAAO,MAAM,kBAAkB,wGAAc,CAAC;AAI9C,eAAO,MAAM,yBAAyB,wGAwBpC,CAAC;AAIH,eAAO,MAAM,sBAAsB,wGAIlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,4GAiBlC,CAAC;AAIH,eAAO,MAAM,wBAAwB;;;SAepC,CAAC;AAIF,eAAO,MAAM,yBAAyB;;SAOpC,CAAC;AAIH,eAAO,MAAM,2BAA2B;;SAUvC,CAAC;AAIF,eAAO,MAAM,uBAAuB,yGAOnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,yGAUpC,CAAC;AAIH,eAAO,MAAM,yBAAyB,wGAQpC,CAAC"}
|
|
@@ -29,30 +29,32 @@ export const StyledAppShellListWrapper = styled.div(({ theme }) => {
|
|
|
29
29
|
StyledAppShellListWrapper.defaultProps = defaultThemeProp;
|
|
30
30
|
export const StyledAppShellList = styled.ul ``;
|
|
31
31
|
StyledAppShellList.defaultProps = defaultThemeProp;
|
|
32
|
-
export const
|
|
32
|
+
export const StyledAppShellSummaryList = styled.li(({ theme }) => {
|
|
33
33
|
return css `
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
${StyledSummaryItem} {
|
|
35
|
+
padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
|
|
36
|
+
color: inherit;
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
border: none;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
text-align: start;
|
|
42
|
+
white-space: normal;
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
&:hover,
|
|
45
|
+
&:focus {
|
|
46
|
+
color: ${theme.base.colors.white};
|
|
47
|
+
background-color: rgba(255, 255, 255, 0.05);
|
|
48
|
+
}
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
&:focus {
|
|
51
|
+
outline: none;
|
|
52
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
53
|
+
}
|
|
52
54
|
}
|
|
53
55
|
`;
|
|
54
56
|
});
|
|
55
|
-
|
|
57
|
+
StyledAppShellSummaryList.defaultProps = defaultThemeProp;
|
|
56
58
|
export const StyledAppShellMetaList = styled.ul `
|
|
57
59
|
li {
|
|
58
60
|
color: inherit;
|
|
@@ -72,7 +74,7 @@ export const StyledAppShellPinButton = styled.button(({ theme }) => {
|
|
|
72
74
|
|
|
73
75
|
&:focus {
|
|
74
76
|
outline: none;
|
|
75
|
-
box-shadow:
|
|
77
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
76
78
|
}
|
|
77
79
|
`;
|
|
78
80
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellList.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,yBAAyB;AACzB,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAChE,OAAO,GAAG,CAAA;;;;MAIN,iBAAiB;;;;;;;;;4BASK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAA,EAAE,CAAC;AAE9C,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"AppShellList.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellList.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAg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AM,2BAA2B,GAAG,MAAM,CAAC,IAAI,CACpD,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;IACpB,OAAO,GAAG,CAAA;QACN,UAAU;mBACC,MAAM;QACf,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;QAC1C,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;;KAE/C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,2BAA2B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;IAC7C,gBAAgB;;;;;;CAMnB,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAChE,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CACpE,CAAC;IAEF,OAAO,GAAG,CAAA;kCACsB,WAAW;;;GAG1C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/D,OAAO,GAAG,CAAA;;;eAGG,KAAK,CAAC,IAAI,CAAC,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { lighten } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport { StyledAlert } from '../Badges/Alert';\nimport { StyledEmptyState } from '../EmptyState';\nimport { StyledSummaryItem } from '../SummaryItem';\nimport { StyledText } from '../Text';\n\n/* AppShellList styles */\nexport const StyledAppShellListWrapper = styled.div(({ theme }) => {\n return css`\n max-height: 100%;\n white-space: nowrap;\n\n ${StyledSummaryItem} {\n position: relative;\n &::after {\n content: '';\n position: absolute;\n top: calc(100% - 0.03125rem);\n inset-inline-end: 1rem;\n inset-inline-start: 1rem;\n height: 0.0625rem;\n background-color: ${theme.base.colors.gray['extra-dark']};\n }\n }\n `;\n});\n\nStyledAppShellListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellList = styled.ul``;\n\nStyledAppShellList.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellSummaryList = styled.li(({ theme }) => {\n return css`\n ${StyledSummaryItem} {\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n color: inherit;\n background-color: transparent;\n border: none;\n text-decoration: none;\n cursor: pointer;\n text-align: start;\n white-space: normal;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n }\n `;\n});\n\nStyledAppShellSummaryList.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellMetaList = styled.ul`\n li {\n color: inherit;\n }\n`;\n\nexport const StyledAppShellPinButton = styled.button(({ theme }) => {\n return css`\n color: inherit;\n border: none;\n background-color: transparent;\n\n &:hover,\n &:focus {\n color: ${theme.base.colors.white};\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n &:focus {\n outline: none;\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n `;\n});\n\nStyledAppShellPinButton.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationVisual = styled.span<{ unread?: boolean; visualIncluded?: boolean }>(\n ({ theme, unread, visualIncluded }) => {\n return css`\n position: relative;\n ${StyledAlert} {\n display: ${unread ? 'auto' : 'none'};\n position: absolute;\n inset-inline-start: -0.65625rem;\n top: ${visualIncluded ? 'calc(50% - 0.15625rem)' : '0.5rem'};\n background-color: ${theme.base.palette.light};\n height: 0.3125rem;\n width: 0.3125rem;\n } ;\n `;\n }\n);\n\nStyledNotificationVisual.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationPrimary = styled.span<{ unread?: boolean }>(({ theme, unread }) => {\n return css`\n font-weight: ${unread\n ? theme.base['font-weight'].bold\n : theme.base['font-weight']['semi-bold']};\n color: ${unread ? theme.base.palette.light : 'inherit'};\n `;\n});\n\nStyledNotificationPrimary.defaultProps = defaultThemeProp;\n\nexport const StyledNotificationSecondary = styled.span<{ unread?: boolean }>(\n ({ theme, unread }) => {\n return css`\n ${StyledText} {\n opacity: ${unread\n ? theme.base.transparency['transparent-1']\n : theme.base.transparency['transparent-3']};\n }\n `;\n }\n);\n\nStyledNotificationSecondary.defaultProps = defaultThemeProp;\n\nexport const EmptyStateColorContrast = styled.div`\n ${StyledEmptyState} {\n span,\n svg {\n color: rgba(255, 255, 255, 0.7);\n }\n }\n`;\n\nexport const StyledAppShellListSection = styled.div(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n\n return css`\n border-top: 0.0625rem solid ${borderColor};\n min-height: max(20%, 8rem);\n overflow-y: auto;\n `;\n});\n\nStyledAppShellListSection.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellListHeading = styled.h3(({ theme }) => {\n return css`\n position: sticky;\n top: 0;\n padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});\n background-color: hsl(207 14% 13% / 1);\n z-index: 1;\n `;\n});\n\nStyledAppShellListHeading.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -179,7 +179,7 @@ export const StyledAppShellSearchButton = styled(BareButton) `
|
|
|
179
179
|
&:focus {
|
|
180
180
|
${StyledAppShellSearchDecoration} {
|
|
181
181
|
outline: none;
|
|
182
|
-
box-shadow:
|
|
182
|
+
box-shadow: ${props => props.theme.base.shadow['focus-inset']};
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellSearch.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShellSearch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CACpC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,EAAE;IACxC,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,EAAE,CACpC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,GAAG,CAA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;YAczB,kBAAkB;;;SAGrB;;KAEJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,OAAO,GAAG,CAAA;aACC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM;cAC5B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM;;;;;;;;GAQxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;;MAGtD,8BAA8B;;oBAEhB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;;CAGlE,CAAC;AAEF,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IAC9E,OAAO,GAAG,CAAA;eACG,IAAI,CAAC,OAAO;GACxB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,6BAA6B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { lighten, mix } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { tryCatch } from '../../utils';\nimport BareButton from '../Button/BareButton';\nimport { StyledLink } from '../Link';\nimport { StyledMenuItem } from '../Menu';\nimport { StyledMenu, StyledMenuListContainer } from '../Menu/Menu.styles';\nimport { StyledSearchInput } from '../SearchInput';\nimport {\n StyledCancelButton,\n StyledFiltersPopover,\n StyledResultsPopover,\n StyledSearchButton\n} from '../SearchInput/SearchInput.styles';\nimport { StyledText } from '../Text';\nimport { StyledBackdrop } from '../Backdrop';\nimport { StyledEmptyState } from '../EmptyState';\n\nimport { navWidth } from './AppShell.styles';\n\nexport const StyledSearch = styled.div<{ collapsed: boolean; isMediumOrAbove: boolean }>(\n ({ theme, collapsed, isMediumOrAbove }) => {\n const backgroundColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n const maxCollapsedSize = theme.components.input.height;\n const activeColor = tryCatch(() =>\n mix(0.85, theme.base.palette.dark, theme.base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, theme.base.palette.dark, theme.base.palette.interactive)\n );\n\n return css`\n flex-shrink: 0;\n justify-content: center;\n --background-color: ${backgroundColor};\n\n ${StyledMenuListContainer} {\n background: transparent;\n }\n\n > form {\n padding: ${theme.base.spacing} 0;\n }\n\n header {\n ${StyledText} {\n color: ${theme.base.palette.light};\n }\n }\n\n ${StyledBackdrop} {\n background: transparent;\n }\n\n ${StyledEmptyState} {\n span,\n svg {\n color: ${theme.base.palette.light};\n }\n }\n\n ${StyledMenu} {\n &[data-active-scope='true'] [data-current='true'] {\n background-color: ${activeColor};\n }\n\n ${StyledLink} {\n color: ${theme.base.palette.light};\n }\n }\n\n ${StyledMenuItem} {\n color: ${theme.base.palette.light};\n\n li {\n color: ${theme.base.palette.light};\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n }\n\n ${StyledFiltersPopover}, ${StyledResultsPopover} {\n background-color: ${backgroundColor};\n z-index: calc(${theme.base['z-index'].backdrop} + 1);\n }\n\n ${StyledSearchInput} {\n border: none;\n background: transparent;\n\n ${StyledSearchButton} {\n transition: borderRadius calc(${theme.base.animation.speed} * 2);\n border: none;\n }\n\n ${StyledCancelButton} {\n color: rgba(255, 255, 255, 0.9);\n }\n\n input {\n border-color: ${backgroundColor};\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.6);\n }\n\n &:focus:not([disabled]) {\n border-color: ${backgroundColor};\n }\n }\n\n input,\n ${StyledSearchButton} {\n background: ${backgroundColor};\n color: rgba(255, 255, 255, 0.7);\n border: transparent;\n\n &:focus-within {\n border: transparent;\n }\n }\n\n &:focus-within {\n ${StyledSearchButton} {\n color: rgba(255, 255, 255, 0.9);\n }\n }\n }\n\n form > ${StyledSearchInput} {\n margin: 0 calc((${navWidth} - ${theme.base['hit-area']['mouse-min']}) / 2);\n ${collapsed &&\n isMediumOrAbove &&\n css`\n overflow: hidden;\n `}\n background: ${backgroundColor};\n\n ${collapsed &&\n isMediumOrAbove &&\n css`\n ${StyledSearchButton} {\n border-radius: calc(\n ${theme.base['border-radius']} * ${theme.components['search-input']['border-radius']}\n );\n height: ${maxCollapsedSize};\n width: ${maxCollapsedSize};\n padding: 0;\n\n > :not(:first-child) {\n display: none;\n }\n }\n\n input {\n padding: 0;\n max-width: 0;\n overflow: hidden;\n }\n\n ${StyledCancelButton} {\n display: none;\n }\n `}\n }\n `;\n }\n);\n\nStyledSearch.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellSearchDecoration = styled.div(({ theme }) => {\n return css`\n width: ${theme.components.input.height};\n height: ${theme.components.input.height};\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--background-color);\n color: rgba(255, 255, 255, 0.7);\n margin: 0 auto;\n `;\n});\n\nStyledAppShellSearchDecoration.defaultProps = defaultThemeProp;\n\nexport const StyledAppShellSearchButton = styled(BareButton)`\n width: 100%;\n &:focus {\n ${StyledAppShellSearchDecoration} {\n outline: none;\n box-shadow: ${props => props.theme.base.shadow['focus-inset']};\n }\n }\n`;\n\nStyledAppShellSearchButton.defaultProps = defaultThemeProp;\n\nexport const StyledAppshellSearchContainer = styled.div(({ theme: { base } }) => {\n return css`\n padding: ${base.spacing};\n `;\n});\n\nStyledAppshellSearchContainer.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { type ForwardProps } from '../../types';
|
|
3
|
+
import { type ContextSwitcherProps } from './AppShell.types';
|
|
4
|
+
declare const ContextSwitcher: FunctionComponent<ContextSwitcherProps & ForwardProps>;
|
|
5
|
+
export default ContextSwitcher;
|
|
6
|
+
//# sourceMappingURL=ContextSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/ContextSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CAuB3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Flex from '../Flex';
|
|
3
|
+
import { registerIcon } from '../Icon';
|
|
4
|
+
import * as nineDotIcon from '../Icon/icons/dot-9-solid.icon';
|
|
5
|
+
import MenuButton from '../MenuButton';
|
|
6
|
+
import { useI18n } from '../../hooks';
|
|
7
|
+
import { StyledContextSwitcher } from './AppHeader.styles';
|
|
8
|
+
registerIcon(nineDotIcon);
|
|
9
|
+
const ContextSwitcher = ({ contexts, onContextClick, label, ...restProps }) => {
|
|
10
|
+
const t = useI18n();
|
|
11
|
+
return (_jsx(Flex, { container: { justify: 'center' }, as: StyledContextSwitcher, ...restProps, children: _jsx(MenuButton, { text: label ?? t('switch_to'), variant: 'simple', icon: 'dot-9-solid', iconOnly: true, menu: {
|
|
12
|
+
mode: 'single-select',
|
|
13
|
+
items: contexts,
|
|
14
|
+
onItemClick: onContextClick
|
|
15
|
+
} }) }));
|
|
16
|
+
};
|
|
17
|
+
export default ContextSwitcher;
|
|
18
|
+
//# sourceMappingURL=ContextSwitcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.js","sourceRoot":"","sources":["../../../src/components/AppShell/ContextSwitcher.tsx"],"names":[],"mappings":";AAEA,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,WAAW,MAAM,gCAAgC,CAAC;AAC9D,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1B,MAAM,eAAe,GAA2D,CAAC,EAC/E,QAAQ,EACR,cAAc,EACd,KAAK,EACL,GAAG,SAAS,EACb,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,qBAAqB,KAAM,SAAS,YAC9E,KAAC,UAAU,IACT,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,WAAW,CAAC,EAC7B,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,aAAa,EAClB,QAAQ,QACR,IAAI,EAAE;gBACJ,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,cAAc;aAC5B,GACD,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\n\nimport Flex from '../Flex';\nimport { registerIcon } from '../Icon';\nimport * as nineDotIcon from '../Icon/icons/dot-9-solid.icon';\nimport MenuButton from '../MenuButton';\nimport { useI18n } from '../../hooks';\nimport { type ForwardProps } from '../../types';\n\nimport { StyledContextSwitcher } from './AppHeader.styles';\nimport { type ContextSwitcherProps } from './AppShell.types';\n\nregisterIcon(nineDotIcon);\n\nconst ContextSwitcher: FunctionComponent<ContextSwitcherProps & ForwardProps> = ({\n contexts,\n onContextClick,\n label,\n ...restProps\n}) => {\n const t = useI18n();\n\n return (\n <Flex container={{ justify: 'center' }} as={StyledContextSwitcher} {...restProps}>\n <MenuButton\n text={label ?? t('switch_to')}\n variant='simple'\n icon='dot-9-solid'\n iconOnly\n menu={{\n mode: 'single-select',\n items: contexts,\n onItemClick: onContextClick\n }}\n />\n </Flex>\n );\n};\n\nexport default ContextSwitcher;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBtD,UAAU,eAAe;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;sGASE,eAAe;AAPlB,
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBtD,UAAU,eAAe;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;sGASE,eAAe;AAPlB,wBAkGE"}
|
|
@@ -7,7 +7,7 @@ import Flex from '../Flex';
|
|
|
7
7
|
import Icon, { registerIcon } from '../Icon';
|
|
8
8
|
import * as arrowLeftIcon from '../Icon/icons/arrow-left.icon';
|
|
9
9
|
import Text from '../Text';
|
|
10
|
-
import { useDirection,
|
|
10
|
+
import { useDirection, useEscape, useFocusTrap, useI18n, useTheme, useUID } from '../../hooks';
|
|
11
11
|
import Configuration from '../Configuration';
|
|
12
12
|
import { tryCatch } from '../../utils';
|
|
13
13
|
import AppShellContext from './AppShellContext';
|
|
@@ -16,8 +16,9 @@ registerIcon(arrowLeftIcon);
|
|
|
16
16
|
export default ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setDrawerOpen }) => {
|
|
17
17
|
const { focusedImperatively } = useContext(AppShellContext);
|
|
18
18
|
const returnFocusRef = useRef();
|
|
19
|
-
const
|
|
19
|
+
const drawerRef = useRef(null);
|
|
20
20
|
const theme = useTheme();
|
|
21
|
+
const headerId = useUID();
|
|
21
22
|
const backButtonRef = useRef(null);
|
|
22
23
|
const appShellBg = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
|
|
23
24
|
const appShellTheme = {
|
|
@@ -26,18 +27,16 @@ export default ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setD
|
|
|
26
27
|
'primary-background': appShellBg,
|
|
27
28
|
'foreground-color': 'rgba(255, 255, 255, 0.7)',
|
|
28
29
|
interactive: theme.base.colors.blue.light
|
|
29
|
-
},
|
|
30
|
-
shadow: {
|
|
31
|
-
focus: theme.base.shadow['focus-inverted']
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
33
|
const { ltr, rtl } = useDirection();
|
|
36
34
|
const t = useI18n();
|
|
37
|
-
|
|
35
|
+
useEscape(() => {
|
|
38
36
|
setDrawerOpen(false);
|
|
39
|
-
});
|
|
40
|
-
|
|
37
|
+
}, drawerRef, [drawerRef.current]);
|
|
38
|
+
useFocusTrap(drawerRef);
|
|
39
|
+
return (_jsx(Configuration, { theme: appShellTheme, children: _jsxs(Drawer, { role: 'dialog', "aria-labelledby": headerId, as: StyledDrawerWrapper, position: 'fixed', placement: 'left', open: drawerOpen, nullWhenClosed: true, onBeforeOpen: () => {
|
|
41
40
|
returnFocusRef.current = document.activeElement ?? undefined;
|
|
42
41
|
}, onAfterOpen: () => {
|
|
43
42
|
if (backButtonRef.current && document.activeElement !== backButtonRef.current) {
|
|
@@ -48,6 +47,6 @@ export default ({ content, header, onDrawerOpen, onDrawerClose, drawerOpen, setD
|
|
|
48
47
|
}, onAfterClose: () => {
|
|
49
48
|
onDrawerClose?.();
|
|
50
49
|
returnFocusRef.current?.focus();
|
|
51
|
-
}, ref:
|
|
50
|
+
}, onOuterClick: () => setDrawerOpen(false), ref: drawerRef, children: [_jsxs(Flex, { as: StyledDrawerHeading, container: { alignItems: 'center' }, children: [rtl && (_jsx(Text, { variant: 'h2', id: headerId, children: header })), _jsx(BareButton, { as: StyledDrawerBackButton, ref: backButtonRef, onClick: () => setDrawerOpen(false), "aria-label": t('close_noun', [header]), children: _jsx(Icon, { name: 'arrow-left' }) }), ltr && (_jsx(Text, { variant: 'h2', id: headerId, children: header }))] }), _jsx(Flex, { as: StyledDrawerListContainer, container: { direction: 'column' }, "aria-labelledby": headerId, children: content })] }) }));
|
|
52
51
|
};
|
|
53
52
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAa,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,O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AAE;gBAChB,IAAI,aAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,aAAa,KAAK,aAAa,CAAC,OAAO,EAAE;oBAC7E,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC;oBACnC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;iBAC/B;gBACD,YAAY,EAAE,EAAE,CAAC;YACnB,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;gBACjB,aAAa,EAAE,EAAE,CAAC;gBAClB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YAClC,CAAC,EACD,YAAY,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACxC,GAAG,EAAE,SAAS,aAEd,MAAC,IAAI,IAAC,EAAE,EAAE,mBAAmB,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,aAC/D,GAAG,IAAI,CACN,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,EAAC,EAAE,EAAE,QAAQ,YAC5B,MAAM,GACF,CACR,EACD,KAAC,UAAU,IACT,EAAE,EAAE,sBAAsB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,gBACvB,CAAC,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC,YAErC,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GACf,EACZ,GAAG,IAAI,CACN,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,EAAC,EAAE,EAAE,QAAQ,YAC5B,MAAM,GACF,CACR,IACI,EACP,KAAC,IAAI,IACH,EAAE,EAAE,yBAAyB,EAC7B,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,qBACjB,QAAQ,YAExB,OAAO,GACH,IACA,GACK,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useContext, useRef, ReactNode } from 'react';\nimport { lighten } from 'polished';\n\nimport BareButton from '../Button/BareButton';\nimport Drawer from '../Drawer';\nimport Flex from '../Flex';\nimport Icon, { registerIcon } from '../Icon';\nimport * as arrowLeftIcon from '../Icon/icons/arrow-left.icon';\nimport Text from '../Text';\nimport { useDirection, useEscape, useFocusTrap, useI18n, useTheme, useUID } from '../../hooks';\nimport Configuration from '../Configuration';\nimport { tryCatch } from '../../utils';\n\nimport AppShellContext from './AppShellContext';\nimport {\n StyledDrawerWrapper,\n StyledDrawerBackButton,\n StyledDrawerHeading,\n StyledDrawerListContainer\n} from './Drawer.styles';\n\nregisterIcon(arrowLeftIcon);\n\ninterface DrawerViewProps {\n content: ReactNode;\n header: string;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n drawerOpen: boolean;\n setDrawerOpen: (open: boolean) => void;\n}\n\nexport default ({\n content,\n header,\n onDrawerOpen,\n onDrawerClose,\n drawerOpen,\n setDrawerOpen\n}: DrawerViewProps) => {\n const { focusedImperatively } = useContext(AppShellContext);\n const returnFocusRef = useRef<HTMLElement>();\n const drawerRef = useRef<HTMLDivElement>(null);\n const theme = useTheme();\n const headerId = useUID();\n\n const backButtonRef = useRef<HTMLButtonElement>(null);\n const appShellBg = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n const appShellTheme = {\n base: {\n palette: {\n 'primary-background': appShellBg,\n 'foreground-color': 'rgba(255, 255, 255, 0.7)',\n interactive: theme.base.colors.blue.light\n }\n }\n };\n\n const { ltr, rtl } = useDirection();\n const t = useI18n();\n\n useEscape(\n () => {\n setDrawerOpen(false);\n },\n drawerRef,\n [drawerRef.current]\n );\n\n useFocusTrap(drawerRef);\n\n return (\n <Configuration theme={appShellTheme}>\n <Drawer\n role='dialog'\n aria-labelledby={headerId}\n as={StyledDrawerWrapper}\n position='fixed'\n placement='left'\n open={drawerOpen}\n nullWhenClosed\n onBeforeOpen={() => {\n returnFocusRef.current = (document.activeElement as HTMLElement) ?? undefined;\n }}\n onAfterOpen={() => {\n if (backButtonRef.current && document.activeElement !== backButtonRef.current) {\n focusedImperatively.current = true;\n backButtonRef.current.focus();\n }\n onDrawerOpen?.();\n }}\n onAfterClose={() => {\n onDrawerClose?.();\n returnFocusRef.current?.focus();\n }}\n onOuterClick={() => setDrawerOpen(false)}\n ref={drawerRef}\n >\n <Flex as={StyledDrawerHeading} container={{ alignItems: 'center' }}>\n {rtl && (\n <Text variant='h2' id={headerId}>\n {header}\n </Text>\n )}\n <BareButton\n as={StyledDrawerBackButton}\n ref={backButtonRef}\n onClick={() => setDrawerOpen(false)}\n aria-label={t('close_noun', [header])}\n >\n <Icon name='arrow-left' />\n </BareButton>\n {ltr && (\n <Text variant='h2' id={headerId}>\n {header}\n </Text>\n )}\n </Flex>\n <Flex\n as={StyledDrawerListContainer}\n container={{ direction: 'column' }}\n aria-labelledby={headerId}\n >\n {content}\n </Flex>\n </Drawer>\n </Configuration>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,eAAO,MAAM,mBAAmB,kHAQ9B,CAAC;AAIH,eAAO,MAAM,mBAAmB,4GAqB9B,CAAC;AAIH,eAAO,MAAM,sBAAsB,4GAmBjC,CAAC;AAIH,eAAO,MAAM,gBAAgB;iBAA4B,OAAO;SAE9D,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAIhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,4GA6BhC,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAK5B,CAAC;AAIH,eAAO,MAAM,uBAAuB,wGAQlC,CAAC;AAIH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"Drawer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/Drawer.styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,eAAO,MAAM,mBAAmB,kHAQ9B,CAAC;AAIH,eAAO,MAAM,mBAAmB,4GAqB9B,CAAC;AAIH,eAAO,MAAM,sBAAsB,4GAmBjC,CAAC;AAIH,eAAO,MAAM,gBAAgB;iBAA4B,OAAO;SAE9D,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAIhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,4GA6BhC,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAK5B,CAAC;AAIH,eAAO,MAAM,uBAAuB,wGAQlC,CAAC;AAIH,eAAO,MAAM,mBAAmB,uGAmB9B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAUlC,CAAC;AAIH,eAAO,MAAM,yBAAyB,yGAOpC,CAAC"}
|
|
@@ -22,7 +22,7 @@ export const StyledDrawerHeading = styled.header(({ theme }) => {
|
|
|
22
22
|
padding: ${theme.base.spacing} calc(2 * ${theme.base.spacing});
|
|
23
23
|
line-height: 1;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
h2 {
|
|
26
26
|
font-size: ${fontSize.s};
|
|
27
27
|
font-weight: ${theme.base['font-weight']['semi-bold']};
|
|
28
28
|
margin: 0 auto;
|
|
@@ -54,7 +54,7 @@ export const StyledDrawerBackButton = styled.button(({ theme }) => {
|
|
|
54
54
|
|
|
55
55
|
&:focus {
|
|
56
56
|
outline: none;
|
|
57
|
-
box-shadow:
|
|
57
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
58
58
|
}
|
|
59
59
|
`;
|
|
60
60
|
});
|
|
@@ -93,7 +93,7 @@ export const StyledDrawerPinButton = styled.button(({ theme }) => {
|
|
|
93
93
|
|
|
94
94
|
&:focus {
|
|
95
95
|
outline: none;
|
|
96
|
-
box-shadow:
|
|
96
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
97
97
|
}
|
|
98
98
|
`;
|
|
99
99
|
});
|
|
@@ -128,7 +128,10 @@ export const StyledDrawerViewAll = styled.a(({ theme }) => {
|
|
|
128
128
|
&:hover,
|
|
129
129
|
&:focus {
|
|
130
130
|
color: ${theme.base.colors.white};
|
|
131
|
-
|
|
131
|
+
}
|
|
132
|
+
&:focus {
|
|
133
|
+
outline: none;
|
|
134
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
132
135
|
}
|
|
133
136
|
`;
|
|
134
137
|
});
|