@pega/cosmos-react-core 7.0.0-build.9.1 → 7.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AIButton/AIButton.d.ts +30 -2
- package/lib/components/AIButton/AIButton.d.ts.map +1 -1
- package/lib/components/AIButton/AIButton.js +7 -6
- package/lib/components/AIButton/AIButton.js.map +1 -1
- package/lib/components/Actions/Actions.d.ts +1 -1
- package/lib/components/Actions/Actions.d.ts.map +1 -1
- package/lib/components/Actions/Actions.js +6 -3
- package/lib/components/Actions/Actions.js.map +1 -1
- package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +9 -7
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.js +26 -19
- package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +17 -5
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +5 -1
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +50 -11
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +4 -0
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts +3 -1
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js +3 -1
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.styles.js +1 -0
- package/lib/components/AppShell/AppShellList.styles.js.map +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellSearch.styles.js +2 -0
- package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationList.js +3 -3
- 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 +1 -0
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/AppShell/Operator.d.ts +1 -1
- package/lib/components/AppShell/style-utils.d.ts +3 -0
- package/lib/components/AppShell/style-utils.d.ts.map +1 -1
- package/lib/components/AppShell/style-utils.js +40 -1
- package/lib/components/AppShell/style-utils.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +2 -2
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +19 -19
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Avatar/Avatar.test-ids.d.ts +1 -1
- package/lib/components/Avatar/Avatar.test-ids.d.ts.map +1 -1
- package/lib/components/Backdrop/Backdrop.d.ts +1 -1
- package/lib/components/Backdrop/Backdrop.test-ids.d.ts +1 -1
- package/lib/components/Backdrop/Backdrop.test-ids.d.ts.map +1 -1
- package/lib/components/Badges/Alert.d.ts +1 -1
- package/lib/components/Badges/Badges.test-ids.d.ts +6 -6
- package/lib/components/Badges/Badges.test-ids.d.ts.map +1 -1
- package/lib/components/Badges/Count.d.ts +1 -1
- package/lib/components/Badges/Keyboard.d.ts +1 -1
- package/lib/components/Badges/Selection.d.ts +1 -1
- package/lib/components/Badges/Selection.d.ts.map +1 -1
- package/lib/components/Badges/Selection.js +23 -20
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Badges/Status.d.ts +1 -1
- package/lib/components/Badges/Status.d.ts.map +1 -1
- package/lib/components/Badges/Status.js +0 -1
- package/lib/components/Badges/Status.js.map +1 -1
- package/lib/components/Badges/Tag.d.ts +1 -1
- package/lib/components/Banner/Banner.d.ts +1 -1
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +3 -1
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/Banner.test-ids.d.ts +1 -1
- package/lib/components/Banner/Banner.test-ids.d.ts.map +1 -1
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +87 -58
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +8 -0
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.d.ts +3 -33
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +1 -5
- package/lib/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.d.ts +6 -23
- package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.js +3 -4
- package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts +1 -1
- package/lib/components/ColorPicker/ColorPicker.test-ids.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts +2 -4
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +8 -5
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.js +7 -1
- package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts +8 -26
- 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/ComboxBox.test-ids.d.ts +1 -1
- package/lib/components/ComboBox/ComboxBox.test-ids.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +21 -32
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts +2 -3
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +2 -3
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts +1 -1
- package/lib/components/CompositeInput/CompositeInput.test-ids.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.types.d.ts +4 -13
- package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +1 -0
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +58 -30
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Configuration/ThemeOverride.d.ts +11 -0
- package/lib/components/Configuration/ThemeOverride.d.ts.map +1 -0
- package/lib/components/Configuration/ThemeOverride.js +23 -0
- package/lib/components/Configuration/ThemeOverride.js.map +1 -0
- package/lib/components/Configuration/connected-watcher.d.ts +17 -0
- package/lib/components/Configuration/connected-watcher.d.ts.map +1 -0
- package/lib/components/Configuration/connected-watcher.js +13 -0
- package/lib/components/Configuration/connected-watcher.js.map +1 -0
- package/lib/components/Configuration/index.d.ts +1 -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/Configuration/withConfiguration.d.ts.map +1 -1
- package/lib/components/Configuration/withConfiguration.js.map +1 -1
- package/lib/components/CreditCard/CreditCard.types.d.ts +5 -25
- 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/CreditCardDisplay.d.ts +2 -4
- package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
- package/lib/components/CreditCard/CreditCardDisplay.js +1 -2
- package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.d.ts +15 -5
- package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.js +1 -2
- package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
- package/lib/components/Currency/Currency.test-ids.d.ts +1 -1
- package/lib/components/Currency/Currency.test-ids.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts +1 -1
- package/lib/components/Currency/CurrencyInput.js +1 -1
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.types.d.ts +1 -1
- package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
- package/lib/components/DangerButton/DangerButton.js +2 -2
- package/lib/components/DangerButton/DangerButton.js.map +1 -1
- package/lib/components/DateTime/DateTime.test-ids.d.ts +11 -11
- package/lib/components/DateTime/DateTime.test-ids.d.ts.map +1 -1
- package/lib/components/DateTime/DateTime.test-ids.js +5 -1
- package/lib/components/DateTime/DateTime.test-ids.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +30 -27
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +2 -2
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts +1 -0
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +24 -16
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +26 -25
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +1 -1
- package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +21 -10
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/PartInput.d.ts +1 -1
- package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/PartInput.js +13 -7
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +2 -7
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +3 -3
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +17 -6
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +2 -2
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +5 -2
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.js +28 -17
- package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +1 -0
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.js +13 -5
- package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.js +18 -11
- package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js +2 -1
- package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/utils.d.ts +9 -0
- package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/utils.js +16 -0
- package/lib/components/DateTime/Picker/utils.js.map +1 -1
- package/lib/components/DateTime/index.d.ts +1 -1
- package/lib/components/DateTime/index.d.ts.map +1 -1
- package/lib/components/DateTime/index.js +1 -1
- package/lib/components/DateTime/index.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts +1 -0
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +13 -11
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
- package/lib/components/Email/EmailDisplay.js +2 -2
- package/lib/components/Email/EmailDisplay.js.map +1 -1
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/EmptyState/EmptyState.js +5 -2
- package/lib/components/EmptyState/EmptyState.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts +6 -0
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +37 -15
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +39 -20
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +14 -10
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +13 -5
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts +2 -2
- package/lib/components/FieldValueList/FieldValueList.test-ids.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.d.ts +1 -1
- package/lib/components/FieldValueList/index.d.ts.map +1 -1
- package/lib/components/FieldValueList/index.js.map +1 -1
- package/lib/components/File/CompactList.d.ts +15 -0
- package/lib/components/File/CompactList.d.ts.map +1 -0
- package/lib/components/File/CompactList.js +21 -0
- package/lib/components/File/CompactList.js.map +1 -0
- package/lib/components/File/File.test-ids.d.ts +1 -1
- package/lib/components/File/File.test-ids.d.ts.map +1 -1
- package/lib/components/File/FileDisplay.d.ts +5 -0
- 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/FileDisplayList.d.ts +4 -2
- package/lib/components/File/FileDisplayList.d.ts.map +1 -1
- package/lib/components/File/FileDisplayList.js +9 -3
- package/lib/components/File/FileDisplayList.js.map +1 -1
- package/lib/components/File/FileInput.d.ts +32 -8
- package/lib/components/File/FileInput.d.ts.map +1 -1
- package/lib/components/File/FileInput.js +169 -74
- package/lib/components/File/FileInput.js.map +1 -1
- package/lib/components/File/FileInput.styles.d.ts +26 -0
- package/lib/components/File/FileInput.styles.d.ts.map +1 -0
- package/lib/components/File/FileInput.styles.js +166 -0
- package/lib/components/File/FileInput.styles.js.map +1 -0
- package/lib/components/File/FileItem.d.ts +16 -0
- package/lib/components/File/FileItem.d.ts.map +1 -1
- package/lib/components/File/FileItem.js +82 -27
- package/lib/components/File/FileItem.js.map +1 -1
- package/lib/components/File/FileList.d.ts +9 -3
- package/lib/components/File/FileList.d.ts.map +1 -1
- package/lib/components/File/FileList.js +53 -9
- package/lib/components/File/FileList.js.map +1 -1
- package/lib/components/File/FileUploadItem.d.ts +4 -0
- package/lib/components/File/FileUploadItem.d.ts.map +1 -1
- package/lib/components/File/FileUploadItem.js +42 -38
- package/lib/components/File/FileUploadItem.js.map +1 -1
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/Form/Form.d.ts +1 -1
- package/lib/components/Form/Form.test-ids.d.ts +1 -1
- package/lib/components/Form/Form.test-ids.d.ts.map +1 -1
- package/lib/components/FormField/FormField.d.ts +2 -2
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +62 -64
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/FormField/FormField.test-ids.d.ts +1 -1
- package/lib/components/FormField/FormField.test-ids.d.ts.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.d.ts +18 -0
- package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -0
- package/lib/components/Fullscreen/Fullscreen.js +56 -0
- package/lib/components/Fullscreen/Fullscreen.js.map +1 -0
- package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts +2 -0
- package/lib/components/Fullscreen/Fullscreen.test-ids.d.ts.map +1 -0
- package/lib/components/Fullscreen/Fullscreen.test-ids.js +3 -0
- package/lib/components/Fullscreen/Fullscreen.test-ids.js.map +1 -0
- package/lib/components/Fullscreen/FullscreenButton.d.ts +6 -0
- package/lib/components/Fullscreen/FullscreenButton.d.ts.map +1 -0
- package/lib/components/Fullscreen/FullscreenButton.js +33 -0
- package/lib/components/Fullscreen/FullscreenButton.js.map +1 -0
- package/lib/components/Fullscreen/index.d.ts +4 -0
- package/lib/components/Fullscreen/index.d.ts.map +1 -0
- package/lib/components/Fullscreen/index.js +4 -0
- package/lib/components/Fullscreen/index.js.map +1 -0
- package/lib/components/HTML/HTML.d.ts +1 -1
- package/lib/components/HTML/HTML.test-ids.d.ts +1 -1
- package/lib/components/HTML/HTML.test-ids.d.ts.map +1 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +2 -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 +2 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/calendar-now.icon.d.ts +5 -0
- package/lib/components/Icon/icons/calendar-now.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/calendar-now.icon.js +7 -0
- package/lib/components/Icon/icons/calendar-now.icon.js.map +1 -0
- package/lib/components/Icon/icons/preview.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview.icon.js +7 -0
- package/lib/components/Icon/icons/preview.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/arrow-down.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-down.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/arrow-down.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-left.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-left.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/arrow-left.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-right.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-right.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/arrow-right.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-up.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/arrow-up.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/arrow-up.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/calendar-now.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/calendar-now.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/calendar-now.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/caret-down.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-down.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/caret-down.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-left.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-left.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/caret-left.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-right.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-right.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/caret-right.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-up.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/caret-up.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/caret-up.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/case-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/case-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/clipboard-pencil-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/clock-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/clock-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/disc-stack-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/dock.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/dock.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/dock.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/dock.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/expression.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/expression.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/expression.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/expression.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/indent.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/indent.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/indent.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/indent.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/information-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/information-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/list-number.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/list-number.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/list-number.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/list-number.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/open.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/open.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/open.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/rule-library-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/search-analytics-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/undock.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/undock.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/undock.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/undock.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/unindent.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/unindent.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/unindent.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/unindent.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/warn-solid.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/warn-solid.icon.js.map +1 -1
- 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 +7 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/IconPicker/IconPicker.d.ts +7 -1
- package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
- package/lib/components/IconPicker/IconPicker.js +20 -14
- package/lib/components/IconPicker/IconPicker.js.map +1 -1
- package/lib/components/Input/Input.d.ts +5 -8
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/Input/Input.js +2 -3
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Input/Input.test-ids.d.ts +1 -1
- package/lib/components/Input/Input.test-ids.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.js +13 -6
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
- package/lib/components/Link/Link.d.ts +5 -2
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +45 -17
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/Link.test-ids.d.ts +1 -1
- package/lib/components/Link/Link.test-ids.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +8 -7
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +5 -5
- 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 +4 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +7 -3
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.js +2 -2
- package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
- package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
- package/lib/components/ListToolbar/helpers.js.map +1 -1
- package/lib/components/Location/CurrentLocationButton.d.ts +1 -6
- package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
- package/lib/components/Location/CurrentLocationButton.js +10 -20
- package/lib/components/Location/CurrentLocationButton.js.map +1 -1
- package/lib/components/Location/Location.test-ids.d.ts +1 -1
- package/lib/components/Location/Location.test-ids.d.ts.map +1 -1
- package/lib/components/Location/Location.types.d.ts +49 -17
- package/lib/components/Location/Location.types.d.ts.map +1 -1
- package/lib/components/Location/Location.types.js +9 -1
- package/lib/components/Location/Location.types.js.map +1 -1
- package/lib/components/Location/LocationDisplay.d.ts +5 -4
- package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
- package/lib/components/Location/LocationDisplay.js +17 -4
- package/lib/components/Location/LocationDisplay.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts +23 -18
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +37 -15
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts +26 -12
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Location/LocationView.js +103 -50
- package/lib/components/Location/LocationView.js.map +1 -1
- package/lib/components/Location/index.d.ts +2 -2
- package/lib/components/Location/index.d.ts.map +1 -1
- package/lib/components/Location/index.js +1 -1
- package/lib/components/Location/index.js.map +1 -1
- package/lib/components/Location/utils.d.ts +2 -2
- package/lib/components/Location/utils.d.ts.map +1 -1
- package/lib/components/Location/utils.js +67 -38
- package/lib/components/Location/utils.js.map +1 -1
- package/lib/components/Menu/Menu.context.d.ts.map +1 -1
- package/lib/components/Menu/Menu.context.js +1 -0
- package/lib/components/Menu/Menu.context.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +6 -2
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.styles.d.ts +0 -1
- package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
- package/lib/components/Menu/Menu.styles.js +2 -9
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.test-ids.d.ts +2 -2
- package/lib/components/Menu/Menu.test-ids.d.ts.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +14 -2
- 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/Menu.utils.d.ts +4 -0
- package/lib/components/Menu/Menu.utils.d.ts.map +1 -0
- package/lib/components/Menu/Menu.utils.js +6 -0
- package/lib/components/Menu/Menu.utils.js.map +1 -0
- package/lib/components/Menu/MenuGroup.js +2 -2
- package/lib/components/Menu/MenuGroup.js.map +1 -1
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/components/Menu/MenuItem.js +3 -3
- package/lib/components/Menu/MenuItem.js.map +1 -1
- package/lib/components/Menu/MenuList.d.ts.map +1 -1
- package/lib/components/Menu/MenuList.js +3 -3
- package/lib/components/Menu/MenuList.js.map +1 -1
- package/lib/components/Menu/NavItemsList.d.ts.map +1 -1
- package/lib/components/Menu/NavItemsList.js +1 -3
- package/lib/components/Menu/NavItemsList.js.map +1 -1
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/Menu/index.d.ts.map +1 -1
- package/lib/components/Menu/index.js +1 -0
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts +8 -1
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +24 -14
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.test-ids.d.ts +1 -1
- package/lib/components/MenuButton/MenuButton.test-ids.d.ts.map +1 -1
- package/lib/components/MetaList/MetaList.d.ts +1 -1
- package/lib/components/MetaList/MetaList.test-ids.d.ts +1 -1
- package/lib/components/MetaList/MetaList.test-ids.d.ts.map +1 -1
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +31 -7
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts +3 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +34 -17
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/Modal/ModalManager.d.ts.map +1 -1
- package/lib/components/Modal/ModalManager.js +5 -1
- package/lib/components/Modal/ModalManager.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +28 -1
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/Number/Number.test-ids.d.ts +2 -2
- package/lib/components/Number/Number.test-ids.d.ts.map +1 -1
- package/lib/components/Number/NumberDisplay.d.ts +5 -8
- package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
- package/lib/components/Number/NumberDisplay.js +1 -2
- package/lib/components/Number/NumberDisplay.js.map +1 -1
- package/lib/components/Number/NumberInput.d.ts +2 -4
- package/lib/components/Number/NumberInput.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.js +15 -7
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/NumberInput.types.d.ts +12 -30
- 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 +2 -4
- package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
- package/lib/components/Number/NumberRangeInput.js +7 -72
- package/lib/components/Number/NumberRangeInput.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts +3 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.js +2 -0
- package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.js +41 -6
- package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts +1 -0
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +85 -31
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Phone/Phone.test-ids.d.ts +1 -1
- package/lib/components/Phone/Phone.test-ids.d.ts.map +1 -1
- package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
- package/lib/components/Phone/PhoneDisplay.js +2 -2
- package/lib/components/Phone/PhoneDisplay.js.map +1 -1
- package/lib/components/Phone/PhoneInput.d.ts +1 -1
- package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
- package/lib/components/Phone/PhoneInput.js +20 -5
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts +2 -0
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +20 -3
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
- package/lib/components/Popover/Popover.styles.js +2 -2
- package/lib/components/Popover/Popover.styles.js.map +1 -1
- package/lib/components/Popover/modifiers.d.ts.map +1 -1
- package/lib/components/Popover/modifiers.js +11 -5
- package/lib/components/Popover/modifiers.js.map +1 -1
- package/lib/components/Progress/Progress.d.ts.map +1 -1
- package/lib/components/Progress/Progress.js +2 -2
- package/lib/components/Progress/Progress.js.map +1 -1
- package/lib/components/Progress/Progress.styles.d.ts +1 -1
- package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
- package/lib/components/Progress/Progress.styles.js +7 -7
- package/lib/components/Progress/Progress.styles.js.map +1 -1
- package/lib/components/Progress/Progress.types.d.ts +4 -0
- package/lib/components/Progress/Progress.types.d.ts.map +1 -1
- package/lib/components/Progress/Progress.types.js.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.d.ts +6 -30
- package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.js +1 -2
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts +19 -6
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.js +5 -1
- package/lib/components/SearchInput/SearchInput.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -3
- package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js +15 -15
- package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.test-ids.d.ts +1 -1
- package/lib/components/Select/Select.test-ids.d.ts.map +1 -1
- package/lib/components/Slider/Slider.d.ts +1 -1
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.styles.d.ts +1 -1
- package/lib/components/Slider/Slider.test-ids.d.ts +1 -1
- package/lib/components/Slider/Slider.test-ids.d.ts.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.d.ts +6 -1
- package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.js +13 -5
- package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts +1 -1
- package/lib/components/SummaryItem/SummaryItem.test-ids.d.ts.map +1 -1
- package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/SummaryList/SummaryList.js +9 -9
- package/lib/components/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/Tabs/Tab.d.ts +7 -3
- package/lib/components/Tabs/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab.js +83 -23
- package/lib/components/Tabs/Tab.js.map +1 -1
- package/lib/components/Tabs/TabPanel.d.ts +13 -2
- package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
- package/lib/components/Tabs/TabPanel.js +60 -5
- package/lib/components/Tabs/TabPanel.js.map +1 -1
- package/lib/components/Tabs/Tabs.d.ts +0 -1
- package/lib/components/Tabs/Tabs.d.ts.map +1 -1
- package/lib/components/Tabs/Tabs.js +97 -35
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/Tabs.styles.d.ts +17 -0
- package/lib/components/Tabs/Tabs.styles.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.styles.js +110 -0
- package/lib/components/Tabs/Tabs.styles.js.map +1 -0
- package/lib/components/Tabs/TabsContext.d.ts +6 -0
- package/lib/components/Tabs/TabsContext.d.ts.map +1 -0
- package/lib/components/Tabs/TabsContext.js +6 -0
- package/lib/components/Tabs/TabsContext.js.map +1 -0
- package/lib/components/Tabs/index.d.ts +1 -0
- package/lib/components/Tabs/index.d.ts.map +1 -1
- package/lib/components/Tabs/index.js +1 -0
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/Text/Text.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts +1 -1
- package/lib/components/TextArea/TextArea.test-ids.d.ts +1 -1
- package/lib/components/TextArea/TextArea.test-ids.d.ts.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 +117 -21
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/Toaster.test-ids.d.ts +1 -1
- package/lib/components/Toaster/Toaster.test-ids.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.types.d.ts +17 -4
- 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 +8 -3
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +20 -5
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.test-ids.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.test-ids.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
- package/lib/components/Tree/Tree.d.ts +1 -1
- package/lib/components/Tree/Tree.test-ids.d.ts +2 -2
- package/lib/components/Tree/Tree.test-ids.d.ts.map +1 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useArrows.d.ts.map +1 -1
- package/lib/hooks/useArrows.js +3 -1
- package/lib/hooks/useArrows.js.map +1 -1
- package/lib/hooks/useEvent.d.ts +5 -0
- package/lib/hooks/useEvent.d.ts.map +1 -1
- package/lib/hooks/useEvent.js.map +1 -1
- package/lib/hooks/useFocusWithin.d.ts.map +1 -1
- package/lib/hooks/useFocusWithin.js +14 -8
- package/lib/hooks/useFocusWithin.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +155 -4
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useRefMap.d.ts +8 -0
- package/lib/hooks/useRefMap.d.ts.map +1 -0
- package/lib/hooks/useRefMap.js +27 -0
- package/lib/hooks/useRefMap.js.map +1 -0
- package/lib/hooks/useScrollToggle.d.ts.map +1 -1
- package/lib/hooks/useScrollToggle.js +1 -0
- package/lib/hooks/useScrollToggle.js.map +1 -1
- package/lib/hooks/useSimpleStoreInstance.d.ts +9 -0
- package/lib/hooks/useSimpleStoreInstance.d.ts.map +1 -0
- package/lib/hooks/useSimpleStoreInstance.js +13 -0
- package/lib/hooks/useSimpleStoreInstance.js.map +1 -0
- package/lib/hooks/useTestIds.d.ts +1 -1
- package/lib/hooks/useTestIds.d.ts.map +1 -1
- package/lib/hooks/useTestIds.js +1 -1
- package/lib/hooks/useTestIds.js.map +1 -1
- package/lib/i18n/default.d.ts +155 -4
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +178 -11
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +155 -4
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/styles/GlobalStyle.d.ts +1 -1
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +6 -1
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/styles/mixins.d.ts +3 -0
- package/lib/styles/mixins.d.ts.map +1 -0
- package/lib/styles/mixins.js +14 -0
- package/lib/styles/mixins.js.map +1 -0
- package/lib/theme/ThemeMachine.d.ts.map +1 -1
- package/lib/theme/ThemeMachine.js.map +1 -1
- package/lib/theme/theme.d.ts +18 -24
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +9 -14
- package/lib/theme/themeOverrides.schema.json +13 -18
- package/lib/types/types.d.ts +6 -4
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/lib/utils/createStringMatcher.d.ts +1 -1
- package/lib/utils/createStringMatcher.d.ts.map +1 -1
- package/lib/utils/createStringMatcher.js +4 -1
- package/lib/utils/createStringMatcher.js.map +1 -1
- package/lib/utils/formatListToLocaleString.d.ts.map +1 -1
- package/lib/utils/formatListToLocaleString.js +5 -2
- package/lib/utils/formatListToLocaleString.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isPositionWithinRect.d.ts +12 -0
- package/lib/utils/isPositionWithinRect.d.ts.map +1 -0
- package/lib/utils/isPositionWithinRect.js +11 -0
- package/lib/utils/isPositionWithinRect.js.map +1 -0
- package/lib/utils/withTestIds.d.ts +1 -1
- package/package.json +10 -7
- package/lib/components/Location/types.d.ts +0 -45
- package/lib/components/Location/types.d.ts.map +0 -1
- package/lib/components/Location/types.js +0 -10
- package/lib/components/Location/types.js.map +0 -1
|
@@ -1,41 +1,60 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import { forwardRef, useEffect, useRef } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import Icon, { registerIcon } from '../Icon';
|
|
6
6
|
import * as plusIcon from '../Icon/icons/plus.icon';
|
|
7
7
|
import { useI18n } from '../../hooks';
|
|
8
8
|
import { defaultThemeProp } from '../../theme';
|
|
9
|
+
import { getActiveElement, getFocusables } from '../../utils';
|
|
9
10
|
import FieldGroup, { StyledFieldGroup } from './FieldGroup';
|
|
10
11
|
registerIcon(plusIcon);
|
|
11
12
|
const StyledFieldGroupList = styled.div(({ theme }) => css `
|
|
12
|
-
|
|
13
|
+
margin-block-start: ${theme.base.spacing};
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
${StyledFieldGroup} {
|
|
16
|
+
margin-block-start: 0;
|
|
17
|
+
}
|
|
18
|
+
`);
|
|
18
19
|
StyledFieldGroupList.defaultProps = defaultThemeProp;
|
|
19
20
|
export const StyledListItem = styled(FieldGroup)(({ theme }) => css `
|
|
20
|
-
|
|
21
|
+
padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
&:not(:last-of-type) {
|
|
24
|
+
border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
25
|
+
margin-block-end: calc(2 * ${theme.base.spacing});
|
|
26
|
+
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
legend {
|
|
29
|
+
margin-block-end: 0;
|
|
30
|
+
}
|
|
31
|
+
`);
|
|
31
32
|
StyledListItem.defaultProps = defaultThemeProp;
|
|
32
33
|
const StyledAddButton = styled(Button)(({ theme }) => css `
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
margin-top: ${theme.base.spacing};
|
|
35
|
+
`);
|
|
35
36
|
StyledAddButton.defaultProps = defaultThemeProp;
|
|
36
37
|
const FieldGroupList = forwardRef(function FieldGroupList({ items, onAdd, onDelete, contextualLabel, ...restProps }, ref) {
|
|
37
38
|
const t = useI18n();
|
|
38
|
-
|
|
39
|
+
const lastItemRef = useRef(null);
|
|
40
|
+
const addBtnRef = useRef(null);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const currentActiveEl = getActiveElement();
|
|
43
|
+
if (currentActiveEl === addBtnRef.current && lastItemRef.current) {
|
|
44
|
+
const groupItemLegend = lastItemRef.current.querySelector(':scope > legend');
|
|
45
|
+
const focusables = getFocusables(lastItemRef.current);
|
|
46
|
+
const groupActionButtons = focusables.filter(focusable => groupItemLegend?.contains(focusable));
|
|
47
|
+
const groupContentFocusables = focusables.filter(focusable => !groupItemLegend?.contains(focusable));
|
|
48
|
+
if (groupContentFocusables.length > 0) {
|
|
49
|
+
groupContentFocusables[0].focus();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
groupActionButtons[0]?.focus();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, [items.length]);
|
|
56
|
+
return (_jsxs(StyledFieldGroupList, { ref: ref, ...restProps, children: [items.map(({ id, children, name, headingTag, onDelete: itemOnDelete, ...restItemProps }, index) => {
|
|
57
|
+
const isLastItem = index === items.length - 1;
|
|
39
58
|
return (_jsx(StyledListItem, { name: name, headingTag: headingTag, ...restItemProps, actions: onDelete || itemOnDelete
|
|
40
59
|
? [
|
|
41
60
|
{
|
|
@@ -49,8 +68,8 @@ const FieldGroupList = forwardRef(function FieldGroupList({ items, onAdd, onDele
|
|
|
49
68
|
}
|
|
50
69
|
}
|
|
51
70
|
]
|
|
52
|
-
: undefined, children: children }, id));
|
|
53
|
-
}), onAdd && (_jsxs(StyledAddButton, { variant: 'link', onClick: onAdd, children: [_jsx(Icon, { name: 'plus' }), contextualLabel ? t('add_noun', [contextualLabel]) : t('add')] }))] }));
|
|
71
|
+
: undefined, ref: isLastItem ? lastItemRef : undefined, children: children }, id));
|
|
72
|
+
}), onAdd && (_jsxs(StyledAddButton, { variant: 'link', onClick: onAdd, ref: addBtnRef, children: [_jsx(Icon, { name: 'plus' }), contextualLabel ? t('add_noun', [contextualLabel]) : t('add')] }))] }));
|
|
54
73
|
});
|
|
55
74
|
export default FieldGroupList;
|
|
56
75
|
//# sourceMappingURL=FieldGroupList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../src/components/FieldGroup/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5D,YAAY,CAAC,QAAQ,CAAC,CAAC;AAiBvB,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CACrC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;0BACM,KAAK,CAAC,IAAI,CAAC,OAAO;;MAEtC,gBAAgB;;;GAGnB,CACF,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,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AC,CACF,EACA,KAAK,IAAI,CACR,MAAC,eAAe,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,aAC5D,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,EACnB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAC9C,CACnB,IACoB,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { ForwardProps } from '../../types';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport * as plusIcon from '../Icon/icons/plus.icon';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { getActiveElement, getFocusables } from '../../utils';\n\nimport FieldGroup, { StyledFieldGroup } from './FieldGroup';\nimport type { FieldGroupProps } from './FieldGroup';\n\nregisterIcon(plusIcon);\n\nexport type FieldGroupListItemProps = FieldGroupProps & {\n /** The ID of the field group list item */\n id: string;\n /** Item level onDelete callback. */\n onDelete?: (id: string) => void;\n};\n\nexport interface FieldGroupListProps {\n items: FieldGroupListItemProps[];\n contextualLabel?: string;\n onAdd?: () => void;\n onDelete?: (id: string) => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledFieldGroupList = styled.div(\n ({ theme }) => css`\n margin-block-start: ${theme.base.spacing};\n\n ${StyledFieldGroup} {\n margin-block-start: 0;\n }\n `\n);\n\nStyledFieldGroupList.defaultProps = defaultThemeProp;\n\nexport const StyledListItem = styled(FieldGroup)(\n ({ theme }) => css`\n padding: ${theme.base.spacing} 0 calc(2 * ${theme.base.spacing});\n\n &:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n margin-block-end: calc(2 * ${theme.base.spacing});\n }\n\n legend {\n margin-block-end: 0;\n }\n `\n);\n\nStyledListItem.defaultProps = defaultThemeProp;\n\nconst StyledAddButton = styled(Button)(\n ({ theme }) => css`\n margin-top: ${theme.base.spacing};\n `\n);\n\nStyledAddButton.defaultProps = defaultThemeProp;\n\nconst FieldGroupList: FunctionComponent<FieldGroupListProps & ForwardProps> = forwardRef(\n function FieldGroupList(\n { items, onAdd, onDelete, contextualLabel, ...restProps }: PropsWithoutRef<FieldGroupListProps>,\n ref: FieldGroupListProps['ref']\n ) {\n const t = useI18n();\n const lastItemRef = useRef<HTMLDivElement>(null);\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n const currentActiveEl = getActiveElement();\n if (currentActiveEl === addBtnRef.current && lastItemRef.current) {\n const groupItemLegend = lastItemRef.current.querySelector(':scope > legend');\n const focusables = getFocusables(lastItemRef.current);\n\n const groupActionButtons = focusables.filter(focusable =>\n groupItemLegend?.contains(focusable)\n );\n\n const groupContentFocusables = focusables.filter(\n focusable => !groupItemLegend?.contains(focusable)\n );\n\n if (groupContentFocusables.length > 0) {\n groupContentFocusables[0].focus();\n } else {\n groupActionButtons[0]?.focus();\n }\n }\n }, [items.length]);\n\n return (\n <StyledFieldGroupList ref={ref} {...restProps}>\n {items.map(\n (\n {\n id,\n children,\n name,\n headingTag,\n onDelete: itemOnDelete,\n ...restItemProps\n }: FieldGroupListItemProps,\n index\n ) => {\n const isLastItem = index === items.length - 1;\n return (\n <StyledListItem\n key={id}\n name={name}\n headingTag={headingTag}\n {...restItemProps}\n actions={\n onDelete || itemOnDelete\n ? [\n {\n id: 'delete',\n text: t('delete'),\n icon: 'trash',\n iconOnly: true,\n onClick: () => {\n itemOnDelete?.(id);\n onDelete?.(id);\n }\n }\n ]\n : undefined\n }\n ref={isLastItem ? lastItemRef : undefined}\n >\n {children}\n </StyledListItem>\n );\n }\n )}\n {onAdd && (\n <StyledAddButton variant='link' onClick={onAdd} ref={addBtnRef}>\n <Icon name='plus' />\n {contextualLabel ? t('add_noun', [contextualLabel]) : t('add')}\n </StyledAddButton>\n )}\n </StyledFieldGroupList>\n );\n }\n);\n\nexport default FieldGroupList;\n"]}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import type { ReactNode, FunctionComponent } from 'react';
|
|
2
|
-
import type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
|
|
2
|
+
import type { BaseProps, ExcludeStrict, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';
|
|
3
3
|
export type FieldValueVariant = 'inline' | 'stacked';
|
|
4
|
-
|
|
4
|
+
interface BaseFieldValueListItem extends TestIdProp {
|
|
5
5
|
name: string;
|
|
6
|
-
value?: ReactNode;
|
|
7
|
-
variant?: FieldValueVariant;
|
|
8
|
-
}
|
|
9
|
-
export interface FieldValueListItem extends FieldValueListItemProps {
|
|
10
6
|
id?: string;
|
|
7
|
+
variant?: FieldValueVariant;
|
|
11
8
|
}
|
|
9
|
+
export type FieldValueListItemProps = (BaseFieldValueListItem & {
|
|
10
|
+
value?: ExcludeStrict<ReactNode, 'string'>;
|
|
11
|
+
truncate?: never;
|
|
12
|
+
}) | (BaseFieldValueListItem & {
|
|
13
|
+
value: string;
|
|
14
|
+
truncate?: boolean;
|
|
15
|
+
});
|
|
12
16
|
export interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
13
17
|
/** The set of field values to render in the list. */
|
|
14
|
-
fields:
|
|
18
|
+
fields: FieldValueListItemProps[];
|
|
15
19
|
/**
|
|
16
20
|
* Determines if the field and values should be displayed on the same line, or stacked with the field above the value.
|
|
17
21
|
* @default 'inline'
|
|
@@ -23,11 +27,11 @@ export declare const StyledFieldValue: import("styled-components").StyledCompone
|
|
|
23
27
|
export type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;
|
|
24
28
|
export declare const StyledFieldValueList: import("styled-components").StyledComponent<"dl", import("styled-components").DefaultTheme, StyledFieldValueListProps, never>;
|
|
25
29
|
export declare const StyledStackedFieldValue: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
26
|
-
export declare const FieldValueItem: (({ testId, name, value, variant }: FieldValueListItemProps) => JSX.Element) & {
|
|
27
|
-
getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["name", "value"]>;
|
|
30
|
+
export declare const FieldValueItem: (({ testId, name, value, variant, truncate }: FieldValueListItemProps) => JSX.Element) & {
|
|
31
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("../../types").TestIdsRecord<readonly ["name", "value"]>;
|
|
28
32
|
};
|
|
29
33
|
declare const _default: FunctionComponent<FieldValueListProps & ForwardProps> & {
|
|
30
|
-
getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly []>;
|
|
34
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("../../types").TestIdsRecord<readonly []>;
|
|
31
35
|
};
|
|
32
36
|
export default _default;
|
|
33
37
|
//# sourceMappingURL=FieldValueList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAO,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAO,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,aAAa,CAAC;AAWrB,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErD,UAAU,sBAAuB,SAAQ,UAAU;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAC/B,CAAC,sBAAsB,GAAG;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CAAC,GACF,CAAC,sBAAsB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEP,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAChF,qDAAqD;IACrD,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;CAClD;AAED,eAAO,MAAM,eAAe,wGAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,wGAE5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,+HAuB/B,CAAC;AAIH,eAAO,MAAM,uBAAuB,yGAAe,CAAC;AAEpD,eAAO,MAAM,cAAc,gDACsC,uBAAuB;;CA4BvF,CAAC;;;;AAsDF,wBAAqE"}
|
|
@@ -41,9 +41,9 @@ export const StyledFieldValueList = styled.dl(({ variant, theme }) => {
|
|
|
41
41
|
});
|
|
42
42
|
StyledFieldValueList.defaultProps = defaultThemeProp;
|
|
43
43
|
export const StyledStackedFieldValue = styled.div ``;
|
|
44
|
-
export const FieldValueItem = withTestIds(({ testId, name, value, variant = 'inline' }) => {
|
|
44
|
+
export const FieldValueItem = withTestIds(({ testId, name, value, variant = 'inline', truncate = true }) => {
|
|
45
45
|
const testIds = useTestIds(testId, getFieldValueItemTestIds);
|
|
46
|
-
const displayValue = typeof value === 'string' ? _jsx(ShowMoreLess, { lines: 3, children: value }) : value;
|
|
46
|
+
const displayValue = typeof value === 'string' && truncate ? (_jsx(ShowMoreLess, { lines: 3, children: value })) : (value);
|
|
47
47
|
const labelAndValue = (_jsxs(_Fragment, { children: [_jsx(StyledLabel, { "data-testid": testIds.name, as: StyledFieldName, children: name }), _jsx(StyledFieldValue, { "data-testid": testIds.value, children: value ? displayValue : _jsx(NoValue, {}) })] }));
|
|
48
48
|
return variant === 'stacked' ? (_jsx(StyledStackedFieldValue, { "data-testid": testIds.root, children: labelAndValue })) : (_jsx(_Fragment, { children: labelAndValue }));
|
|
49
49
|
}, getFieldValueItemTestIds);
|
|
@@ -60,10 +60,18 @@ const FieldValueList = forwardRef(function FieldValueList({ testId, fields, vari
|
|
|
60
60
|
: 'minmax(0, 1fr)',
|
|
61
61
|
colGap: variant !== 'value-comparison' ? 2 : 0,
|
|
62
62
|
rowGap: variant !== 'value-comparison' ? 1 : 0.5
|
|
63
|
-
}, as: StyledFieldValueList, variant: variant, children: fields.map(({ id, name, value, variant: fieldVariant }) => {
|
|
64
|
-
|
|
63
|
+
}, as: StyledFieldValueList, variant: isXSContentWidthOrAbove ? variant : 'stacked', children: fields.map(({ id, name, value, truncate = true, variant: fieldVariant }) => {
|
|
64
|
+
const sharedProps = {
|
|
65
|
+
name,
|
|
66
|
+
variant: (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove
|
|
65
67
|
? 'stacked'
|
|
66
|
-
: 'inline'
|
|
68
|
+
: 'inline',
|
|
69
|
+
key: id ?? name
|
|
70
|
+
};
|
|
71
|
+
if (typeof value === 'string') {
|
|
72
|
+
return _jsx(FieldValueItem, { ...sharedProps, value: value, truncate: truncate });
|
|
73
|
+
}
|
|
74
|
+
return _jsx(FieldValueItem, { ...sharedProps, value: value });
|
|
67
75
|
}) }));
|
|
68
76
|
});
|
|
69
77
|
export default withTestIds(FieldValueList, getFieldValueListTestIds);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAShD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AA8B/F,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAA;;CAExC,CAAC;AAIF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,EAAE,CAA4B,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9F,OAAO,GAAG,CAAA;;;MAGN,OAAO,KAAK,kBAAkB;QAChC,GAAG,CAAA;;;;;;yCAMkC,KAAK,CAAC,IAAI,CAAC,OAAO;;QAEnD,WAAW;;;;;yCAKsB,KAAK,CAA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;gBAC7B,OAAO,KAAC,cAAc,OAAK,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;aAC9E;YAED,OAAO,KAAC,cAAc,OAAK,WAAW,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;QAC3D,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { ReactNode, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type {\n BaseProps,\n ExcludeStrict,\n ForwardProps,\n NoChildrenProp,\n TestIdProp\n} from '../../types';\nimport Grid from '../Grid';\nimport { StyledLabel } from '../Label';\nimport { useBreakpoint, useConsolidatedRef, useTestIds } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport ShowMoreLess from '../ShowMoreLess';\nimport { withTestIds } from '../../utils';\nimport NoValue from '../NoValue/NoValue';\n\nimport { getFieldValueListTestIds, getFieldValueItemTestIds } from './FieldValueList.test-ids';\n\nexport type FieldValueVariant = 'inline' | 'stacked';\n\ninterface BaseFieldValueListItem extends TestIdProp {\n name: string;\n id?: string;\n variant?: FieldValueVariant;\n}\n\nexport type FieldValueListItemProps =\n | (BaseFieldValueListItem & {\n value?: ExcludeStrict<ReactNode, 'string'>;\n truncate?: never;\n })\n | (BaseFieldValueListItem & {\n value: string;\n truncate?: boolean;\n });\n\nexport interface FieldValueListProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** The set of field values to render in the list. */\n fields: FieldValueListItemProps[];\n /**\n * Determines if the field and values should be displayed on the same line, or stacked with the field above the value.\n * @default 'inline'\n */\n variant?: FieldValueVariant | 'value-comparison';\n}\n\nexport const StyledFieldName = styled.dt`\n word-break: break-word;\n`;\n\nexport const StyledFieldValue = styled.dd`\n word-break: break-word;\n`;\n\nexport type StyledFieldValueListProps = Pick<FieldValueListProps, 'variant'>;\n\nexport const StyledFieldValueList = styled.dl<StyledFieldValueListProps>(({ variant, theme }) => {\n return css`\n width: 100%;\n\n ${variant === 'value-comparison' &&\n css`\n dt {\n width: 100%;\n }\n dd {\n text-align: end;\n padding-inline-start: calc(2 * ${theme.base.spacing});\n }\n ${StyledLabel} {\n max-width: unset;\n }\n dd:not(:last-of-type),\n dt:not(:last-of-type) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-bottom: calc(0.5 * ${theme.base.spacing});\n }\n `}\n `;\n});\n\nStyledFieldValueList.defaultProps = defaultThemeProp;\n\nexport const StyledStackedFieldValue = styled.div``;\n\nexport const FieldValueItem = withTestIds(\n ({ testId, name, value, variant = 'inline', truncate = true }: FieldValueListItemProps) => {\n const testIds = useTestIds(testId, getFieldValueItemTestIds);\n\n const displayValue =\n typeof value === 'string' && truncate ? (\n <ShowMoreLess lines={3}>{value}</ShowMoreLess>\n ) : (\n value\n );\n\n const labelAndValue = (\n <>\n <StyledLabel data-testid={testIds.name} as={StyledFieldName}>\n {name}\n </StyledLabel>\n <StyledFieldValue data-testid={testIds.value}>\n {value ? displayValue : <NoValue />}\n </StyledFieldValue>\n </>\n );\n\n return variant === 'stacked' ? (\n <StyledStackedFieldValue data-testid={testIds.root}>{labelAndValue}</StyledStackedFieldValue>\n ) : (\n <>{labelAndValue}</>\n );\n },\n getFieldValueItemTestIds\n);\n\nconst FieldValueList: FunctionComponent<FieldValueListProps & ForwardProps> = forwardRef(\n function FieldValueList(\n { testId, fields, variant = 'inline', ...restProps }: FieldValueListProps,\n ref: Ref<HTMLDivElement>\n ) {\n const testIds = useTestIds(testId, getFieldValueListTestIds);\n\n const fieldValueListRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isXSContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: fieldValueListRef,\n themeProp: 'content-width'\n });\n\n return (\n <Grid\n data-testid={testIds.root}\n {...restProps}\n ref={fieldValueListRef}\n container={{\n cols:\n ['inline', 'value-comparison'].includes(variant) && isXSContentWidthOrAbove\n ? '16ch minmax(0, 1fr)'\n : 'minmax(0, 1fr)',\n colGap: variant !== 'value-comparison' ? 2 : 0,\n rowGap: variant !== 'value-comparison' ? 1 : 0.5\n }}\n as={StyledFieldValueList}\n variant={isXSContentWidthOrAbove ? variant : 'stacked'}\n >\n {fields.map(({ id, name, value, truncate = true, variant: fieldVariant }) => {\n const sharedProps: BaseFieldValueListItem & { key: string } = {\n name,\n variant:\n (fieldVariant ?? variant) === 'stacked' || !isXSContentWidthOrAbove\n ? 'stacked'\n : 'inline',\n\n key: id ?? name\n };\n\n if (typeof value === 'string') {\n return <FieldValueItem {...sharedProps} value={value} truncate={truncate} />;\n }\n\n return <FieldValueItem {...sharedProps} value={value} />;\n })}\n </Grid>\n );\n }\n);\n\nexport default withTestIds(FieldValueList, getFieldValueListTestIds);\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getFieldValueListTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly []>;
|
|
2
|
-
export declare const getFieldValueItemTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["name", "value"]>;
|
|
1
|
+
export declare const getFieldValueListTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly []>;
|
|
2
|
+
export declare const getFieldValueItemTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly ["name", "value"]>;
|
|
3
3
|
//# sourceMappingURL=FieldValueList.test-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"FieldValueList.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/FieldValueList.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,wFAAiD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,uGAG1B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default, FieldValueItem, StyledFieldValueList, StyledFieldName, StyledFieldValue, StyledStackedFieldValue } from './FieldValueList';
|
|
2
|
-
export type { FieldValueListProps,
|
|
2
|
+
export type { FieldValueListProps, FieldValueListItemProps, StyledFieldValueListProps } from './FieldValueList';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n default,\n FieldValueItem,\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\nexport type {\n FieldValueListProps,\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FieldValueList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n default,\n FieldValueItem,\n StyledFieldValueList,\n StyledFieldName,\n StyledFieldValue,\n StyledStackedFieldValue\n} from './FieldValueList';\nexport type {\n FieldValueListProps,\n FieldValueListItemProps,\n StyledFieldValueListProps\n} from './FieldValueList';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NoChildrenProp, WithAttributes } from '../../types';
|
|
2
|
+
import type { InfoDialogProps } from '../Dialog';
|
|
3
|
+
export type CompactListProps = WithAttributes<'div', NoChildrenProp & Pick<InfoDialogProps, 'progress'> & {
|
|
4
|
+
/** number representing the total count of items */
|
|
5
|
+
count: number;
|
|
6
|
+
heading: InfoDialogProps['heading'];
|
|
7
|
+
/** Callback that triggers when the dialog is open */
|
|
8
|
+
onDialogOpen?: () => void;
|
|
9
|
+
/** Callback that triggers when the dialog is closed */
|
|
10
|
+
onDialogClose?: () => void;
|
|
11
|
+
content?: InfoDialogProps['children'];
|
|
12
|
+
}>;
|
|
13
|
+
declare const CompactList: import("react").ForwardRefExoticComponent<Omit<CompactListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export default CompactList;
|
|
15
|
+
//# sourceMappingURL=CompactList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompactList.d.ts","sourceRoot":"","sources":["../../../src/components/File/CompactList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAI9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAC3C,KAAK,EACL,cAAc,GACZ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAClC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;CACvC,CACJ,CAAC;AAEF,QAAA,MAAM,WAAW,0HA0ChB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import Button from '../Button';
|
|
4
|
+
import { useElement, useI18n } from '../../hooks';
|
|
5
|
+
import InfoDialog from '../Dialog/InfoDialog';
|
|
6
|
+
import NoValue from '../NoValue';
|
|
7
|
+
const CompactList = forwardRef(function CompactList({ count, onDialogOpen, onDialogClose, progress, heading, content, ...restProps }, ref) {
|
|
8
|
+
const t = useI18n();
|
|
9
|
+
const [target, setTarget] = useElement(null);
|
|
10
|
+
return (_jsx("div", { ...restProps, ref: ref, children: count === 0 ? (_jsx(NoValue, {})) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'link', onClick: (e) => {
|
|
11
|
+
if (onDialogOpen && !target)
|
|
12
|
+
onDialogOpen();
|
|
13
|
+
setTarget(e.currentTarget);
|
|
14
|
+
}, children: t('number_of_items', [count], { count }) }), target && (_jsx(InfoDialog, { heading: heading, progress: progress, target: target, onDismiss: () => {
|
|
15
|
+
if (onDialogClose)
|
|
16
|
+
onDialogClose();
|
|
17
|
+
setTarget(null);
|
|
18
|
+
}, children: content }))] })) }));
|
|
19
|
+
});
|
|
20
|
+
export default CompactList;
|
|
21
|
+
//# sourceMappingURL=CompactList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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,CAAC,CAAC;oBAClB,CAAC,YAEA,OAAO,GACG,CACd,IACA,CACJ,GACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\n\nimport type { NoChildrenProp, RefElement, WithAttributes } from '../../types';\nimport Button from '../Button';\nimport { useElement, useI18n } from '../../hooks';\nimport InfoDialog from '../Dialog/InfoDialog';\nimport type { InfoDialogProps } from '../Dialog';\nimport NoValue from '../NoValue';\n\nexport type CompactListProps = WithAttributes<\n 'div',\n NoChildrenProp &\n Pick<InfoDialogProps, 'progress'> & {\n /** number representing the total count of items */\n count: number;\n heading: InfoDialogProps['heading'];\n /** Callback that triggers when the dialog is open */\n onDialogOpen?: () => void;\n /** Callback that triggers when the dialog is closed */\n onDialogClose?: () => void;\n content?: InfoDialogProps['children'];\n }\n>;\n\nconst CompactList = forwardRef<RefElement<CompactListProps>, PropsWithoutRef<CompactListProps>>(\n function CompactList(\n { count, onDialogOpen, onDialogClose, progress, heading, content, ...restProps },\n ref\n ) {\n const t = useI18n();\n const [target, setTarget] = useElement<HTMLButtonElement>(null);\n\n return (\n <div {...restProps} ref={ref}>\n {count === 0 ? (\n <NoValue />\n ) : (\n <>\n <Button\n variant='link'\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n if (onDialogOpen && !target) onDialogOpen();\n setTarget(e.currentTarget);\n }}\n >\n {t('number_of_items', [count], { count })}\n </Button>\n\n {target && (\n <InfoDialog\n heading={heading}\n progress={progress}\n target={target}\n onDismiss={() => {\n if (onDialogClose) onDialogClose();\n setTarget(null);\n }}\n >\n {content}\n </InfoDialog>\n )}\n </>\n )}\n </div>\n );\n }\n);\n\nexport default CompactList;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getFileInputTestIds: (testIdProp?: string | undefined) => import("../..").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
1
|
+
export declare const getFileInputTestIds: (testIdProp?: string | null | undefined) => import("../..").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
2
2
|
//# sourceMappingURL=File.test-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"File.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/File/File.test-ids.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,wLAIrB,CAAC"}
|
|
@@ -11,6 +11,11 @@ export interface FileDisplayProps extends Pick<FileItemProps, 'id' | 'onPreview'
|
|
|
11
11
|
* @default 'file'
|
|
12
12
|
*/
|
|
13
13
|
variant?: 'file' | 'link' | 'text';
|
|
14
|
+
/**
|
|
15
|
+
* Used for a compact version of variant 'file' type
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
compact?: FileItemProps['compact'];
|
|
14
19
|
/** Thumbnail image. */
|
|
15
20
|
thumbnail?: string;
|
|
16
21
|
/** Ref for the wrapping element. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,GAAG,YAAY,CAAC,EAC5D,SAAS,EACT,cAAc;IAChB,kBAA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B,GAAG,YAAY,CA4CnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -3,13 +3,13 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import Link from '../Link';
|
|
4
4
|
import NoValue from '../NoValue/NoValue';
|
|
5
5
|
import FileItem from './FileItem';
|
|
6
|
-
const FileDisplay = forwardRef(function FileDisplay({ id, displayText, value, variant, thumbnail, onPreview, onDownload, ...restProps }, ref) {
|
|
6
|
+
const FileDisplay = forwardRef(function FileDisplay({ id, displayText, value, variant, thumbnail, onPreview, onDownload, compact = false, ...restProps }, ref) {
|
|
7
7
|
if (variant === 'text' || !value) {
|
|
8
8
|
return (_jsx("span", { ref: ref, ...restProps, children: value ? displayText || value : _jsx(NoValue, {}) }));
|
|
9
9
|
}
|
|
10
10
|
if (variant === 'link')
|
|
11
11
|
return (_jsx(Link, { ref: ref, ...restProps, href: value, children: displayText || value }));
|
|
12
|
-
return (_jsx(FileItem, { ...restProps, id: id, ref: ref, format: value.split('.').pop() ?? value, name: displayText || value, thumbnail: thumbnail, onDownload: onDownload, onPreview: onPreview }));
|
|
12
|
+
return (_jsx(FileItem, { ...restProps, id: id, ref: ref, format: value.split('.').pop() ?? value, name: displayText || value, thumbnail: thumbnail, onDownload: onDownload, onPreview: onPreview, compact: compact }));
|
|
13
13
|
});
|
|
14
14
|
export default FileDisplay;
|
|
15
15
|
//# sourceMappingURL=FileDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplay.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"FileDisplay.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAEzC,OAAO,QAAQ,MAAM,YAAY,CAAC;AA2BlC,MAAM,WAAW,GAAuD,UAAU,CAChF,SAAS,WAAW,CAClB,EACE,EAAE,EACF,WAAW,EACX,KAAK,EACL,OAAO,EACP,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,GAAG,KAAK,EACf,GAAG,SAAS,EACsB,EACpC,GAA4B;IAE5B,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE;QAChC,OAAO,CACL,eAAM,GAAG,EAAE,GAAG,KAAM,SAAS,YAC1B,KAAK,CAAC,CAAC,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,GACtC,CACR,CAAC;KACH;IAED,IAAI,OAAO,KAAK,MAAM;QACpB,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAA6B,KAAM,SAAS,EAAE,IAAI,EAAE,KAAK,YACjE,WAAW,IAAI,KAAK,GAChB,CACR,CAAC;IAEJ,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAA0B,EAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,EACvC,IAAI,EAAE,WAAW,IAAI,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Link from '../Link';\nimport NoValue from '../NoValue/NoValue';\n\nimport FileItem from './FileItem';\nimport type { FileItemProps } from './FileItem';\n\nexport interface FileDisplayProps\n extends Pick<FileItemProps, 'id' | 'onPreview' | 'onDownload'>,\n BaseProps,\n NoChildrenProp {\n /** URL address */\n value?: string;\n /** The text to be displayed. */\n displayText?: string;\n /**\n * Display value either as file, link only or textual representation.\n * @default 'file'\n */\n variant?: 'file' | 'link' | 'text';\n /**\n * Used for a compact version of variant 'file' type\n * @default false\n */\n compact?: FileItemProps['compact'];\n /** Thumbnail image. */\n thumbnail?: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement | HTMLAnchorElement | HTMLSpanElement>;\n}\n\nconst FileDisplay: FunctionComponent<FileDisplayProps & ForwardProps> = forwardRef(\n function FileDisplay(\n {\n id,\n displayText,\n value,\n variant,\n thumbnail,\n onPreview,\n onDownload,\n compact = false,\n ...restProps\n }: PropsWithoutRef<FileDisplayProps>,\n ref: FileDisplayProps['ref']\n ) {\n if (variant === 'text' || !value) {\n return (\n <span ref={ref} {...restProps}>\n {value ? displayText || value : <NoValue />}\n </span>\n );\n }\n\n if (variant === 'link')\n return (\n <Link ref={ref as Ref<HTMLAnchorElement>} {...restProps} href={value}>\n {displayText || value}\n </Link>\n );\n\n return (\n <FileItem\n {...restProps}\n id={id}\n ref={ref as Ref<HTMLDivElement>}\n format={value.split('.').pop() ?? value}\n name={displayText || value}\n thumbnail={thumbnail}\n onDownload={onDownload}\n onPreview={onPreview}\n compact={compact}\n />\n );\n }\n);\n\nexport default FileDisplay;\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { NoChildrenProp, OmitStrict, WithAttributes } from '../../types';
|
|
2
2
|
import type { FileDisplayProps } from './FileDisplay';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { type FileListProps } from './FileList';
|
|
4
|
+
import { type CompactListProps } from './CompactList';
|
|
5
|
+
export type FileDisplayListProps = WithAttributes<'div', Pick<FileDisplayProps, 'variant' | 'compact'> & NoChildrenProp & Partial<Pick<CompactListProps, 'count' | 'onDialogOpen' | 'onDialogClose' | 'heading' | 'progress'>> & Pick<FileListProps, 'onDownloadAll'> & {
|
|
6
|
+
items?: OmitStrict<FileDisplayProps, 'variant'>[];
|
|
5
7
|
}>;
|
|
6
8
|
declare const FileDisplayList: import("react").ForwardRefExoticComponent<Omit<FileDisplayListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
9
|
export default FileDisplayList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplayList.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"FileDisplayList.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAc,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAC/C,KAAK,EACL,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,GAC3C,cAAc,GACd,OAAO,CACL,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,cAAc,GAAG,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC,CAC5F,GACD,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,GAAG;IACrC,KAAK,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,CAAC;CACnD,CACJ,CAAC;AAEF,QAAA,MAAM,eAAe,8HAsCnB,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import FileList from './FileList';
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import FileList, {} from './FileList';
|
|
4
|
+
import CompactList, {} from './CompactList';
|
|
5
|
+
const FileDisplayList = forwardRef(function FileDisplayList({ variant, items = [], compact = false, heading, progress, count, onDialogOpen, onDialogClose, onDownloadAll, ...restProps }, ref) {
|
|
6
|
+
const fileListProps = {
|
|
7
|
+
type: 'display',
|
|
8
|
+
items: items.map(item => ({ ...item, variant })),
|
|
9
|
+
onDownloadAll
|
|
10
|
+
};
|
|
11
|
+
return compact ? (_jsx(CompactList, { ...restProps, count: count ?? items.length, onDialogOpen: onDialogOpen, onDialogClose: onDialogClose, heading: heading, progress: progress, content: progress ? undefined : _jsx(FileList, { ...fileListProps }), ref: ref })) : (_jsx(FileList, { ...restProps, ...fileListProps, ref: ref }));
|
|
6
12
|
});
|
|
7
13
|
export default FileDisplayList;
|
|
8
14
|
//# sourceMappingURL=FileDisplayList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDisplayList.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAMnC,OAAO,QAAQ,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"FileDisplayList.js","sourceRoot":"","sources":["../../../src/components/File/FileDisplayList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAMnC,OAAO,QAAQ,EAAE,EAAsB,MAAM,YAAY,CAAC;AAC1D,OAAO,WAAW,EAAE,EAAyB,MAAM,eAAe,CAAC;AAcnE,MAAM,eAAe,GAAG,UAAU,CAGhC,SAAS,eAAe,CACxB,EACE,OAAO,EACP,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,GAAG,SAAS,EACb,EACD,GAAG;IAEH,MAAM,aAAa,GAAkB;QACnC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAChD,aAAa;KACd,CAAC;IAEF,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,KAAC,WAAW,OACN,SAAS,EACb,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,EAC5B,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAC,QAAQ,OAAK,aAAa,GAAI,EAC/D,GAAG,EAAE,GAAG,GACR,CACH,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,OAAK,SAAS,KAAM,aAAa,EAAE,GAAG,EAAE,GAAG,GAAI,CACzD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport type { NoChildrenProp, OmitStrict, RefElement, WithAttributes } from '../../types';\n\nimport type { FileDisplayProps } from './FileDisplay';\nimport FileList, { type FileListProps } from './FileList';\nimport CompactList, { type CompactListProps } from './CompactList';\n\nexport type FileDisplayListProps = WithAttributes<\n 'div',\n Pick<FileDisplayProps, 'variant' | 'compact'> &\n NoChildrenProp &\n Partial<\n Pick<CompactListProps, 'count' | 'onDialogOpen' | 'onDialogClose' | 'heading' | 'progress'>\n > &\n Pick<FileListProps, 'onDownloadAll'> & {\n items?: OmitStrict<FileDisplayProps, 'variant'>[];\n }\n>;\n\nconst FileDisplayList = forwardRef<\n RefElement<FileDisplayListProps>,\n PropsWithoutRef<FileDisplayListProps>\n>(function FileDisplayList(\n {\n variant,\n items = [],\n compact = false,\n heading,\n progress,\n count,\n onDialogOpen,\n onDialogClose,\n onDownloadAll,\n ...restProps\n },\n ref\n) {\n const fileListProps: FileListProps = {\n type: 'display',\n items: items.map(item => ({ ...item, variant })),\n onDownloadAll\n };\n\n return compact ? (\n <CompactList\n {...restProps}\n count={count ?? items.length}\n onDialogOpen={onDialogOpen}\n onDialogClose={onDialogClose}\n heading={heading}\n progress={progress}\n content={progress ? undefined : <FileList {...fileListProps} />}\n ref={ref}\n />\n ) : (\n <FileList {...restProps} {...fileListProps} ref={ref} />\n );\n});\n\nexport default FileDisplayList;\n"]}
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
import type { FunctionComponent, Ref } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { type FileListProps, type ModalProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import type { BaseProps, ForwardProps, NoChildrenProp, OmitStrict, TestIdProp } from '../../types';
|
|
3
4
|
import type { FormControlProps } from '../FormControl';
|
|
4
5
|
import type { FileItemProps } from './FileItem';
|
|
5
|
-
|
|
6
|
+
/** Props to be used when rendering compact variant for multiple FileInput. */
|
|
7
|
+
interface MultiAttachCompactProps {
|
|
8
|
+
/** Modal props */
|
|
9
|
+
modal?: Pick<ModalProps, 'onBeforeOpen'> & {
|
|
10
|
+
/** Callback for cancel button */
|
|
11
|
+
onCancel: ({ close }: {
|
|
12
|
+
close: () => void;
|
|
13
|
+
}) => void;
|
|
14
|
+
/** Callback for submit button */
|
|
15
|
+
onSubmit: ({ close }: {
|
|
16
|
+
close: () => void;
|
|
17
|
+
}) => void;
|
|
18
|
+
/** If true renders loading indicator inside Modal. */
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Conveys the number of files attached */
|
|
22
|
+
count?: number;
|
|
23
|
+
}
|
|
24
|
+
interface BaseFileInputProps extends BaseProps, NoChildrenProp, TestIdProp, Pick<FileItemProps, 'previewFromActions'>, Pick<FileListProps, 'onDownloadAll'> {
|
|
6
25
|
/** Called when files are added either via the input or drop zone. */
|
|
7
26
|
onFilesAdded?: (files: File[]) => void;
|
|
8
27
|
/**
|
|
@@ -12,8 +31,13 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
|
12
31
|
* @default false
|
|
13
32
|
*/
|
|
14
33
|
multiple?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Renders compact variant.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
compact?: boolean;
|
|
15
39
|
/** An array of files that have been uploaded. */
|
|
16
|
-
files?: FileItemProps[];
|
|
40
|
+
files?: OmitStrict<FileItemProps, 'previewFromActions'>[];
|
|
17
41
|
/**
|
|
18
42
|
* Specify allowed file types.
|
|
19
43
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept}
|
|
@@ -36,6 +60,8 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
|
36
60
|
required?: FormControlProps['required'];
|
|
37
61
|
/** Disable the control. The browser defaults to false. */
|
|
38
62
|
disabled?: FormControlProps['disabled'];
|
|
63
|
+
/** Makes the input non editable and non clickable. */
|
|
64
|
+
readOnly?: FormControlProps['readOnly'];
|
|
39
65
|
/** Sets html name attribute for the underlying control. Useful for mapping to a data field. */
|
|
40
66
|
name?: FormControlProps['name'];
|
|
41
67
|
/** Pass a heading and content to show additional information on the field. */
|
|
@@ -43,12 +69,10 @@ export interface FileInputProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
|
43
69
|
/** Ref for the input element within the component's dom structure. */
|
|
44
70
|
ref?: Ref<HTMLInputElement>;
|
|
45
71
|
}
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
}, never>;
|
|
49
|
-
export declare const StyledFileInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<FileInputProps, keyof FileInputProps> & Required<Pick<FileInputProps, never>> & ForwardProps, never>;
|
|
72
|
+
export interface FileInputProps extends BaseFileInputProps, MultiAttachCompactProps {
|
|
73
|
+
}
|
|
50
74
|
declare const _default: FunctionComponent<FileInputProps & ForwardProps> & {
|
|
51
|
-
getTestIds: (testIdProp?: string | undefined) => import("
|
|
75
|
+
getTestIds: (testIdProp?: string | null | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["control", "files", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
|
|
52
76
|
};
|
|
53
77
|
export default _default;
|
|
54
78
|
//# sourceMappingURL=FileInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAA2C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/File/FileInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAA2C,MAAM,OAAO,CAAC;AAE7F,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAUvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAoBhD,8EAA8E;AAC9E,UAAU,uBAAuB;IAC/B,kBAAkB;IAClB,KAAK,CAAC,EAAE,IAAI,CAAC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