@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":"DayOfWeekInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/DayOfWeekInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"DayOfWeekInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/DayOfWeekInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,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AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport type { FunctionComponent } from 'react';\n\nimport type { BaseProps, ForwardProps, TestIdProp } from '../../../types';\nimport Select, { Option } from '../../Select';\nimport type { SelectProps } from '../../Select/Select';\nimport type { FormControlProps } from '../../FormControl';\nimport { useConfiguration, useTestIds } from '../../../hooks';\nimport { getDayOfWeekInputTestIds } from '../DateTime.test-ids';\nimport { createClassName, withTestIds } from '../../../utils';\n\nimport { CALENDAR_TYPES, type CalendarType } from './local';\nimport { getCalendarTypeFromLocale, getDayOfWeekNamesMap } from './utils';\n\nexport type DayOfWeek = 1 | 2 | 3 | 4 | 5 | 6 | 7;\n\nexport interface DayOfWeekInputProps extends TestIdProp, BaseProps {\n /**\n * Number from range [1-7].\n * Creates a controlled input and sets the value. Requires an onChange handler to update value.\n * value + onChange is the recommended method per React team.\n */\n value?: DayOfWeek;\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n /** Callback fired when input value changes. */\n onChange?: (value: DayOfWeek) => void;\n}\n\n// returns index of the first day of week according to given calendar type\n// returned value is a position of the day in base ISO calendar\nfunction getFirstWeekDayForCalendar(refCalendarType: CalendarType = CALENDAR_TYPES.ISO_8601) {\n switch (refCalendarType) {\n case CALENDAR_TYPES.ISO_8601:\n // start week with Monday\n return 0;\n case CALENDAR_TYPES.ARABIC:\n // start week with Saturday\n return 5;\n case CALENDAR_TYPES.HEBREW:\n case CALENDAR_TYPES.US:\n // start week with Sunday\n return 6;\n default:\n // ISO as default\n return 0;\n }\n}\n\n// returns array of Options for day names, ordered according to given calendar\nfunction generateOrderedDays(\n dayOfWeekNames: { [key: number]: string },\n refCalendarType: CalendarType\n) {\n const optionsArray = Object.keys(dayOfWeekNames).map(key => {\n return (\n <Option key={dayOfWeekNames[Number(key)]} value={key.toString()}>\n {dayOfWeekNames[Number(key)]}\n </Option>\n );\n });\n\n const startingDayIndex = getFirstWeekDayForCalendar(refCalendarType);\n\n return [...optionsArray.slice(startingDayIndex), ...optionsArray.slice(0, startingDayIndex)];\n}\n\nconst DayOfWeekInput: FunctionComponent<DayOfWeekInputProps & ForwardProps> = (\n props: DayOfWeekInputProps\n) => {\n const { locale } = useConfiguration();\n const { testId, value, required, readOnly, disabled, onChange, className, status, ...restProps } =\n props;\n\n const testIds = useTestIds(testId, getDayOfWeekInputTestIds);\n\n // days ordered according to given calendar\n const dayOfWeekOptions = useMemo(\n () => generateOrderedDays(getDayOfWeekNamesMap(locale), getCalendarTypeFromLocale(locale)),\n [locale]\n );\n\n const onChangeWrapper: SelectProps['onChange'] = ev => {\n onChange?.(Number(ev.target.value) as DayOfWeek);\n };\n\n return (\n <Select\n data-testid={testIds.control}\n required={required}\n value={value ? value.toString() : undefined}\n onChange={onChangeWrapper}\n readOnly={readOnly}\n disabled={disabled || readOnly}\n status={status}\n {...restProps}\n className={createClassName('day-of-week-input', className, { status })}\n >\n {!required && <Option> </Option>}\n {dayOfWeekOptions}\n </Select>\n );\n};\n\nexport default withTestIds(DayOfWeekInput, getDayOfWeekInputTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DurationInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/DurationInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOtD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"DurationInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/DurationInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOtD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;;;;AAgF5D,wBAAmE"}
|
|
@@ -10,15 +10,13 @@ import NumberUnit from './NumberUnit';
|
|
|
10
10
|
import { Format } from './DurationInput.types';
|
|
11
11
|
const DurationInput = forwardRef(function DurationInput(props, ref) {
|
|
12
12
|
const { testId, id, label, labelHidden, required, status, disabled, onChange, format = Format.Seconds, onSelect, additionalInfo, className: classNameProp, ...restProps } = props;
|
|
13
|
-
const className = createClassName('duration-input', classNameProp
|
|
14
|
-
status
|
|
15
|
-
});
|
|
13
|
+
const className = createClassName('duration-input', classNameProp);
|
|
16
14
|
const testIds = useTestIds(testId, getDurationInputTestIds);
|
|
17
15
|
const t = useI18n();
|
|
18
16
|
// Refs are actually handled in Time component rendered below.
|
|
19
17
|
const { description, descriptionID } = useAutoFocusNextInput([]);
|
|
20
18
|
const Comp = format === Format.Formatted ? (_jsx(Time, { testId: testId, status: status, disabled: disabled, onChange: onChange, ...restProps, className: className })) : (_jsx(NumberUnit, { testId: testId, format: format, status: status, disabled: disabled, onChange: onChange, onSelect: onSelect, ...restProps, className: className }));
|
|
21
|
-
return label ? (_jsxs(_Fragment, { children: [_jsx(FormField, { as: 'fieldset',
|
|
19
|
+
return label ? (_jsxs(_Fragment, { children: [_jsx(FormField, { as: 'fieldset', ...(format === Format.Formatted ? { info: t('time_format_info') } : undefined), status: status, testId: testIds, label: label, labelHidden: labelHidden, id: id, required: required, disabled: disabled, ref: ref, additionalInfo: additionalInfo, "aria-describedby": format === Format.Formatted ? descriptionID : undefined, children: Comp }), format === Format.Formatted ? description : null] })) : (Comp);
|
|
22
20
|
});
|
|
23
21
|
export default withTestIds(DurationInput, getDurationInputTestIds);
|
|
24
22
|
//# sourceMappingURL=DurationInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DurationInput.js","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/DurationInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,aAAa,GAAyD,UAAU,CACpF,SAAS,aAAa,CACpB,KAA0C,EAC1C,GAA6B;IAE7B,MAAM,EACJ,MAAM,EACN,EAAE,EACF,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,MAAM,CAAC,OAAO,EACvB,QAAQ,EACR,cAAc,EACd,SAAS,EAAE,aAAa,EACxB,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,eAAe,CAAC,gBAAgB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"DurationInput.js","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/DurationInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,MAAM,aAAa,GAAyD,UAAU,CACpF,SAAS,aAAa,CACpB,KAA0C,EAC1C,GAA6B;IAE7B,MAAM,EACJ,MAAM,EACN,EAAE,EACF,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,MAAM,CAAC,OAAO,EACvB,QAAQ,EACR,cAAc,EACd,SAAS,EAAE,aAAa,EACxB,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,eAAe,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACnE,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IAE5D,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,8DAA8D;IAC9D,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,qBAAqB,CAAC,EAAE,CAAC,CAAC;IAEjE,MAAM,IAAI,GACR,MAAM,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAC5B,KAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,KACd,SAAS,EACb,SAAS,EAAE,SAAS,GACpB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IACT,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,KACd,SAAS,EACb,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;IAEJ,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,KAAC,SAAS,IACR,EAAE,EAAC,UAAU,KACT,CAAC,MAAM,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAC/E,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,cAAc,EAAE,cAAc,sBACZ,MAAM,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,YAExE,IAAI,GACK,EACX,MAAM,KAAK,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAChD,CACJ,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref, FunctionComponent } from 'react';\n\nimport { useI18n, useTestIds } from '../../../../hooks';\nimport FormField from '../../../FormField';\nimport type { ForwardProps } from '../../../../types';\nimport { getDurationInputTestIds } from '../../DateTime.test-ids';\nimport { createClassName, withTestIds } from '../../../../utils';\nimport useAutoFocusNextInput from '../useAutoFocusNextInput';\n\nimport Time from './Time';\nimport NumberUnit from './NumberUnit';\nimport type DurationInputProps from './DurationInput.types';\nimport { Format } from './DurationInput.types';\n\nconst DurationInput: FunctionComponent<DurationInputProps & ForwardProps> = forwardRef(\n function DurationInput(\n props: PropsWithoutRef<DurationInputProps>,\n ref: Ref<HTMLFieldSetElement>\n ) {\n const {\n testId,\n id,\n label,\n labelHidden,\n required,\n status,\n disabled,\n onChange,\n format = Format.Seconds,\n onSelect,\n additionalInfo,\n className: classNameProp,\n ...restProps\n } = props;\n const className = createClassName('duration-input', classNameProp);\n const testIds = useTestIds(testId, getDurationInputTestIds);\n\n const t = useI18n();\n\n // Refs are actually handled in Time component rendered below.\n const { description, descriptionID } = useAutoFocusNextInput([]);\n\n const Comp =\n format === Format.Formatted ? (\n <Time\n testId={testId}\n status={status}\n disabled={disabled}\n onChange={onChange}\n {...restProps}\n className={className}\n />\n ) : (\n <NumberUnit\n testId={testId}\n format={format}\n status={status}\n disabled={disabled}\n onChange={onChange}\n onSelect={onSelect}\n {...restProps}\n className={className}\n />\n );\n\n return label ? (\n <>\n <FormField\n as='fieldset'\n {...(format === Format.Formatted ? { info: t('time_format_info') } : undefined)}\n status={status}\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n required={required}\n disabled={disabled}\n ref={ref}\n additionalInfo={additionalInfo}\n aria-describedby={format === Format.Formatted ? descriptionID : undefined}\n >\n {Comp}\n </FormField>\n {format === Format.Formatted ? description : null}\n </>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(DurationInput, getDurationInputTestIds);\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { ForwardProps } from '../../../../types';
|
|
3
3
|
import type DurationInputProps from './DurationInput.types';
|
|
4
|
-
export declare const StyledNumberUnit: import("styled-components").
|
|
4
|
+
export declare const StyledNumberUnit: 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"> & {
|
|
5
|
+
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;
|
|
6
|
+
}, DurationInputProps>> & string;
|
|
5
7
|
type NumberUnitProps = DurationInputProps & ForwardProps;
|
|
6
8
|
declare const NumberUnit: FC<NumberUnitProps>;
|
|
7
9
|
export default NumberUnit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberUnit.d.ts","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/NumberUnit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,EAAE,EAAiB,MAAM,OAAO,CAAC;AAO5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWtD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAG5D,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NumberUnit.d.ts","sourceRoot":"","sources":["../../../../../src/components/DateTime/Input/Duration/NumberUnit.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,EAAE,EAAiB,MAAM,OAAO,CAAC;AAO5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWtD,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAG5D,eAAO,MAAM,gBAAgB;;gCA2B5B,CAAC;AAIF,KAAK,eAAe,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAIzD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8GnC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -11,7 +11,9 @@ export interface MonthInputProps extends DateTimeProps {
|
|
|
11
11
|
/** Pass a heading and content to show additional information on the field. */
|
|
12
12
|
additionalInfo?: FormControlProps['additionalInfo'];
|
|
13
13
|
}
|
|
14
|
-
export declare const StyledMonthInput: import("styled-components").
|
|
14
|
+
export declare const StyledMonthInput: 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"> & {
|
|
15
|
+
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;
|
|
16
|
+
}, MonthInputProps>> & string;
|
|
15
17
|
declare const _default: FunctionComponent<MonthInputProps & ForwardProps> & {
|
|
16
18
|
getTestIds: (testIdProp?: import("../../../types").TestIdProp["testId"]) => import("../../../types").TestIdsRecord<readonly ["control-month", "control-year", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
17
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/MonthInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AASnD,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MonthInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/MonthInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AASnD,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,gBAAgB;;6BAkC5B,CAAC;;;;AA+NF,wBAA6D"}
|
|
@@ -27,23 +27,23 @@ export const StyledMonthInput = styled(StyledDateTime) `
|
|
|
27
27
|
z-index: 1;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
&:first-child {
|
|
31
31
|
flex-grow: 1;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
&:first-child > ${StyledSelect} {
|
|
35
35
|
border-start-end-radius: 0;
|
|
36
36
|
border-end-end-radius: 0;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
&:last-child > ${StyledSelect} {
|
|
40
40
|
width: max-content;
|
|
41
41
|
margin-inline-start: -0.0625rem;
|
|
42
42
|
border-start-start-radius: 0;
|
|
43
43
|
border-end-start-radius: 0;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
&:first-child > ${StyledFormFieldInfo}, &:last-child > ${StyledFormFieldInfo} {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -84,8 +84,6 @@ const MonthInput = forwardRef(function MonthInput(props, ref) {
|
|
|
84
84
|
new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() - 10));
|
|
85
85
|
const maxDate = parseToDate(max ??
|
|
86
86
|
new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() + 10));
|
|
87
|
-
minDate.setUTCMinutes(minDate.getUTCMinutes() - minDate.getTimezoneOffset());
|
|
88
|
-
maxDate.setUTCMinutes(maxDate.getUTCMinutes() - maxDate.getTimezoneOffset());
|
|
89
87
|
const minYear = minDate.getUTCFullYear();
|
|
90
88
|
const maxYear = maxDate.getUTCFullYear();
|
|
91
89
|
const years = range(minYear, maxYear);
|
|
@@ -131,8 +129,8 @@ const MonthInput = forwardRef(function MonthInput(props, ref) {
|
|
|
131
129
|
}), [locale]);
|
|
132
130
|
const Month = (_jsxs(Select, { "data-testid": testIds.controlMonth, label: cap(displayNames.of('month')), labelHidden: innerLabelsHidden, ref: monthSelectRef, "aria-label": displayNames.of('month'), readOnly: readOnly, required: required, onChange: onSelectChange, status: status, disabled: disabled, autoFocus: autoFocus, children: [!required && _jsx(Option, { children: " " }, 'null'), monthOptions] }, 'month'));
|
|
133
131
|
const Year = (_jsxs(Select, { "data-testid": testIds.controlYear, label: cap(displayNames.of('year')), labelHidden: innerLabelsHidden, ref: yearSelectRef, "aria-label": displayNames.of('year'), readOnly: readOnly, required: required, onChange: onSelectChange, status: status, disabled: disabled, children: [!required && _jsx(Option, { children: " " }, 'null'), yearOptions] }, 'year'));
|
|
134
|
-
const Comp = (_jsxs(Flex, { as: StyledMonthInput, forwardedAs: StyledFormControl, container: { alignItems: 'center', wrap: 'nowrap' }, ref: containerRef, status: status, disabled: disabled, readOnly: readOnly, ...restProps, className: createClassName('month-input', className
|
|
135
|
-
return label ? (_jsx(FormField, { testId: testIds, as: 'fieldset',
|
|
132
|
+
const Comp = (_jsxs(Flex, { as: StyledMonthInput, forwardedAs: StyledFormControl, container: { alignItems: 'center', wrap: 'nowrap' }, ref: containerRef, status: status, disabled: disabled, readOnly: readOnly, ...restProps, className: createClassName('month-input', className), children: [Month, Year] }));
|
|
133
|
+
return label ? (_jsx(FormField, { testId: testIds, as: 'fieldset', label: label, labelHidden: labelHidden, id: id, info: info, readOnly: readOnly, status: status, required: required, disabled: disabled, additionalInfo: additionalInfo, children: Comp })) : (Comp);
|
|
136
134
|
});
|
|
137
135
|
export default withTestIds(MonthInput, getMonthInputTestIds);
|
|
138
136
|
//# sourceMappingURL=MonthInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/MonthInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,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port styled from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport type { ForwardProps } from '../../../types';\nimport { cap, createClassName, range, withTestIds } from '../../../utils';\nimport { useConfiguration, useConsolidatedRef, useFocusWithin, useTestIds } from '../../../hooks';\nimport FormField from '../../FormField';\nimport Select, { Option } from '../../Select';\nimport { StyledSelect } from '../../Select/Select';\nimport Flex from '../../Flex';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { getMonthInputTestIds } from '../DateTime.test-ids';\nimport { StyledFormField, StyledFormFieldInfo } from '../../FormField/FormField';\n\nimport { parseToDate, getLocalizedMonths, getLocalizedYear } from './utils';\nimport StyledDateTime from './DateTime.styles';\nimport type { DateParts } from './DateTimeInput.types';\n\nexport interface MonthInputProps extends DateTimeProps {\n /**\n * Toggles visibility of inner labels form Month and Year\n * @default true\n */\n innerLabelsHidden?: boolean;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledMonthInput = styled(StyledDateTime)<MonthInputProps>`\n padding: 0;\n border: 0;\n background-color: transparent;\n\n ${StyledFormField}:enabled > &:focus-within {\n box-shadow: none;\n }\n\n ${StyledFormField} {\n > ${StyledSelect}:focus {\n z-index: 1;\n }\n\n :first-child {\n flex-grow: 1;\n }\n\n :first-child > ${StyledSelect} {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :last-child > ${StyledSelect} {\n width: max-content;\n margin-inline-start: -0.0625rem;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n :first-child > ${StyledFormFieldInfo}, :last-child > ${StyledFormFieldInfo} {\n display: none;\n }\n }\n`;\n\nStyledMonthInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n { month, year }: DateParts<string | undefined>\n): DateTimeCallbackParameter => {\n if ([month, year].every(Boolean)) {\n const resultDate = new Date(date);\n resultDate.setUTCFullYear(Number(year), Number(month));\n // handle month overflowing\n if (resultDate.getUTCMonth() !== Number(month)) {\n resultDate.setUTCDate(0);\n }\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([year, month].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 MonthInput: FunctionComponent<MonthInputProps & ForwardProps> = forwardRef(\n function MonthInput(props: PropsWithoutRef<MonthInputProps>, ref: Ref<HTMLFieldSetElement>) {\n const { locale } = useConfiguration();\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n innerLabelsHidden = true,\n info,\n status,\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, getMonthInputTestIds);\n\n const date = value ? parseToDate(value) : undefined;\n\n const dateToGetFullYearFrom = date ?? new Date();\n\n const minDate = parseToDate(\n min ??\n new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() - 10)\n );\n const maxDate = parseToDate(\n max ??\n new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() + 10)\n );\n\n minDate.setUTCMinutes(minDate.getUTCMinutes() - minDate.getTimezoneOffset());\n maxDate.setUTCMinutes(maxDate.getUTCMinutes() - maxDate.getTimezoneOffset());\n\n const minYear = minDate.getUTCFullYear();\n const maxYear = maxDate.getUTCFullYear();\n\n const years = range(minYear, maxYear);\n const months = useMemo(() => getLocalizedMonths(locale), [locale]);\n\n const monthSelectRef = useRef<HTMLSelectElement>(null);\n const yearSelectRef = useRef<HTMLSelectElement>(null);\n\n useEffect(() => {\n if (monthSelectRef.current && yearSelectRef.current) {\n monthSelectRef.current.value = date?.getUTCMonth().toString() ?? '';\n yearSelectRef.current.value = date?.getUTCFullYear().toString() ?? '';\n }\n }, [date?.toDateString()]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n month: monthSelectRef.current?.value || '',\n year: yearSelectRef.current?.value || ''\n };\n };\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 else if (onBlur && !focused) onBlur(callbackParam);\n };\n\n const onSelectChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n };\n\n const containerRef = useConsolidatedRef<HTMLElement>(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const isMonthOptionDisabled = (monthIndex: number) => {\n const year =\n yearSelectRef.current && yearSelectRef.current.value\n ? parseInt(yearSelectRef.current.value, 10)\n : new Date().getUTCFullYear();\n\n return (\n (year === minDate.getUTCFullYear() && monthIndex < minDate.getUTCMonth()) ||\n (year === maxDate.getUTCFullYear() && monthIndex > maxDate.getUTCMonth())\n );\n };\n\n const monthOptions = months.map((month, index) => (\n <Option disabled={isMonthOptionDisabled(index)} key={month} value={index.toString()}>\n {months[index]}\n </Option>\n ));\n const yearOptions = years.map(year => (\n <Option key={year.toString()} value={year.toString()}>\n {getLocalizedYear(year, locale).toString()}\n </Option>\n ));\n\n const displayNames = useMemo(\n () =>\n new Intl.DisplayNames(locale, {\n style: 'long',\n type: 'dateTimeField'\n }) as Intl.DateTimeDisplayNames,\n [locale]\n );\n\n const Month = (\n <Select\n data-testid={testIds.controlMonth}\n label={cap(displayNames.of('month'))}\n labelHidden={innerLabelsHidden}\n key='month'\n ref={monthSelectRef}\n aria-label={displayNames.of('month')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n autoFocus={autoFocus}\n >\n {!required && <Option key='null'> </Option>}\n {monthOptions}\n </Select>\n );\n\n const Year = (\n <Select\n data-testid={testIds.controlYear}\n label={cap(displayNames.of('year'))}\n labelHidden={innerLabelsHidden}\n key='year'\n ref={yearSelectRef}\n aria-label={displayNames.of('year')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n >\n {!required && <Option key='null'> </Option>}\n {yearOptions}\n </Select>\n );\n\n const Comp = (\n <Flex\n as={StyledMonthInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center', wrap: 'nowrap' }}\n ref={containerRef}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n {...restProps}\n className={createClassName('month-input', className, { status })}\n >\n {Month}\n {Year}\n </Flex>\n );\n\n return label ? (\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 >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(MonthInput, getMonthInputTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"MonthInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/MonthInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,O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EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,aAEjB,CAAC,QAAQ,IAAI,KAAC,MAAM,qBAAK,MAAM,CAAW,EAC1C,WAAW,KAVR,MAAM,CAWH,CACV,CAAC;IAEF,MAAM,IAAI,GAAG,CACX,MAAC,IAAI,IACH,EAAE,EAAE,gBAAgB,EACpB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EACnD,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,KACd,SAAS,EACb,SAAS,EAAE,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,aAEnD,KAAK,EACL,IAAI,IACA,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,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,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useMemo, forwardRef, useEffect, useRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport type { ForwardProps } from '../../../types';\nimport { cap, createClassName, range, withTestIds } from '../../../utils';\nimport { useConfiguration, useConsolidatedRef, useFocusWithin, useTestIds } from '../../../hooks';\nimport FormField from '../../FormField';\nimport Select, { Option } from '../../Select';\nimport { StyledSelect } from '../../Select/Select';\nimport Flex from '../../Flex';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport { getMonthInputTestIds } from '../DateTime.test-ids';\nimport { StyledFormField, StyledFormFieldInfo } from '../../FormField/FormField';\n\nimport { parseToDate, getLocalizedMonths, getLocalizedYear } from './utils';\nimport StyledDateTime from './DateTime.styles';\nimport type { DateParts } from './DateTimeInput.types';\n\nexport interface MonthInputProps extends DateTimeProps {\n /**\n * Toggles visibility of inner labels form Month and Year\n * @default true\n */\n innerLabelsHidden?: boolean;\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledMonthInput = styled(StyledDateTime)<MonthInputProps>`\n padding: 0;\n border: 0;\n background-color: transparent;\n\n ${StyledFormField}:enabled > &:focus-within {\n box-shadow: none;\n }\n\n ${StyledFormField} {\n > ${StyledSelect}:focus {\n z-index: 1;\n }\n\n &:first-child {\n flex-grow: 1;\n }\n\n &:first-child > ${StyledSelect} {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n &:last-child > ${StyledSelect} {\n width: max-content;\n margin-inline-start: -0.0625rem;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n &:first-child > ${StyledFormFieldInfo}, &:last-child > ${StyledFormFieldInfo} {\n display: none;\n }\n }\n`;\n\nStyledMonthInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n { month, year }: DateParts<string | undefined>\n): DateTimeCallbackParameter => {\n if ([month, year].every(Boolean)) {\n const resultDate = new Date(date);\n resultDate.setUTCFullYear(Number(year), Number(month));\n // handle month overflowing\n if (resultDate.getUTCMonth() !== Number(month)) {\n resultDate.setUTCDate(0);\n }\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([year, month].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 MonthInput: FunctionComponent<MonthInputProps & ForwardProps> = forwardRef(\n function MonthInput(props: PropsWithoutRef<MonthInputProps>, ref: Ref<HTMLFieldSetElement>) {\n const { locale } = useConfiguration();\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n innerLabelsHidden = true,\n info,\n status,\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, getMonthInputTestIds);\n\n const date = value ? parseToDate(value) : undefined;\n\n const dateToGetFullYearFrom = date ?? new Date();\n\n const minDate = parseToDate(\n min ??\n new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() - 10)\n );\n const maxDate = parseToDate(\n max ??\n new Date(dateToGetFullYearFrom).setUTCFullYear(dateToGetFullYearFrom.getUTCFullYear() + 10)\n );\n\n const minYear = minDate.getUTCFullYear();\n const maxYear = maxDate.getUTCFullYear();\n\n const years = range(minYear, maxYear);\n const months = useMemo(() => getLocalizedMonths(locale), [locale]);\n\n const monthSelectRef = useRef<HTMLSelectElement>(null);\n const yearSelectRef = useRef<HTMLSelectElement>(null);\n\n useEffect(() => {\n if (monthSelectRef.current && yearSelectRef.current) {\n monthSelectRef.current.value = date?.getUTCMonth().toString() ?? '';\n yearSelectRef.current.value = date?.getUTCFullYear().toString() ?? '';\n }\n }, [date?.toDateString()]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n month: monthSelectRef.current?.value || '',\n year: yearSelectRef.current?.value || ''\n };\n };\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 else if (onBlur && !focused) onBlur(callbackParam);\n };\n\n const onSelectChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n };\n\n const containerRef = useConsolidatedRef<HTMLElement>(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const isMonthOptionDisabled = (monthIndex: number) => {\n const year =\n yearSelectRef.current && yearSelectRef.current.value\n ? parseInt(yearSelectRef.current.value, 10)\n : new Date().getUTCFullYear();\n\n return (\n (year === minDate.getUTCFullYear() && monthIndex < minDate.getUTCMonth()) ||\n (year === maxDate.getUTCFullYear() && monthIndex > maxDate.getUTCMonth())\n );\n };\n\n const monthOptions = months.map((month, index) => (\n <Option disabled={isMonthOptionDisabled(index)} key={month} value={index.toString()}>\n {months[index]}\n </Option>\n ));\n const yearOptions = years.map(year => (\n <Option key={year.toString()} value={year.toString()}>\n {getLocalizedYear(year, locale).toString()}\n </Option>\n ));\n\n const displayNames = useMemo(\n () =>\n new Intl.DisplayNames(locale, {\n style: 'long',\n type: 'dateTimeField'\n }) as Intl.DateTimeDisplayNames,\n [locale]\n );\n\n const Month = (\n <Select\n data-testid={testIds.controlMonth}\n label={cap(displayNames.of('month'))}\n labelHidden={innerLabelsHidden}\n key='month'\n ref={monthSelectRef}\n aria-label={displayNames.of('month')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n autoFocus={autoFocus}\n >\n {!required && <Option key='null'> </Option>}\n {monthOptions}\n </Select>\n );\n\n const Year = (\n <Select\n data-testid={testIds.controlYear}\n label={cap(displayNames.of('year'))}\n labelHidden={innerLabelsHidden}\n key='year'\n ref={yearSelectRef}\n aria-label={displayNames.of('year')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n >\n {!required && <Option key='null'> </Option>}\n {yearOptions}\n </Select>\n );\n\n const Comp = (\n <Flex\n as={StyledMonthInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center', wrap: 'nowrap' }}\n ref={containerRef}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n {...restProps}\n className={createClassName('month-input', className)}\n >\n {Month}\n {Year}\n </Flex>\n );\n\n return label ? (\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 >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(MonthInput, getMonthInputTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/PartInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAWpD,MAAM,WAAW,cACf,SAAQ,UAAU,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,SAAS,EAAE,+BAA+B,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"PartInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/PartInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAWpD,MAAM,WAAW,cACf,SAAQ,UAAU,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,SAAS,EAAE,+BAA+B,CAAC,cAAc,CAwF7D,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useCallback, useEffect, useLayoutEffect } from 'react';
|
|
2
|
+
import { forwardRef, useCallback, useEffect, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { useConsolidatedRef, useEvent } from '../../../hooks';
|
|
4
4
|
import { BareInput } from './DateTime.styles';
|
|
5
5
|
const regexPattern = /[0-9]/;
|
|
@@ -10,38 +10,47 @@ const padNumberWithZeros = (maxLength, value = '') => {
|
|
|
10
10
|
};
|
|
11
11
|
const PartInput = forwardRef(function PartInput({ value, onChange, readOnly, min = 0, max = Infinity, size = 2, maxLength = Infinity, padWithZeros = true, ...restProps }, ref) {
|
|
12
12
|
const inputRef = useConsolidatedRef(ref);
|
|
13
|
+
// Track whether the input value has been modified by the user.
|
|
14
|
+
// Due to the nature of the input, we must track this through a ref instead of state.
|
|
15
|
+
const modifiedRef = useRef(false);
|
|
13
16
|
useEffect(() => {
|
|
14
17
|
if (inputRef.current && !Number.isNaN(value)) {
|
|
15
18
|
inputRef.current.value = padNumberWithZeros(maxLength, value?.toString());
|
|
19
|
+
modifiedRef.current = false;
|
|
16
20
|
}
|
|
17
|
-
}, [value,
|
|
21
|
+
}, [value, maxLength]);
|
|
18
22
|
useLayoutEffect(() => {
|
|
19
23
|
if (inputRef.current) {
|
|
20
24
|
inputRef.current.style.width = `calc(${size}ch + ${size} * ${getComputedStyle(inputRef.current).letterSpacing})`;
|
|
21
25
|
}
|
|
22
|
-
}, [size
|
|
26
|
+
}, [size]);
|
|
23
27
|
useEvent('beforeinput', (event) => {
|
|
24
28
|
if (event.data && !regexPattern.test(event.data)) {
|
|
25
29
|
event.preventDefault();
|
|
26
30
|
}
|
|
27
31
|
}, { target: inputRef });
|
|
28
|
-
const onInputChange = useCallback((
|
|
29
|
-
const targetEl =
|
|
32
|
+
const onInputChange = useCallback((e) => {
|
|
33
|
+
const targetEl = e.target;
|
|
30
34
|
if (targetEl.value.length > maxLength)
|
|
31
35
|
targetEl.value = targetEl.value.slice(0, maxLength);
|
|
32
36
|
else if (size !== maxLength)
|
|
33
37
|
targetEl.style.width = `${Math.max(targetEl.value.length, size)}ch`;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
modifiedRef.current = true;
|
|
39
|
+
}, [maxLength, size]);
|
|
40
|
+
const onBlur = useCallback((e) => {
|
|
41
|
+
const targetElValue = e.target.value;
|
|
37
42
|
const paddedValue = padWithZeros
|
|
38
43
|
? padNumberWithZeros(maxLength, targetElValue)
|
|
39
44
|
: targetElValue;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
e.target.value = paddedValue;
|
|
46
|
+
if (modifiedRef.current) {
|
|
47
|
+
// Only trigger onChange if the value has been modified
|
|
48
|
+
onChange?.(paddedValue);
|
|
49
|
+
modifiedRef.current = false;
|
|
50
|
+
}
|
|
51
|
+
}, [onChange, padWithZeros, maxLength]);
|
|
43
52
|
const defaultValue = value !== undefined ? padNumberWithZeros(maxLength, value?.toString()) : '';
|
|
44
|
-
return (_jsx(BareInput, { type: 'number', defaultValue: defaultValue, onBlur: onBlur, onChange: onInputChange, step: 1, min: min, max: max, maxLength: maxLength, readOnly: readOnly, ref: inputRef, size: size, ...restProps }));
|
|
53
|
+
return (_jsx(BareInput, { type: 'number', defaultValue: defaultValue, onBlur: onBlur, onChange: onInputChange, step: 1, min: min, max: max, maxLength: maxLength, readOnly: readOnly, ref: inputRef, size: size, autoComplete: '_off', ...restProps }));
|
|
45
54
|
});
|
|
46
55
|
export default PartInput;
|
|
47
56
|
//# sourceMappingURL=PartInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/PartInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PartInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/PartInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,YAAY,GAAG,OAAO,CAAC;AAE7B,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,QAAgB,EAAE,EAAE,EAAE;IACnE,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAE5B,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzE,CAAC,CAAC;AAYF,MAAM,SAAS,GAAoD,UAAU,CAAC,SAAS,SAAS,CAC9F,EACE,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,GAAG,G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1B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,IAAI,EACV,YAAY,EAAC,MAAM,KACf,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import { forwardRef, useCallback, useEffect, useLayoutEffect, useRef } from 'react';\nimport type { FocusEvent, PropsWithoutRef, ChangeEvent } from 'react';\n\nimport { useConsolidatedRef, useEvent } from '../../../hooks';\nimport type { ForwardRefForwardPropsComponent, OmitStrict } from '../../../types';\nimport type { InputProps } from '../../Input/Input';\n\nimport { BareInput } from './DateTime.styles';\n\nconst regexPattern = /[0-9]/;\n\nconst padNumberWithZeros = (maxLength: number, value: string = '') => {\n if (value === '') return '';\n\n return value.padStart(Number.isFinite(maxLength) ? maxLength : 0, '0');\n};\nexport interface PartInputProps\n extends OmitStrict<InputProps, 'defaultValue' | 'value' | 'onChange'> {\n value?: number;\n min?: number;\n max?: number;\n maxLength?: number;\n padWithZeros?: boolean;\n size?: number;\n onChange?: (value?: string) => void;\n}\n\nconst PartInput: ForwardRefForwardPropsComponent<PartInputProps> = forwardRef(function PartInput(\n {\n value,\n onChange,\n readOnly,\n min = 0,\n max = Infinity,\n size = 2,\n maxLength = Infinity,\n padWithZeros = true,\n ...restProps\n }: PropsWithoutRef<PartInputProps>,\n ref: PartInputProps['ref']\n) {\n const inputRef = useConsolidatedRef(ref);\n // Track whether the input value has been modified by the user.\n // Due to the nature of the input, we must track this through a ref instead of state.\n const modifiedRef = useRef(false);\n\n useEffect(() => {\n if (inputRef.current && !Number.isNaN(value)) {\n inputRef.current.value = padNumberWithZeros(maxLength, value?.toString());\n modifiedRef.current = false;\n }\n }, [value, maxLength]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n inputRef.current.style.width = `calc(${size}ch + ${size} * ${getComputedStyle(inputRef.current).letterSpacing})`;\n }\n }, [size]);\n\n useEvent(\n 'beforeinput',\n (event: InputEvent) => {\n if (event.data && !regexPattern.test(event.data)) {\n event.preventDefault();\n }\n },\n { target: inputRef }\n );\n\n const onInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const targetEl = e.target;\n if (targetEl.value.length > maxLength) targetEl.value = targetEl.value.slice(0, maxLength);\n else if (size !== maxLength)\n targetEl.style.width = `${Math.max(targetEl.value.length, size)}ch`;\n modifiedRef.current = true;\n },\n [maxLength, size]\n );\n\n const onBlur = useCallback(\n (e: FocusEvent<HTMLInputElement>) => {\n const targetElValue = e.target.value;\n const paddedValue = padWithZeros\n ? padNumberWithZeros(maxLength, targetElValue)\n : targetElValue;\n e.target.value = paddedValue;\n if (modifiedRef.current) {\n // Only trigger onChange if the value has been modified\n onChange?.(paddedValue);\n modifiedRef.current = false;\n }\n },\n [onChange, padWithZeros, maxLength]\n );\n\n const defaultValue = value !== undefined ? padNumberWithZeros(maxLength, value?.toString()) : '';\n\n return (\n <BareInput\n type='number'\n defaultValue={defaultValue}\n onBlur={onBlur}\n onChange={onInputChange}\n step={1}\n min={min}\n max={max}\n maxLength={maxLength}\n readOnly={readOnly}\n ref={inputRef}\n size={size}\n autoComplete='_off'\n {...restProps}\n />\n );\n});\n\nexport default PartInput;\n"]}
|
|
@@ -6,7 +6,9 @@ export interface QuarterInputProps extends DateTimeProps {
|
|
|
6
6
|
/** Pass a heading and content to show additional information on the field. */
|
|
7
7
|
additionalInfo?: FormControlProps['additionalInfo'];
|
|
8
8
|
}
|
|
9
|
-
export declare const StyledQuarterInput: import("styled-components").
|
|
9
|
+
export declare const StyledQuarterInput: 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"> & {
|
|
10
|
+
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;
|
|
11
|
+
}, QuarterInputProps>> & string;
|
|
10
12
|
declare const _default: FunctionComponent<QuarterInputProps & ForwardProps> & {
|
|
11
13
|
getTestIds: (testIdProp?: import("../../../types").TestIdProp["testId"]) => import("../../../types").TestIdsRecord<readonly ["control-quarter", "control-year", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuarterInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/QuarterInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAcnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAS1D,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"QuarterInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/QuarterInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAcnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAS1D,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,kBAAkB;;+BA2B9B,CAAC;;;;AAiMF,wBAAiE"}
|
|
@@ -106,8 +106,8 @@ const QuarterInput = forwardRef(function QuarterInput(props, ref) {
|
|
|
106
106
|
const displayNames = new Intl.DisplayNames(locale, { style: 'long', type: 'dateTimeField' });
|
|
107
107
|
const Quarter = (_jsxs(Select, { "data-testid": testIds.controlQuarter, ref: quarterSelectRef, "aria-label": displayNames.of('quarter'), readOnly: readOnly, required: required, onChange: onSelectChange, status: status, disabled: disabled, autoFocus: autoFocus, children: [!required && _jsx(Option, { children: " " }, 'null'), quarterOptions] }, 'quarter'));
|
|
108
108
|
const Year = (_jsxs(Select, { "data-testid": testIds.controlYear, ref: yearSelectRef, "aria-label": displayNames.of('year'), readOnly: readOnly, required: required, onChange: onSelectChange, status: status, disabled: disabled, children: [!required && _jsx(Option, { children: " " }, 'null'), yearOptions] }, 'year'));
|
|
109
|
-
const Comp = (_jsxs(Flex, { "data-testid": label ? undefined : testIds.root, ...restProps, as: StyledQuarterInput, className: createClassName('quarter-input', className
|
|
110
|
-
return label ? (_jsx(FormField, { testId: testIds, as: 'fieldset',
|
|
109
|
+
const Comp = (_jsxs(Flex, { "data-testid": label ? undefined : testIds.root, ...restProps, as: StyledQuarterInput, className: createClassName('quarter-input', className), forwardedAs: StyledFormControl, container: { alignItems: 'center' }, ref: containerRef, status: status, disabled: disabled, readOnly: readOnly, children: [Quarter, Year] }));
|
|
110
|
+
return label ? (_jsx(FormField, { testId: testIds, as: 'fieldset', label: label, labelHidden: labelHidden, id: id, info: info, readOnly: readOnly, status: status, required: required, disabled: disabled, additionalInfo: additionalInfo, children: Comp })) : (Comp);
|
|
111
111
|
});
|
|
112
112
|
export default withTestIds(QuarterInput, getQuarterInputTestIds);
|
|
113
113
|
//# sourceMappingURL=QuarterInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuarterInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/QuarterInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,OAAO,EACP,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAQ/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAmB;;;;IAIvE,eAAe;;;;IAIf,YAAY;;;;;;;;;;;;;;;;;;;CAmBf,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,0BAA0B,GAAG,CACjC,IAAU,EACV,KAAoC,EACT,EAAE;IAC7B,IAAI,CAAC,KAAK,C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,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,KACzC,SAAS,EACb,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,eAAe,CAAC,eAAe,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,EAClE,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EACnC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,aAEjB,OAAO,EACP,IAAI,IACA,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,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,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { forwardRef, useRef, useEffect } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport type { ForwardProps } from '../../../types';\nimport FormField from '../../FormField';\nimport Select, { Option } from '../../Select';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport Flex from '../../Flex';\nimport { createClassName, range, withTestIds } from '../../../utils';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useTestIds\n} from '../../../hooks';\nimport { StyledSelect } from '../../Select/Select';\nimport { defaultThemeProp } from '../../../theme';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport { getQuarterInputTestIds } from '../DateTime.test-ids';\nimport { StyledFormField } from '../../FormField/FormField';\n\nimport { getQuarter, parseToDate } from './utils';\nimport type { QuarterNumber } from './utils';\nimport StyledDateTime from './DateTime.styles';\nimport type { DateParts } from './DateTimeInput.types';\n\nexport interface QuarterInputProps extends DateTimeProps {\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledQuarterInput = styled(StyledDateTime)<QuarterInputProps>`\n padding: 0;\n border: 0;\n\n ${StyledFormField}:enabled > &:focus-within {\n box-shadow: none;\n }\n\n ${StyledSelect} {\n min-width: 0;\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n &:last-child {\n max-width: max-content;\n margin-inline-start: -0.0625rem;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n`;\n\nStyledQuarterInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: DateParts<string | undefined>\n): DateTimeCallbackParameter => {\n if ([parts.quarter, parts.year].every(Boolean)) {\n const quarterStartMonth = [0, 3, 6, 9][Number(parts.quarter) - 1];\n\n const resultDate = new Date(date);\n resultDate.setUTCFullYear(Number(parts.year), quarterStartMonth, 1);\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([parts.year, parts.quarter].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 QuarterInput: FunctionComponent<QuarterInputProps & ForwardProps> = forwardRef(\n function QuarterInput(props: PropsWithoutRef<QuarterInputProps>, ref: Ref<HTMLFieldSetElement>) {\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n info,\n status,\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, getQuarterInputTestIds);\n\n const { locale } = useConfiguration();\n\n const date = value ? parseToDate(value) : undefined;\n const currentYear = date ? date.getUTCFullYear() : new Date().getFullYear();\n\n const minYear = min ? parseToDate(min).getUTCFullYear() : currentYear - 10;\n const maxYear = max ? parseToDate(max).getUTCFullYear() : currentYear + 10;\n\n const years = range(minYear, maxYear);\n\n const quarterSelectRef = useRef<HTMLSelectElement>(null);\n const yearSelectRef = useRef<HTMLSelectElement>(null);\n\n useEffect(() => {\n if (quarterSelectRef.current && yearSelectRef.current) {\n quarterSelectRef.current.value = date ? getQuarter(date).toString() : '';\n yearSelectRef.current.value = date?.getUTCFullYear().toString() ?? '';\n }\n }, [date?.toDateString()]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n quarter: quarterSelectRef.current?.value || '',\n year: yearSelectRef.current?.value || ''\n };\n };\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 else if (onBlur && !focused) onBlur(callbackParam);\n };\n\n const onSelectChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n };\n\n const containerRef = useConsolidatedRef<HTMLElement>(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const t = useI18n();\n\n const quarters: QuarterNumber[] = [1, 2, 3, 4];\n\n const quarterOptions = quarters.map(quarterNumber => (\n <Option key={t(`date_quarter_q${quarterNumber}`).trim()} value={quarterNumber.toString()}>\n {t(`date_quarter_q${quarterNumber}`).trim()}\n </Option>\n ));\n\n const yearOptions = years.map(year => (\n <Option key={year.toString()} value={year.toString()}>\n {year.toString()}\n </Option>\n ));\n\n const displayNames = new Intl.DisplayNames(locale, { style: 'long', type: 'dateTimeField' });\n\n const Quarter = (\n <Select\n data-testid={testIds.controlQuarter}\n key='quarter'\n ref={quarterSelectRef}\n aria-label={displayNames.of('quarter')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n autoFocus={autoFocus}\n >\n {!required && <Option key='null'> </Option>}\n {quarterOptions}\n </Select>\n );\n\n const Year = (\n <Select\n data-testid={testIds.controlYear}\n key='year'\n ref={yearSelectRef}\n aria-label={displayNames.of('year')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n >\n {!required && <Option key='null'> </Option>}\n {yearOptions}\n </Select>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n {...restProps}\n as={StyledQuarterInput}\n className={createClassName('quarter-input', className, { status })}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center' }}\n ref={containerRef}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n >\n {Quarter}\n {Year}\n </Flex>\n );\n\n return label ? (\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 >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(QuarterInput, getQuarterInputTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"QuarterInput.js","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/QuarterInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,eAAe,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AAU,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,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { forwardRef, useRef, useEffect } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport type { ForwardProps } from '../../../types';\nimport FormField from '../../FormField';\nimport Select, { Option } from '../../Select';\nimport type DateTimeProps from '../DateTime.types';\nimport type { DateTimeCallbackParameter } from '../DateTime.types';\nimport Flex from '../../Flex';\nimport { createClassName, range, withTestIds } from '../../../utils';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useFocusWithin,\n useI18n,\n useTestIds\n} from '../../../hooks';\nimport { StyledSelect } from '../../Select/Select';\nimport { defaultThemeProp } from '../../../theme';\nimport { StyledFormControl } from '../../FormControl';\nimport type { FormControlProps } from '../../FormControl';\nimport { getQuarterInputTestIds } from '../DateTime.test-ids';\nimport { StyledFormField } from '../../FormField/FormField';\n\nimport { getQuarter, parseToDate } from './utils';\nimport type { QuarterNumber } from './utils';\nimport StyledDateTime from './DateTime.styles';\nimport type { DateParts } from './DateTimeInput.types';\n\nexport interface QuarterInputProps extends DateTimeProps {\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n}\n\nexport const StyledQuarterInput = styled(StyledDateTime)<QuarterInputProps>`\n padding: 0;\n border: 0;\n\n ${StyledFormField}:enabled > &:focus-within {\n box-shadow: none;\n }\n\n ${StyledSelect} {\n min-width: 0;\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n &:last-child {\n max-width: max-content;\n margin-inline-start: -0.0625rem;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n }\n`;\n\nStyledQuarterInput.defaultProps = defaultThemeProp;\n\nconst convertToCallbackParameter = (\n date: Date,\n parts: DateParts<string | undefined>\n): DateTimeCallbackParameter => {\n if ([parts.quarter, parts.year].every(Boolean)) {\n const quarterStartMonth = [0, 3, 6, 9][Number(parts.quarter) - 1];\n\n const resultDate = new Date(date);\n resultDate.setUTCFullYear(Number(parts.year), quarterStartMonth, 1);\n return {\n valueAsISOString: resultDate.toISOString(),\n valueAsTimestamp: resultDate.getTime()\n };\n }\n if ([parts.year, parts.quarter].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 QuarterInput: FunctionComponent<QuarterInputProps & ForwardProps> = forwardRef(\n function QuarterInput(props: PropsWithoutRef<QuarterInputProps>, ref: Ref<HTMLFieldSetElement>) {\n const {\n testId,\n value,\n min,\n max,\n id,\n label,\n labelHidden,\n info,\n status,\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, getQuarterInputTestIds);\n\n const { locale } = useConfiguration();\n\n const date = value ? parseToDate(value) : undefined;\n const currentYear = date ? date.getUTCFullYear() : new Date().getFullYear();\n\n const minYear = min ? parseToDate(min).getUTCFullYear() : currentYear - 10;\n const maxYear = max ? parseToDate(max).getUTCFullYear() : currentYear + 10;\n\n const years = range(minYear, maxYear);\n\n const quarterSelectRef = useRef<HTMLSelectElement>(null);\n const yearSelectRef = useRef<HTMLSelectElement>(null);\n\n useEffect(() => {\n if (quarterSelectRef.current && yearSelectRef.current) {\n quarterSelectRef.current.value = date ? getQuarter(date).toString() : '';\n yearSelectRef.current.value = date?.getUTCFullYear().toString() ?? '';\n }\n }, [date?.toDateString()]);\n\n const pickParts = (): DateParts<string | undefined> => {\n return {\n quarter: quarterSelectRef.current?.value || '',\n year: yearSelectRef.current?.value || ''\n };\n };\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 else if (onBlur && !focused) onBlur(callbackParam);\n };\n\n const onSelectChange = () => {\n onChange?.(convertToCallbackParameter(date ? new Date(date) : new Date(), pickParts()));\n };\n\n const containerRef = useConsolidatedRef<HTMLElement>(ref);\n useFocusWithin([containerRef], onFocusChange);\n\n const t = useI18n();\n\n const quarters: QuarterNumber[] = [1, 2, 3, 4];\n\n const quarterOptions = quarters.map(quarterNumber => (\n <Option key={t(`date_quarter_q${quarterNumber}`).trim()} value={quarterNumber.toString()}>\n {t(`date_quarter_q${quarterNumber}`).trim()}\n </Option>\n ));\n\n const yearOptions = years.map(year => (\n <Option key={year.toString()} value={year.toString()}>\n {year.toString()}\n </Option>\n ));\n\n const displayNames = new Intl.DisplayNames(locale, { style: 'long', type: 'dateTimeField' });\n\n const Quarter = (\n <Select\n data-testid={testIds.controlQuarter}\n key='quarter'\n ref={quarterSelectRef}\n aria-label={displayNames.of('quarter')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n autoFocus={autoFocus}\n >\n {!required && <Option key='null'> </Option>}\n {quarterOptions}\n </Select>\n );\n\n const Year = (\n <Select\n data-testid={testIds.controlYear}\n key='year'\n ref={yearSelectRef}\n aria-label={displayNames.of('year')}\n readOnly={readOnly}\n required={required}\n onChange={onSelectChange}\n status={status}\n disabled={disabled}\n >\n {!required && <Option key='null'> </Option>}\n {yearOptions}\n </Select>\n );\n\n const Comp = (\n <Flex\n data-testid={label ? undefined : testIds.root}\n {...restProps}\n as={StyledQuarterInput}\n className={createClassName('quarter-input', className)}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center' }}\n ref={containerRef}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n >\n {Quarter}\n {Year}\n </Flex>\n );\n\n return label ? (\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 >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default withTestIds(QuarterInput, getQuarterInputTestIds);\n"]}
|
|
@@ -20,7 +20,9 @@ export interface TimeInputProps extends DateTimeProps {
|
|
|
20
20
|
/** Pass a heading and content to show additional information on the field. */
|
|
21
21
|
additionalInfo?: FormControlProps['additionalInfo'];
|
|
22
22
|
}
|
|
23
|
-
export declare const StyledTimeInput: import("styled-components").
|
|
23
|
+
export declare const StyledTimeInput: 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"> & {
|
|
24
|
+
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;
|
|
25
|
+
}, TimeInputProps>> & string;
|
|
24
26
|
declare const _default: FunctionComponent<TimeInputProps & ForwardProps> & {
|
|
25
27
|
getTestIds: (testIdProp?: import("../../../types").TestIdProp["testId"]) => import("../../../types").TestIdsRecord<readonly ["control-hour", "control-minute", "control-second", "control-period", "open-close-picker", "picker", "clear-current-time", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAgBnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAInD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAYjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAS3C,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateTime/Input/TimeInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAgBnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAInD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAYjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAS3C,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,eAAe;;4BAE3B,CAAC;;;;AA2ZF,wBAA2D"}
|
|
@@ -157,7 +157,7 @@ const TimeInput = forwardRef(function TimeInput(props, ref) {
|
|
|
157
157
|
}, readOnly: readOnly, children: [_jsx(Option, { value: 'AM', children: t('meridiem_value_am') }), _jsx(Option, { value: 'PM', children: t('meridiem_value_pm') })] }, 'period'));
|
|
158
158
|
const containerRef = useConsolidatedRef(ref);
|
|
159
159
|
useFocusWithin([containerRef], onFocusChange);
|
|
160
|
-
const Picker = (_jsxs(_Fragment, { children: [_jsx(StyledInputButton, { "data-testid": testIds.openClosePicker, variant: 'simple', icon: true, ref: setTimePickerButtonEl, onClick: () => setOpen(cur => !cur), "aria-label": t(open ? 'close_time_button_a11y' : 'open_time_button_a11y'), readOnly: readOnly, disabled: disabled, children: _jsx(Icon, { name: 'clock' }) }), _jsx(Popover, { show: open, ref: setPopoverRef, target: containerRef.current, placement: 'bottom-end', strategy: 'fixed', modifiers: [sameWidth], children: _jsx(TimePicker, { testId: testIds.picker, selected: currentlySelectedTime(), interval: pickerInterval, onSelect: selected => {
|
|
160
|
+
const Picker = (_jsxs(_Fragment, { children: [_jsx(StyledInputButton, { "data-testid": testIds.openClosePicker, variant: 'simple', icon: true, ref: setTimePickerButtonEl, onClick: () => setOpen(cur => !cur), "aria-label": t(open ? 'close_time_button_a11y' : 'open_time_button_a11y'), readOnly: readOnly, disabled: disabled, children: _jsx(Icon, { name: 'clock' }) }), _jsx(Popover, { show: open, ref: setPopoverRef, target: containerRef.current, placement: 'bottom-end', strategy: 'fixed', modifiers: [sameWidth], children: _jsx(TimePicker, { testId: testIds.picker, selected: currentlySelectedTime(), interval: pickerInterval, withSeconds: withSeconds, onSelect: selected => {
|
|
161
161
|
hourInputRef.current.value = (is12h ? convertTo12h(selected.getUTCHours()) : selected.getUTCHours())
|
|
162
162
|
.toString()
|
|
163
163
|
.padStart(2, '0');
|
|
@@ -174,7 +174,7 @@ const TimeInput = forwardRef(function TimeInput(props, ref) {
|
|
|
174
174
|
const Comp = (_jsxs(Flex, { "data-testid": label ? undefined : testIds.root, as: StyledTimeInput, forwardedAs: StyledFormControl, hasSuggestion: status === 'pending' && !!onResolveSuggestion, container: { alignItems: 'center', wrap: 'nowrap', justify: 'between' }, status: status, readOnly: readOnly, disabled: disabled, ref: containerRef, onClick: (e) => {
|
|
175
175
|
if (e.target === containerRef.current)
|
|
176
176
|
hourInputRef.current?.focus();
|
|
177
|
-
}, ...restProps, className: createClassName('time-input', className
|
|
177
|
+
}, ...restProps, className: createClassName('time-input', className), children: [_jsx(Flex, { ref: inputContainerRef, as: StyledInputContainer, container: { alignItems: 'center', wrap: 'wrap' }, children: getDateTimeParts(locale, getTimeOptions(withSeconds, is12h)).map(part => {
|
|
178
178
|
switch (part) {
|
|
179
179
|
case 'hour':
|
|
180
180
|
return HourInput;
|
|
@@ -197,7 +197,7 @@ const TimeInput = forwardRef(function TimeInput(props, ref) {
|
|
|
197
197
|
setTimeout(() => timePickerButtonEl?.focus());
|
|
198
198
|
onInputChange();
|
|
199
199
|
}, variant: 'simple', compact: true, label: t('clear'), children: _jsx(Icon, { name: 'times' }) })), Picker] }))] }));
|
|
200
|
-
return label ? (_jsxs(_Fragment, { children: [_jsx(FormField, { testId: testIds, as: 'fieldset',
|
|
200
|
+
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, onResolveSuggestion: onResolveSuggestion, additionalInfo: additionalInfo, "aria-describedby": descriptionID, ref: ref, children: Comp }), description] })) : (Comp);
|
|
201
201
|
});
|
|
202
202
|
export default withTestIds(TimeInput, getTimeInputTestIds);
|
|
203
203
|
//# sourceMappingURL=TimeInput.js.map
|