@pega/cosmos-react-core 9.0.0-build.9.8 → 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,6BAA6B,CAAC;AACzD,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,UAAU,EACX,MAAM,gB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AAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,cAAc,EAAE,cAAc,sBACZ,aAAa,EAC/B,GAAG,EAAE,GAAG,YAEP,IAAI,GACK,EACX,WAAW,IACX,CACJ,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { useRef, forwardRef, useEffect, useState } from 'react';\nimport type { FunctionComponent, Ref, PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport type { ForwardProps } from '../../../types';\nimport FormField from '../../FormField';\nimport Flex from '../../Flex';\nimport Select, { Option } from '../../Select';\nimport Icon, { registerIcon } from '../../Icon';\nimport * as clockIcon from '../../Icon/icons/clock.icon';\nimport Popover from '../../Popover';\nimport TimePicker from '../Picker/TimePicker';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useTestIds\n} from '../../../hooks';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { sameWidth } from '../../Popover/modifiers';\nimport { createClassName, hasProp, withTestIds } from '../../../utils';\nimport type { MinuteInterval } from '../Picker/DatePicker.types';\nimport { getTimeInputTestIds } from '../DateTime.test-ids';\nimport { getAdjustedUTCDateTime } from '../utils';\n\nimport {\n getDateFormat,\n getDateTimeParts,\n parseToDate,\n is12HClockFormat,\n validateTime,\n getTimeOptions\n} from './utils';\nimport type { ClockFormat } from './utils';\nimport StyledDateTime, { StyledInputContainer, StyledInputButton } from './DateTime.styles';\nimport PartInput from './PartInput';\nimport usePickerButton from './usePickerButton';\nimport useAutoFocusNextInput from './useAutoFocusNextInput';\nimport type { TimeParts } from './DateTimeInput.types';\n\nregisterIcon(clockIcon);\n\nexport interface TimeInputProps extends DateTimeProps {\n /**\n * Display the time with seconds.\n * @default false\n */\n withSeconds?: boolean;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n pickerInterval?: MinuteInterval;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledTimeInput = styled(StyledDateTime)<TimeInputProps>`\n padding-inline-end: 0;\n`;\n\nfunction getMeridiem(hour: number | undefined) {\n return hour && hour >= 12 ? 'PM' : 'AM';\n}\n\nconst convertTo12h = (hour: number) => {\n let converted: number = hour;\n if (hour > 12) converted = hour - 12;\n else if (hour === 0) converted = 12;\n return converted;\n};\n\nconst convertTo24h = (hour: number, meridiem: string) => {\n let converted: number = hour;\n if (meridiem === 'PM' && hour < 12) converted = hour + 12;\n else if (meridiem === 'AM' && hour === 12) converted = 0;\n return converted;\n};\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: TimeParts<string | undefined>\n): DateTimeCallbackParameter => {\n const resultDate = Number.isNaN(date.getTime())\n ? new Date(new Date().setUTCHours(0, 0, 0, 0))\n : new Date(date);\n const withSeconds = hasProp(parts, 'second');\n const {\n hour,\n minute,\n second = resultDate.getUTCSeconds().toString(),\n dayPeriod: meridiem\n } = parts;\n const toValidate = withSeconds ? [hour, minute, second] : [hour, minute];\n\n if (toValidate.every(Boolean)) {\n const is12h = meridiem !== undefined;\n\n if (!validateTime(Number(hour), Number(minute), Number(second), 0, is12h)) {\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'invalid'\n };\n }\n\n resultDate.setUTCHours(\n is12h ? convertTo24h(Number(hour), meridiem) : Number(hour),\n Number(minute),\n Number(second),\n date.getUTCMilliseconds() || 0\n );\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([hour, minute].every(p => !p)) {\n return {\n valueAsISOString: undefined,\n valueAsTimestamp: undefined\n };\n }\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'incomplete'\n };\n};\n\nconst TimeInput: FunctionComponent<TimeInputProps & ForwardProps> = forwardRef(function TimeInput(\n props: PropsWithoutRef<TimeInputProps>,\n ref: Ref<HTMLFieldSetElement>\n) {\n const { locale } = useConfiguration();\n const t = useI18n();\n const {\n testId,\n value,\n id,\n label,\n labelHidden,\n status,\n withSeconds = false,\n pickerInterval = 30,\n clockFormat,\n info = getDateFormat(t, locale, withSeconds ? 'time+seconds' : 'time'),\n required,\n readOnly,\n disabled,\n onChange,\n onFocus,\n onBlur,\n onResolveSuggestion,\n autoFocus,\n additionalInfo,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getTimeInputTestIds);\n const date = value !== undefined && value !== '' ? parseToDate(value) : undefined;\n const is12h = clockFormat ? clockFormat === 12 : is12HClockFormat(locale);\n\n const [hourInputRef, minuteInputRef, secondInputRef, meridiemSelectRef] = [\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null),\n useRef<HTMLSelectElement>(null)\n ];\n\n const [hasValue, setHasValue] = useState(!!date);\n useEffect(() => {\n setHasValue(\n !!(\n hourInputRef.current?.value ||\n minuteInputRef.current?.value ||\n (withSeconds && secondInputRef.current?.value)\n )\n );\n }, [date]);\n\n const { description, descriptionID } = useAutoFocusNextInput([\n hourInputRef,\n minuteInputRef,\n secondInputRef\n ]);\n\n const pickParts = () => {\n const parts: TimeParts<string | undefined> = {\n hour: hourInputRef.current?.value || undefined,\n minute: minuteInputRef.current?.value || undefined\n };\n if (withSeconds) parts.second = secondInputRef.current?.value;\n if (is12h) parts.dayPeriod = meridiemSelectRef.current?.value;\n return parts;\n };\n\n const currentlySelectedTime = () => {\n const parts = pickParts();\n\n if (Object.values(parts).every(Boolean)) {\n const hour = Number(parts.hour);\n const minute = Number(parts.minute);\n const second = parts.second ? Number(parts.second) : 0;\n\n const current = date !== undefined ? new Date(date) : getAdjustedUTCDateTime();\n return validateTime(hour, minute, second, 0, is12h)\n ? new Date(\n current.setUTCHours(\n is12h ? convertTo24h(hour, parts.dayPeriod!) : hour,\n minute,\n second,\n date?.getUTCMilliseconds() || 0\n )\n )\n : undefined;\n }\n };\n\n const [open, setOpen, , setPopoverRef, timePickerButtonEl, setTimePickerButtonEl] =\n usePickerButton();\n\n const inputContainerRef = useRef<HTMLDivElement>(null);\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(\n date ? new Date(date) : new Date(),\n pickParts()\n );\n if (onFocus && focused) onFocus(callbackParam);\n if (!focused) {\n if (inputContainerRef.current) inputContainerRef.current.scrollTop = 0;\n onBlur?.(callbackParam);\n }\n };\n\n const onInputChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n setHasValue(\n !!(\n hourInputRef.current?.value ||\n minuteInputRef.current?.value ||\n (withSeconds && secondInputRef.current?.value)\n )\n );\n };\n\n useEffect(() => {\n if (is12h && meridiemSelectRef.current) {\n meridiemSelectRef.current.value = getMeridiem(date?.getUTCHours());\n }\n }, [is12h, date?.getUTCHours()]);\n\n const displayNames = new Intl.DisplayNames(locale, { style: 'long', type: 'dateTimeField' });\n\n const hour = date && is12h ? convertTo12h(date.getUTCHours()) : date?.getUTCHours();\n const HourInput = (\n <PartInput\n data-testid={testIds.controlHour}\n key='hour'\n placeholder={t('hour_placeholder')}\n aria-label={displayNames.of('hour')}\n value={hour}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n min={is12h ? 1 : 0}\n max={is12h ? 12 : 23}\n ref={hourInputRef}\n autoFocus={autoFocus}\n />\n );\n\n const MinuteInput = (\n <PartInput\n data-testid={testIds.controlMinute}\n key='minute'\n placeholder={t('minute_placeholder')}\n aria-label={displayNames.of('minute')}\n value={date?.getUTCMinutes()}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n max={59}\n ref={minuteInputRef}\n />\n );\n\n const SecondInput = (\n <PartInput\n data-testid={testIds.controlSecond}\n key='second'\n placeholder={t('second_placeholder')}\n aria-label={displayNames.of('second')}\n value={date?.getUTCSeconds()}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n max={59}\n ref={secondInputRef}\n />\n );\n\n const Period = (\n <Select\n data-testid={testIds.controlPeriod}\n ref={meridiemSelectRef}\n aria-label={displayNames.of('dayPeriod')}\n key='period'\n required={required}\n disabled={disabled}\n onChange={() => {\n if (Object.values(pickParts()).every(Boolean)) onInputChange();\n }}\n readOnly={readOnly}\n >\n <Option value='AM'>{t('meridiem_value_am')}</Option>\n <Option value='PM'>{t('meridiem_value_pm')}</Option>\n </Select>\n );\n\n const containerRef = useConsolidatedRef(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const Picker = (\n <>\n <StyledInputButton\n data-testid={testIds.openClosePicker}\n variant='simple'\n icon\n ref={setTimePickerButtonEl}\n onClick={() => setOpen(cur => !cur)}\n aria-label={t(open ? 'close_time_button_a11y' : 'open_time_button_a11y')}\n readOnly={readOnly}\n disabled={disabled}\n >\n <Icon name='clock' />\n </StyledInputButton>\n\n <Popover\n show={open}\n ref={setPopoverRef}\n target={containerRef.current}\n placement='bottom-end'\n strategy='fixed'\n modifiers={[sameWidth]}\n >\n <TimePicker\n testId={testIds.picker}\n selected={currentlySelectedTime()}\n interval={pickerInterval}\n onSelect={selected => {\n hourInputRef.current!.value = (\n is12h ? convertTo12h(selected.getUTCHours()) : selected.getUTCHours()\n )\n .toString()\n .padStart(2, '0');\n minuteInputRef.current!.value = selected.getUTCMinutes().toString().padStart(2, '0');\n if (withSeconds)\n secondInputRef.current!.value = selected.getUTCSeconds().toString().padStart(2, '0');\n if (meridiemSelectRef.current) {\n meridiemSelectRef.current.value = getMeridiem(selected.getUTCHours());\n }\n setOpen(false);\n setTimeout(() => timePickerButtonEl?.focus());\n onInputChange();\n }}\n clockFormat={clockFormat}\n />\n </Popover>\n </>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n as={StyledTimeInput}\n forwardedAs={StyledFormControl}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n container={{ alignItems: 'center', wrap: 'nowrap', justify: 'between' }}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={containerRef}\n onClick={(e: MouseEvent) => {\n if (e.target === containerRef.current) hourInputRef.current?.focus();\n }}\n {...restProps}\n className={createClassName('time-input', className, { status })}\n >\n <Flex\n ref={inputContainerRef}\n as={StyledInputContainer}\n container={{ alignItems: 'center', wrap: 'wrap' }}\n >\n {getDateTimeParts(locale, getTimeOptions(withSeconds, is12h)).map(part => {\n switch (part) {\n case 'hour':\n return HourInput;\n case 'minute':\n return MinuteInput;\n case 'second':\n return SecondInput;\n case 'dayPeriod':\n return Period;\n default:\n return part;\n }\n })}\n </Flex>\n {!readOnly && (\n <Flex container>\n {hasValue && (\n <StyledInputButton\n data-testid={testIds.clearCurrentTime}\n aria-label={t('clear_current_time')}\n icon\n onClick={() => {\n hourInputRef.current!.value = '';\n minuteInputRef.current!.value = '';\n if (withSeconds) secondInputRef.current!.value = '';\n if (is12h) meridiemSelectRef.current!.value = t('meridiem_value_am');\n setTimeout(() => timePickerButtonEl?.focus());\n onInputChange();\n }}\n variant='simple'\n compact\n label={t('clear')}\n >\n <Icon name='times' />\n </StyledInputButton>\n )}\n {Picker}\n </Flex>\n )}\n </Flex>\n );\n\n return label ? (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n labelAs='legend'\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n additionalInfo={additionalInfo}\n aria-describedby={descriptionID}\n ref={ref}\n >\n {Comp}\n </FormField>\n {description}\n </>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(TimeInput, getTimeInputTestIds);\n"]}
|
|
1
|
+
{"version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AAK;gCAAE,iBAAiB,CAAC,OAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,mBAAmB,CAAC,CAAC;4BACrE,UAAU,CAAC,GAAG,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAE,CAAC,CAAC;4BAC9C,aAAa,EAAE,CAAC;wBAClB,CAAC,EACD,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,YAEjB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACH,CACrB,EACA,MAAM,IACF,CACR,IACI,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,EACxC,cAAc,EAAE,cAAc,sBACZ,aAAa,EAC/B,GAAG,EAAE,GAAG,YAEP,IAAI,GACK,EACX,WAAW,IACX,CACJ,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { useRef, forwardRef, useEffect, useState } from 'react';\nimport type { FunctionComponent, Ref, PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport type { ForwardProps } from '../../../types';\nimport FormField from '../../FormField';\nimport Flex from '../../Flex';\nimport Select, { Option } from '../../Select';\nimport Icon, { registerIcon } from '../../Icon';\nimport * as clockIcon from '../../Icon/icons/clock.icon';\nimport Popover from '../../Popover';\nimport TimePicker from '../Picker/TimePicker';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useTestIds\n} from '../../../hooks';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { sameWidth } from '../../Popover/modifiers';\nimport { createClassName, hasProp, withTestIds } from '../../../utils';\nimport type { MinuteInterval } from '../Picker/DatePicker.types';\nimport { getTimeInputTestIds } from '../DateTime.test-ids';\nimport { getAdjustedUTCDateTime } from '../utils';\n\nimport {\n getDateFormat,\n getDateTimeParts,\n parseToDate,\n is12HClockFormat,\n validateTime,\n getTimeOptions\n} from './utils';\nimport type { ClockFormat } from './utils';\nimport StyledDateTime, { StyledInputContainer, StyledInputButton } from './DateTime.styles';\nimport PartInput from './PartInput';\nimport usePickerButton from './usePickerButton';\nimport useAutoFocusNextInput from './useAutoFocusNextInput';\nimport type { TimeParts } from './DateTimeInput.types';\n\nregisterIcon(clockIcon);\n\nexport interface TimeInputProps extends DateTimeProps {\n /**\n * Display the time with seconds.\n * @default false\n */\n withSeconds?: boolean;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n pickerInterval?: MinuteInterval;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledTimeInput = styled(StyledDateTime)<TimeInputProps>`\n padding-inline-end: 0;\n`;\n\nfunction getMeridiem(hour: number | undefined) {\n return hour && hour >= 12 ? 'PM' : 'AM';\n}\n\nconst convertTo12h = (hour: number) => {\n let converted: number = hour;\n if (hour > 12) converted = hour - 12;\n else if (hour === 0) converted = 12;\n return converted;\n};\n\nconst convertTo24h = (hour: number, meridiem: string) => {\n let converted: number = hour;\n if (meridiem === 'PM' && hour < 12) converted = hour + 12;\n else if (meridiem === 'AM' && hour === 12) converted = 0;\n return converted;\n};\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: TimeParts<string | undefined>\n): DateTimeCallbackParameter => {\n const resultDate = Number.isNaN(date.getTime())\n ? new Date(new Date().setUTCHours(0, 0, 0, 0))\n : new Date(date);\n const withSeconds = hasProp(parts, 'second');\n const {\n hour,\n minute,\n second = resultDate.getUTCSeconds().toString(),\n dayPeriod: meridiem\n } = parts;\n const toValidate = withSeconds ? [hour, minute, second] : [hour, minute];\n\n if (toValidate.every(Boolean)) {\n const is12h = meridiem !== undefined;\n\n if (!validateTime(Number(hour), Number(minute), Number(second), 0, is12h)) {\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'invalid'\n };\n }\n\n resultDate.setUTCHours(\n is12h ? convertTo24h(Number(hour), meridiem) : Number(hour),\n Number(minute),\n Number(second),\n date.getUTCMilliseconds() || 0\n );\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([hour, minute].every(p => !p)) {\n return {\n valueAsISOString: undefined,\n valueAsTimestamp: undefined\n };\n }\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'incomplete'\n };\n};\n\nconst TimeInput: FunctionComponent<TimeInputProps & ForwardProps> = forwardRef(function TimeInput(\n props: PropsWithoutRef<TimeInputProps>,\n ref: Ref<HTMLFieldSetElement>\n) {\n const { locale } = useConfiguration();\n const t = useI18n();\n const {\n testId,\n value,\n id,\n label,\n labelHidden,\n status,\n withSeconds = false,\n pickerInterval = 30,\n clockFormat,\n info = getDateFormat(t, locale, withSeconds ? 'time+seconds' : 'time'),\n required,\n readOnly,\n disabled,\n onChange,\n onFocus,\n onBlur,\n onResolveSuggestion,\n autoFocus,\n additionalInfo,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getTimeInputTestIds);\n const date = value !== undefined && value !== '' ? parseToDate(value) : undefined;\n const is12h = clockFormat ? clockFormat === 12 : is12HClockFormat(locale);\n\n const [hourInputRef, minuteInputRef, secondInputRef, meridiemSelectRef] = [\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null),\n useRef<HTMLSelectElement>(null)\n ];\n\n const [hasValue, setHasValue] = useState(!!date);\n useEffect(() => {\n setHasValue(\n !!(\n hourInputRef.current?.value ||\n minuteInputRef.current?.value ||\n (withSeconds && secondInputRef.current?.value)\n )\n );\n }, [date]);\n\n const { description, descriptionID } = useAutoFocusNextInput([\n hourInputRef,\n minuteInputRef,\n secondInputRef\n ]);\n\n const pickParts = () => {\n const parts: TimeParts<string | undefined> = {\n hour: hourInputRef.current?.value || undefined,\n minute: minuteInputRef.current?.value || undefined\n };\n if (withSeconds) parts.second = secondInputRef.current?.value;\n if (is12h) parts.dayPeriod = meridiemSelectRef.current?.value;\n return parts;\n };\n\n const currentlySelectedTime = () => {\n const parts = pickParts();\n\n if (Object.values(parts).every(Boolean)) {\n const hour = Number(parts.hour);\n const minute = Number(parts.minute);\n const second = parts.second ? Number(parts.second) : 0;\n\n const current = date !== undefined ? new Date(date) : getAdjustedUTCDateTime();\n return validateTime(hour, minute, second, 0, is12h)\n ? new Date(\n current.setUTCHours(\n is12h ? convertTo24h(hour, parts.dayPeriod!) : hour,\n minute,\n second,\n date?.getUTCMilliseconds() || 0\n )\n )\n : undefined;\n }\n };\n\n const [open, setOpen, , setPopoverRef, timePickerButtonEl, setTimePickerButtonEl] =\n usePickerButton();\n\n const inputContainerRef = useRef<HTMLDivElement>(null);\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(\n date ? new Date(date) : new Date(),\n pickParts()\n );\n if (onFocus && focused) onFocus(callbackParam);\n if (!focused) {\n if (inputContainerRef.current) inputContainerRef.current.scrollTop = 0;\n onBlur?.(callbackParam);\n }\n };\n\n const onInputChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n setHasValue(\n !!(\n hourInputRef.current?.value ||\n minuteInputRef.current?.value ||\n (withSeconds && secondInputRef.current?.value)\n )\n );\n };\n\n useEffect(() => {\n if (is12h && meridiemSelectRef.current) {\n meridiemSelectRef.current.value = getMeridiem(date?.getUTCHours());\n }\n }, [is12h, date?.getUTCHours()]);\n\n const displayNames = new Intl.DisplayNames(locale, { style: 'long', type: 'dateTimeField' });\n\n const hour = date && is12h ? convertTo12h(date.getUTCHours()) : date?.getUTCHours();\n const HourInput = (\n <PartInput\n data-testid={testIds.controlHour}\n key='hour'\n placeholder={t('hour_placeholder')}\n aria-label={displayNames.of('hour')}\n value={hour}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n min={is12h ? 1 : 0}\n max={is12h ? 12 : 23}\n ref={hourInputRef}\n autoFocus={autoFocus}\n />\n );\n\n const MinuteInput = (\n <PartInput\n data-testid={testIds.controlMinute}\n key='minute'\n placeholder={t('minute_placeholder')}\n aria-label={displayNames.of('minute')}\n value={date?.getUTCMinutes()}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n max={59}\n ref={minuteInputRef}\n />\n );\n\n const SecondInput = (\n <PartInput\n data-testid={testIds.controlSecond}\n key='second'\n placeholder={t('second_placeholder')}\n aria-label={displayNames.of('second')}\n value={date?.getUTCSeconds()}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n readOnly={readOnly}\n max={59}\n ref={secondInputRef}\n />\n );\n\n const Period = (\n <Select\n data-testid={testIds.controlPeriod}\n ref={meridiemSelectRef}\n aria-label={displayNames.of('dayPeriod')}\n key='period'\n required={required}\n disabled={disabled}\n onChange={() => {\n if (Object.values(pickParts()).every(Boolean)) onInputChange();\n }}\n readOnly={readOnly}\n >\n <Option value='AM'>{t('meridiem_value_am')}</Option>\n <Option value='PM'>{t('meridiem_value_pm')}</Option>\n </Select>\n );\n\n const containerRef = useConsolidatedRef(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const Picker = (\n <>\n <StyledInputButton\n data-testid={testIds.openClosePicker}\n variant='simple'\n icon\n ref={setTimePickerButtonEl}\n onClick={() => setOpen(cur => !cur)}\n aria-label={t(open ? 'close_time_button_a11y' : 'open_time_button_a11y')}\n readOnly={readOnly}\n disabled={disabled}\n >\n <Icon name='clock' />\n </StyledInputButton>\n\n <Popover\n show={open}\n ref={setPopoverRef}\n target={containerRef.current}\n placement='bottom-end'\n strategy='fixed'\n modifiers={[sameWidth]}\n >\n <TimePicker\n testId={testIds.picker}\n selected={currentlySelectedTime()}\n interval={pickerInterval}\n withSeconds={withSeconds}\n onSelect={selected => {\n hourInputRef.current!.value = (\n is12h ? convertTo12h(selected.getUTCHours()) : selected.getUTCHours()\n )\n .toString()\n .padStart(2, '0');\n minuteInputRef.current!.value = selected.getUTCMinutes().toString().padStart(2, '0');\n if (withSeconds)\n secondInputRef.current!.value = selected.getUTCSeconds().toString().padStart(2, '0');\n if (meridiemSelectRef.current) {\n meridiemSelectRef.current.value = getMeridiem(selected.getUTCHours());\n }\n setOpen(false);\n setTimeout(() => timePickerButtonEl?.focus());\n onInputChange();\n }}\n clockFormat={clockFormat}\n />\n </Popover>\n </>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n as={StyledTimeInput}\n forwardedAs={StyledFormControl}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n container={{ alignItems: 'center', wrap: 'nowrap', justify: 'between' }}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={containerRef}\n onClick={(e: MouseEvent) => {\n if (e.target === containerRef.current) hourInputRef.current?.focus();\n }}\n {...restProps}\n className={createClassName('time-input', className)}\n >\n <Flex\n ref={inputContainerRef}\n as={StyledInputContainer}\n container={{ alignItems: 'center', wrap: 'wrap' }}\n >\n {getDateTimeParts(locale, getTimeOptions(withSeconds, is12h)).map(part => {\n switch (part) {\n case 'hour':\n return HourInput;\n case 'minute':\n return MinuteInput;\n case 'second':\n return SecondInput;\n case 'dayPeriod':\n return Period;\n default:\n return part;\n }\n })}\n </Flex>\n {!readOnly && (\n <Flex container>\n {hasValue && (\n <StyledInputButton\n data-testid={testIds.clearCurrentTime}\n aria-label={t('clear_current_time')}\n icon\n onClick={() => {\n hourInputRef.current!.value = '';\n minuteInputRef.current!.value = '';\n if (withSeconds) secondInputRef.current!.value = '';\n if (is12h) meridiemSelectRef.current!.value = t('meridiem_value_am');\n setTimeout(() => timePickerButtonEl?.focus());\n onInputChange();\n }}\n variant='simple'\n compact\n label={t('clear')}\n >\n <Icon name='times' />\n </StyledInputButton>\n )}\n {Picker}\n </Flex>\n )}\n </Flex>\n );\n\n return label ? (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n additionalInfo={additionalInfo}\n aria-describedby={descriptionID}\n ref={ref}\n >\n {Comp}\n </FormField>\n {description}\n </>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(TimeInput, getTimeInputTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeRangeInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeRangeInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAO,MAAM,OAAO,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EACV,0BAA0B,EAE1B,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAOjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,kCAAkC;IAClC,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAA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
2
|
+
import { forwardRef, useCallback, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import Flex from '../../Flex';
|
|
4
4
|
import { useConsolidatedRef, useFocusWithin, useI18n, useTestIds, useUID } from '../../../hooks';
|
|
5
5
|
import { StyledRangeInputContainer } from '../../Input/Input.styles';
|
|
@@ -16,7 +16,7 @@ const convertToCallbackParameter = (v) => {
|
|
|
16
16
|
valueAsTimestamp: v
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
const TimeRangeInput = forwardRef(function TimeRangeInput({ testId, value = {}, onChange, onFocus, onBlur, label, fromLabel, toLabel, labelHidden, required, readOnly, disabled, min, max, withSeconds, pickerInterval, clockFormat, mode, status, fromAdditionalInfo, toAdditionalInfo, autoFocus, className, ...restProps }, ref) {
|
|
19
|
+
const TimeRangeInput = forwardRef(function TimeRangeInput({ testId, value = {}, onChange, onFocus, onBlur, label, fromLabel, toLabel, labelHidden, required, readOnly, disabled, min, max, withSeconds, pickerInterval, clockFormat, mode, status, timeZone, fromAdditionalInfo, toAdditionalInfo, autoFocus, className, ...restProps }, ref) {
|
|
20
20
|
const testIds = useTestIds(testId, getTimeRangeInputTestIds);
|
|
21
21
|
const t = useI18n();
|
|
22
22
|
const start = value.start === undefined || value.start === ''
|
|
@@ -25,6 +25,10 @@ const TimeRangeInput = forwardRef(function TimeRangeInput({ testId, value = {},
|
|
|
25
25
|
const end = value.end === undefined || value.end === '' ? undefined : parseToDate(value.end).getTime();
|
|
26
26
|
const startTimeRef = useRef(convertToCallbackParameter(start));
|
|
27
27
|
const endTimeRef = useRef(convertToCallbackParameter(end));
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
startTimeRef.current = convertToCallbackParameter(start);
|
|
30
|
+
endTimeRef.current = convertToCallbackParameter(end);
|
|
31
|
+
}, [start, end]);
|
|
28
32
|
const onFocusChange = useCallback((focused) => {
|
|
29
33
|
(focused ? onFocus : onBlur)?.({
|
|
30
34
|
start: startTimeRef.current,
|
|
@@ -42,10 +46,11 @@ const TimeRangeInput = forwardRef(function TimeRangeInput({ testId, value = {},
|
|
|
42
46
|
status,
|
|
43
47
|
withSeconds,
|
|
44
48
|
pickerInterval,
|
|
45
|
-
clockFormat
|
|
49
|
+
clockFormat,
|
|
50
|
+
timeZone
|
|
46
51
|
};
|
|
47
52
|
const descriptionId = useUID();
|
|
48
|
-
return (_jsxs(_Fragment, { children: [_jsx(FormField, { testId: testIds, as: 'fieldset', ...restProps, container: { wrap: 'nowrap' }, ref: containerRef,
|
|
53
|
+
return (_jsxs(_Fragment, { children: [_jsx(FormField, { testId: testIds, as: 'fieldset', ...restProps, container: { wrap: 'nowrap' }, ref: containerRef, label: label, labelHidden: labelHidden, disabled: disabled, required: required, readOnly: readOnly, status: status, "aria-describedby": descriptionId, children: _jsx(Flex, { container: true, as: StyledRangeInputContainer, className: createClassName('time-range-input', className), children: mode === 'time' ? (_jsxs(_Fragment, { children: [_jsx(TimeInput, { testId: testIds.fromTime, ...commonProps, value: value.start, onBlur: changedValue => {
|
|
49
54
|
startTimeRef.current = changedValue;
|
|
50
55
|
if (!Number.isNaN(end))
|
|
51
56
|
endTimeRef.current = convertToCallbackParameter(end);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeRangeInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeRangeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe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,CAAC,CAAC;gCACL,CAAC,EACD,KAAK,EAAE,OAAO,gBACF,GAAG,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EACtE,cAAc,EAAE,gBAAgB,GAChC,IACD,CACJ,GACI,GACG,EACZ,KAAC,UAAU,IAAC,EAAE,EAAE,aAAa,YAAG,CAAC,CAAC,aAAa,CAAC,GAAc,IAC7D,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useRef } from 'react';\nimport type { FunctionComponent, Ref } from 'react';\n\nimport Flex from '../../Flex';\nimport type { FormControlProps } from '../../FormControl';\nimport { useConsolidatedRef, useFocusWithin, useI18n, useTestIds, useUID } from '../../../hooks';\nimport type DateTimeProps from '../DateTime.types';\nimport type {\n DateRangeCallbackParameter,\n DateTimeCallbackParameter,\n DateTimeProperties\n} from '../DateTime.types';\nimport type { ForwardProps } from '../../../types';\nimport { StyledRangeInputContainer } from '../../Input/Input.styles';\nimport type { MinuteInterval } from '../Picker/DatePicker.types';\nimport FormField from '../../FormField';\nimport { getTimeRangeInputTestIds } from '../DateTime.test-ids';\nimport { createClassName, withTestIds } from '../../../utils';\nimport HiddenText from '../../HiddenText';\n\nimport { parseToDate } from './utils';\nimport type { ClockFormat } from './utils';\nimport TimeInput from './TimeInput';\nimport DateTimeInput from './DateTimeInput';\n\nexport interface TimeRangeInputProps extends DateTimeProperties {\n /** Object of range boundaries. */\n value?: { start?: DateTimeProps['value']; end?: DateTimeProps['value'] };\n /** Callback fired when inputs value changes. */\n onChange: (value: DateRangeCallbackParameter) => void;\n /** Callback fired when the component gets focused. */\n onFocus?: (value: DateRangeCallbackParameter) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: DateRangeCallbackParameter) => void;\n /** Pass a string or a fragment with an Icon and string for first part of TimeRangeInput. */\n fromLabel?: FormControlProps['label'];\n /** Pass a string or a fragment with an Icon and string for second part of TimeRangeInput. */\n toLabel?: FormControlProps['label'];\n /** Pass an object with \"heading\" and \"content\" properties to show AdditionalInfo for second part of DataRangeInput. */\n toAdditionalInfo?: FormControlProps['additionalInfo'];\n /** Pass an object with \"heading\" and \"content\" properties to show AdditionalInfo for first part of DataRangeInput. */\n fromAdditionalInfo?: FormControlProps['additionalInfo'];\n /** Controls which input is displayed */\n mode: 'time' | 'datetime';\n /**\n * Display the time with seconds.\n * @default false\n */\n withSeconds?: boolean;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n pickerInterval?: MinuteInterval;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n}\n\nconst convertToCallbackParameter = (v?: number): DateTimeCallbackParameter => {\n return {\n valueAsISOString: v === undefined || Number.isNaN(v) ? undefined : new Date(v).toISOString(),\n valueAsTimestamp: v\n };\n};\n\nconst TimeRangeInput: FunctionComponent<TimeRangeInputProps & ForwardProps> = forwardRef(\n function TimeRangeInput(\n {\n testId,\n value = {},\n onChange,\n onFocus,\n onBlur,\n label,\n fromLabel,\n toLabel,\n labelHidden,\n required,\n readOnly,\n disabled,\n min,\n max,\n withSeconds,\n pickerInterval,\n clockFormat,\n mode,\n status,\n fromAdditionalInfo,\n toAdditionalInfo,\n autoFocus,\n className,\n ...restProps\n }: TimeRangeInputProps,\n ref: Ref<HTMLDivElement>\n ) {\n const testIds = useTestIds(testId, getTimeRangeInputTestIds);\n\n const t = useI18n();\n\n const start =\n value.start === undefined || value.start === ''\n ? undefined\n : parseToDate(value.start).getTime();\n const end =\n value.end === undefined || value.end === '' ? undefined : parseToDate(value.end).getTime();\n\n const startTimeRef = useRef<DateTimeCallbackParameter>(convertToCallbackParameter(start));\n const endTimeRef = useRef<DateTimeCallbackParameter>(convertToCallbackParameter(end));\n\n const onFocusChange = useCallback(\n (focused: boolean) => {\n (focused ? onFocus : onBlur)?.({\n start: startTimeRef.current,\n end: endTimeRef.current\n });\n },\n [onFocus, onBlur]\n );\n\n const containerRef = useConsolidatedRef(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const commonProps = {\n required,\n readOnly,\n disabled,\n min,\n max,\n status,\n withSeconds,\n pickerInterval,\n clockFormat\n };\n\n const descriptionId = useUID();\n\n return (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n {...restProps}\n container={{ wrap: 'nowrap' }}\n ref={containerRef}\n labelAs='legend'\n label={label}\n labelHidden={labelHidden}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n status={status}\n aria-describedby={descriptionId}\n className={createClassName('time-range-input', className, { status })}\n >\n <Flex container as={StyledRangeInputContainer}>\n {mode === 'time' ? (\n <>\n <TimeInput\n testId={testIds.fromTime}\n {...commonProps}\n value={value.start}\n onBlur={changedValue => {\n startTimeRef.current = changedValue;\n if (!Number.isNaN(end)) endTimeRef.current = convertToCallbackParameter(end);\n onChange({\n start: changedValue,\n end: convertToCallbackParameter(end)\n });\n }}\n label={fromLabel}\n aria-label={`${t('range_from_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={fromAdditionalInfo}\n autoFocus={autoFocus}\n />\n <TimeInput\n testId={testIds.toTime}\n {...commonProps}\n value={value.end}\n onBlur={changedValue => {\n if (!Number.isNaN(start))\n startTimeRef.current = convertToCallbackParameter(start);\n endTimeRef.current = changedValue;\n onChange({\n start: convertToCallbackParameter(start),\n end: changedValue\n });\n }}\n label={toLabel}\n aria-label={`${t('range_to_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={toAdditionalInfo}\n />\n </>\n ) : (\n <>\n <DateTimeInput\n testId={testIds.fromDateTime}\n {...commonProps}\n value={value.start}\n onBlur={changedValue => {\n startTimeRef.current = changedValue;\n if (!Number.isNaN(end)) endTimeRef.current = convertToCallbackParameter(end);\n onChange({\n start: changedValue,\n end: convertToCallbackParameter(end)\n });\n }}\n label={fromLabel}\n aria-label={`${t('range_from_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={fromAdditionalInfo}\n />\n <DateTimeInput\n testId={testIds.toDateTime}\n {...commonProps}\n value={value.end}\n onBlur={changedValue => {\n if (!Number.isNaN(start))\n startTimeRef.current = convertToCallbackParameter(start);\n endTimeRef.current = changedValue;\n onChange({\n start: convertToCallbackParameter(start),\n end: changedValue\n });\n }}\n label={toLabel}\n aria-label={`${t('range_to_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={toAdditionalInfo}\n />\n </>\n )}\n </Flex>\n </FormField>\n <HiddenText id={descriptionId}>{t('range_input')}</HiddenText>\n </>\n );\n }\n);\nexport default withTestIds(TimeRangeInput, getTimeRangeInputTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"TimeRangeInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeRangeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAmC5C,MAAM,0BAA0B,GAAG,CAAC,CAAU,EAA6B,EAAE;IAC3E,OAAO;QACL,gBAAgB,EAAE,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,CAAC,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EACtE,cAAc,EAAE,gBAAgB,GAChC,IACD,CACJ,GACI,GACG,EACZ,KAAC,UAAU,IAAC,EAAE,EAAE,aAAa,YAAG,CAAC,CAAC,aAAa,CAAC,GAAc,IAC7D,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useLayoutEffect, useRef } from 'react';\nimport type { FunctionComponent, Ref } from 'react';\n\nimport Flex from '../../Flex';\nimport type { FormControlProps } from '../../FormControl';\nimport { useConsolidatedRef, useFocusWithin, useI18n, useTestIds, useUID } from '../../../hooks';\nimport type DateTimeProps from '../DateTime.types';\nimport type {\n DateRangeCallbackParameter,\n DateTimeCallbackParameter,\n DateTimeProperties\n} from '../DateTime.types';\nimport type { ForwardProps } from '../../../types';\nimport { StyledRangeInputContainer } from '../../Input/Input.styles';\nimport type { MinuteInterval } from '../Picker/DatePicker.types';\nimport FormField from '../../FormField';\nimport { getTimeRangeInputTestIds } from '../DateTime.test-ids';\nimport { createClassName, withTestIds } from '../../../utils';\nimport HiddenText from '../../HiddenText';\n\nimport { parseToDate } from './utils';\nimport type { ClockFormat } from './utils';\nimport TimeInput from './TimeInput';\nimport DateTimeInput from './DateTimeInput';\n\nexport interface TimeRangeInputProps extends DateTimeProperties {\n /** Object of range boundaries. */\n value?: { start?: DateTimeProps['value']; end?: DateTimeProps['value'] };\n /** Callback fired when inputs value changes. */\n onChange: (value: DateRangeCallbackParameter) => void;\n /** Callback fired when the component gets focused. */\n onFocus?: (value: DateRangeCallbackParameter) => void;\n /** Callback fired when the component loses focus. */\n onBlur?: (value: DateRangeCallbackParameter) => void;\n /** Pass a string or a fragment with an Icon and string for first part of TimeRangeInput. */\n fromLabel?: FormControlProps['label'];\n /** Pass a string or a fragment with an Icon and string for second part of TimeRangeInput. */\n toLabel?: FormControlProps['label'];\n /** Pass an object with \"heading\" and \"content\" properties to show AdditionalInfo for second part of DataRangeInput. */\n toAdditionalInfo?: FormControlProps['additionalInfo'];\n /** Pass an object with \"heading\" and \"content\" properties to show AdditionalInfo for first part of DataRangeInput. */\n fromAdditionalInfo?: FormControlProps['additionalInfo'];\n /** Controls which input is displayed */\n mode: 'time' | 'datetime';\n /**\n * Display the time with seconds.\n * @default false\n */\n withSeconds?: boolean;\n /**\n * Defines interval for time picker options (in minutes).\n * @default 30\n */\n pickerInterval?: MinuteInterval;\n /** Defines clock format that overrides locale based format */\n clockFormat?: ClockFormat;\n}\n\nconst convertToCallbackParameter = (v?: number): DateTimeCallbackParameter => {\n return {\n valueAsISOString: v === undefined || Number.isNaN(v) ? undefined : new Date(v).toISOString(),\n valueAsTimestamp: v\n };\n};\n\nconst TimeRangeInput: FunctionComponent<TimeRangeInputProps & ForwardProps> = forwardRef(\n function TimeRangeInput(\n {\n testId,\n value = {},\n onChange,\n onFocus,\n onBlur,\n label,\n fromLabel,\n toLabel,\n labelHidden,\n required,\n readOnly,\n disabled,\n min,\n max,\n withSeconds,\n pickerInterval,\n clockFormat,\n mode,\n status,\n timeZone,\n fromAdditionalInfo,\n toAdditionalInfo,\n autoFocus,\n className,\n ...restProps\n }: TimeRangeInputProps,\n ref: Ref<HTMLDivElement>\n ) {\n const testIds = useTestIds(testId, getTimeRangeInputTestIds);\n\n const t = useI18n();\n\n const start =\n value.start === undefined || value.start === ''\n ? undefined\n : parseToDate(value.start).getTime();\n const end =\n value.end === undefined || value.end === '' ? undefined : parseToDate(value.end).getTime();\n\n const startTimeRef = useRef<DateTimeCallbackParameter>(convertToCallbackParameter(start));\n const endTimeRef = useRef<DateTimeCallbackParameter>(convertToCallbackParameter(end));\n\n useLayoutEffect(() => {\n startTimeRef.current = convertToCallbackParameter(start);\n endTimeRef.current = convertToCallbackParameter(end);\n }, [start, end]);\n\n const onFocusChange = useCallback(\n (focused: boolean) => {\n (focused ? onFocus : onBlur)?.({\n start: startTimeRef.current,\n end: endTimeRef.current\n });\n },\n [onFocus, onBlur]\n );\n\n const containerRef = useConsolidatedRef(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const commonProps = {\n required,\n readOnly,\n disabled,\n min,\n max,\n status,\n withSeconds,\n pickerInterval,\n clockFormat,\n timeZone\n };\n\n const descriptionId = useUID();\n\n return (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n {...restProps}\n container={{ wrap: 'nowrap' }}\n ref={containerRef}\n label={label}\n labelHidden={labelHidden}\n disabled={disabled}\n required={required}\n readOnly={readOnly}\n status={status}\n aria-describedby={descriptionId}\n >\n <Flex\n container\n as={StyledRangeInputContainer}\n className={createClassName('time-range-input', className)}\n >\n {mode === 'time' ? (\n <>\n <TimeInput\n testId={testIds.fromTime}\n {...commonProps}\n value={value.start}\n onBlur={changedValue => {\n startTimeRef.current = changedValue;\n if (!Number.isNaN(end)) endTimeRef.current = convertToCallbackParameter(end);\n onChange({\n start: changedValue,\n end: convertToCallbackParameter(end)\n });\n }}\n label={fromLabel}\n aria-label={`${t('range_from_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={fromAdditionalInfo}\n autoFocus={autoFocus}\n />\n <TimeInput\n testId={testIds.toTime}\n {...commonProps}\n value={value.end}\n onBlur={changedValue => {\n if (!Number.isNaN(start))\n startTimeRef.current = convertToCallbackParameter(start);\n endTimeRef.current = changedValue;\n onChange({\n start: convertToCallbackParameter(start),\n end: changedValue\n });\n }}\n label={toLabel}\n aria-label={`${t('range_to_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={toAdditionalInfo}\n />\n </>\n ) : (\n <>\n <DateTimeInput\n testId={testIds.fromDateTime}\n {...commonProps}\n value={value.start}\n onBlur={changedValue => {\n startTimeRef.current = changedValue;\n if (!Number.isNaN(end)) endTimeRef.current = convertToCallbackParameter(end);\n onChange({\n start: changedValue,\n end: convertToCallbackParameter(end)\n });\n }}\n label={fromLabel}\n aria-label={`${t('range_from_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={fromAdditionalInfo}\n />\n <DateTimeInput\n testId={testIds.toDateTime}\n {...commonProps}\n value={value.end}\n onBlur={changedValue => {\n if (!Number.isNaN(start))\n startTimeRef.current = convertToCallbackParameter(start);\n endTimeRef.current = changedValue;\n onChange({\n start: convertToCallbackParameter(start),\n end: changedValue\n });\n }}\n label={toLabel}\n aria-label={`${t('range_to_datetime') + (label ? ` - ${label}` : '')}`}\n additionalInfo={toAdditionalInfo}\n />\n </>\n )}\n </Flex>\n </FormField>\n <HiddenText id={descriptionId}>{t('range_input')}</HiddenText>\n </>\n );\n }\n);\nexport default withTestIds(TimeRangeInput, getTimeRangeInputTestIds);\n"]}
|
|
@@ -4,7 +4,9 @@ import type { FormControlProps } from '../../FormControl';
|
|
|
4
4
|
import type DateTimeProps from '../DateTime.types';
|
|
5
5
|
export interface WeekInputProps extends OmitStrict<FormControlProps, 'value' | 'defaultValue'>, DateTimeProps {
|
|
6
6
|
}
|
|
7
|
-
export declare const StyledWeekInput: import("styled-components").
|
|
7
|
+
export declare const StyledWeekInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
}, WeekInputProps>> & string;
|
|
8
10
|
declare const _default: FunctionComponent<WeekInputProps & ForwardProps> & {
|
|
9
11
|
getTestIds: (testIdProp?: import("../../../types").TestIdProp["testId"]) => import("../../../types").TestIdsRecord<readonly ["control-week", "control-year", "open-close-picker", "picker", "clear-current-week", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
10
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeekInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/WeekInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAgB/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"WeekInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/WeekInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAgB/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AA2BnD,MAAM,WAAW,cACf,SAAQ,UAAU,CAAC,gBAAgB,EAAE,OAAO,GAAG,cAAc,CAAC,EAC5D,aAAa;CAAG;AAEpB,eAAO,MAAM,eAAe;;4BAY1B,CAAC;;;;AAkTH,wBAA2D"}
|
|
@@ -17,6 +17,7 @@ import StyledDateTime, { BareInput, StyledDatePickerDialog, StyledDialogContent,
|
|
|
17
17
|
import usePickerButton from './usePickerButton';
|
|
18
18
|
import PartInput from './PartInput';
|
|
19
19
|
import useAutoFocusNextInput from './useAutoFocusNextInput';
|
|
20
|
+
import { CALENDAR_TYPES } from './local';
|
|
20
21
|
registerIcon(calendarIcon);
|
|
21
22
|
export const StyledWeekInput = styled(StyledDateTime)(props => {
|
|
22
23
|
const { theme: { base } } = props;
|
|
@@ -29,9 +30,9 @@ export const StyledWeekInput = styled(StyledDateTime)(props => {
|
|
|
29
30
|
`;
|
|
30
31
|
});
|
|
31
32
|
StyledWeekInput.defaultProps = defaultThemeProp;
|
|
32
|
-
const convertToCallbackParameter = (date, parts) => {
|
|
33
|
+
const convertToCallbackParameter = (date, parts, calendarType) => {
|
|
33
34
|
if ([parts.week, parts.year].every(Boolean)) {
|
|
34
|
-
const { year, month, day } = convertWeekYearToDate(parts) ?? {};
|
|
35
|
+
const { year, month, day } = convertWeekYearToDate(parts, calendarType) ?? {};
|
|
35
36
|
date.setUTCFullYear(Number(year), Number(month), Number(day));
|
|
36
37
|
return {
|
|
37
38
|
valueAsISOString: date.toISOString(),
|
|
@@ -59,6 +60,15 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
59
60
|
const yearPartId = useUID();
|
|
60
61
|
const date = value !== undefined ? parseToDate(value) : undefined;
|
|
61
62
|
const [hasValue, setHasValue] = useState(!!date);
|
|
63
|
+
// derive calendarType from locale
|
|
64
|
+
// supporting only (mon=1/sun=7) as of now, support for rest of the days is captured in ENHANCEMENT-1906
|
|
65
|
+
let calendarType = CALENDAR_TYPES.ISO_8601;
|
|
66
|
+
if (locale?.includes('-fw-sun'))
|
|
67
|
+
calendarType = CALENDAR_TYPES.US;
|
|
68
|
+
else if (locale?.includes('-fw-mon'))
|
|
69
|
+
calendarType = CALENDAR_TYPES.ISO_8601;
|
|
70
|
+
const minYear = min !== undefined ? parseToDate(min).getUTCFullYear() : 1;
|
|
71
|
+
const maxYear = max !== undefined ? parseToDate(max).getUTCFullYear() : 9999;
|
|
62
72
|
const [weekInputRef, yearInputRef] = [
|
|
63
73
|
useRef(null),
|
|
64
74
|
useRef(null)
|
|
@@ -71,7 +81,7 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
71
81
|
};
|
|
72
82
|
};
|
|
73
83
|
const currentlySelectedDate = () => {
|
|
74
|
-
const dateParts = convertWeekYearToDate(pickParts());
|
|
84
|
+
const dateParts = convertWeekYearToDate(pickParts(), calendarType);
|
|
75
85
|
if (dateParts) {
|
|
76
86
|
const year = Number(dateParts.year);
|
|
77
87
|
const month = Number(dateParts.month);
|
|
@@ -82,7 +92,7 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
82
92
|
};
|
|
83
93
|
const inputContainerRef = useRef(null);
|
|
84
94
|
const onFocusChange = (focused) => {
|
|
85
|
-
const callbackParam = convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts());
|
|
95
|
+
const callbackParam = convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts(), calendarType);
|
|
86
96
|
if (onFocus && focused)
|
|
87
97
|
onFocus(callbackParam);
|
|
88
98
|
if (!focused) {
|
|
@@ -93,7 +103,7 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
93
103
|
};
|
|
94
104
|
const [open, setOpen, , setPopoverRef, buttonEl, setButtonEl] = usePickerButton();
|
|
95
105
|
const onInputChange = () => {
|
|
96
|
-
onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));
|
|
106
|
+
onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts(), calendarType));
|
|
97
107
|
buttonEl?.setAttribute('aria-label', generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open));
|
|
98
108
|
if (weekInputRef.current?.value !== '' && yearInputRef.current?.value !== '') {
|
|
99
109
|
setHasValue(true);
|
|
@@ -111,15 +121,16 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
111
121
|
style: 'long',
|
|
112
122
|
type: 'dateTimeField'
|
|
113
123
|
});
|
|
114
|
-
const WeekNumberInput = (_jsx(PartInput, { "data-testid": testIds.controlWeek, placeholder: t('week_placeholder'), "aria-label": displayNames.of('weekOfYear'), value: date ? getWeek(date,
|
|
115
|
-
const YearInput = (_jsxs(Fragment, { children: [_jsx(PartInput, { "data-testid": testIds.controlYear, placeholder: t('year_placeholder'), "aria-label": displayNames.of('year'), "aria-describedby": yearPartId, value: date ? getWeekYear(date,
|
|
124
|
+
const WeekNumberInput = (_jsx(PartInput, { "data-testid": testIds.controlWeek, placeholder: t('week_placeholder'), "aria-label": displayNames.of('weekOfYear'), value: date ? getWeek(date, calendarType, 'UTC') : undefined, onChange: onInputChange, size: 2, maxLength: 2, min: 1, max: 53, readOnly: readOnly, ref: weekInputRef, autoFocus: autoFocus }, 'week'));
|
|
125
|
+
const YearInput = (_jsxs(Fragment, { children: [_jsx(PartInput, { "data-testid": testIds.controlYear, placeholder: t('year_placeholder'), "aria-label": displayNames.of('year'), "aria-describedby": yearPartId, value: date ? getWeekYear(date, calendarType, 'UTC') : undefined, onChange: onInputChange, size: 4, maxLength: 4, min: minYear, max: maxYear, readOnly: readOnly, ref: yearInputRef }), _jsx(HiddenText, { id: yearPartId, children: t('year_input_description') })] }, 'year'));
|
|
116
126
|
useFocusWithin([containerRef], onFocusChange);
|
|
117
|
-
const Picker = (_jsxs(_Fragment, { children: [_jsx(StyledInputButton, { "data-testid": testIds.openClosePicker, variant: 'simple', icon: true, ref: setButtonEl, onClick: () => setOpen(cur => !cur), "aria-label": generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open), readOnly: readOnly, disabled: disabled, children: _jsx(Icon, { name: 'calendar' }) }), open && buttonEl && (_jsx(StyledDatePickerDialog, { ref: setPopoverRef, target: buttonEl, "aria-label": t('choose_week'), children: _jsx(Flex, { container: { direction: 'column' }, as: StyledDialogContent, children: _jsx(DatePicker, { testId: testIds.picker, selected: currentlySelectedDate(), onChange: selected => {
|
|
127
|
+
const Picker = (_jsxs(_Fragment, { children: [_jsx(StyledInputButton, { "data-testid": testIds.openClosePicker, variant: 'simple', icon: true, ref: setButtonEl, onClick: () => setOpen(cur => !cur), "aria-label": generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open), readOnly: readOnly, disabled: disabled, children: _jsx(Icon, { name: 'calendar' }) }), open && buttonEl && (_jsx(StyledDatePickerDialog, { ref: setPopoverRef, target: buttonEl, "aria-label": t('choose_week'), children: _jsx(Flex, { container: { direction: 'column' }, as: StyledDialogContent, children: _jsx(DatePicker, { testId: testIds.picker, selected: currentlySelectedDate(), calendarType: calendarType, onChange: selected => {
|
|
118
128
|
weekInputRef.current.value =
|
|
119
|
-
(selected &&
|
|
129
|
+
(selected &&
|
|
130
|
+
getWeek(selected, calendarType, 'UTC').toString().padStart(2, '0')) ||
|
|
120
131
|
'';
|
|
121
132
|
yearInputRef.current.value =
|
|
122
|
-
(selected && getWeekYear(selected,
|
|
133
|
+
(selected && getWeekYear(selected, calendarType, 'UTC').toString()) || '';
|
|
123
134
|
setOpen(false);
|
|
124
135
|
setTimeout(() => buttonEl?.focus());
|
|
125
136
|
onInputChange();
|
|
@@ -127,13 +138,13 @@ const WeekInput = forwardRef(function WeekInput(props, ref) {
|
|
|
127
138
|
const Comp = (_jsxs(Flex, { "data-testid": label ? undefined : testIds.root, as: StyledWeekInput, forwardedAs: StyledFormControl, container: { alignItems: 'center', wrap: 'nowrap', justify: 'between' }, status: status, readOnly: readOnly, disabled: disabled, ref: containerRef, onClick: (e) => {
|
|
128
139
|
if (e.target === containerRef.current)
|
|
129
140
|
weekInputRef.current?.focus();
|
|
130
|
-
}, ...restProps, className: createClassName('week-input', className
|
|
141
|
+
}, ...restProps, className: createClassName('week-input', className), children: [_jsxs(Flex, { ref: inputContainerRef, as: StyledInputContainer, container: { alignItems: 'center', wrap: 'wrap' }, children: [cap(displayNames.of('weekOfYear')), " ", WeekNumberInput, ",", YearInput] }), !readOnly && (_jsxs(Flex, { container: true, children: [hasValue && (_jsx(StyledInputButton, { "data-testid": testIds.clearCurrentWeek, "aria-label": t('clear_current_date'), icon: true, onClick: () => {
|
|
131
142
|
weekInputRef.current.value = '';
|
|
132
143
|
yearInputRef.current.value = '';
|
|
133
144
|
setTimeout(() => buttonEl?.focus());
|
|
134
145
|
onInputChange();
|
|
135
146
|
}, variant: 'simple', compact: true, label: t('clear'), children: _jsx(Icon, { name: 'times' }) })), Picker] }))] }));
|
|
136
|
-
return label ? (_jsxs(_Fragment, { children: [_jsx(FormField, { testId: testIds, as: 'fieldset',
|
|
147
|
+
return label ? (_jsxs(_Fragment, { children: [_jsx(FormField, { testId: testIds, as: 'fieldset', label: label, labelHidden: labelHidden, id: id, info: info, readOnly: readOnly, status: status, required: required, disabled: disabled, additionalInfo: additionalInfo, "aria-describedby": descriptionID, ref: ref, children: Comp }), description] })) : (Comp);
|
|
137
148
|
});
|
|
138
149
|
export default withTestIds(WeekInput, getWeekInputTestIds);
|
|
139
150
|
//# sourceMappingURL=WeekInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeekInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/WeekInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,aAAa,EACb,UAAU,EACV,MAAM,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAC;AAC/D,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3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,CAAC,OAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;4BACjC,YAAY,CAAC,OAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;4BACjC,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;4BACpC,aAAa,EAAE,CAAC;wBAClB,CAAC,EACD,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,YAEjB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACH,CACrB,EACA,MAAM,IACF,CACR,IACI,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,EAAE,EAAC,UAAU,EACb,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,sBACZ,aAAa,EAC/B,GAAG,EAAE,GAAG,YAEP,IAAI,GACK,EACX,WAAW,IACX,CACJ,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { forwardRef, Fragment, useRef, useState } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport type { ForwardProps, OmitStrict } from '../../../types';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useOuterEvent,\n useTestIds,\n useUID\n} from '../../../hooks';\nimport { cap, createClassName, withTestIds } from '../../../utils';\nimport FormField from '../../FormField';\nimport Icon, { registerIcon } from '../../Icon';\nimport * as calendarIcon from '../../Icon/icons/calendar.icon';\nimport Flex from '../../Flex';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport DatePicker from '../Picker/DatePicker';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { getWeekInputTestIds } from '../DateTime.test-ids';\nimport HiddenText from '../../HiddenText';\n\nimport {\n parseToDate,\n getWeekYear,\n getWeek,\n generatePickerButtonAriaLabel,\n convertWeekYearToDate\n} from './utils';\nimport StyledDateTime, {\n BareInput,\n StyledDatePickerDialog,\n StyledDialogContent,\n StyledInputButton,\n StyledInputContainer\n} from './DateTime.styles';\nimport usePickerButton from './usePickerButton';\nimport PartInput from './PartInput';\nimport useAutoFocusNextInput from './useAutoFocusNextInput';\nimport type { DateParts } from './DateTimeInput.types';\n\nregisterIcon(calendarIcon);\n\nexport interface WeekInputProps\n extends OmitStrict<FormControlProps, 'value' | 'defaultValue'>,\n DateTimeProps {}\n\nexport const StyledWeekInput = styled(StyledDateTime)<WeekInputProps>(props => {\n const {\n theme: { base }\n } = props;\n\n return css`\n padding-inline-end: 0;\n\n ${StyledInputContainer} > ${BareInput}:first-of-type {\n margin-inline-start: ${base.spacing};\n }\n `;\n});\n\nStyledWeekInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: DateParts<string | undefined>\n): DateTimeCallbackParameter => {\n if ([parts.week, parts.year].every(Boolean)) {\n const { year, month, day } = convertWeekYearToDate(parts) ?? {};\n date.setUTCFullYear(Number(year), Number(month), Number(day));\n return {\n valueAsISOString: date.toISOString(),\n valueAsTimestamp: date.getTime()\n };\n }\n if ([parts.week, parts.year].every(p => !p)) {\n return {\n valueAsISOString: undefined,\n valueAsTimestamp: undefined\n };\n }\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'incomplete'\n };\n};\n\nconst WeekInput: FunctionComponent<WeekInputProps & ForwardProps> = forwardRef(function WeekInput(\n props: PropsWithoutRef<WeekInputProps>,\n ref: Ref<HTMLFieldSetElement>\n) {\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n status,\n info,\n required,\n readOnly,\n disabled,\n onChange,\n onFocus,\n onBlur,\n autoFocus,\n additionalInfo,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getWeekInputTestIds);\n\n const { locale } = useConfiguration();\n const t = useI18n();\n const containerRef = useConsolidatedRef(ref);\n const yearPartId = useUID();\n\n const date = value !== undefined ? parseToDate(value) : undefined;\n const [hasValue, setHasValue] = useState(!!date);\n\n const [weekInputRef, yearInputRef] = [\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null)\n ];\n\n const { description, descriptionID } = useAutoFocusNextInput([weekInputRef, yearInputRef]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n week: weekInputRef.current?.value || undefined,\n year: yearInputRef.current?.value || undefined\n };\n };\n\n const currentlySelectedDate = () => {\n const dateParts = convertWeekYearToDate(pickParts());\n if (dateParts) {\n const year = Number(dateParts.year);\n const month = Number(dateParts.month);\n const day = Number(dateParts.day);\n\n const current = date ?? new Date();\n return new Date(\n current.setUTCFullYear(\n year ?? current.getUTCFullYear(),\n month ?? current.getUTCMonth(),\n day ?? current.getUTCDate()\n )\n );\n }\n };\n\n const inputContainerRef = useRef<HTMLDivElement>(null);\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(\n date ? new Date(date) : new Date(),\n pickParts()\n );\n if (onFocus && focused) onFocus(callbackParam);\n if (!focused) {\n if (inputContainerRef.current) inputContainerRef.current.scrollTop = 0;\n onBlur?.(callbackParam);\n }\n };\n\n const [open, setOpen, , setPopoverRef, buttonEl, setButtonEl] = usePickerButton();\n\n const onInputChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n buttonEl?.setAttribute(\n 'aria-label',\n generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open)\n );\n if (weekInputRef.current?.value !== '' && yearInputRef.current?.value !== '') {\n setHasValue(true);\n } else {\n setHasValue(false);\n }\n };\n\n // autoclose picker on focusing out\n useOuterEvent('focusin', [containerRef], e => {\n if (containerRef.current?.contains(e.relatedTarget as HTMLElement)) setOpen(false);\n });\n\n const displayNames = new Intl.DisplayNames(locale, {\n style: 'long',\n type: 'dateTimeField'\n }) as Intl.DateTimeDisplayNames;\n\n const WeekNumberInput = (\n <PartInput\n data-testid={testIds.controlWeek}\n key='week'\n placeholder={t('week_placeholder')}\n aria-label={displayNames.of('weekOfYear')}\n value={date ? getWeek(date, undefined, 'UTC') : undefined}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n min={1}\n max={53}\n readOnly={readOnly}\n ref={weekInputRef}\n autoFocus={autoFocus}\n />\n );\n\n const YearInput = (\n <Fragment key='year'>\n <PartInput\n data-testid={testIds.controlYear}\n placeholder={t('year_placeholder')}\n aria-label={displayNames.of('year')}\n aria-describedby={yearPartId}\n value={date ? getWeekYear(date, undefined, 'UTC') : undefined}\n onChange={onInputChange}\n size={4}\n maxLength={4}\n min={1}\n max={9999}\n readOnly={readOnly}\n ref={yearInputRef}\n />\n <HiddenText id={yearPartId}>{t('year_input_description')}</HiddenText>\n </Fragment>\n );\n\n useFocusWithin([containerRef], onFocusChange);\n\n const Picker = (\n <>\n <StyledInputButton\n data-testid={testIds.openClosePicker}\n variant='simple'\n icon\n ref={setButtonEl}\n onClick={() => setOpen(cur => !cur)}\n aria-label={generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open)}\n readOnly={readOnly}\n disabled={disabled}\n >\n <Icon name='calendar' />\n </StyledInputButton>\n {open && buttonEl && (\n <StyledDatePickerDialog ref={setPopoverRef} target={buttonEl} aria-label={t('choose_week')}>\n <Flex container={{ direction: 'column' }} as={StyledDialogContent}>\n <DatePicker\n testId={testIds.picker}\n selected={currentlySelectedDate()}\n onChange={selected => {\n weekInputRef.current!.value =\n (selected && getWeek(selected, undefined, 'UTC').toString().padStart(2, '0')) ||\n '';\n yearInputRef.current!.value =\n (selected && getWeekYear(selected, undefined, 'UTC').toString()) || '';\n setOpen(false);\n setTimeout(() => buttonEl?.focus());\n onInputChange();\n }}\n min={min}\n max={max}\n mode='week'\n />\n </Flex>\n </StyledDatePickerDialog>\n )}\n </>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n as={StyledWeekInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center', wrap: 'nowrap', justify: 'between' }}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={containerRef}\n onClick={(e: MouseEvent) => {\n if (e.target === containerRef.current) weekInputRef.current?.focus();\n }}\n {...restProps}\n className={createClassName('week-input', className, { status })}\n >\n <Flex\n ref={inputContainerRef}\n as={StyledInputContainer}\n container={{ alignItems: 'center', wrap: 'wrap' }}\n >\n {cap(displayNames.of('weekOfYear'))} {WeekNumberInput},{YearInput}\n </Flex>\n {!readOnly && (\n <Flex container>\n {hasValue && (\n <StyledInputButton\n data-testid={testIds.clearCurrentWeek}\n aria-label={t('clear_current_date')}\n icon\n onClick={() => {\n weekInputRef.current!.value = '';\n yearInputRef.current!.value = '';\n setTimeout(() => buttonEl?.focus());\n onInputChange();\n }}\n variant='simple'\n compact\n label={t('clear')}\n >\n <Icon name='times' />\n </StyledInputButton>\n )}\n {Picker}\n </Flex>\n )}\n </Flex>\n );\n\n return label ? (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n labelAs='legend'\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n aria-describedby={descriptionID}\n ref={ref}\n >\n {Comp}\n </FormField>\n {description}\n </>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(WeekInput, getWeekInputTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"WeekInput.js","sourceRo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AAC,QAAQ,IAAI,CACZ,MAAC,IAAI,IAAC,SAAS,mBACZ,QAAQ,IAAI,CACX,KAAC,iBAAiB,mBACH,OAAO,CAAC,gBAAgB,gBACzB,CAAC,CAAC,oBAAoB,CAAC,EACnC,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE;4BACZ,YAAY,CAAC,OAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;4BACjC,YAAY,CAAC,OAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;4BACjC,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;4BACpC,aAAa,EAAE,CAAC;wBAClB,CAAC,EACD,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,YAEjB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACH,CACrB,EACA,MAAM,IACF,CACR,IACI,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,EAAE,EAAC,UAAU,EACb,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,sBACZ,aAAa,EAC/B,GAAG,EAAE,GAAG,YAEP,IAAI,GACK,EACX,WAAW,IACX,CACJ,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { forwardRef, Fragment, useRef, useState } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport type { ForwardProps, OmitStrict } from '../../../types';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useOuterEvent,\n useTestIds,\n useUID\n} from '../../../hooks';\nimport { cap, createClassName, withTestIds } from '../../../utils';\nimport FormField from '../../FormField';\nimport Icon, { registerIcon } from '../../Icon';\nimport * as calendarIcon from '../../Icon/icons/calendar.icon';\nimport Flex from '../../Flex';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport DatePicker from '../Picker/DatePicker';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { getWeekInputTestIds } from '../DateTime.test-ids';\nimport HiddenText from '../../HiddenText';\n\nimport {\n parseToDate,\n getWeekYear,\n getWeek,\n generatePickerButtonAriaLabel,\n convertWeekYearToDate\n} from './utils';\nimport StyledDateTime, {\n BareInput,\n StyledDatePickerDialog,\n StyledDialogContent,\n StyledInputButton,\n StyledInputContainer\n} from './DateTime.styles';\nimport usePickerButton from './usePickerButton';\nimport PartInput from './PartInput';\nimport useAutoFocusNextInput from './useAutoFocusNextInput';\nimport type { DateParts } from './DateTimeInput.types';\nimport { CALENDAR_TYPES, type CalendarType } from './local';\n\nregisterIcon(calendarIcon);\n\nexport interface WeekInputProps\n extends OmitStrict<FormControlProps, 'value' | 'defaultValue'>,\n DateTimeProps {}\n\nexport const StyledWeekInput = styled(StyledDateTime)<WeekInputProps>(props => {\n const {\n theme: { base }\n } = props;\n\n return css`\n padding-inline-end: 0;\n\n ${StyledInputContainer} > ${BareInput}:first-of-type {\n margin-inline-start: ${base.spacing};\n }\n `;\n});\n\nStyledWeekInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: DateParts<string | undefined>,\n calendarType?: CalendarType\n): DateTimeCallbackParameter => {\n if ([parts.week, parts.year].every(Boolean)) {\n const { year, month, day } = convertWeekYearToDate(parts, calendarType) ?? {};\n date.setUTCFullYear(Number(year), Number(month), Number(day));\n return {\n valueAsISOString: date.toISOString(),\n valueAsTimestamp: date.getTime()\n };\n }\n if ([parts.week, parts.year].every(p => !p)) {\n return {\n valueAsISOString: undefined,\n valueAsTimestamp: undefined\n };\n }\n return {\n valueAsISOString: '',\n valueAsTimestamp: NaN,\n state: 'incomplete'\n };\n};\n\nconst WeekInput: FunctionComponent<WeekInputProps & ForwardProps> = forwardRef(function WeekInput(\n props: PropsWithoutRef<WeekInputProps>,\n ref: Ref<HTMLFieldSetElement>\n) {\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n status,\n info,\n required,\n readOnly,\n disabled,\n onChange,\n onFocus,\n onBlur,\n autoFocus,\n additionalInfo,\n className,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getWeekInputTestIds);\n\n const { locale } = useConfiguration();\n const t = useI18n();\n const containerRef = useConsolidatedRef(ref);\n const yearPartId = useUID();\n\n const date = value !== undefined ? parseToDate(value) : undefined;\n const [hasValue, setHasValue] = useState(!!date);\n\n // derive calendarType from locale\n // supporting only (mon=1/sun=7) as of now, support for rest of the days is captured in ENHANCEMENT-1906\n let calendarType: CalendarType = CALENDAR_TYPES.ISO_8601;\n if (locale?.includes('-fw-sun')) calendarType = CALENDAR_TYPES.US;\n else if (locale?.includes('-fw-mon')) calendarType = CALENDAR_TYPES.ISO_8601;\n\n const minYear = min !== undefined ? parseToDate(min).getUTCFullYear() : 1;\n const maxYear = max !== undefined ? parseToDate(max).getUTCFullYear() : 9999;\n\n const [weekInputRef, yearInputRef] = [\n useRef<HTMLInputElement>(null),\n useRef<HTMLInputElement>(null)\n ];\n\n const { description, descriptionID } = useAutoFocusNextInput([weekInputRef, yearInputRef]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n week: weekInputRef.current?.value || undefined,\n year: yearInputRef.current?.value || undefined\n };\n };\n\n const currentlySelectedDate = () => {\n const dateParts = convertWeekYearToDate(pickParts(), calendarType);\n if (dateParts) {\n const year = Number(dateParts.year);\n const month = Number(dateParts.month);\n const day = Number(dateParts.day);\n\n const current = date ?? new Date();\n return new Date(\n current.setUTCFullYear(\n year ?? current.getUTCFullYear(),\n month ?? current.getUTCMonth(),\n day ?? current.getUTCDate()\n )\n );\n }\n };\n\n const inputContainerRef = useRef<HTMLDivElement>(null);\n\n const onFocusChange = (focused: boolean) => {\n const callbackParam = convertToCallbackParameter(\n date ? new Date(date) : new Date(),\n pickParts(),\n calendarType\n );\n if (onFocus && focused) onFocus(callbackParam);\n if (!focused) {\n if (inputContainerRef.current) inputContainerRef.current.scrollTop = 0;\n onBlur?.(callbackParam);\n }\n };\n\n const [open, setOpen, , setPopoverRef, buttonEl, setButtonEl] = usePickerButton();\n\n const onInputChange = () => {\n onChange?.(\n convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts(), calendarType)\n );\n buttonEl?.setAttribute(\n 'aria-label',\n generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open)\n );\n if (weekInputRef.current?.value !== '' && yearInputRef.current?.value !== '') {\n setHasValue(true);\n } else {\n setHasValue(false);\n }\n };\n\n // autoclose picker on focusing out\n useOuterEvent('focusin', [containerRef], e => {\n if (containerRef.current?.contains(e.relatedTarget as HTMLElement)) setOpen(false);\n });\n\n const displayNames = new Intl.DisplayNames(locale, {\n style: 'long',\n type: 'dateTimeField'\n }) as Intl.DateTimeDisplayNames;\n\n const WeekNumberInput = (\n <PartInput\n data-testid={testIds.controlWeek}\n key='week'\n placeholder={t('week_placeholder')}\n aria-label={displayNames.of('weekOfYear')}\n value={date ? getWeek(date, calendarType, 'UTC') : undefined}\n onChange={onInputChange}\n size={2}\n maxLength={2}\n min={1}\n max={53}\n readOnly={readOnly}\n ref={weekInputRef}\n autoFocus={autoFocus}\n />\n );\n\n const YearInput = (\n <Fragment key='year'>\n <PartInput\n data-testid={testIds.controlYear}\n placeholder={t('year_placeholder')}\n aria-label={displayNames.of('year')}\n aria-describedby={yearPartId}\n value={date ? getWeekYear(date, calendarType, 'UTC') : undefined}\n onChange={onInputChange}\n size={4}\n maxLength={4}\n min={minYear}\n max={maxYear}\n readOnly={readOnly}\n ref={yearInputRef}\n />\n <HiddenText id={yearPartId}>{t('year_input_description')}</HiddenText>\n </Fragment>\n );\n\n useFocusWithin([containerRef], onFocusChange);\n\n const Picker = (\n <>\n <StyledInputButton\n data-testid={testIds.openClosePicker}\n variant='simple'\n icon\n ref={setButtonEl}\n onClick={() => setOpen(cur => !cur)}\n aria-label={generatePickerButtonAriaLabel(currentlySelectedDate(), 'week', locale, t, open)}\n readOnly={readOnly}\n disabled={disabled}\n >\n <Icon name='calendar' />\n </StyledInputButton>\n {open && buttonEl && (\n <StyledDatePickerDialog ref={setPopoverRef} target={buttonEl} aria-label={t('choose_week')}>\n <Flex container={{ direction: 'column' }} as={StyledDialogContent}>\n <DatePicker\n testId={testIds.picker}\n selected={currentlySelectedDate()}\n calendarType={calendarType}\n onChange={selected => {\n weekInputRef.current!.value =\n (selected &&\n getWeek(selected, calendarType, 'UTC').toString().padStart(2, '0')) ||\n '';\n yearInputRef.current!.value =\n (selected && getWeekYear(selected, calendarType, 'UTC').toString()) || '';\n setOpen(false);\n setTimeout(() => buttonEl?.focus());\n onInputChange();\n }}\n min={min}\n max={max}\n mode='week'\n />\n </Flex>\n </StyledDatePickerDialog>\n )}\n </>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n as={StyledWeekInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center', wrap: 'nowrap', justify: 'between' }}\n status={status}\n readOnly={readOnly}\n disabled={disabled}\n ref={containerRef}\n onClick={(e: MouseEvent) => {\n if (e.target === containerRef.current) weekInputRef.current?.focus();\n }}\n {...restProps}\n className={createClassName('week-input', className)}\n >\n <Flex\n ref={inputContainerRef}\n as={StyledInputContainer}\n container={{ alignItems: 'center', wrap: 'wrap' }}\n >\n {cap(displayNames.of('weekOfYear'))} {WeekNumberInput},{YearInput}\n </Flex>\n {!readOnly && (\n <Flex container>\n {hasValue && (\n <StyledInputButton\n data-testid={testIds.clearCurrentWeek}\n aria-label={t('clear_current_date')}\n icon\n onClick={() => {\n weekInputRef.current!.value = '';\n yearInputRef.current!.value = '';\n setTimeout(() => buttonEl?.focus());\n onInputChange();\n }}\n variant='simple'\n compact\n label={t('clear')}\n >\n <Icon name='times' />\n </StyledInputButton>\n )}\n {Picker}\n </Flex>\n )}\n </Flex>\n );\n\n return label ? (\n <>\n <FormField\n testId={testIds}\n as='fieldset'\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n readOnly={readOnly}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n aria-describedby={descriptionID}\n ref={ref}\n >\n {Comp}\n </FormField>\n {description}\n </>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(WeekInput, getWeekInputTestIds);\n"]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export declare const CALENDAR_TYPES: {
|
|
2
|
-
ARABIC:
|
|
3
|
-
HEBREW:
|
|
4
|
-
ISO_8601:
|
|
5
|
-
US:
|
|
6
|
-
JP:
|
|
2
|
+
readonly ARABIC: "Arabic";
|
|
3
|
+
readonly HEBREW: "Hebrew";
|
|
4
|
+
readonly ISO_8601: "ISO 8601";
|
|
5
|
+
readonly US: "US";
|
|
6
|
+
readonly JP: "JP";
|
|
7
7
|
};
|
|
8
|
+
export type CalendarType = (typeof CALENDAR_TYPES)[keyof typeof CALENDAR_TYPES];
|
|
8
9
|
export declare const CALENDAR_TYPE_LOCALES: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
US: string[];
|
|
11
|
+
Arabic: string[];
|
|
12
|
+
Hebrew: string[];
|
|
13
|
+
JP: string[];
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=local.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/local.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/local.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF,eAAO,MAAM,qBAAqB;;;;;CA8CjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/local.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/local.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACA,CAAC;AAIX,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE;QACnB,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;KACR;IACD,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE;QACvB,qCAAqC;QACrC,IAAI;QACJ,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,OAAO;QACP,IAAI;QACJ,OAAO;QACP,IAAI;QACJ,OAAO;KACR;IACD,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;IACxC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC;CACtD,CAAC","sourcesContent":["export const CALENDAR_TYPES = {\n ARABIC: 'Arabic',\n HEBREW: 'Hebrew',\n ISO_8601: 'ISO 8601',\n US: 'US',\n JP: 'JP'\n} as const;\n\nexport type CalendarType = (typeof CALENDAR_TYPES)[keyof typeof CALENDAR_TYPES];\n\nexport const CALENDAR_TYPE_LOCALES = {\n [CALENDAR_TYPES.US]: [\n 'en-CA',\n 'en-US',\n 'es-AR',\n 'es-BO',\n 'es-CL',\n 'es-CO',\n 'es-CR',\n 'es-DO',\n 'es-EC',\n 'es-GT',\n 'es-HN',\n 'es-MX',\n 'es-NI',\n 'es-PA',\n 'es-PE',\n 'es-PR',\n 'es-SV',\n 'es-VE',\n 'pt-BR'\n ],\n [CALENDAR_TYPES.ARABIC]: [\n // ar-LB, ar-MA intentionally missing\n 'ar',\n 'ar-AE',\n 'ar-BH',\n 'ar-DZ',\n 'ar-EG',\n 'ar-IQ',\n 'ar-JO',\n 'ar-KW',\n 'ar-LY',\n 'ar-OM',\n 'ar-QA',\n 'ar-SA',\n 'ar-SD',\n 'ar-SY',\n 'ar-YE',\n 'dv',\n 'dv-MV',\n 'ps',\n 'ps-AR'\n ],\n [CALENDAR_TYPES.HEBREW]: ['he', 'he-IL'],\n [CALENDAR_TYPES.JP]: ['ja-JP', 'ja-JP-u-ca-japanese']\n};\n"]}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import type { Dayjs } from 'dayjs';
|
|
2
2
|
import type { TranslationFunction, TranslationPack } from '../../../i18n';
|
|
3
|
+
import { type CalendarType } from './local';
|
|
3
4
|
import type { DateParts } from './DateTimeInput.types';
|
|
4
|
-
export declare const getDayOfWeek: (date: Date | Dayjs, calendarType?:
|
|
5
|
-
export declare const getWeekdays: (calendarType:
|
|
5
|
+
export declare const getDayOfWeek: (date: Date | Dayjs, calendarType?: CalendarType, timeZone?: string) => number;
|
|
6
|
+
export declare const getWeekdays: (calendarType: CalendarType) => Date[];
|
|
6
7
|
export declare function getDayOfWeekNamesMap(localeTag?: string): {
|
|
7
8
|
[k: string]: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const getWeek: (date: Date, calendarType?:
|
|
10
|
-
export declare const getWeekYear: (date: Date, calendarType?:
|
|
11
|
-
export declare const getCalendarTypeFromLocale: (localeTag?: string) =>
|
|
12
|
-
export declare const
|
|
10
|
+
export declare const getWeek: (date: Date, calendarType?: CalendarType, timeZone?: string) => number;
|
|
11
|
+
export declare const getWeekYear: (date: Date, calendarType?: CalendarType, timeZone?: string) => number;
|
|
12
|
+
export declare const getCalendarTypeFromLocale: (localeTag?: string) => CalendarType;
|
|
13
|
+
export declare const getDateOfWeek: (week: number, year: number, calendarType?: CalendarType) => Date;
|
|
13
14
|
export declare const parseToDate: (value: string | number | Date) => Date;
|
|
14
15
|
export type QuarterNumber = 1 | 2 | 3 | 4;
|
|
15
16
|
export declare function getQuarter(date: string | number | Date): QuarterNumber;
|
|
16
17
|
export declare function getQuarterForDateTimeZone(date: Date, timeZone?: string): QuarterNumber;
|
|
17
18
|
export declare const getDateTimeParts: (localeTag: string, options?: Intl.DateTimeFormatOptions | undefined, labelFormat?: boolean) => string[];
|
|
18
|
-
export declare const getStartOfWeek: (date: Date, calendarType?:
|
|
19
|
-
export declare const getEndOfWeek: (date: Date, calendarType?:
|
|
20
|
-
export declare const convertWeekYearToDate: ({ week, year }: DateParts<string | undefined
|
|
19
|
+
export declare const getStartOfWeek: (date: Date, calendarType?: CalendarType, timeZone?: string) => Date;
|
|
20
|
+
export declare const getEndOfWeek: (date: Date, calendarType?: CalendarType, timeZone?: string) => Date;
|
|
21
|
+
export declare const convertWeekYearToDate: ({ week, year }: DateParts<string | undefined>, calendarType?: CalendarType) => DateParts<string> | undefined;
|
|
21
22
|
export type ClockFormat = 12 | 24;
|
|
22
23
|
export declare const is12HClockFormat: (localeTag: string) => boolean;
|
|
23
24
|
export declare const getLocalizedMonths: (localeTag?: string) => string[];
|
|
@@ -53,8 +54,7 @@ export declare const validateDateTime: (year: number, month: number, day: number
|
|
|
53
54
|
export declare const toUTCDateString: (date: Date, format?: Intl.DateTimeFormat) => string;
|
|
54
55
|
export declare const isISODate: (value: string) => boolean;
|
|
55
56
|
export declare const isTime: (value: string) => boolean;
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const parsePastedTextToDate: (value: string, localeTag: string, currentDate: Date) => Date | undefined;
|
|
57
|
+
export declare const parsePastedTextToDate: (value: string, localeTag: string, currentDate: Date, type?: "date" | "datetime") => Date | undefined;
|
|
58
58
|
export declare const getSelectedDateInfoText: (date: Date | undefined, type: "date" | "datetime" | "week", locale: string, translateFn: TranslationFunction<TranslationPack>, is12h?: boolean) => string;
|
|
59
59
|
export declare const generatePickerButtonAriaLabel: (date: Date | undefined, type: "date" | "datetime" | "week", locale: string, translateFn: TranslationFunction<TranslationPack>, open: boolean, is12h?: boolean) => string;
|
|
60
60
|
export declare const getDateFormat: (t: TranslationFunction<TranslationPack>, localeTag: string, type: "date" | "time" | "time+seconds" | "datetime" | "datetime+seconds") => string;
|