@hitachivantara/uikit-react-core 5.0.0-next.20 → 5.0.0-next.22
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/dist/cjs/components/Accordion/Accordion.cjs +5 -2
- package/dist/cjs/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/cjs/components/Accordion/Accordion.styles.cjs +4 -4
- package/dist/cjs/components/Accordion/Accordion.styles.cjs.map +1 -1
- package/dist/cjs/components/ActionsGeneric/ActionsGeneric.cjs +2 -2
- package/dist/cjs/components/ActionsGeneric/ActionsGeneric.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.cjs +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.styles.cjs +6 -6
- package/dist/cjs/components/AppSwitcher/Action/Action.styles.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/AppSwitcher.styles.cjs +6 -6
- package/dist/cjs/components/AppSwitcher/AppSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.cjs +4 -4
- package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/Badge/Badge.styles.cjs +4 -4
- package/dist/cjs/components/Badge/Badge.styles.cjs.map +1 -1
- package/dist/cjs/components/Banner/BannerContent/ActionContainer/ActionContainer.cjs +2 -2
- package/dist/cjs/components/Banner/BannerContent/ActionContainer/ActionContainer.cjs.map +1 -1
- package/dist/cjs/components/Banner/BannerContent/BannerContent.cjs +1 -1
- package/dist/cjs/components/Banner/BannerContent/BannerContent.cjs.map +1 -1
- package/dist/cjs/components/Banner/BannerContent/BannerContent.styles.cjs +6 -6
- package/dist/cjs/components/Banner/BannerContent/BannerContent.styles.cjs.map +1 -1
- package/dist/cjs/components/Banner/BannerContent/MessageContainer/MessageContainer.styles.cjs +4 -4
- package/dist/cjs/components/Banner/BannerContent/MessageContainer/MessageContainer.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseCheckBox/BaseCheckBox.cjs +2 -2
- package/dist/cjs/components/BaseCheckBox/BaseCheckBox.cjs.map +1 -1
- package/dist/cjs/components/BaseCheckBox/BaseCheckBox.styles.cjs +2 -2
- package/dist/cjs/components/BaseCheckBox/BaseCheckBox.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseDropdown/BaseDropdown.styles.cjs +12 -12
- package/dist/cjs/components/BaseDropdown/BaseDropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.cjs +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.cjs.map +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.styles.cjs +9 -9
- package/dist/cjs/components/BaseInput/BaseInput.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/cjs/components/BaseRadio/BaseRadio.cjs.map +1 -1
- package/dist/cjs/components/BaseRadio/BaseRadio.styles.cjs +2 -2
- package/dist/cjs/components/BaseRadio/BaseRadio.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/BreadCrumb.styles.cjs +3 -3
- package/dist/cjs/components/BreadCrumb/BreadCrumb.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/Page/Page.cjs +3 -2
- package/dist/cjs/components/BreadCrumb/Page/Page.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/Page/Page.styles.cjs +2 -3
- package/dist/cjs/components/BreadCrumb/Page/Page.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/PathElement/PathElement.cjs +1 -1
- package/dist/cjs/components/BreadCrumb/PathElement/PathElement.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/utils.cjs +1 -1
- package/dist/cjs/components/BreadCrumb/utils.cjs.map +1 -1
- package/dist/cjs/components/BulkActions/BulkActions.cjs +5 -3
- package/dist/cjs/components/BulkActions/BulkActions.cjs.map +1 -1
- package/dist/cjs/components/BulkActions/BulkActions.styles.cjs +6 -6
- package/dist/cjs/components/BulkActions/BulkActions.styles.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.cjs +15 -9
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.styles.cjs +20 -20
- package/dist/cjs/components/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.cjs +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.styles.cjs +7 -7
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarNavigation/MonthSelector/MonthSelector.styles.cjs +5 -5
- package/dist/cjs/components/Calendar/CalendarNavigation/MonthSelector/MonthSelector.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/SingleCalendar/CalendarCell.styles.cjs +8 -8
- package/dist/cjs/components/Calendar/SingleCalendar/CalendarCell.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/SingleCalendar/SingleCalendar.styles.cjs +7 -7
- package/dist/cjs/components/Calendar/SingleCalendar/SingleCalendar.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.cjs +23 -19
- package/dist/cjs/components/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.styles.cjs +15 -16
- package/dist/cjs/components/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Content/Content.cjs +11 -6
- package/dist/cjs/components/Card/Content/Content.cjs.map +1 -1
- package/dist/cjs/components/Card/Content/Content.styles.cjs +2 -3
- package/dist/cjs/components/Card/Content/Content.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Header/Header.cjs +25 -21
- package/dist/cjs/components/Card/Header/Header.cjs.map +1 -1
- package/dist/cjs/components/Card/Header/Header.styles.cjs +10 -11
- package/dist/cjs/components/Card/Header/Header.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Media/Media.cjs +17 -12
- package/dist/cjs/components/Card/Media/Media.cjs.map +1 -1
- package/dist/cjs/components/Card/Media/Media.styles.cjs +2 -3
- package/dist/cjs/components/Card/Media/Media.styles.cjs.map +1 -1
- package/dist/cjs/components/CheckBox/CheckBox.styles.cjs +7 -7
- package/dist/cjs/components/CheckBox/CheckBox.styles.cjs.map +1 -1
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.styles.cjs +4 -4
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/Controls/Controls.cjs +11 -5
- package/dist/cjs/components/Controls/Controls.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +64 -59
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.styles.cjs +15 -9
- package/dist/cjs/components/Dialog/Dialog.styles.cjs.map +1 -1
- package/dist/cjs/components/DotPagination/DotPagination.styles.cjs +5 -5
- package/dist/cjs/components/DotPagination/DotPagination.styles.cjs.map +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.cjs +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.cjs.map +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs +6 -6
- package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.styles.cjs +6 -6
- package/dist/cjs/components/Dropdown/Dropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/EmptyState/EmptyState.styles.cjs +5 -5
- package/dist/cjs/components/EmptyState/EmptyState.styles.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/DropZone/DropZone.cjs +4 -3
- package/dist/cjs/components/FileUploader/DropZone/DropZone.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/DropZone/DropZone.styles.cjs +17 -17
- package/dist/cjs/components/FileUploader/DropZone/DropZone.styles.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/File/File.cjs +2 -2
- package/dist/cjs/components/FileUploader/File/File.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/File/File.styles.cjs +13 -13
- package/dist/cjs/components/FileUploader/File/File.styles.cjs.map +1 -1
- package/dist/cjs/components/Focus/Focus.cjs +4 -3
- package/dist/cjs/components/Focus/Focus.cjs.map +1 -1
- package/dist/cjs/components/Footer/Footer.styles.cjs +6 -6
- package/dist/cjs/components/Footer/Footer.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/CharCounter/CharCounter.styles.cjs +5 -5
- package/dist/cjs/components/Forms/CharCounter/CharCounter.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/InfoMessage/InfoMessage.styles.cjs +2 -2
- package/dist/cjs/components/Forms/InfoMessage/InfoMessage.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/Label/Label.styles.cjs +2 -2
- package/dist/cjs/components/Forms/Label/Label.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/Suggestions/Suggestions.styles.cjs +4 -4
- package/dist/cjs/components/Forms/Suggestions/Suggestions.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/WarningText/WarningText.cjs +1 -1
- package/dist/cjs/components/Forms/WarningText/WarningText.cjs.map +1 -1
- package/dist/cjs/components/Forms/WarningText/WarningText.styles.cjs +5 -5
- package/dist/cjs/components/Forms/WarningText/WarningText.styles.cjs.map +1 -1
- package/dist/cjs/components/GlobalActions/GlobalActions.cjs +3 -2
- package/dist/cjs/components/GlobalActions/GlobalActions.cjs.map +1 -1
- package/dist/cjs/components/Grid/Grid.cjs +4 -2
- package/dist/cjs/components/Grid/Grid.cjs.map +1 -1
- package/dist/cjs/components/Header/Brand/Brand.styles.cjs +15 -15
- package/dist/cjs/components/Header/Brand/Brand.styles.cjs.map +1 -1
- package/dist/cjs/components/Input/Input.cjs +1 -1
- package/dist/cjs/components/Input/Input.cjs.map +1 -1
- package/dist/cjs/components/Link/Link.styles.cjs +2 -2
- package/dist/cjs/components/Link/Link.styles.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs +5 -5
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.cjs +1 -1
- package/dist/cjs/components/Loading/Loading.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.styles.cjs +6 -6
- package/dist/cjs/components/Loading/Loading.styles.cjs.map +1 -1
- package/dist/cjs/components/MultiButton/MultiButton.styles.cjs +10 -10
- package/dist/cjs/components/MultiButton/MultiButton.styles.cjs.map +1 -1
- package/dist/cjs/components/Pagination/utils.cjs +1 -1
- package/dist/cjs/components/Pagination/utils.cjs.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.styles.cjs +7 -7
- package/dist/cjs/components/ProgressBar/ProgressBar.styles.cjs.map +1 -1
- package/dist/cjs/components/Radio/Radio.styles.cjs +7 -7
- package/dist/cjs/components/Radio/Radio.styles.cjs.map +1 -1
- package/dist/cjs/components/RadioGroup/RadioGroup.styles.cjs +4 -4
- package/dist/cjs/components/RadioGroup/RadioGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/SelectionList/SelectionList.styles.cjs +6 -6
- package/dist/cjs/components/SelectionList/SelectionList.styles.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.cjs +3 -2
- package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.cjs +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.styles.cjs +9 -9
- package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.styles.cjs.map +1 -1
- package/dist/cjs/components/Switch/Switch.styles.cjs +4 -4
- package/dist/cjs/components/Switch/Switch.styles.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.styles.cjs +3 -3
- package/dist/cjs/components/Tab/Tab.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/Table.cjs +1 -1
- package/dist/cjs/components/Table/Table.cjs.map +1 -1
- package/dist/cjs/components/Table/TableBody/TableBody.cjs +1 -1
- package/dist/cjs/components/Table/TableBody/TableBody.cjs.map +1 -1
- package/dist/cjs/components/Table/TableCell/TableCell.cjs +5 -4
- package/dist/cjs/components/Table/TableCell/TableCell.cjs.map +1 -1
- package/dist/cjs/components/Table/TableContainer/TableContainer.cjs +1 -1
- package/dist/cjs/components/Table/TableContainer/TableContainer.cjs.map +1 -1
- package/dist/cjs/components/Table/TableHead/TableHead.cjs +1 -1
- package/dist/cjs/components/Table/TableHead/TableHead.cjs.map +1 -1
- package/dist/cjs/components/Table/TableHeader/TableHeader.cjs +7 -6
- package/dist/cjs/components/Table/TableHeader/TableHeader.cjs.map +1 -1
- package/dist/cjs/components/Table/TableRow/TableRow.cjs +2 -2
- package/dist/cjs/components/Table/TableRow/TableRow.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useFilters.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useGlobalFilter.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useRowSelection.cjs +5 -4
- package/dist/cjs/components/Table/hooks/useRowSelection.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useTable.cjs +2 -2
- package/dist/cjs/components/Table/hooks/useTable.cjs.map +1 -1
- package/dist/cjs/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.styles.cjs +5 -5
- package/dist/cjs/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/renderers/renderers.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.styles.cjs +2 -2
- package/dist/cjs/components/Tabs/Tabs.styles.cjs.map +1 -1
- package/dist/cjs/components/Tag/Tag.cjs +6 -6
- package/dist/cjs/components/Tag/Tag.cjs.map +1 -1
- package/dist/cjs/components/Tag/Tag.styles.cjs +13 -12
- package/dist/cjs/components/Tag/Tag.styles.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs +14 -14
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.cjs +3 -2
- package/dist/cjs/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.styles.cjs +4 -4
- package/dist/cjs/components/Tooltip/Tooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/Typography/Typography.cjs +8 -4
- package/dist/cjs/components/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/Typography/utils.cjs +9 -7
- package/dist/cjs/components/Typography/utils.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Action.cjs +2 -2
- package/dist/cjs/components/VerticalNavigation/Actions/Action.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Action.styles.cjs +2 -2
- package/dist/cjs/components/VerticalNavigation/Actions/Action.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.cjs +2 -2
- package/dist/cjs/components/VerticalNavigation/Actions/Actions.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Header/Header.cjs +31 -12
- package/dist/cjs/components/VerticalNavigation/Header/Header.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Header/Header.styles.cjs +17 -4
- package/dist/cjs/components/VerticalNavigation/Header/Header.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs +27 -4
- package/dist/cjs/components/VerticalNavigation/Navigation/Navigation.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs +50 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.cjs.map +1 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +38 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs.map +1 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.cjs +8 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.cjs.map +1 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/utils/NavigationSlider.utils.cjs +41 -0
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/utils/NavigationSlider.utils.cjs.map +1 -0
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeView.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs +3 -3
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs +32 -9
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs +7 -2
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigationContext.cjs +10 -0
- package/dist/cjs/components/VerticalNavigation/VerticalNavigationContext.cjs.map +1 -0
- package/dist/cjs/components/VerticalNavigation/verticalNavigationClasses.cjs +1 -1
- package/dist/cjs/components/VerticalNavigation/verticalNavigationClasses.cjs.map +1 -1
- package/dist/cjs/index.cjs +6 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/providers/Provider.cjs +39 -7
- package/dist/cjs/providers/Provider.cjs.map +1 -1
- package/dist/cjs/providers/ThemeProvider.cjs +3 -3
- package/dist/cjs/providers/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/utils/iconVariant.cjs +3 -3
- package/dist/cjs/utils/iconVariant.cjs.map +1 -1
- package/dist/cjs/utils/theme.cjs +28 -19
- package/dist/cjs/utils/theme.cjs.map +1 -1
- package/dist/esm/components/Accordion/Accordion.js +5 -2
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Accordion/Accordion.styles.js +4 -4
- package/dist/esm/components/Accordion/Accordion.styles.js.map +1 -1
- package/dist/esm/components/ActionsGeneric/ActionsGeneric.js +2 -2
- package/dist/esm/components/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.js +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.styles.js +6 -6
- package/dist/esm/components/AppSwitcher/Action/Action.styles.js.map +1 -1
- package/dist/esm/components/AppSwitcher/AppSwitcher.styles.js +6 -6
- package/dist/esm/components/AppSwitcher/AppSwitcher.styles.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.js +4 -4
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/Badge/Badge.styles.js +4 -4
- package/dist/esm/components/Badge/Badge.styles.js.map +1 -1
- package/dist/esm/components/Banner/BannerContent/ActionContainer/ActionContainer.js +2 -2
- package/dist/esm/components/Banner/BannerContent/ActionContainer/ActionContainer.js.map +1 -1
- package/dist/esm/components/Banner/BannerContent/BannerContent.js +1 -1
- package/dist/esm/components/Banner/BannerContent/BannerContent.js.map +1 -1
- package/dist/esm/components/Banner/BannerContent/BannerContent.styles.js +6 -6
- package/dist/esm/components/Banner/BannerContent/BannerContent.styles.js.map +1 -1
- package/dist/esm/components/Banner/BannerContent/MessageContainer/MessageContainer.styles.js +4 -4
- package/dist/esm/components/Banner/BannerContent/MessageContainer/MessageContainer.styles.js.map +1 -1
- package/dist/esm/components/BaseCheckBox/BaseCheckBox.js +2 -2
- package/dist/esm/components/BaseCheckBox/BaseCheckBox.js.map +1 -1
- package/dist/esm/components/BaseCheckBox/BaseCheckBox.styles.js +2 -2
- package/dist/esm/components/BaseCheckBox/BaseCheckBox.styles.js.map +1 -1
- package/dist/esm/components/BaseDropdown/BaseDropdown.styles.js +12 -12
- package/dist/esm/components/BaseDropdown/BaseDropdown.styles.js.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.js +1 -1
- package/dist/esm/components/BaseInput/BaseInput.js.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.styles.js +9 -9
- package/dist/esm/components/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/components/BaseRadio/BaseRadio.js +2 -2
- package/dist/esm/components/BaseRadio/BaseRadio.js.map +1 -1
- package/dist/esm/components/BaseRadio/BaseRadio.styles.js +2 -2
- package/dist/esm/components/BaseRadio/BaseRadio.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/BreadCrumb.styles.js +3 -3
- package/dist/esm/components/BreadCrumb/BreadCrumb.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/Page/Page.js +1 -1
- package/dist/esm/components/BreadCrumb/Page/Page.js.map +1 -1
- package/dist/esm/components/BreadCrumb/Page/Page.styles.js +2 -3
- package/dist/esm/components/BreadCrumb/Page/Page.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/PathElement/PathElement.js +1 -1
- package/dist/esm/components/BreadCrumb/PathElement/PathElement.js.map +1 -1
- package/dist/esm/components/BreadCrumb/utils.js +1 -1
- package/dist/esm/components/BreadCrumb/utils.js.map +1 -1
- package/dist/esm/components/BulkActions/BulkActions.js +5 -3
- package/dist/esm/components/BulkActions/BulkActions.js.map +1 -1
- package/dist/esm/components/BulkActions/BulkActions.styles.js +6 -6
- package/dist/esm/components/BulkActions/BulkActions.styles.js.map +1 -1
- package/dist/esm/components/Button/Button.js +15 -9
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/Button.styles.js +20 -20
- package/dist/esm/components/Button/Button.styles.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.js +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.styles.js +7 -7
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarNavigation/MonthSelector/MonthSelector.styles.js +5 -5
- package/dist/esm/components/Calendar/CalendarNavigation/MonthSelector/MonthSelector.styles.js.map +1 -1
- package/dist/esm/components/Calendar/SingleCalendar/CalendarCell.styles.js +8 -8
- package/dist/esm/components/Calendar/SingleCalendar/CalendarCell.styles.js.map +1 -1
- package/dist/esm/components/Calendar/SingleCalendar/SingleCalendar.styles.js +7 -7
- package/dist/esm/components/Calendar/SingleCalendar/SingleCalendar.styles.js.map +1 -1
- package/dist/esm/components/Card/Card.js +24 -20
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/Card.styles.js +15 -16
- package/dist/esm/components/Card/Card.styles.js.map +1 -1
- package/dist/esm/components/Card/Content/Content.js +11 -6
- package/dist/esm/components/Card/Content/Content.js.map +1 -1
- package/dist/esm/components/Card/Content/Content.styles.js +2 -3
- package/dist/esm/components/Card/Content/Content.styles.js.map +1 -1
- package/dist/esm/components/Card/Header/Header.js +25 -21
- package/dist/esm/components/Card/Header/Header.js.map +1 -1
- package/dist/esm/components/Card/Header/Header.styles.js +10 -11
- package/dist/esm/components/Card/Header/Header.styles.js.map +1 -1
- package/dist/esm/components/Card/Media/Media.js +17 -12
- package/dist/esm/components/Card/Media/Media.js.map +1 -1
- package/dist/esm/components/Card/Media/Media.styles.js +2 -3
- package/dist/esm/components/Card/Media/Media.styles.js.map +1 -1
- package/dist/esm/components/CheckBox/CheckBox.styles.js +7 -7
- package/dist/esm/components/CheckBox/CheckBox.styles.js.map +1 -1
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.styles.js +4 -4
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.styles.js.map +1 -1
- package/dist/esm/components/Controls/Controls.js +11 -5
- package/dist/esm/components/Controls/Controls.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +62 -58
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.styles.js +16 -10
- package/dist/esm/components/Dialog/Dialog.styles.js.map +1 -1
- package/dist/esm/components/DotPagination/DotPagination.styles.js +5 -5
- package/dist/esm/components/DotPagination/DotPagination.styles.js.map +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.js +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.js.map +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js +6 -6
- package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.styles.js +6 -6
- package/dist/esm/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.styles.js +5 -5
- package/dist/esm/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/dist/esm/components/FileUploader/DropZone/DropZone.js +2 -2
- package/dist/esm/components/FileUploader/DropZone/DropZone.js.map +1 -1
- package/dist/esm/components/FileUploader/DropZone/DropZone.styles.js +17 -17
- package/dist/esm/components/FileUploader/DropZone/DropZone.styles.js.map +1 -1
- package/dist/esm/components/FileUploader/File/File.js +2 -2
- package/dist/esm/components/FileUploader/File/File.js.map +1 -1
- package/dist/esm/components/FileUploader/File/File.styles.js +13 -13
- package/dist/esm/components/FileUploader/File/File.styles.js.map +1 -1
- package/dist/esm/components/Focus/Focus.js +2 -2
- package/dist/esm/components/Focus/Focus.js.map +1 -1
- package/dist/esm/components/Footer/Footer.styles.js +6 -6
- package/dist/esm/components/Footer/Footer.styles.js.map +1 -1
- package/dist/esm/components/Forms/CharCounter/CharCounter.styles.js +5 -5
- package/dist/esm/components/Forms/CharCounter/CharCounter.styles.js.map +1 -1
- package/dist/esm/components/Forms/InfoMessage/InfoMessage.styles.js +2 -2
- package/dist/esm/components/Forms/InfoMessage/InfoMessage.styles.js.map +1 -1
- package/dist/esm/components/Forms/Label/Label.styles.js +2 -2
- package/dist/esm/components/Forms/Label/Label.styles.js.map +1 -1
- package/dist/esm/components/Forms/Suggestions/Suggestions.styles.js +4 -4
- package/dist/esm/components/Forms/Suggestions/Suggestions.styles.js.map +1 -1
- package/dist/esm/components/Forms/WarningText/WarningText.js +1 -1
- package/dist/esm/components/Forms/WarningText/WarningText.js.map +1 -1
- package/dist/esm/components/Forms/WarningText/WarningText.styles.js +5 -5
- package/dist/esm/components/Forms/WarningText/WarningText.styles.js.map +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.js +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.js.map +1 -1
- package/dist/esm/components/Grid/Grid.js +1 -1
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/Header/Brand/Brand.styles.js +15 -15
- package/dist/esm/components/Header/Brand/Brand.styles.js.map +1 -1
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/Link/Link.styles.js +2 -2
- package/dist/esm/components/Link/Link.styles.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js +5 -5
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/components/Loading/Loading.js +1 -1
- package/dist/esm/components/Loading/Loading.js.map +1 -1
- package/dist/esm/components/Loading/Loading.styles.js +6 -6
- package/dist/esm/components/Loading/Loading.styles.js.map +1 -1
- package/dist/esm/components/MultiButton/MultiButton.styles.js +10 -10
- package/dist/esm/components/MultiButton/MultiButton.styles.js.map +1 -1
- package/dist/esm/components/Pagination/utils.js +1 -1
- package/dist/esm/components/Pagination/utils.js.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.styles.js +7 -7
- package/dist/esm/components/ProgressBar/ProgressBar.styles.js.map +1 -1
- package/dist/esm/components/Radio/Radio.styles.js +7 -7
- package/dist/esm/components/Radio/Radio.styles.js.map +1 -1
- package/dist/esm/components/RadioGroup/RadioGroup.styles.js +4 -4
- package/dist/esm/components/RadioGroup/RadioGroup.styles.js.map +1 -1
- package/dist/esm/components/SelectionList/SelectionList.styles.js +6 -6
- package/dist/esm/components/SelectionList/SelectionList.styles.js.map +1 -1
- package/dist/esm/components/Snackbar/Snackbar.js +1 -1
- package/dist/esm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js +1 -1
- package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.styles.js +9 -9
- package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.styles.js.map +1 -1
- package/dist/esm/components/Switch/Switch.styles.js +4 -4
- package/dist/esm/components/Switch/Switch.styles.js.map +1 -1
- package/dist/esm/components/Tab/Tab.styles.js +3 -3
- package/dist/esm/components/Tab/Tab.styles.js.map +1 -1
- package/dist/esm/components/Table/Table.js +1 -1
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/TableBody/TableBody.js +1 -1
- package/dist/esm/components/Table/TableBody/TableBody.js.map +1 -1
- package/dist/esm/components/Table/TableCell/TableCell.js +3 -3
- package/dist/esm/components/Table/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/Table/TableContainer/TableContainer.js +1 -1
- package/dist/esm/components/Table/TableContainer/TableContainer.js.map +1 -1
- package/dist/esm/components/Table/TableHead/TableHead.js +1 -1
- package/dist/esm/components/Table/TableHead/TableHead.js.map +1 -1
- package/dist/esm/components/Table/TableHeader/TableHeader.js +4 -4
- package/dist/esm/components/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/esm/components/Table/TableRow/TableRow.js +2 -2
- package/dist/esm/components/Table/TableRow/TableRow.js.map +1 -1
- package/dist/esm/components/Table/hooks/useFilters.js.map +1 -1
- package/dist/esm/components/Table/hooks/useGlobalFilter.js.map +1 -1
- package/dist/esm/components/Table/hooks/useRowSelection.js +5 -4
- package/dist/esm/components/Table/hooks/useRowSelection.js.map +1 -1
- package/dist/esm/components/Table/hooks/useTable.js +2 -2
- package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
- package/dist/esm/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.styles.js +5 -5
- package/dist/esm/components/Table/renderers/ProgressColumnCell/ProgressColumnCell.styles.js.map +1 -1
- package/dist/esm/components/Table/renderers/renderers.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.styles.js +2 -2
- package/dist/esm/components/Tabs/Tabs.styles.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js +6 -6
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/components/Tag/Tag.styles.js +13 -12
- package/dist/esm/components/Tag/Tag.styles.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.styles.js +14 -14
- package/dist/esm/components/TagsInput/TagsInput.styles.js.map +1 -1
- package/dist/esm/components/TextArea/TextArea.js +1 -1
- package/dist/esm/components/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.styles.js +4 -4
- package/dist/esm/components/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/esm/components/Typography/Typography.js +8 -4
- package/dist/esm/components/Typography/Typography.js.map +1 -1
- package/dist/esm/components/Typography/utils.js +9 -7
- package/dist/esm/components/Typography/utils.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Action.js +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Action.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Action.styles.js +2 -2
- package/dist/esm/components/VerticalNavigation/Actions/Action.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Actions.js +1 -1
- package/dist/esm/components/VerticalNavigation/Actions/Actions.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Header/Header.js +32 -13
- package/dist/esm/components/VerticalNavigation/Header/Header.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Header/Header.styles.js +17 -4
- package/dist/esm/components/VerticalNavigation/Header/Header.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js +27 -4
- package/dist/esm/components/VerticalNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js +48 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +36 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.js +8 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/navigationSliderClasses.js.map +1 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/utils/NavigationSlider.utils.js +41 -0
- package/dist/esm/components/VerticalNavigation/NavigationSlider/utils/NavigationSlider.utils.js.map +1 -0
- package/dist/esm/components/VerticalNavigation/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js +2 -2
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.js +33 -10
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js +7 -2
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigationContext.js +10 -0
- package/dist/esm/components/VerticalNavigation/VerticalNavigationContext.js.map +1 -0
- package/dist/esm/components/VerticalNavigation/verticalNavigationClasses.js +1 -1
- package/dist/esm/components/VerticalNavigation/verticalNavigationClasses.js.map +1 -1
- package/dist/esm/index.js +28 -23
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/providers/Provider.js +38 -8
- package/dist/esm/providers/Provider.js.map +1 -1
- package/dist/esm/providers/ThemeProvider.js +3 -3
- package/dist/esm/providers/ThemeProvider.js.map +1 -1
- package/dist/esm/utils/iconVariant.js +3 -3
- package/dist/esm/utils/iconVariant.js.map +1 -1
- package/dist/esm/utils/theme.js +29 -20
- package/dist/esm/utils/theme.js.map +1 -1
- package/dist/types/index.d.ts +182 -67
- package/package.json +6 -6
- package/dist/cjs/utils/emotion.cjs +0 -39
- package/dist/cjs/utils/emotion.cjs.map +0 -1
- package/dist/esm/utils/emotion.js +0 -36
- package/dist/esm/utils/emotion.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -210,7 +210,7 @@ import { HvCalendar } from "./components/Calendar/Calendar.js";
|
|
|
210
210
|
import { default as default110 } from "./components/Calendar/CalendarHeader/calendarHeaderClasses.js";
|
|
211
211
|
import { HvCalendarHeader } from "./components/Calendar/CalendarHeader/CalendarHeader.js";
|
|
212
212
|
import { default as default111 } from "./components/VerticalNavigation/verticalNavigationClasses.js";
|
|
213
|
-
import { HvVerticalNavigation
|
|
213
|
+
import { HvVerticalNavigation } from "./components/VerticalNavigation/VerticalNavigation.js";
|
|
214
214
|
import { default as default112 } from "./components/VerticalNavigation/Header/headerClasses.js";
|
|
215
215
|
import { HvVerticalNavigationHeader } from "./components/VerticalNavigation/Header/Header.js";
|
|
216
216
|
import { default as default113 } from "./components/VerticalNavigation/Actions/actionClasses.js";
|
|
@@ -219,12 +219,15 @@ import { HvVerticalNavigationActions } from "./components/VerticalNavigation/Act
|
|
|
219
219
|
import { HvVerticalNavigationAction } from "./components/VerticalNavigation/Actions/Action.js";
|
|
220
220
|
import { default as default115 } from "./components/VerticalNavigation/Navigation/navigationClasses.js";
|
|
221
221
|
import { HvVerticalNavigationTree } from "./components/VerticalNavigation/Navigation/Navigation.js";
|
|
222
|
-
import { default as default116 } from "./components/VerticalNavigation/
|
|
223
|
-
import {
|
|
222
|
+
import { default as default116 } from "./components/VerticalNavigation/NavigationSlider/navigationSliderClasses.js";
|
|
223
|
+
import { HvVerticalNavigationSlider } from "./components/VerticalNavigation/NavigationSlider/NavigationSlider.js";
|
|
224
|
+
import { default as default117 } from "./components/VerticalNavigation/TreeView/treeViewClasses.js";
|
|
225
|
+
import { default as default118 } from "./components/VerticalNavigation/TreeView/treeViewItemClasses.js";
|
|
224
226
|
import { HvVerticalNavigationTreeView } from "./components/VerticalNavigation/TreeView/TreeView.js";
|
|
225
227
|
import { HvVerticalNavigationTreeViewItem } from "./components/VerticalNavigation/TreeView/TreeViewItem.js";
|
|
226
|
-
import {
|
|
227
|
-
import { default as default119 } from "./hooks/
|
|
228
|
+
import { VerticalNavigationContext } from "./components/VerticalNavigation/VerticalNavigationContext.js";
|
|
229
|
+
import { default as default119 } from "./hooks/useUniqueId.js";
|
|
230
|
+
import { default as default120 } from "./hooks/useIsMounted.js";
|
|
228
231
|
import { useClickOutside } from "./hooks/useClickOutside.js";
|
|
229
232
|
import { useControlled } from "./hooks/useControlled.js";
|
|
230
233
|
import { useImageLoaded } from "./hooks/useImageLoaded.js";
|
|
@@ -236,11 +239,11 @@ import { useEnhancedEffect } from "./hooks/useEnhancedEffect.js";
|
|
|
236
239
|
import { HvProvider } from "./providers/Provider.js";
|
|
237
240
|
import { HvThemeContext } from "@hitachivantara/uikit-react-shared";
|
|
238
241
|
import { HvThemeProvider } from "./providers/ThemeProvider.js";
|
|
239
|
-
import { default as
|
|
240
|
-
import { default as
|
|
241
|
-
import { default as
|
|
242
|
-
import { default as
|
|
243
|
-
import { default as
|
|
242
|
+
import { default as default121 } from "./utils/iconVariant.js";
|
|
243
|
+
import { default as default122 } from "./utils/hexToRgbA.js";
|
|
244
|
+
import { default as default123 } from "./utils/browser.js";
|
|
245
|
+
import { default as default124 } from "./utils/multiSelectionEventHandler.js";
|
|
246
|
+
import { default as default125 } from "./utils/getComponentName.js";
|
|
244
247
|
import { outlineStyles } from "./utils/focusUtils.js";
|
|
245
248
|
import { keyboardCodes } from "./utils/keyboardUtils/keyboardCodes.js";
|
|
246
249
|
import { getKeyCodeFromEvent, isKeycode, isKeypress } from "./utils/keyboardUtils/keyCheck.js";
|
|
@@ -250,8 +253,8 @@ import { setId, setUid } from "./utils/setId.js";
|
|
|
250
253
|
import { getClasses } from "./utils/classes.js";
|
|
251
254
|
import { getFirstAndLastFocus, getFocusableList, getPrevNextFocus } from "./utils/focusableElementFinder.js";
|
|
252
255
|
import { wrapperTooltip } from "./utils/wrapperTooltip.js";
|
|
253
|
-
import { default as
|
|
254
|
-
import { default as
|
|
256
|
+
import { default as default126 } from "./hocs/withTooltip.js";
|
|
257
|
+
import { default as default127 } from "./hocs/withId.js";
|
|
255
258
|
export {
|
|
256
259
|
CellWithCheckBox,
|
|
257
260
|
CellWithExpandButton,
|
|
@@ -370,6 +373,7 @@ export {
|
|
|
370
373
|
HvVerticalNavigationAction,
|
|
371
374
|
HvVerticalNavigationActions,
|
|
372
375
|
HvVerticalNavigationHeader,
|
|
376
|
+
HvVerticalNavigationSlider,
|
|
373
377
|
HvVerticalNavigationTree,
|
|
374
378
|
HvVerticalNavigationTreeView,
|
|
375
379
|
HvVerticalNavigationTreeViewItem,
|
|
@@ -433,7 +437,7 @@ export {
|
|
|
433
437
|
default36 as footerClasses,
|
|
434
438
|
default13 as formElementClasses,
|
|
435
439
|
getClasses,
|
|
436
|
-
|
|
440
|
+
default125 as getComponentName,
|
|
437
441
|
getFirstAndLastFocus,
|
|
438
442
|
getFocusableList,
|
|
439
443
|
getHeaderFooterPropsHook,
|
|
@@ -450,7 +454,7 @@ export {
|
|
|
450
454
|
default40 as headerBrandClasses,
|
|
451
455
|
default38 as headerClasses,
|
|
452
456
|
default41 as headerNavigationClasses,
|
|
453
|
-
|
|
457
|
+
default122 as hexToRgbA,
|
|
454
458
|
hvDateColumn,
|
|
455
459
|
hvDropdownColumn,
|
|
456
460
|
hvExpandColumn,
|
|
@@ -462,11 +466,11 @@ export {
|
|
|
462
466
|
hvSwitchColumn,
|
|
463
467
|
hvTagColumn,
|
|
464
468
|
hvTextColumn,
|
|
465
|
-
|
|
469
|
+
default121 as iconVariant,
|
|
466
470
|
increaseSize,
|
|
467
471
|
default15 as infoMessageClasses,
|
|
468
472
|
default60 as inputClasses,
|
|
469
|
-
|
|
473
|
+
default123 as isBrowser,
|
|
470
474
|
isInvalid,
|
|
471
475
|
isKeycode,
|
|
472
476
|
isKeypress,
|
|
@@ -482,7 +486,7 @@ export {
|
|
|
482
486
|
default44 as loadingClasses,
|
|
483
487
|
default105 as loginClasses,
|
|
484
488
|
default45 as multiButtonClasses,
|
|
485
|
-
|
|
489
|
+
default124 as multiSelectionEventHandler,
|
|
486
490
|
normalizeProgressBar,
|
|
487
491
|
outlineStyles,
|
|
488
492
|
default53 as overflowTooltipClasses,
|
|
@@ -519,8 +523,8 @@ export {
|
|
|
519
523
|
theme,
|
|
520
524
|
themes,
|
|
521
525
|
default52 as tooltipClasses,
|
|
522
|
-
|
|
523
|
-
|
|
526
|
+
default117 as treeViewClasses,
|
|
527
|
+
default118 as treeViewItemClasses,
|
|
524
528
|
default7 as typographyClasses,
|
|
525
529
|
useClickOutside,
|
|
526
530
|
default5 as useComputation,
|
|
@@ -543,18 +547,19 @@ export {
|
|
|
543
547
|
default92 as useHvTableStyles,
|
|
544
548
|
useImageLoaded,
|
|
545
549
|
useInstance,
|
|
546
|
-
|
|
550
|
+
default120 as useIsMounted,
|
|
547
551
|
useLabels,
|
|
548
552
|
useSelectionPath,
|
|
549
553
|
useTheme,
|
|
550
|
-
|
|
554
|
+
default119 as useUniqueId,
|
|
551
555
|
useWidth,
|
|
552
556
|
default111 as verticalNavigationClasses,
|
|
553
557
|
default112 as verticalNavigationHeaderClasses,
|
|
558
|
+
default116 as verticalNavigationSliderClasses,
|
|
554
559
|
default115 as verticalNavigationTreeClasses,
|
|
555
560
|
default16 as warningTextClasses,
|
|
556
|
-
|
|
557
|
-
|
|
561
|
+
default127 as withId,
|
|
562
|
+
default126 as withTooltip,
|
|
558
563
|
wrapperTooltip
|
|
559
564
|
};
|
|
560
565
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,28 +1,58 @@
|
|
|
1
|
-
import { CacheProvider, Global, css } from "@emotion/react";
|
|
2
|
-
import { CssBaseline, getThemesVars } from "@hitachivantara/uikit-styles";
|
|
1
|
+
import { CacheProvider, Global, css, ClassNames } from "@emotion/react";
|
|
2
|
+
import { CssBaseline, getThemesVars, CssScopedBaseline } from "@hitachivantara/uikit-styles";
|
|
3
3
|
import { HvThemeProvider } from "./ThemeProvider.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import createCache from "@emotion/cache";
|
|
5
6
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
7
|
+
import useUniqueId from "../hooks/useUniqueId.js";
|
|
6
8
|
import { processThemes } from "../utils/theme.js";
|
|
9
|
+
const scopedRootPrefix = "hv-uikit-scoped-root";
|
|
7
10
|
const HvProvider = ({
|
|
8
11
|
children,
|
|
9
12
|
rootElementId,
|
|
10
|
-
|
|
13
|
+
cssBaseline = "global",
|
|
14
|
+
cssTheme = "global",
|
|
11
15
|
themes,
|
|
12
16
|
theme,
|
|
13
|
-
colorMode
|
|
17
|
+
colorMode,
|
|
18
|
+
classNameKey = "hv-uikit-css"
|
|
14
19
|
}) => {
|
|
20
|
+
const scopedRootId = useUniqueId(void 0, scopedRootPrefix);
|
|
15
21
|
const themesList = processThemes(themes);
|
|
22
|
+
const emotionCache = useMemo(() => createCache({
|
|
23
|
+
key: classNameKey,
|
|
24
|
+
prepend: true
|
|
25
|
+
}), [classNameKey]);
|
|
16
26
|
return /* @__PURE__ */ jsxs(CacheProvider, {
|
|
17
27
|
value: emotionCache,
|
|
18
28
|
children: [/* @__PURE__ */ jsx(Global, {
|
|
19
|
-
styles: /* @__PURE__ */ css(
|
|
29
|
+
styles: /* @__PURE__ */ css(cssBaseline == "global" && CssBaseline, " ", getThemesVars(themesList), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:HvProvider;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL3Byb3ZpZGVycy9Qcm92aWRlci50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEd3QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9wcm92aWRlcnMvUHJvdmlkZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgY3NzIGFzIGNzc1JlYWN0LFxuICBHbG9iYWwsXG4gIENhY2hlUHJvdmlkZXIsXG4gIENsYXNzTmFtZXMsXG59IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xuaW1wb3J0IHtcbiAgQ3NzQmFzZWxpbmUsXG4gIENzc1Njb3BlZEJhc2VsaW5lLFxuICBnZXRUaGVtZXNWYXJzLFxuICBIdlRoZW1lU3RydWN0dXJlLFxufSBmcm9tIFwiQGhpdGFjaGl2YW50YXJhL3Vpa2l0LXN0eWxlc1wiO1xuaW1wb3J0IHsgcHJvY2Vzc1RoZW1lcyB9IGZyb20gXCJ1dGlsc1wiO1xuaW1wb3J0IHsgS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1lID09PSBcInNjb3BlZFwiID8gcm9vdEVsZW1lbnRJZCB8fCBzY29wZWRSb290SWQgOiB1bmRlZmluZWRcbiAgICAgICAgfVxuICAgICAgPlxuICAgICAgICA8Q2xhc3NOYW1lcz5cbiAgICAgICAgICB7KHsgY3NzIH0pID0+IHtcbiAgICAgICAgICAgIGlmIChjc3NCYXNlbGluZSA9PT0gXCJzY29wZWRcIiAmJiByb290RWxlbWVudElkKSB7XG4gICAgICAgICAgICAgIGNvbnN0IHJvb3RFbGVtZW50ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQocm9vdEVsZW1lbnRJZCk7XG5cbiAgICAgICAgICAgICAgaWYgKHJvb3RFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuY2xhc3NMaXN0LmFkZChcbiAgICAgICAgICAgICAgICAgIGNzcyh7XG4gICAgICAgICAgICAgICAgICAgIC4uLkNzc1Njb3BlZEJhc2VsaW5lLFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiAoY3NzVGhlbWUgPT09IFwic2NvcGVkXCIgfHwgY3NzQmFzZWxpbmUgPT09IFwic2NvcGVkXCIpICYmXG4gICAgICAgICAgICAgICFyb290RWxlbWVudElkID8gKFxuICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgaWQ9e3Njb3BlZFJvb3RJZH1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e1xuICAgICAgICAgICAgICAgICAgY3NzQmFzZWxpbmUgPT09IFwic2NvcGVkXCJcbiAgICAgICAgICAgICAgICAgICAgPyBjc3MoeyAuLi5Dc3NTY29wZWRCYXNlbGluZSB9KVxuICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICBjaGlsZHJlblxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9fVxuICAgICAgICA8L0NsYXNzTmFtZXM+XG4gICAgICA8L0h2VGhlbWVQcm92aWRlcj5cbiAgICA8L0NhY2hlUHJvdmlkZXI+XG4gICk7XG59O1xuIl19 */")
|
|
20
30
|
}), /* @__PURE__ */ jsx(HvThemeProvider, {
|
|
21
31
|
themes: themesList,
|
|
22
32
|
theme: theme || themesList[0].name,
|
|
23
33
|
colorMode: colorMode || Object.keys(themesList[0].colors.modes)[0],
|
|
24
|
-
rootElementId,
|
|
25
|
-
children
|
|
34
|
+
themeRootId: cssTheme === "scoped" ? rootElementId || scopedRootId : void 0,
|
|
35
|
+
children: /* @__PURE__ */ jsx(ClassNames, {
|
|
36
|
+
children: ({
|
|
37
|
+
css: css2
|
|
38
|
+
}) => {
|
|
39
|
+
if (cssBaseline === "scoped" && rootElementId) {
|
|
40
|
+
const rootElement = document.getElementById(rootElementId);
|
|
41
|
+
if (rootElement) {
|
|
42
|
+
rootElement.classList.add(css2({
|
|
43
|
+
...CssScopedBaseline
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return (cssTheme === "scoped" || cssBaseline === "scoped") && !rootElementId ? /* @__PURE__ */ jsx("div", {
|
|
48
|
+
id: scopedRootId,
|
|
49
|
+
className: cssBaseline === "scoped" ? css2({
|
|
50
|
+
...CssScopedBaseline
|
|
51
|
+
}) : void 0,
|
|
52
|
+
children
|
|
53
|
+
}) : children;
|
|
54
|
+
}
|
|
55
|
+
})
|
|
26
56
|
})]
|
|
27
57
|
});
|
|
28
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sources":["../../../src/providers/Provider.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Provider.js","sources":["../../../src/providers/Provider.tsx"],"sourcesContent":["import {\n css as cssReact,\n Global,\n CacheProvider,\n ClassNames,\n} from \"@emotion/react\";\nimport {\n CssBaseline,\n CssScopedBaseline,\n getThemesVars,\n HvThemeStructure,\n} from \"@hitachivantara/uikit-styles\";\nimport { processThemes } from \"utils\";\nimport { HvTheme } from \"../types/theme\";\nimport { HvThemeProvider } from \"./ThemeProvider\";\nimport React, { useMemo } from \"react\";\nimport createCache from \"@emotion/cache\";\nimport { useUniqueId } from \"hooks\";\n\n// Provider props\nexport type HvProviderProps = {\n /**\n * Your component tree.\n */\n children?: React.ReactNode;\n /**\n * Id of your root element.\n */\n rootElementId?: string;\n /**\n * By default the baseline styles are applied globally, `global`, to the application for the UI Kit components to work properly.\n * If you need to scope the baseline styles to avoid styling conflicts, you can set this property to `scoped`.\n * To scope the baseline to your root, you need to add the `rootElementId` property.\n * If the `rootElementId` property is not set, the baseline will be scoped to a new container, `hv-uikit-scoped-root*`, created around your content.\n * If you are providing your own baseline styles, you can set this property to `none` to disable the baseline styles.\n */\n cssBaseline?: \"global\" | \"scoped\" | \"none\";\n /**\n * By default the theme styles are applied globally, `global`, to the application.\n * If you need to scope the theme styles to avoid styling conflicts, you can set this property to `scoped`.\n * To scope the theme to your root, you need to add the `rootElementId` property.\n * If the `rootElementId` property is not set, the theme will be scoped to a new container, `hv-uikit-scoped-root*`, created around your content.\n */\n cssTheme?: \"global\" | \"scoped\";\n /**\n * The string used to prefix the class names and uniquely identify them. The key can only contain lower case alphabetical characters.\n * This is useful to avoid class name collisions.\n *\n * If no value is provided, the default is `hv-uikit-css`.\n */\n classNameKey?: string;\n /**\n * List of themes to be used by UI Kit.\n * You can provide your own themes created with the `createTheme` utility and/or the default themes `ds3` and `ds5` provided by UI Kit.\n *\n * If no value is provided, the `ds5` theme will be used.\n */\n themes?: (HvTheme | HvThemeStructure)[];\n /**\n * The active theme. It must be one of the themes passed to `themes`.\n *\n * If no value is provided, the first theme from the `themes` list is used. If no `themes` list is provided, the `ds5` theme will be used.\n */\n theme?: string;\n /**\n * The active color mode. It must be one of the color modes of the active theme.\n *\n * If no value is provided, the first color mode defined in the active theme is used.\n * For the default themes `ds3` and `ds5`, the `dawn` color mode is the one used.\n */\n colorMode?: string;\n};\n\nconst scopedRootPrefix = \"hv-uikit-scoped-root\" as const;\n\n/**\n * Enables theming capabilities and makes cross-component theme properties available down the tree.\n */\nexport const HvProvider = ({\n children,\n rootElementId,\n cssBaseline = \"global\",\n cssTheme = \"global\",\n themes,\n theme,\n colorMode,\n classNameKey = \"hv-uikit-css\",\n}: HvProviderProps) => {\n const scopedRootId = useUniqueId(undefined, scopedRootPrefix);\n\n // Themes\n const themesList: (HvTheme | HvThemeStructure)[] = processThemes(themes);\n\n // Emotion cache\n // Moves UI Kit styles to the top of the <head> so they're loaded first\n // This enables users to override the UI Kit styles if necessary\n const emotionCache = useMemo(\n () =>\n createCache({\n key: classNameKey,\n prepend: true,\n }),\n [classNameKey]\n );\n\n return (\n <CacheProvider value={emotionCache}>\n <Global\n styles={cssReact`\n ${cssBaseline == \"global\" && CssBaseline}\n ${getThemesVars(themesList)}\n `}\n />\n <HvThemeProvider\n themes={themesList}\n theme={theme || themesList[0].name}\n colorMode={colorMode || Object.keys(themesList[0].colors.modes)[0]}\n themeRootId={\n cssTheme === \"scoped\" ? rootElementId || scopedRootId : undefined\n }\n >\n <ClassNames>\n {({ css }) => {\n if (cssBaseline === \"scoped\" && rootElementId) {\n const rootElement = document.getElementById(rootElementId);\n\n if (rootElement) {\n rootElement.classList.add(\n css({\n ...CssScopedBaseline,\n })\n );\n }\n }\n\n return (cssTheme === \"scoped\" || cssBaseline === \"scoped\") &&\n !rootElementId ? (\n <div\n id={scopedRootId}\n className={\n cssBaseline === \"scoped\"\n ? css({ ...CssScopedBaseline })\n : undefined\n }\n >\n {children}\n </div>\n ) : (\n children\n );\n }}\n </ClassNames>\n </HvThemeProvider>\n </CacheProvider>\n );\n};\n"],"names":["scopedRootPrefix","HvProvider","children","rootElementId","cssBaseline","cssTheme","themes","theme","colorMode","classNameKey","scopedRootId","useUniqueId","undefined","themesList","processThemes","emotionCache","useMemo","createCache","key","prepend","CacheProvider","value","_jsx","Global","styles","CssBaseline","getThemesVars","process","env","NODE_ENV","HvThemeProvider","name","Object","keys","colors","modes","themeRootId","ClassNames","css","rootElement","document","getElementById","classList","add","CssScopedBaseline","id","className"],"mappings":";;;;;;;;AAyEA,MAAMA,mBAAmB;AAKlB,MAAMC,aAAaA,CAAC;AAAA,EACzBC;AAAAA,EACAC;AAAAA,EACAC,cAAc;AAAA,EACdC,WAAW;AAAA,EACXC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,eAAe;AACA,MAAM;AACfC,QAAAA,eAAeC,YAAYC,QAAWZ,gBAAgB;AAGtDa,QAAAA,aAA6CC,cAAcR,MAAM;AAKjES,QAAAA,eAAeC,QACnB,MACEC,YAAY;AAAA,IACVC,KAAKT;AAAAA,IACLU,SAAS;AAAA,EAAA,CACV,GACH,CAACV,YAAY,CAAC;AAGhB,8BACGW,eAAa;AAAA,IAACC,OAAON;AAAAA,IAAab,UAAA,CACjCoB,oBAACC,QAAM;AAAA,MACLC,4BACIpB,eAAe,YAAYqB,aAC3BC,KAAAA,cAAcb,UAAU,GAACc,OAAAA,QAAAC,IAAAC,wDAAAF,QAAAC,IAAAC,aAAA,eAAA,KAAA,66OAAA;AAAA,IAAA,CAE7B,GACFP,oBAACQ,iBAAe;AAAA,MACdxB,QAAQO;AAAAA,MACRN,OAAOA,SAASM,WAAW,CAAC,EAAEkB;AAAAA,MAC9BvB,WAAWA,aAAawB,OAAOC,KAAKpB,WAAW,CAAC,EAAEqB,OAAOC,KAAK,EAAE,CAAC;AAAA,MACjEC,aACE/B,aAAa,WAAWF,iBAAiBO,eAAeE;AAAAA,MACzDV,8BAEAmC,YAAU;AAAA,QAAAnC,UACRA,CAAC;AAAA,UAAEoC,KAAAA;AAAAA,QAAAA,MAAU;AACRlC,cAAAA,gBAAgB,YAAYD,eAAe;AACvCoC,kBAAAA,cAAcC,SAASC,eAAetC,aAAa;AAEzD,gBAAIoC,aAAa;AACHG,0BAAAA,UAAUC,IACpBL,KAAI;AAAA,gBACF,GAAGM;AAAAA,cACJ,CAAA,CAAC;AAAA,YAEN;AAAA,UACF;AAEA,kBAAQvC,aAAa,YAAYD,gBAAgB,aAC/C,CAACD,oCACD,OAAA;AAAA,YACE0C,IAAInC;AAAAA,YACJoC,WACE1C,gBAAgB,WACZkC,KAAI;AAAA,cAAE,GAAGM;AAAAA,YAAmB,CAAA,IAC5BhC;AAAAA,YACLV;AAAAA,UAEQ,CAAA,IAGXA;AAAAA,QAEJ;AAAA,MAAA,CAAC;AAAA,IAAA,CAEa,CAAA;AAAA,EAAA,CACJ;AAEpB;"}
|
|
@@ -10,10 +10,10 @@ const HvThemeProvider = ({
|
|
|
10
10
|
themes: themesList,
|
|
11
11
|
theme,
|
|
12
12
|
colorMode,
|
|
13
|
-
|
|
13
|
+
themeRootId
|
|
14
14
|
}) => {
|
|
15
15
|
let pTheme = parseTheme(themesList, theme, colorMode);
|
|
16
|
-
const [rootId] = useState(
|
|
16
|
+
const [rootId] = useState(themeRootId);
|
|
17
17
|
const [activeTheme, setActiveTheme] = useState(pTheme.theme);
|
|
18
18
|
const [selectedTheme, setSelectedTheme] = useState(pTheme.selectedTheme);
|
|
19
19
|
const [selectedMode, setThemeMode] = useState(pTheme.selectedMode);
|
|
@@ -28,7 +28,7 @@ const HvThemeProvider = ({
|
|
|
28
28
|
setSelectedTheme(pTheme.selectedTheme);
|
|
29
29
|
setThemeMode(pTheme.selectedMode);
|
|
30
30
|
setColorModes(pTheme.colorModes);
|
|
31
|
-
setElementAttrs(pTheme.selectedTheme, pTheme.selectedMode, pTheme.
|
|
31
|
+
setElementAttrs(pTheme.selectedTheme, pTheme.selectedMode, pTheme.colorScheme, rootId);
|
|
32
32
|
};
|
|
33
33
|
useEffect(() => {
|
|
34
34
|
changeTheme(theme, colorMode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/providers/ThemeProvider.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { parseTheme, HvThemeStructure } from \"@hitachivantara/uikit-styles\";\nimport { HvThemeContext } from \"@hitachivantara/uikit-react-shared\";\nimport type { HvThemeContextValue } from \"@hitachivantara/uikit-react-shared\";\nimport {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport { setElementAttrs } from \"utils\";\nimport { HvTheme } from \"../types/theme\";\n\nexport { HvThemeContext };\nexport type { HvThemeContextValue };\n\ninterface HvThemeProviderProps {\n children: React.ReactNode;\n themes: (HvTheme | HvThemeStructure)[];\n theme: string;\n colorMode: string;\n
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/providers/ThemeProvider.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\";\nimport { parseTheme, HvThemeStructure } from \"@hitachivantara/uikit-styles\";\nimport { HvThemeContext } from \"@hitachivantara/uikit-react-shared\";\nimport type { HvThemeContextValue } from \"@hitachivantara/uikit-react-shared\";\nimport {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport { setElementAttrs } from \"utils\";\nimport { HvTheme } from \"../types/theme\";\n\nexport { HvThemeContext };\nexport type { HvThemeContextValue };\n\ninterface HvThemeProviderProps {\n children: React.ReactNode;\n themes: (HvTheme | HvThemeStructure)[];\n theme: string;\n colorMode: string;\n themeRootId?: string;\n}\n\nexport const HvThemeProvider = ({\n children,\n themes: themesList,\n theme,\n colorMode,\n themeRootId,\n}: HvThemeProviderProps) => {\n let pTheme = parseTheme(themesList, theme, colorMode);\n\n const [rootId] = useState<string | undefined>(themeRootId);\n const [activeTheme, setActiveTheme] = useState<HvTheme | HvThemeStructure>(\n pTheme.theme\n );\n const [selectedTheme, setSelectedTheme] = useState<string>(\n pTheme.selectedTheme\n );\n const [selectedMode, setThemeMode] = useState<string>(pTheme.selectedMode);\n const [colorModes, setColorModes] = useState<string[]>(pTheme.colorModes);\n const [themes, setThemes] = useState<string[]>(themesList.map((t) => t.name));\n\n useEffect(() => {\n setThemes(themesList.map((t) => t.name));\n }, [themesList]);\n\n const changeTheme = (newTheme = selectedTheme, newMode = selectedMode) => {\n pTheme = parseTheme(themesList, newTheme, newMode);\n\n setActiveTheme(pTheme.theme);\n setSelectedTheme(pTheme.selectedTheme);\n setThemeMode(pTheme.selectedMode);\n setColorModes(pTheme.colorModes);\n\n setElementAttrs(\n pTheme.selectedTheme,\n pTheme.selectedMode,\n pTheme.colorScheme,\n rootId\n );\n };\n\n useEffect(() => {\n changeTheme(theme, colorMode);\n }, [theme, colorMode]);\n\n const value = useMemo(\n () => ({\n themes,\n colorModes,\n activeTheme: activeTheme as HvTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n }),\n [\n themes,\n colorModes,\n activeTheme,\n selectedTheme,\n selectedMode,\n changeTheme,\n rootId,\n ]\n );\n\n const MuiTheme = createTheme({\n breakpoints: {\n values: {\n ...activeTheme.breakpoints.values,\n },\n },\n });\n\n return (\n <MuiThemeProvider theme={MuiTheme}>\n <HvThemeContext.Provider value={value}>\n {children}\n </HvThemeContext.Provider>\n </MuiThemeProvider>\n );\n};\n"],"names":["HvThemeProvider","children","themes","themesList","theme","colorMode","themeRootId","pTheme","parseTheme","rootId","useState","activeTheme","setActiveTheme","selectedTheme","setSelectedTheme","selectedMode","setThemeMode","colorModes","setColorModes","setThemes","map","t","name","useEffect","changeTheme","newTheme","newMode","setElementAttrs","colorScheme","value","useMemo","MuiTheme","createTheme","breakpoints","values","MuiThemeProvider","HvThemeContext","Provider"],"mappings":";;;;;;;AAsBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC;AAAAA,EACAC,QAAQC;AAAAA,EACRC;AAAAA,EACAC;AAAAA,EACAC;AACoB,MAAM;AAC1B,MAAIC,SAASC,WAAWL,YAAYC,OAAOC,SAAS;AAEpD,QAAM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A,CACD;AAED,6BACGC,eAAgB;AAAA,IAAC/B,OAAO2B;AAAAA,IAAS9B,UAC/BmC,oBAAAA,eAAeC,UAAQ;AAAA,MAACR;AAAAA,MAAa5B;AAAAA,IAAAA,CAC3B;AAAA,EAAA,CAEM;AAEvB;"}
|
|
@@ -5,17 +5,17 @@ const iconVariant = (variant, color, semantic) => {
|
|
|
5
5
|
case "success":
|
|
6
6
|
return /* @__PURE__ */ jsx(Success, {
|
|
7
7
|
color,
|
|
8
|
-
semantic: semantic && "
|
|
8
|
+
semantic: semantic && "positive"
|
|
9
9
|
});
|
|
10
10
|
case "warning":
|
|
11
11
|
return /* @__PURE__ */ jsx(Caution, {
|
|
12
12
|
color,
|
|
13
|
-
semantic: semantic && "
|
|
13
|
+
semantic: semantic && "warning"
|
|
14
14
|
});
|
|
15
15
|
case "error":
|
|
16
16
|
return /* @__PURE__ */ jsx(Fail, {
|
|
17
17
|
color,
|
|
18
|
-
semantic: semantic && "
|
|
18
|
+
semantic: semantic && "negative"
|
|
19
19
|
});
|
|
20
20
|
case "info":
|
|
21
21
|
return /* @__PURE__ */ jsx(Info, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconVariant.js","sources":["../../../src/utils/iconVariant.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Fail,\n Success,\n Caution,\n Info,\n} from \"@hitachivantara/uikit-react-icons\";\n\nconst iconVariant = (variant, color, semantic) => {\n switch (variant) {\n case \"success\":\n return <Success color={color} semantic={semantic && \"
|
|
1
|
+
{"version":3,"file":"iconVariant.js","sources":["../../../src/utils/iconVariant.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Fail,\n Success,\n Caution,\n Info,\n} from \"@hitachivantara/uikit-react-icons\";\n\nconst iconVariant = (variant, color, semantic) => {\n switch (variant) {\n case \"success\":\n return <Success color={color} semantic={semantic && \"positive\"} />;\n case \"warning\":\n return <Caution color={color} semantic={semantic && \"warning\"} />;\n case \"error\":\n return <Fail color={color} semantic={semantic && \"negative\"} />;\n case \"info\":\n return <Info color={color} />;\n default:\n return null;\n }\n};\n\nexport default iconVariant;\n"],"names":["iconVariant","variant","color","semantic","Success","Caution","Fail","Info"],"mappings":";;AAQA,MAAMA,cAAcA,CAACC,SAASC,OAAOC,aAAa;AAChD,UAAQF,SAAO;AAAA,IACb,KAAK;AACH,iCAAQG,SAAO;AAAA,QAACF;AAAAA,QAAcC,UAAUA,YAAY;AAAA,MAAA,CAAc;AAAA,IACpE,KAAK;AACH,iCAAQE,SAAO;AAAA,QAACH;AAAAA,QAAcC,UAAUA,YAAY;AAAA,MAAA,CAAa;AAAA,IACnE,KAAK;AACH,iCAAQG,MAAI;AAAA,QAACJ;AAAAA,QAAcC,UAAUA,YAAY;AAAA,MAAA,CAAc;AAAA,IACjE,KAAK;AACH,iCAAQI,MAAI;AAAA,QAACL;AAAAA,MAAAA,CAAgB;AAAA,IAC/B;AACS,aAAA;AAAA,EAAK;AAElB;AAEA,MAAA,gBAAeF;"}
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { themes } from "@hitachivantara/uikit-styles";
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
element
|
|
9
|
-
element
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { theme, themes } from "@hitachivantara/uikit-styles";
|
|
2
|
+
const setElementStyle = (element, style) => {
|
|
3
|
+
for (const property in style) {
|
|
4
|
+
element.style[property] = style[property];
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
const setElementAttrs = (themeName, modeName, colorScheme, themeRootId) => {
|
|
8
|
+
const element = themeRootId ? document.getElementById(themeRootId) : document.body;
|
|
9
|
+
if (element) {
|
|
10
|
+
element.setAttribute(`data-theme`, themeName);
|
|
11
|
+
element.setAttribute(`data-color-mode`, modeName);
|
|
12
|
+
setElementStyle(element, {
|
|
13
|
+
colorScheme,
|
|
14
|
+
backgroundColor: theme.colors.backgroundColor,
|
|
15
|
+
accentColor: theme.colors.secondary,
|
|
16
|
+
color: theme.colors.secondary,
|
|
17
|
+
fontSize: theme.typography.body.fontSize,
|
|
18
|
+
fontWeight: theme.typography.body.fontWeight,
|
|
19
|
+
lineHeight: theme.typography.body.lineHeight,
|
|
20
|
+
letterSpacing: theme.typography.body.letterSpacing,
|
|
21
|
+
fontFamily: theme.fontFamily.body
|
|
22
|
+
});
|
|
23
|
+
}
|
|
15
24
|
};
|
|
16
25
|
const applyThemeCustomizations = (obj, customizations) => {
|
|
17
26
|
const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
@@ -31,14 +40,14 @@ const applyThemeCustomizations = (obj, customizations) => {
|
|
|
31
40
|
});
|
|
32
41
|
return customizedTheme;
|
|
33
42
|
};
|
|
34
|
-
const createTheme = (
|
|
43
|
+
const createTheme = (props) => {
|
|
35
44
|
var _a;
|
|
36
45
|
const {
|
|
37
46
|
name,
|
|
38
47
|
base = "ds5",
|
|
39
48
|
inheritColorModes = true,
|
|
40
49
|
...customizations
|
|
41
|
-
} =
|
|
50
|
+
} = props;
|
|
42
51
|
const customizedTheme = customizations ? applyThemeCustomizations(themes[base], customizations) : {
|
|
43
52
|
...themes[base]
|
|
44
53
|
};
|
|
@@ -66,13 +75,13 @@ const createTheme = (theme) => {
|
|
|
66
75
|
const processThemes = (themesList) => {
|
|
67
76
|
if (themesList && Array.isArray(themesList) && themesList.length > 0) {
|
|
68
77
|
const list = [];
|
|
69
|
-
themesList.map((
|
|
70
|
-
const i = list.findIndex((t) => t.name.trim() ===
|
|
78
|
+
themesList.map((thm) => {
|
|
79
|
+
const i = list.findIndex((t) => t.name.trim() === thm.name.trim());
|
|
71
80
|
if (i !== -1) {
|
|
72
81
|
list.splice(i, 1);
|
|
73
|
-
list.push(
|
|
82
|
+
list.push(thm);
|
|
74
83
|
} else {
|
|
75
|
-
list.push(
|
|
84
|
+
list.push(thm);
|
|
76
85
|
}
|
|
77
86
|
});
|
|
78
87
|
return list;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sources":["../../../src/utils/theme.ts"],"sourcesContent":["/*eslint import/namespace: [2, { allowComputed: true }]*/\nimport {\n themes,\n HvThemeColorModeStructure,\n
|
|
1
|
+
{"version":3,"file":"theme.js","sources":["../../../src/utils/theme.ts"],"sourcesContent":["/*eslint import/namespace: [2, { allowComputed: true }]*/\nimport {\n themes,\n HvThemeColorModeStructure,\n HvThemeStructure,\n theme,\n} from \"@hitachivantara/uikit-styles\";\nimport { CSSProperties } from \"react\";\nimport { HvTheme, HvCreateThemeProps } from \"../types/theme\";\n\n/**\n * Sets the element style properties.\n */\nconst setElementStyle = (element: HTMLElement, style: CSSProperties) => {\n for (const property in style) {\n element.style[property] = style[property];\n }\n};\n\n/**\n * Sets the element attributes and style for a theme and color mode.\n */\nexport const setElementAttrs = (\n themeName: string,\n modeName: string,\n colorScheme: string,\n themeRootId?: string\n) => {\n const element = themeRootId\n ? document.getElementById(themeRootId)\n : document.body;\n\n if (element) {\n element.setAttribute(`data-theme`, themeName);\n element.setAttribute(`data-color-mode`, modeName);\n\n // Set default properties for all components to inherit\n setElementStyle(element, {\n colorScheme: colorScheme,\n backgroundColor: theme.colors.backgroundColor,\n accentColor: theme.colors.secondary,\n color: theme.colors.secondary,\n fontSize: theme.typography.body.fontSize,\n fontWeight: theme.typography.body.fontWeight,\n lineHeight: theme.typography.body.lineHeight,\n letterSpacing: theme.typography.body.letterSpacing,\n fontFamily: theme.fontFamily.body,\n });\n }\n};\n\n/**\n * Applies customizations to a theme.\n */\nconst applyThemeCustomizations = (obj: object, customizations: object) => {\n const isObject = (val: any) =>\n val && typeof val === \"object\" && !Array.isArray(val);\n\n // Customized theme\n const customizedTheme = { ...obj };\n\n // Add new values to the theme or replace values\n Object.keys(customizations).forEach((key) => {\n if (customizedTheme[key]) {\n if (isObject(customizedTheme[key]) && isObject(customizations[key])) {\n customizedTheme[key] = applyThemeCustomizations(\n customizedTheme[key],\n customizations[key]\n );\n } else if (typeof customizedTheme[key] == typeof customizations[key]) {\n customizedTheme[key] = customizations[key];\n }\n } else {\n customizedTheme[key] = customizations[key];\n }\n });\n\n return customizedTheme;\n};\n\n/**\n * Creates a customized theme based on the base theme and customizations given.\n * For the color modes, the colors that are not defined will be replaced by the values from the dawn mode of the base theme.\n */\nexport const createTheme = (\n props: HvCreateThemeProps\n): HvTheme | HvThemeStructure => {\n const {\n name,\n base = \"ds5\",\n inheritColorModes = true,\n ...customizations\n } = props;\n\n // Apply customizations to the base theme\n const customizedTheme: HvTheme | HvThemeStructure = customizations\n ? (applyThemeCustomizations(themes[base], customizations) as HvTheme)\n : { ...themes[base] };\n\n // Set theme name\n customizedTheme.name = name.trim();\n\n // Fill new color modes with missing colors\n if (customizations) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!themes[base].colors.modes[mode]) {\n customizedTheme.colors.modes[mode] = {\n ...themes[base].colors.modes.dawn,\n ...(customizedTheme.colors.modes[mode] as Partial<\n HvThemeColorModeStructure & { [key: string]: string }\n >),\n };\n }\n });\n }\n\n // If the flag `inheritColorModes` is false and customizations were given for the color modes,\n // we're removing any color modes that might have been inherited\n if (!inheritColorModes && customizations.colors?.modes) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!Object.keys(customizations.colors?.modes || {}).includes(mode)) {\n delete customizedTheme.colors.modes[mode];\n }\n });\n }\n\n // Created theme\n return customizedTheme;\n};\n\n/**\n * Process the themes provided to the HvProvider:\n * - Cleans themes with the same name\n * - Returns the default if the list is empty (ds5)\n */\nexport const processThemes = (\n themesList?: (HvTheme | HvThemeStructure)[]\n): (HvTheme | HvThemeStructure)[] => {\n if (themesList && Array.isArray(themesList) && themesList.length > 0) {\n const list: (HvTheme | HvThemeStructure)[] = [];\n\n themesList.map((thm) => {\n const i: number = list.findIndex(\n (t) => t.name.trim() === thm.name.trim()\n );\n\n if (i !== -1) {\n list.splice(i, 1);\n list.push(thm);\n } else {\n list.push(thm);\n }\n });\n\n // Cleaned themes\n return list;\n } else {\n // DS5\n return [themes.ds5];\n }\n};\n"],"names":["setElementStyle","element","style","property","setElementAttrs","themeName","modeName","colorScheme","themeRootId","document","getElementById","body","setAttribute","backgroundColor","theme","colors","accentColor","secondary","color","fontSize","typography","fontWeight","lineHeight","letterSpacing","fontFamily","applyThemeCustomizations","obj","customizations","isObject","val","Array","isArray","customizedTheme","Object","keys","forEach","key","createTheme","props","name","base","inheritColorModes","themes","trim","modes","mode","dawn","includes","processThemes","themesList","length","list","map","thm","i","findIndex","t","splice","push","ds5"],"mappings":";AAaA,MAAMA,kBAAkBA,CAACC,SAAsBC,UAAyB;AACtE,aAAWC,YAAYD,OAAO;AAC5BD,YAAQC,MAAMC,QAAQ,IAAID,MAAMC,QAAQ;AAAA,EAC1C;AACF;AAKO,MAAMC,kBAAkBA,CAC7BC,WACAC,UACAC,aACAC,gBACG;AACH,QAAMP,UAAUO,cACZC,SAASC,eAAeF,WAAW,IACnCC,SAASE;AAEb,MAAIV,SAAS;AACHW,YAAAA,aAAc,cAAaP,SAAS;AACpCO,YAAAA,aAAc,mBAAkBN,QAAQ;AAGhDN,oBAAgBC,SAAS;AAAA,MACvBM;AAAAA,MACAM,iBAAiBC,MAAMC,OAAOF;AAAAA,MAC9BG,aAAaF,MAAMC,OAAOE;AAAAA,MAC1BC,OAAOJ,MAAMC,OAAOE;AAAAA,MACpBE,UAAUL,MAAMM,WAAWT,KAAKQ;AAAAA,MAChCE,YAAYP,MAAMM,WAAWT,KAAKU;AAAAA,MAClCC,YAAYR,MAAMM,WAAWT,KAAKW;AAAAA,MAClCC,eAAeT,MAAMM,WAAWT,KAAKY;AAAAA,MACrCC,YAAYV,MAAMU,WAAWb;AAAAA,IAAAA,CAC9B;AAAA,EACH;AACF;AAKA,MAAMc,2BAA2BA,CAACC,KAAaC,mBAA2B;AAClEC,QAAAA,WAAW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