@pega/cosmos-react-core 10.0.0-build.1.8 → 10.0.0-build.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/AIButton/AIButton.d.ts +3 -3
- package/lib/components/AIButton/AIButton.d.ts.map +1 -1
- package/lib/components/AIButton/AIButton.js +2 -1
- package/lib/components/AIButton/AIButton.js.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.d.ts +1 -1
- package/lib/components/AIRewrite/AIRewrite.d.ts.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.js +7 -3
- package/lib/components/AIRewrite/AIRewrite.js.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.styles.d.ts +43 -7
- package/lib/components/AIRewrite/AIRewrite.styles.d.ts.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.styles.js +5 -2
- package/lib/components/AIRewrite/AIRewrite.styles.js.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.types.d.ts +2 -0
- package/lib/components/AIRewrite/AIRewrite.types.d.ts.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.types.js.map +1 -1
- package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +90 -9
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.d.ts +6 -2
- package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.js +89 -56
- package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
- package/lib/components/AppShell/AppNavigationPanel.d.ts.map +1 -1
- package/lib/components/AppShell/AppNavigationPanel.js +16 -7
- package/lib/components/AppShell/AppNavigationPanel.js.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts +3 -2
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +134 -177
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +20 -15
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +145 -211
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +117 -2
- 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 +3 -0
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js +1 -0
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.d.ts +2 -0
- package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.js +8 -4
- 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 +63 -23
- package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
- package/lib/components/AppShell/AppTopNav.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppTopNav.styles.js +6 -2
- package/lib/components/AppShell/AppTopNav.styles.js.map +1 -1
- package/lib/components/AppShell/DocumentTabs.d.ts +6 -0
- package/lib/components/AppShell/DocumentTabs.d.ts.map +1 -0
- package/lib/components/AppShell/DocumentTabs.js +409 -0
- package/lib/components/AppShell/DocumentTabs.js.map +1 -0
- package/lib/components/AppShell/DocumentTabs.styles.d.ts +231 -0
- package/lib/components/AppShell/DocumentTabs.styles.d.ts.map +1 -0
- package/lib/components/AppShell/DocumentTabs.styles.js +564 -0
- package/lib/components/AppShell/DocumentTabs.styles.js.map +1 -0
- package/lib/components/AppShell/Drawer.d.ts +1 -2
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +4 -4
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/AppShell/Drawer.styles.d.ts +1 -13
- package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.styles.js +15 -31
- package/lib/components/AppShell/Drawer.styles.js.map +1 -1
- package/lib/components/AppShell/HeaderActionButton.d.ts +20 -0
- package/lib/components/AppShell/HeaderActionButton.d.ts.map +1 -0
- package/lib/components/AppShell/HeaderActionButton.js +78 -0
- package/lib/components/AppShell/HeaderActionButton.js.map +1 -0
- package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationList.js +4 -5
- 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 +101 -58
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/AppShell/Notifications.d.ts +28 -0
- package/lib/components/AppShell/Notifications.d.ts.map +1 -0
- package/lib/components/AppShell/Notifications.js +145 -0
- package/lib/components/AppShell/Notifications.js.map +1 -0
- package/lib/components/AppShell/Operator.d.ts.map +1 -1
- package/lib/components/AppShell/Operator.js +8 -5
- package/lib/components/AppShell/Operator.js.map +1 -1
- package/lib/components/AppShell/Panel/Panel.d.ts +15 -0
- package/lib/components/AppShell/Panel/Panel.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/Panel.js +80 -0
- package/lib/components/AppShell/Panel/Panel.js.map +1 -0
- package/lib/components/AppShell/Panel/Panel.styles.d.ts +188 -0
- package/lib/components/AppShell/Panel/Panel.styles.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/Panel.styles.js +85 -0
- package/lib/components/AppShell/Panel/Panel.styles.js.map +1 -0
- package/lib/components/AppShell/Panel/Panel.test-ids.d.ts +2 -0
- package/lib/components/AppShell/Panel/Panel.test-ids.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/Panel.test-ids.js +3 -0
- package/lib/components/AppShell/Panel/Panel.test-ids.js.map +1 -0
- package/lib/components/AppShell/Panel/Panel.types.d.ts +33 -0
- package/lib/components/AppShell/Panel/Panel.types.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/Panel.types.js +2 -0
- package/lib/components/AppShell/Panel/Panel.types.js.map +1 -0
- package/lib/components/AppShell/Panel/PanelHeaderActions.d.ts +8 -0
- package/lib/components/AppShell/Panel/PanelHeaderActions.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/PanelHeaderActions.js +17 -0
- package/lib/components/AppShell/Panel/PanelHeaderActions.js.map +1 -0
- package/lib/components/AppShell/Panel/index.d.ts +4 -0
- package/lib/components/AppShell/Panel/index.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/index.js +4 -0
- package/lib/components/AppShell/Panel/index.js.map +1 -0
- package/lib/components/AppShell/Panel/usePanel.d.ts +12 -0
- package/lib/components/AppShell/Panel/usePanel.d.ts.map +1 -0
- package/lib/components/AppShell/Panel/usePanel.js +30 -0
- package/lib/components/AppShell/Panel/usePanel.js.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.d.ts +1 -1
- package/lib/components/AppShell/ThemeSwitcher.d.ts.map +1 -1
- package/lib/components/AppShell/ThemeSwitcher.js +1 -0
- package/lib/components/AppShell/ThemeSwitcher.js.map +1 -1
- package/lib/components/AppShell/TopNavDrawerProvider.d.ts +11 -0
- package/lib/components/AppShell/TopNavDrawerProvider.d.ts.map +1 -0
- package/lib/components/AppShell/TopNavDrawerProvider.js +43 -0
- package/lib/components/AppShell/TopNavDrawerProvider.js.map +1 -0
- package/lib/components/AppShell/TouchAppShell.d.ts +16 -0
- package/lib/components/AppShell/TouchAppShell.d.ts.map +1 -0
- package/lib/components/AppShell/TouchAppShell.js +161 -0
- package/lib/components/AppShell/TouchAppShell.js.map +1 -0
- package/lib/components/AppShell/TouchAppShell.styles.d.ts +209 -0
- package/lib/components/AppShell/TouchAppShell.styles.d.ts.map +1 -0
- package/lib/components/AppShell/TouchAppShell.styles.js +188 -0
- package/lib/components/AppShell/TouchAppShell.styles.js.map +1 -0
- package/lib/components/AppShell/headerActionUtils.d.ts +12 -0
- package/lib/components/AppShell/headerActionUtils.d.ts.map +1 -0
- package/lib/components/AppShell/headerActionUtils.js +69 -0
- package/lib/components/AppShell/headerActionUtils.js.map +1 -0
- 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.map +1 -1
- package/lib/components/AppShell/style-utils.d.ts.map +1 -1
- package/lib/components/AppShell/style-utils.js +22 -9
- package/lib/components/AppShell/style-utils.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +4 -4
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +45 -41
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Backdrop/Backdrop.d.ts +30 -30
- package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.js +3 -2
- package/lib/components/Backdrop/Backdrop.js.map +1 -1
- package/lib/components/Badges/Alert.d.ts +1 -1
- package/lib/components/Badges/Count.d.ts +1 -1
- package/lib/components/Badges/Keyboard.d.ts +1 -1
- package/lib/components/Badges/Selection.d.ts +1 -1
- package/lib/components/Badges/Selection.js +1 -1
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Badges/Status.d.ts +1 -1
- package/lib/components/Badges/Tag.d.ts +1 -1
- package/lib/components/Banner/Banner.d.ts +1 -1
- package/lib/components/Banner/Banner.js +1 -5
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/Banner.styles.d.ts +2 -2
- package/lib/components/Banner/Banner.styles.d.ts.map +1 -1
- package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
- package/lib/components/Button/BareRoleButton.js +4 -1
- package/lib/components/Button/BareRoleButton.js.map +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +67 -25
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/lib/components/Checkbox/CheckboxCard.d.ts +1 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts.map +1 -1
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js +5 -32
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +5 -8
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.js +11 -6
- package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts +3 -3
- package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.d.ts +1 -2
- package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +2 -2
- package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +4 -6
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +99 -188
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts +190 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts.map +1 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js +72 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js.map +1 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +5 -7
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +29 -10
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +5 -5
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +18 -3
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +3 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.d.ts +1 -1
- package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyDisplay.js +13 -5
- package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +21 -14
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/Currency/utils.d.ts +8 -0
- package/lib/components/Currency/utils.d.ts.map +1 -1
- package/lib/components/Currency/utils.js +34 -4
- package/lib/components/Currency/utils.js.map +1 -1
- package/lib/components/DangerButton/DangerButton.d.ts +2 -2
- package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
- package/lib/components/DangerButton/DangerButton.js +8 -1
- package/lib/components/DangerButton/DangerButton.js.map +1 -1
- package/lib/components/DateTime/DateTime.types.d.ts +2 -4
- 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/DateTimeDisplay.d.ts +9 -2
- package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
- package/lib/components/DateTime/DateTimeDisplay.js +34 -8
- package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts +3 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +36 -21
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts +12 -4
- package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +28 -7
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts +3 -0
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +26 -2
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts +15 -3
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +164 -53
- 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/Duration/DurationInput.d.ts +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +4 -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 +3 -2
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +4 -4
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts +13 -4
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +67 -33
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts +12 -4
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +28 -10
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts +7 -4
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +31 -18
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +10 -1
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +115 -5
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.js +2 -6
- package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.js +5 -0
- package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.js +37 -7
- package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js +25 -47
- package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts +15 -4
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +24 -3
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.d.ts +60 -20
- package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
- package/lib/components/Dialog/FormDialog.js +76 -42
- package/lib/components/Dialog/FormDialog.js.map +1 -1
- package/lib/components/Dialog/FormDialogWrapper.d.ts +5 -0
- package/lib/components/Dialog/FormDialogWrapper.d.ts.map +1 -0
- package/lib/components/Dialog/FormDialogWrapper.js +13 -0
- package/lib/components/Dialog/FormDialogWrapper.js.map +1 -0
- package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
- package/lib/components/Dialog/InfoDialog.js +6 -4
- package/lib/components/Dialog/InfoDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialogWrapper.d.ts +4 -0
- package/lib/components/Dialog/InfoDialogWrapper.d.ts.map +1 -0
- package/lib/components/Dialog/InfoDialogWrapper.js +13 -0
- package/lib/components/Dialog/InfoDialogWrapper.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.d.ts +5 -0
- package/lib/components/Dialog/TouchDialog.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.js +120 -0
- package/lib/components/Dialog/TouchDialog.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.styles.d.ts +14 -0
- package/lib/components/Dialog/TouchDialog.styles.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.styles.js +79 -0
- package/lib/components/Dialog/TouchDialog.styles.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.test-ids.d.ts +2 -0
- package/lib/components/Dialog/TouchDialog.test-ids.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.test-ids.js +3 -0
- package/lib/components/Dialog/TouchDialog.test-ids.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.types.d.ts +57 -0
- package/lib/components/Dialog/TouchDialog.types.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.types.js +2 -0
- package/lib/components/Dialog/TouchDialog.types.js.map +1 -0
- package/lib/components/Dialog/TouchFormDialog.d.ts +5 -0
- package/lib/components/Dialog/TouchFormDialog.d.ts.map +1 -0
- package/lib/components/Dialog/TouchFormDialog.js +53 -0
- package/lib/components/Dialog/TouchFormDialog.js.map +1 -0
- package/lib/components/Dialog/TouchFormDialog.styles.d.ts +7 -0
- package/lib/components/Dialog/TouchFormDialog.styles.d.ts.map +1 -0
- package/lib/components/Dialog/TouchFormDialog.styles.js +39 -0
- package/lib/components/Dialog/TouchFormDialog.styles.js.map +1 -0
- package/lib/components/Dialog/TouchInfoDialog.d.ts +4 -0
- package/lib/components/Dialog/TouchInfoDialog.d.ts.map +1 -0
- package/lib/components/Dialog/TouchInfoDialog.js +21 -0
- package/lib/components/Dialog/TouchInfoDialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +6 -2
- package/lib/components/Dialog/index.d.ts.map +1 -1
- package/lib/components/Dialog/index.js +5 -2
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/Drawer/Drawer.d.ts +12 -1
- package/lib/components/Drawer/Drawer.d.ts.map +1 -1
- package/lib/components/Drawer/Drawer.js +22 -23
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/Drawer/ResizeHandle.d.ts +9 -2
- package/lib/components/Drawer/ResizeHandle.d.ts.map +1 -1
- package/lib/components/Drawer/ResizeHandle.js +44 -20
- package/lib/components/Drawer/ResizeHandle.js.map +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts.map +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.js +2 -2
- package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
- package/lib/components/EmptyState/EmptyState.d.ts +7 -2
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/EmptyState/EmptyState.js +18 -11
- package/lib/components/EmptyState/EmptyState.js.map +1 -1
- package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts +2 -2
- package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts +69 -64
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +41 -41
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +2 -2
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +5 -3
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +17 -8
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/File/CompactList.js +1 -1
- package/lib/components/File/CompactList.js.map +1 -1
- package/lib/components/File/FileInput.d.ts +1 -1
- package/lib/components/File/FileInput.styles.js +1 -1
- package/lib/components/File/FileInput.styles.js.map +1 -1
- package/lib/components/File/FileItem.d.ts +40 -2
- package/lib/components/File/FileItem.d.ts.map +1 -1
- package/lib/components/File/FileItem.js +167 -23
- package/lib/components/File/FileItem.js.map +1 -1
- package/lib/components/File/FileList.d.ts +29 -29
- package/lib/components/File/FileList.d.ts.map +1 -1
- package/lib/components/File/FileList.js +6 -2
- package/lib/components/File/FileList.js.map +1 -1
- package/lib/components/File/FileUploadItem.js +1 -3
- package/lib/components/File/FileUploadItem.js.map +1 -1
- package/lib/components/File/FileVisual.js +1 -1
- package/lib/components/File/FileVisual.js.map +1 -1
- package/lib/components/File/index.d.ts +1 -1
- package/lib/components/File/index.d.ts.map +1 -1
- package/lib/components/File/index.js.map +1 -1
- package/lib/components/File/mimeTypes.json +1 -0
- package/lib/components/Form/Form.d.ts +1 -1
- package/lib/components/FormControl/FormControl.d.ts +10 -3
- package/lib/components/FormControl/FormControl.d.ts.map +1 -1
- package/lib/components/FormControl/FormControl.js +2 -11
- package/lib/components/FormControl/FormControl.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts +10 -2
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +57 -58
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.d.ts +1 -1
- package/lib/components/Fullscreen/Fullscreen.js +2 -2
- package/lib/components/Fullscreen/Fullscreen.js.map +1 -1
- package/lib/components/Fullscreen/FullscreenButton.d.ts +2 -2
- package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -1
- package/lib/components/HTML/HTML.d.ts +1 -1
- package/lib/components/Icon/Icon.d.ts +5 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +46 -4
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +2 -1
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +3 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/search-solid.icon.d.ts +1 -1
- package/lib/components/Icon/icons/search-solid.icon.js +3 -3
- package/lib/components/Icon/icons/search-solid.icon.js.map +1 -1
- package/lib/components/Icon/icons/share-external-solid.icon.d.ts +5 -0
- package/lib/components/Icon/icons/share-external-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/share-external-solid.icon.js +7 -0
- package/lib/components/Icon/icons/share-external-solid.icon.js.map +1 -0
- package/lib/components/Icon/icons/share-external.icon.d.ts +5 -0
- package/lib/components/Icon/icons/share-external.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/share-external.icon.js +7 -0
- package/lib/components/Icon/icons/share-external.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-external-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-external-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-external-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-external-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-external.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-external.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-external.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-external.icon.js.map +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts +2 -1
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +3 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/InlineEdit/InlineEdit.d.ts +19 -4
- package/lib/components/InlineEdit/InlineEdit.d.ts.map +1 -1
- package/lib/components/InlineEdit/InlineEdit.js +45 -4
- package/lib/components/InlineEdit/InlineEdit.js.map +1 -1
- package/lib/components/InlineEdit/InlineEdit.styles.d.ts +43 -7
- package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -1
- package/lib/components/InlineEdit/InlineEdit.styles.js +38 -20
- package/lib/components/InlineEdit/InlineEdit.styles.js.map +1 -1
- package/lib/components/Input/Input.d.ts +1 -1
- package/lib/components/Input/Input.js +3 -3
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.js +2 -6
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.js +1 -0
- package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
- package/lib/components/Link/Link.d.ts +20 -17
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +89 -9
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/Link.test-ids.d.ts +1 -1
- package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
- package/lib/components/Link/Link.test-ids.js +2 -1
- package/lib/components/Link/Link.test-ids.js.map +1 -1
- package/lib/components/List/CommaSeparatedList.js +1 -3
- package/lib/components/List/CommaSeparatedList.js.map +1 -1
- package/lib/components/List/List.js +1 -5
- package/lib/components/List/List.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +93 -81
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +821 -40
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +341 -83
- package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +2 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.js +16 -5
- package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts +2 -2
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
- package/lib/components/Menu/FlyoutMenuList.js +1 -1
- package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +12 -4
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +6 -0
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.test-ids.d.ts +1 -1
- package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
- package/lib/components/Menu/Menu.test-ids.js +1 -1
- package/lib/components/Menu/Menu.test-ids.js.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +9 -0
- 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/MenuItem.d.ts +1 -1
- package/lib/components/Menu/helpers.d.ts +14 -0
- package/lib/components/Menu/helpers.d.ts.map +1 -1
- package/lib/components/Menu/helpers.js +26 -0
- package/lib/components/Menu/helpers.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +47 -7
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MetaList/MetaList.d.ts +1 -1
- package/lib/components/Modal/DockedModals.d.ts.map +1 -1
- package/lib/components/Modal/DockedModals.js +4 -3
- package/lib/components/Modal/DockedModals.js.map +1 -1
- package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
- package/lib/components/Modal/MinimizedModal.js +4 -0
- package/lib/components/Modal/MinimizedModal.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +7 -3
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts +25 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.js +168 -5
- package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.js +48 -22
- package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts +29 -29
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +2 -2
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +5 -0
- package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
- package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.js +45 -20
- package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts.map +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.js +17 -9
- package/lib/components/MultiStepForm/useFormProgressOverflow.js.map +1 -1
- package/lib/components/Number/NumberDisplay.d.ts +5 -0
- package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
- package/lib/components/Number/NumberDisplay.js +3 -2
- package/lib/components/Number/NumberDisplay.js.map +1 -1
- package/lib/components/Number/NumberInput.d.ts +1 -1
- package/lib/components/Number/NumberInput.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.js +10 -5
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/NumberInput.types.d.ts +11 -3
- 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 +1 -1
- package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
- package/lib/components/Number/NumberRangeInput.js +2 -2
- package/lib/components/Number/NumberRangeInput.js.map +1 -1
- package/lib/components/Number/utils.d.ts +3 -1
- package/lib/components/Number/utils.d.ts.map +1 -1
- package/lib/components/Number/utils.js +11 -9
- package/lib/components/Number/utils.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.js +2 -2
- package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.js +1 -1
- package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js +44 -10
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js +2 -9
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +7 -7
- package/lib/components/PageTemplates/PageTemplates.js +1 -1
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Phone/PhoneDisplay.d.ts +10 -0
- package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
- package/lib/components/Phone/PhoneDisplay.js +7 -2
- package/lib/components/Phone/PhoneDisplay.js.map +1 -1
- package/lib/components/Phone/PhoneInput.d.ts +11 -1
- package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
- package/lib/components/Phone/PhoneInput.js +21 -8
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Phone/utils.d.ts +4 -2
- package/lib/components/Phone/utils.d.ts.map +1 -1
- package/lib/components/Phone/utils.js +17 -6
- package/lib/components/Phone/utils.js.map +1 -1
- package/lib/components/Popover/getResolvedTarget.d.ts +11 -0
- package/lib/components/Popover/getResolvedTarget.d.ts.map +1 -0
- package/lib/components/Popover/getResolvedTarget.js +13 -0
- package/lib/components/Popover/getResolvedTarget.js.map +1 -0
- package/lib/components/Popover/index.d.ts +1 -0
- package/lib/components/Popover/index.d.ts.map +1 -1
- package/lib/components/Popover/index.js +1 -0
- package/lib/components/Popover/index.js.map +1 -1
- package/lib/components/Preview/Preview.types.d.ts +1 -0
- package/lib/components/Preview/Preview.types.d.ts.map +1 -1
- package/lib/components/Preview/Preview.types.js.map +1 -1
- package/lib/components/Preview/PreviewManager.d.ts.map +1 -1
- package/lib/components/Preview/PreviewManager.js +10 -1
- package/lib/components/Preview/PreviewManager.js.map +1 -1
- package/lib/components/Preview/PreviewPanel.d.ts.map +1 -1
- package/lib/components/Preview/PreviewPanel.js +8 -3
- package/lib/components/Preview/PreviewPanel.js.map +1 -1
- package/lib/components/Progress/Progress.d.ts.map +1 -1
- package/lib/components/Progress/Progress.js +39 -7
- package/lib/components/Progress/Progress.js.map +1 -1
- package/lib/components/Progress/Progress.types.d.ts +10 -4
- package/lib/components/Progress/Progress.types.d.ts.map +1 -1
- package/lib/components/Progress/Progress.types.js.map +1 -1
- package/lib/components/QRCode/QRCode.d.ts +6 -1
- package/lib/components/QRCode/QRCode.d.ts.map +1 -1
- package/lib/components/QRCode/QRCode.js +17 -9
- package/lib/components/QRCode/QRCode.js.map +1 -1
- package/lib/components/QRCode/index.d.ts +1 -1
- package/lib/components/QRCode/index.d.ts.map +1 -1
- package/lib/components/QRCode/index.js.map +1 -1
- package/lib/components/RadioButton/RadioButton.d.ts +1 -1
- package/lib/components/RadioButton/RadioButtonCard.d.ts +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/lib/components/RadioCheck/RadioCheck.d.ts +5 -3
- package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.js +63 -27
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +3 -3
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +46 -25
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/ResponsiveActions/ResponsiveActions.d.ts.map +1 -1
- package/lib/components/ResponsiveActions/ResponsiveActions.js +1 -0
- package/lib/components/ResponsiveActions/ResponsiveActions.js.map +1 -1
- package/lib/components/Scanner/Scanner.d.ts +21 -0
- package/lib/components/Scanner/Scanner.d.ts.map +1 -0
- package/lib/components/Scanner/Scanner.js +177 -0
- package/lib/components/Scanner/Scanner.js.map +1 -0
- package/lib/components/Scanner/Scanner.styles.d.ts +4 -0
- package/lib/components/Scanner/Scanner.styles.d.ts.map +1 -0
- package/lib/components/Scanner/Scanner.styles.js +17 -0
- package/lib/components/Scanner/Scanner.styles.js.map +1 -0
- package/lib/components/Scanner/Scanner.test-ids.d.ts +2 -0
- package/lib/components/Scanner/Scanner.test-ids.d.ts.map +1 -0
- package/lib/components/Scanner/Scanner.test-ids.js +3 -0
- package/lib/components/Scanner/Scanner.test-ids.js.map +1 -0
- package/lib/components/Scanner/index.d.ts +3 -0
- package/lib/components/Scanner/index.d.ts.map +1 -0
- package/lib/components/Scanner/index.js +2 -0
- package/lib/components/Scanner/index.js.map +1 -0
- package/lib/components/Select/Select.d.ts +3 -4
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +11 -6
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts +2 -2
- package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.js +3 -3
- package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.styles.js +1 -1
- package/lib/components/SelectionCard/SelectionCard.styles.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +6 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.js +4 -2
- package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
- package/lib/components/ShortcutManager/Store.d.ts +1 -1
- package/lib/components/ShortcutManager/Store.d.ts.map +1 -1
- package/lib/components/Signature/Signature.d.ts +28 -0
- package/lib/components/Signature/Signature.d.ts.map +1 -0
- package/lib/components/Signature/Signature.js +397 -0
- package/lib/components/Signature/Signature.js.map +1 -0
- package/lib/components/Signature/Signature.styles.d.ts +197 -0
- package/lib/components/Signature/Signature.styles.d.ts.map +1 -0
- package/lib/components/Signature/Signature.styles.js +119 -0
- package/lib/components/Signature/Signature.styles.js.map +1 -0
- package/lib/components/Signature/Signature.test-ids.d.ts +2 -0
- package/lib/components/Signature/Signature.test-ids.d.ts.map +1 -0
- package/lib/components/Signature/Signature.test-ids.js +3 -0
- package/lib/components/Signature/Signature.test-ids.js.map +1 -0
- package/lib/components/Signature/index.d.ts +4 -0
- package/lib/components/Signature/index.d.ts.map +1 -0
- package/lib/components/Signature/index.js +3 -0
- package/lib/components/Signature/index.js.map +1 -0
- package/lib/components/SkipLinks/SkipLinks.d.ts +1 -1
- package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
- package/lib/components/Slider/Slider.d.ts +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.d.ts +57 -57
- package/lib/components/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/SummaryList/SummaryList.js +8 -4
- package/lib/components/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/Switch/Switch.js +2 -2
- package/lib/components/Switch/Switch.js.map +1 -1
- package/lib/components/Tabs/Tab.d.ts +1 -1
- package/lib/components/Tabs/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.js +24 -8
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/Tabs/TabPanel.d.ts +28 -28
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/Text/Text.js +2 -0
- package/lib/components/Text/Text.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +10 -24
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.styles.d.ts +0 -1
- package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.styles.js +1 -2
- package/lib/components/TextArea/TextArea.styles.js.map +1 -1
- package/lib/components/Toaster/Toaster.js +2 -6
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +8 -2
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tree/StandardTree.js +1 -3
- package/lib/components/Tree/StandardTree.js.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +2 -2
- package/lib/components/Tree/Tree.d.ts +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/useAnimatedText.d.ts.map +1 -1
- package/lib/hooks/useAnimatedText.js +12 -1
- package/lib/hooks/useAnimatedText.js.map +1 -1
- package/lib/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/hooks/useBreakpoint.js +3 -1
- package/lib/hooks/useBreakpoint.js.map +1 -1
- package/lib/hooks/useComputedLengthPx.d.ts +10 -0
- package/lib/hooks/useComputedLengthPx.d.ts.map +1 -0
- package/lib/hooks/useComputedLengthPx.js +46 -0
- package/lib/hooks/useComputedLengthPx.js.map +1 -0
- package/lib/hooks/useI18n.d.ts +137 -14
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useScrollToggle.d.ts +2 -1
- package/lib/hooks/useScrollToggle.d.ts.map +1 -1
- package/lib/hooks/useScrollToggle.js +26 -8
- package/lib/hooks/useScrollToggle.js.map +1 -1
- package/lib/i18n/default.d.ts +136 -14
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +153 -22
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +136 -13
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +3 -3
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/styles/utils.d.ts +24 -4
- package/lib/styles/utils.d.ts.map +1 -1
- package/lib/styles/utils.js +59 -13
- package/lib/styles/utils.js.map +1 -1
- package/lib/theme/index.d.ts +4 -0
- package/lib/theme/index.d.ts.map +1 -1
- package/lib/theme/index.js +4 -0
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/theme.d.ts +321 -0
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +193 -5
- package/lib/theme/themeOverrides.schema.json +188 -1
- package/lib/theme/themes/aurigaDarkTheme.json +159 -0
- package/lib/theme/themes/aurigaTheme.json +150 -0
- package/lib/theme/themes/orionDarkTheme.json +3 -1
- package/lib/theme/themes/orionTheme.json +3 -3
- package/lib/theme/themes/velaDarkTheme.json +175 -0
- package/lib/theme/themes/velaTheme.json +169 -0
- package/lib/theme/themes/virgoDarkTheme.json +4 -4
- package/lib/theme/themes/virgoTheme.json +5 -5
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isTouchDevice.d.ts +3 -0
- package/lib/utils/isTouchDevice.d.ts.map +1 -0
- package/lib/utils/isTouchDevice.js +4 -0
- package/lib/utils/isTouchDevice.js.map +1 -0
- package/package.json +6 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[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,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC;;;;GAIjF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAE9F,OAAO,GAAG,CAAA;;;aAGC,SAAS;;;qCAGe,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM;;;;iBAIjD,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC;;;;GAIlD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport { StyledMetaList, StyledMetaListItem } from '../MetaList/MetaList';\nimport Button, { StyledButton } from '../Button';\nimport { readableColor } from '../../styles';\nimport {\n StyledPrimary,\n StyledSecondary,\n StyledSummaryItem,\n StyledSummaryItemActions,\n StyledVisual\n} from '../SummaryItem';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledFlex } from '../Flex';\nimport { StyledFormControl } from '../FormControl';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n itemLayout?: MenuProps['itemLayout'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n itemLayout,\n mode = 'action',\n isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding-block: calc(0.75 * ${base.spacing});\n padding-inline: ${base.spacing};\n cursor: pointer;\n\n > ${StyledSummaryItem} {\n ${StyledSummaryItemActions}, ${StyledVisual} {\n display: grid;\n align-items: center;\n }\n\n > ${StyledVisual}:has(> :nth-child(2)) {\n grid-template-columns: auto auto;\n grid-column-gap: ${base.spacing};\n }\n\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['mouse-min']};\n align-self: start;\n }\n `}\n }\n\n ${itemLayout === 'inline' &&\n css`\n justify-content: flex-start;\n\n ${StyledSummaryItem} {\n /* Sets grid columns based on SummaryItem content combinations */\n\n &:has(${StyledVisual}):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary secondary actions';\n grid-template-columns: auto auto 1fr auto;\n }\n\n &:has(${StyledVisual}):has(${StyledSecondary}):not(:has(${StyledSummaryItemActions})) {\n grid-template-areas: 'visual primary secondary';\n grid-template-columns: auto auto 1fr;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'visual primary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'primary secondary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary secondary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):has(\n ${StyledSummaryItemActions}\n ) {\n grid-template-areas: 'primary actions';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary';\n grid-template-columns: 1fr;\n flex-grow: 0;\n }\n\n & > ${StyledPrimary} {\n ${ellipsisOverflow};\n }\n\n & > ${StyledSecondary} {\n ${ellipsisOverflow};\n\n ul {\n li {\n ${ellipsisOverflow};\n }\n justify-content: end;\n }\n }\n\n & > ${StyledSummaryItemActions} > ${StyledFlex} {\n justify-content: end;\n }\n }\n `}\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['finger-min']};\n }\n `}\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n /* The enclosing menu item has required min-height already set */\n ${isParentItem &&\n selectableParent &&\n css`\n ${StyledSummaryItemActions} ${StyledButton} {\n min-height: unset;\n }\n `}\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n ${ellipsisOverflow};\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n ${StyledMetaList} ${StyledMetaListItem} * {\n display: inline;\n vertical-align: baseline;\n margin: 0;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: -0.125rem;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuFilter = styled.div(({ theme }) => {\n const borderRadius = `calc(${theme.components['search-input']['border-radius']} * ${theme.base['border-radius']})`;\n\n return css`\n position: relative;\n min-height: ${theme.components.input.height};\n height: ${theme.components.input.height};\n --icon-start-padding: calc(1.5 * ${theme.components.input.padding});\n /* stylelint-disable-next-line unit-allowed-list */\n --icon-size: max(1.125rem, 14px);\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n min-width: ${theme.base['hit-area']['finger-min']};\n }\n\n ${StyledFormControl} {\n height: 100%;\n border-radius: ${borderRadius};\n padding-inline-start: calc(\n var(--icon-start-padding) + var(--icon-size) + (0.5 * ${theme.components.input.padding})\n );\n padding-inline-end: calc(1.5 * ${theme.components.input.padding});\n\n &::-webkit-search-cancel-button {\n display: none;\n }\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &:focus-visible:not([disabled]) {\n box-shadow: ${theme.base.shadow['focus-inset']};\n border-color: ${theme.components['form-control']['border-color']};\n\n :hover {\n border-color: ${theme.components['form-control'][':hover']['border-color']};\n }\n }\n }\n `;\n});\n\nStyledMenuFilter.defaultProps = defaultThemeProp;\n\nexport const StyledFilterIcon = styled(Icon)(({ theme }) => {\n const iconColor = tryCatch(() => transparentize(0.3, theme.base.palette['foreground-color']));\n\n return css`\n position: absolute;\n pointer-events: none;\n color: ${iconColor};\n inset-inline-start: var(--icon-start-padding);\n /* stylelint-disable unit-allowed-list */\n inset-block-start: calc(0.5 * (${theme.components.input.height} - max(1.125rem, 14px)));\n\n @media (pointer: coarse) {\n inset-block-start: calc(\n 0.5 * (${theme.base['hit-area']['finger-min']} - max(1.125rem, 14px))\n );\n }\n /* stylelint-enable unit-allowed-list */\n `;\n});\n\nStyledFilterIcon.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"Menu.styles.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA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K,CAAC,OAAO;;;;;;;;;;;sBAW/C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;wBAC9B,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC;;;0BAG9C,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC;;;;GAIjF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAE9F,OAAO,GAAG,CAAA;;;aAGC,SAAS;;;qCAGe,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM;;;;iBAIjD,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC;;;;GAIlD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { hideVisually, mix, transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\nimport { StyledEmptyState } from '../EmptyState';\nimport Icon, { StyledIcon } from '../Icon';\nimport { StyledGrid } from '../Grid';\nimport { tryCatch } from '../../utils';\nimport { StyledText } from '../Text';\nimport { StyledVisuallyHiddenText } from '../VisuallyHiddenText/VisuallyHiddenText';\nimport { StyledMetaList, StyledMetaListItem } from '../MetaList/MetaList';\nimport Button, { StyledButton } from '../Button';\nimport { readableColor } from '../../styles';\nimport {\n StyledPrimary,\n StyledSecondary,\n StyledSummaryItem,\n StyledSummaryItemActions,\n StyledVisual\n} from '../SummaryItem';\nimport { ellipsisOverflow } from '../../styles/mixins';\nimport { StyledFlex } from '../Flex';\nimport { StyledFormControl } from '../FormControl';\nimport { StyledPseudoRadioCheck } from '../RadioCheck/RadioCheck';\n\nimport type { MenuProps } from './Menu.types';\n\nexport const StyledExpandButton = styled(Button)`\n align-self: center;\n`;\n\nexport const StyledCheckMarkIcon = styled(Icon)``;\n\nexport const StyledMenuItem = styled.li<{\n isParentItem: boolean;\n mode?: MenuProps['mode'];\n itemLayout?: MenuProps['itemLayout'];\n isChecked?: boolean;\n selectableParent?: boolean;\n}>(\n ({\n theme: { base, components },\n isParentItem,\n itemLayout,\n mode = 'action',\n isChecked = false,\n selectableParent = false\n }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n\n const checkedBackground = components['radio-check'][':checked']['background-color'];\n const checkedForeground = tryCatch(() => readableColor(checkedBackground));\n\n return css`\n min-height: ${base['hit-area']['mouse-min']};\n padding-block: calc(0.75 * ${base.spacing});\n padding-inline: ${base.spacing};\n cursor: pointer;\n\n > ${StyledSummaryItem} {\n ${StyledSummaryItemActions}, ${StyledVisual} {\n display: grid;\n align-items: center;\n }\n\n > ${StyledVisual}:has(> :nth-child(2)) {\n grid-template-columns: auto auto;\n grid-column-gap: ${base.spacing};\n }\n\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['mouse-min']};\n align-self: start;\n }\n `}\n }\n\n ${itemLayout === 'inline' &&\n css`\n justify-content: flex-start;\n\n ${StyledSummaryItem} {\n /* Sets grid columns based on SummaryItem content combinations */\n\n &:has(${StyledVisual}):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary secondary actions';\n grid-template-columns: auto auto 1fr auto;\n }\n\n &:has(${StyledVisual}):has(${StyledSecondary}):not(:has(${StyledSummaryItemActions})) {\n grid-template-areas: 'visual primary secondary';\n grid-template-columns: auto auto 1fr;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'visual primary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:has(${StyledVisual}):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'visual primary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):has(${StyledSummaryItemActions}) {\n grid-template-areas: 'primary secondary actions';\n grid-template-columns: auto 1fr auto;\n }\n\n &:not(:has(${StyledVisual})):has(${StyledSecondary}):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary secondary';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):has(\n ${StyledSummaryItemActions}\n ) {\n grid-template-areas: 'primary actions';\n grid-template-columns: auto 1fr;\n }\n\n &:not(:has(${StyledVisual})):not(:has(${StyledSecondary})):not(\n :has(${StyledSummaryItemActions})\n ) {\n grid-template-areas: 'primary';\n grid-template-columns: 1fr;\n flex-grow: 0;\n }\n\n & > ${StyledPrimary} {\n ${ellipsisOverflow};\n }\n\n & > ${StyledSecondary} {\n ${ellipsisOverflow};\n\n ul {\n li {\n ${ellipsisOverflow};\n }\n justify-content: end;\n }\n }\n\n & > ${StyledSummaryItemActions} > ${StyledFlex} {\n justify-content: end;\n }\n }\n `}\n\n @media (pointer: coarse) {\n min-height: ${base['hit-area']['finger-min']};\n ${itemLayout === 'stacked' &&\n css`\n &:has(${StyledSecondary})\n > ${StyledVisual},\n &:has(${StyledSecondary})\n > ${StyledSummaryItemActions} {\n height: ${base['hit-area']['finger-min']};\n }\n `}\n }\n\n &:focus-within {\n background-color: ${activeColor};\n }\n\n &:hover {\n ${StyledCheckMarkIcon} {\n visibility: visible;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${!isChecked &&\n css`\n border-color: ${components['form-control'][':hover']['border-color']};\n `}\n `}\n }\n }\n\n &:hover:not([aria-disabled='true']) {\n background-color: ${hoverColor};\n }\n\n a:first-of-type {\n display: block;\n width: 100%;\n text-decoration: none;\n color: inherit;\n }\n\n /* The enclosing menu item has required min-height already set */\n ${isParentItem &&\n selectableParent &&\n css`\n ${StyledSummaryItemActions} ${StyledButton} {\n min-height: unset;\n }\n `}\n\n ${isParentItem &&\n !selectableParent &&\n (mode === 'multi-select' || mode === 'single-select') &&\n css`\n padding-inline-start: calc(1.125rem + 2 * ${base.spacing});\n `}\n\n ${StyledGrid} {\n flex-grow: 1;\n }\n\n ${StyledCheckMarkIcon} {\n margin-inline-start: 0;\n ${mode === 'single-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedBackground};\n `\n : css`\n visibility: hidden;\n `}\n `}\n ${mode === 'multi-select' &&\n css`\n ${isChecked\n ? css`\n color: ${checkedForeground};\n background-color: ${checkedBackground};\n border: 0.0625rem solid ${components['radio-check'][':checked']['border-color']};\n `\n : css`\n color: transparent;\n border: 0.0625rem solid ${components['radio-check']['border-color']};\n `}\n border-radius: min(\n calc(${base['border-radius']} * ${components.checkbox['border-radius']}),\n 0.25rem\n );\n `}\n }\n\n &[aria-disabled='true'] {\n cursor: not-allowed;\n background-color: ${components['form-control'][':disabled']['background-color']};\n opacity: ${base['disabled-opacity']};\n }\n `;\n }\n);\n\nStyledMenuItem.defaultProps = defaultThemeProp;\n\nexport const StyledAncestors = styled.div`\n ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n\n & > ${StyledText} {\n ${ellipsisOverflow};\n }\n`;\n\nexport const StyledVisibilityHidden = styled.p`\n ${hideVisually}\n`;\n\nexport const StyledSeparator = styled.li(({ theme }) => {\n return css`\n height: 0.0625rem;\n background-color: ${theme.base.palette['border-line']};\n margin: ${theme.base.spacing} 0;\n `;\n});\n\nStyledSeparator.defaultProps = defaultThemeProp;\n\nexport const StyledMenuGroupHeader = styled.div(({ theme }) => {\n return css`\n min-height: ${theme.base['hit-area']['mouse-min']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n background-color: ${theme.base.palette['secondary-background']};\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n }\n `;\n});\n\nStyledMenuGroupHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListHeader = styled.legend(({ theme: { base } }) => {\n const hoverColor = tryCatch(() =>\n mix(0.95, base.palette['primary-background'], base.palette.interactive)\n );\n const activeColor = tryCatch(() =>\n mix(0.85, base.palette['primary-background'], base.palette.interactive)\n );\n\n return css`\n cursor: pointer;\n width: 100%;\n background-color: ${base.palette['primary-background']};\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &:focus-within {\n box-shadow: ${base.shadow['focus-inset']};\n background-color: ${activeColor};\n }\n\n &:hover:not([aria-disabled='true']):not([data-current='true']) {\n background-color: ${hoverColor};\n }\n color: ${base.palette['foreground-color']};\n padding: calc(0.5 * ${base.spacing}) ${base.spacing};\n text-align: start;\n border-radius: inherit;\n\n > ${StyledGrid} {\n grid-column-gap: ${base.spacing};\n }\n\n ${StyledIcon} {\n /* Fixes vertical align issue increasing box size beyond square */\n display: block;\n }\n `;\n});\n\nStyledMenuListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledMenuList = styled.ul(\n ({ theme }) => css`\n overflow-x: hidden;\n overflow-y: auto;\n list-style: none;\n height: 100%;\n border-radius: inherit;\n\n ${StyledEmptyState} {\n padding: ${theme.base.spacing};\n height: auto;\n }\n\n li:not(:first-child):not([role='presentation']) > ${StyledMenuGroupHeader} {\n margin-block-start: ${theme.base.spacing};\n }\n `\n);\n\nStyledMenuList.defaultProps = defaultThemeProp;\n\nexport const StyledMenuListContainer = styled.fieldset(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n border: 0;\n border-radius: inherit;\n `;\n});\n\nStyledMenuListContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFlyoutMenuListContainer = styled(StyledMenuListContainer)`\n min-width: 10rem;\n`;\n\nexport const StyledLoadingItem = styled.li`\n display: block;\n position: relative;\n height: 2.8rem;\n`;\n\nexport const StyledMenuListWrapper = styled.div(\n ({ theme }) => css`\n position: relative;\n overflow: hidden;\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n\n & > fieldset:first-child {\n position: relative;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n ${StyledMetaList} ${StyledMetaListItem} * {\n display: inline;\n vertical-align: baseline;\n margin: 0;\n }\n `\n);\n\nStyledMenuListWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledMenu = styled.div(({ theme }) => {\n const borderStyle = `0.0625rem solid ${theme.base.palette['border-line']}`;\n\n return css`\n display: flex;\n flex-direction: column;\n\n &,\n ${StyledMenuListWrapper} {\n max-height: inherit;\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n\n &:first-child {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n\n &:last-child {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n }\n\n &[data-active-scope='true'] [data-current='true'] {\n box-shadow: ${theme.base.shadow['focus-inset']};\n\n @media (forced-colors: active) {\n outline: 0.125rem solid Highlight;\n outline-offset: -0.125rem;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n\n ${StyledVisuallyHiddenText}:first-child {\n + ${StyledMenuListWrapper}, + header {\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n }\n }\n\n > header,\n > footer {\n padding: ${theme.base.spacing};\n }\n\n > header {\n border-bottom: ${borderStyle};\n\n ${StyledPseudoRadioCheck} {\n width: ${theme.components.icon.size.s};\n height: ${theme.components.icon.size.s};\n }\n }\n\n > footer {\n border-top: ${borderStyle};\n }\n `;\n});\n\nStyledMenu.defaultProps = defaultThemeProp;\n\nexport const StyledMenuFilter = styled.div(({ theme }) => {\n const borderRadius = `calc(${theme.components['search-input']['border-radius']} * ${theme.base['border-radius']})`;\n\n return css`\n position: relative;\n min-height: ${theme.components.input.height};\n height: ${theme.components.input.height};\n --icon-start-padding: calc(1.5 * ${theme.components.input.padding});\n /* stylelint-disable-next-line unit-allowed-list */\n --icon-size: max(1.125rem, 14px);\n\n @media (pointer: coarse) {\n min-height: ${theme.base['hit-area']['finger-min']};\n min-width: ${theme.base['hit-area']['finger-min']};\n }\n\n ${StyledFormControl} {\n height: 100%;\n border-radius: ${borderRadius};\n padding-inline-start: calc(\n var(--icon-start-padding) + var(--icon-size) + (0.5 * ${theme.components.input.padding})\n );\n padding-inline-end: calc(1.5 * ${theme.components.input.padding});\n\n &::-webkit-search-cancel-button {\n display: none;\n }\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &:focus-visible:not([disabled]) {\n box-shadow: ${theme.base.shadow['focus-inset']};\n border-color: ${theme.components['form-control']['border-color']};\n\n :hover {\n border-color: ${theme.components['form-control'][':hover']['border-color']};\n }\n }\n }\n `;\n});\n\nStyledMenuFilter.defaultProps = defaultThemeProp;\n\nexport const StyledFilterIcon = styled(Icon)(({ theme }) => {\n const iconColor = tryCatch(() => transparentize(0.3, theme.base.palette['foreground-color']));\n\n return css`\n position: absolute;\n pointer-events: none;\n color: ${iconColor};\n inset-inline-start: var(--icon-start-padding);\n /* stylelint-disable unit-allowed-list */\n inset-block-start: calc(0.5 * (${theme.components.input.height} - max(1.125rem, 14px)));\n\n @media (pointer: coarse) {\n inset-block-start: calc(\n 0.5 * (${theme.base['hit-area']['finger-min']} - max(1.125rem, 14px))\n );\n }\n /* stylelint-enable unit-allowed-list */\n `;\n});\n\nStyledFilterIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getMenuTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["create-new"]>;
|
|
1
|
+
export declare const getMenuTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly ["create-new", "select-all"]>;
|
|
2
2
|
export declare const getMenuItemTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
|
|
3
3
|
//# sourceMappingURL=Menu.test-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"Menu.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,6HAA+D,CAAC;AAE3F,eAAO,MAAM,kBAAkB,mGAA0C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createTestIds } from '../../utils';
|
|
2
|
-
export const getMenuTestIds = createTestIds('menu', ['create-new']);
|
|
2
|
+
export const getMenuTestIds = createTestIds('menu', ['create-new', 'select-all']);
|
|
3
3
|
export const getMenuItemTestIds = createTestIds('menu-item', []);
|
|
4
4
|
//# sourceMappingURL=Menu.test-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.test-ids.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,YAAY,CAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.test-ids.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,YAAY,CAAU,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,EAAE,EAAW,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\n\nexport const getMenuTestIds = createTestIds('menu', ['create-new', 'select-all'] as const);\n\nexport const getMenuItemTestIds = createTestIds('menu-item', [] as const);\n"]}
|
|
@@ -94,6 +94,15 @@ export interface MenuProps extends TestIdProp, BaseProps, NoChildrenProp {
|
|
|
94
94
|
filterInputProps?: OmitStrict<InputProps, 'type'>;
|
|
95
95
|
/** Renders a create new action below the menu. */
|
|
96
96
|
onCreateNew?: FormAction;
|
|
97
|
+
/**
|
|
98
|
+
* Renders a bulk selection checkbox in the menu's header, above the item list and below the
|
|
99
|
+
* filter input.
|
|
100
|
+
*/
|
|
101
|
+
selectAll?: {
|
|
102
|
+
handler: () => void;
|
|
103
|
+
selected?: boolean | 'partial';
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
};
|
|
97
106
|
/** ID placed on the menu's list element. */
|
|
98
107
|
listId?: string;
|
|
99
108
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7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AAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,kBAAkB,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3E,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,2BAA2B,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE;QACT,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;QAC9C,UAAU,EAAE,MAAM,IAAI,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dispatch, ReactNode, Ref, RefObject, SetStateAction, MouseEvent } from 'react';\n\nimport type { FormAction } from '../Dialog/Dialog.types';\nimport type {\n BaseProps,\n NoChildrenProp,\n OmitStrict,\n PropsWithDefaults,\n TestIdProp\n} from '../../types';\nimport type { MetaListProps } from '../MetaList';\nimport type { UseActiveDescendantConfig } from '../../hooks';\nimport type { TooltipProps } from '../Tooltip';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport type { InputProps } from '../Input';\n\nexport type AcceptedMouseEventElement = HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n\nexport interface MenuItemProps extends MenuObjectProps {\n /** The primary piece of item information as a string. */\n primary: string;\n /** Secondary info about an item. Useful for additional metadata or context. Will be overridden when ancestors are passed as a prop. */\n secondary?: MetaListProps['items'];\n /** A visual to assist identifying an item. e.g. Avatar or Icon. */\n visual?: ReactNode;\n /** A count to assist with number of associated items. */\n count?: number;\n /** An array of MenuItemProps to identify an item's ancestors by their primary value. Useful for flattened tree search results. */\n ancestors?: (MenuItemProps | MenuGroupProps)[];\n /** An array of either MenuItemProps or MenuGroupProps children. */\n items?: (MenuItemProps | MenuGroupProps)[];\n /**\n * For single or multi select menus, selected must be set true|false to render an item's radiobutton or checkbox.\n * May be set on parent or leaf items.\n */\n selected?: boolean;\n /** FUTURE SUPPORT: Use to indicate an item has a partial selection, some but not all of its descendants are selected. */\n partial?: boolean;\n /** Will render the action item as link. Only use for leaf items. */\n href?: string;\n /**\n * Provide a description for an item that will render in a Tooltip when hovering that item.\n * This should be used only for VERY SPECIFIC UX scenarios.\n */\n tooltip?: TooltipProps['children'];\n /** Use this function to identify and set item selections. Recommend leveraging top level Menu onItemClick handler. */\n onClick?: (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => void;\n onExpand?: MenuItemProps['onClick'];\n /** Determines if the MenuItem will be disabled. */\n disabled?: boolean;\n role?: 'menuitem' | 'option';\n}\n\nexport interface MenuGroupProps extends MenuObjectProps {\n /** Label of the group. */\n label: string;\n /** An array of MenuItemProps children. */\n items: MenuItemProps[];\n /** List-like role to apply to group items. */\n itemRole?: MenuItemProps['role'];\n}\n\nexport type ParentMenuItemProps = MenuItemProps & { items: NonNullable<MenuItemProps['items']> };\n\nexport interface MenuListHeaderProps {\n /** Text used to indicate an expanded parent item. */\n text: string;\n /** Internal handler. */\n onClick: () => void;\n}\n\nexport interface MenuObjectProps extends TestIdProp {\n /** A unique id within the entire tree of menu items. */\n id: string;\n}\n\nexport interface MenuListProps {\n items: ParentMenuItemProps['items'];\n id?: string;\n ref?: Ref<HTMLFieldSetElement>;\n parent?: {\n el: HTMLFieldSetElement;\n item: ParentMenuItemProps;\n siblingItems: ParentMenuItemProps['items'];\n setExpandedItem: Dispatch<SetStateAction<ParentMenuItemProps | undefined>>;\n returnFocusRef: RefObject<HTMLButtonElement>;\n };\n menuRole?: 'menu' | 'listbox';\n}\n\nexport type MenuHandleValue = {\n /**\n * Sets current menu depth to that of the given id.\n * Only applies to drill-down variant.\n */\n expandTo: (parentItemId: MenuItemProps['id']) => void;\n};\n\nexport interface MenuProps extends TestIdProp, BaseProps, NoChildrenProp {\n /** An array of MenuItemProps. */\n items: (MenuItemProps | MenuGroupProps)[];\n /**\n * Determines menu item content layout structure.\n * @default 'stacked'\n */\n itemLayout?: SummaryItemProps['layout'];\n /** Renders an input to filter items in the menu */\n filterInputProps?: OmitStrict<InputProps, 'type'>;\n /** Renders a create new action below the menu. */\n onCreateNew?: FormAction;\n /** ID placed on the menu's list element. */\n listId?: string;\n /**\n * Indicates intent for the menu.\n * As of now item types can not be mixed.\n * @default 'action'\n */\n mode?: 'action' | 'multi-select' | 'single-select';\n role?: 'menu' | 'listbox';\n /**\n * Always recommended to go for default drill-down variant for better accessibility.\n * When flyout variant is selected, its recommended not to have more than 1 nested level\n * @default 'drill-down'\n */\n variant?: 'drill-down' | 'flyout';\n /**\n * Use to accent(make bold) portions of the primary text.\n * Useful for filter/search results.\n * If passed a function, that function will be passed each items primary text.\n */\n accent?: RegExp | ((primary: string) => RegExp);\n /**\n * Item height will grow or shrink based on item count.\n * Use this indicate at which item the menu should begin its scroll.\n * @default 7\n */\n scrollAt?: number;\n /** A simple message to display when there are no items. */\n emptyText?: string;\n /**\n * A top level handler for all item clicks.\n * This is convenient way to detect which item was clicked to react by updating state or performing an action.\n * Both an item's onClick and this will be called if both are passed.\n */\n onItemClick?: MenuItemProps['onClick'];\n /**\n * A top level handler for all item pseudo focus events.\n * This is convenient way to detect which item is active to react by updating state or performing an action.\n */\n onItemActive?: (id: MenuItemProps['id']) => void;\n /**\n * A top level handler for clicks on parent items to expand their child items.\n * This is convenient way to detect when an item is expanded.\n * For lazy loading this would be a good time to set an item's items.\n * Both an item's onExpand and this will be called if both are passed.\n */\n onItemExpand?: MenuProps['onItemClick'];\n /** A top level handler for capturing when nested items have been collapsed / \"back\" button clicks. */\n onItemCollapse?: (id: MenuItemProps['id']) => void;\n /**\n * Show a Progress indicator at the end of a list where newly loaded items will be appended.\n * @default false\n */\n loading?: boolean;\n /** Callback to fetch more items */\n loadMore?: (id?: MenuItemProps['id']) => void;\n /** Ref placed on the root menu element. */\n ref?: Ref<HTMLDivElement>;\n /** HTML ID. */\n id?: string;\n /**\n * Currently highlighted item.\n * Setting currentItemId assumes synthetic focus is being controlled entirely by the containing component,\n * and unbinds menu useActiveDescendant keydown controls.\n * @deprecated\n */\n currentItemId?: string;\n /** Override for default active-descendant focus control element in menu */\n focusControlEl?: HTMLElement | undefined;\n /** Header region. */\n header?: ReactNode;\n /** Footer region. */\n footer?: ReactNode;\n /** Pauses evaluation of menu active descendants while true */\n pauseDescendantEvaluation?: UseActiveDescendantConfig['pauseDescendantEvaluation'];\n /**\n * If true, the down or up arrow key will navigate to the first or last item if the active item is last or first.\n * @default true\n */\n cycle?: UseActiveDescendantConfig['cycle'];\n /**\n * Flag to indicate that Right/Left arrow navigation for expand/collapse parent items is not available.\n * Will accept enter if not selectable parent, otherwise falls back to shift + space.\n */\n arrowNavigationUnsupported?: boolean;\n /** Additional information to announce to screen reader users. Read before menu navigation instructions. */\n 'aria-describedby'?: string;\n /** Label for menu or listbox element */\n 'aria-label'?: string;\n /**\n * Custom menu list rendering\n * @internal\n */\n menuList?: ReactNode;\n handleRef?: Ref<MenuHandleValue>;\n}\n\ntype MenuPropsWithDefaults = PropsWithDefaults<\n MenuProps,\n 'mode' | 'variant' | 'scrollAt' | 'loading' | 'itemLayout'\n>;\n\nexport interface MenuContextProps\n extends OmitStrict<MenuPropsWithDefaults, 'ref' | 'items' | 'handleRef'> {\n radioName?: string;\n componentId: string;\n pushFlyoutId: (id: string) => void;\n flyOutActiveIdStack: string[];\n focusControl: HTMLElement | null;\n updateActiveDescendants: (options?: { preventScroll?: boolean }) => void;\n setFocusDescendant: Dispatch<SetStateAction<HTMLElement | null>>;\n setFocusReturnEl: Dispatch<SetStateAction<HTMLElement | null | undefined>>;\n getScopedItemId: (itemId: string) => string;\n updateParentDescendantStack?: (item: HTMLElement | null) => void;\n expandTo?: {\n parentItemId: MenuItemProps['id'] | undefined;\n onComplete: () => void;\n };\n}\n\nexport interface NavItemsListProps {\n listRef: RefObject<HTMLUListElement>;\n cycle?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Menu.types.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Dispatch, ReactNode, Ref, RefObject, SetStateAction, MouseEvent } from 'react';\n\nimport type { FormAction } from '../Dialog/Dialog.types';\nimport type {\n BaseProps,\n NoChildrenProp,\n OmitStrict,\n PropsWithDefaults,\n TestIdProp\n} from '../../types';\nimport type { MetaListProps } from '../MetaList';\nimport type { UseActiveDescendantConfig } from '../../hooks';\nimport type { TooltipProps } from '../Tooltip';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport type { InputProps } from '../Input';\n\nexport type AcceptedMouseEventElement = HTMLButtonElement | HTMLAnchorElement | HTMLInputElement;\n\nexport interface MenuItemProps extends MenuObjectProps {\n /** The primary piece of item information as a string. */\n primary: string;\n /** Secondary info about an item. Useful for additional metadata or context. Will be overridden when ancestors are passed as a prop. */\n secondary?: MetaListProps['items'];\n /** A visual to assist identifying an item. e.g. Avatar or Icon. */\n visual?: ReactNode;\n /** A count to assist with number of associated items. */\n count?: number;\n /** An array of MenuItemProps to identify an item's ancestors by their primary value. Useful for flattened tree search results. */\n ancestors?: (MenuItemProps | MenuGroupProps)[];\n /** An array of either MenuItemProps or MenuGroupProps children. */\n items?: (MenuItemProps | MenuGroupProps)[];\n /**\n * For single or multi select menus, selected must be set true|false to render an item's radiobutton or checkbox.\n * May be set on parent or leaf items.\n */\n selected?: boolean;\n /** FUTURE SUPPORT: Use to indicate an item has a partial selection, some but not all of its descendants are selected. */\n partial?: boolean;\n /** Will render the action item as link. Only use for leaf items. */\n href?: string;\n /**\n * Provide a description for an item that will render in a Tooltip when hovering that item.\n * This should be used only for VERY SPECIFIC UX scenarios.\n */\n tooltip?: TooltipProps['children'];\n /** Use this function to identify and set item selections. Recommend leveraging top level Menu onItemClick handler. */\n onClick?: (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => void;\n onExpand?: MenuItemProps['onClick'];\n /** Determines if the MenuItem will be disabled. */\n disabled?: boolean;\n role?: 'menuitem' | 'option';\n}\n\nexport interface MenuGroupProps extends MenuObjectProps {\n /** Label of the group. */\n label: string;\n /** An array of MenuItemProps children. */\n items: MenuItemProps[];\n /** List-like role to apply to group items. */\n itemRole?: MenuItemProps['role'];\n}\n\nexport type ParentMenuItemProps = MenuItemProps & { items: NonNullable<MenuItemProps['items']> };\n\nexport interface MenuListHeaderProps {\n /** Text used to indicate an expanded parent item. */\n text: string;\n /** Internal handler. */\n onClick: () => void;\n}\n\nexport interface MenuObjectProps extends TestIdProp {\n /** A unique id within the entire tree of menu items. */\n id: string;\n}\n\nexport interface MenuListProps {\n items: ParentMenuItemProps['items'];\n id?: string;\n ref?: Ref<HTMLFieldSetElement>;\n parent?: {\n el: HTMLFieldSetElement;\n item: ParentMenuItemProps;\n siblingItems: ParentMenuItemProps['items'];\n setExpandedItem: Dispatch<SetStateAction<ParentMenuItemProps | undefined>>;\n returnFocusRef: RefObject<HTMLButtonElement>;\n };\n menuRole?: 'menu' | 'listbox';\n}\n\nexport type MenuHandleValue = {\n /**\n * Sets current menu depth to that of the given id.\n * Only applies to drill-down variant.\n */\n expandTo: (parentItemId: MenuItemProps['id']) => void;\n};\n\nexport interface MenuProps extends TestIdProp, BaseProps, NoChildrenProp {\n /** An array of MenuItemProps. */\n items: (MenuItemProps | MenuGroupProps)[];\n /**\n * Determines menu item content layout structure.\n * @default 'stacked'\n */\n itemLayout?: SummaryItemProps['layout'];\n /** Renders an input to filter items in the menu */\n filterInputProps?: OmitStrict<InputProps, 'type'>;\n /** Renders a create new action below the menu. */\n onCreateNew?: FormAction;\n /**\n * Renders a bulk selection checkbox in the menu's header, above the item list and below the\n * filter input.\n */\n selectAll?: {\n handler: () => void;\n selected?: boolean | 'partial';\n disabled?: boolean;\n };\n /** ID placed on the menu's list element. */\n listId?: string;\n /**\n * Indicates intent for the menu.\n * As of now item types can not be mixed.\n * @default 'action'\n */\n mode?: 'action' | 'multi-select' | 'single-select';\n role?: 'menu' | 'listbox';\n /**\n * Always recommended to go for default drill-down variant for better accessibility.\n * When flyout variant is selected, its recommended not to have more than 1 nested level\n * @default 'drill-down'\n */\n variant?: 'drill-down' | 'flyout';\n /**\n * Use to accent(make bold) portions of the primary text.\n * Useful for filter/search results.\n * If passed a function, that function will be passed each items primary text.\n */\n accent?: RegExp | ((primary: string) => RegExp);\n /**\n * Item height will grow or shrink based on item count.\n * Use this indicate at which item the menu should begin its scroll.\n * @default 7\n */\n scrollAt?: number;\n /** A simple message to display when there are no items. */\n emptyText?: string;\n /**\n * A top level handler for all item clicks.\n * This is convenient way to detect which item was clicked to react by updating state or performing an action.\n * Both an item's onClick and this will be called if both are passed.\n */\n onItemClick?: MenuItemProps['onClick'];\n /**\n * A top level handler for all item pseudo focus events.\n * This is convenient way to detect which item is active to react by updating state or performing an action.\n */\n onItemActive?: (id: MenuItemProps['id']) => void;\n /**\n * A top level handler for clicks on parent items to expand their child items.\n * This is convenient way to detect when an item is expanded.\n * For lazy loading this would be a good time to set an item's items.\n * Both an item's onExpand and this will be called if both are passed.\n */\n onItemExpand?: MenuProps['onItemClick'];\n /** A top level handler for capturing when nested items have been collapsed / \"back\" button clicks. */\n onItemCollapse?: (id: MenuItemProps['id']) => void;\n /**\n * Show a Progress indicator at the end of a list where newly loaded items will be appended.\n * @default false\n */\n loading?: boolean;\n /** Callback to fetch more items */\n loadMore?: (id?: MenuItemProps['id']) => void;\n /** Ref placed on the root menu element. */\n ref?: Ref<HTMLDivElement>;\n /** HTML ID. */\n id?: string;\n /**\n * Currently highlighted item.\n * Setting currentItemId assumes synthetic focus is being controlled entirely by the containing component,\n * and unbinds menu useActiveDescendant keydown controls.\n * @deprecated\n */\n currentItemId?: string;\n /** Override for default active-descendant focus control element in menu */\n focusControlEl?: HTMLElement | undefined;\n /** Header region. */\n header?: ReactNode;\n /** Footer region. */\n footer?: ReactNode;\n /** Pauses evaluation of menu active descendants while true */\n pauseDescendantEvaluation?: UseActiveDescendantConfig['pauseDescendantEvaluation'];\n /**\n * If true, the down or up arrow key will navigate to the first or last item if the active item is last or first.\n * @default true\n */\n cycle?: UseActiveDescendantConfig['cycle'];\n /**\n * Flag to indicate that Right/Left arrow navigation for expand/collapse parent items is not available.\n * Will accept enter if not selectable parent, otherwise falls back to shift + space.\n */\n arrowNavigationUnsupported?: boolean;\n /** Additional information to announce to screen reader users. Read before menu navigation instructions. */\n 'aria-describedby'?: string;\n /** Label for menu or listbox element */\n 'aria-label'?: string;\n /**\n * Custom menu list rendering\n * @internal\n */\n menuList?: ReactNode;\n handleRef?: Ref<MenuHandleValue>;\n}\n\ntype MenuPropsWithDefaults = PropsWithDefaults<\n MenuProps,\n 'mode' | 'variant' | 'scrollAt' | 'loading' | 'itemLayout'\n>;\n\nexport interface MenuContextProps\n extends OmitStrict<MenuPropsWithDefaults, 'ref' | 'items' | 'handleRef'> {\n radioName?: string;\n componentId: string;\n pushFlyoutId: (id: string) => void;\n flyOutActiveIdStack: string[];\n focusControl: HTMLElement | null;\n updateActiveDescendants: (options?: { preventScroll?: boolean }) => void;\n setFocusDescendant: Dispatch<SetStateAction<HTMLElement | null>>;\n setFocusReturnEl: Dispatch<SetStateAction<HTMLElement | null | undefined>>;\n getScopedItemId: (itemId: string) => string;\n updateParentDescendantStack?: (item: HTMLElement | null) => void;\n expandTo?: {\n parentItemId: MenuItemProps['id'] | undefined;\n onComplete: () => void;\n };\n}\n\nexport interface NavItemsListProps {\n listRef: RefObject<HTMLUListElement>;\n cycle?: boolean;\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import type { FunctionComponent } from 'react';
|
|
|
2
2
|
import type { ForwardProps } from '../../types';
|
|
3
3
|
import type { MenuItemProps } from './Menu.types';
|
|
4
4
|
declare const _default: FunctionComponent<MenuItemProps & ForwardProps> & {
|
|
5
|
-
getTestIds: (testIdProp?: import("
|
|
5
|
+
getTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -11,10 +11,12 @@ type BasicSelectable = {
|
|
|
11
11
|
id: unknown;
|
|
12
12
|
primary?: unknown;
|
|
13
13
|
selected?: boolean | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
items?: {
|
|
15
16
|
id: unknown;
|
|
16
17
|
primary?: unknown;
|
|
17
18
|
selected?: boolean | undefined;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
18
20
|
}[] | undefined;
|
|
19
21
|
};
|
|
20
22
|
type ExtractItem<T> = Extract<T, {
|
|
@@ -42,6 +44,18 @@ declare const helpers: {
|
|
|
42
44
|
toggleSelected<T extends BasicSelectable>(items: T[], id: PickId<T>, mode?: MenuProps["mode"], bool?: boolean): T[];
|
|
43
45
|
selectItem<T extends BasicSelectable>(items: T[], id: PickId<T>, mode?: MenuProps["mode"]): T[];
|
|
44
46
|
deselectItem<T extends BasicSelectable>(items: T[], id: PickId<T>, mode?: MenuProps["mode"]): T[];
|
|
47
|
+
/**
|
|
48
|
+
* Returns every item in the tree that renders a selection control, traversing groups and
|
|
49
|
+
* nested items at every level. Parent items (`selected: undefined`) and disabled items
|
|
50
|
+
* are excluded.
|
|
51
|
+
*/
|
|
52
|
+
getSelectable<T extends BasicSelectable>(items: T[]): ExtractItem<T>[];
|
|
53
|
+
/**
|
|
54
|
+
* The aggregate selection state of the tree, shaped for {@link MenuProps.selectAll | `MenuProps['selectAll']`}.
|
|
55
|
+
* `true` when every selectable item is selected, `'partial'` when only some are, and
|
|
56
|
+
* `false` when none are or when there is nothing selectable.
|
|
57
|
+
*/
|
|
58
|
+
getSelectionState<T extends BasicSelectable>(items: T[]): NonNullable<NonNullable<MenuProps["selectAll"]>["selected"]>;
|
|
45
59
|
getSelected<T extends BasicSelectable>(items: T[]): ExtractItem<T>[];
|
|
46
60
|
prependTo<T extends BasicItemOrGroup>(items: T[], newItems: GenericItemOrGroup<T>[], id?: PickId<T>): GenericItemOrGroup<T>[];
|
|
47
61
|
appendTo<T extends BasicItemOrGroup>(items: T[], newItems: GenericItemOrGroup<T>[], id?: PickId<T>): GenericItemOrGroup<T>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,GAAG,SAAS,CAAC;CAC1D,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/helpers.ts"],"names":[],"mappings":"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B,SAC/B,CAAC,EAAE,WACD,MAAM,CAAC,CAAC,CAAC,GACjB,kBAAkB,CAAC,CAAC,CAAC,GAAG,SAAS;CAKrC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { hasProp } from '../../utils';
|
|
2
|
+
/**
|
|
3
|
+
* An item is selectable only when it renders a selection control, which mirrors the
|
|
4
|
+
* `showCheckmark` condition in MenuItem. Items that don't render a control (e.g. non-selectable
|
|
5
|
+
* parent items with `selected: undefined`, or any disabled item) are excluded.
|
|
6
|
+
*/
|
|
7
|
+
const isSelectable = (item) => !item.disabled && (!item.items || typeof item.selected === 'boolean');
|
|
2
8
|
const helpers = {
|
|
3
9
|
isItem(item) {
|
|
4
10
|
return hasProp(item, 'primary');
|
|
@@ -119,6 +125,26 @@ const helpers = {
|
|
|
119
125
|
deselectItem(items, id, mode) {
|
|
120
126
|
return this.toggleSelected(items, id, mode, false);
|
|
121
127
|
},
|
|
128
|
+
/**
|
|
129
|
+
* Returns every item in the tree that renders a selection control, traversing groups and
|
|
130
|
+
* nested items at every level. Parent items (`selected: undefined`) and disabled items
|
|
131
|
+
* are excluded.
|
|
132
|
+
*/
|
|
133
|
+
getSelectable(items) {
|
|
134
|
+
return this.flatten(items).filter(isSelectable);
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* The aggregate selection state of the tree, shaped for {@link MenuProps.selectAll | `MenuProps['selectAll']`}.
|
|
138
|
+
* `true` when every selectable item is selected, `'partial'` when only some are, and
|
|
139
|
+
* `false` when none are or when there is nothing selectable.
|
|
140
|
+
*/
|
|
141
|
+
getSelectionState(items) {
|
|
142
|
+
const selectable = this.getSelectable(items);
|
|
143
|
+
const selectedCount = selectable.filter(item => item.selected === true).length;
|
|
144
|
+
if (selectedCount === 0)
|
|
145
|
+
return false;
|
|
146
|
+
return selectedCount === selectable.length ? true : 'partial';
|
|
147
|
+
},
|
|
122
148
|
getSelected(items) {
|
|
123
149
|
return items.reduce((selections, item) => {
|
|
124
150
|
if (this.isItem(item) && item.selected) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/Menu/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAiCtC,MAAM,OAAO,GAAG;IACd,MAAM,CAAmB,IAAO;QAC9B,OAAO,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CAA6B,KAAU,EAAE,EAAa;QAC3D,IAAI,KAAiC,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAChB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;gBACxC,KAAK,GAAG,IAAI,CAAC;gBACb,OAAO,IAAI,CAAC;YACd,CAAC;YAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACrC,OAAO,CAAC,CAAC,KAAK,CAAC;YACjB,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAA6B,KAAU,EAAE,EAAa;QAC3D,IAAI,IAAI,GAA4B,EAAE,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAChB,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;gBACnB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC;YACd,CAAC;YAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAgC,EAAE,EAAE,CAA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QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,WAAW,CACT,KAAU,EACV,MAAkB;QAElB,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,QAA2C,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAChD,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,WAAW,CACT,KAAU,EACV,MAAkB;QAElB,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,QAA2C,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAChD,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CACX,KAAU,EACV,MAAkB;QAElB,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { hasProp } from '../../utils';\n\nimport type { MenuProps } from './Menu.types';\n\ntype BasicItemOrGroup = {\n id: unknown;\n primary?: unknown;\n items?: { id: unknown; primary?: unknown }[] | undefined;\n};\n\ntype BasicSelectable = {\n id: unknown;\n primary?: unknown;\n selected?: boolean | undefined;\n items?: { id: unknown; primary?: unknown; selected?: boolean | undefined }[] | undefined;\n};\n\ntype ExtractItem<T> = Extract<T, { primary: unknown }>;\n\ntype GenericItemOrGroup<T> =\n | T\n | (T extends { items?: (infer U)[] | undefined }\n ? U extends { id: unknown }\n ? U\n : never\n : never);\n\ntype GenericItem<T> = ExtractItem<T> | ExtractItem<GenericItemOrGroup<T>>;\n\ntype PickId<T extends { id: unknown }> = [T] extends [never]\n ? unknown\n : GenericItemOrGroup<T>['id'];\n\nconst helpers = {\n isItem<T extends object>(item: T): item is ExtractItem<T> {\n return hasProp(item, 'primary');\n },\n\n getItem<T extends BasicItemOrGroup>(items: T[], id: PickId<T>): GenericItem<T> | undefined {\n let found: GenericItem<T> | undefined;\n items.some(item => {\n if (this.isItem(item) && item.id === id) {\n found = item;\n return true;\n }\n\n if (item.items) {\n found = this.getItem(item.items, id);\n return !!found;\n }\n\n return false;\n });\n\n return found;\n },\n\n getPath<T extends BasicItemOrGroup>(items: T[], id: PickId<T>): GenericItemOrGroup<T>[] {\n let path: GenericItemOrGroup<T>[] = [];\n items.some(item => {\n if (item.id === id) {\n path = [item];\n return true;\n }\n\n if (item.items) {\n const innerPath = this.getPath(item.items as GenericItemOrGroup<T>[], id);\n if (innerPath.length) path = innerPath.concat(item);\n return !!path.length;\n }\n\n return false;\n });\n\n return path;\n },\n\n setItem<T extends BasicItemOrGroup>(\n items: T[],\n id: PickId<T>,\n newItem: GenericItemOrGroup<T>\n ): T[] {\n return items.map(item => {\n if (item.id === id) return { ...newItem };\n\n if (item.items) {\n return {\n ...item,\n items: this.setItem(item.items, id, newItem)\n };\n }\n\n return item;\n });\n },\n\n mapItem<T extends BasicItemOrGroup>(\n items: T[],\n id: PickId<T>,\n fn: (item: ExtractItem<T>, index: number, array: T[]) => ExtractItem<T>\n ): T[] {\n return items.map((item, index, array) => {\n let newItem = item;\n\n if (item.items) {\n newItem = {\n ...newItem,\n items: this.mapItem(item.items as GenericItemOrGroup<T>[], id, fn)\n };\n }\n\n if (this.isItem(newItem) && item.id === id) {\n newItem = fn(newItem, index, array);\n }\n\n return newItem;\n });\n },\n\n mapTree<T extends BasicItemOrGroup>(\n items: T[],\n fn: (item: ExtractItem<T>, index: number, array: T[]) => ExtractItem<T>\n ): GenericItemOrGroup<T>[] {\n return items.map((item, index, array) => {\n let newItem = item;\n\n if (item.items) {\n newItem = {\n ...newItem,\n items: this.mapTree(item.items as GenericItemOrGroup<T>[], fn)\n };\n }\n\n return this.isItem(newItem) ? fn(newItem, index, array) : newItem;\n });\n },\n\n flatten<T extends BasicItemOrGroup>(\n items: T[],\n ancestors: GenericItemOrGroup<T>[] = [],\n options: { parentFirst?: boolean } = { parentFirst: false }\n ): ExtractItem<T>[] {\n let allItems: ExtractItem<T>[] = [];\n let leafItems: ExtractItem<T>[] = [];\n\n items.forEach(item => {\n if (this.isItem(item)) {\n allItems.push(ancestors.length > 0 ? { ...item, ancestors } : item);\n }\n\n if (item.items) {\n const children = this.flatten(item.items, [...ancestors, item], options);\n\n if (options.parentFirst) {\n leafItems = [...leafItems, ...children];\n } else {\n allItems = [...allItems, ...children];\n }\n }\n });\n\n return options.parentFirst ? [...allItems, ...leafItems] : allItems;\n },\n\n toggleSelected<T extends BasicSelectable>(\n items: T[],\n id: PickId<T>,\n mode?: MenuProps['mode'],\n bool?: boolean\n ): T[] {\n return this.mapTree(items, item => {\n if (this.isItem(item)) {\n if (item.id === id) {\n return {\n ...item,\n selected: bool !== undefined ? bool : !item.selected\n };\n }\n\n if (mode === 'single-select') {\n return {\n ...item,\n selected: false\n };\n }\n }\n\n return item;\n });\n },\n\n selectItem<T extends BasicSelectable>(items: T[], id: PickId<T>, mode?: MenuProps['mode']): T[] {\n return this.toggleSelected(items, id, mode, true);\n },\n\n deselectItem<T extends BasicSelectable>(\n items: T[],\n id: PickId<T>,\n mode?: MenuProps['mode']\n ): T[] {\n return this.toggleSelected(items, id, mode, false);\n },\n\n getSelected<T extends BasicSelectable>(items: T[]): ExtractItem<T>[] {\n return items.reduce<ExtractItem<T>[]>((selections, item) => {\n if (this.isItem(item) && item.selected) {\n selections = [...selections, item];\n }\n\n if (item.items) {\n selections = [...selections, ...this.getSelected(item.items)];\n }\n return selections;\n }, []);\n },\n\n prependTo<T extends BasicItemOrGroup>(\n items: T[],\n newItems: GenericItemOrGroup<T>[],\n id?: PickId<T>\n ): GenericItemOrGroup<T>[] {\n if (id) {\n return this.mapItem(items, id, item => ({\n ...item,\n items: [...newItems, ...(item.items ?? [])]\n }));\n }\n return [...newItems, ...items];\n },\n\n appendTo<T extends BasicItemOrGroup>(\n items: T[],\n newItems: GenericItemOrGroup<T>[],\n id?: PickId<T>\n ): GenericItemOrGroup<T>[] {\n if (id) {\n return this.mapItem(items, id, item => ({\n ...item,\n items: [...(item.items ?? []), ...newItems]\n }));\n }\n return [...items, ...newItems];\n },\n\n getNextItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return items[0];\n let nextItem: GenericItemOrGroup<T> | undefined;\n this.mapItem(items, itemId, (item, index, list) => {\n nextItem = list[index + 1];\n return item;\n });\n return nextItem;\n },\n\n getPrevItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return items[0];\n let prevItem: GenericItemOrGroup<T> | undefined;\n this.mapItem(items, itemId, (item, index, list) => {\n prevItem = list[index - 1];\n return item;\n });\n return prevItem;\n },\n\n getParentItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return undefined;\n const [, parentItem] = this.getPath(items, itemId);\n return parentItem;\n }\n};\n\nexport default helpers;\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/Menu/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAyBtC;;;;GAIG;AACH,MAAM,YAAY,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AO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CACX,KAAU,EACV,MAAkB;QAElB,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { hasProp } from '../../utils';\n\nimport type { MenuProps } from './Menu.types';\n\ntype BasicItemOrGroup = {\n id: unknown;\n primary?: unknown;\n items?: { id: unknown; primary?: unknown }[] | undefined;\n};\n\ntype BasicSelectable = {\n id: unknown;\n primary?: unknown;\n selected?: boolean | undefined;\n disabled?: boolean | undefined;\n items?:\n | {\n id: unknown;\n primary?: unknown;\n selected?: boolean | undefined;\n disabled?: boolean | undefined;\n }[]\n | undefined;\n};\n\n/**\n * An item is selectable only when it renders a selection control, which mirrors the\n * `showCheckmark` condition in MenuItem. Items that don't render a control (e.g. non-selectable\n * parent items with `selected: undefined`, or any disabled item) are excluded.\n */\nconst isSelectable = (item: BasicSelectable) =>\n !item.disabled && (!item.items || typeof item.selected === 'boolean');\n\ntype ExtractItem<T> = Extract<T, { primary: unknown }>;\n\ntype GenericItemOrGroup<T> =\n | T\n | (T extends { items?: (infer U)[] | undefined }\n ? U extends { id: unknown }\n ? U\n : never\n : never);\n\ntype GenericItem<T> = ExtractItem<T> | ExtractItem<GenericItemOrGroup<T>>;\n\ntype PickId<T extends { id: unknown }> = [T] extends [never]\n ? unknown\n : GenericItemOrGroup<T>['id'];\n\nconst helpers = {\n isItem<T extends object>(item: T): item is ExtractItem<T> {\n return hasProp(item, 'primary');\n },\n\n getItem<T extends BasicItemOrGroup>(items: T[], id: PickId<T>): GenericItem<T> | undefined {\n let found: GenericItem<T> | undefined;\n items.some(item => {\n if (this.isItem(item) && item.id === id) {\n found = item;\n return true;\n }\n\n if (item.items) {\n found = this.getItem(item.items, id);\n return !!found;\n }\n\n return false;\n });\n\n return found;\n },\n\n getPath<T extends BasicItemOrGroup>(items: T[], id: PickId<T>): GenericItemOrGroup<T>[] {\n let path: GenericItemOrGroup<T>[] = [];\n items.some(item => {\n if (item.id === id) {\n path = [item];\n return true;\n }\n\n if (item.items) {\n const innerPath = this.getPath(item.items as GenericItemOrGroup<T>[], id);\n if (innerPath.length) path = innerPath.concat(item);\n return !!path.length;\n }\n\n return false;\n });\n\n return path;\n },\n\n setItem<T extends BasicItemOrGroup>(\n items: T[],\n id: PickId<T>,\n newItem: GenericItemOrGroup<T>\n ): T[] {\n return items.map(item => {\n if (item.id === id) return { ...newItem };\n\n if (item.items) {\n return {\n ...item,\n items: this.setItem(item.items, id, newItem)\n };\n }\n\n return item;\n });\n },\n\n mapItem<T extends BasicItemOrGroup>(\n items: T[],\n id: PickId<T>,\n fn: (item: ExtractItem<T>, index: number, array: T[]) => ExtractItem<T>\n ): T[] {\n return items.map((item, index, array) => {\n let newItem = item;\n\n if (item.items) {\n newItem = {\n ...newItem,\n items: this.mapItem(item.items as GenericItemOrGroup<T>[], id, fn)\n };\n }\n\n if (this.isItem(newItem) && item.id === id) {\n newItem = fn(newItem, index, array);\n }\n\n return newItem;\n });\n },\n\n mapTree<T extends BasicItemOrGroup>(\n items: T[],\n fn: (item: ExtractItem<T>, index: number, array: T[]) => ExtractItem<T>\n ): GenericItemOrGroup<T>[] {\n return items.map((item, index, array) => {\n let newItem = item;\n\n if (item.items) {\n newItem = {\n ...newItem,\n items: this.mapTree(item.items as GenericItemOrGroup<T>[], fn)\n };\n }\n\n return this.isItem(newItem) ? fn(newItem, index, array) : newItem;\n });\n },\n\n flatten<T extends BasicItemOrGroup>(\n items: T[],\n ancestors: GenericItemOrGroup<T>[] = [],\n options: { parentFirst?: boolean } = { parentFirst: false }\n ): ExtractItem<T>[] {\n let allItems: ExtractItem<T>[] = [];\n let leafItems: ExtractItem<T>[] = [];\n\n items.forEach(item => {\n if (this.isItem(item)) {\n allItems.push(ancestors.length > 0 ? { ...item, ancestors } : item);\n }\n\n if (item.items) {\n const children = this.flatten(item.items, [...ancestors, item], options);\n\n if (options.parentFirst) {\n leafItems = [...leafItems, ...children];\n } else {\n allItems = [...allItems, ...children];\n }\n }\n });\n\n return options.parentFirst ? [...allItems, ...leafItems] : allItems;\n },\n\n toggleSelected<T extends BasicSelectable>(\n items: T[],\n id: PickId<T>,\n mode?: MenuProps['mode'],\n bool?: boolean\n ): T[] {\n return this.mapTree(items, item => {\n if (this.isItem(item)) {\n if (item.id === id) {\n return {\n ...item,\n selected: bool !== undefined ? bool : !item.selected\n };\n }\n\n if (mode === 'single-select') {\n return {\n ...item,\n selected: false\n };\n }\n }\n\n return item;\n });\n },\n\n selectItem<T extends BasicSelectable>(items: T[], id: PickId<T>, mode?: MenuProps['mode']): T[] {\n return this.toggleSelected(items, id, mode, true);\n },\n\n deselectItem<T extends BasicSelectable>(\n items: T[],\n id: PickId<T>,\n mode?: MenuProps['mode']\n ): T[] {\n return this.toggleSelected(items, id, mode, false);\n },\n\n /**\n * Returns every item in the tree that renders a selection control, traversing groups and\n * nested items at every level. Parent items (`selected: undefined`) and disabled items\n * are excluded.\n */\n getSelectable<T extends BasicSelectable>(items: T[]): ExtractItem<T>[] {\n return this.flatten(items).filter(isSelectable);\n },\n\n /**\n * The aggregate selection state of the tree, shaped for {@link MenuProps.selectAll | `MenuProps['selectAll']`}.\n * `true` when every selectable item is selected, `'partial'` when only some are, and\n * `false` when none are or when there is nothing selectable.\n */\n getSelectionState<T extends BasicSelectable>(\n items: T[]\n ): NonNullable<NonNullable<MenuProps['selectAll']>['selected']> {\n const selectable = this.getSelectable(items);\n const selectedCount = selectable.filter(item => item.selected === true).length;\n\n if (selectedCount === 0) return false;\n\n return selectedCount === selectable.length ? true : 'partial';\n },\n\n getSelected<T extends BasicSelectable>(items: T[]): ExtractItem<T>[] {\n return items.reduce<ExtractItem<T>[]>((selections, item) => {\n if (this.isItem(item) && item.selected) {\n selections = [...selections, item];\n }\n\n if (item.items) {\n selections = [...selections, ...this.getSelected(item.items)];\n }\n return selections;\n }, []);\n },\n\n prependTo<T extends BasicItemOrGroup>(\n items: T[],\n newItems: GenericItemOrGroup<T>[],\n id?: PickId<T>\n ): GenericItemOrGroup<T>[] {\n if (id) {\n return this.mapItem(items, id, item => ({\n ...item,\n items: [...newItems, ...(item.items ?? [])]\n }));\n }\n return [...newItems, ...items];\n },\n\n appendTo<T extends BasicItemOrGroup>(\n items: T[],\n newItems: GenericItemOrGroup<T>[],\n id?: PickId<T>\n ): GenericItemOrGroup<T>[] {\n if (id) {\n return this.mapItem(items, id, item => ({\n ...item,\n items: [...(item.items ?? []), ...newItems]\n }));\n }\n return [...items, ...newItems];\n },\n\n getNextItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return items[0];\n let nextItem: GenericItemOrGroup<T> | undefined;\n this.mapItem(items, itemId, (item, index, list) => {\n nextItem = list[index + 1];\n return item;\n });\n return nextItem;\n },\n\n getPrevItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return items[0];\n let prevItem: GenericItemOrGroup<T> | undefined;\n this.mapItem(items, itemId, (item, index, list) => {\n prevItem = list[index - 1];\n return item;\n });\n return prevItem;\n },\n\n getParentItem<T extends BasicItemOrGroup>(\n items: T[],\n itemId?: PickId<T>\n ): GenericItemOrGroup<T> | undefined {\n if (!itemId) return undefined;\n const [, parentItem] = this.getPath(items, itemId);\n return parentItem;\n }\n};\n\nexport default helpers;\n"]}
|
|
@@ -35,7 +35,7 @@ export interface MenuButtonProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
|
35
35
|
}
|
|
36
36
|
export declare const StyledMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
37
37
|
declare const _default: ForwardRefForwardPropsComponent<MenuButtonProps> & {
|
|
38
|
-
getTestIds: (testIdProp?: TestIdProp["testId"]) => import("
|
|
38
|
+
getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
|
|
39
39
|
};
|
|
40
40
|
export default _default;
|
|
41
41
|
//# sourceMappingURL=MenuButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAIjB,oBAAoB,EAErB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAYrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAKpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EAIjB,oBAAoB,EAErB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACX,MAAM,aAAa,CAAC;AAYrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAKpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAelD,MAAM,WAAW,eAAgB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAC5E,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,qEAAqE;IACrE,KAAK,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC/B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,0BAA0B;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC;IACnE,qCAAqC;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,GAAG,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IACzB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,yOAiB5B,CAAC;;;;AA6TF,wBAA6D"}
|
|
@@ -10,7 +10,9 @@ import Icon, { registerIcon, StyledIcon } from '../Icon';
|
|
|
10
10
|
import * as arrowMicroDownIcon from '../Icon/icons/arrow-micro-down.icon';
|
|
11
11
|
import Flex from '../Flex';
|
|
12
12
|
import { Count } from '../Badges';
|
|
13
|
-
import { getActiveElement, getFocusables, isInstance, withTestIds } from '../../utils';
|
|
13
|
+
import { getActiveElement, getFocusables, isInstance, isTouchDevice, withTestIds } from '../../utils';
|
|
14
|
+
import { StyledMenu, StyledMenuList, StyledMenuListWrapper } from '../Menu/Menu.styles';
|
|
15
|
+
import TouchDialog from '../Dialog/TouchDialog';
|
|
14
16
|
import { getMenuButtonTestIds } from './MenuButton.test-ids';
|
|
15
17
|
registerIcon(arrowMicroDownIcon);
|
|
16
18
|
export const StyledMenuButton = styled.button(({ theme: { base: { spacing } } }) => {
|
|
@@ -54,6 +56,25 @@ StyledMenuButtonChildren.defaultProps = defaultThemeProp;
|
|
|
54
56
|
const StyledMenuButtonPopover = styled(Popover) `
|
|
55
57
|
min-width: 20ch;
|
|
56
58
|
`;
|
|
59
|
+
const StyledMenuTouchDialog = styled(TouchDialog)(({ theme: { base: { spacing } } }) => css `
|
|
60
|
+
${StyledMenu} {
|
|
61
|
+
height: 100%;
|
|
62
|
+
|
|
63
|
+
${StyledMenuListWrapper} {
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
overflow: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:not(:has(footer)) ${StyledMenuList} {
|
|
69
|
+
padding-block-end: calc(${spacing} * 0.5 + var(--appshell-hard-bottom-offset, 0rem));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
${StyledMenuListWrapper} + footer ${StyledButton} {
|
|
73
|
+
padding-block-end: var(--appshell-hard-bottom-offset, 0);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`);
|
|
77
|
+
StyledMenuTouchDialog.defaultProps = defaultThemeProp;
|
|
57
78
|
const MenuButton = forwardRef(function MenuButton(props, ref) {
|
|
58
79
|
const uid = useUID();
|
|
59
80
|
const { testId, id = uid, text, menu, popover, onClick, icon, count, iconOnly = false, showArrow, onKeyDown: onKeyDownProp, ...restProps } = props;
|
|
@@ -63,10 +84,15 @@ const MenuButton = forwardRef(function MenuButton(props, ref) {
|
|
|
63
84
|
// Force re-render when popoverRef is set, so useFocusWithin has a non-null ref to read
|
|
64
85
|
const [, forceRerender] = useElement(null);
|
|
65
86
|
const popoverRef = useConsolidatedRef(popover?.ref, forceRerender);
|
|
87
|
+
const dialogRef = useConsolidatedRef(popover?.ref);
|
|
66
88
|
const filterInputRef = useConsolidatedRef(menu?.filterInputProps?.ref);
|
|
67
89
|
const menuRef = useConsolidatedRef(menu?.ref);
|
|
90
|
+
let popupRole;
|
|
91
|
+
if (menu) {
|
|
92
|
+
popupRole = isTouchDevice ? 'dialog' : menu.role ?? 'menu';
|
|
93
|
+
}
|
|
68
94
|
// FIXME: Type assertion required for issue in useFocusWithin generic
|
|
69
|
-
useFocusWithin([popoverRef, buttonRef], useCallback((isFocused) => {
|
|
95
|
+
useFocusWithin([popoverRef, dialogRef, buttonRef], useCallback((isFocused) => {
|
|
70
96
|
if (!isFocused)
|
|
71
97
|
setIsOpen(false);
|
|
72
98
|
}, []));
|
|
@@ -107,9 +133,11 @@ const MenuButton = forwardRef(function MenuButton(props, ref) {
|
|
|
107
133
|
return;
|
|
108
134
|
}
|
|
109
135
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
136
|
+
// Do not close the drawer when the user is tabbing backwards.
|
|
137
|
+
if (!isTouchDevice)
|
|
138
|
+
setIsOpen(false);
|
|
139
|
+
}, [menu, isTouchDevice, onKeyDownProp]);
|
|
140
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { "data-testid": testIds.root, as: StyledMenuButton, "aria-label": text, ...restProps, id: id, ref: buttonRef, "aria-expanded": isOpen, "aria-haspopup": popupRole, "aria-controls": isOpen ? `${id}-${isTouchDevice ? 'dialog' : 'popover'}` : undefined, label: iconOnly && !isOpen ? text : undefined, onClick: (e) => {
|
|
113
141
|
// e.detail is 0 when triggered by keyboard.
|
|
114
142
|
const mouseClick = e.detail > 0;
|
|
115
143
|
if (isOpen) {
|
|
@@ -127,7 +155,18 @@ const MenuButton = forwardRef(function MenuButton(props, ref) {
|
|
|
127
155
|
if (!isOpen || mouseClick) {
|
|
128
156
|
onClick?.(e);
|
|
129
157
|
}
|
|
130
|
-
}, onKeyDown: onKeyDown, icon: iconOnly, children: _jsxs(Flex, { as: StyledMenuButtonChildren, container: { alignItems: 'center', gap: 1 }, padIcon: iconOnly && showArrow, children: [icon && _jsx(Icon, { name: icon }), !iconOnly && (_jsxs(_Fragment, { children: [_jsx(StyledMenuButtonText, { children: text }), typeof count === 'number' && _jsx(Count, { children: count })] })), ((!iconOnly && showArrow === undefined) || showArrow) && (_jsx(Icon, { name: 'arrow-micro-down' }))] }) }), _jsx(
|
|
158
|
+
}, onKeyDown: onKeyDown, icon: iconOnly, children: _jsxs(Flex, { as: StyledMenuButtonChildren, container: { alignItems: 'center', gap: 1 }, padIcon: iconOnly && showArrow, children: [icon && _jsx(Icon, { name: icon }), !iconOnly && (_jsxs(_Fragment, { children: [_jsx(StyledMenuButtonText, { children: text }), typeof count === 'number' && _jsx(Count, { children: count })] })), ((!iconOnly && showArrow === undefined) || showArrow) && (_jsx(Icon, { name: 'arrow-micro-down' }))] }) }), isTouchDevice ? (_jsx(StyledMenuTouchDialog, { ref: dialogRef, open: !!menu && isOpen, onDismiss: () => {
|
|
159
|
+
setIsOpen(false);
|
|
160
|
+
}, id: `${id}-dialog`, heading: text, onAfterClose: () => {
|
|
161
|
+
if (dialogRef.current?.contains(getActiveElement())) {
|
|
162
|
+
buttonRef.current?.focus();
|
|
163
|
+
}
|
|
164
|
+
}, children: menu && (_jsx(Menu, { testId: testIds.root, ...menu, ref: menuRef, loading: menu.loading, scrollAt: Infinity, items: menu.items, onItemClick: (itemId, e) => {
|
|
165
|
+
if (menu.mode !== 'multi-select') {
|
|
166
|
+
setIsOpen(false);
|
|
167
|
+
}
|
|
168
|
+
menu.onItemClick?.(itemId, e);
|
|
169
|
+
}, focusControlEl: undefined })) })) : (_jsx(StyledMenuButtonPopover, { placement: rtl ? 'bottom-end' : 'bottom-start', hideOnTargetHidden: true, ...popover, id: `${id}-popover`, show: !!menu && isOpen, target: buttonRef.current, ref: popoverRef, onKeyDown: (e) => {
|
|
131
170
|
if (e.key !== 'Tab' || !buttonRef.current)
|
|
132
171
|
return;
|
|
133
172
|
const footerEl = menuRef.current?.querySelector('footer');
|
|
@@ -157,9 +196,10 @@ const MenuButton = forwardRef(function MenuButton(props, ref) {
|
|
|
157
196
|
// When clicking an item (by mouse or keyboard) and the menu is not multi-select, close the menu.
|
|
158
197
|
if (menu.mode !== 'multi-select') {
|
|
159
198
|
setIsOpen(false);
|
|
199
|
+
buttonRef.current?.focus();
|
|
160
200
|
}
|
|
161
201
|
menu.onItemClick?.(itemId, e);
|
|
162
|
-
}, focusControlEl: menu.focusControlEl || buttonRef.current || undefined })) })] }));
|
|
202
|
+
}, focusControlEl: menu.focusControlEl || buttonRef.current || undefined })) }))] }));
|
|
163
203
|
});
|
|
164
204
|
export default withTestIds(MenuButton, getMenuButtonTestIds);
|
|
165
205
|
//# sourceMappingURL=MenuButton.js.map
|