@pega/cosmos-react-core 9.0.0-build.1.0 → 9.0.0-build.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +4 -1
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +3 -1
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js +3 -4
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/AppShell/ThemeSwitcher.d.ts +9 -0
- package/lib/components/AppShell/ThemeSwitcher.d.ts.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.js +58 -0
- package/lib/components/AppShell/ThemeSwitcher.js.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts +2 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.d.ts.map +1 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.js +3 -0
- package/lib/components/AppShell/ThemeSwitcher.test-ids.js.map +1 -0
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +10 -4
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Banner/Banner.js +1 -1
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Card/CardHeader.d.ts.map +1 -1
- package/lib/components/Card/CardHeader.js +2 -2
- package/lib/components/Card/CardHeader.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +8 -3
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts +5 -0
- package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +3 -9
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +7 -2
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +6 -4
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/CreditCard/CreditCardInput.d.ts +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +8 -4
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +8 -6
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +0 -4
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +29 -10
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +1 -1
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/PartInput.js +6 -1
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +1 -1
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +7 -5
- 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 +4 -3
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/utils.js +2 -6
- package/lib/components/DateTime/Picker/utils.js.map +1 -1
- package/lib/components/Dialog/Dialog.types.d.ts +4 -0
- package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.types.js.map +1 -1
- package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
- package/lib/components/Dialog/FormDialog.js +7 -2
- package/lib/components/Dialog/FormDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.js +1 -1
- package/lib/components/Dialog/InfoDialog.js.map +1 -1
- package/lib/components/Drawer/Drawer.d.ts +8 -1
- package/lib/components/Drawer/Drawer.d.ts.map +1 -1
- package/lib/components/Drawer/Drawer.js +67 -8
- package/lib/components/Drawer/Drawer.js.map +1 -1
- package/lib/components/Drawer/ResizeHandle.d.ts +9 -0
- package/lib/components/Drawer/ResizeHandle.d.ts.map +1 -0
- package/lib/components/Drawer/ResizeHandle.js +109 -0
- package/lib/components/Drawer/ResizeHandle.js.map +1 -0
- package/lib/components/Drawer/index.d.ts +2 -0
- package/lib/components/Drawer/index.d.ts.map +1 -1
- package/lib/components/Drawer/index.js +1 -0
- package/lib/components/Drawer/index.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts +5 -0
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +10 -6
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.d.ts +17 -2
- package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +202 -50
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.utils.d.ts +33 -0
- package/lib/components/FieldGroup/FieldGroupList.utils.d.ts.map +1 -0
- package/lib/components/FieldGroup/FieldGroupList.utils.js +74 -0
- package/lib/components/FieldGroup/FieldGroupList.utils.js.map +1 -0
- package/lib/components/FieldGroup/FieldGroupListContext.d.ts +8 -0
- package/lib/components/FieldGroup/FieldGroupListContext.d.ts.map +1 -0
- package/lib/components/FieldGroup/FieldGroupListContext.js +9 -0
- package/lib/components/FieldGroup/FieldGroupListContext.js.map +1 -0
- package/lib/components/FieldGroup/index.d.ts +2 -0
- package/lib/components/FieldGroup/index.d.ts.map +1 -1
- package/lib/components/FieldGroup/index.js +2 -0
- package/lib/components/FieldGroup/index.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +11 -5
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/File/FileInput.d.ts.map +1 -1
- package/lib/components/File/FileInput.js +4 -3
- package/lib/components/File/FileInput.js.map +1 -1
- package/lib/components/File/FileItem.d.ts.map +1 -1
- package/lib/components/File/FileItem.js +2 -2
- package/lib/components/File/FileItem.js.map +1 -1
- package/lib/components/Form/Form.d.ts +2 -0
- package/lib/components/Form/Form.d.ts.map +1 -1
- package/lib/components/Form/Form.js +2 -2
- package/lib/components/Form/Form.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +3 -2
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.d.ts.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.js +8 -5
- package/lib/components/Fullscreen/Fullscreen.js.map +1 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +7 -2
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/archive-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/archive-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/archive-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/archive-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/archive.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/archive.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/archive.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/archive.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/article-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/article-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/article-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/article-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/article.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/article.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/article.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/article.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/bell-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/bell-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/bell-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/bell-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/browser-site.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-mixed-right.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/circle-mixed-right.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-mixed-right.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/circle-mixed-right.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-stacked-mixed.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/circle-stacked-mixed.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-stacked-mixed.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/circle-stacked-mixed.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-stacked.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/circle-stacked.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/circle-stacked.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/circle-stacked.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/cloud-nodes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/condition-critical.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/condition-critical.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/condition-critical.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/condition-critical.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/condition-satisfactory.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/condition-satisfactory.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/condition-satisfactory.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/condition-satisfactory.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/disc-document.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/disc-nodes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/document-doc.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/document-doc.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/document-doc.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/document-doc.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/document-json.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/document-xls.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/document-xls.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/document-xls.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/document-xls.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/documents.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/documents.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/documents.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/documents.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/field-cursor.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/field-cursor.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/filter-on.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/filter-on.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/filter-on.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/filter-on.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/freeze-column.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/freeze-column.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/freeze-column.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/freeze-column.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/galaxy.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/galaxy.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/galaxy.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/galaxy.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/grid-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/grid-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/grid-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/grid-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/grid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/grid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/grid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/grid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/language-pack.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/layout.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/layout.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/layout.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/layout.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/lock-closed.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/lock-closed.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/lock-closed.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/lock-closed.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/mail-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/mail-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/mail-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/mail-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/mail.icon.d.ts.map +1 -1
- package/lib/components/Icon/streamline-icons/mail.icon.js +1 -1
- package/lib/components/Icon/streamline-icons/mail.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/mobius.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/mobius.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/mobius.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/mobius.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/phone-in-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/phone-in-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/phone-in-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/phone-in-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/picture-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/picture-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/picture-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/picture-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/plug-connect.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/return.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/return.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/return.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/return.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/robot-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/robot-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/robot-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/robot-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/shapes.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-case.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/share-document.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/shield-lock.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/slideshow-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/slideshow-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/slideshow-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/slideshow-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/speaker-on-sold.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/speaker-on-sold.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/speaker-on-sold.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/speaker-on-sold.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/speaker-on.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/speaker-on.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/speaker-on.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/speaker-on.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/table-disc.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/translate.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/translate.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/translate.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/translate.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-check-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-check-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-check-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-check-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-close-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-close-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-close-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-close-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-close.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-close.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-close.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-close.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-female-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-female-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-female-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-female-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-female.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-female.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-female.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-female.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-list-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-list-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-list-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-list-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-list.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-list.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-list.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-list.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plus-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-plus-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plus-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-plus-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plus.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-plus.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-plus.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-plus.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-question-mark-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-question-mark-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-question-mark-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-question-mark-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-question-mark.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-question-mark.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-question-mark.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-question-mark.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-search-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-search-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-search-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-search-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-search.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-search.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-search.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-search.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-star-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/user-star-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/user-star-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/user-star-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/user-star.icon.js +2 -2
- package/lib/components/Icon/streamline-icons/user-star.icon.js.map +1 -1
- package/lib/components/Icon/streamline-icons/users-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/users-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/users-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/users-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/users.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/users.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/users.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/users.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/versions.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/versions.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/versions.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/versions.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/video-off.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/video-off.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/video-off.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/video-off.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/video-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/video-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/video-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/video-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/video.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/video.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/video.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/video.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/voicemail.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/voicemail.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/voicemail.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/voicemail.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/vr-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/vr-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/vr-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/vr-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/vr.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/vr.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/vr.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/vr.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/walkie-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/walkie-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/walkie-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/walkie-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/walkie.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/walkie.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/walkie.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/walkie.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wallet-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wallet-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wallet-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wallet-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wallet.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wallet.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wallet.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wallet.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/watch-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/watch-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/watch-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/watch-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/watch.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/watch.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/watch.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/watch.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/waypoint-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/waypoint-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/waypoint-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/waypoint-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/waypoint.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/waypoint.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/waypoint.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/waypoint.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/webcam-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/webcam-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/webcam-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/webcam-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/webcam.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/webcam.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/webcam.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/webcam.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/whatsapp.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/whatsapp.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/whatsapp.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/whatsapp.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wifi-none.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wifi-none.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wifi-none.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wifi-none.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wifi-off.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wifi-off.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wifi-off.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wifi-off.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wizard-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wizard-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wizard-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wizard-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wizard.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wizard.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wizard.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wizard.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wrench-solid.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wrench-solid.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wrench-solid.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wrench-solid.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/wrench.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/wrench.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/wrench.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/wrench.icon.js.map +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +82 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/IconPicker/IconPicker.d.ts +4 -4
- package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
- package/lib/components/IconPicker/IconPicker.js +19 -25
- package/lib/components/IconPicker/IconPicker.js.map +1 -1
- package/lib/components/Input/Input.styles.d.ts.map +1 -1
- package/lib/components/Input/Input.styles.js +2 -17
- package/lib/components/Input/Input.styles.js.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 +9 -3
- package/lib/components/Lightbox/Lightbox.js.map +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.test-ids.js +1 -0
- package/lib/components/Lightbox/Lightbox.test-ids.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +100 -39
- 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 +9 -14
- package/lib/components/ListToolbar/ListToolbar.styles.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/Location/CurrentLocationButton.d.ts.map +1 -1
- package/lib/components/Location/CurrentLocationButton.js +4 -2
- package/lib/components/Location/CurrentLocationButton.js.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.d.ts +43 -0
- package/lib/components/Location/GoogleMapsAPI.d.ts.map +1 -0
- package/lib/components/Location/GoogleMapsAPI.js +244 -0
- package/lib/components/Location/GoogleMapsAPI.js.map +1 -0
- package/lib/components/Location/Location.types.d.ts +3 -2
- package/lib/components/Location/Location.types.d.ts.map +1 -1
- package/lib/components/Location/Location.types.js.map +1 -1
- package/lib/components/Location/LocationAPI.types.d.ts +23 -0
- package/lib/components/Location/LocationAPI.types.d.ts.map +1 -0
- package/lib/components/Location/LocationAPI.types.js +2 -0
- package/lib/components/Location/LocationAPI.types.js.map +1 -0
- package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
- package/lib/components/Location/LocationDisplay.js +5 -3
- package/lib/components/Location/LocationDisplay.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +24 -21
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Location/LocationView.d.ts.map +1 -1
- package/lib/components/Location/LocationView.js +8 -5
- package/lib/components/Location/LocationView.js.map +1 -1
- package/lib/components/Location/index.d.ts +2 -1
- package/lib/components/Location/index.d.ts.map +1 -1
- package/lib/components/Location/index.js +2 -1
- package/lib/components/Location/index.js.map +1 -1
- package/lib/components/Location/utils.d.ts +3 -19
- package/lib/components/Location/utils.d.ts.map +1 -1
- package/lib/components/Location/utils.js +7 -161
- package/lib/components/Location/utils.js.map +1 -1
- package/lib/components/MetaList/MetaList.d.ts.map +1 -1
- package/lib/components/MetaList/MetaList.js +3 -2
- package/lib/components/MetaList/MetaList.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +5 -1
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +29 -3
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/Number/NumberInput.js +2 -2
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/utils.d.ts +1 -1
- package/lib/components/Number/utils.d.ts.map +1 -1
- package/lib/components/Number/utils.js +1 -2
- package/lib/components/Number/utils.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.js +2 -2
- package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js +1 -1
- package/lib/components/PageTemplates/GridLayout/EditorBackground.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutEditor.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts +5 -0
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js +2 -2
- package/lib/components/PageTemplates/GridLayout/GridLayoutViewer.js.map +1 -1
- package/lib/components/PageTemplates/GridLayout/config.d.ts +1 -1
- package/lib/components/PageTemplates/GridLayout/config.d.ts.map +1 -1
- package/lib/components/PageTemplates/GridLayout/config.js +3 -3
- package/lib/components/PageTemplates/GridLayout/config.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +33 -5
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
- package/lib/components/Phone/PhoneInput.js +1 -1
- package/lib/components/Phone/PhoneInput.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +4 -22
- 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 +19 -4
- 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 +10 -0
- package/lib/components/Popover/modifiers.js.map +1 -1
- package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
- package/lib/components/Tabs/TabPanel.js +8 -0
- package/lib/components/Tabs/TabPanel.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +9 -5
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/Toaster.types.d.ts +3 -3
- 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.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +3 -1
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/components/Tree/Tree.js +1 -1
- package/lib/components/Tree/Tree.js.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/useAnimatedText.d.ts +11 -0
- package/lib/hooks/useAnimatedText.d.ts.map +1 -0
- package/lib/hooks/useAnimatedText.js +96 -0
- package/lib/hooks/useAnimatedText.js.map +1 -0
- package/lib/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/hooks/useBreakpoint.js +5 -2
- package/lib/hooks/useBreakpoint.js.map +1 -1
- package/lib/hooks/useChToPxConversionFactor.d.ts +2 -2
- package/lib/hooks/useChToPxConversionFactor.d.ts.map +1 -1
- package/lib/hooks/useChToPxConversionFactor.js +4 -13
- package/lib/hooks/useChToPxConversionFactor.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +181 -2
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useItemIntersection.d.ts +2 -1
- package/lib/hooks/useItemIntersection.d.ts.map +1 -1
- package/lib/hooks/useItemIntersection.js +10 -4
- package/lib/hooks/useItemIntersection.js.map +1 -1
- package/lib/hooks/usePopoverMap.d.ts +10 -0
- package/lib/hooks/usePopoverMap.d.ts.map +1 -0
- package/lib/hooks/usePopoverMap.js +34 -0
- package/lib/hooks/usePopoverMap.js.map +1 -0
- package/lib/hooks/useThemeMode.d.ts +10 -0
- package/lib/hooks/useThemeMode.d.ts.map +1 -0
- package/lib/hooks/useThemeMode.js +11 -0
- package/lib/hooks/useThemeMode.js.map +1 -0
- package/lib/i18n/default.d.ts +185 -2
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +199 -5
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +181 -2
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.d.ts +2 -2
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +8 -3
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/styles/animations.d.ts +9 -0
- package/lib/styles/animations.d.ts.map +1 -0
- package/lib/styles/animations.js +78 -0
- package/lib/styles/animations.js.map +1 -0
- package/lib/styles/constants.d.ts +5 -0
- package/lib/styles/constants.d.ts.map +1 -0
- package/lib/styles/constants.js +5 -0
- package/lib/styles/constants.js.map +1 -0
- package/lib/styles/gradients.d.ts +2 -0
- package/lib/styles/gradients.d.ts.map +1 -1
- package/lib/styles/gradients.js +4 -1
- package/lib/styles/gradients.js.map +1 -1
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/index.d.ts.map +1 -1
- package/lib/styles/index.js +1 -0
- package/lib/styles/index.js.map +1 -1
- package/lib/styles/utils.d.ts +1 -1
- package/lib/styles/utils.d.ts.map +1 -1
- package/lib/styles/utils.js +1 -1
- package/lib/styles/utils.js.map +1 -1
- package/lib/theme/index.d.ts +2 -0
- package/lib/theme/index.d.ts.map +1 -1
- package/lib/theme/index.js +2 -0
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/theme.d.ts +150 -0
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +82 -0
- package/lib/theme/themeOverrides.schema.json +102 -0
- package/lib/theme/themes/bootes2025Theme.json +3 -3
- package/lib/theme/themes/cygnus2025Theme.json +17 -17
- package/lib/theme/themes/studioDarkTheme.json +240 -0
- package/lib/theme/themes/studioTheme.json +240 -0
- package/lib/utils/focusNonInteractiveElement.d.ts +9 -0
- package/lib/utils/focusNonInteractiveElement.d.ts.map +1 -0
- package/lib/utils/focusNonInteractiveElement.js +27 -0
- package/lib/utils/focusNonInteractiveElement.js.map +1 -0
- package/lib/utils/getChToPxConversionFactor.d.ts +11 -0
- package/lib/utils/getChToPxConversionFactor.d.ts.map +1 -0
- package/lib/utils/getChToPxConversionFactor.js +18 -0
- package/lib/utils/getChToPxConversionFactor.js.map +1 -0
- package/lib/utils/getChildOfRootNode.d.ts +10 -0
- package/lib/utils/getChildOfRootNode.d.ts.map +1 -0
- package/lib/utils/getChildOfRootNode.js +19 -0
- package/lib/utils/getChildOfRootNode.js.map +1 -0
- package/lib/utils/getFocusables.d.ts +4 -2
- package/lib/utils/getFocusables.d.ts.map +1 -1
- package/lib/utils/getFocusables.js +9 -7
- package/lib/utils/getFocusables.js.map +1 -1
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +4 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isInstance.d.ts +4 -4
- package/lib/utils/isInstance.d.ts.map +1 -1
- package/lib/utils/isInstance.js +20 -8
- package/lib/utils/isInstance.js.map +1 -1
- package/lib/utils/markdownTokenizer.d.ts +3 -0
- package/lib/utils/markdownTokenizer.d.ts.map +1 -0
- package/lib/utils/markdownTokenizer.js +159 -0
- package/lib/utils/markdownTokenizer.js.map +1 -0
- package/package.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.js","sourceRoot":"","sources":["../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":";;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AAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC,GACa,CAClB,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAiC,CAAC;AAEnC,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,IAAI,CACnC,EAAE,MAAM,EAAE,YAAY,GAAG,mBAAmB,EAAE,GAAG,SAAS,EAA8B,EACxF,GAAqB;IAErB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,QAAQ,mBACM,OAAO,CAAC,IAAI,KACrB,SAAS,EACb,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;AACJ,CAAC,CAA8F,CAAC;AAEhG,eAAe,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef, Ref, ComponentType, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport type { BaseProps, NoChildrenProp, ForwardProps, OmitStrict, TestIdProp } from '../../types';\nimport { useTestIds } from '../../hooks';\nimport { withTestIds } from '../../utils';\n\nimport { getTreeTestIds } from './Tree.test-ids';\n\nexport type TreeNode = {\n /** The id of the Node. Used as the key for the li element wrapping the Node. */\n id: string;\n /** Child nodes. */\n nodes?: TreeNode[];\n /** Props to apply to the li. */\n listItemProps?: ForwardProps;\n\n [key: string]: unknown;\n};\n\nexport interface TreeProps<T extends TreeNode = TreeNode>\n extends BaseProps,\n NoChildrenProp,\n TestIdProp {\n /** An array of ParentNodes and Nodes that compose the layout of the Tree. */\n nodes: T[];\n /** A function that allows custom styling and behavior for all Nodes. */\n nodeRenderer?: ComponentType<\n {\n depth: number;\n subTree?: ReactNode;\n hasParentSibling: TreeItemProps['hasParentSibling'];\n } & OmitStrict<T, 'listItemProps'>\n >;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLUListElement>;\n}\n\nexport const StyledTreeListItem = styled.li``;\n\nexport const StyledTreeList = styled.ul`\n &,\n & & {\n list-style: none;\n position: relative;\n }\n\n ${StyledTreeListItem} {\n position: relative;\n }\n`;\n\nconst DefaultNodeRenderer: TreeProps['nodeRenderer'] = ({ data, subTree }) => {\n return (\n <>\n {data}\n {subTree}\n </>\n );\n};\n\ninterface TreeItemProps extends TreeNode {\n nodeRenderer: NonNullable<TreeProps['nodeRenderer']>;\n depth: number;\n hasParentSibling: boolean;\n}\n\ninterface TreeListProps extends Pick<TreeProps, 'nodes' | 'ref'> {\n nodeRenderer: NonNullable<TreeProps['nodeRenderer']>;\n depth: number;\n}\n\nlet TreeList: ComponentType<TreeListProps>;\n\nconst TreeItem = ({\n listItemProps,\n depth,\n nodes,\n nodeRenderer: NodeRenderer,\n ...restProps\n}: TreeItemProps) => {\n return (\n <StyledTreeListItem {...listItemProps} role='none'>\n <NodeRenderer\n {...restProps}\n depth={depth}\n nodes={nodes}\n subTree={nodes && <TreeList depth={depth + 1} nodes={nodes} nodeRenderer={NodeRenderer} />}\n />\n </StyledTreeListItem>\n );\n};\n\nTreeList = forwardRef(function TreeListFunction(\n { nodes, depth, nodeRenderer, ...restProps }: PropsWithoutRef<TreeListProps>,\n ref?: TreeProps['ref']\n) {\n const hasParentSibling = nodes.some(node => !!node.nodes);\n return nodes.length > 0 ? (\n <StyledTreeList {...restProps} ref={ref} role={depth === 0 ? 'tree' : 'group'}>\n {nodes.map(node => (\n <TreeItem\n {...node}\n key={node.id}\n depth={depth}\n nodeRenderer={nodeRenderer}\n hasParentSibling={hasParentSibling}\n />\n ))}\n </StyledTreeList>\n ) : null;\n}) as ComponentType<TreeListProps>;\n\nconst Tree = forwardRef(function Tree(\n { testId, nodeRenderer = DefaultNodeRenderer, ...restProps }: PropsWithoutRef<TreeProps>,\n ref: TreeProps['ref']\n) {\n const testIds = useTestIds(testId, getTreeTestIds);\n\n return (\n <TreeList\n data-testid={testIds.root}\n {...restProps}\n ref={ref}\n depth={0}\n nodeRenderer={nodeRenderer}\n />\n );\n}) as <T extends TreeNode = TreeNode>(props: TreeProps<T> & ForwardProps) => JSX.Element | null;\n\nexport default withTestIds(Tree, getTreeTestIds);\n"]}
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as useAbortController } from './useAbortController';
|
|
|
2
2
|
export { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';
|
|
3
3
|
export type { UseActiveDescendantConfig } from './useActiveDescendant';
|
|
4
4
|
export { default as useAfterInitialEffect } from './useAfterInitialEffect';
|
|
5
|
+
export { default as useAnimatedText } from './useAnimatedText';
|
|
5
6
|
export { default as useArrows } from './useArrows';
|
|
6
7
|
export { default as useAutoResize } from './useAutoResize';
|
|
7
8
|
export { default as useBreakpoint } from './useBreakpoint';
|
|
@@ -24,6 +25,7 @@ export { default as useModalContext } from './useModalContext';
|
|
|
24
25
|
export { default as useModalManager } from './useModalManager';
|
|
25
26
|
export { default as useOS } from './useOS';
|
|
26
27
|
export { default as useOuterEvent } from './useOuterEvent';
|
|
28
|
+
export { default as usePopoverMap } from './usePopoverMap';
|
|
27
29
|
export { default as usePrevious } from './usePrevious';
|
|
28
30
|
export { default as useRefMap } from './useRefMap';
|
|
29
31
|
export { default as useSimpleStore, createSimpleStore } from './useSimpleStore';
|
package/lib/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAA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,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/lib/hooks/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as useAbortController } from './useAbortController';
|
|
2
2
|
export { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';
|
|
3
3
|
export { default as useAfterInitialEffect } from './useAfterInitialEffect';
|
|
4
|
+
export { default as useAnimatedText } from './useAnimatedText';
|
|
4
5
|
export { default as useArrows } from './useArrows';
|
|
5
6
|
export { default as useAutoResize } from './useAutoResize';
|
|
6
7
|
export { default as useBreakpoint } from './useBreakpoint';
|
|
@@ -23,6 +24,7 @@ export { default as useModalContext } from './useModalContext';
|
|
|
23
24
|
export { default as useModalManager } from './useModalManager';
|
|
24
25
|
export { default as useOS } from './useOS';
|
|
25
26
|
export { default as useOuterEvent } from './useOuterEvent';
|
|
27
|
+
export { default as usePopoverMap } from './usePopoverMap';
|
|
26
28
|
export { default as usePrevious } from './usePrevious';
|
|
27
29
|
export { default as useRefMap } from './useRefMap';
|
|
28
30
|
export { default as useSimpleStore, createSimpleStore } from './useSimpleStore';
|
package/lib/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EA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,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAbortController } from './useAbortController';\nexport { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';\nexport type { UseActiveDescendantConfig } from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useChToPxConversionFactor } from './useChToPxConversionFactor';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useRefMap } from './useRefMap';\nexport { default as useSimpleStore, createSimpleStore } from './useSimpleStore';\nexport type { SimpleStore } from './useSimpleStore';\nexport { default as useSimpleStoreInstance } from './useSimpleStoreInstance';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useShortcut } from './useShortcut';\nexport { default as useShortcutManager } from './useShortcutManager';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useElementFocus } from './useElementFocus';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MA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rE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAbortController } from './useAbortController';\nexport { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';\nexport type { UseActiveDescendantConfig } from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useAnimatedText } from './useAnimatedText';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useChToPxConversionFactor } from './useChToPxConversionFactor';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePopoverMap } from './usePopoverMap';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useRefMap } from './useRefMap';\nexport { default as useSimpleStore, createSimpleStore } from './useSimpleStore';\nexport type { SimpleStore } from './useSimpleStore';\nexport { default as useSimpleStoreInstance } from './useSimpleStoreInstance';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useShortcut } from './useShortcut';\nexport { default as useShortcutManager } from './useShortcutManager';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useElementFocus } from './useElementFocus';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const useAnimatedText: ({ text, allContentReceived, enabled, tokenizeMarkdown }: {
|
|
2
|
+
text: string;
|
|
3
|
+
allContentReceived: boolean;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
tokenizeMarkdown?: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
text: string;
|
|
8
|
+
isAnimationDone: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default useAnimatedText;
|
|
11
|
+
//# sourceMappingURL=useAnimatedText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimatedText.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnimatedText.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,eAAe,GAAI,yDAKtB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;;CAiHA,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useEffect, useState, useRef } from 'react';
|
|
2
|
+
import tokenizeWithMarkdown from '../utils/markdownTokenizer';
|
|
3
|
+
const useAnimatedText = ({ text, allContentReceived = false, enabled = true, tokenizeMarkdown = false }) => {
|
|
4
|
+
const [cursor, setCursor] = useState(0); // End pointer
|
|
5
|
+
const [startingCursor, setStartingCursor] = useState(0); // animation starting point
|
|
6
|
+
const [prevText, setPrevText] = useState(text);
|
|
7
|
+
const [isAnimationDone, setIsAnimationDone] = useState(false);
|
|
8
|
+
const allContentReceivedRef = useRef(allContentReceived);
|
|
9
|
+
allContentReceivedRef.current = allContentReceived;
|
|
10
|
+
// Tokenize text based on markdown flag
|
|
11
|
+
const getTokens = (inputText) => {
|
|
12
|
+
if (tokenizeMarkdown) {
|
|
13
|
+
return tokenizeWithMarkdown(inputText);
|
|
14
|
+
}
|
|
15
|
+
return inputText.split('');
|
|
16
|
+
};
|
|
17
|
+
// A new chunk has arrived
|
|
18
|
+
if (prevText !== text) {
|
|
19
|
+
setPrevText(text);
|
|
20
|
+
setStartingCursor(text.startsWith(prevText) ? cursor : 0);
|
|
21
|
+
setIsAnimationDone(false);
|
|
22
|
+
}
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
// If streaming is disabled just return the whole chunk back
|
|
25
|
+
if (!enabled) {
|
|
26
|
+
setCursor(getTokens(text).length);
|
|
27
|
+
setIsAnimationDone(true);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const tokens = getTokens(text);
|
|
31
|
+
const targetLength = tokens.length;
|
|
32
|
+
const charactersToAnimate = targetLength - startingCursor;
|
|
33
|
+
// If there are no more characters to animate
|
|
34
|
+
if (charactersToAnimate <= 0) {
|
|
35
|
+
setCursor(targetLength);
|
|
36
|
+
// Only set animation done if we have all content AND no more characters to animate
|
|
37
|
+
if (allContentReceivedRef.current) {
|
|
38
|
+
setIsAnimationDone(true);
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
let intervalId;
|
|
43
|
+
let startTime;
|
|
44
|
+
let isStopped = false;
|
|
45
|
+
let currentSpeed = 50; // Start with normal speed
|
|
46
|
+
let lastCursor = startingCursor;
|
|
47
|
+
const processTextAnimation = () => {
|
|
48
|
+
if (isStopped)
|
|
49
|
+
return;
|
|
50
|
+
const currentTime = performance.now();
|
|
51
|
+
if (!startTime) {
|
|
52
|
+
startTime = currentTime;
|
|
53
|
+
}
|
|
54
|
+
// When we have all content with us, speed up streaming animation
|
|
55
|
+
const targetSpeed = allContentReceivedRef.current ? 150 : 50;
|
|
56
|
+
// Smoothly transition to target speed
|
|
57
|
+
const speedDiff = targetSpeed - currentSpeed;
|
|
58
|
+
currentSpeed += speedDiff * 0.1; // Smooth transition
|
|
59
|
+
const elapsed = currentTime - startTime;
|
|
60
|
+
const timeStep = elapsed / 1000;
|
|
61
|
+
// Calculate how many characters we should have shown by now
|
|
62
|
+
const expectedCursor = Math.min(startingCursor + timeStep * currentSpeed, targetLength);
|
|
63
|
+
const newCursor = Math.min(Math.floor(expectedCursor), targetLength);
|
|
64
|
+
// Skip update if the cursor is at the same token
|
|
65
|
+
if (newCursor !== lastCursor) {
|
|
66
|
+
setCursor(newCursor);
|
|
67
|
+
lastCursor = newCursor;
|
|
68
|
+
}
|
|
69
|
+
// End condition - stop when we reach the target
|
|
70
|
+
if (newCursor >= targetLength && allContentReceivedRef.current) {
|
|
71
|
+
setIsAnimationDone(true);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// Continue animation if not done
|
|
75
|
+
if (newCursor < targetLength || !allContentReceivedRef.current) {
|
|
76
|
+
// Use adaptive timing based on content state and visibility
|
|
77
|
+
const interval = allContentReceivedRef.current ? 20 : 50; // Faster when complete
|
|
78
|
+
intervalId = setTimeout(processTextAnimation, interval);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
// Start the animation with initial delay
|
|
82
|
+
intervalId = setTimeout(processTextAnimation, 16);
|
|
83
|
+
return () => {
|
|
84
|
+
isStopped = true;
|
|
85
|
+
if (intervalId) {
|
|
86
|
+
clearTimeout(intervalId);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, [startingCursor, text, tokenizeMarkdown]);
|
|
90
|
+
return {
|
|
91
|
+
text: getTokens(text).slice(0, cursor).join(''),
|
|
92
|
+
isAnimationDone
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export default useAnimatedText;
|
|
96
|
+
//# sourceMappingURL=useAnimatedText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimatedText.js","sourceRoot":"","sources":["../../src/hooks/useAnimatedText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAE9D,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,kBAAkB,GAAG,KAAK,EAC1B,OAAO,GAAG,IAAI,EACd,gBAAgB,GAAG,KAAK,EAMzB,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc;IACvD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,2BAA2B;IAEpF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9D,MAAM,qBAAqB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAEzD,qBAAqB,CAAC,OAAO,GAAG,kBAAkB,CAAC;IAEnD,uCAAuC;IACvC,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAY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BAAuB;gBACjF,UAAU,GAAG,UAAU,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC,CAAC;QAEF,yCAAyC;QACzC,UAAU,GAAG,UAAU,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QAElD,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,UAAU,EAAE,CAAC;gBACf,YAAY,CAAC,UAAU,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,eAAe;KAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\nimport tokenizeWithMarkdown from '../utils/markdownTokenizer';\n\nconst useAnimatedText = ({\n text,\n allContentReceived = false,\n enabled = true,\n tokenizeMarkdown = false\n}: {\n text: string;\n allContentReceived: boolean;\n enabled?: boolean;\n tokenizeMarkdown?: boolean;\n}) => {\n const [cursor, setCursor] = useState(0); // End pointer\n const [startingCursor, setStartingCursor] = useState(0); // animation starting point\n\n const [prevText, setPrevText] = useState(text);\n const [isAnimationDone, setIsAnimationDone] = useState(false);\n\n const allContentReceivedRef = useRef(allContentReceived);\n\n allContentReceivedRef.current = allContentReceived;\n\n // Tokenize text based on markdown flag\n const getTokens = (inputText: string): string[] => {\n if (tokenizeMarkdown) {\n return tokenizeWithMarkdown(inputText);\n }\n return inputText.split('');\n };\n\n // A new chunk has arrived\n if (prevText !== text) {\n setPrevText(text);\n setStartingCursor(text.startsWith(prevText) ? cursor : 0);\n setIsAnimationDone(false);\n }\n\n useEffect(() => {\n // If streaming is disabled just return the whole chunk back\n if (!enabled) {\n setCursor(getTokens(text).length);\n setIsAnimationDone(true);\n return;\n }\n\n const tokens = getTokens(text);\n const targetLength = tokens.length;\n const charactersToAnimate = targetLength - startingCursor;\n\n // If there are no more characters to animate\n if (charactersToAnimate <= 0) {\n setCursor(targetLength);\n // Only set animation done if we have all content AND no more characters to animate\n if (allContentReceivedRef.current) {\n setIsAnimationDone(true);\n }\n return;\n }\n\n let intervalId: ReturnType<typeof setTimeout>;\n let startTime: number;\n let isStopped = false;\n let currentSpeed = 50; // Start with normal speed\n let lastCursor = startingCursor;\n\n const processTextAnimation = () => {\n if (isStopped) return;\n\n const currentTime = performance.now();\n\n if (!startTime) {\n startTime = currentTime;\n }\n\n // When we have all content with us, speed up streaming animation\n const targetSpeed = allContentReceivedRef.current ? 150 : 50;\n\n // Smoothly transition to target speed\n const speedDiff = targetSpeed - currentSpeed;\n currentSpeed += speedDiff * 0.1; // Smooth transition\n\n const elapsed = currentTime - startTime;\n const timeStep = elapsed / 1000;\n\n // Calculate how many characters we should have shown by now\n const expectedCursor = Math.min(startingCursor + timeStep * currentSpeed, targetLength);\n\n const newCursor = Math.min(Math.floor(expectedCursor), targetLength);\n\n // Skip update if the cursor is at the same token\n if (newCursor !== lastCursor) {\n setCursor(newCursor);\n lastCursor = newCursor;\n }\n\n // End condition - stop when we reach the target\n if (newCursor >= targetLength && allContentReceivedRef.current) {\n setIsAnimationDone(true);\n return;\n }\n\n // Continue animation if not done\n if (newCursor < targetLength || !allContentReceivedRef.current) {\n // Use adaptive timing based on content state and visibility\n const interval = allContentReceivedRef.current ? 20 : 50; // Faster when complete\n intervalId = setTimeout(processTextAnimation, interval);\n }\n };\n\n // Start the animation with initial delay\n intervalId = setTimeout(processTextAnimation, 16);\n\n return () => {\n isStopped = true;\n if (intervalId) {\n clearTimeout(intervalId);\n }\n };\n }, [startingCursor, text, tokenizeMarkdown]);\n\n return {\n text: getTokens(text).slice(0, cursor).join(''),\n isAnimationDone\n };\n};\n\nexport default useAnimatedText;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC;;;;;GAKG;AACH,QAAA,MAAM,aAAa,GACjB,YAAY,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAC5C,6CAIG;IACD,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,GAAG,eAAe,CAAC;CACxC,
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC;;;;;GAKG;AACH,QAAA,MAAM,aAAa,GACjB,YAAY,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAC5C,6CAIG;IACD,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,GAAG,eAAe,CAAC;CACxC,YA4EP,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useLayoutEffect, useCallback } from 'react';
|
|
2
|
-
import { windowIsAvailable, debounce } from '../utils';
|
|
2
|
+
import { windowIsAvailable, debounce, testElForOverflow, getScrollbarWidth } from '../utils';
|
|
3
3
|
import useChToPxConversionFactor from './useChToPxConversionFactor';
|
|
4
4
|
import useTheme from './useTheme';
|
|
5
5
|
// We should be able to safely capture once as the computed root font size is unlikely to change during normal runtime.
|
|
@@ -29,8 +29,11 @@ const useBreakpoint = (breakpoint, { breakpointRef, defaultValue = false, themeP
|
|
|
29
29
|
const matchesBreakpoint = entries.some(({ target, contentRect }) => {
|
|
30
30
|
if (target !== breakpointRef.current)
|
|
31
31
|
return;
|
|
32
|
+
const scrollbarWidth = testElForOverflow(breakpointRef.current)[1]
|
|
33
|
+
? getScrollbarWidth()
|
|
34
|
+
: 0;
|
|
32
35
|
const multiplier = themeProp === 'breakpoints' ? parseFloat(rootFontSize) : chToPxConversionFactor;
|
|
33
|
-
return contentRect.width >= parseFloat(breakpointVal) * multiplier;
|
|
36
|
+
return (Math.ceil(contentRect.width + scrollbarWidth) >= parseFloat(breakpointVal) * multiplier);
|
|
34
37
|
});
|
|
35
38
|
setMatches(matchesBreakpoint);
|
|
36
39
|
}, 100);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.js","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7F,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,uHAAuH;AACvH,MAAM,YAAY,GAAG,iBAAiB;IACpC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,QAAQ,IAAI,MAAM;IACtE,CAAC,CAAC,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AE,aAAa,CAAC,CAAC;gBACjD,UAAU,CAAC,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;YAC/D,CAAC;YAED,OAAO,GAAG,EAAE;gBACV,+DAA+D;gBAC/D,IAAI,mBAAmB;oBAAE,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;qBACvE,CAAC;oBACJ,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBACtD,CAAC;YACH,CAAC,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAE7B,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useLayoutEffect, useCallback } from 'react';\nimport type { RefObject } from 'react';\n\nimport { windowIsAvailable, debounce, testElForOverflow, getScrollbarWidth } from '../utils';\n\nimport useChToPxConversionFactor from './useChToPxConversionFactor';\nimport useTheme from './useTheme';\n\n// We should be able to safely capture once as the computed root font size is unlikely to change during normal runtime.\nconst rootFontSize = windowIsAvailable\n ? window.getComputedStyle(document.documentElement).fontSize || '16px'\n : '16px';\n\n/**\n * @example const breakpointActive = useBreakpoint(breakpoint);\n * @param breakpoint The string indicator for the breakpoint that should be checked for validity.\n * @param options\n * @returns breakpointActive:: A boolean indicating if the given breakpoint is active or not. If false, the breakpoint is too big for the screen size.\n */\nconst useBreakpoint = (\n breakpoint: 'xs' | 'sm' | 'md' | 'lg' | 'xl',\n {\n breakpointRef,\n defaultValue = false,\n themeProp = 'breakpoints'\n }: {\n breakpointRef?: RefObject<Element> | undefined;\n defaultValue?: boolean;\n themeProp?: 'breakpoints' | 'content-width';\n } = {}\n) => {\n const {\n base: { breakpoints, 'content-width': contentWidth }\n } = useTheme();\n const breakpointVal =\n themeProp === 'content-width' ? contentWidth[breakpoint] : breakpoints[breakpoint];\n\n const [matches, setMatches] = useState(\n windowIsAvailable ? window.matchMedia(`(min-width: ${breakpointVal})`).matches : !!defaultValue\n );\n\n const chToPxConversionFactor = useChToPxConversionFactor();\n\n const onResize = useCallback((e: MediaQueryListEvent) => {\n setMatches(e.matches);\n }, []);\n\n useLayoutEffect(() => {\n // Breakpoint handling for contained elements\n if (breakpointRef && breakpointRef.current) {\n const debouncedResize = debounce((entries: ResizeObserverEntry[]) => {\n if (!breakpointRef.current?.checkVisibility()) return;\n const matchesBreakpoint = entries.some(({ target, contentRect }) => {\n if (target !== breakpointRef.current) return;\n\n const scrollbarWidth = testElForOverflow(breakpointRef.current)[1]\n ? getScrollbarWidth()\n : 0;\n const multiplier =\n themeProp === 'breakpoints' ? parseFloat(rootFontSize) : chToPxConversionFactor;\n return (\n Math.ceil(contentRect.width + scrollbarWidth) >= parseFloat(breakpointVal) * multiplier\n );\n });\n\n setMatches(matchesBreakpoint);\n }, 100);\n\n const observer = new ResizeObserver(debouncedResize);\n\n observer.observe(breakpointRef.current);\n\n return () => {\n observer.disconnect();\n };\n }\n\n // Breakpoint handling for viewport\n if (windowIsAvailable) {\n const mediaMatch = window.matchMedia(`(min-width: ${breakpointVal})`);\n const mediaMatchAvailable = 'addEventListener' in mediaMatch;\n const resizeHandler = debounce(() => {\n setMatches(window.innerWidth >= parseInt(breakpointVal, 10));\n }, 100);\n\n // Need to check useMatchMedia in order to support unit testing\n if (mediaMatchAvailable) {\n mediaMatch.addEventListener('change', onResize);\n setMatches(mediaMatch.matches);\n } else {\n window.addEventListener('resize', resizeHandler);\n setMatches(window.innerWidth >= parseInt(breakpointVal, 10));\n }\n\n return () => {\n // Need to check useMatchMedia in order to support unit testing\n if (mediaMatchAvailable) mediaMatch.removeEventListener('change', onResize);\n else {\n window.removeEventListener('resize', resizeHandler);\n }\n };\n }\n }, [breakpointRef?.current]);\n\n return matches;\n};\n\nexport default useBreakpoint;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const _default: () => number;
|
|
2
|
+
export default _default;
|
|
3
3
|
//# sourceMappingURL=useChToPxConversionFactor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChToPxConversionFactor.d.ts","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useChToPxConversionFactor.d.ts","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":";AAKA,wBAAsC"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
chToPxDiv.style.width = '1ch';
|
|
6
|
-
chToPxDiv.style.position = 'fixed';
|
|
7
|
-
document.body.append(chToPxDiv);
|
|
8
|
-
const conversionFactor = chToPxDiv.offsetWidth;
|
|
9
|
-
chToPxDiv.remove();
|
|
10
|
-
return conversionFactor;
|
|
11
|
-
}, []);
|
|
12
|
-
};
|
|
13
|
-
export default useChToPxConversionFactor;
|
|
1
|
+
import { getChToPxConversionFactor, documentIsAvailable } from '../utils';
|
|
2
|
+
// Evaluate once at the module level and reuse value. This should be good enough for all known usage.
|
|
3
|
+
const conversionFactor = documentIsAvailable ? getChToPxConversionFactor() : 1;
|
|
4
|
+
export default () => conversionFactor;
|
|
14
5
|
//# sourceMappingURL=useChToPxConversionFactor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChToPxConversionFactor.js","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useChToPxConversionFactor.js","sourceRoot":"","sources":["../../src/hooks/useChToPxConversionFactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE1E,qGAAqG;AACrG,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,CAAC,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,eAAe,GAAG,EAAE,CAAC,gBAAgB,CAAC","sourcesContent":["import { getChToPxConversionFactor, documentIsAvailable } from '../utils';\n\n// Evaluate once at the module level and reuse value. This should be good enough for all known usage.\nconst conversionFactor = documentIsAvailable ? getChToPxConversionFactor() : 1;\n\nexport default () => conversionFactor;\n"]}
|