@pega/cosmos-react-core 4.0.0-dev.1.2 → 4.0.0-dev.10.1
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 +57 -20
- 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 +26 -5
- 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/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 +88 -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 +88 -19
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +98 -27
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +90 -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
|
@@ -3,7 +3,7 @@ import { PopperProps } from 'react-popper';
|
|
|
3
3
|
import { VirtualElement } from '@popperjs/core';
|
|
4
4
|
import { BaseProps, ForwardProps } from '../../types';
|
|
5
5
|
import { ConfigurationProps } from '../Configuration';
|
|
6
|
-
export
|
|
6
|
+
export type Delay = 'none' | 'short' | 'long';
|
|
7
7
|
export interface PopoverProps<Modifiers extends string = string> extends BaseProps {
|
|
8
8
|
/** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */
|
|
9
9
|
target: Element | VirtualElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,GAAG,EAEH,YAAY,EAEZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAa,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAStD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,GAAG,EAEH,YAAY,EAEZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAa,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAStD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAKtD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAC9C,MA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useElement, useUID } from '../../hooks';
|
|
6
6
|
import { windowIsAvailable } from '../../utils';
|
|
7
7
|
import { PopoverManagerContext } from './PopoverContext';
|
|
8
|
-
import { StyledPopover,
|
|
9
|
-
import { applyMaxSize, maxSize } from './modifiers';
|
|
8
|
+
import { StyledPopover, StyledPopoverArrow } from './Popover.styles';
|
|
10
9
|
const delays = {
|
|
11
10
|
none: 0,
|
|
12
11
|
short: 500,
|
|
@@ -44,8 +43,6 @@ const Popover = forwardRef(({ show = true, portal = false, target, placement, st
|
|
|
44
43
|
tether: !modifiers.find(m => m.name === 'sameWidth')
|
|
45
44
|
}
|
|
46
45
|
},
|
|
47
|
-
maxSize,
|
|
48
|
-
applyMaxSize,
|
|
49
46
|
...modifiers
|
|
50
47
|
], [modifiers, arrow, hideOnTargetHidden]);
|
|
51
48
|
const offset = useMemo(() => {
|
|
@@ -102,7 +99,7 @@ const Popover = forwardRef(({ show = true, portal = false, target, placement, st
|
|
|
102
99
|
setShowPopover(false);
|
|
103
100
|
}
|
|
104
101
|
}, [groupId ? popovers[groupId] : undefined]);
|
|
105
|
-
const content = (_jsxs(StyledPopover, { ...restProps, offset: offset, ref: popperRef, style: { ...style, ...styles.popper }, ...attributes.popper, children: [arrow && _jsx(StyledPopoverArrow, { ref: arrowRef, style: { ...styles.arrow } }),
|
|
102
|
+
const content = (_jsxs(StyledPopover, { ...restProps, offset: offset, ref: popperRef, style: { ...style, ...styles.popper }, ...attributes.popper, children: [arrow && _jsx(StyledPopoverArrow, { ref: arrowRef, style: { ...styles.arrow } }), children] }));
|
|
106
103
|
if (!target || !showPopover || (groupId && !checkActive(uid, groupId)))
|
|
107
104
|
return null;
|
|
108
105
|
return portal && portalTarget ? createPortal(content, portalTarget) : content;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,UAAU,EAKV,MAAM,EAEN,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MAAM,CAAC,KAAK,EAAE,GAAI,EAC3E,KAAC,oBAAoB,cAAE,QAAQ,GAAwB,IACzC,CACjB,CAAC;IAEF,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpF,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChF,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n useContext,\n PropsWithoutRef,\n Ref,\n CSSProperties,\n ReactElement,\n useRef,\n ReactNode,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { usePopper, PopperProps } from 'react-popper';\nimport { VirtualElement } from '@popperjs/core';\nimport { OffsetModifier } from '@popperjs/core/lib/modifiers/offset';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport {\n useAfterInitialEffect,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useUID\n} from '../../hooks';\nimport { windowIsAvailable } from '../../utils';\nimport { ConfigurationProps } from '../Configuration';\n\nimport { PopoverManagerContext } from './PopoverContext';\nimport { StyledPopover, StyledPopoverContent, StyledPopoverArrow } from './Popover.styles';\nimport { applyMaxSize, maxSize } from './modifiers';\n\nexport type Delay = 'none' | 'short' | 'long';\nexport interface PopoverProps<Modifiers extends string = string> extends BaseProps {\n /** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */\n target: Element | VirtualElement | null;\n /**\n * If true, the Popover will be visible.\n * @default true\n */\n show?: boolean;\n /**\n * If true, the Popover will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default false\n */\n portal?: boolean | ConfigurationProps['portalTarget'];\n /**\n * Delay on showing the Popover.\n * @default \"none\"\n */\n showDelay?: Delay;\n /**\n * Delay on hiding the Popover.\n * @default \"none\"\n */\n hideDelay?: Delay;\n /**\n * [React Popper Placement](https://popper.js.org/react-popper/v2/render-props/#placement)\n */\n placement?: PopperProps<Modifiers>['placement'];\n /**\n * [React Popper Strategy](https://popper.js.org/react-popper/v2/render-props/#strategy)\n * @default \"absolute\"\n */\n strategy?: PopperProps<Modifiers>['strategy'];\n /**\n * [React Popper Modifiers](https://popper.js.org/react-popper/v2/render-props/#modifiers)\n * @default []\n */\n modifiers?: PopperProps<Modifiers>['modifiers'];\n /**\n * If true, an arrow will visually identify from which element the Popover is rendered.\n * @default false\n */\n arrow?: boolean;\n /** The group that the Popover belongs to. Popovers in the same group will be closed when others open. */\n groupId?: string;\n /**\n * If true, the Popover will be visibly hidden when its target leaves the viewport.\n * @default false\n */\n hideOnTargetHidden?: boolean;\n /** Callback that runs when the popover is hidden */\n onHide?: () => void;\n /** The content of the Popover. */\n children: ReactNode;\n /** The ref of the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst delays = {\n none: 0,\n short: 500,\n long: 1000\n};\n\nconst Popover: <Modifiers extends string = string>(\n props: PopoverProps<Modifiers> & ForwardProps\n) => ReactElement | null = forwardRef(\n (\n {\n show = true,\n portal = false,\n target,\n placement,\n strategy = 'fixed',\n style,\n modifiers = [],\n arrow = false,\n groupId,\n showDelay = 'none',\n hideDelay = 'none',\n hideOnTargetHidden = false,\n children,\n onHide,\n ...restProps\n }: PropsWithoutRef<PopoverProps> & { style?: CSSProperties },\n ref: PopoverProps['ref']\n ) => {\n const { portalTarget: configurationPortal } = useConfiguration();\n const { checkActive, setActive, popovers } = useContext(PopoverManagerContext);\n const [, setPopperEl] = useElement<HTMLDivElement>();\n const popperRef = useConsolidatedRef<HTMLDivElement>(ref, setPopperEl);\n const arrowRef = useRef<HTMLDivElement>(null);\n const forceUpdateRef = useRef<() => void>();\n const [showPopover, setShowPopover] = useState(show);\n const timeout = useRef<number>();\n const uid = useUID();\n\n const portalTarget = typeof portal === 'boolean' ? configurationPortal : portal;\n\n const memoedModifiers = useMemo(\n () => [\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration: false\n }\n },\n {\n name: 'offset',\n options: {\n offset: [0, arrow ? 5.5 : 2]\n }\n },\n { name: 'hide', enabled: hideOnTargetHidden },\n { name: 'arrow', enabled: arrow, options: { element: arrowRef.current } },\n {\n name: 'preventOverflow',\n options: {\n tether: !modifiers.find(m => m.name === 'sameWidth')\n }\n },\n maxSize,\n applyMaxSize,\n ...modifiers\n ],\n [modifiers, arrow, hideOnTargetHidden]\n );\n\n const offset = useMemo(() => {\n const offsetModifier = [...memoedModifiers]\n .reverse()\n .find(m => m.name === 'offset' && m.enabled !== false) as OffsetModifier | undefined;\n return Array.isArray(offsetModifier?.options?.offset)\n ? offsetModifier?.options?.offset[1] ?? 0\n : 0;\n }, [memoedModifiers]);\n\n const { styles, attributes, forceUpdate } = usePopper(target, popperRef.current, {\n placement,\n strategy,\n modifiers: memoedModifiers\n });\n\n if (forceUpdate) forceUpdateRef.current = forceUpdate;\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n forceUpdateRef.current?.();\n });\n\n if (popperRef.current) observer.observe(popperRef.current);\n if (target instanceof Element) observer.observe(target);\n\n return () => {\n observer.disconnect();\n };\n }, [forceUpdate, popperRef.current, target]);\n\n useEffect(() => {\n if (groupId && show) setActive(uid, groupId);\n\n if (windowIsAvailable) {\n if (timeout.current) clearTimeout(timeout.current);\n timeout.current = window.setTimeout(() => {\n setShowPopover(show);\n }, delays[show ? showDelay : hideDelay]);\n } else {\n setShowPopover(show);\n }\n }, [show]);\n\n useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n\n useAfterInitialEffect(() => {\n if (!showPopover) {\n onHide?.();\n }\n }, [showPopover]);\n\n useEffect(() => {\n if (groupId && popovers[groupId] && popovers[groupId] !== uid) {\n setShowPopover(false);\n }\n }, [groupId ? popovers[groupId] : undefined]);\n\n const content = (\n <StyledPopover\n {...restProps}\n offset={offset}\n ref={popperRef}\n style={{ ...style, ...styles.popper }}\n {...attributes.popper}\n >\n {arrow && <StyledPopoverArrow ref={arrowRef} style={{ ...styles.arrow }} />}\n <StyledPopoverContent>{children}</StyledPopoverContent>\n </StyledPopover>\n );\n\n if (!target || !showPopover || (groupId && !checkActive(uid, groupId))) return null;\n\n return portal && portalTarget ? createPortal(content, portalTarget) : content;\n }\n);\n\nexport default Popover;\n"]}
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,UAAU,EAKV,MAAM,EAEN,SAAS,EACT,OAAO,EACP,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAC;AAKtD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AA4DrE,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,OAAO,GAEc,UAAU,CACnC,CACE,EACE,IAAI,GAAG,IAAI,EACX,MAAM,GAAG,KAAK,EACd,MAAM,EACN,SAAS,EACT,QAAQ,GAAG,OAAO,EAClB,KAAK,EACL,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,KAAK,EACb,OAAO,EACP,SAAS,GAAG,MAAM,EAClB,SAAS,GAAG,MAAM,EAClB,kBAAkB,GAAG,KAAK,EAC1B,QAAQ,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C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAE9C,MAAM,OAAO,GAAG,CACd,MAAC,aAAa,OACR,SAAS,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KACjC,UAAU,CAAC,MAAM,aAEpB,KAAK,IAAI,KAAC,kBAAkB,IAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,GAAI,EAC1E,QAAQ,IACK,CACjB,CAAC;IAEF,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpF,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AAChF,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n useContext,\n PropsWithoutRef,\n Ref,\n CSSProperties,\n ReactElement,\n useRef,\n ReactNode,\n useEffect,\n useMemo,\n useState\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { usePopper, PopperProps } from 'react-popper';\nimport { VirtualElement } from '@popperjs/core';\nimport { OffsetModifier } from '@popperjs/core/lib/modifiers/offset';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport {\n useAfterInitialEffect,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useUID\n} from '../../hooks';\nimport { windowIsAvailable } from '../../utils';\nimport { ConfigurationProps } from '../Configuration';\n\nimport { PopoverManagerContext } from './PopoverContext';\nimport { StyledPopover, StyledPopoverArrow } from './Popover.styles';\n\nexport type Delay = 'none' | 'short' | 'long';\nexport interface PopoverProps<Modifiers extends string = string> extends BaseProps {\n /** The DOM element or [virtual element](https://popper.js.org/docs/v2/virtual-elements) that the Popover is positioned in reference to. */\n target: Element | VirtualElement | null;\n /**\n * If true, the Popover will be visible.\n * @default true\n */\n show?: boolean;\n /**\n * If true, the Popover will render outside of the current DOM hierarchy in a [portal](https://reactjs.org/docs/portals.html).\n * @default false\n */\n portal?: boolean | ConfigurationProps['portalTarget'];\n /**\n * Delay on showing the Popover.\n * @default \"none\"\n */\n showDelay?: Delay;\n /**\n * Delay on hiding the Popover.\n * @default \"none\"\n */\n hideDelay?: Delay;\n /**\n * [React Popper Placement](https://popper.js.org/react-popper/v2/render-props/#placement)\n */\n placement?: PopperProps<Modifiers>['placement'];\n /**\n * [React Popper Strategy](https://popper.js.org/react-popper/v2/render-props/#strategy)\n * @default \"absolute\"\n */\n strategy?: PopperProps<Modifiers>['strategy'];\n /**\n * [React Popper Modifiers](https://popper.js.org/react-popper/v2/render-props/#modifiers)\n * @default []\n */\n modifiers?: PopperProps<Modifiers>['modifiers'];\n /**\n * If true, an arrow will visually identify from which element the Popover is rendered.\n * @default false\n */\n arrow?: boolean;\n /** The group that the Popover belongs to. Popovers in the same group will be closed when others open. */\n groupId?: string;\n /**\n * If true, the Popover will be visibly hidden when its target leaves the viewport.\n * @default false\n */\n hideOnTargetHidden?: boolean;\n /** Callback that runs when the popover is hidden */\n onHide?: () => void;\n /** The content of the Popover. */\n children: ReactNode;\n /** The ref of the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst delays = {\n none: 0,\n short: 500,\n long: 1000\n};\n\nconst Popover: <Modifiers extends string = string>(\n props: PopoverProps<Modifiers> & ForwardProps\n) => ReactElement | null = forwardRef(\n (\n {\n show = true,\n portal = false,\n target,\n placement,\n strategy = 'fixed',\n style,\n modifiers = [],\n arrow = false,\n groupId,\n showDelay = 'none',\n hideDelay = 'none',\n hideOnTargetHidden = false,\n children,\n onHide,\n ...restProps\n }: PropsWithoutRef<PopoverProps> & { style?: CSSProperties },\n ref: PopoverProps['ref']\n ) => {\n const { portalTarget: configurationPortal } = useConfiguration();\n const { checkActive, setActive, popovers } = useContext(PopoverManagerContext);\n const [, setPopperEl] = useElement<HTMLDivElement>();\n const popperRef = useConsolidatedRef<HTMLDivElement>(ref, setPopperEl);\n const arrowRef = useRef<HTMLDivElement>(null);\n const forceUpdateRef = useRef<() => void>();\n const [showPopover, setShowPopover] = useState(show);\n const timeout = useRef<number>();\n const uid = useUID();\n\n const portalTarget = typeof portal === 'boolean' ? configurationPortal : portal;\n\n const memoedModifiers = useMemo(\n () => [\n {\n name: 'computeStyles',\n options: {\n gpuAcceleration: false\n }\n },\n {\n name: 'offset',\n options: {\n offset: [0, arrow ? 5.5 : 2]\n }\n },\n { name: 'hide', enabled: hideOnTargetHidden },\n { name: 'arrow', enabled: arrow, options: { element: arrowRef.current } },\n {\n name: 'preventOverflow',\n options: {\n tether: !modifiers.find(m => m.name === 'sameWidth')\n }\n },\n ...modifiers\n ],\n [modifiers, arrow, hideOnTargetHidden]\n );\n\n const offset = useMemo(() => {\n const offsetModifier = [...memoedModifiers]\n .reverse()\n .find(m => m.name === 'offset' && m.enabled !== false) as OffsetModifier | undefined;\n return Array.isArray(offsetModifier?.options?.offset)\n ? offsetModifier?.options?.offset[1] ?? 0\n : 0;\n }, [memoedModifiers]);\n\n const { styles, attributes, forceUpdate } = usePopper(target, popperRef.current, {\n placement,\n strategy,\n modifiers: memoedModifiers\n });\n\n if (forceUpdate) forceUpdateRef.current = forceUpdate;\n\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n forceUpdateRef.current?.();\n });\n\n if (popperRef.current) observer.observe(popperRef.current);\n if (target instanceof Element) observer.observe(target);\n\n return () => {\n observer.disconnect();\n };\n }, [forceUpdate, popperRef.current, target]);\n\n useEffect(() => {\n if (groupId && show) setActive(uid, groupId);\n\n if (windowIsAvailable) {\n if (timeout.current) clearTimeout(timeout.current);\n timeout.current = window.setTimeout(() => {\n setShowPopover(show);\n }, delays[show ? showDelay : hideDelay]);\n } else {\n setShowPopover(show);\n }\n }, [show]);\n\n useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n\n useAfterInitialEffect(() => {\n if (!showPopover) {\n onHide?.();\n }\n }, [showPopover]);\n\n useEffect(() => {\n if (groupId && popovers[groupId] && popovers[groupId] !== uid) {\n setShowPopover(false);\n }\n }, [groupId ? popovers[groupId] : undefined]);\n\n const content = (\n <StyledPopover\n {...restProps}\n offset={offset}\n ref={popperRef}\n style={{ ...style, ...styles.popper }}\n {...attributes.popper}\n >\n {arrow && <StyledPopoverArrow ref={arrowRef} style={{ ...styles.arrow }} />}\n {children}\n </StyledPopover>\n );\n\n if (!target || !showPopover || (groupId && !checkActive(uid, groupId))) return null;\n\n return portal && portalTarget ? createPortal(content, portalTarget) : content;\n }\n);\n\nexport default Popover;\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const StyledPopoverArrow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const StyledPopoverContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
2
|
export declare const StyledPopover: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
4
3
|
offset?: number | undefined;
|
|
5
4
|
}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,yGAW9B,CAAC;AAIF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,yGAW9B,CAAC;AAIF,eAAO,MAAM,aAAa;;SA4GzB,CAAC"}
|
|
@@ -13,12 +13,6 @@ export const StyledPopoverArrow = styled.div `
|
|
|
13
13
|
}
|
|
14
14
|
`;
|
|
15
15
|
StyledPopoverArrow.defaultProps = defaultThemeProp;
|
|
16
|
-
export const StyledPopoverContent = styled.div `
|
|
17
|
-
max-width: inherit;
|
|
18
|
-
max-height: inherit;
|
|
19
|
-
border-radius: inherit;
|
|
20
|
-
overflow: auto;
|
|
21
|
-
`;
|
|
22
16
|
export const StyledPopover = styled.div(({ theme: { base: { 'border-radius': borderRadius, 'z-index': { popover: zIndex }, shadow: { low } }, components: { card: { background }, 'form-control': { 'border-radius': formControlBorderRadius } } }, offset }) => {
|
|
23
17
|
return css `
|
|
24
18
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.styles.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;CAW3C,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Popover.styles.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;CAW3C,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CACrC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,eAAe,EAAE,YAAY,EAC7B,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAC9B,MAAM,EAAE,EAAE,GAAG,EAAE,EAChB,EACD,UAAU,EAAE,EACV,IAAI,EAAE,EAAE,UAAU,EAAE,EACpB,cAAc,EAAE,EAAE,eAAe,EAAE,uBAAuB,EAAE,EAC7D,EACF,EACD,MAAM,EACP,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;;;;;iBAMG,MAAM;0BACG,UAAU;4BACR,uBAAuB,MAAM,YAAY;oBACjD,GAAG;;;;;;;;YAQX,kBAAkB;;;;+CAIiB,YAAY;;;;;;;oBAOvC,MAAM;qBACL,MAAM;;;;;;;YAOf,kBAAkB;;;;2CAIa,YAAY;;;;;;;oBAOnC,MAAM;kBACR,MAAM;;;;;;;YAOZ,kBAAkB;;;;8CAIgB,YAAY;;;;;;;mBAOvC,MAAM;mBACN,MAAM;;;;;;;YAOb,kBAAkB;;;;4CAIc,YAAY;;;;;;;mBAOrC,MAAM;oBACL,MAAM;;;;;KAKrB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\n\nexport const StyledPopoverArrow = styled.div`\n background-color: inherit;\n\n ::before {\n content: '';\n display: block;\n position: absolute;\n inset: -0.25rem;\n background-color: inherit;\n transform: rotate(45deg);\n }\n`;\n\nStyledPopoverArrow.defaultProps = defaultThemeProp;\n\nexport const StyledPopover = styled.div<{ offset?: number }>(\n ({\n theme: {\n base: {\n 'border-radius': borderRadius,\n 'z-index': { popover: zIndex },\n shadow: { low }\n },\n components: {\n card: { background },\n 'form-control': { 'border-radius': formControlBorderRadius }\n }\n },\n offset\n }) => {\n return css`\n /*\n Margin should never be used with Popper.\n https://popper.js.org/docs/v2/migration-guide/#4-remove-all-css-margins\n */\n margin: 0 !important;\n z-index: ${zIndex};\n background-color: ${background};\n border-radius: calc(${formControlBorderRadius} * ${borderRadius});\n box-shadow: ${low};\n\n &[data-popper-reference-hidden='true'] {\n visibility: hidden;\n pointer-events: none;\n }\n\n &[data-popper-placement^='top'] {\n > ${StyledPopoverArrow} {\n top: calc(100%);\n\n ::before {\n border-bottom-right-radius: calc(${borderRadius} / 4);\n }\n }\n\n ::before {\n content: '';\n position: absolute;\n height: ${offset}px;\n bottom: -${offset}px;\n left: 0;\n right: 0;\n }\n }\n\n &[data-popper-placement^='bottom'] {\n > ${StyledPopoverArrow} {\n bottom: calc(100%);\n\n ::before {\n border-top-left-radius: calc(${borderRadius} / 4);\n }\n }\n\n ::before {\n content: '';\n position: absolute;\n height: ${offset}px;\n top: -${offset}px;\n left: 0;\n right: 0;\n }\n }\n\n &[data-popper-placement^='right'] {\n > ${StyledPopoverArrow} {\n right: calc(100%);\n\n ::before {\n border-bottom-left-radius: calc(${borderRadius} / 4);\n }\n }\n\n ::before {\n content: '';\n position: absolute;\n width: ${offset}px;\n left: -${offset}px;\n top: 0;\n bottom: 0;\n }\n }\n\n &[data-popper-placement^='left'] {\n > ${StyledPopoverArrow} {\n left: calc(100%);\n\n ::before {\n border-top-right-radius: calc(${borderRadius} / 4);\n }\n }\n\n ::before {\n content: '';\n position: absolute;\n width: ${offset}px;\n right: -${offset}px;\n top: 0;\n bottom: 0;\n }\n }\n `;\n }\n);\n\nStyledPopover.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { Modifier } from '@popperjs/core';
|
|
2
2
|
export declare const sameWidth: Modifier<'sameWidth', object>;
|
|
3
|
-
export declare const maxSize: Modifier<'maxSize', object>;
|
|
4
|
-
export declare const applyMaxSize: Modifier<'applyMaxSize', object>;
|
|
5
3
|
//# sourceMappingURL=modifiers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAQlD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// taken from https://codesandbox.io/s/bitter-sky-pe3z9?file=/src/index.js
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
3
2
|
export const sameWidth = Object.freeze({
|
|
4
3
|
name: 'sameWidth',
|
|
5
4
|
enabled: true,
|
|
@@ -9,34 +8,4 @@ export const sameWidth = Object.freeze({
|
|
|
9
8
|
},
|
|
10
9
|
requires: ['computeStyles']
|
|
11
10
|
});
|
|
12
|
-
// taken from https://github.com/atomiks/popper.js/blob/master/src/modifiers/maxSize.js
|
|
13
|
-
export const maxSize = Object.freeze({
|
|
14
|
-
name: 'maxSize',
|
|
15
|
-
enabled: true,
|
|
16
|
-
phase: 'main',
|
|
17
|
-
requiresIfExists: ['offset', 'preventOverflow', 'flip'],
|
|
18
|
-
fn({ state, name, options }) {
|
|
19
|
-
const overflow = detectOverflow(state, options);
|
|
20
|
-
const { x, y } = state.modifiersData.preventOverflow || { x: 0, y: 0 };
|
|
21
|
-
const { width, height } = state.rects.popper;
|
|
22
|
-
const [basePlacement] = state.placement.split('-');
|
|
23
|
-
const widthProp = basePlacement === 'left' ? 'left' : 'right';
|
|
24
|
-
const heightProp = basePlacement === 'top' ? 'top' : 'bottom';
|
|
25
|
-
state.modifiersData[name] = {
|
|
26
|
-
width: width - overflow[widthProp] - x,
|
|
27
|
-
height: height - overflow[heightProp] - y
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
// taken from https://codesandbox.io/s/great-tesla-3roz7?file=/src/index.js
|
|
32
|
-
export const applyMaxSize = Object.freeze({
|
|
33
|
-
name: 'applyMaxSize',
|
|
34
|
-
enabled: true,
|
|
35
|
-
phase: 'beforeWrite',
|
|
36
|
-
requires: ['maxSize'],
|
|
37
|
-
fn({ state }) {
|
|
38
|
-
const { height } = state.modifiersData.maxSize;
|
|
39
|
-
state.styles.popper.maxHeight = `${height}px`;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
11
|
//# sourceMappingURL=modifiers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifiers.js","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modifiers.js","sourceRoot":"","sources":["../../../src/components/Popover/modifiers.ts"],"names":[],"mappings":"AAEA,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAkC,MAAM,CAAC,MAAM,CAAC;IACpE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,aAAa;IACpB,EAAE,CAAC,EAAE,KAAK,EAAE;QACV,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,CAAC,eAAe,CAAC;CAC5B,CAAC,CAAC","sourcesContent":["import { Modifier } from '@popperjs/core';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const sameWidth: Modifier<'sameWidth', object> = Object.freeze({\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n fn({ state }) {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n requires: ['computeStyles']\n});\n"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ForwardProps } from '../../types';
|
|
3
3
|
import { ProgressProps } from './Progress.types';
|
|
4
|
-
export declare const StyledProgressBar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ProgressProps & {
|
|
5
|
-
determinate: boolean;
|
|
6
|
-
}, never>;
|
|
7
4
|
declare const Bar: FC<ProgressProps & ForwardProps>;
|
|
8
5
|
export default Bar;
|
|
9
6
|
//# sourceMappingURL=Bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA8C,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,GAAG,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAmCzC,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -1,59 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { defaultThemeProp } from '../../theme';
|
|
5
|
-
export const StyledProgressBar = styled.div(({ theme, placement, determinate }) => {
|
|
6
|
-
return css `
|
|
7
|
-
height: 0.375rem;
|
|
8
|
-
background-color: ${theme.base.colors.gray['extra-light']};
|
|
9
|
-
border-radius: ${theme.base['border-radius']};
|
|
10
|
-
min-width: 2rem;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
|
|
13
|
-
@keyframes LoadingBar {
|
|
14
|
-
0% {
|
|
15
|
-
transform: translateX(-100%);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
100% {
|
|
19
|
-
transform: translateX(200%);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
::before {
|
|
24
|
-
content: '';
|
|
25
|
-
display: block;
|
|
26
|
-
height: 100%;
|
|
27
|
-
width: 100%;
|
|
28
|
-
left: 0;
|
|
29
|
-
border-radius: ${theme.base['border-radius']};
|
|
30
|
-
background-color: ${theme.components.progress['progress-color']};
|
|
31
|
-
${determinate &&
|
|
32
|
-
css `
|
|
33
|
-
transform: translateX(var(--progress, 0));
|
|
34
|
-
transform-origin: 0 50%;
|
|
35
|
-
transition: transform calc(0.5 * ${theme.base.animation.speed})
|
|
36
|
-
${theme.base.animation.timing.ease};
|
|
37
|
-
`}
|
|
38
|
-
|
|
39
|
-
${!determinate &&
|
|
40
|
-
css `
|
|
41
|
-
animation: LoadingBar calc(8 * ${theme.base.animation.speed}) linear infinite;
|
|
42
|
-
width: 50%;
|
|
43
|
-
`}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
${placement === 'inline'
|
|
47
|
-
? css `
|
|
48
|
-
display: inline-block;
|
|
49
|
-
position: relative;
|
|
50
|
-
`
|
|
51
|
-
: css `
|
|
52
|
-
width: 50%;
|
|
53
|
-
`}
|
|
54
|
-
`;
|
|
55
|
-
});
|
|
56
|
-
StyledProgressBar.defaultProps = defaultThemeProp;
|
|
3
|
+
import { StyledProgressBar } from './Progress.styles';
|
|
57
4
|
const Bar = forwardRef(({ value, minValue = 0, maxValue = 100, message, placement, style, ...restProps }, ref) => {
|
|
58
5
|
let percentage = value;
|
|
59
6
|
if (typeof value === 'number') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.js","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Bar.js","sourceRoot":"","sources":["../../../src/components/Progress/Bar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAkC,MAAM,OAAO,CAAC;AAIvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,GAAG,GAAqC,UAAU,CACtD,CACE,EACE,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,GAAG,EACd,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EAC+C,EAC7D,GAAyB,EACzB,EAAE;IACF,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,IAAI,KAAK,GAAG,QAAQ,IAAI,QAAQ,GAAG,QAAQ;YAAE,UAAU,GAAG,CAAC,CAAC;aACvD,IAAI,KAAK,GAAG,QAAQ;YAAE,UAAU,GAAG,GAAG,CAAC;;YACvC,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;KAC3E;IAED,OAAO,CACL,KAAC,iBAAiB,IAChB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,aAAa,mBACH,QAAQ,mBACR,QAAQ,mBACR,KAAK,EACpB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,KAAK,KAAK,QAAQ,EACtC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,EAAmB,KAClF,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef, CSSProperties } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport { StyledProgressBar } from './Progress.styles';\nimport { ProgressProps } from './Progress.types';\n\nconst Bar: FC<ProgressProps & ForwardProps> = forwardRef(\n (\n {\n value,\n minValue = 0,\n maxValue = 100,\n message,\n placement,\n style,\n ...restProps\n }: PropsWithoutRef<ProgressProps & { style?: CSSProperties }>,\n ref: ProgressProps['ref']\n ) => {\n let percentage = value;\n\n if (typeof value === 'number') {\n if (value > maxValue || minValue > maxValue) percentage = 0;\n else if (value < minValue) percentage = 100;\n else percentage = (1 - (value - minValue) / (maxValue - minValue)) * -100;\n }\n\n return (\n <StyledProgressBar\n ref={ref}\n role='progressbar'\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n aria-valuenow={value}\n placement={placement}\n determinate={typeof value === 'number'}\n style={{ ...style, '--progress': percentage ? `${percentage}%` : '' } as CSSProperties}\n {...restProps}\n />\n );\n }\n);\n\nexport default Bar;\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ForwardProps } from '../../types';
|
|
3
3
|
import { ProgressProps } from './Progress.types';
|
|
4
|
-
export declare const StyledProgressEllipsis: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<ProgressProps, "placement">, never>;
|
|
5
4
|
declare const Ellipsis: FC<ProgressProps & ForwardProps>;
|
|
6
5
|
export default Ellipsis;
|
|
7
6
|
//# sourceMappingURL=Ellipsis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ellipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Ellipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CAe9C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,77 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { defaultThemeProp } from '../../theme';
|
|
5
|
-
export const StyledProgressEllipsis = styled.div(({ theme, placement }) => {
|
|
6
|
-
return css `
|
|
7
|
-
line-height: 1;
|
|
8
|
-
display: ${placement === 'inline' ? 'inline-flex' : 'block'};
|
|
9
|
-
|
|
10
|
-
@keyframes LoadingEllipsis {
|
|
11
|
-
0% {
|
|
12
|
-
transform: scale(0);
|
|
13
|
-
opacity: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
50% {
|
|
17
|
-
transform: scale(1);
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
100% {
|
|
22
|
-
transform: scale(0);
|
|
23
|
-
opacity: 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
> span {
|
|
28
|
-
display: flex;
|
|
29
|
-
mix-blend-mode: multiply;
|
|
30
|
-
|
|
31
|
-
${placement === 'inline' &&
|
|
32
|
-
css `
|
|
33
|
-
display: inline-flex;
|
|
34
|
-
margin-left: 0.1875rem;
|
|
35
|
-
`}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
> span span {
|
|
39
|
-
margin: 0 0.3125rem;
|
|
40
|
-
background: ${theme.components.progress['progress-color']};
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
animation: LoadingEllipsis calc(4 * ${theme.base.animation.speed}) infinite;
|
|
43
|
-
|
|
44
|
-
${placement === 'global' &&
|
|
45
|
-
css `
|
|
46
|
-
width: 1.25rem;
|
|
47
|
-
height: 1.25rem;
|
|
48
|
-
`}
|
|
49
|
-
|
|
50
|
-
${placement === 'local' &&
|
|
51
|
-
css `
|
|
52
|
-
width: 0.625rem;
|
|
53
|
-
height: 0.625rem;
|
|
54
|
-
`}
|
|
55
|
-
|
|
56
|
-
${placement === 'inline' &&
|
|
57
|
-
css `
|
|
58
|
-
width: 0.1875rem;
|
|
59
|
-
height: 0.1875rem;
|
|
60
|
-
margin: 0 0.1875rem;
|
|
61
|
-
animation-duration: calc(4 * ${theme.base.animation.speed});
|
|
62
|
-
`}
|
|
63
|
-
|
|
64
|
-
&:nth-child(2) {
|
|
65
|
-
animation-delay: 0.1667s;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:nth-child(3) {
|
|
69
|
-
animation-delay: ${0.1667 * 2}s;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
});
|
|
74
|
-
StyledProgressEllipsis.defaultProps = defaultThemeProp;
|
|
3
|
+
import { StyledProgressEllipsis } from './Progress.styles';
|
|
75
4
|
const Ellipsis = forwardRef(({ message, placement, ...restProps }, ref) => {
|
|
76
5
|
return (_jsx(StyledProgressEllipsis, { ref: ref, role: 'progressbar', placement: placement, ...restProps, children: _jsxs("span", { children: [_jsx("span", {}), _jsx("span", {}), _jsx("span", {})] }) }));
|
|
77
6
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ellipsis.js","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Ellipsis.js","sourceRoot":"","sources":["../../../src/components/Progress/Ellipsis.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAmB,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,QAAQ,GAAqC,UAAU,CAC3D,CACE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAkC,EACpE,GAAyB,EACzB,EAAE;IACF,OAAO,CACL,KAAC,sBAAsB,IAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,SAAS,KAAM,SAAS,YACtF,2BACE,gBAAQ,EACR,gBAAQ,EACR,gBAAQ,IACH,GACgB,CAC1B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef } from 'react';\n\nimport { ForwardProps } from '../../types';\n\nimport { StyledProgressEllipsis } from './Progress.styles';\nimport { ProgressProps } from './Progress.types';\n\nconst Ellipsis: FC<ProgressProps & ForwardProps> = forwardRef(\n (\n { message, placement, ...restProps }: PropsWithoutRef<ProgressProps>,\n ref: ProgressProps['ref']\n ) => {\n return (\n <StyledProgressEllipsis ref={ref} role='progressbar' placement={placement} {...restProps}>\n <span>\n <span />\n <span />\n <span />\n </span>\n </StyledProgressEllipsis>\n );\n }\n);\n\nexport default Ellipsis;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,EAAE,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAejD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,GAAG,YAAY,CA+K9C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|