@pega/cosmos-react-core 9.0.0-build.9.9 → 9.0.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 -1
- package/lib/components/AIButton/AIButton.d.ts.map +1 -1
- package/lib/components/AIRewrite/AIRewrite.d.ts +4 -0
- package/lib/components/AIRewrite/AIRewrite.d.ts.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.js +39 -0
- package/lib/components/AIRewrite/AIRewrite.js.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.styles.d.ts +24 -0
- package/lib/components/AIRewrite/AIRewrite.styles.d.ts.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.styles.js +24 -0
- package/lib/components/AIRewrite/AIRewrite.styles.js.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.test-ids.d.ts +2 -0
- package/lib/components/AIRewrite/AIRewrite.test-ids.d.ts.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.test-ids.js +10 -0
- package/lib/components/AIRewrite/AIRewrite.test-ids.js.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.types.d.ts +21 -0
- package/lib/components/AIRewrite/AIRewrite.types.d.ts.map +1 -0
- package/lib/components/AIRewrite/AIRewrite.types.js +2 -0
- package/lib/components/AIRewrite/AIRewrite.types.js.map +1 -0
- package/lib/components/AIRewrite/index.d.ts +4 -0
- package/lib/components/AIRewrite/index.d.ts.map +1 -0
- package/lib/components/AIRewrite/index.js +3 -0
- package/lib/components/AIRewrite/index.js.map +1 -0
- package/lib/components/Actions/Actions.d.ts +2 -0
- package/lib/components/Actions/Actions.d.ts.map +1 -1
- package/lib/components/Actions/Actions.js +34 -8
- package/lib/components/Actions/Actions.js.map +1 -1
- package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +1 -1
- package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +11 -2
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.d.ts +14 -12
- package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.js +36 -16
- package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
- package/lib/components/AppShell/AppNavigationPanel.d.ts +14 -0
- package/lib/components/AppShell/AppNavigationPanel.d.ts.map +1 -0
- package/lib/components/AppShell/AppNavigationPanel.js +173 -0
- package/lib/components/AppShell/AppNavigationPanel.js.map +1 -0
- package/lib/components/AppShell/AppNavigationPanel.types.d.ts +28 -0
- package/lib/components/AppShell/AppNavigationPanel.types.d.ts.map +1 -0
- package/lib/components/AppShell/AppNavigationPanel.types.js +2 -0
- package/lib/components/AppShell/AppNavigationPanel.types.js.map +1 -0
- package/lib/components/AppShell/AppShell.d.ts +2 -5
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +213 -202
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +243 -31
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +574 -128
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +42 -5
- 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 +6 -2
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js +5 -9
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.d.ts +14 -14
- package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.js +0 -1
- package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
- package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellSearch.js +2 -4
- package/lib/components/AppShell/AppShellSearch.js.map +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.d.ts +7 -5
- package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.js +3 -3
- package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
- package/lib/components/AppShell/AppTopNav.d.ts +4 -0
- package/lib/components/AppShell/AppTopNav.d.ts.map +1 -0
- package/lib/components/AppShell/AppTopNav.js +183 -0
- package/lib/components/AppShell/AppTopNav.js.map +1 -0
- package/lib/components/AppShell/AppTopNav.styles.d.ts +946 -0
- package/lib/components/AppShell/AppTopNav.styles.d.ts.map +1 -0
- package/lib/components/AppShell/AppTopNav.styles.js +184 -0
- package/lib/components/AppShell/AppTopNav.styles.js.map +1 -0
- package/lib/components/AppShell/AppTopNav.types.d.ts +16 -0
- package/lib/components/AppShell/AppTopNav.types.d.ts.map +1 -0
- package/lib/components/AppShell/AppTopNav.types.js +2 -0
- package/lib/components/AppShell/AppTopNav.types.js.map +1 -0
- package/lib/components/AppShell/Drawer.d.ts +2 -1
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +15 -14
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/AppShell/Drawer.styles.d.ts +22 -11
- package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.styles.js +37 -40
- package/lib/components/AppShell/Drawer.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationList.js +17 -13
- 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 +125 -65
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/AppShell/ThemeSwitcher.d.ts +11 -0
- package/lib/components/AppShell/ThemeSwitcher.d.ts.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.js +58 -0
- package/lib/components/AppShell/ThemeSwitcher.js.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts +2 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.js +3 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.js.map +1 -0
- package/lib/components/AppShell/TopNavMoreMenu.d.ts +9 -0
- package/lib/components/AppShell/TopNavMoreMenu.d.ts.map +1 -0
- package/lib/components/AppShell/TopNavMoreMenu.js +73 -0
- package/lib/components/AppShell/TopNavMoreMenu.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 +1 -0
- package/lib/components/AppShell/index.js.map +1 -1
- package/lib/components/AppShell/style-utils.d.ts +0 -1
- package/lib/components/AppShell/style-utils.d.ts.map +1 -1
- package/lib/components/AppShell/style-utils.js +0 -1
- package/lib/components/AppShell/style-utils.js.map +1 -1
- package/lib/components/AppShell/useTopNavOverflow.d.ts +17 -0
- package/lib/components/AppShell/useTopNavOverflow.d.ts.map +1 -0
- package/lib/components/AppShell/useTopNavOverflow.js +73 -0
- package/lib/components/AppShell/useTopNavOverflow.js.map +1 -0
- package/lib/components/AppShell/utils.d.ts +9 -0
- package/lib/components/AppShell/utils.d.ts.map +1 -1
- package/lib/components/AppShell/utils.js +16 -1
- package/lib/components/AppShell/utils.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +9 -5
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +13 -8
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Backdrop/Backdrop.d.ts +186 -3
- package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.js +20 -21
- package/lib/components/Backdrop/Backdrop.js.map +1 -1
- package/lib/components/Badges/Alert.d.ts +1 -1
- package/lib/components/Badges/Alert.d.ts.map +1 -1
- package/lib/components/Badges/Count.d.ts +4 -2
- package/lib/components/Badges/Count.d.ts.map +1 -1
- package/lib/components/Badges/Count.js +9 -3
- package/lib/components/Badges/Count.js.map +1 -1
- package/lib/components/Badges/Keyboard.d.ts +1 -1
- package/lib/components/Badges/Keyboard.d.ts.map +1 -1
- package/lib/components/Badges/Keyboard.js +8 -2
- package/lib/components/Badges/Keyboard.js.map +1 -1
- package/lib/components/Badges/Selection.d.ts +8 -4
- package/lib/components/Badges/Selection.d.ts.map +1 -1
- package/lib/components/Badges/Selection.js +23 -7
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Badges/Status.d.ts +2 -2
- package/lib/components/Badges/Status.d.ts.map +1 -1
- package/lib/components/Badges/Tag.d.ts +10 -2
- package/lib/components/Badges/Tag.d.ts.map +1 -1
- package/lib/components/Badges/Tag.js.map +1 -1
- package/lib/components/Banner/Banner.d.ts +10 -13
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +49 -102
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/Banner.styles.d.ts +22 -0
- package/lib/components/Banner/Banner.styles.d.ts.map +1 -0
- package/lib/components/Banner/Banner.styles.js +84 -0
- package/lib/components/Banner/Banner.styles.js.map +1 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -3
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/components/Button/BareButton.d.ts +1 -1
- package/lib/components/Button/BareButton.d.ts.map +1 -1
- package/lib/components/Button/BareButton.js +4 -1
- package/lib/components/Button/BareButton.js.map +1 -1
- package/lib/components/Button/BareRoleButton.d.ts +1 -1
- package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
- package/lib/components/Button/Button.d.ts +7 -3
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +22 -8
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Card/Card.d.ts +3 -3
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +25 -25
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.test-ids.d.ts +2 -0
- package/lib/components/Card/Card.test-ids.d.ts.map +1 -0
- package/lib/components/Card/Card.test-ids.js +3 -0
- package/lib/components/Card/Card.test-ids.js.map +1 -0
- package/lib/components/Card/CardContent.d.ts +1 -1
- package/lib/components/Card/CardContent.d.ts.map +1 -1
- package/lib/components/Card/CardContent.js +6 -1
- package/lib/components/Card/CardContent.js.map +1 -1
- package/lib/components/Card/CardFooter.d.ts +1 -1
- package/lib/components/Card/CardFooter.d.ts.map +1 -1
- package/lib/components/Card/CardFooter.js +4 -0
- package/lib/components/Card/CardFooter.js.map +1 -1
- package/lib/components/Card/CardHeader.d.ts +1 -1
- package/lib/components/Card/CardHeader.d.ts.map +1 -1
- package/lib/components/Card/CardHeader.js +19 -3
- package/lib/components/Card/CardHeader.js.map +1 -1
- package/lib/components/Card/CardMedia.d.ts +1 -1
- package/lib/components/Card/CardMedia.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.test-ids.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.test-ids.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.d.ts +11 -3
- package/lib/components/Checkbox/CheckboxCard.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.js +5 -22
- package/lib/components/Checkbox/CheckboxCard.js.map +1 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +7 -0
- package/lib/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/lib/components/CheckboxGroup/CheckboxGroup.js +10 -0
- package/lib/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/lib/components/CheckboxGroup/index.d.ts +2 -1
- package/lib/components/CheckboxGroup/index.d.ts.map +1 -1
- package/lib/components/CheckboxGroup/index.js +1 -1
- package/lib/components/CheckboxGroup/index.js.map +1 -1
- package/lib/components/ClassificationMarking/ClassificationMarking.d.ts +6 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.d.ts.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.js +11 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.js.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts +19 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js +66 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.d.ts +2 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.d.ts.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.js +7 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.test-ids.js.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.types.d.ts +19 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.types.d.ts.map +1 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.types.js +2 -0
- package/lib/components/ClassificationMarking/ClassificationMarking.types.js.map +1 -0
- package/lib/components/ClassificationMarking/index.d.ts +3 -0
- package/lib/components/ClassificationMarking/index.d.ts.map +1 -0
- package/lib/components/ClassificationMarking/index.js +2 -0
- package/lib/components/ClassificationMarking/index.js.map +1 -0
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +9 -8
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.d.ts +8 -3
- package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.js +33 -16
- package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts +1 -0
- 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/MultiSelectInput/MultiSelectInput.d.ts +3 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +84 -10
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +2 -0
- 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 +3 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +33 -4
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +2 -0
- 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/ComboBox/index.d.ts +1 -0
- package/lib/components/ComboBox/index.d.ts.map +1 -1
- package/lib/components/ComboBox/index.js +1 -0
- package/lib/components/ComboBox/index.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +7 -9
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.d.ts +8 -3
- package/lib/components/CompositeInput/CompositeInput.styles.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.js +31 -1
- package/lib/components/CompositeInput/CompositeInput.styles.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +8 -3
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +17 -3
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Configuration/LocaleOverride.d.ts +10 -0
- package/lib/components/Configuration/LocaleOverride.d.ts.map +1 -0
- package/lib/components/Configuration/LocaleOverride.js +23 -0
- package/lib/components/Configuration/LocaleOverride.js.map +1 -0
- package/lib/components/Configuration/index.d.ts +2 -0
- package/lib/components/Configuration/index.d.ts.map +1 -1
- package/lib/components/Configuration/index.js +1 -0
- package/lib/components/Configuration/index.js.map +1 -1
- package/lib/components/CreditCard/CreditCard.types.d.ts +4 -0
- package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
- package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.d.ts +2 -1
- package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.js +1 -1
- package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +1 -1
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.styles.d.ts +4 -2
- package/lib/components/Currency/CurrencyInput.styles.d.ts.map +1 -1
- package/lib/components/DangerButton/DangerButton.d.ts +3 -1
- package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
- package/lib/components/DateTime/DateTime.types.d.ts +7 -1
- 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 +1 -1
- package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts +7 -2
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +16 -8
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +10 -4
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts +11 -7
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +5 -2
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts +4 -2
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +20 -14
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/Duration/DurationInput.js +2 -4
- package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +3 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts +3 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +6 -8
- 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 +21 -12
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts +3 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +2 -2
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts +3 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +3 -3
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +9 -4
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts +3 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +23 -12
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/local.d.ts +10 -9
- package/lib/components/DateTime/Input/local.d.ts.map +1 -1
- package/lib/components/DateTime/Input/local.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +11 -11
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +77 -48
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.d.ts +4 -1
- package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.js +28 -26
- package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts +14 -8
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.js +6 -1
- package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.js +15 -15
- package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +8 -4
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.js +5 -4
- package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.types.d.ts +11 -1
- package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.js +15 -15
- package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.d.ts +2 -0
- package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js +19 -11
- package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/Weeks.d.ts +3 -2
- package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Weeks.js +7 -7
- package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
- package/lib/components/DateTime/Picker/utils.d.ts +4 -3
- package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/utils.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts +8 -1
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +86 -82
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Dialog/Dialog.styles.d.ts +5 -5
- package/lib/components/Dialog/Dialog.styles.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.styles.js +7 -0
- package/lib/components/Dialog/Dialog.styles.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.d.ts +5 -2
- 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 +3 -1
- package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
- package/lib/components/Dialog/FormDialog.js +20 -15
- package/lib/components/Dialog/FormDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
- package/lib/components/Dialog/InfoDialog.js +15 -14
- package/lib/components/Dialog/InfoDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.styles.d.ts +6 -2
- package/lib/components/Dialog/InfoDialog.styles.d.ts.map +1 -1
- package/lib/components/Drawer/Drawer.d.ts +2 -2
- package/lib/components/Drawer/Drawer.d.ts.map +1 -1
- package/lib/components/Drawer/Drawer.js +9 -0
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/Drawer/ResizeHandle.d.ts +2 -1
- package/lib/components/Drawer/ResizeHandle.d.ts.map +1 -1
- package/lib/components/Drawer/ResizeHandle.js +3 -2
- package/lib/components/Drawer/ResizeHandle.js.map +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts +2 -2
- package/lib/components/EmojiPicker/EmojiPicker.styles.d.ts.map +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.js +1 -1
- package/lib/components/EmojiPicker/EmojiPicker.styles.js.map +1 -1
- package/lib/components/EmptyState/EmptyState.d.ts +1 -1
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/ErrorState/ErrorState.d.ts +1 -1
- package/lib/components/ErrorState/ErrorState.d.ts.map +1 -1
- package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts +32 -0
- package/lib/components/ExpandCollapse/ExpandCollapseButton.d.ts.map +1 -0
- package/lib/components/ExpandCollapse/ExpandCollapseButton.js +81 -0
- package/lib/components/ExpandCollapse/ExpandCollapseButton.js.map +1 -0
- package/lib/components/ExpandCollapse/index.d.ts +2 -0
- package/lib/components/ExpandCollapse/index.d.ts.map +1 -1
- package/lib/components/ExpandCollapse/index.js +1 -0
- package/lib/components/ExpandCollapse/index.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts +381 -8
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +27 -22
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.d.ts +2 -2
- package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +61 -48
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +13 -4
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +20 -9
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/FieldValueList/index.d.ts +1 -1
- package/lib/components/FieldValueList/index.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.js +1 -1
- package/lib/components/FieldValueList/index.js.map +1 -1
- package/lib/components/File/FileDisplay.d.ts +1 -1
- package/lib/components/File/FileDisplay.d.ts.map +1 -1
- package/lib/components/File/FileDisplay.js +2 -2
- package/lib/components/File/FileDisplay.js.map +1 -1
- package/lib/components/File/FileInput.d.ts.map +1 -1
- package/lib/components/File/FileInput.js +11 -21
- package/lib/components/File/FileInput.js.map +1 -1
- package/lib/components/File/FileInput.styles.d.ts +753 -17
- package/lib/components/File/FileInput.styles.d.ts.map +1 -1
- package/lib/components/File/FileInput.styles.js +16 -18
- package/lib/components/File/FileInput.styles.js.map +1 -1
- package/lib/components/File/FileItem.d.ts +11 -3
- package/lib/components/File/FileItem.d.ts.map +1 -1
- package/lib/components/File/FileItem.js +29 -12
- package/lib/components/File/FileItem.js.map +1 -1
- package/lib/components/File/FileList.d.ts +184 -2
- package/lib/components/File/FileList.d.ts.map +1 -1
- package/lib/components/File/FileList.js.map +1 -1
- package/lib/components/File/FileUploadItem.js +1 -1
- package/lib/components/File/FileUploadItem.js.map +1 -1
- package/lib/components/File/FileVisual.d.ts +4 -3
- package/lib/components/File/FileVisual.d.ts.map +1 -1
- package/lib/components/Flex/Flex.d.ts +1 -1
- package/lib/components/Flex/Flex.d.ts.map +1 -1
- package/lib/components/Flex/Flex.js +1 -1
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/FormControl/FormControl.d.ts +2 -2
- package/lib/components/FormControl/FormControl.d.ts.map +1 -1
- package/lib/components/FormControl/FormControl.js +65 -54
- package/lib/components/FormControl/FormControl.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts +12 -5
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +98 -61
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/FormField/index.d.ts +1 -1
- package/lib/components/FormField/index.d.ts.map +1 -1
- package/lib/components/FormField/index.js +1 -1
- package/lib/components/FormField/index.js.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.d.ts +3 -5
- package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.js +12 -8
- package/lib/components/Fullscreen/Fullscreen.js.map +1 -1
- package/lib/components/Fullscreen/FullscreenButton.d.ts +3 -1
- package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -1
- package/lib/components/Grid/Grid.d.ts +1 -1
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/HTML/HTML.d.ts +3 -3
- package/lib/components/HTML/HTML.d.ts.map +1 -1
- package/lib/components/HTML/HTML.js +11 -5
- package/lib/components/HTML/HTML.js.map +1 -1
- package/lib/components/HiddenText/HiddenText.d.ts +1 -1
- package/lib/components/HiddenText/HiddenText.d.ts.map +1 -1
- package/lib/components/Icon/Icon.d.ts +4 -4
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +7 -2
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +1 -1
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +17 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.d.ts +5 -0
- package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.js +7 -0
- package/lib/components/Icon/icons/arrow-micro-left-right-reverse.icon.js.map +1 -0
- package/lib/components/Icon/icons/arrow-micro-left-right.icon.d.ts +5 -0
- package/lib/components/Icon/icons/arrow-micro-left-right.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/arrow-micro-left-right.icon.js +7 -0
- package/lib/components/Icon/icons/arrow-micro-left-right.icon.js.map +1 -0
- package/lib/components/Icon/icons/brain.icon.d.ts +5 -0
- package/lib/components/Icon/icons/brain.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/brain.icon.js +7 -0
- package/lib/components/Icon/icons/brain.icon.js.map +1 -0
- package/lib/components/Icon/icons/chats-ai.icon.d.ts +5 -0
- package/lib/components/Icon/icons/chats-ai.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/chats-ai.icon.js +7 -0
- package/lib/components/Icon/icons/chats-ai.icon.js.map +1 -0
- package/lib/components/Icon/icons/check-solid.icon.d.ts +5 -0
- package/lib/components/Icon/icons/check-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/check-solid.icon.js +7 -0
- package/lib/components/Icon/icons/check-solid.icon.js.map +1 -0
- package/lib/components/Icon/icons/clock-sla.icon.d.ts +5 -0
- package/lib/components/Icon/icons/clock-sla.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/clock-sla.icon.js +7 -0
- package/lib/components/Icon/icons/clock-sla.icon.js.map +1 -0
- package/lib/components/Icon/icons/csr-connected.icon.d.ts +5 -0
- package/lib/components/Icon/icons/csr-connected.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/csr-connected.icon.js +7 -0
- package/lib/components/Icon/icons/csr-connected.icon.js.map +1 -0
- package/lib/components/Icon/icons/dataviz-string-field.icon.d.ts.map +1 -1
- package/lib/components/Icon/icons/dataviz-string-field.icon.js +1 -1
- package/lib/components/Icon/icons/dataviz-string-field.icon.js.map +1 -1
- package/lib/components/Icon/icons/gear-box-dotted.icon.d.ts +5 -0
- package/lib/components/Icon/icons/gear-box-dotted.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/gear-box-dotted.icon.js +7 -0
- package/lib/components/Icon/icons/gear-box-dotted.icon.js.map +1 -0
- package/lib/components/Icon/icons/information-solid.icon.js +1 -1
- package/lib/components/Icon/icons/information-solid.icon.js.map +1 -1
- package/lib/components/Icon/icons/information.icon.js +1 -1
- package/lib/components/Icon/icons/information.icon.js.map +1 -1
- package/lib/components/Icon/icons/input-pen.icon.d.ts +5 -0
- package/lib/components/Icon/icons/input-pen.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/input-pen.icon.js +7 -0
- package/lib/components/Icon/icons/input-pen.icon.js.map +1 -0
- package/lib/components/Icon/icons/mcp.icon.d.ts +5 -0
- package/lib/components/Icon/icons/mcp.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/mcp.icon.js +7 -0
- package/lib/components/Icon/icons/mcp.icon.js.map +1 -0
- package/lib/components/Icon/icons/open.icon.d.ts.map +1 -1
- package/lib/components/Icon/icons/open.icon.js +2 -2
- package/lib/components/Icon/icons/open.icon.js.map +1 -1
- package/lib/components/Icon/icons/preview-bottom.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-bottom.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-bottom.icon.js +7 -0
- package/lib/components/Icon/icons/preview-bottom.icon.js.map +1 -0
- package/lib/components/Icon/icons/preview-collapse.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-collapse.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-collapse.icon.js +7 -0
- package/lib/components/Icon/icons/preview-collapse.icon.js.map +1 -0
- package/lib/components/Icon/icons/preview-expand.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-expand.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-expand.icon.js +7 -0
- package/lib/components/Icon/icons/preview-expand.icon.js.map +1 -0
- package/lib/components/Icon/icons/preview-hide.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-hide.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-hide.icon.js +7 -0
- package/lib/components/Icon/icons/preview-hide.icon.js.map +1 -0
- package/lib/components/Icon/icons/preview-rtl.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-rtl.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-rtl.icon.js +7 -0
- package/lib/components/Icon/icons/preview-rtl.icon.js.map +1 -0
- package/lib/components/Icon/icons/script-solid.icon.d.ts +5 -0
- package/lib/components/Icon/icons/script-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/script-solid.icon.js +7 -0
- package/lib/components/Icon/icons/script-solid.icon.js.map +1 -0
- package/lib/components/Icon/icons/user-laptop.icon.d.ts +5 -0
- package/lib/components/Icon/icons/user-laptop.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/user-laptop.icon.js +7 -0
- package/lib/components/Icon/icons/user-laptop.icon.js.map +1 -0
- package/lib/components/Icon/index.d.ts +1 -1
- package/lib/components/Icon/index.d.ts.map +1 -1
- package/lib/components/Icon/index.js +1 -1
- package/lib/components/Icon/index.js.map +1 -1
- package/lib/components/Icon/streamline-icons/animal-print.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/animal-print.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/animal-print.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/animal-print.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/boat-cargo.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/boat-cargo.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/boat-cargo.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/boat-cargo.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/bolt-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/bolt-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/bolt-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/bolt-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/bolt.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/bolt.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/bolt.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/bolt.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/building-globe.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/building-globe.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/building-globe.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/building-globe.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/check-polaris-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/chess.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/chess.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/chess.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/chess.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/clock-sla.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/clock-sla.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/clock-sla.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/clock-sla.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/confetti.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/confetti.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/confetti.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/confetti.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/conveyor-cargo.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/cpu-chip.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/cpu-chip.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/cpu-chip.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/cpu-chip.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/desktop-pencil.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/desktop-pencil.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/desktop-pencil.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/desktop-pencil.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/exchange-case-user.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/exchange-case-user.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/exchange-case-user.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/exchange-case-user.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/exchange-cases.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/exchange-cases.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/exchange-cases.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/exchange-cases.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/factory.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/factory.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/factory.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/factory.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/fast-food.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/fast-food.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/fast-food.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/fast-food.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/field-cursor.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/field-cursor.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/field-group.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/gear-nodes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/gear-nodes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/gear-nodes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/gear-nodes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/heart-rate.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/heart-rate.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/heart-rate.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/heart-rate.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/hexagons.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/hexagons.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/hexagons.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/hexagons.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/layout.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/layout.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/layout.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/layout.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/mcp.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/mcp.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/mcp.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/mcp.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/motherboard.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/motherboard.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/motherboard.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/motherboard.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/oil-tower.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/oil-tower.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/oil-tower.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/oil-tower.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/phone-stethescope.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/phone-stethescope.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/phone-stethescope.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/phone-stethescope.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/piggybank.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/piggybank.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/piggybank.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/piggybank.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/prescription.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/prescription.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/prescription.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/prescription.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/return.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/return.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/return.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/return.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/robot-assembly.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/robot-assembly.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/robot-assembly.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/robot-assembly.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/scale-unequal.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/scale-unequal.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/scale-unequal.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/scale-unequal.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/selection-cursor.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/selection-cursor.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/selection-cursor.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/selection-cursor.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/send-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/send-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/send-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/send-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/sewing-machine.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/sewing-machine.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/sewing-machine.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/sewing-machine.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-currency.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/shield-currency.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-currency.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/shield-currency.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/tablet-rate.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/tablet-rate.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/tablet-rate.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/tablet-rate.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/ticket-movie.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/ticket-movie.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/ticket-movie.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/ticket-movie.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/train.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/train.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/train.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/train.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/translate.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/translate.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/translate.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/translate.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/truck-cargo.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/truck-cargo.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/truck-cargo.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/truck-cargo.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/truck-clock.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/truck-clock.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/truck-clock.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/truck-clock.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/truck.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/truck.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/truck.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/truck.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-laptop.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-laptop.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-laptop.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-laptop.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plane.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-plane.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plane.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-plane.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-polaris-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/veterinarian-dog.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/video-player.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/video-player.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/video-player.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/video-player.icon.js.map +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +63 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/Image/Image.d.ts +1 -1
- package/lib/components/Image/Image.d.ts.map +1 -1
- package/lib/components/Image/Image.js +1 -0
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/InlineEdit/InlineEdit.d.ts +26 -0
- package/lib/components/InlineEdit/InlineEdit.d.ts.map +1 -0
- package/lib/components/InlineEdit/InlineEdit.js +21 -0
- package/lib/components/InlineEdit/InlineEdit.js.map +1 -0
- package/lib/components/InlineEdit/InlineEdit.styles.d.ts +27 -0
- package/lib/components/InlineEdit/InlineEdit.styles.d.ts.map +1 -0
- package/lib/components/InlineEdit/InlineEdit.styles.js +49 -0
- package/lib/components/InlineEdit/InlineEdit.styles.js.map +1 -0
- package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts +3 -0
- package/lib/components/InlineEdit/InlineEdit.test-ids.d.ts.map +1 -0
- package/lib/components/InlineEdit/InlineEdit.test-ids.js +4 -0
- package/lib/components/InlineEdit/InlineEdit.test-ids.js.map +1 -0
- package/lib/components/InlineEdit/index.d.ts +3 -0
- package/lib/components/InlineEdit/index.d.ts.map +1 -0
- package/lib/components/InlineEdit/index.js +2 -0
- package/lib/components/InlineEdit/index.js.map +1 -0
- package/lib/components/Input/Input.js +3 -3
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Input/Input.styles.d.ts +2 -2
- package/lib/components/Input/Input.styles.d.ts.map +1 -1
- package/lib/components/KeyboardCommands/KeyboardCommands.d.ts +6 -0
- package/lib/components/KeyboardCommands/KeyboardCommands.d.ts.map +1 -0
- package/lib/components/KeyboardCommands/KeyboardCommands.js +73 -0
- package/lib/components/KeyboardCommands/KeyboardCommands.js.map +1 -0
- package/lib/components/KeyboardCommands/index.d.ts +3 -0
- package/lib/components/KeyboardCommands/index.d.ts.map +1 -0
- package/lib/components/KeyboardCommands/index.js +3 -0
- package/lib/components/KeyboardCommands/index.js.map +1 -0
- package/lib/components/Label/Label.d.ts +4 -2
- package/lib/components/Label/Label.d.ts.map +1 -1
- package/lib/components/Label/Label.js +5 -1
- package/lib/components/Label/Label.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.js +44 -20
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts +24 -11
- package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.js +33 -5
- package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.d.ts +13 -0
- package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
- package/lib/components/Lightbox/index.d.ts +1 -1
- package/lib/components/Lightbox/index.d.ts.map +1 -1
- package/lib/components/Lightbox/index.js.map +1 -1
- package/lib/components/Link/Link.d.ts +17 -6
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +9 -7
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/List/CommaSeparatedList.d.ts +2 -2
- package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
- package/lib/components/List/List.d.ts +3 -3
- package/lib/components/List/List.d.ts.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 +53 -81
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +405 -15
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +58 -36
- package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.js +0 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +9 -6
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.js +2 -2
- package/lib/components/LiveLog/LiveLog.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.styles.d.ts +1 -1
- package/lib/components/LiveLog/LiveLog.styles.d.ts.map +1 -1
- package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
- package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.d.ts +4 -5
- package/lib/components/Location/GoogleMapsAPI.d.ts.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.js +66 -69
- package/lib/components/Location/GoogleMapsAPI.js.map +1 -1
- package/lib/components/Location/LocationAPI.types.d.ts +2 -3
- package/lib/components/Location/LocationAPI.types.d.ts.map +1 -1
- package/lib/components/Location/LocationAPI.types.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +72 -48
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts +2 -0
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Location/LocationView.js +3 -3
- package/lib/components/Location/LocationView.js.map +1 -1
- package/lib/components/Location/LocationView.styles.d.ts +8 -6
- package/lib/components/Location/LocationView.styles.d.ts.map +1 -1
- package/lib/components/Mark/Mark.d.ts +5 -1
- package/lib/components/Mark/Mark.d.ts.map +1 -1
- package/lib/components/Mark/Mark.js +8 -7
- package/lib/components/Mark/Mark.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +59 -7
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts +21 -15
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +138 -6
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +10 -1
- 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.map +1 -1
- package/lib/components/Menu/MenuItem.js +19 -20
- package/lib/components/Menu/MenuItem.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts +2 -6
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +64 -11
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MetaList/MetaList.d.ts +4 -4
- package/lib/components/MetaList/MetaList.d.ts.map +1 -1
- package/lib/components/Modal/Contexts.d.ts.map +1 -1
- package/lib/components/Modal/Contexts.js +2 -1
- package/lib/components/Modal/Contexts.js.map +1 -1
- package/lib/components/Modal/DockedModals.d.ts.map +1 -1
- package/lib/components/Modal/DockedModals.js +2 -1
- 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 +30 -8
- package/lib/components/Modal/MinimizedModal.js.map +1 -1
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +54 -17
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts +5 -6
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +66 -15
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/Modal/Modal.types.d.ts +19 -3
- package/lib/components/Modal/Modal.types.d.ts.map +1 -1
- package/lib/components/Modal/Modal.types.js.map +1 -1
- package/lib/components/Modal/ModalManager.d.ts.map +1 -1
- package/lib/components/Modal/ModalManager.js +28 -9
- package/lib/components/Modal/ModalManager.js.map +1 -1
- package/lib/components/Modal/useModalMove.d.ts +30 -0
- package/lib/components/Modal/useModalMove.d.ts.map +1 -0
- package/lib/components/Modal/useModalMove.js +148 -0
- package/lib/components/Modal/useModalMove.js.map +1 -0
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts +208 -12
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.js +199 -69
- package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.js +44 -25
- package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts +190 -5
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +40 -11
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +20 -6
- 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 +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.js +7 -4
- package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts +6 -0
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts.map +1 -0
- package/lib/components/MultiStepForm/useFormProgressOverflow.js +35 -0
- package/lib/components/MultiStepForm/useFormProgressOverflow.js.map +1 -0
- package/lib/components/Number/NumberInput.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.js +1 -3
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/NumberInput.styles.d.ts +8 -4
- package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.types.d.ts +4 -0
- package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.types.js.map +1 -1
- package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
- package/lib/components/Number/NumberRangeInput.js +2 -5
- package/lib/components/Number/NumberRangeInput.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +22 -18
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.js +24 -5
- package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.d.ts +12 -6
- package/lib/components/PageTemplates/DashboardPage.d.ts.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.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js +1 -0
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorGridItem.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorGridItem.js +6 -0
- package/lib/components/PageTemplates/GridLayout/EditorGridItem.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.d.ts +6 -0
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js +2 -2
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts +6 -0
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js +2 -2
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/ReactGridLayoutStyles.d.ts +1 -1
- package/lib/components/PageTemplates/GridLayout/ReactGridLayoutStyles.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/ReactResizableStyles.d.ts +1 -1
- package/lib/components/PageTemplates/GridLayout/ReactResizableStyles.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/utils.d.ts +2 -1
- package/lib/components/PageTemplates/GridLayout/utils.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/utils.js +4 -3
- package/lib/components/PageTemplates/GridLayout/utils.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +191 -9
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +31 -16
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Phone/PhoneInput.d.ts +3 -0
- package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
- package/lib/components/Phone/PhoneInput.js +8 -4
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Phone/utils.d.ts +1 -1
- package/lib/components/Phone/utils.d.ts.map +1 -1
- package/lib/components/Phone/utils.js +5 -2
- package/lib/components/Phone/utils.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +18 -10
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.styles.d.ts +3 -3
- package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
- package/lib/components/Popover/Popover.styles.js +13 -9
- package/lib/components/Popover/Popover.styles.js.map +1 -1
- package/lib/components/Popover/modifiers.js +1 -1
- package/lib/components/Popover/modifiers.js.map +1 -1
- package/lib/components/Preview/Contexts.d.ts +5 -0
- package/lib/components/Preview/Contexts.d.ts.map +1 -0
- package/lib/components/Preview/Contexts.js +19 -0
- package/lib/components/Preview/Contexts.js.map +1 -0
- package/lib/components/Preview/Preview.types.d.ts +46 -0
- package/lib/components/Preview/Preview.types.d.ts.map +1 -0
- package/lib/components/Preview/Preview.types.js +2 -0
- package/lib/components/Preview/Preview.types.js.map +1 -0
- package/lib/components/Preview/PreviewManager.d.ts +11 -0
- package/lib/components/Preview/PreviewManager.d.ts.map +1 -0
- package/lib/components/Preview/PreviewManager.js +125 -0
- package/lib/components/Preview/PreviewManager.js.map +1 -0
- package/lib/components/Preview/PreviewPanel.d.ts +7 -0
- package/lib/components/Preview/PreviewPanel.d.ts.map +1 -0
- package/lib/components/Preview/PreviewPanel.js +110 -0
- package/lib/components/Preview/PreviewPanel.js.map +1 -0
- package/lib/components/Preview/PreviewPanel.test-ids.d.ts +2 -0
- package/lib/components/Preview/PreviewPanel.test-ids.d.ts.map +1 -0
- package/lib/components/Preview/PreviewPanel.test-ids.js +6 -0
- package/lib/components/Preview/PreviewPanel.test-ids.js.map +1 -0
- package/lib/components/Preview/index.d.ts +5 -0
- package/lib/components/Preview/index.d.ts.map +1 -0
- package/lib/components/Preview/index.js +4 -0
- package/lib/components/Preview/index.js.map +1 -0
- package/lib/components/Progress/Progress.js +1 -1
- package/lib/components/Progress/Progress.js.map +1 -1
- package/lib/components/Progress/Progress.styles.d.ts +199 -9
- package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
- package/lib/components/Progress/Progress.styles.js +1 -1
- package/lib/components/Progress/Progress.styles.js.map +1 -1
- package/lib/components/QRCode/QRCode.d.ts +1 -1
- package/lib/components/QRCode/QRCode.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButton.test-ids.d.ts +1 -1
- package/lib/components/RadioButton/RadioButton.test-ids.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.d.ts +11 -3
- package/lib/components/RadioButton/RadioButtonCard.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.js +5 -22
- package/lib/components/RadioButton/RadioButtonCard.js.map +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +7 -0
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -0
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +10 -0
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js.map +1 -0
- package/lib/components/RadioButtonGroup/index.d.ts +2 -1
- package/lib/components/RadioButtonGroup/index.d.ts.map +1 -1
- package/lib/components/RadioButtonGroup/index.js +1 -1
- package/lib/components/RadioButtonGroup/index.js.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.d.ts +9 -4
- package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.js +97 -75
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +11 -5
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +70 -19
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/Rating/Rating.d.ts +1 -1
- package/lib/components/Rating/Rating.d.ts.map +1 -1
- package/lib/components/ResponsiveActions/ResponsiveActions.d.ts +2 -2
- package/lib/components/ResponsiveActions/ResponsiveActions.d.ts.map +1 -1
- package/lib/components/ResponsiveActions/ResponsiveActions.js +12 -15
- package/lib/components/ResponsiveActions/ResponsiveActions.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts +7 -7
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +41 -29
- package/lib/components/SearchInput/SearchInput.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.d.ts +21 -13
- package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js +3 -5
- package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
- package/lib/components/Select/Select.d.ts +3 -3
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +14 -11
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.js +50 -29
- package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.styles.d.ts +36 -11
- package/lib/components/SelectionCard/SelectionCard.styles.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.styles.js +226 -62
- package/lib/components/SelectionCard/SelectionCard.styles.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.test-ids.d.ts +2 -2
- package/lib/components/SelectionCard/SelectionCard.test-ids.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.test-ids.js +1 -1
- package/lib/components/SelectionCard/SelectionCard.test-ids.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.types.d.ts +24 -6
- package/lib/components/SelectionCard/SelectionCard.types.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.types.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCardActions.d.ts +8 -0
- package/lib/components/SelectionCard/SelectionCardActions.d.ts.map +1 -0
- package/lib/components/SelectionCard/SelectionCardActions.js +48 -0
- package/lib/components/SelectionCard/SelectionCardActions.js.map +1 -0
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +12 -4
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.js +6 -3
- package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
- package/lib/components/SelectionCard/index.d.ts +1 -1
- package/lib/components/SelectionCard/index.d.ts.map +1 -1
- package/lib/components/SelectionCard/index.js.map +1 -1
- package/lib/components/Sentiment/Sentiment.d.ts +1 -1
- package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
- package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +3 -1
- package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -1
- package/lib/components/Skeleton/LineSkeleton.d.ts +1 -1
- package/lib/components/Skeleton/LineSkeleton.d.ts.map +1 -1
- package/lib/components/Skeleton/RectangleSkeleton.d.ts +1 -1
- package/lib/components/Skeleton/RectangleSkeleton.d.ts.map +1 -1
- package/lib/components/SkipLinks/SkipLinks.d.ts +0 -1
- package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
- package/lib/components/SkipLinks/SkipLinks.js +10 -53
- package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
- package/lib/components/SkipLinks/SkipLinks.styles.d.ts +6 -0
- package/lib/components/SkipLinks/SkipLinks.styles.d.ts.map +1 -0
- package/lib/components/SkipLinks/SkipLinks.styles.js +61 -0
- package/lib/components/SkipLinks/SkipLinks.styles.js.map +1 -0
- package/lib/components/SkipLinks/index.d.ts +1 -1
- package/lib/components/SkipLinks/index.d.ts.map +1 -1
- package/lib/components/SkipLinks/index.js +1 -1
- package/lib/components/SkipLinks/index.js.map +1 -1
- package/lib/components/Slider/Slider.d.ts.map +1 -1
- package/lib/components/Slider/Slider.js +18 -3
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.styles.d.ts +15 -13
- package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
- package/lib/components/Slider/Slider.styles.js +2 -2
- package/lib/components/Slider/Slider.styles.js.map +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts +13 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts.map +1 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js +29 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts +2 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts.map +1 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js +3 -0
- package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js.map +1 -0
- package/lib/components/SpeechToTextButton/index.d.ts +3 -0
- package/lib/components/SpeechToTextButton/index.d.ts.map +1 -0
- package/lib/components/SpeechToTextButton/index.js +2 -0
- package/lib/components/SpeechToTextButton/index.js.map +1 -0
- package/lib/components/SummaryItem/SummaryItem.d.ts +371 -7
- package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.js +3 -1
- package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/SummaryList/SummaryList.d.ts +26 -8
- package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/SummaryList/SummaryList.js +54 -9
- package/lib/components/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/SummaryList/ViewAll.d.ts +10 -4
- package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
- package/lib/components/SummaryList/ViewAll.js +23 -3
- package/lib/components/SummaryList/ViewAll.js.map +1 -1
- package/lib/components/SummaryList/index.d.ts +1 -0
- package/lib/components/SummaryList/index.d.ts.map +1 -1
- package/lib/components/SummaryList/index.js.map +1 -1
- package/lib/components/Switch/Switch.d.ts +3 -3
- package/lib/components/Switch/Switch.d.ts.map +1 -1
- package/lib/components/Switch/Switch.js +14 -5
- package/lib/components/Switch/Switch.js.map +1 -1
- package/lib/components/Table/Table.d.ts +2 -1
- package/lib/components/Table/Table.d.ts.map +1 -1
- package/lib/components/Table/Table.js +1 -0
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Tabs/Tab.d.ts +3 -4
- package/lib/components/Tabs/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.js +111 -106
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/Tabs/TabPanel.d.ts +184 -2
- package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
- package/lib/components/Tabs/TabPanel.js +4 -2
- package/lib/components/Tabs/TabPanel.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.js +24 -1
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/Tabs.styles.d.ts +12 -10
- package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.styles.js +126 -11
- package/lib/components/Tabs/Tabs.styles.js.map +1 -1
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts +3 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +95 -28
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.styles.d.ts +3 -2
- package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.styles.js +2 -0
- package/lib/components/TextArea/TextArea.styles.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts +1 -1
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +5 -5
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/Toaster.types.d.ts +0 -13
- package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.types.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 +5 -0
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tree/StandardTree.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.js +4 -3
- package/lib/components/Tree/StandardTree.js.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +20 -16
- package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.styles.js +11 -10
- package/lib/components/Tree/StandardTree.styles.js.map +1 -1
- package/lib/components/Tree/StandardTree.types.d.ts +2 -2
- package/lib/components/Tree/StandardTree.types.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.types.js.map +1 -1
- package/lib/components/Tree/Tree.d.ts +2 -2
- package/lib/components/Tree/Tree.d.ts.map +1 -1
- package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +1 -1
- package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +5 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useActiveDescendant.d.ts +6 -1
- package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
- package/lib/hooks/useActiveDescendant.js +5 -5
- package/lib/hooks/useActiveDescendant.js.map +1 -1
- package/lib/hooks/useAnimatedText.d.ts +3 -1
- package/lib/hooks/useAnimatedText.d.ts.map +1 -1
- package/lib/hooks/useAnimatedText.js +66 -46
- package/lib/hooks/useAnimatedText.js.map +1 -1
- package/lib/hooks/useArrows.d.ts +27 -7
- package/lib/hooks/useArrows.d.ts.map +1 -1
- package/lib/hooks/useArrows.js +50 -26
- package/lib/hooks/useArrows.js.map +1 -1
- package/lib/hooks/useContentTabIndex.d.ts +17 -0
- package/lib/hooks/useContentTabIndex.d.ts.map +1 -0
- package/lib/hooks/useContentTabIndex.js +48 -0
- package/lib/hooks/useContentTabIndex.js.map +1 -0
- package/lib/hooks/useFocusTrap.d.ts.map +1 -1
- package/lib/hooks/useFocusTrap.js +1 -0
- package/lib/hooks/useFocusTrap.js.map +1 -1
- package/lib/hooks/useFocusWithin.d.ts.map +1 -1
- package/lib/hooks/useFocusWithin.js +11 -6
- package/lib/hooks/useFocusWithin.js.map +1 -1
- package/lib/hooks/useHighlight.d.ts +12 -0
- package/lib/hooks/useHighlight.d.ts.map +1 -0
- package/lib/hooks/useHighlight.js +55 -0
- package/lib/hooks/useHighlight.js.map +1 -0
- package/lib/hooks/useI18n.d.ts +331 -16
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useOS.d.ts +1 -1
- package/lib/hooks/usePreviewContext.d.ts +7 -0
- package/lib/hooks/usePreviewContext.d.ts.map +1 -0
- package/lib/hooks/usePreviewContext.js +12 -0
- package/lib/hooks/usePreviewContext.js.map +1 -0
- package/lib/hooks/usePreviewManager.d.ts +8 -0
- package/lib/hooks/usePreviewManager.d.ts.map +1 -0
- package/lib/hooks/usePreviewManager.js +16 -0
- package/lib/hooks/usePreviewManager.js.map +1 -0
- package/lib/hooks/useScrollStick.js +1 -1
- package/lib/hooks/useScrollStick.js.map +1 -1
- package/lib/hooks/useSpeechRecognition.d.ts +21 -0
- package/lib/hooks/useSpeechRecognition.d.ts.map +1 -0
- package/lib/hooks/useSpeechRecognition.js +123 -0
- package/lib/hooks/useSpeechRecognition.js.map +1 -0
- package/lib/hooks/useThemeMode.d.ts +10 -0
- package/lib/hooks/useThemeMode.d.ts.map +1 -0
- package/lib/hooks/useThemeMode.js +11 -0
- package/lib/hooks/useThemeMode.js.map +1 -0
- package/lib/hooks/useTransitionState.d.ts +3 -2
- package/lib/hooks/useTransitionState.d.ts.map +1 -1
- package/lib/hooks/useTransitionState.js.map +1 -1
- package/lib/i18n/default.d.ts +340 -17
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +379 -36
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +331 -16
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/i18n/translate.d.ts +0 -1
- package/lib/i18n/translate.d.ts.map +1 -1
- package/lib/i18n/translate.js +0 -1
- package/lib/i18n/translate.js.map +1 -1
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -1
- package/lib/styles/GlobalStyle.d.ts +3 -3
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +22 -4
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/styles/animations.d.ts +8 -8
- package/lib/styles/animations.d.ts.map +1 -1
- package/lib/styles/animations.js +71 -53
- package/lib/styles/animations.js.map +1 -1
- package/lib/styles/constants.d.ts +4 -0
- package/lib/styles/constants.d.ts.map +1 -1
- package/lib/styles/constants.js +12 -0
- package/lib/styles/constants.js.map +1 -1
- package/lib/styles/mixins.d.ts +3 -3
- package/lib/styles/mixins.d.ts.map +1 -1
- package/lib/styles/utils.d.ts +35 -4
- package/lib/styles/utils.d.ts.map +1 -1
- package/lib/styles/utils.js +93 -11
- 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 +348 -0
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +212 -4
- package/lib/theme/themeOverrides.schema.json +346 -170
- package/lib/theme/themes/andromeda2025Theme.json +2 -2
- package/lib/theme/themes/aries2023DarkTheme.json +22 -0
- package/lib/theme/themes/bootes2025DarkTheme.json +32 -1
- package/lib/theme/themes/bootes2025Theme.json +11 -2
- package/lib/theme/themes/darkTheme.json +22 -0
- package/lib/theme/themes/orionDarkTheme.json +175 -0
- package/lib/theme/themes/orionTheme.json +155 -0
- package/lib/theme/themes/studioDarkTheme.json +25 -7
- package/lib/theme/themes/studioTheme.json +37 -19
- package/lib/theme/themes/virgoDarkTheme.json +206 -0
- package/lib/theme/themes/virgoTheme.json +166 -0
- package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -1
- package/lib/utils/focusHeadingOrContainer.js +2 -17
- package/lib/utils/focusHeadingOrContainer.js.map +1 -1
- package/lib/utils/focusNonInteractiveElement.d.ts +1 -1
- package/lib/utils/focusNonInteractiveElement.d.ts.map +1 -1
- package/lib/utils/focusNonInteractiveElement.js.map +1 -1
- package/lib/utils/formatListToLocaleString.d.ts +0 -1
- package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
- package/lib/utils/formatListToLocaleString.js +0 -1
- package/lib/utils/formatListToLocaleString.js.map +1 -1
- package/lib/utils/getAllPopovers.d.ts.map +1 -1
- package/lib/utils/getAllPopovers.js +2 -1
- package/lib/utils/getAllPopovers.js.map +1 -1
- package/lib/utils/getEffectiveRect.d.ts +13 -0
- package/lib/utils/getEffectiveRect.d.ts.map +1 -0
- package/lib/utils/getEffectiveRect.js +93 -0
- package/lib/utils/getEffectiveRect.js.map +1 -0
- package/lib/utils/getFocusables.d.ts.map +1 -1
- package/lib/utils/getFocusables.js +2 -1
- package/lib/utils/getFocusables.js.map +1 -1
- package/lib/utils/getParentWindow.d.ts +3 -0
- package/lib/utils/getParentWindow.d.ts.map +1 -0
- package/lib/utils/getParentWindow.js +12 -0
- package/lib/utils/getParentWindow.js.map +1 -0
- package/lib/utils/handleLinkClick.d.ts +33 -0
- package/lib/utils/handleLinkClick.d.ts.map +1 -0
- package/lib/utils/handleLinkClick.js +41 -0
- package/lib/utils/handleLinkClick.js.map +1 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +3 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/markdownTokenizer.d.ts +4 -1
- package/lib/utils/markdownTokenizer.d.ts.map +1 -1
- package/lib/utils/markdownTokenizer.js +46 -13
- package/lib/utils/markdownTokenizer.js.map +1 -1
- package/package.json +6 -5
|
@@ -1,33 +1,42 @@
|
|
|
1
|
-
import { useEffect, useState, useRef } from 'react';
|
|
1
|
+
import { useEffect, useState, useRef, useMemo } from 'react';
|
|
2
2
|
import tokenizeWithMarkdown from '../utils/markdownTokenizer';
|
|
3
|
-
|
|
3
|
+
import usePrevious from './usePrevious';
|
|
4
|
+
const useAnimatedText = ({ text, allContentReceived = false, enabled = true, tokenizeMarkdown = false, cursorStartIndex }) => {
|
|
5
|
+
const initialTokens = 3;
|
|
6
|
+
const maxTokens = 20;
|
|
7
|
+
const phraseSize = 3;
|
|
4
8
|
const [cursor, setCursor] = useState(0); // End pointer
|
|
5
9
|
const [startingCursor, setStartingCursor] = useState(0); // animation starting point
|
|
6
|
-
const [prevText, setPrevText] = useState(text);
|
|
7
10
|
const [isAnimationDone, setIsAnimationDone] = useState(false);
|
|
11
|
+
const currentSpeedRef = useRef(initialTokens);
|
|
8
12
|
const allContentReceivedRef = useRef(allContentReceived);
|
|
9
13
|
allContentReceivedRef.current = allContentReceived;
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
const prevText = usePrevious(text);
|
|
15
|
+
const tokens = useMemo(() => {
|
|
16
|
+
return tokenizeWithMarkdown(text, { tokenizeMarkdown, phraseSize });
|
|
17
|
+
}, [text, tokenizeMarkdown]);
|
|
18
|
+
const visibleText = useMemo(() => {
|
|
19
|
+
return tokens.slice(0, cursor).join('');
|
|
20
|
+
}, [tokens, cursor]);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (cursorStartIndex) {
|
|
23
|
+
setStartingCursor(cursorStartIndex);
|
|
14
24
|
}
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
// A new chunk has arrived
|
|
18
|
-
if (prevText !== text) {
|
|
19
|
-
setPrevText(text);
|
|
20
|
-
setStartingCursor(text.startsWith(prevText) ? cursor : 0);
|
|
21
|
-
setIsAnimationDone(false);
|
|
22
|
-
}
|
|
25
|
+
}, []);
|
|
23
26
|
useEffect(() => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
if (prevText !== undefined && prevText !== text) {
|
|
28
|
+
setIsAnimationDone(false);
|
|
29
|
+
setStartingCursor(text.startsWith(prevText) ? cursor : 0);
|
|
30
|
+
}
|
|
31
|
+
}, [text, cursor, prevText]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
// If streaming is disabled or all chunks received - return the whole content
|
|
34
|
+
if (!enabled || allContentReceivedRef.current) {
|
|
35
|
+
setCursor(tokens.length);
|
|
27
36
|
setIsAnimationDone(true);
|
|
37
|
+
currentSpeedRef.current = Math.max(currentSpeedRef.current, maxTokens);
|
|
28
38
|
return;
|
|
29
39
|
}
|
|
30
|
-
const tokens = getTokens(text);
|
|
31
40
|
const targetLength = tokens.length;
|
|
32
41
|
const charactersToAnimate = targetLength - startingCursor;
|
|
33
42
|
// If there are no more characters to animate
|
|
@@ -39,57 +48,68 @@ const useAnimatedText = ({ text, allContentReceived = false, enabled = true, tok
|
|
|
39
48
|
}
|
|
40
49
|
return;
|
|
41
50
|
}
|
|
42
|
-
let
|
|
43
|
-
let startTime;
|
|
51
|
+
let rafId = null;
|
|
52
|
+
let startTime = null;
|
|
44
53
|
let isStopped = false;
|
|
45
|
-
let currentSpeed = 50; // Start with normal speed
|
|
46
54
|
let lastCursor = startingCursor;
|
|
47
|
-
const processTextAnimation = () => {
|
|
55
|
+
const processTextAnimation = (currentTime) => {
|
|
48
56
|
if (isStopped)
|
|
49
57
|
return;
|
|
50
|
-
|
|
51
|
-
if (
|
|
58
|
+
// Stop animation immediately when all content is received
|
|
59
|
+
if (allContentReceivedRef.current) {
|
|
60
|
+
setCursor(tokens.length);
|
|
61
|
+
setIsAnimationDone(true);
|
|
62
|
+
currentSpeedRef.current = Math.max(currentSpeedRef.current, maxTokens);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Initialize start time on first frame
|
|
66
|
+
if (startTime === null) {
|
|
52
67
|
startTime = currentTime;
|
|
53
68
|
}
|
|
54
|
-
// When we have all content with us, speed up streaming animation
|
|
55
|
-
const targetSpeed = allContentReceivedRef.current ? 150 : 50;
|
|
56
69
|
// Smoothly transition to target speed
|
|
57
|
-
const speedDiff =
|
|
58
|
-
|
|
70
|
+
const speedDiff = maxTokens - currentSpeedRef.current;
|
|
71
|
+
currentSpeedRef.current += speedDiff * 0.1; // Smooth transition
|
|
59
72
|
const elapsed = currentTime - startTime;
|
|
60
73
|
const timeStep = elapsed / 1000;
|
|
61
|
-
// Calculate how many
|
|
62
|
-
const expectedCursor = Math.min(startingCursor + timeStep *
|
|
74
|
+
// Calculate how many tokens we should have shown by now
|
|
75
|
+
const expectedCursor = Math.min(startingCursor + timeStep * currentSpeedRef.current, targetLength);
|
|
63
76
|
const newCursor = Math.min(Math.floor(expectedCursor), targetLength);
|
|
77
|
+
const safeCursor = Math.max(newCursor, lastCursor);
|
|
64
78
|
// Skip update if the cursor is at the same token
|
|
65
|
-
if (
|
|
66
|
-
setCursor(
|
|
67
|
-
lastCursor =
|
|
79
|
+
if (safeCursor !== lastCursor) {
|
|
80
|
+
setCursor(safeCursor);
|
|
81
|
+
lastCursor = safeCursor;
|
|
68
82
|
}
|
|
69
83
|
// End condition - stop when we reach the target
|
|
70
|
-
if (
|
|
84
|
+
if (safeCursor >= targetLength && allContentReceivedRef.current) {
|
|
71
85
|
setIsAnimationDone(true);
|
|
72
86
|
return;
|
|
73
87
|
}
|
|
74
88
|
// Continue animation if not done
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
const interval = allContentReceivedRef.current ? 20 : 50; // Faster when complete
|
|
78
|
-
intervalId = setTimeout(processTextAnimation, interval);
|
|
89
|
+
if (safeCursor < targetLength || !allContentReceivedRef.current) {
|
|
90
|
+
rafId = requestAnimationFrame(processTextAnimation); // Schedule next frame
|
|
79
91
|
}
|
|
80
92
|
};
|
|
81
|
-
// Start the animation
|
|
82
|
-
|
|
93
|
+
// Start the animation
|
|
94
|
+
rafId = requestAnimationFrame(processTextAnimation);
|
|
83
95
|
return () => {
|
|
84
96
|
isStopped = true;
|
|
85
|
-
if (
|
|
86
|
-
|
|
97
|
+
if (rafId) {
|
|
98
|
+
cancelAnimationFrame(rafId);
|
|
87
99
|
}
|
|
88
100
|
};
|
|
89
|
-
}, [startingCursor,
|
|
101
|
+
}, [startingCursor, tokens]);
|
|
102
|
+
if (allContentReceived) {
|
|
103
|
+
return {
|
|
104
|
+
text,
|
|
105
|
+
isAnimationDone: true,
|
|
106
|
+
animatedTillCursor: tokens.length
|
|
107
|
+
};
|
|
108
|
+
}
|
|
90
109
|
return {
|
|
91
|
-
text:
|
|
92
|
-
isAnimationDone
|
|
110
|
+
text: visibleText,
|
|
111
|
+
isAnimationDone,
|
|
112
|
+
animatedTillCursor: cursor
|
|
93
113
|
};
|
|
94
114
|
};
|
|
95
115
|
export default useAnimatedText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimatedText.js","sourceRoot":"","sources":["../../src/hooks/useAnimatedText.ts"],"names":[],"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,CAAC;YACrE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAEnD,iDAAiD;YACjD,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;gBAC9B,SAAS,CAAC,UAAU,CAAC,CAAC;gBACtB,UAAU,GAAG,UAAU,CAAC;YAC1B,CAAC;YAED,gDAAgD;YAChD,IAAI,UAAU,IAAI,YAAY,IAAI,qBAAqB,CAAC,OAAO,EAAE,CAAC;gBAChE,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBACzB,OAAO;YACT,CAAC;YAED,iCAAiC;YACjC,IAAI,UAAU,GAAG,YAAY,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,CAAC;gBAChE,KAAK,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB;YAC7E,CAAC;QACH,CAAC,CAAC;QAEF,sBAAsB;QACtB,KAAK,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;QAEpD,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YAEjB,IAAI,KAAK,EAAE,CAAC;gBACV,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7B,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO;YACL,IAAI;YACJ,eAAe,EAAE,IAAI;YACrB,kBAAkB,EAAE,MAAM,CAAC,MAAM;SAClC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,eAAe;QACf,kBAAkB,EAAE,MAAM;KAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useEffect, useState, useRef, useMemo } from 'react';\n\nimport tokenizeWithMarkdown from '../utils/markdownTokenizer';\n\nimport usePrevious from './usePrevious';\n\nconst useAnimatedText = ({\n text,\n allContentReceived = false,\n enabled = true,\n tokenizeMarkdown = false,\n cursorStartIndex\n}: {\n text: string;\n allContentReceived: boolean;\n enabled?: boolean;\n tokenizeMarkdown?: boolean;\n cursorStartIndex?: number;\n}) => {\n const initialTokens = 3;\n const maxTokens = 20;\n const phraseSize = 3;\n\n const [cursor, setCursor] = useState(0); // End pointer\n const [startingCursor, setStartingCursor] = useState(0); // animation starting point\n const [isAnimationDone, setIsAnimationDone] = useState(false);\n\n const currentSpeedRef = useRef(initialTokens);\n const allContentReceivedRef = useRef(allContentReceived);\n allContentReceivedRef.current = allContentReceived;\n\n const prevText = usePrevious(text);\n\n const tokens = useMemo(() => {\n return tokenizeWithMarkdown(text, { tokenizeMarkdown, phraseSize });\n }, [text, tokenizeMarkdown]);\n\n const visibleText = useMemo(() => {\n return tokens.slice(0, cursor).join('');\n }, [tokens, cursor]);\n\n useEffect(() => {\n if (cursorStartIndex) {\n setStartingCursor(cursorStartIndex);\n }\n }, []);\n\n useEffect(() => {\n if (prevText !== undefined && prevText !== text) {\n setIsAnimationDone(false);\n setStartingCursor(text.startsWith(prevText) ? cursor : 0);\n }\n }, [text, cursor, prevText]);\n\n useEffect(() => {\n // If streaming is disabled or all chunks received - return the whole content\n if (!enabled || allContentReceivedRef.current) {\n setCursor(tokens.length);\n setIsAnimationDone(true);\n currentSpeedRef.current = Math.max(currentSpeedRef.current, maxTokens);\n\n return;\n }\n\n const targetLength = tokens.length;\n const charactersToAnimate = targetLength - startingCursor;\n\n // If there are no more characters to animate\n if (charactersToAnimate <= 0) {\n setCursor(targetLength);\n // Only set animation done if we have all content AND no more characters to animate\n if (allContentReceivedRef.current) {\n setIsAnimationDone(true);\n }\n return;\n }\n\n let rafId: number | null = null;\n let startTime: number | null = null;\n let isStopped = false;\n let lastCursor = startingCursor;\n\n const processTextAnimation = (currentTime: number) => {\n if (isStopped) return;\n\n // Stop animation immediately when all content is received\n if (allContentReceivedRef.current) {\n setCursor(tokens.length);\n setIsAnimationDone(true);\n currentSpeedRef.current = Math.max(currentSpeedRef.current, maxTokens);\n return;\n }\n\n // Initialize start time on first frame\n if (startTime === null) {\n startTime = currentTime;\n }\n\n // Smoothly transition to target speed\n const speedDiff = maxTokens - currentSpeedRef.current;\n currentSpeedRef.current += speedDiff * 0.1; // Smooth transition\n\n const elapsed = currentTime - startTime;\n const timeStep = elapsed / 1000;\n\n // Calculate how many tokens we should have shown by now\n const expectedCursor = Math.min(\n startingCursor + timeStep * currentSpeedRef.current,\n targetLength\n );\n const newCursor = Math.min(Math.floor(expectedCursor), targetLength);\n const safeCursor = Math.max(newCursor, lastCursor);\n\n // Skip update if the cursor is at the same token\n if (safeCursor !== lastCursor) {\n setCursor(safeCursor);\n lastCursor = safeCursor;\n }\n\n // End condition - stop when we reach the target\n if (safeCursor >= targetLength && allContentReceivedRef.current) {\n setIsAnimationDone(true);\n return;\n }\n\n // Continue animation if not done\n if (safeCursor < targetLength || !allContentReceivedRef.current) {\n rafId = requestAnimationFrame(processTextAnimation); // Schedule next frame\n }\n };\n\n // Start the animation\n rafId = requestAnimationFrame(processTextAnimation);\n\n return () => {\n isStopped = true;\n\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n };\n }, [startingCursor, tokens]);\n\n if (allContentReceived) {\n return {\n text,\n isAnimationDone: true,\n animatedTillCursor: tokens.length\n };\n }\n\n return {\n text: visibleText,\n isAnimationDone,\n animatedTillCursor: cursor\n };\n};\n\nexport default useAnimatedText;\n"]}
|
package/lib/hooks/useArrows.d.ts
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import type { RefObject, DependencyList } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export type Direction = 'up-down' | 'left-right' | 'both';
|
|
3
|
+
export interface UseArrowsOptions {
|
|
4
|
+
/**
|
|
5
|
+
* If true, the down or up arrow key will navigate to the first or last element if the element currently focused is the last or first index of the selected elements.
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
7
8
|
cycle?: boolean;
|
|
9
|
+
/** A query selector that will determine which elements to cycle through with the arrow keys. The selector will be used in conjunction with [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#selectors). */
|
|
8
10
|
selector?: string;
|
|
9
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Which keys are used to navigate through the list. Use 'both' to bind up/left to previous and down/right to next.
|
|
13
|
+
* @default 'up-down'
|
|
14
|
+
* */
|
|
15
|
+
dir?: Direction;
|
|
16
|
+
/**
|
|
17
|
+
* Keeps one element focusable.
|
|
18
|
+
* @default true
|
|
19
|
+
* */
|
|
10
20
|
allowTabFocus?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Tab index will be updated to -1 for all elements except the one that is currently focused.
|
|
23
|
+
* @default true
|
|
24
|
+
* */
|
|
11
25
|
updateTabIndex?: boolean;
|
|
26
|
+
/** When focus enters the ref, which element should receive focus first if available */
|
|
12
27
|
initialFocusElement?: Element | null;
|
|
13
|
-
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @example useArrows(ref, { cycle, selector });
|
|
31
|
+
* @param ref - A reference to the element that will be navigated through. [React RefObject](https://reactjs.org/docs/refs-and-the-dom.html)
|
|
32
|
+
*/
|
|
33
|
+
declare const useArrows: (ref: RefObject<HTMLElement>, { cycle, selector, dir, allowTabFocus, updateTabIndex, initialFocusElement }?: UseArrowsOptions,
|
|
14
34
|
/** Pass this prop in the internal dependencies when list is dynamic */
|
|
15
35
|
dependencies?: DependencyList) => void;
|
|
16
36
|
export default useArrows;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArrows.d.ts","sourceRoot":"","sources":["../../src/hooks/useArrows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useArrows.d.ts","sourceRoot":"","sources":["../../src/hooks/useArrows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAOvD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wPAAwP;IACxP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;SAGK;IACL,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB;;;SAGK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;SAGK;IACL,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AA2BD;;;GAGG;AACH,QAAA,MAAM,SAAS,GACb,KAAK,SAAS,CAAC,WAAW,CAAC,EAC3B,+EAOG,gBAAqB;AACxB,uEAAuE;AACvE,eAAc,cAAmB,SAiIlC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/lib/hooks/useArrows.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
import { useEffect, useCallback } from 'react';
|
|
1
|
+
import { useEffect, useCallback, useMemo } from 'react';
|
|
2
2
|
import { documentIsAvailable, isInstance } from '../utils';
|
|
3
3
|
import useFocusWithin from './useFocusWithin';
|
|
4
|
+
import useDirection from './useDirection';
|
|
5
|
+
const upDown = { ArrowDown: 'next', ArrowUp: 'prev' };
|
|
6
|
+
const leftRight = { ArrowRight: 'next', ArrowLeft: 'prev' };
|
|
7
|
+
const rtlLeftRight = { ArrowLeft: 'next', ArrowRight: 'prev' };
|
|
4
8
|
const focusable = `
|
|
5
9
|
a[href],
|
|
6
10
|
button:enabled,
|
|
7
11
|
input[type='checkbox']:enabled,
|
|
8
12
|
input[type='radio']:enabled
|
|
9
13
|
`;
|
|
14
|
+
const getInitialFocusIndex = (el, selector, initialFocusElement) => {
|
|
15
|
+
const elements = Array.from(el.querySelectorAll(selector));
|
|
16
|
+
const index = elements.findIndex(focusEl => focusEl === initialFocusElement);
|
|
17
|
+
return index === -1 ? undefined : index;
|
|
18
|
+
};
|
|
10
19
|
/**
|
|
11
20
|
* @example useArrows(ref, { cycle, selector });
|
|
12
21
|
* @param ref - A reference to the element that will be navigated through. [React RefObject](https://reactjs.org/docs/refs-and-the-dom.html)
|
|
13
22
|
*/
|
|
14
|
-
const useArrows = (ref, {
|
|
15
|
-
/** If true, the down or up arrow key will navigate to the first or last element if the element currently focused is the last or first index of the selected elements. */
|
|
16
|
-
cycle = true,
|
|
17
|
-
/** A query selector that will determine which elements to cycle through with the arrow keys. The selector will be used in conjunction with [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#selectors). */
|
|
18
|
-
selector = focusable,
|
|
19
|
-
/** Which keys are used to navigate through the list */
|
|
20
|
-
dir = 'up-down', allowTabFocus = true, updateTabIndex = true,
|
|
21
|
-
/** When focus enters the ref, which element should receive focus first if available */
|
|
22
|
-
initialFocusElement } = {},
|
|
23
|
+
const useArrows = (ref, { cycle = true, selector = focusable, dir = 'up-down', allowTabFocus = true, updateTabIndex = true, initialFocusElement } = {},
|
|
23
24
|
/** Pass this prop in the internal dependencies when list is dynamic */
|
|
24
25
|
dependencies = []) => {
|
|
25
|
-
const
|
|
26
|
+
const { rtl } = useDirection();
|
|
27
|
+
const configuredBindings = useMemo(() => {
|
|
28
|
+
const effectiveLeftRight = rtl ? rtlLeftRight : leftRight;
|
|
29
|
+
if (dir === 'up-down')
|
|
30
|
+
return upDown;
|
|
31
|
+
if (dir === 'left-right')
|
|
32
|
+
return effectiveLeftRight;
|
|
33
|
+
return { ...upDown, ...effectiveLeftRight };
|
|
34
|
+
}, [dir, rtl]);
|
|
26
35
|
const setTabIndexes = useCallback((el, focused) => {
|
|
27
36
|
// don't set tabindex -1 for first element, or the initialFocusElement, or an element with a checked input inside of it to be able to focus it
|
|
28
37
|
const focusableElements = Array.from(el.querySelectorAll(selector));
|
|
@@ -44,7 +53,7 @@ dependencies = []) => {
|
|
|
44
53
|
}
|
|
45
54
|
});
|
|
46
55
|
}
|
|
47
|
-
}, [selector, initialFocusElement, ...dependencies]);
|
|
56
|
+
}, [selector, initialFocusElement, allowTabFocus, ...dependencies]);
|
|
48
57
|
useFocusWithin([ref], focused => {
|
|
49
58
|
if (ref.current && updateTabIndex)
|
|
50
59
|
setTabIndexes(ref.current, focused);
|
|
@@ -53,8 +62,7 @@ dependencies = []) => {
|
|
|
53
62
|
const el = ref.current;
|
|
54
63
|
if (!el)
|
|
55
64
|
return;
|
|
56
|
-
|
|
57
|
-
e.preventDefault();
|
|
65
|
+
const pressedKeyRole = configuredBindings[e.key];
|
|
58
66
|
if (!documentIsAvailable)
|
|
59
67
|
return;
|
|
60
68
|
const items = Array.from(el.querySelectorAll(selector)).filter((item) => isInstance(item, HTMLElement));
|
|
@@ -63,18 +71,25 @@ dependencies = []) => {
|
|
|
63
71
|
const rootNode = el.getRootNode();
|
|
64
72
|
if (!isInstance(rootNode, Document) && !isInstance(rootNode, ShadowRoot))
|
|
65
73
|
return;
|
|
66
|
-
|
|
74
|
+
// If focus is inside the container but on a non-selector element (e.g. a drag handle button),
|
|
75
|
+
// do not steal focus — the element is intentionally handling its own keyboard interaction.
|
|
76
|
+
if (el.contains(rootNode.activeElement) &&
|
|
77
|
+
!items.some(item => item === rootNode.activeElement))
|
|
78
|
+
return;
|
|
79
|
+
if (e.key === 'Home' || e.key === 'End' || pressedKeyRole)
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
const focusIdx = items.findIndex(item => item === rootNode.activeElement);
|
|
67
82
|
const lastIdx = items.length - 1;
|
|
68
83
|
let newFocusIdx;
|
|
69
|
-
if (e.key === 'Home' || (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
if (e.key === 'Home' || (pressedKeyRole === 'next' && focusIdx === -1)) {
|
|
85
|
+
newFocusIdx = initialFocusElement
|
|
86
|
+
? getInitialFocusIndex(el, selector, initialFocusElement) ?? 0
|
|
87
|
+
: 0;
|
|
73
88
|
}
|
|
74
|
-
else if (e.key === 'End' || (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
else if (e.key === 'End' || (pressedKeyRole === 'prev' && focusIdx === -1)) {
|
|
90
|
+
newFocusIdx = initialFocusElement
|
|
91
|
+
? getInitialFocusIndex(el, selector, initialFocusElement) ?? lastIdx
|
|
92
|
+
: lastIdx;
|
|
78
93
|
}
|
|
79
94
|
else if (e.key === 'Enter') {
|
|
80
95
|
if (updateTabIndex) {
|
|
@@ -82,7 +97,7 @@ dependencies = []) => {
|
|
|
82
97
|
}
|
|
83
98
|
return;
|
|
84
99
|
}
|
|
85
|
-
else if (
|
|
100
|
+
else if (pressedKeyRole === 'next') {
|
|
86
101
|
if (focusIdx === lastIdx) {
|
|
87
102
|
if (!cycle)
|
|
88
103
|
return;
|
|
@@ -92,7 +107,7 @@ dependencies = []) => {
|
|
|
92
107
|
newFocusIdx = focusIdx + 1;
|
|
93
108
|
}
|
|
94
109
|
}
|
|
95
|
-
else if (
|
|
110
|
+
else if (pressedKeyRole === 'prev') {
|
|
96
111
|
if (focusIdx === 0) {
|
|
97
112
|
if (!cycle)
|
|
98
113
|
return;
|
|
@@ -106,7 +121,16 @@ dependencies = []) => {
|
|
|
106
121
|
return;
|
|
107
122
|
}
|
|
108
123
|
items[newFocusIdx].focus();
|
|
109
|
-
}, [
|
|
124
|
+
}, [
|
|
125
|
+
ref.current,
|
|
126
|
+
cycle,
|
|
127
|
+
selector,
|
|
128
|
+
initialFocusElement,
|
|
129
|
+
configuredBindings,
|
|
130
|
+
updateTabIndex,
|
|
131
|
+
setTabIndexes,
|
|
132
|
+
...dependencies
|
|
133
|
+
]);
|
|
110
134
|
useEffect(() => {
|
|
111
135
|
const el = ref.current;
|
|
112
136
|
if (!el)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArrows.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E;gBACd,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAC3B,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEzC,OAAO,GAAG,EAAE;YACV,EAAE,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useEffect, useCallback } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { documentIsAvailable, isInstance } from '../utils';\n\nimport useFocusWithin from './useFocusWithin';\n\nconst focusable = `\n a[href],\n button:enabled,\n input[type='checkbox']:enabled,\n input[type='radio']:enabled\n`;\n\n/**\n * @example useArrows(ref, { cycle, selector });\n * @param ref - A reference to the element that will be navigated through. [React RefObject](https://reactjs.org/docs/refs-and-the-dom.html)\n */\nconst useArrows = (\n ref: RefObject<HTMLElement>,\n {\n /** If true, the down or up arrow key will navigate to the first or last element if the element currently focused is the last or first index of the selected elements. */\n cycle = true,\n /** A query selector that will determine which elements to cycle through with the arrow keys. The selector will be used in conjunction with [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#selectors). */\n selector = focusable,\n /** Which keys are used to navigate through the list */\n dir = 'up-down',\n allowTabFocus = true,\n updateTabIndex = true,\n /** When focus enters the ref, which element should receive focus first if available */\n initialFocusElement\n }: {\n cycle?: boolean;\n selector?: string;\n dir?: 'up-down' | 'left-right';\n allowTabFocus?: boolean;\n updateTabIndex?: boolean;\n initialFocusElement?: Element | null;\n } = {},\n /** Pass this prop in the internal dependencies when list is dynamic */\n dependencies: DependencyList = []\n) => {\n const [NextKey, PrevKey] =\n dir === 'up-down' ? ['ArrowDown', 'ArrowUp'] : ['ArrowRight', 'ArrowLeft'];\n\n const setTabIndexes = useCallback(\n (el: HTMLElement, focused: boolean) => {\n // don't set tabindex -1 for first element, or the initialFocusElement, or an element with a checked input inside of it to be able to focus it\n const focusableElements = Array.from(el.querySelectorAll(selector));\n\n if (focusableElements.length > 0) {\n let focusIndex = focusableElements.findIndex(focusEl => focusEl === initialFocusElement);\n if (focusIndex === -1) focusIndex = 0;\n\n (focusableElements[focusIndex] as HTMLElement).tabIndex =\n allowTabFocus && !focused ? 0 : -1;\n focusableElements.splice(focusIndex, 1);\n focusableElements.forEach(item => {\n if (isInstance(item, HTMLElement)) {\n const checked = (item as HTMLInputElement).checked;\n if (!checked) item.tabIndex = -1;\n const includesChecked = item.querySelector('input[type=\"radio\"]:checked');\n if (includesChecked) item.tabIndex = 0;\n }\n });\n }\n },\n [selector, initialFocusElement, ...dependencies]\n );\n\n useFocusWithin([ref], focused => {\n if (ref.current && updateTabIndex) setTabIndexes(ref.current, focused);\n });\n\n const listener = useCallback(\n (e: KeyboardEvent) => {\n const el = ref.current;\n if (!el) return;\n if (['Home', 'End', NextKey, PrevKey].includes(e.key)) e.preventDefault();\n\n if (!documentIsAvailable) return;\n\n const items = Array.from(el.querySelectorAll(selector)).filter((item): item is HTMLElement =>\n isInstance(item, HTMLElement)\n );\n\n if (!items.length) return;\n\n const rootNode = el.getRootNode();\n\n if (!isInstance(rootNode, Document) && !isInstance(rootNode, ShadowRoot)) return;\n\n const focusIdx = items.indexOf(rootNode.activeElement as HTMLElement);\n const lastIdx = items.length - 1;\n let newFocusIdx;\n\n if (e.key === 'Home' || (e.key === NextKey && focusIdx === -1)) {\n const focusableElements = Array.from(el.querySelectorAll(selector));\n const focusIndex = focusableElements.findIndex(focusEl => focusEl === initialFocusElement);\n newFocusIdx = focusIndex === -1 ? 0 : focusIndex;\n } else if (e.key === 'End' || (e.key === PrevKey && focusIdx === -1)) {\n const focusableElements = Array.from(el.querySelectorAll(selector));\n const focusIndex = focusableElements.findIndex(focusEl => focusEl === initialFocusElement);\n newFocusIdx = focusIndex === -1 ? lastIdx : focusIndex;\n } else if (e.key === 'Enter') {\n if (updateTabIndex) {\n setTabIndexes(el, true);\n }\n return;\n } else if (e.key === NextKey) {\n if (focusIdx === lastIdx) {\n if (!cycle) return;\n newFocusIdx = 0;\n } else {\n newFocusIdx = focusIdx + 1;\n }\n } else if (e.key === PrevKey) {\n if (focusIdx === 0) {\n if (!cycle) return;\n newFocusIdx = lastIdx;\n } else {\n newFocusIdx = focusIdx - 1;\n }\n } else {\n return;\n }\n\n items[newFocusIdx].focus();\n },\n [ref.current, cycle, selector, initialFocusElement, ...dependencies]\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n if (updateTabIndex)\n setTimeout(() => {\n setTabIndexes(el, false);\n }, 0);\n el.addEventListener('keydown', listener);\n\n return () => {\n el.removeEventListener('keydown', listener);\n };\n }, [ref.current, selector, listener, initialFocusElement, ...dependencies]);\n};\n\nexport default useArrows;\n"]}
|
|
1
|
+
{"version":3,"file":"useArrows.js","sourceRoot":"","sources":["../../src/hooks/useArrows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAmC1C,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAoC,CAAC;AACxF,MAAM,SAAS,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAoC,CAAC;AAC9F,MAAM,YAAY,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAoC,CAAC;AAEjG,MAAM,SAAS,GAAG;;;;;CAKjB,CAAC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EACD;QACE,GAAG,CAAC,OAAO;QACX,KAAK;QACL,QAAQ;QACR,mBAAmB;QACnB,kBAAkB;QAClB,cAAc;QACd,aAAa;QACb,GAAG,YAAY;KAChB,CACF,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,IAAI,cAAc;YAChB,UAAU,CAAC,GAAG,EAAE;gBACd,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAC3B,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEzC,OAAO,GAAG,EAAE;YACV,EAAE,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useEffect, useCallback, useMemo } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { documentIsAvailable, isInstance } from '../utils';\n\nimport useFocusWithin from './useFocusWithin';\nimport useDirection from './useDirection';\n\nexport type Direction = 'up-down' | 'left-right' | 'both';\n\nexport interface UseArrowsOptions {\n /**\n * If true, the down or up arrow key will navigate to the first or last element if the element currently focused is the last or first index of the selected elements.\n * @default true\n */\n cycle?: boolean;\n /** A query selector that will determine which elements to cycle through with the arrow keys. The selector will be used in conjunction with [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#selectors). */\n selector?: string;\n /**\n * Which keys are used to navigate through the list. Use 'both' to bind up/left to previous and down/right to next.\n * @default 'up-down'\n * */\n dir?: Direction;\n /**\n * Keeps one element focusable.\n * @default true\n * */\n allowTabFocus?: boolean;\n /**\n * Tab index will be updated to -1 for all elements except the one that is currently focused.\n * @default true\n * */\n updateTabIndex?: boolean;\n /** When focus enters the ref, which element should receive focus first if available */\n initialFocusElement?: Element | null;\n}\n\ninterface KeyRoleBinding {\n [key: string]: 'next' | 'prev';\n}\n\nconst upDown = { ArrowDown: 'next', ArrowUp: 'prev' } as const satisfies KeyRoleBinding;\nconst leftRight = { ArrowRight: 'next', ArrowLeft: 'prev' } as const satisfies KeyRoleBinding;\nconst rtlLeftRight = { ArrowLeft: 'next', ArrowRight: 'prev' } as const satisfies KeyRoleBinding;\n\nconst focusable = `\n a[href],\n button:enabled,\n input[type='checkbox']:enabled,\n input[type='radio']:enabled\n`;\n\nconst getInitialFocusIndex = (\n el: HTMLElement,\n selector: string,\n initialFocusElement?: Element | null\n) => {\n const elements = Array.from(el.querySelectorAll(selector));\n const index = elements.findIndex(focusEl => focusEl === initialFocusElement);\n return index === -1 ? undefined : index;\n};\n\n/**\n * @example useArrows(ref, { cycle, selector });\n * @param ref - A reference to the element that will be navigated through. [React RefObject](https://reactjs.org/docs/refs-and-the-dom.html)\n */\nconst useArrows = (\n ref: RefObject<HTMLElement>,\n {\n cycle = true,\n selector = focusable,\n dir = 'up-down',\n allowTabFocus = true,\n updateTabIndex = true,\n initialFocusElement\n }: UseArrowsOptions = {},\n /** Pass this prop in the internal dependencies when list is dynamic */\n dependencies: DependencyList = []\n) => {\n const { rtl } = useDirection();\n const configuredBindings = useMemo<KeyRoleBinding>(() => {\n const effectiveLeftRight = rtl ? rtlLeftRight : leftRight;\n if (dir === 'up-down') return upDown;\n if (dir === 'left-right') return effectiveLeftRight;\n return { ...upDown, ...effectiveLeftRight };\n }, [dir, rtl]);\n\n const setTabIndexes = useCallback(\n (el: HTMLElement, focused: boolean) => {\n // don't set tabindex -1 for first element, or the initialFocusElement, or an element with a checked input inside of it to be able to focus it\n const focusableElements = Array.from(el.querySelectorAll(selector));\n\n if (focusableElements.length > 0) {\n let focusIndex = focusableElements.findIndex(focusEl => focusEl === initialFocusElement);\n if (focusIndex === -1) focusIndex = 0;\n\n (focusableElements[focusIndex] as HTMLElement).tabIndex =\n allowTabFocus && !focused ? 0 : -1;\n focusableElements.splice(focusIndex, 1);\n focusableElements.forEach(item => {\n if (isInstance(item, HTMLElement)) {\n const checked = (item as HTMLInputElement).checked;\n if (!checked) item.tabIndex = -1;\n const includesChecked = item.querySelector('input[type=\"radio\"]:checked');\n if (includesChecked) item.tabIndex = 0;\n }\n });\n }\n },\n [selector, initialFocusElement, allowTabFocus, ...dependencies]\n );\n\n useFocusWithin([ref], focused => {\n if (ref.current && updateTabIndex) setTabIndexes(ref.current, focused);\n });\n\n const listener = useCallback(\n (e: KeyboardEvent) => {\n const el = ref.current;\n if (!el) return;\n const pressedKeyRole = configuredBindings[e.key];\n\n if (!documentIsAvailable) return;\n\n const items = Array.from(el.querySelectorAll(selector)).filter((item): item is HTMLElement =>\n isInstance(item, HTMLElement)\n );\n\n if (!items.length) return;\n\n const rootNode = el.getRootNode();\n\n if (!isInstance(rootNode, Document) && !isInstance(rootNode, ShadowRoot)) return;\n\n // If focus is inside the container but on a non-selector element (e.g. a drag handle button),\n // do not steal focus — the element is intentionally handling its own keyboard interaction.\n if (\n el.contains(rootNode.activeElement) &&\n !items.some(item => item === rootNode.activeElement)\n )\n return;\n\n if (e.key === 'Home' || e.key === 'End' || pressedKeyRole) e.preventDefault();\n\n const focusIdx = items.findIndex(item => item === rootNode.activeElement);\n const lastIdx = items.length - 1;\n let newFocusIdx;\n\n if (e.key === 'Home' || (pressedKeyRole === 'next' && focusIdx === -1)) {\n newFocusIdx = initialFocusElement\n ? getInitialFocusIndex(el, selector, initialFocusElement) ?? 0\n : 0;\n } else if (e.key === 'End' || (pressedKeyRole === 'prev' && focusIdx === -1)) {\n newFocusIdx = initialFocusElement\n ? getInitialFocusIndex(el, selector, initialFocusElement) ?? lastIdx\n : lastIdx;\n } else if (e.key === 'Enter') {\n if (updateTabIndex) {\n setTabIndexes(el, true);\n }\n return;\n } else if (pressedKeyRole === 'next') {\n if (focusIdx === lastIdx) {\n if (!cycle) return;\n newFocusIdx = 0;\n } else {\n newFocusIdx = focusIdx + 1;\n }\n } else if (pressedKeyRole === 'prev') {\n if (focusIdx === 0) {\n if (!cycle) return;\n newFocusIdx = lastIdx;\n } else {\n newFocusIdx = focusIdx - 1;\n }\n } else {\n return;\n }\n\n items[newFocusIdx].focus();\n },\n [\n ref.current,\n cycle,\n selector,\n initialFocusElement,\n configuredBindings,\n updateTabIndex,\n setTabIndexes,\n ...dependencies\n ]\n );\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n if (updateTabIndex)\n setTimeout(() => {\n setTabIndexes(el, false);\n }, 0);\n el.addEventListener('keydown', listener);\n\n return () => {\n el.removeEventListener('keydown', listener);\n };\n }, [ref.current, selector, listener, initialFocusElement, ...dependencies]);\n};\n\nexport default useArrows;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RefObject, DependencyList } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether a content element should be keyboard-focusable by evaluating if it is
|
|
4
|
+
* scrollable and contains no other focusable elements. Returns a `tabIndex` value of `0` when
|
|
5
|
+
* the content is scrollable but has no focusable children, ensuring keyboard users can still
|
|
6
|
+
* access the scrollable region. Returns `undefined` otherwise.
|
|
7
|
+
* @example useContentTabIndex(dialogRef, dialogContentRef, [closeButtonRef])
|
|
8
|
+
* @example useContentTabIndex(modalRef, modalContentRef, [closeButtonRef], [isLoading])
|
|
9
|
+
* @param containerRef ref of the container element to search for focusables
|
|
10
|
+
* @param contentRef ref of the content element that may need to be focusable
|
|
11
|
+
* @param excludeRefs optional refs to elements that should be excluded from the focusable check (e.g., close button)
|
|
12
|
+
* @param dependencies optional list of variables that will trigger re-evaluation when they are updated (e.g., loading state, content ID)
|
|
13
|
+
* @returns contentTabIndex value (0 or undefined)
|
|
14
|
+
*/
|
|
15
|
+
declare const useContentTabIndex: (containerRef: RefObject<HTMLElement>, contentRef: RefObject<HTMLElement>, excludeRefs?: RefObject<HTMLElement>[], dependencies?: DependencyList) => number | undefined;
|
|
16
|
+
export default useContentTabIndex;
|
|
17
|
+
//# sourceMappingURL=useContentTabIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentTabIndex.d.ts","sourceRoot":"","sources":["../../src/hooks/useContentTabIndex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIvD;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,kBAAkB,GACtB,cAAc,SAAS,CAAC,WAAW,CAAC,EACpC,YAAY,SAAS,CAAC,WAAW,CAAC,EAClC,cAAc,SAAS,CAAC,WAAW,CAAC,EAAE,EACtC,eAAc,cAAmB,uBA+ClC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { getFocusables, testElForOverflow } from '../utils';
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether a content element should be keyboard-focusable by evaluating if it is
|
|
5
|
+
* scrollable and contains no other focusable elements. Returns a `tabIndex` value of `0` when
|
|
6
|
+
* the content is scrollable but has no focusable children, ensuring keyboard users can still
|
|
7
|
+
* access the scrollable region. Returns `undefined` otherwise.
|
|
8
|
+
* @example useContentTabIndex(dialogRef, dialogContentRef, [closeButtonRef])
|
|
9
|
+
* @example useContentTabIndex(modalRef, modalContentRef, [closeButtonRef], [isLoading])
|
|
10
|
+
* @param containerRef ref of the container element to search for focusables
|
|
11
|
+
* @param contentRef ref of the content element that may need to be focusable
|
|
12
|
+
* @param excludeRefs optional refs to elements that should be excluded from the focusable check (e.g., close button)
|
|
13
|
+
* @param dependencies optional list of variables that will trigger re-evaluation when they are updated (e.g., loading state, content ID)
|
|
14
|
+
* @returns contentTabIndex value (0 or undefined)
|
|
15
|
+
*/
|
|
16
|
+
const useContentTabIndex = (containerRef, contentRef, excludeRefs, dependencies = []) => {
|
|
17
|
+
const [contentTabIndex, setContentTabIndex] = useState(undefined);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!contentRef.current)
|
|
20
|
+
return;
|
|
21
|
+
const rafId = requestAnimationFrame(() => {
|
|
22
|
+
const content = contentRef.current;
|
|
23
|
+
if (!content) {
|
|
24
|
+
setContentTabIndex(undefined);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (content.clientHeight === 0 && content.clientWidth === 0) {
|
|
28
|
+
setContentTabIndex(undefined);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const focusables = getFocusables(containerRef);
|
|
32
|
+
const contentHasFocusables = focusables.some(el => content.contains(el) && el !== content && !excludeRefs?.some(ref => ref.current === el));
|
|
33
|
+
const computedStyle = window.getComputedStyle(content);
|
|
34
|
+
const hasOverflowYStyle = computedStyle.overflowY === 'auto' || computedStyle.overflowY === 'scroll';
|
|
35
|
+
const hasOverflowXStyle = computedStyle.overflowX === 'auto' || computedStyle.overflowX === 'scroll';
|
|
36
|
+
const [hasHorizontalOverflow, hasVerticalOverflow] = testElForOverflow(content);
|
|
37
|
+
const isScrollable = (hasOverflowYStyle && hasVerticalOverflow) || (hasOverflowXStyle && hasHorizontalOverflow);
|
|
38
|
+
const newTabIndex = !contentHasFocusables && isScrollable ? 0 : undefined;
|
|
39
|
+
setContentTabIndex(newTabIndex);
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
cancelAnimationFrame(rafId);
|
|
43
|
+
};
|
|
44
|
+
}, dependencies);
|
|
45
|
+
return contentTabIndex;
|
|
46
|
+
};
|
|
47
|
+
export default useContentTabIndex;
|
|
48
|
+
//# sourceMappingURL=useContentTabIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentTabIndex.js","sourceRoot":"","sources":["../../src/hooks/useContentTabIndex.ts"],"names":[],"mappings":"AAAA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,MAAM,iBAAiB,GACrB,aAAa,CAAC,SAAS,KAAK,MAAM,IAAI,aAAa,CAAC,SAAS,KAAK,QAAQ,CAAC;YAE7E,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAEhF,MAAM,YAAY,GAChB,CAAC,iBAAiB,IAAI,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,IAAI,qBAAqB,CAAC,CAAC;YAC7F,MAAM,WAAW,GAAG,CAAC,oBAAoB,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAE1E,kBAAkB,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { getFocusables, testElForOverflow } from '../utils';\n\n/**\n * Determines whether a content element should be keyboard-focusable by evaluating if it is\n * scrollable and contains no other focusable elements. Returns a `tabIndex` value of `0` when\n * the content is scrollable but has no focusable children, ensuring keyboard users can still\n * access the scrollable region. Returns `undefined` otherwise.\n * @example useContentTabIndex(dialogRef, dialogContentRef, [closeButtonRef])\n * @example useContentTabIndex(modalRef, modalContentRef, [closeButtonRef], [isLoading])\n * @param containerRef ref of the container element to search for focusables\n * @param contentRef ref of the content element that may need to be focusable\n * @param excludeRefs optional refs to elements that should be excluded from the focusable check (e.g., close button)\n * @param dependencies optional list of variables that will trigger re-evaluation when they are updated (e.g., loading state, content ID)\n * @returns contentTabIndex value (0 or undefined)\n */\nconst useContentTabIndex = (\n containerRef: RefObject<HTMLElement>,\n contentRef: RefObject<HTMLElement>,\n excludeRefs?: RefObject<HTMLElement>[],\n dependencies: DependencyList = []\n) => {\n const [contentTabIndex, setContentTabIndex] = useState<number | undefined>(undefined);\n\n useEffect(() => {\n if (!contentRef.current) return;\n\n const rafId = requestAnimationFrame(() => {\n const content = contentRef.current;\n if (!content) {\n setContentTabIndex(undefined);\n return;\n }\n\n if (content.clientHeight === 0 && content.clientWidth === 0) {\n setContentTabIndex(undefined);\n return;\n }\n\n const focusables = getFocusables(containerRef);\n\n const contentHasFocusables = focusables.some(\n el =>\n content.contains(el) && el !== content && !excludeRefs?.some(ref => ref.current === el)\n );\n\n const computedStyle = window.getComputedStyle(content);\n const hasOverflowYStyle =\n computedStyle.overflowY === 'auto' || computedStyle.overflowY === 'scroll';\n const hasOverflowXStyle =\n computedStyle.overflowX === 'auto' || computedStyle.overflowX === 'scroll';\n\n const [hasHorizontalOverflow, hasVerticalOverflow] = testElForOverflow(content);\n\n const isScrollable =\n (hasOverflowYStyle && hasVerticalOverflow) || (hasOverflowXStyle && hasHorizontalOverflow);\n const newTabIndex = !contentHasFocusables && isScrollable ? 0 : undefined;\n\n setContentTabIndex(newTabIndex);\n });\n\n return () => {\n cancelAnimationFrame(rafId);\n };\n }, dependencies);\n\n return contentTabIndex;\n};\n\nexport default useContentTabIndex;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMvD;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,GAChB,YAAY,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,EACzC,mBAAkB,OAAc,EAChC,eAAc,cAAmB,EACjC,qBAAoB,OAAc,
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMvD;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,GAChB,YAAY,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,EACzC,mBAAkB,OAAc,EAChC,eAAc,cAAmB,EACjC,qBAAoB,OAAc,SAoDnC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -13,6 +13,7 @@ const useFocusTrap = (elementRef, attachToDocument = true, dependencies = [], re
|
|
|
13
13
|
if (!elementRef?.current)
|
|
14
14
|
return;
|
|
15
15
|
if (e.key === 'Tab') {
|
|
16
|
+
e.stopPropagation();
|
|
16
17
|
const focusables = getFocusables(elementRef);
|
|
17
18
|
const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;
|
|
18
19
|
const activeEl = getActiveElement();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.js","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,CACnB,UAAyC,EACzC,mBAA4B,IAAI,EAChC,eAA+B,EAAE,EACjC,qBAA8B,IAAI,EAClC,EAAE;IACF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAgB,EAAE,EAAE;QACjD,IAAI,CAAC,UAAU,EAAE,OAAO;YAAE,OAAO;QAEjC,IAAI,CAAC,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;YACpB,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;YAC7C,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,UAAU,C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AC,QAAQ,EAAE,CAAC;oBACtB,aAAa,EAAE,KAAK,EAAE,CAAC;gBACzB,CAAC;qBAAM,CAAC;oBACN,cAAc,EAAE,KAAK,EAAE,CAAC;gBAC1B,CAAC;YACH,CAAC;iBAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;gBACrD,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,aAAa,EAAE,KAAK,EAAE,CAAC;YACzB,CAAC;iBAAM,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;gBACrD,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,cAAc,EAAE,KAAK,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { getFocusables, getActiveElement } from '../utils';\n\nimport useEvent from './useEvent';\n\n/**\n * @example useFocusTrap(elementRef)\n * @param elementRef ref of the element in which focus needs to be retained\n * @param addToDocument boolean value to specify if event to be attached to document or to be taken from elementRef, defaults to true\n * @param dependencies list of variables or functions that will initiate this hook when they are updated.\n * @param returnEscapedFocus boolean value to specify if focus that escapes the elementRef should be returned to the elementRef, defaults to true\n */\nconst useFocusTrap = (\n elementRef: RefObject<HTMLElement> | null,\n attachToDocument: boolean = true,\n dependencies: DependencyList = [],\n returnEscapedFocus: boolean = true\n) => {\n const onKeydown = useCallback((e: KeyboardEvent) => {\n if (!elementRef?.current) return;\n\n if (e.key === 'Tab') {\n const focusables = getFocusables(elementRef);\n const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;\n const activeEl = getActiveElement();\n\n const requiresFocus =\n activeEl === elementRef.current ||\n !elementRef.current.contains(activeEl) ||\n (elementRef.current.contains(activeEl) && !focusables.includes(activeEl as HTMLElement));\n\n if (requiresFocus && returnEscapedFocus) {\n e.preventDefault();\n\n if (activeEl) {\n const focusablesWithActiveEl = getFocusables(elementRef, { includeActiveEl: true });\n const activeElIndex = focusablesWithActiveEl.findIndex(el => el === activeEl);\n\n if (activeElIndex !== -1) {\n if (e.shiftKey) {\n const prevIndex =\n (activeElIndex - 1 + focusablesWithActiveEl.length) % focusablesWithActiveEl.length;\n focusablesWithActiveEl[prevIndex].focus();\n } else {\n focusablesWithActiveEl[(activeElIndex + 1) % focusablesWithActiveEl.length].focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey && activeEl === firstFocusable) {\n e.preventDefault();\n lastFocusable?.focus();\n } else if (!e.shiftKey && activeEl === lastFocusable) {\n e.preventDefault();\n firstFocusable?.focus();\n }\n }\n }, dependencies);\n\n useEvent('keydown', onKeydown, { target: attachToDocument ? undefined : elementRef });\n};\n\nexport default useFocusTrap;\n"]}
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,CACnB,UAAyC,EACzC,mBAA4B,IAAI,EAChC,eAA+B,EAAE,EACjC,qBAA8B,IAAI,EAClC,EAAE;IACF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAgB,EAAE,EAAE;QACjD,IA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AC,aAAa,GAAG,CAAC,CAAC,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;wBACtF,CAAC;oBACH,CAAC;yBAAM,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;wBACtB,aAAa,EAAE,KAAK,EAAE,CAAC;oBACzB,CAAC;yBAAM,CAAC;wBACN,cAAc,EAAE,KAAK,EAAE,CAAC;oBAC1B,CAAC;gBACH,CAAC;qBAAM,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;oBACtB,aAAa,EAAE,KAAK,EAAE,CAAC;gBACzB,CAAC;qBAAM,CAAC;oBACN,cAAc,EAAE,KAAK,EAAE,CAAC;gBAC1B,CAAC;YACH,CAAC;iBAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;gBACrD,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,aAAa,EAAE,KAAK,EAAE,CAAC;YACzB,CAAC;iBAAM,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;gBACrD,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,cAAc,EAAE,KAAK,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;IACH,CAAC,EAAE,YAAY,CAAC,CAAC;IAEjB,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { getFocusables, getActiveElement } from '../utils';\n\nimport useEvent from './useEvent';\n\n/**\n * @example useFocusTrap(elementRef)\n * @param elementRef ref of the element in which focus needs to be retained\n * @param addToDocument boolean value to specify if event to be attached to document or to be taken from elementRef, defaults to true\n * @param dependencies list of variables or functions that will initiate this hook when they are updated.\n * @param returnEscapedFocus boolean value to specify if focus that escapes the elementRef should be returned to the elementRef, defaults to true\n */\nconst useFocusTrap = (\n elementRef: RefObject<HTMLElement> | null,\n attachToDocument: boolean = true,\n dependencies: DependencyList = [],\n returnEscapedFocus: boolean = true\n) => {\n const onKeydown = useCallback((e: KeyboardEvent) => {\n if (!elementRef?.current) return;\n\n if (e.key === 'Tab') {\n e.stopPropagation();\n const focusables = getFocusables(elementRef);\n const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;\n const activeEl = getActiveElement();\n\n const requiresFocus =\n activeEl === elementRef.current ||\n !elementRef.current.contains(activeEl) ||\n (elementRef.current.contains(activeEl) && !focusables.includes(activeEl as HTMLElement));\n\n if (requiresFocus && returnEscapedFocus) {\n e.preventDefault();\n\n if (activeEl) {\n const focusablesWithActiveEl = getFocusables(elementRef, { includeActiveEl: true });\n const activeElIndex = focusablesWithActiveEl.findIndex(el => el === activeEl);\n\n if (activeElIndex !== -1) {\n if (e.shiftKey) {\n const prevIndex =\n (activeElIndex - 1 + focusablesWithActiveEl.length) % focusablesWithActiveEl.length;\n focusablesWithActiveEl[prevIndex].focus();\n } else {\n focusablesWithActiveEl[(activeElIndex + 1) % focusablesWithActiveEl.length].focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey && activeEl === firstFocusable) {\n e.preventDefault();\n lastFocusable?.focus();\n } else if (!e.shiftKey && activeEl === lastFocusable) {\n e.preventDefault();\n firstFocusable?.focus();\n }\n }\n }, dependencies);\n\n useEvent('keydown', onKeydown, { target: attachToDocument ? undefined : elementRef });\n};\n\nexport default useFocusTrap;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusWithin.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusWithin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC;;;;GAIG;AACH,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EACzD,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EACvC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,GAAG,IAAI,KAAK,IAAI,KACxE,
|
|
1
|
+
{"version":3,"file":"useFocusWithin.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusWithin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC;;;;GAIG;AACH,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EACzD,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,EACvC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,GAAG,IAAI,KAAK,IAAI,KACxE,OA8IF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|