@hitachivantara/uikit-react-core 5.27.1 → 5.27.3
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.map +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.styles.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/AppSwitcher.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/AppSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/Badge/Badge.cjs.map +1 -1
- package/dist/cjs/components/Banner/Banner.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseDropdown/BaseDropdown.cjs.map +1 -1
- package/dist/cjs/components/BaseDropdown/BaseDropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.cjs.map +1 -1
- package/dist/cjs/components/BaseInput/BaseInput.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/BreadCrumb.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/BreadCrumb.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/Page/Page.styles.cjs.map +1 -1
- package/dist/cjs/components/BulkActions/BulkActions.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarWeekLabels/CalendarWeekLabels.cjs.map +1 -1
- package/dist/cjs/components/Calendar/SingleCalendar/CalendarCell.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/SingleCalendar/SingleCalendar.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/utils.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Content/Content.styles.cjs.map +1 -1
- package/dist/cjs/components/Card/Header/Header.styles.cjs.map +1 -1
- package/dist/cjs/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/cjs/components/Carousel/CarouselControls.cjs.map +1 -1
- package/dist/cjs/components/Carousel/CarouselSlide/CarouselSlide.cjs.map +1 -1
- package/dist/cjs/components/Carousel/CarouselThumbnails.cjs.map +1 -1
- package/dist/cjs/components/CheckBox/CheckBox.styles.cjs.map +1 -1
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.cjs.map +1 -1
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/ColorPicker/Fields/Fields.cjs.map +1 -1
- package/dist/cjs/components/ColorPicker/PresetColors/PresetColors.cjs.map +1 -1
- package/dist/cjs/components/ColorPicker/SavedColors/SavedColors.cjs.map +1 -1
- package/dist/cjs/components/Container/Container.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/DatePicker.styles.cjs.map +1 -1
- package/dist/cjs/components/DatePicker/utils.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Actions/Actions.styles.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Content/Content.styles.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Title/Title.styles.cjs.map +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/cjs/components/Dropdown/List/List.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/DropZone/DropZone.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/DropZone/DropZone.styles.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/File/File.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/File/File.styles.cjs.map +1 -1
- package/dist/cjs/components/FileUploader/FileList/FileList.styles.cjs.map +1 -1
- package/dist/cjs/components/FilterGroup/Counter/Counter.cjs.map +1 -1
- package/dist/cjs/components/FilterGroup/FilterContent/FilterContent.styles.cjs.map +1 -1
- package/dist/cjs/components/FilterGroup/RightPanel/RightPanel.cjs.map +1 -1
- package/dist/cjs/components/Footer/Footer.cjs.map +1 -1
- package/dist/cjs/components/Footer/Footer.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/CharCounter/CharCounter.cjs.map +1 -1
- package/dist/cjs/components/Forms/InfoMessage/InfoMessage.styles.cjs.map +1 -1
- package/dist/cjs/components/Forms/WarningText/WarningText.styles.cjs.map +1 -1
- package/dist/cjs/components/GlobalActions/GlobalActions.cjs.map +1 -1
- package/dist/cjs/components/GlobalActions/GlobalActions.styles.cjs.map +1 -1
- package/dist/cjs/components/Header/Actions/Actions.styles.cjs.map +1 -1
- package/dist/cjs/components/Header/Header.styles.cjs.map +1 -1
- package/dist/cjs/components/Header/Navigation/MenuBar/Bar.styles.cjs.map +1 -1
- package/dist/cjs/components/Header/Navigation/MenuItem/MenuItem.styles.cjs.map +1 -1
- package/dist/cjs/components/InlineEditor/InlineEditor.styles.cjs.map +1 -1
- package/dist/cjs/components/Input/Input.styles.cjs.map +1 -1
- package/dist/cjs/components/List/List.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.styles.cjs.map +1 -1
- package/dist/cjs/components/Login/Login.cjs.map +1 -1
- package/dist/cjs/components/MultiButton/MultiButton.styles.cjs.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.styles.cjs.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/QueryBuilder.styles.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Rule.styles.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.styles.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Value/DateTimeValue/utils.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Value/NumericValue/Numeric.styles.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/Rule/Value/NumericValue/NumericValue.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/RuleGroup/RuleGroup.cjs.map +1 -1
- package/dist/cjs/components/Radio/Radio.styles.cjs.map +1 -1
- package/dist/cjs/components/RadioGroup/RadioGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.styles.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.styles.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/useScrollTo.cjs.map +1 -1
- package/dist/cjs/components/SelectionList/SelectionList.styles.cjs.map +1 -1
- package/dist/cjs/components/SimpleGrid/SimpleGrid.styles.cjs.map +1 -1
- package/dist/cjs/components/Slider/Slider.cjs.map +1 -1
- package/dist/cjs/components/Slider/Slider.styles.cjs.map +1 -1
- package/dist/cjs/components/Slider/SliderInput/SliderInput.cjs.map +1 -1
- package/dist/cjs/components/Slider/utils.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.styles.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContent/SnackbarContent.styles.cjs.map +1 -1
- package/dist/cjs/components/Switch/Switch.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/Table.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/TableBody/TableBody.cjs.map +1 -1
- package/dist/cjs/components/Table/TableCell/TableCell.cjs.map +1 -1
- package/dist/cjs/components/Table/TableCell/TableCell.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/TableHeader/TableHeader.cjs.map +1 -1
- package/dist/cjs/components/Table/TableHeader/TableHeader.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useHeaderGroups.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useSticky.cjs.map +1 -1
- package/dist/cjs/components/Table/utils/utils.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.styles.cjs.map +1 -1
- package/dist/cjs/components/Tag/Tag.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs.map +1 -1
- package/dist/cjs/components/TimeAgo/formatUtils.cjs.map +1 -1
- package/dist/cjs/components/TimePicker/TimePicker.styles.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/Typography/utils.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/VerticalNavigation.styles.cjs.map +1 -1
- package/dist/cjs/hooks/useControlled.cjs.map +1 -1
- package/dist/cjs/hooks/useCss.cjs.map +1 -1
- package/dist/cjs/utils/classes.cjs.map +1 -1
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.styles.js.map +1 -1
- package/dist/esm/components/AppSwitcher/AppSwitcher.js.map +1 -1
- package/dist/esm/components/AppSwitcher/AppSwitcher.styles.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/Banner/Banner.styles.js.map +1 -1
- package/dist/esm/components/BaseDropdown/BaseDropdown.js.map +1 -1
- package/dist/esm/components/BaseDropdown/BaseDropdown.styles.js.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.js.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/BreadCrumb.js.map +1 -1
- package/dist/esm/components/BreadCrumb/BreadCrumb.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/Page/Page.styles.js.map +1 -1
- package/dist/esm/components/BulkActions/BulkActions.js.map +1 -1
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/Button.styles.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarWeekLabels/CalendarWeekLabels.js.map +1 -1
- package/dist/esm/components/Calendar/SingleCalendar/CalendarCell.styles.js.map +1 -1
- package/dist/esm/components/Calendar/SingleCalendar/SingleCalendar.styles.js.map +1 -1
- package/dist/esm/components/Calendar/utils.js.map +1 -1
- package/dist/esm/components/Card/Card.styles.js.map +1 -1
- package/dist/esm/components/Card/Content/Content.styles.js.map +1 -1
- package/dist/esm/components/Card/Header/Header.styles.js.map +1 -1
- package/dist/esm/components/Carousel/Carousel.js.map +1 -1
- package/dist/esm/components/Carousel/CarouselControls.js.map +1 -1
- package/dist/esm/components/Carousel/CarouselSlide/CarouselSlide.js.map +1 -1
- package/dist/esm/components/Carousel/CarouselThumbnails.js.map +1 -1
- package/dist/esm/components/CheckBox/CheckBox.styles.js.map +1 -1
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.styles.js.map +1 -1
- package/dist/esm/components/ColorPicker/Fields/Fields.js.map +1 -1
- package/dist/esm/components/ColorPicker/PresetColors/PresetColors.js.map +1 -1
- package/dist/esm/components/ColorPicker/SavedColors/SavedColors.js.map +1 -1
- package/dist/esm/components/Container/Container.js.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.styles.js.map +1 -1
- package/dist/esm/components/DatePicker/utils.js.map +1 -1
- package/dist/esm/components/Dialog/Actions/Actions.styles.js.map +1 -1
- package/dist/esm/components/Dialog/Content/Content.styles.js.map +1 -1
- package/dist/esm/components/Dialog/Title/Title.styles.js.map +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/Dropdown/List/List.js.map +1 -1
- package/dist/esm/components/FileUploader/DropZone/DropZone.js.map +1 -1
- package/dist/esm/components/FileUploader/DropZone/DropZone.styles.js.map +1 -1
- package/dist/esm/components/FileUploader/File/File.js.map +1 -1
- package/dist/esm/components/FileUploader/File/File.styles.js.map +1 -1
- package/dist/esm/components/FileUploader/FileList/FileList.styles.js.map +1 -1
- package/dist/esm/components/FilterGroup/Counter/Counter.js.map +1 -1
- package/dist/esm/components/FilterGroup/FilterContent/FilterContent.styles.js.map +1 -1
- package/dist/esm/components/FilterGroup/RightPanel/RightPanel.js.map +1 -1
- package/dist/esm/components/Footer/Footer.js.map +1 -1
- package/dist/esm/components/Footer/Footer.styles.js.map +1 -1
- package/dist/esm/components/Forms/CharCounter/CharCounter.js.map +1 -1
- package/dist/esm/components/Forms/InfoMessage/InfoMessage.styles.js.map +1 -1
- package/dist/esm/components/Forms/WarningText/WarningText.styles.js.map +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.js.map +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.styles.js.map +1 -1
- package/dist/esm/components/Header/Actions/Actions.styles.js.map +1 -1
- package/dist/esm/components/Header/Header.styles.js.map +1 -1
- package/dist/esm/components/Header/Navigation/MenuBar/Bar.styles.js.map +1 -1
- package/dist/esm/components/Header/Navigation/MenuItem/MenuItem.styles.js.map +1 -1
- package/dist/esm/components/InlineEditor/InlineEditor.styles.js.map +1 -1
- package/dist/esm/components/Input/Input.styles.js.map +1 -1
- package/dist/esm/components/List/List.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/components/Loading/Loading.js.map +1 -1
- package/dist/esm/components/Loading/Loading.styles.js.map +1 -1
- package/dist/esm/components/Login/Login.js.map +1 -1
- package/dist/esm/components/MultiButton/MultiButton.styles.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.styles.js.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/esm/components/QueryBuilder/QueryBuilder.styles.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Rule.styles.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.styles.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Value/DateTimeValue/utils.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Value/NumericValue/Numeric.styles.js.map +1 -1
- package/dist/esm/components/QueryBuilder/Rule/Value/NumericValue/NumericValue.js.map +1 -1
- package/dist/esm/components/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
- package/dist/esm/components/Radio/Radio.styles.js.map +1 -1
- package/dist/esm/components/RadioGroup/RadioGroup.styles.js.map +1 -1
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.styles.js.map +1 -1
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.styles.js.map +1 -1
- package/dist/esm/components/ScrollTo/useScrollTo.js.map +1 -1
- package/dist/esm/components/SelectionList/SelectionList.styles.js.map +1 -1
- package/dist/esm/components/SimpleGrid/SimpleGrid.styles.js.map +1 -1
- package/dist/esm/components/Slider/Slider.js.map +1 -1
- package/dist/esm/components/Slider/Slider.styles.js.map +1 -1
- package/dist/esm/components/Slider/SliderInput/SliderInput.js.map +1 -1
- package/dist/esm/components/Slider/utils.js.map +1 -1
- package/dist/esm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/components/Snackbar/Snackbar.styles.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
- package/dist/esm/components/Switch/Switch.styles.js.map +1 -1
- package/dist/esm/components/Table/Table.styles.js.map +1 -1
- package/dist/esm/components/Table/TableBody/TableBody.js.map +1 -1
- package/dist/esm/components/Table/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/Table/TableCell/TableCell.styles.js.map +1 -1
- package/dist/esm/components/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/esm/components/Table/TableHeader/TableHeader.styles.js.map +1 -1
- package/dist/esm/components/Table/hooks/useHeaderGroups.js.map +1 -1
- package/dist/esm/components/Table/hooks/useSticky.js.map +1 -1
- package/dist/esm/components/Table/utils/utils.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.styles.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.styles.js.map +1 -1
- package/dist/esm/components/TimeAgo/formatUtils.js.map +1 -1
- package/dist/esm/components/TimePicker/TimePicker.styles.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/esm/components/Typography/utils.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/VerticalNavigation.styles.js.map +1 -1
- package/dist/esm/hooks/useControlled.js.map +1 -1
- package/dist/esm/hooks/useCss.js.map +1 -1
- package/dist/esm/utils/classes.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadCrumb.styles.cjs","sources":["../../../../src/components/BreadCrumb/BreadCrumb.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBreadCrumb\", {\n root: { display: \"flex\", alignItems: \"center\", zIndex: 0 },\n link: {},\n orderedList: {\n display: \"flex\",\n paddingLeft: 0,\n marginLeft: `-${theme.space.xs}`,\n },\n currentPage: { padding: `8px ${theme.space.xs}` },\n centerContainer: {},\n separatorContainer: {},\n a: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","alignItems","zIndex","link","orderedList","paddingLeft","marginLeft","theme","space","xs","currentPage","padding","centerContainer","separatorContainer","a"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IAAEC,SAAS;AAAA,IAAQC,YAAY;AAAA,IAAUC,QAAQ;AAAA,EAAE;AAAA,EACzDC,MAAM,CAAC;AAAA,EACPC,aAAa;AAAA,IACXJ,SAAS;AAAA,IACTK,aAAa;AAAA,IACbC,YAAa,IAAGC,
|
|
1
|
+
{"version":3,"file":"BreadCrumb.styles.cjs","sources":["../../../../src/components/BreadCrumb/BreadCrumb.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBreadCrumb\", {\n root: { display: \"flex\", alignItems: \"center\", zIndex: 0 },\n link: {},\n orderedList: {\n display: \"flex\",\n paddingLeft: 0,\n marginLeft: `-${theme.space.xs}`,\n },\n currentPage: { padding: `8px ${theme.space.xs}` },\n centerContainer: {},\n separatorContainer: {},\n a: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","alignItems","zIndex","link","orderedList","paddingLeft","marginLeft","theme","space","xs","currentPage","padding","centerContainer","separatorContainer","a"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IAAEC,SAAS;AAAA,IAAQC,YAAY;AAAA,IAAUC,QAAQ;AAAA,EAAE;AAAA,EACzDC,MAAM,CAAC;AAAA,EACPC,aAAa;AAAA,IACXJ,SAAS;AAAA,IACTK,aAAa;AAAA,IACbC,YAAa,IAAGC,YAAMC,MAAAA,MAAMC,EAAG;AAAA,EACjC;AAAA,EACAC,aAAa;AAAA,IAAEC,SAAU,OAAMJ,YAAMC,MAAAA,MAAMC,EAAG;AAAA,EAAE;AAAA,EAChDG,iBAAiB,CAAC;AAAA,EAClBC,oBAAoB,CAAC;AAAA,EACrBC,GAAG,CAAC;AACN,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.styles.cjs","sources":["../../../../../src/components/BreadCrumb/Page/Page.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvPage\", {\n link: {\n padding: `8px ${theme.space.xs}`,\n borderRadius: theme.radii.base,\n maxWidth: 170 + 16,\n textTransform: \"capitalize\",\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: theme.colors.atmo3,\n },\n \"&:focus\": {\n backgroundColor: theme.colors.atmo3,\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n },\n label: {},\n a: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","link","padding","theme","space","xs","borderRadius","radii","base","maxWidth","textTransform","cursor","backgroundColor","colors","atmo3","outlineStyles","label","a"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,UAAU;AAAA,EACnEC,MAAM;AAAA,IACJC,SAAU,OAAMC,
|
|
1
|
+
{"version":3,"file":"Page.styles.cjs","sources":["../../../../../src/components/BreadCrumb/Page/Page.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvPage\", {\n link: {\n padding: `8px ${theme.space.xs}`,\n borderRadius: theme.radii.base,\n maxWidth: 170 + 16,\n textTransform: \"capitalize\",\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: theme.colors.atmo3,\n },\n \"&:focus\": {\n backgroundColor: theme.colors.atmo3,\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n },\n label: {},\n a: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","link","padding","theme","space","xs","borderRadius","radii","base","maxWidth","textTransform","cursor","backgroundColor","colors","atmo3","outlineStyles","label","a"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,UAAU;AAAA,EACnEC,MAAM;AAAA,IACJC,SAAU,OAAMC,YAAMC,MAAAA,MAAMC,EAAG;AAAA,IAC/BC,cAAcH,YAAAA,MAAMI,MAAMC;AAAAA,IAC1BC,UAAU,MAAM;AAAA,IAChBC,eAAe;AAAA,IACf,WAAW;AAAA,MACTC,QAAQ;AAAA,MACRC,iBAAiBT,YAAAA,MAAMU,OAAOC;AAAAA,IAChC;AAAA,IACA,WAAW;AAAA,MACTF,iBAAiBT,YAAAA,MAAMU,OAAOC;AAAAA,IAChC;AAAA,IACA,mBAAmB;AAAA,MACjB,GAAGC,WAAAA;AAAAA,IACL;AAAA,EACF;AAAA,EACAC,OAAO,CAAC;AAAA,EACRC,GAAG,CAAC;AACN,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkActions.cjs","sources":["../../../../src/components/BulkActions/BulkActions.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { setId } from \"@core/utils/setId\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport {\n HvButton,\n HvButtonProps,\n HvButtonVariant,\n} from \"@core/components/Button\";\nimport { HvCheckBox, HvCheckBoxProps } from \"@core/components/CheckBox\";\nimport {\n HvActionGeneric,\n HvActionsGeneric,\n HvActionsGenericProps,\n} from \"@core/components/ActionsGeneric\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport { staticClasses, useClasses } from \"./BulkActions.styles\";\n\nexport { staticClasses as bulkActionsClasses };\n\nexport type HvBulkActionsClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBulkActionsProps extends HvBaseProps {\n /**\n * Custom label for select all checkbox\n */\n selectAllLabel?: React.ReactNode;\n /**\n * Custom label for select all checkbox conjunction\n */\n selectAllConjunctionLabel?: string;\n /**\n * Custom label for select all pages button\n */\n selectAllPagesLabel?: React.ReactNode;\n /**\n * Whether select all pages element should be visible\n */\n showSelectAllPages?: boolean;\n /**\n * The total number of elements\n */\n numTotal?: number;\n /**\n * The number of elements currently selected\n */\n numSelected?: number;\n /**\n * Function called when the \"select all\" Checkbox is toggled.\n */\n onSelectAll?: HvCheckBoxProps[\"onChange\"];\n /**\n * Function called when the \"select all pages\" button is clicked toggled.\n */\n onSelectAllPages?: HvButtonProps[\"onClick\"];\n /**\n * Whether the bulk actions should use the semantic styles when there are selected elements.\n */\n semantic?: boolean;\n /**\n * The renderable content inside the right actions slot,\n * or an Array of actions `{ id, label, icon, disabled, ... }`\n */\n actions?: React.ReactNode | HvActionGeneric[];\n /**\n * Whether actions should be all disabled\n */\n actionsDisabled?: boolean;\n /**\n * The callback function ran when an action is triggered, receiving `action` as param\n */\n actionsCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /**\n * The number of maximum visible actions before they're collapsed into a `DropDownMenu`.\n */\n maxVisibleActions?: number;\n /**\n * Properties to be passed onto the checkbox component, the values of the object are equivalent to the\n * HvCheckbox API.\n */\n checkboxProps?: HvCheckBoxProps;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBulkActionsClasses;\n}\n\n/**\n * Bulk Actions allow users to perform an action on a single or multiple items.\n * Also known as \"batch production\" of multiple items at once, one stage at a time.\n */\nexport const HvBulkActions = (props: HvBulkActionsProps) => {\n const {\n id,\n className,\n classes: classesProp,\n selectAllPagesLabel,\n actionsDisabled,\n maxVisibleActions,\n checkboxProps,\n actions,\n numTotal = 0,\n numSelected = 0,\n selectAllLabel = \"All\",\n selectAllConjunctionLabel = \"/\",\n showSelectAllPages = false,\n semantic = true,\n actionsCallback,\n onSelectAll,\n onSelectAllPages,\n ...others\n } = useDefaultProps(\"HvBulkActions\", props);\n\n const { classes, cx, css } = useClasses(classesProp);\n\n const { activeTheme, colors } = useTheme();\n\n const baseColor = colors?.base_light || theme.colors.base_light;\n const anySelected = numSelected > 0;\n const isSemantic = semantic && anySelected;\n\n const selectAllLabelComponent = (\n <HvTypography\n component=\"span\"\n disabled={checkboxProps?.disabled}\n variant=\"body\"\n >\n {!anySelected ? (\n <>\n <HvTypography variant=\"label\">{selectAllLabel}</HvTypography>\n {` (${numTotal})`}\n </>\n ) : (\n <>\n <HvTypography variant=\"label\">{numSelected}</HvTypography>\n {` ${selectAllConjunctionLabel} ${numTotal}`}\n </>\n )}\n </HvTypography>\n );\n\n return (\n <div\n id={id}\n className={cx(\n classes.root,\n { [classes.semantic]: isSemantic },\n isSemantic &&\n css({\n [`& .${staticClasses.selectAll} div`]: {\n color: theme.bulkActions.semanticColor,\n\n \"&:hover:not(:disabled)\": {\n backgroundColor: hexToRgbA(baseColor, 0.3),\n },\n\n \"& *\": {\n color: theme.bulkActions.semanticColor,\n backgroundColor: \"transparent\",\n },\n },\n\n [`& .${staticClasses.selectAll}:focus-within div`]: {\n backgroundColor: hexToRgbA(baseColor, 0.3),\n },\n }),\n className\n )}\n {...others}\n >\n <div className={classes.selectAllContainer}>\n <HvCheckBox\n id={setId(id, \"select\")}\n className={classes.selectAll}\n checked={numSelected > 0}\n semantic={isSemantic}\n onChange={onSelectAll}\n indeterminate={numSelected > 0 && numSelected < numTotal}\n label={selectAllLabelComponent}\n {...checkboxProps}\n />\n {showSelectAllPages && anySelected && numSelected < numTotal && (\n <>\n <div className={classes.divider} />\n <HvButton\n id={setId(id, \"pages\")}\n className={classes.selectAllPages}\n variant={\n isSemantic\n ? (activeTheme?.bulkActions\n .actionButtonVariant as HvButtonVariant)\n : \"secondaryGhost\"\n }\n onClick={onSelectAllPages}\n >\n {selectAllPagesLabel ?? `Select all ${numTotal} items`}\n </HvButton>\n </>\n )}\n </div>\n <HvActionsGeneric\n id={setId(id, \"actions\")}\n classes={{ root: classes.actions }}\n category={\n isSemantic\n ? (activeTheme?.bulkActions.actionButtonVariant as HvButtonVariant)\n : \"secondaryGhost\"\n }\n actions={actions}\n disabled={actionsDisabled ?? numSelected === 0}\n actionsCallback={actionsCallback}\n maxVisibleActions={maxVisibleActions}\n />\n </div>\n );\n};\n"],"names":["HvBulkActions","props","id","className","classes","classesProp","selectAllPagesLabel","actionsDisabled","maxVisibleActions","checkboxProps","actions","numTotal","numSelected","selectAllLabel","selectAllConjunctionLabel","showSelectAllPages","semantic","actionsCallback","onSelectAll","onSelectAllPages","others","useDefaultProps","cx","css","useClasses","activeTheme","colors","useTheme","baseColor","base_light","theme","anySelected","isSemantic","selectAllLabelComponent","HvTypography","component","disabled","variant","children","_jsxs","_Fragment","_jsx","root","staticClasses","selectAll","color","bulkActions","semanticColor","backgroundColor","hexToRgbA","selectAllContainer","HvCheckBox","setId","checked","onChange","indeterminate","label","divider","HvButton","selectAllPages","actionButtonVariant","onClick","HvActionsGeneric","category"],"mappings":";;;;;;;;;;;;;AAgGaA,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,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A,IAACqB,iCAAgB;AAAA,MACf5D,IAAIkD,MAAAA,MAAMlD,IAAI,SAAS;AAAA,MACvBE,SAAS;AAAA,QAAEsC,MAAMtC,QAAQM;AAAAA,MAAQ;AAAA,MACjCqD,UACE/B,aACKP,2CAAaqB,YAAYc,sBAC1B;AAAA,MAENlD;AAAAA,MACA0B,UAAU7B,mBAAmBK,gBAAgB;AAAA,MAC7CK;AAAAA,MACAT;AAAAA,IAAAA,CACD,CAAC;AAAA,EAAA,CACC;AAET;;;"}
|
|
1
|
+
{"version":3,"file":"BulkActions.cjs","sources":["../../../../src/components/BulkActions/BulkActions.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { setId } from \"@core/utils/setId\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport {\n HvButton,\n HvButtonProps,\n HvButtonVariant,\n} from \"@core/components/Button\";\nimport { HvCheckBox, HvCheckBoxProps } from \"@core/components/CheckBox\";\nimport {\n HvActionGeneric,\n HvActionsGeneric,\n HvActionsGenericProps,\n} from \"@core/components/ActionsGeneric\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { hexToRgbA } from \"@core/utils/hexToRgbA\";\n\nimport { staticClasses, useClasses } from \"./BulkActions.styles\";\n\nexport { staticClasses as bulkActionsClasses };\n\nexport type HvBulkActionsClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBulkActionsProps extends HvBaseProps {\n /**\n * Custom label for select all checkbox\n */\n selectAllLabel?: React.ReactNode;\n /**\n * Custom label for select all checkbox conjunction\n */\n selectAllConjunctionLabel?: string;\n /**\n * Custom label for select all pages button\n */\n selectAllPagesLabel?: React.ReactNode;\n /**\n * Whether select all pages element should be visible\n */\n showSelectAllPages?: boolean;\n /**\n * The total number of elements\n */\n numTotal?: number;\n /**\n * The number of elements currently selected\n */\n numSelected?: number;\n /**\n * Function called when the \"select all\" Checkbox is toggled.\n */\n onSelectAll?: HvCheckBoxProps[\"onChange\"];\n /**\n * Function called when the \"select all pages\" button is clicked toggled.\n */\n onSelectAllPages?: HvButtonProps[\"onClick\"];\n /**\n * Whether the bulk actions should use the semantic styles when there are selected elements.\n */\n semantic?: boolean;\n /**\n * The renderable content inside the right actions slot,\n * or an Array of actions `{ id, label, icon, disabled, ... }`\n */\n actions?: React.ReactNode | HvActionGeneric[];\n /**\n * Whether actions should be all disabled\n */\n actionsDisabled?: boolean;\n /**\n * The callback function ran when an action is triggered, receiving `action` as param\n */\n actionsCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /**\n * The number of maximum visible actions before they're collapsed into a `DropDownMenu`.\n */\n maxVisibleActions?: number;\n /**\n * Properties to be passed onto the checkbox component, the values of the object are equivalent to the\n * HvCheckbox API.\n */\n checkboxProps?: HvCheckBoxProps;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBulkActionsClasses;\n}\n\n/**\n * Bulk Actions allow users to perform an action on a single or multiple items.\n * Also known as \"batch production\" of multiple items at once, one stage at a time.\n */\nexport const HvBulkActions = (props: HvBulkActionsProps) => {\n const {\n id,\n className,\n classes: classesProp,\n selectAllPagesLabel,\n actionsDisabled,\n maxVisibleActions,\n checkboxProps,\n actions,\n numTotal = 0,\n numSelected = 0,\n selectAllLabel = \"All\",\n selectAllConjunctionLabel = \"/\",\n showSelectAllPages = false,\n semantic = true,\n actionsCallback,\n onSelectAll,\n onSelectAllPages,\n ...others\n } = useDefaultProps(\"HvBulkActions\", props);\n\n const { classes, cx, css } = useClasses(classesProp);\n\n const { activeTheme, colors } = useTheme();\n\n const baseColor = colors?.base_light || theme.colors.base_light;\n const anySelected = numSelected > 0;\n const isSemantic = semantic && anySelected;\n\n const selectAllLabelComponent = (\n <HvTypography\n component=\"span\"\n disabled={checkboxProps?.disabled}\n variant=\"body\"\n >\n {!anySelected ? (\n <>\n <HvTypography variant=\"label\">{selectAllLabel}</HvTypography>\n {` (${numTotal})`}\n </>\n ) : (\n <>\n <HvTypography variant=\"label\">{numSelected}</HvTypography>\n {` ${selectAllConjunctionLabel} ${numTotal}`}\n </>\n )}\n </HvTypography>\n );\n\n return (\n <div\n id={id}\n className={cx(\n classes.root,\n { [classes.semantic]: isSemantic },\n isSemantic &&\n css({\n [`& .${staticClasses.selectAll} div`]: {\n color: theme.bulkActions.semanticColor,\n\n \"&:hover:not(:disabled)\": {\n backgroundColor: hexToRgbA(baseColor, 0.3),\n },\n\n \"& *\": {\n color: theme.bulkActions.semanticColor,\n backgroundColor: \"transparent\",\n },\n },\n\n [`& .${staticClasses.selectAll}:focus-within div`]: {\n backgroundColor: hexToRgbA(baseColor, 0.3),\n },\n }),\n className\n )}\n {...others}\n >\n <div className={classes.selectAllContainer}>\n <HvCheckBox\n id={setId(id, \"select\")}\n className={classes.selectAll}\n checked={numSelected > 0}\n semantic={isSemantic}\n onChange={onSelectAll}\n indeterminate={numSelected > 0 && numSelected < numTotal}\n label={selectAllLabelComponent}\n {...checkboxProps}\n />\n {showSelectAllPages && anySelected && numSelected < numTotal && (\n <>\n <div className={classes.divider} />\n <HvButton\n id={setId(id, \"pages\")}\n className={classes.selectAllPages}\n variant={\n isSemantic\n ? (activeTheme?.bulkActions\n .actionButtonVariant as HvButtonVariant)\n : \"secondaryGhost\"\n }\n onClick={onSelectAllPages}\n >\n {selectAllPagesLabel ?? `Select all ${numTotal} items`}\n </HvButton>\n </>\n )}\n </div>\n <HvActionsGeneric\n id={setId(id, \"actions\")}\n classes={{ root: classes.actions }}\n category={\n isSemantic\n ? (activeTheme?.bulkActions.actionButtonVariant as HvButtonVariant)\n : \"secondaryGhost\"\n }\n actions={actions}\n disabled={actionsDisabled ?? numSelected === 0}\n actionsCallback={actionsCallback}\n maxVisibleActions={maxVisibleActions}\n />\n </div>\n );\n};\n"],"names":["HvBulkActions","props","id","className","classes","classesProp","selectAllPagesLabel","actionsDisabled","maxVisibleActions","checkboxProps","actions","numTotal","numSelected","selectAllLabel","selectAllConjunctionLabel","showSelectAllPages","semantic","actionsCallback","onSelectAll","onSelectAllPages","others","useDefaultProps","cx","css","useClasses","activeTheme","colors","useTheme","baseColor","base_light","theme","anySelected","isSemantic","selectAllLabelComponent","HvTypography","component","disabled","variant","children","_jsxs","_Fragment","_jsx","root","staticClasses","selectAll","color","bulkActions","semanticColor","backgroundColor","hexToRgbA","selectAllContainer","HvCheckBox","setId","checked","onChange","indeterminate","label","divider","HvButton","selectAllPages","actionButtonVariant","onClick","HvActionsGeneric","category"],"mappings":";;;;;;;;;;;;;AAgGaA,MAAAA,gBAAgBA,CAACC,UAA8B;AACpD,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,WAAW;AAAA,IACXC,cAAc;AAAA,IACdC,iBAAiB;AAAA,IACjBC,4BAA4B;AAAA,IAC5BC,qBAAqB;AAAA,IACrBC,WAAW;AAAA,IACXC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,gBAAA,iBAAiBpB,KAAK;AAEpC,QAAA;AAAA,IAAEG;AAAAA,IAASkB;AAAAA,IAAIC;AAAAA,EAAAA,IAAQC,mBAAAA,WAAWnB,WAAW;AAE7C,QAAA;AAAA,IAAEoB;AAAAA,IAAaC;AAAAA,MAAWC,SAAS,SAAA;AAEzC,QAAMC,aAAYF,iCAAQG,eAAcC,YAAAA,MAAMJ,OAAOG;AACrD,QAAME,cAAcnB,cAAc;AAClC,QAAMoB,aAAahB,YAAYe;AAEzBE,QAAAA,yDACHC,yBAAY;AAAA,IACXC,WAAU;AAAA,IACVC,UAAU3B,+CAAe2B;AAAAA,IACzBC,SAAQ;AAAA,IAAMC,UAEb,CAACP,cACAQ,2BAAAA,KAAAC,qBAAA;AAAA,MAAAF,UAAA,CACEG,2B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AAUpC;AAAAA,QACVqC,eAAe3C,cAAc,KAAKA,cAAcD;AAAAA,QAChD6C,OAAOvB;AAAAA,QAAwB,GAC3BxB;AAAAA,MAAAA,CACL,GACAM,sBAAsBgB,eAAenB,cAAcD,4CAClD6B,qBAAA;AAAA,QAAAF,WACEG,2BAAAA,IAAA,OAAA;AAAA,UAAKtC,WAAWC,QAAQqD;AAAAA,QAAAA,CAAU,GAClChB,2BAAAA,IAACiB,iBAAQ;AAAA,UACPxD,IAAIkD,MAAAA,MAAMlD,IAAI,OAAO;AAAA,UACrBC,WAAWC,QAAQuD;AAAAA,UACnBtB,SACEL,aACKP,2CAAaqB,YACXc,sBACH;AAAA,UAENC,SAAS1C;AAAAA,UAAiBmB,UAEzBhC,uBAAwB,cAAaK,QAAS;AAAA,QAAA,CACvC,CAAC;AAAA,MAAA,CACX,CACH;AAAA,IAAA,CACE,GACL8B,2BAAAA,IAACqB,iCAAgB;AAAA,MACf5D,IAAIkD,MAAAA,MAAMlD,IAAI,SAAS;AAAA,MACvBE,SAAS;AAAA,QAAEsC,MAAMtC,QAAQM;AAAAA,MAAQ;AAAA,MACjCqD,UACE/B,aACKP,2CAAaqB,YAAYc,sBAC1B;AAAA,MAENlD;AAAAA,MACA0B,UAAU7B,mBAAmBK,gBAAgB;AAAA,MAC7CK;AAAAA,MACAT;AAAAA,IAAAA,CACD,CAAC;AAAA,EAAA,CACC;AAET;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement } from \"react\";\n\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { PolymorphicComponentRef, PolymorphicRef } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport {\n staticClasses as buttonClasses,\n getOverrideColors,\n getRadiusStyles,\n getSizeStyles,\n getVariantStyles,\n useClasses,\n} from \"./Button.styles\";\nimport { HvButtonRadius, HvButtonSize, HvButtonVariant } from \"./types\";\n\nexport { buttonClasses };\n\nexport type HvButtonClasses = ExtractNames<typeof useClasses>;\n\nexport type HvButtonProps<C extends React.ElementType = \"button\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Button. */\n variant?: HvButtonVariant;\n /** Whether the Button is an icon-only button. */\n icon?: boolean;\n /** Whether the Button is disabled or not. */\n disabled?: boolean;\n /** Class names to be applied. */\n className?: string;\n /** Element placed before the children. */\n startIcon?: ReactElement;\n /** Element placed after the children. */\n endIcon?: ReactElement;\n /** Button size. */\n size?: HvButtonSize;\n /** Button border radius. */\n radius?: HvButtonRadius;\n /** Defines the default colors of the button are forced into the icon. */\n overrideIconColors?: boolean;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvButtonClasses;\n /** Whether the Button is selected or not. */\n selected?: boolean;\n }\n >;\n\n/**\n * Normalize the button variant. It's meant to give us some retro-compatibility with\n * the DS 3.6 API.\n * @returns the normalized variant in DS 5 API\n */\nconst mapVariant = (\n variant: HvButtonVariant,\n theme?: string\n): HvButtonVariant => {\n if (theme === \"ds3\") return variant;\n\n const deprecatedVariantMap: Record<string, HvButtonVariant> = {\n secondary: \"secondarySubtle\",\n ghost: \"primaryGhost\",\n };\n\n const mappedVariant = deprecatedVariantMap[variant];\n\n if (mappedVariant) {\n // eslint-disable-next-line no-console\n console.warn(\n `Button variant '${variant}' is deprecated. Please use '${mappedVariant}'.`\n );\n }\n\n return mappedVariant || variant;\n};\n\n/**\n * Button component is used to trigger an action or event.\n */\nexport const HvButton: <C extends React.ElementType = \"button\">(\n props: HvButtonProps<C>\n) => React.ReactElement | null = forwardRef(\n <C extends React.ElementType = \"button\">(\n props: HvButtonProps<C>,\n ref: PolymorphicRef<C>\n ) => {\n const {\n id,\n classes: classesProp,\n children,\n variant: variantProp,\n disabled = false,\n className,\n startIcon,\n endIcon,\n icon = false,\n size,\n radius,\n overrideIconColors = true,\n component: Component = \"button\",\n ...others\n } = useDefaultProps(\"HvButton\", props);\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n const variant = mapVariant(\n variantProp ?? (icon ? \"secondaryGhost\" : \"primary\"),\n activeTheme?.name\n );\n\n return (\n <Component\n ref={ref}\n className={cx(\n classes.root,\n css(getVariantStyles(variant)),\n size && css(getSizeStyles(size)),\n radius && css(getRadiusStyles(radius)),\n overrideIconColors && css(getOverrideColors()),\n {\n [classes.icon]: icon,\n [classes.disabled]: disabled,\n },\n className\n )}\n {...(Component === \"button\" && { type: \"button\" })}\n {...(disabled && {\n disabled: true,\n tabIndex: -1,\n \"aria-disabled\": true,\n })}\n {...others}\n >\n {startIcon && <span className={classes.startIcon}>{startIcon}</span>}\n {children}\n {endIcon && <span className={classes.endIcon}>{endIcon}</span>}\n </Component>\n );\n }\n);\n"],"names":["mapVariant","variant","theme","deprecatedVariantMap","secondary","ghost","mappedVariant","warn","HvButton","forwardRef","props","ref","id","classes","classesProp","children","variantProp","disabled","className","startIcon","endIcon","icon","size","radius","overrideIconColors","component","Component","others","useDefaultProps","css","cx","useClasses","activeTheme","useTheme","name","root","getVariantStyles","getSizeStyles","getRadiusStyles","getOverrideColors","type","tabIndex","_jsx"],"mappings":";;;;;;;AAuDA,MAAMA,aAAaA,CACjBC,SACAC,UACoB;AACpB,MAAIA,UAAU;AAAcD,WAAAA;AAE5B,QAAME,uBAAwD;AAAA,IAC5DC,WAAW;AAAA,IACXC,OAAO;AAAA,EAAA;AAGHC,QAAAA,gBAAgBH,qBAAqBF,OAAO;AAElD,MAAIK,eAAe;
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement } from \"react\";\n\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { PolymorphicComponentRef, PolymorphicRef } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport {\n staticClasses as buttonClasses,\n getOverrideColors,\n getRadiusStyles,\n getSizeStyles,\n getVariantStyles,\n useClasses,\n} from \"./Button.styles\";\nimport { HvButtonRadius, HvButtonSize, HvButtonVariant } from \"./types\";\n\nexport { buttonClasses };\n\nexport type HvButtonClasses = ExtractNames<typeof useClasses>;\n\nexport type HvButtonProps<C extends React.ElementType = \"button\"> =\n PolymorphicComponentRef<\n C,\n {\n /** Use the variant prop to change the visual style of the Button. */\n variant?: HvButtonVariant;\n /** Whether the Button is an icon-only button. */\n icon?: boolean;\n /** Whether the Button is disabled or not. */\n disabled?: boolean;\n /** Class names to be applied. */\n className?: string;\n /** Element placed before the children. */\n startIcon?: ReactElement;\n /** Element placed after the children. */\n endIcon?: ReactElement;\n /** Button size. */\n size?: HvButtonSize;\n /** Button border radius. */\n radius?: HvButtonRadius;\n /** Defines the default colors of the button are forced into the icon. */\n overrideIconColors?: boolean;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvButtonClasses;\n /** Whether the Button is selected or not. */\n selected?: boolean;\n }\n >;\n\n/**\n * Normalize the button variant. It's meant to give us some retro-compatibility with\n * the DS 3.6 API.\n * @returns the normalized variant in DS 5 API\n */\nconst mapVariant = (\n variant: HvButtonVariant,\n theme?: string\n): HvButtonVariant => {\n if (theme === \"ds3\") return variant;\n\n const deprecatedVariantMap: Record<string, HvButtonVariant> = {\n secondary: \"secondarySubtle\",\n ghost: \"primaryGhost\",\n };\n\n const mappedVariant = deprecatedVariantMap[variant];\n\n if (mappedVariant) {\n // eslint-disable-next-line no-console\n console.warn(\n `Button variant '${variant}' is deprecated. Please use '${mappedVariant}'.`\n );\n }\n\n return mappedVariant || variant;\n};\n\n/**\n * Button component is used to trigger an action or event.\n */\nexport const HvButton: <C extends React.ElementType = \"button\">(\n props: HvButtonProps<C>\n) => React.ReactElement | null = forwardRef(\n <C extends React.ElementType = \"button\">(\n props: HvButtonProps<C>,\n ref: PolymorphicRef<C>\n ) => {\n const {\n id,\n classes: classesProp,\n children,\n variant: variantProp,\n disabled = false,\n className,\n startIcon,\n endIcon,\n icon = false,\n size,\n radius,\n overrideIconColors = true,\n component: Component = \"button\",\n ...others\n } = useDefaultProps(\"HvButton\", props);\n const { classes, css, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n const variant = mapVariant(\n variantProp ?? (icon ? \"secondaryGhost\" : \"primary\"),\n activeTheme?.name\n );\n\n return (\n <Component\n ref={ref}\n className={cx(\n classes.root,\n css(getVariantStyles(variant)),\n size && css(getSizeStyles(size)),\n radius && css(getRadiusStyles(radius)),\n overrideIconColors && css(getOverrideColors()),\n {\n [classes.icon]: icon,\n [classes.disabled]: disabled,\n },\n className\n )}\n {...(Component === \"button\" && { type: \"button\" })}\n {...(disabled && {\n disabled: true,\n tabIndex: -1,\n \"aria-disabled\": true,\n })}\n {...others}\n >\n {startIcon && <span className={classes.startIcon}>{startIcon}</span>}\n {children}\n {endIcon && <span className={classes.endIcon}>{endIcon}</span>}\n </Component>\n );\n }\n);\n"],"names":["mapVariant","variant","theme","deprecatedVariantMap","secondary","ghost","mappedVariant","console","warn","HvButton","forwardRef","props","ref","id","classes","classesProp","children","variantProp","disabled","className","startIcon","endIcon","icon","size","radius","overrideIconColors","component","Component","others","useDefaultProps","css","cx","useClasses","activeTheme","useTheme","name","root","getVariantStyles","getSizeStyles","getRadiusStyles","getOverrideColors","type","tabIndex","_jsx"],"mappings":";;;;;;;AAuDA,MAAMA,aAAaA,CACjBC,SACAC,UACoB;AACpB,MAAIA,UAAU;AAAcD,WAAAA;AAE5B,QAAME,uBAAwD;AAAA,IAC5DC,WAAW;AAAA,IACXC,OAAO;AAAA,EAAA;AAGHC,QAAAA,gBAAgBH,qBAAqBF,OAAO;AAElD,MAAIK,eAAe;AAEjBC,YAAQC,KACL,mBAAkBP,OAAQ,gCAA+BK,aAAc,IAC1E;AAAA,EACF;AAEA,SAAOA,iBAAiBL;AAC1B;AAKO,MAAMQ,WAEoBC,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AW,QAAA;AAAA,MAAMF,WAAWL,QAAQO;AAAAA,MAAQL,UAAEK;AAAAA,IAAAA,CAAc,CAAC;AAAA,EAAA,CACrD;AAEf,CACF;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.cjs","sources":["../../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\n\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nimport { HvButtonRadius, HvButtonSize, HvButtonVariant } from \"./types\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvButton\", {\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textTransform: \"none\",\n cursor: \"pointer\",\n minWidth: \"70px\",\n\n whiteSpace: \"nowrap\",\n\n \"&:hover\": {},\n \"&:focus\": {},\n \"&:focus-visible\": { ...outlineStyles },\n \"&:active\": {},\n\n // default button - no size specified\n fontFamily: theme.fontFamily.body,\n fontSize: theme.fontSizes.base,\n fontWeight: theme.fontWeights.semibold,\n lineHeight: \"11px\",\n letterSpacing: 0,\n height: \"32px\",\n borderRadius: theme.button.borderRadius,\n padding: theme.button.padding,\n },\n startIcon: {\n marginLeft: `calc(-1 * ${theme.space.xs})`,\n },\n endIcon: {\n marginRight: `calc(-1 * ${theme.space.xs})`,\n },\n focusVisible: {},\n\n disabled: {\n color: theme.colors.secondary_60,\n borderColor: theme.colors.atmo4,\n backgroundColor: theme.colors.atmo3,\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n },\n\n icon: {\n margin: 0,\n padding: 0,\n height: \"fit-content\",\n minWidth: \"unset\",\n },\n});\n\nexport const getVariantStyles = (variant: HvButtonVariant) => {\n const variantStyles: Record<HvButtonVariant, CSSInterpolation> = {\n primary: {\n color: theme.colors.atmo1,\n backgroundColor: theme.colors.primary,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.colors.primary_80,\n },\n },\n primarySubtle: {\n color: theme.colors.primary,\n backgroundColor: \"transparent\",\n border: `1px solid ${theme.colors.primary}`,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n },\n primaryGhost: {\n color: theme.colors.primary,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n \"&:disabled\": {\n backgroundColor: \"transparent\",\n },\n },\n secondarySubtle: {\n color: theme.colors.secondary,\n backgroundColor: theme.button.secondaryBackgroundColor,\n border: `1px solid ${theme.button.secondarySubtleBorderColor}`,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n },\n secondaryGhost: {\n color: theme.colors.secondary,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n \"&:disabled\": {\n backgroundColor: \"transparent\",\n },\n },\n semantic: {\n color: theme.colors.base_dark,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.semanticColor,\n },\n \"&:disabled\": {\n backgroundColor: theme.button.semanticColorDisabled,\n },\n },\n secondary: undefined,\n ghost: undefined,\n };\n\n return variantStyles[variant];\n};\n\nexport const getRadiusStyles = (radius: HvButtonRadius): CSSInterpolation => ({\n borderRadius: theme.radii[radius],\n});\n\nexport const getSizeStyles = (size: HvButtonSize): CSSInterpolation => ({\n height: theme.sizes[size],\n paddingLeft: theme.space[size],\n paddingRight: theme.space[size],\n fontSize: theme.fontSizes[size],\n});\n\nexport const getOverrideColors = (): CSSInterpolation => ({\n \"& svg .color0\": {\n fill: \"currentcolor\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","alignItems","justifyContent","textTransform","cursor","minWidth","whiteSpace","outlineStyles","fontFamily","theme","body","fontSize","fontSizes","base","fontWeight","fontWeights","semibold","lineHeight","letterSpacing","height","borderRadius","button","padding","startIcon","marginLeft","space","xs","endIcon","marginRight","focusVisible","disabled","color","colors","secondary_60","borderColor","atmo4","backgroundColor","atmo3","pointerEvents","icon","margin","getVariantStyles","variant","variantStyles","primary","atmo1","primary_80","primarySubtle","border","hoverColor","primaryGhost","secondarySubtle","secondary","secondaryBackgroundColor","secondarySubtleBorderColor","secondaryGhost","semantic","base_dark","semanticColor","semanticColorDisabled","undefined","ghost","getRadiusStyles","radius","radii","getSizeStyles","size","sizes","paddingLeft","paddingRight","getOverrideColors","fill"],"mappings":";;;;;AASa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,YAAY;AAAA,EACrEC,MAAM;AAAA,IACJC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,gBAAgB;AAAA,IAChBC,eAAe;AAAA,IACfC,QAAQ;AAAA,IACRC,UAAU;AAAA,IAEVC,YAAY;AAAA,IAEZ,WAAW,CAAC;AAAA,IACZ,WAAW,CAAC;AAAA,IACZ,mBAAmB;AAAA,MAAE,GAAGC,WAAAA;AAAAA,IAAc;AAAA,IACtC,YAAY,CAAC;AAAA;AAAA,IAGbC,YAAYC,YAAAA,MAAMD,WAAWE;AAAAA,IAC7BC,UAAUF,YAAAA,MAAMG,UAAUC;AAAAA,IAC1BC,YAAYL,YAAAA,MAAMM,YAAYC;AAAAA,IAC9BC,YAAY;AAAA,IACZC,eAAe;AAAA,IACfC,QAAQ;AAAA,IACRC,cAAcX,YAAAA,MAAMY,OAAOD;AAAAA,IAC3BE,SAASb,YAAAA,MAAMY,OAAOC;AAAAA,EACxB;AAAA,EACAC,WAAW;AAAA,IACTC,YAAa,aAAYf,YAAAA,MAAMgB,MAAMC;
|
|
1
|
+
{"version":3,"file":"Button.styles.cjs","sources":["../../../../src/components/Button/Button.styles.ts"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\n\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nimport { HvButtonRadius, HvButtonSize, HvButtonVariant } from \"./types\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvButton\", {\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n textTransform: \"none\",\n cursor: \"pointer\",\n minWidth: \"70px\",\n\n whiteSpace: \"nowrap\",\n\n \"&:hover\": {},\n \"&:focus\": {},\n \"&:focus-visible\": { ...outlineStyles },\n \"&:active\": {},\n\n // default button - no size specified\n fontFamily: theme.fontFamily.body,\n fontSize: theme.fontSizes.base,\n fontWeight: theme.fontWeights.semibold,\n lineHeight: \"11px\",\n letterSpacing: 0,\n height: \"32px\",\n borderRadius: theme.button.borderRadius,\n padding: theme.button.padding,\n },\n startIcon: {\n marginLeft: `calc(-1 * ${theme.space.xs})`,\n },\n endIcon: {\n marginRight: `calc(-1 * ${theme.space.xs})`,\n },\n focusVisible: {},\n\n disabled: {\n color: theme.colors.secondary_60,\n borderColor: theme.colors.atmo4,\n backgroundColor: theme.colors.atmo3,\n cursor: \"not-allowed\",\n pointerEvents: \"none\",\n },\n\n icon: {\n margin: 0,\n padding: 0,\n height: \"fit-content\",\n minWidth: \"unset\",\n },\n});\n\nexport const getVariantStyles = (variant: HvButtonVariant) => {\n const variantStyles: Record<HvButtonVariant, CSSInterpolation> = {\n primary: {\n color: theme.colors.atmo1,\n backgroundColor: theme.colors.primary,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.colors.primary_80,\n },\n },\n primarySubtle: {\n color: theme.colors.primary,\n backgroundColor: \"transparent\",\n border: `1px solid ${theme.colors.primary}`,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n },\n primaryGhost: {\n color: theme.colors.primary,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n \"&:disabled\": {\n backgroundColor: \"transparent\",\n },\n },\n secondarySubtle: {\n color: theme.colors.secondary,\n backgroundColor: theme.button.secondaryBackgroundColor,\n border: `1px solid ${theme.button.secondarySubtleBorderColor}`,\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n },\n secondaryGhost: {\n color: theme.colors.secondary,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.hoverColor,\n },\n \"&:disabled\": {\n backgroundColor: \"transparent\",\n },\n },\n semantic: {\n color: theme.colors.base_dark,\n backgroundColor: \"transparent\",\n \"&:hover, &:focus-visible\": {\n backgroundColor: theme.button.semanticColor,\n },\n \"&:disabled\": {\n backgroundColor: theme.button.semanticColorDisabled,\n },\n },\n secondary: undefined,\n ghost: undefined,\n };\n\n return variantStyles[variant];\n};\n\nexport const getRadiusStyles = (radius: HvButtonRadius): CSSInterpolation => ({\n borderRadius: theme.radii[radius],\n});\n\nexport const getSizeStyles = (size: HvButtonSize): CSSInterpolation => ({\n height: theme.sizes[size],\n paddingLeft: theme.space[size],\n paddingRight: theme.space[size],\n fontSize: theme.fontSizes[size],\n});\n\nexport const getOverrideColors = (): CSSInterpolation => ({\n \"& svg .color0\": {\n fill: \"currentcolor\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","alignItems","justifyContent","textTransform","cursor","minWidth","whiteSpace","outlineStyles","fontFamily","theme","body","fontSize","fontSizes","base","fontWeight","fontWeights","semibold","lineHeight","letterSpacing","height","borderRadius","button","padding","startIcon","marginLeft","space","xs","endIcon","marginRight","focusVisible","disabled","color","colors","secondary_60","borderColor","atmo4","backgroundColor","atmo3","pointerEvents","icon","margin","getVariantStyles","variant","variantStyles","primary","atmo1","primary_80","primarySubtle","border","hoverColor","primaryGhost","secondarySubtle","secondary","secondaryBackgroundColor","secondarySubtleBorderColor","secondaryGhost","semantic","base_dark","semanticColor","semanticColorDisabled","undefined","ghost","getRadiusStyles","radius","radii","getSizeStyles","size","sizes","paddingLeft","paddingRight","getOverrideColors","fill"],"mappings":";;;;;AASa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;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AAA,MACjB,4BAA4B;AAAA,QAC1BA,iBAAiB3B,YAAAA,MAAMY,OAAOqC;AAAAA,MAChC;AAAA,MACA,cAAc;AAAA,QACZtB,iBAAiB3B,YAAAA,MAAMY,OAAOsC;AAAAA,MAChC;AAAA,IACF;AAAA,IACAP,WAAWQ;AAAAA,IACXC,OAAOD;AAAAA,EAAAA;AAGT,SAAOjB,cAAcD,OAAO;AAC9B;AAEaoB,MAAAA,kBAAkBA,CAACC,YAA8C;AAAA,EAC5E3C,cAAcX,YAAAA,MAAMuD,MAAMD,MAAM;AAClC;AAEaE,MAAAA,gBAAgBA,CAACC,UAA0C;AAAA,EACtE/C,QAAQV,YAAAA,MAAM0D,MAAMD,IAAI;AAAA,EACxBE,aAAa3D,YAAAA,MAAMgB,MAAMyC,IAAI;AAAA,EAC7BG,cAAc5D,YAAAA,MAAMgB,MAAMyC,IAAI;AAAA,EAC9BvD,UAAUF,YAAAA,MAAMG,UAAUsD,IAAI;AAChC;AAEO,MAAMI,oBAAoBA,OAAyB;AAAA,EACxD,iBAAiB;AAAA,IACfC,MAAM;AAAA,EACR;AACF;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.styles.cjs","sources":["../../../../../src/components/Calendar/CalendarHeader/CalendarHeader.styles.tsx"],"sourcesContent":["import { createClasses } from \"@core/utils/classes\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCalendarHeader\", {\n root: {\n marginTop: theme.spacing(\"xs\"),\n backgroundColor: theme.colors.atmo1,\n borderBottom: theme.calendar.headerInputBorderBottom,\n borderTop: theme.calendar.headerInputBorderTop,\n borderLeft: theme.calendar.headerInputBorderLeft,\n borderRight: theme.calendar.headerInputBorderRight,\n borderRadius: theme.calendar.borderRadius,\n \"&:hover, &:focus\": {\n borderBottom: `1px solid ${theme.colors.secondary}`,\n },\n },\n invalid: {},\n headerDayOfWeek: {\n color: theme.calendar.headerInputFontColor,\n paddingLeft: theme.spacing(\"xs\"),\n },\n headerDate: {},\n input: {\n border: \"none\",\n backgroundColor: \"transparent\",\n padding: `5px ${theme.spacing(\"xs\")}`,\n fontFamily: theme.fontFamily.body,\n\n color: theme.calendar.headerInputFontColor,\n fontSize: theme.calendar.headerInputFontSize,\n letterSpacing: theme.calendar.headerInputFontLetterSpacing,\n lineHeight: theme.calendar.headerInputFontLineHeight,\n fontWeight: theme.calendar.headerInputFontWeight,\n width: \"100%\",\n \"&::placeholder\": {\n color: theme.colors.secondary_60,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n },\n inputBorderContainer: {\n backgroundColor: theme.colors.negative,\n height: 1,\n marginTop: -1,\n },\n invalidMessageStyling: {\n display: \"flex\",\n alignItems: \"center\",\n color: theme.colors.negative,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","marginTop","theme","spacing","backgroundColor","colors","atmo1","borderBottom","calendar","headerInputBorderBottom","borderTop","headerInputBorderTop","borderLeft","headerInputBorderLeft","borderRight","headerInputBorderRight","borderRadius","secondary","invalid","headerDayOfWeek","color","headerInputFontColor","paddingLeft","headerDate","input","border","padding","fontFamily","body","fontSize","headerInputFontSize","letterSpacing","headerInputFontLetterSpacing","lineHeight","headerInputFontLineHeight","fontWeight","headerInputFontWeight","width","secondary_60","outline","outlineStyles","inputBorderContainer","negative","height","invalidMessageStyling","display","alignItems"],"mappings":";;;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,oBAAoB;AAAA,EAC7EC,MAAM;AAAA,IACJC,WAAWC,YAAAA,MAAMC,QAAQ,IAAI;AAAA,IAC7BC,iBAAiBF,YAAAA,MAAMG,OAAOC;AAAAA,IAC9BC,cAAcL,YAAAA,MAAMM,SAASC;AAAAA,IAC7BC,WAAWR,YAAAA,MAAMM,SAASG;AAAAA,IAC1BC,YAAYV,YAAAA,MAAMM,SAASK;AAAAA,IAC3BC,aAAaZ,YAAAA,MAAMM,SAASO;AAAAA,IAC5BC,cAAcd,YAAAA,MAAMM,SAASQ;AAAAA,IAC7B,oBAAoB;AAAA,MAClBT,cAAe,aAAYL,
|
|
1
|
+
{"version":3,"file":"CalendarHeader.styles.cjs","sources":["../../../../../src/components/Calendar/CalendarHeader/CalendarHeader.styles.tsx"],"sourcesContent":["import { createClasses } from \"@core/utils/classes\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCalendarHeader\", {\n root: {\n marginTop: theme.spacing(\"xs\"),\n backgroundColor: theme.colors.atmo1,\n borderBottom: theme.calendar.headerInputBorderBottom,\n borderTop: theme.calendar.headerInputBorderTop,\n borderLeft: theme.calendar.headerInputBorderLeft,\n borderRight: theme.calendar.headerInputBorderRight,\n borderRadius: theme.calendar.borderRadius,\n \"&:hover, &:focus\": {\n borderBottom: `1px solid ${theme.colors.secondary}`,\n },\n },\n invalid: {},\n headerDayOfWeek: {\n color: theme.calendar.headerInputFontColor,\n paddingLeft: theme.spacing(\"xs\"),\n },\n headerDate: {},\n input: {\n border: \"none\",\n backgroundColor: \"transparent\",\n padding: `5px ${theme.spacing(\"xs\")}`,\n fontFamily: theme.fontFamily.body,\n\n color: theme.calendar.headerInputFontColor,\n fontSize: theme.calendar.headerInputFontSize,\n letterSpacing: theme.calendar.headerInputFontLetterSpacing,\n lineHeight: theme.calendar.headerInputFontLineHeight,\n fontWeight: theme.calendar.headerInputFontWeight,\n width: \"100%\",\n \"&::placeholder\": {\n color: theme.colors.secondary_60,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n },\n inputBorderContainer: {\n backgroundColor: theme.colors.negative,\n height: 1,\n marginTop: -1,\n },\n invalidMessageStyling: {\n display: \"flex\",\n alignItems: \"center\",\n color: theme.colors.negative,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","marginTop","theme","spacing","backgroundColor","colors","atmo1","borderBottom","calendar","headerInputBorderBottom","borderTop","headerInputBorderTop","borderLeft","headerInputBorderLeft","borderRight","headerInputBorderRight","borderRadius","secondary","invalid","headerDayOfWeek","color","headerInputFontColor","paddingLeft","headerDate","input","border","padding","fontFamily","body","fontSize","headerInputFontSize","letterSpacing","headerInputFontLetterSpacing","lineHeight","headerInputFontLineHeight","fontWeight","headerInputFontWeight","width","secondary_60","outline","outlineStyles","inputBorderContainer","negative","height","invalidMessageStyling","display","alignItems"],"mappings":";;;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,oBAAoB;AAAA,EAC7EC,MAAM;AAAA,IACJC,WAAWC,YAAAA,MAAMC,QAAQ,IAAI;AAAA,IAC7BC,iBAAiBF,YAAAA,MAAMG,OAAOC;AAAAA,IAC9BC,cAAcL,YAAAA,MAAMM,SAASC;AAAAA,IAC7BC,WAAWR,YAAAA,MAAMM,SAASG;AAAAA,IAC1BC,YAAYV,YAAAA,MAAMM,SAASK;AAAAA,IAC3BC,aAAaZ,YAAAA,MAAMM,SAASO;AAAAA,IAC5BC,cAAcd,YAAAA,MAAMM,SAASQ;AAAAA,IAC7B,oBAAoB;AAAA,MAClBT,cAAe,aAAYL,YAAMG,MAAAA,OAAOY,SAAU;AAAA,IACpD;AAAA,EACF;AAAA,EACAC,SAAS,CAAC;AAAA,EACVC,iBAAiB;AAAA,IACfC,OAAOlB,YAAAA,MAAMM,SAASa;AAAAA,IACtBC,aAAapB,YAAAA,MAAMC,QAAQ,IAAI;AAAA,EACjC;AAAA,EACAoB,YAAY,CAAC;AAAA,EACbC,OAAO;AAAA,IACLC,QAAQ;AAAA,IACRrB,iBAAiB;AAAA,IACjBsB,SAAU,OAAMxB,YAAAA,MAAMC,QAAQ,IAAI,CAAE;AAAA,IACpCwB,YAAYzB,YAAAA,MAAMyB,WAAWC;AAAAA,IAE7BR,OAAOlB,YAAAA,MAAMM,SAASa;AAAAA,IACtBQ,UAAU3B,YAAAA,MAAMM,SAASsB;AAAAA,IACzBC,eAAe7B,YAAAA,MAAMM,SAASwB;AAAAA,IAC9BC,YAAY/B,YAAAA,MAAMM,SAAS0B;AAAAA,IAC3BC,YAAYjC,YAAAA,MAAMM,SAAS4B;AAAAA,IAC3BC,OAAO;AAAA,IACP,kBAAkB;AAAA,MAChBjB,OAAOlB,YAAAA,MAAMG,OAAOiC;AAAAA,IACtB;AAAA,IACA,WAAW;AAAA,MACTC,SAAS;AAAA,IACX;AAAA,IACA,mBAAmB;AAAA,MACjB,GAAGC,WAAAA;AAAAA,IACL;AAAA,EACF;AAAA,EACAC,sBAAsB;AAAA,IACpBrC,iBAAiBF,YAAAA,MAAMG,OAAOqC;AAAAA,IAC9BC,QAAQ;AAAA,IACR1C,WAAW;AAAA,EACb;AAAA,EACA2C,uBAAuB;AAAA,IACrBC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZ1B,OAAOlB,YAAAA,MAAMG,OAAOqC;AAAAA,EACtB;AACF,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarWeekLabels.cjs","sources":["../../../../../src/components/Calendar/CalendarWeekLabels/CalendarWeekLabels.tsx"],"sourcesContent":["import { HvTypography } from \"@core/components/Typography\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./CalendarWeekLabels.styles\";\n\nexport { staticClasses as calendarWeekLabelsClasses };\n\nexport type HvCalendarWeekLabelsClasses = ExtractNames<typeof useClasses>;\n\nexport const HvCalendarWeekLabel = ({\n classes: classesProp,\n labels = [],\n}: HvCalendarWeekLabelProps) => {\n const { classes } = useClasses(classesProp);\n\n return (\n <>\n {\" \"}\n {labels.map((dayName, index) => {\n const key = `${dayName}-${index}`;\n return (\n <HvTypography\n variant=\"label\"\n className={classes.calendarDay}\n key={key}\n >\n {dayName}\n </HvTypography>\n );\n })}{\" \"}\n </>\n );\n};\n\nexport type HvCalendarWeekLabelProps = {\n /**\n * A Jss Object used to override or extend the component styles.\n */\n classes?: HvCalendarWeekLabelsClasses;\n /**\n * Localized day of week labels.\n */\n labels?: string[];\n};\n"],"names":["HvCalendarWeekLabel","classes","classesProp","labels","useClasses","_Fragment","children","map","dayName","index","key","HvTypography","variant","className","calendarDay"],"mappings":";;;;;AASO,MAAMA,sBAAsBA,CAAC;AAAA,EAClCC,SAASC;AAAAA,EACTC,SAAS,CAAA;AACe,MAAM;AACxB,QAAA;AAAA,IAAEF;AAAAA,EAAAA,IAAYG,0BAAAA,WAAWF,WAAW;AAE1C,yCACEG,WAAAA,UAAA;AAAA,IAAAC,UAAA,CACG,KACAH,OAAOI,IAAI,CAACC,SAASC,UAAU;
|
|
1
|
+
{"version":3,"file":"CalendarWeekLabels.cjs","sources":["../../../../../src/components/Calendar/CalendarWeekLabels/CalendarWeekLabels.tsx"],"sourcesContent":["import { HvTypography } from \"@core/components/Typography\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { staticClasses, useClasses } from \"./CalendarWeekLabels.styles\";\n\nexport { staticClasses as calendarWeekLabelsClasses };\n\nexport type HvCalendarWeekLabelsClasses = ExtractNames<typeof useClasses>;\n\nexport const HvCalendarWeekLabel = ({\n classes: classesProp,\n labels = [],\n}: HvCalendarWeekLabelProps) => {\n const { classes } = useClasses(classesProp);\n\n return (\n <>\n {\" \"}\n {labels.map((dayName, index) => {\n const key = `${dayName}-${index}`;\n return (\n <HvTypography\n variant=\"label\"\n className={classes.calendarDay}\n key={key}\n >\n {dayName}\n </HvTypography>\n );\n })}{\" \"}\n </>\n );\n};\n\nexport type HvCalendarWeekLabelProps = {\n /**\n * A Jss Object used to override or extend the component styles.\n */\n classes?: HvCalendarWeekLabelsClasses;\n /**\n * Localized day of week labels.\n */\n labels?: string[];\n};\n"],"names":["HvCalendarWeekLabel","classes","classesProp","labels","useClasses","_Fragment","children","map","dayName","index","key","HvTypography","variant","className","calendarDay"],"mappings":";;;;;AASO,MAAMA,sBAAsBA,CAAC;AAAA,EAClCC,SAASC;AAAAA,EACTC,SAAS,CAAA;AACe,MAAM;AACxB,QAAA;AAAA,IAAEF;AAAAA,EAAAA,IAAYG,0BAAAA,WAAWF,WAAW;AAE1C,yCACEG,WAAAA,UAAA;AAAA,IAAAC,UAAA,CACG,KACAH,OAAOI,IAAI,CAACC,SAASC,UAAU;AAC9B,YAAMC,MAAO,GAAEF,OAAQ,IAAGC,KAAM;AAChC,4CACGE,WAAAA,cAAY;AAAA,QACXC,SAAQ;AAAA,QACRC,WAAWZ,QAAQa;AAAAA,QAAYR,UAG9BE;AAAAA,SAFIE,GAGO;AAAA,IAEjB,CAAA,GAAG,GAAG;AAAA,EAAA,CACP;AAEN;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarCell.styles.cjs","sources":["../../../../../src/components/Calendar/SingleCalendar/CalendarCell.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nconst hover = {\n backgroundColor: theme.calendar.cellHoverColor,\n cursor: \"pointer\",\n};\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCalendarCell\", {\n cellContainer: {\n cursor: \"pointer\",\n border: 0,\n padding: 0,\n margin: 0,\n backgroundColor: \"transparent\",\n },\n focusSelection: {\n \"&:hover\": {\n ...hover,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...hover,\n ...outlineStyles,\n },\n },\n calendarDate: {\n display: \"flex\",\n justifyContent: \"center\",\n flexDirection: \"column\",\n textAlign: \"center\",\n height: \"40px\",\n width: \"40px\",\n },\n calendarDateSelected: {\n backgroundColor: theme.colors.atmo3,\n color: theme.colors.secondary,\n \"&:hover\": {\n ...hover,\n },\n },\n calendarDateNotInMonth: {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n },\n calendarDateInSelectionRange: {\n backgroundColor: theme.colors.atmo3,\n },\n calendarDateDisabled: {\n color: theme.colors.secondary_60,\n cursor: \"no-drop\",\n },\n startBookend: {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n },\n endBookend: {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n dateWrapper: {\n width: \"40px\",\n height: \"40px\",\n },\n cellsInRange: {\n \"&:focus\": {\n outside: \"none\",\n },\n },\n cellsOutsideRange: {\n \"&:focus\": {\n outside: \"none\",\n },\n },\n});\n"],"names":["hover","backgroundColor","theme","calendar","cellHoverColor","cursor","staticClasses","useClasses","createClasses","cellContainer","border","padding","margin","focusSelection","outline","outlineStyles","calendarDate","display","justifyContent","flexDirection","textAlign","height","width","calendarDateSelected","colors","atmo3","color","secondary","calendarDateNotInMonth","secondary_60","calendarDateInSelectionRange","calendarDateDisabled","startBookend","borderLeft","endBookend","borderRight","dateWrapper","cellsInRange","outside","cellsOutsideRange"],"mappings":";;;;;AAMA,MAAMA,QAAQ;AAAA,EACZC,iBAAiBC,YAAAA,MAAMC,SAASC;AAAAA,EAChCC,QAAQ;AACV;AAEa,MAAA;AAAA,EAAEC;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,kBAAkB;AAAA,EAC3EC,eAAe;AAAA,IACbJ,QAAQ;AAAA,IACRK,QAAQ;AAAA,IACRC,SAAS;AAAA,IACTC,QAAQ;AAAA,IACRX,iBAAiB;AAAA,EACnB;AAAA,EACAY,gBAAgB;AAAA,IACd,WAAW;AAAA,MACT,GAAGb;AAAAA,IACL;AAAA,IACA,WAAW;AAAA,MACTc,SAAS;AAAA,IACX;AAAA,IACA,mBAAmB;AAAA,MACjB,GAAGd;AAAAA,MACH,GAAGe,WAAAA;AAAAA,IACL;AAAA,EACF;AAAA,EACAC,cAAc;AAAA,IACZC,SAAS;AAAA,IACTC,gBAAgB;AAAA,IAChBC,eAAe;AAAA,IACfC,WAAW;AAAA,IACXC,QAAQ;AAAA,IACRC,OAAO;AAAA,EACT;AAAA,EACAC,sBAAsB;AAAA,IACpBtB,iBAAiBC,YAAAA,MAAMsB,OAAOC;AAAAA,IAC9BC,OAAOxB,YAAAA,MAAMsB,OAAOG;AAAAA,IACpB,WAAW;AAAA,MACT,GAAG3B;AAAAA,IACL;AAAA,EACF;AAAA,EACA4B,wBAAwB;AAAA,IACtBF,OAAOxB,YAAAA,MAAMsB,OAAOK;AAAAA,IACpBxB,QAAQ;AAAA,EACV;AAAA,EACAyB,8BAA8B;AAAA,IAC5B7B,iBAAiBC,YAAAA,MAAMsB,OAAOC;AAAAA,EAChC;AAAA,EACAM,sBAAsB;AAAA,IACpBL,OAAOxB,YAAAA,MAAMsB,OAAOK;AAAAA,IACpBxB,QAAQ;AAAA,EACV;AAAA,EACA2B,cAAc;AAAA,IACZC,YAAa,aAAY/B,
|
|
1
|
+
{"version":3,"file":"CalendarCell.styles.cjs","sources":["../../../../../src/components/Calendar/SingleCalendar/CalendarCell.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nconst hover = {\n backgroundColor: theme.calendar.cellHoverColor,\n cursor: \"pointer\",\n};\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCalendarCell\", {\n cellContainer: {\n cursor: \"pointer\",\n border: 0,\n padding: 0,\n margin: 0,\n backgroundColor: \"transparent\",\n },\n focusSelection: {\n \"&:hover\": {\n ...hover,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n \"&:focus-visible\": {\n ...hover,\n ...outlineStyles,\n },\n },\n calendarDate: {\n display: \"flex\",\n justifyContent: \"center\",\n flexDirection: \"column\",\n textAlign: \"center\",\n height: \"40px\",\n width: \"40px\",\n },\n calendarDateSelected: {\n backgroundColor: theme.colors.atmo3,\n color: theme.colors.secondary,\n \"&:hover\": {\n ...hover,\n },\n },\n calendarDateNotInMonth: {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n },\n calendarDateInSelectionRange: {\n backgroundColor: theme.colors.atmo3,\n },\n calendarDateDisabled: {\n color: theme.colors.secondary_60,\n cursor: \"no-drop\",\n },\n startBookend: {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n },\n endBookend: {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n dateWrapper: {\n width: \"40px\",\n height: \"40px\",\n },\n cellsInRange: {\n \"&:focus\": {\n outside: \"none\",\n },\n },\n cellsOutsideRange: {\n \"&:focus\": {\n outside: \"none\",\n },\n },\n});\n"],"names":["hover","backgroundColor","theme","calendar","cellHoverColor","cursor","staticClasses","useClasses","createClasses","cellContainer","border","padding","margin","focusSelection","outline","outlineStyles","calendarDate","display","justifyContent","flexDirection","textAlign","height","width","calendarDateSelected","colors","atmo3","color","secondary","calendarDateNotInMonth","secondary_60","calendarDateInSelectionRange","calendarDateDisabled","startBookend","borderLeft","endBookend","borderRight","dateWrapper","cellsInRange","outside","cellsOutsideRange"],"mappings":";;;;;AAMA,MAAMA,QAAQ;AAAA,EACZC,iBAAiBC,YAAAA,MAAMC,SAASC;AAAAA,EAChCC,QAAQ;AACV;AAEa,MAAA;AAAA,EAAEC;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,kBAAkB;AAAA,EAC3EC,eAAe;AAAA,IACbJ,QAAQ;AAAA,IACRK,QAAQ;AAAA,IACRC,SAAS;AAAA,IACTC,QAAQ;AAAA,IACRX,iBAAiB;AAAA,EACnB;AAAA,EACAY,gBAAgB;AAAA,IACd,WAAW;AAAA,MACT,GAAGb;AAAAA,IACL;AAAA,IACA,WAAW;AAAA,MACTc,SAAS;AAAA,IACX;AAAA,IACA,mBAAmB;AAAA,MACjB,GAAGd;AAAAA,MACH,GAAGe,WAAAA;AAAAA,IACL;AAAA,EACF;AAAA,EACAC,cAAc;AAAA,IACZC,SAAS;AAAA,IACTC,gBAAgB;AAAA,IAChBC,eAAe;AAAA,IACfC,WAAW;AAAA,IACXC,QAAQ;AAAA,IACRC,OAAO;AAAA,EACT;AAAA,EACAC,sBAAsB;AAAA,IACpBtB,iBAAiBC,YAAAA,MAAMsB,OAAOC;AAAAA,IAC9BC,OAAOxB,YAAAA,MAAMsB,OAAOG;AAAAA,IACpB,WAAW;AAAA,MACT,GAAG3B;AAAAA,IACL;AAAA,EACF;AAAA,EACA4B,wBAAwB;AAAA,IACtBF,OAAOxB,YAAAA,MAAMsB,OAAOK;AAAAA,IACpBxB,QAAQ;AAAA,EACV;AAAA,EACAyB,8BAA8B;AAAA,IAC5B7B,iBAAiBC,YAAAA,MAAMsB,OAAOC;AAAAA,EAChC;AAAA,EACAM,sBAAsB;AAAA,IACpBL,OAAOxB,YAAAA,MAAMsB,OAAOK;AAAAA,IACpBxB,QAAQ;AAAA,EACV;AAAA,EACA2B,cAAc;AAAA,IACZC,YAAa,aAAY/B,YAAMsB,MAAAA,OAAOG,SAAU;AAAA,EAClD;AAAA,EACAO,YAAY;AAAA,IACVC,aAAc,aAAYjC,YAAMsB,MAAAA,OAAOG,SAAU;AAAA,EACnD;AAAA,EACAS,aAAa;AAAA,IACXd,OAAO;AAAA,IACPD,QAAQ;AAAA,EACV;AAAA,EACAgB,cAAc;AAAA,IACZ,WAAW;AAAA,MACTC,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACAC,mBAAmB;AAAA,IACjB,WAAW;AAAA,MACTD,SAAS;AAAA,IACX;AAAA,EACF;AACF,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleCalendar.styles.cjs","sources":["../../../../../src/components/Calendar/SingleCalendar/SingleCalendar.styles.tsx"],"sourcesContent":["import { createClasses } from \"@core/utils/classes\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvSingleCalendar\", {\n calendarContainer: {\n backgroundColor: theme.colors.atmo1,\n width: \"318px\",\n minHeight: \"440px\",\n position: \"relative\",\n },\n calendarWrapper: {\n overflow: \"hidden\",\n backgroundColor: theme.colors.atmo1,\n padding: theme.spacing(\"sm\"),\n },\n calendarGrid: {\n display: \"flex\",\n flexFlow: \"wrap\",\n width: \"280px\",\n \"& $cellsInRange\": {\n backgroundColor: theme.colors.atmo3,\n \"& $startBookend\": {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n backgroundColor: theme.colors.atmo3,\n \"&:hover\": {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n },\n },\n \"&:hover $cellsInRange\": {\n backgroundColor: theme.colors.atmo3,\n \"& $startBookend\": {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n borderRight: \"inherit\",\n },\n },\n \"& $cellsInRange:hover\": {\n backgroundColor: theme.colors.atmo3,\n \"& $calendarDate\": {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n },\n \"& $cellsInRange:hover ~ $cellsInRange\": {\n backgroundColor: theme.colors.atmo1, // controls the right side of the hovered range\n },\n \"& $cellsOutsideRange:hover ~ $cellsInRange\": {\n backgroundColor: theme.colors.atmo1, // control the right side when hovering outside of the range\n },\n },\n navigationContainer: {},\n focusSelection: {},\n navigationMonth: {},\n calendarDate: {},\n calendarDateNotInMonth: {},\n calendarDateSelected: {},\n calendarDateInvalid: {},\n calendarDateInSelectionRange: {},\n startBookend: {},\n endBookend: {},\n cellsInRange: {\n backgroundColor: theme.colors.atmo3,\n },\n cellsOutsideRange: {},\n cellContainer: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","calendarContainer","backgroundColor","theme","colors","atmo1","width","minHeight","position","calendarWrapper","overflow","padding","spacing","calendarGrid","display","flexFlow","atmo3","borderLeft","secondary","borderRight","navigationContainer","focusSelection","navigationMonth","calendarDate","calendarDateNotInMonth","calendarDateSelected","calendarDateInvalid","calendarDateInSelectionRange","startBookend","endBookend","cellsInRange","cellsOutsideRange","cellContainer"],"mappings":";;;;AAGa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,oBAAoB;AAAA,EAC7EC,mBAAmB;AAAA,IACjBC,iBAAiBC,YAAAA,MAAMC,OAAOC;AAAAA,IAC9BC,OAAO;AAAA,IACPC,WAAW;AAAA,IACXC,UAAU;AAAA,EACZ;AAAA,EACAC,iBAAiB;AAAA,IACfC,UAAU;AAAA,IACVR,iBAAiBC,YAAAA,MAAMC,OAAOC;AAAAA,IAC9BM,SAASR,YAAAA,MAAMS,QAAQ,IAAI;AAAA,EAC7B;AAAA,EACAC,cAAc;AAAA,IACZC,SAAS;AAAA,IACTC,UAAU;AAAA,IACVT,OAAO;AAAA,IACP,mBAAmB;AAAA,MACjBJ,iBAAiBC,YAAAA,MAAMC,OAAOY;AAAAA,MAC9B,mBAAmB;AAAA,QACjBC,YAAa,aAAYd,
|
|
1
|
+
{"version":3,"file":"SingleCalendar.styles.cjs","sources":["../../../../../src/components/Calendar/SingleCalendar/SingleCalendar.styles.tsx"],"sourcesContent":["import { createClasses } from \"@core/utils/classes\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvSingleCalendar\", {\n calendarContainer: {\n backgroundColor: theme.colors.atmo1,\n width: \"318px\",\n minHeight: \"440px\",\n position: \"relative\",\n },\n calendarWrapper: {\n overflow: \"hidden\",\n backgroundColor: theme.colors.atmo1,\n padding: theme.spacing(\"sm\"),\n },\n calendarGrid: {\n display: \"flex\",\n flexFlow: \"wrap\",\n width: \"280px\",\n \"& $cellsInRange\": {\n backgroundColor: theme.colors.atmo3,\n \"& $startBookend\": {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n backgroundColor: theme.colors.atmo3,\n \"&:hover\": {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n },\n },\n \"&:hover $cellsInRange\": {\n backgroundColor: theme.colors.atmo3,\n \"& $startBookend\": {\n borderLeft: `1px solid ${theme.colors.secondary}`,\n borderRight: \"inherit\",\n },\n },\n \"& $cellsInRange:hover\": {\n backgroundColor: theme.colors.atmo3,\n \"& $calendarDate\": {\n borderRight: `1px solid ${theme.colors.secondary}`,\n },\n },\n \"& $cellsInRange:hover ~ $cellsInRange\": {\n backgroundColor: theme.colors.atmo1, // controls the right side of the hovered range\n },\n \"& $cellsOutsideRange:hover ~ $cellsInRange\": {\n backgroundColor: theme.colors.atmo1, // control the right side when hovering outside of the range\n },\n },\n navigationContainer: {},\n focusSelection: {},\n navigationMonth: {},\n calendarDate: {},\n calendarDateNotInMonth: {},\n calendarDateSelected: {},\n calendarDateInvalid: {},\n calendarDateInSelectionRange: {},\n startBookend: {},\n endBookend: {},\n cellsInRange: {\n backgroundColor: theme.colors.atmo3,\n },\n cellsOutsideRange: {},\n cellContainer: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","calendarContainer","backgroundColor","theme","colors","atmo1","width","minHeight","position","calendarWrapper","overflow","padding","spacing","calendarGrid","display","flexFlow","atmo3","borderLeft","secondary","borderRight","navigationContainer","focusSelection","navigationMonth","calendarDate","calendarDateNotInMonth","calendarDateSelected","calendarDateInvalid","calendarDateInSelectionRange","startBookend","endBookend","cellsInRange","cellsOutsideRange","cellContainer"],"mappings":";;;;AAGa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,oBAAoB;AAAA,EAC7EC,mBAAmB;AAAA,IACjBC,iBAAiBC,YAAAA,MAAMC,OAAOC;AAAAA,IAC9BC,OAAO;AAAA,IACPC,WAAW;AAAA,IACXC,UAAU;AAAA,EACZ;AAAA,EACAC,iBAAiB;AAAA,IACfC,UAAU;AAAA,IACVR,iBAAiBC,YAAAA,MAAMC,OAAOC;AAAAA,IAC9BM,SAASR,YAAAA,MAAMS,QAAQ,IAAI;AAAA,EAC7B;AAAA,EACAC,cAAc;AAAA,IACZC,SAAS;AAAA,IACTC,UAAU;AAAA,IACVT,OAAO;AAAA,IACP,mBAAmB;AAAA,MACjBJ,iBAAiBC,YAAAA,MAAMC,OAAOY;AAAAA,MAC9B,mBAAmB;AAAA,QACjBC,Y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import dayjs from \"dayjs\";\n\nimport isNil from \"lodash/isNil\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { DateRangeProp } from \"./types\";\n\n/**\n * Constant with the number of weeks to be displayed on the calendar.\n */\nexport const CALENDAR_WEEKS = 6;\n\n/**\n * Constant with the default locale that should be used as the default.\n */\nexport const DEFAULT_LOCALE = \"en\";\n\n/**\n * Pads a string value with leading zeroes(0) until length is reached.\n *\n * @param value - Value to be padded.\n * @param length - Length of the value after the padding is added.\n * @returns The value as a string with the received amount of padding.\n *\n * @example zeroPad(5, 2) => \"05\"\n */\nexport const zeroPad = (value: number, length: number) =>\n `${value}`.padStart(length, \"0\");\n\n/**\n * Returns the number of days in the month given a month and year.\n *\n * @param month - Number of the month (1 to 12).\n * @param year - Number of the year.\n * @returns The number of days in a month for the received year.\n */\nexport const getMonthDays = (month: number, year: number) =>\n new Date(year, month, 0).getDate();\n\n/**\n * Gets the week day of the first day of a given month and year.\n * From 0 (Sunday) to 6 (Saturday).\n *\n * @param month - Number of the month (1 to 12).\n * @param year - Number of the year.\n * @returns The zero indexed week day where 0 is Sunday (0 to 6).\n */\nexport const getMonthFirstWeekday = (month: number, year: number) =>\n new Date(year, month - 1, 1).getDay();\n\n/**\n * Creates a `Date` instance in UTC timezone.\n *\n * @param year - The year of the date.\n * @param monthIndex - The zero indexed month of the year (0 to 11).\n * @param day - The day of the month.\n * @param [hour=1] - The hour of the day.\n * @returns A `Date` instance in UTC timezone.\n */\nexport const makeUTCDate = (\n year: number,\n monthIndex: number,\n day: number,\n hour = 1\n) => new Date(Date.UTC(year, monthIndex, day, hour));\n\n/**\n * Checks if the received date is a valid date.\n *\n * @param date - The date to be validated.\n * @returns A flag stating if the date is valid or not.\n */\nexport const isDate = (date: any): date is Date =>\n Object.prototype.toString.call(date) === \"[object Date]\" &&\n !Number.isNaN(date.valueOf());\n\nexport const isDateRangeProp = (date: any): date is DateRangeProp =>\n \"startDate\" in date;\n\n/**\n * Checks if two dates are in the same month and year.\n *\n * @param date1 - First date.\n * @param date2 - Second date.\n * @returns A flag stating if the dates are in the same month and year or not.\n */\nexport const isSameMonth = (date1: any, date2: any) => {\n if (!(isDate(date1) && isDate(date2))) return false;\n\n return (\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n};\n\n/**\n * Checks if two dates are on the same day.\n *\n * @param date1 - First date.\n * @param date2 - Second date.\n * @returns A flag stating if the dates are in the same day or not.\n */\nexport const isSameDay = (date1: any, date2: any) => {\n if (!(isDate(date1) && isDate(date2))) return false;\n\n return (\n date1.getDate() === date2.getDate() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n};\n\n/**\n * Formats the received date using the ISO format (YYYY-MM-DD).\n *\n * @param date - The date to be formatted.\n * @returns The formatted date in ISO format.\n */\nexport const getDateISO = (date?: Date) => {\n if (!isDate(date)) return null;\n\n return [\n date.getFullYear(),\n zeroPad(date.getMonth() + 1, 2),\n zeroPad(date.getDate(), 2),\n ].join(\"-\");\n};\n\n/**\n * Returns an object with the previous month taking also into consideration the year.\n * For example the previous month of January 2000 will be December 1999.\n *\n * @param month - Number of the month.\n * @param year - Number of the year.\n * @returns Object with new month and year defined.\n */\nexport const getPreviousMonth = (month: number, year: number) => {\n const prevMonth = month > 1 ? month - 1 : 12;\n const prevMonthYear = month > 1 ? year : year - 1;\n\n return { month: prevMonth, year: prevMonthYear };\n};\n\n/**\n * Returns an object with the next month taking also into consideration the year.\n * For example the next month of December 2000 will be January 2001.\n *\n * @param month - Number of the month.\n * @param year - Number of the year.\n * @returns Object with new month and year defined.\n */\nexport const getNextMonth = (month: number, year: number) => {\n const nextMonth = month < 12 ? month + 1 : 1;\n const nextMonthYear = month < 12 ? year : year + 1;\n\n return { month: nextMonth, year: nextMonthYear };\n};\n\n/**\n * Returns a list with the names of all the months localized in the received locale and representation value.\n *\n * @param locale - The locale to be applied to the Intl format.\n * @param representationValue - The representation value for the month.\n * @returns An array with all the months names.\n */\nexport const getMonthNamesList = (\n locale: string | undefined,\n representationValue: Intl.DateTimeFormatOptions[\"month\"] = \"long\"\n) => {\n const options = { month: representationValue, timeZone: \"UTC\" };\n\n return [...new Array(12)].map((n, index) => {\n const auxDate = makeUTCDate(1970, index, 1);\n return capitalize(Intl.DateTimeFormat(locale, options).format(auxDate));\n });\n};\n\n/**\n * Returns a list with the names of all the weekdays localized in the received locale and representation value.\n *\n * @param locale - The locale to be applied.\n * @param dateTimeFormatValue - The representation value for the weekday.\n * @returns An array with all the weekday names.\n */\nexport const getWeekdayNamesList = (\n locale: string,\n dateTimeFormatValue: Intl.DateTimeFormatOptions[\"weekday\"] = \"long\"\n) => {\n const options = { weekday: dateTimeFormatValue, timeZone: \"UTC\" };\n const weekdayNames: string[] = [];\n\n for (let day = 4; day <= 10; day += 1) {\n const auxDate = makeUTCDate(1970, 0, day);\n weekdayNames.push(Intl.DateTimeFormat(locale, options).format(auxDate));\n }\n return weekdayNames;\n};\n\n/**\n * Returns the name of the month for the supplied month localized in the received locale and representation value.\n *\n * @param date - The date from which the month name is extracted.\n * @param locale - The locale to be applied to the Intl format.\n * @param representationValue - The locale to be applied to the Intl format.\n * @returns The name of the month.\n */\nexport const getMonthName = (\n date: Date,\n locale: string,\n representationValue: Intl.DateTimeFormatOptions[\"month\"] = \"long\"\n) =>\n new Intl.DateTimeFormat(locale, { month: representationValue }).format(date);\n\n/**\n * Formats the received date according to Design System specifications.\n * Currently: day month, year => `14 Aug, 2019`.\n *\n * @param date - UTC date to be formatted.\n * @param locale - The locale to be applied to the Intl format.\n * @returns The formatted date as a string.\n */\nexport const getFormattedDate = (\n // TODO: fix this\n date: any,\n locale: any,\n rep: Intl.DateTimeFormatOptions[\"month\"] = \"short\"\n) =>\n `${date.getDate()} ${getMonthName(date, locale, rep)} ${date.getFullYear()}`;\n\n/**\n * Creates an array of 42 days. The complete current month and enough days from the previous and next months to fill\n * the 42 positions.\n *\n * @param month - The number of the month (1 to 12).\n * @param year - The number of the year.\n * @returns The array of dates.\n */\nexport const createDatesArray = (month: number, year: number) => {\n // Initializes the variables needed to calculate the dates for the received month and year\n const monthDays = getMonthDays(month, year);\n const daysFromPrevMonth = getMonthFirstWeekday(month, year);\n const daysFromNextMonth =\n CALENDAR_WEEKS * 7 - (daysFromPrevMonth + monthDays);\n const prevMonthYear = getPreviousMonth(month, year);\n const nextMonthYear = getNextMonth(month, year);\n const prevMonthDays = getMonthDays(prevMonthYear.month, prevMonthYear.year);\n\n // Creates the arrays for the dates for previous, current and next months\n const prevMonthDates = [...new Array(daysFromPrevMonth)].map((n, index) => {\n const day = index + 1 + (prevMonthDays - daysFromPrevMonth);\n return new Date(prevMonthYear.year, prevMonthYear.month - 1, day);\n });\n const currentMonthDates = [...new Array(monthDays)].map((n, index) => {\n const day = index + 1;\n return new Date(year, month - 1, day);\n });\n const nextMonthDates = [...new Array(daysFromNextMonth)].map((n, index) => {\n const day = index + 1;\n return new Date(nextMonthYear.year, nextMonthYear.month - 1, day);\n });\n\n return [...prevMonthDates, ...currentMonthDates, ...nextMonthDates];\n};\n\n/**\n * Checks if the received locale is valid according to Intl.\n *\n * @param locale - The locale to be checked\n * @returns True if the locale is valid, false otherwise.\n */\nexport const isValidLocale = (locale: string) => {\n try {\n if (Intl.DateTimeFormat.supportedLocalesOf(locale).length > 0) {\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(`${locale} is not supported. Falling back to a known locale.`);\n return false;\n } catch (error) {\n if (\n error != null &&\n typeof error === \"object\" &&\n \"name\" in error &&\n error?.name === \"RangeError\"\n ) {\n // eslint-disable-next-line no-console\n console.error(`Invalid locale: ${locale}`);\n return false;\n }\n if (error != null && typeof error === \"object\" && \"message\" in error) {\n // eslint-disable-next-line no-console\n console.error(error?.message);\n return false;\n }\n\n return false;\n }\n};\n\nexport const isRange = (date): date is DateRangeProp =>\n date != null && typeof date === \"object\" && \"startDate\" in date;\n\n/**\n * Checks if the date falls within a specified date range.\n *\n * @param date - The date to be evaluated.\n * @param providedValueRange - Provided selection range.\n * @returns - True if the date falls within the range, false otherwise.\n */\nexport const dateInProvidedValueRange = (\n date: any,\n providedValueRange: any\n) => {\n const { startDate, endDate } = providedValueRange;\n\n if (!isRange(providedValueRange) || isNil(endDate)) return false;\n const localEndDate = endDate;\n\n const modStartDate = dayjs(startDate).format(\"YYYY-MM-DD\");\n const modEndDate = dayjs(localEndDate).format(\"YYYY-MM-DD\");\n\n const convertedDate = dayjs(date).format(\"YYYY-MM-DD\");\n\n return convertedDate >= modStartDate && convertedDate <= modEndDate;\n};\n\nexport const checkIfDateIsDisabled = (\n date?: string | number | Date | dayjs.Dayjs,\n minimumDate?: string | number | Date | dayjs.Dayjs,\n maximumDate?: string | number | Date | dayjs.Dayjs\n) => {\n if (!minimumDate && !maximumDate) return false;\n const modStartDate = minimumDate\n ? dayjs(minimumDate).format(\"YYYY-MM-DD\")\n : undefined;\n const modEndDate = maximumDate\n ? dayjs(maximumDate).format(\"YYYY-MM-DD\")\n : undefined;\n\n const convertedDate = dayjs(date).format(\"YYYY-MM-DD\");\n\n return (\n (modStartDate !== undefined && convertedDate < modStartDate) ||\n (modEndDate !== undefined && convertedDate > modEndDate)\n );\n};\n\nexport const formatToLocale = (date, locale) => {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n }).format(date);\n};\n"],"names":["CALENDAR_WEEKS","getMonthDays","month","year","Date","getDate","getMonthFirstWeekday","getDay","makeUTCDate","monthIndex","day","hour","UTC","isDate","date","Object","prototype","toString","call","Number","isNaN","valueOf","isDateRangeProp","isSameMonth","date1","date2","getMonth","getFullYear","isSameDay","getPreviousMonth","prevMonth","prevMonthYear","getNextMonth","nextMonth","nextMonthYear","getMonthNamesList","locale","representationValue","options","timeZone","Array","map","n","index","auxDate","capitalize","Intl","DateTimeFormat","format","getWeekdayNamesList","dateTimeFormatValue","weekday","weekdayNames","push","getMonthName","getFormattedDate","rep","createDatesArray","monthDays","daysFromPrevMonth","daysFromNextMonth","prevMonthDays","prevMonthDates","currentMonthDates","nextMonthDates","isRange","dateInProvidedValueRange","providedValueRange","startDate","endDate","isNil","localEndDate","modStartDate","dayjs","modEndDate","convertedDate","checkIfDateIsDisabled","minimumDate","maximumDate","undefined","formatToLocale"],"mappings":";;;;;;;;;AAUO,MAAMA,iBAAiB;AA0BjBC,MAAAA,eAAeA,CAACC,OAAeC,SAC1C,IAAIC,KAAKD,MAAMD,OAAO,CAAC,EAAEG,QAAQ;AAUtBC,MAAAA,uBAAuBA,CAACJ,OAAeC,SAClD,IAAIC,KAAKD,MAAMD,QAAQ,GAAG,CAAC,EAAEK,OAAO;AAW/B,MAAMC,cAAcA,CACzBL,MACAM,YACAC,KACAC,OAAO,MACJ,IAAIP,KAAKA,KAAKQ,IAAIT,MAAMM,YAAYC,KAAKC,IAAI,CAAC;AAQ5C,MAAME,SAASA,CAACC,SACrBC,OAAOC,UAAUC,SAASC,KAAKJ,IAAI,MAAM,mBACzC,CAACK,OAAOC,MAAMN,KAAKO,SAAS;AAEjBC,MAAAA,kBAAkBA,CAACR,SAC9B,eAAeA;AASJS,MAAAA,cAAcA,CAACC,OAAYC,UAAe;AACrD,MAAI,EAAEZ,OAAOW,KAAK,KAAKX,OAAOY,KAAK;AAAW,WAAA;AAG5CD,SAAAA,MAAME,eAAeD,MAAMC,SAAAA,KAC3BF,MAAMG,YAAkBF,MAAAA,MAAME;AAElC;AASaC,MAAAA,YAAYA,CAACJ,OAAYC,UAAe;AACnD,MAAI,EAAEZ,OAAOW,KAAK,KAAKX,OAAOY,KAAK;AAAW,WAAA;AAE9C,SACED,MAAMnB,QAAQ,MAAMoB,MAAMpB,QAAAA,KAC1BmB,MAAME,SAAAA,MAAeD,MAAMC,SAC3BF,KAAAA,MAAMG,YAAY,MAAMF,MAAME;AAElC;AA0BaE,MAAAA,mBAAmBA,CAAC3B,OAAeC,SAAiB;AAC/D,QAAM2B,YAAY5B,QAAQ,IAAIA,QAAQ,IAAI;AAC1C,QAAM6B,gBA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qCaC,MAAAA,UAAUA,CAACnD,SACtBA,QAAQ,QAAQ,OAAOA,SAAS,YAAY,eAAeA;AAShDoD,MAAAA,2BAA2BA,CACtCpD,MACAqD,uBACG;AACG,QAAA;AAAA,IAAEC;AAAAA,IAAWC;AAAAA,EAAYF,IAAAA;AAE/B,MAAI,CAACF,QAAQE,kBAAkB,KAAKG,eAAAA,QAAMD,OAAO;AAAU,WAAA;AAC3D,QAAME,eAAeF;AAErB,QAAMG,eAAeC,eAAAA,QAAML,SAAS,EAAEpB,OAAO,YAAY;AACzD,QAAM0B,aAAaD,eAAAA,QAAMF,YAAY,EAAEvB,OAAO,YAAY;AAE1D,QAAM2B,gBAAgBF,eAAAA,QAAM3D,IAAI,EAAEkC,OAAO,YAAY;AAE9C2B,SAAAA,iBAAiBH,gBAAgBG,iBAAiBD;AAC3D;AAEO,MAAME,wBAAwBA,CACnC9D,MACA+D,aACAC,gBACG;AACC,MAAA,CAACD,eAAe,CAACC;AAAoB,WAAA;AACzC,QAAMN,eAAeK,cACjBJ,uBAAMI,WAAW,EAAE7B,OAAO,YAAY,IACtC+B;AACJ,QAAML,aAAaI,cACfL,uBAAMK,WAAW,EAAE9B,OAAO,YAAY,IACtC+B;AAEJ,QAAMJ,gBAAgBF,eAAAA,QAAM3D,IAAI,EAAEkC,OAAO,YAAY;AAErD,SACGwB,iBAAiBO,UAAaJ,gBAAgBH,gBAC9CE,eAAeK,UAAaJ,gBAAgBD;AAEjD;AAEaM,MAAAA,iBAAiBA,CAAClE,MAAMsB,WAAW;AACvC,SAAA,IAAIU,KAAKC,eAAeX,QAAQ;AAAA,IACrC1B,KAAK;AAAA,IACLR,OAAO;AAAA,IACPC,MAAM;AAAA,EAAA,CACP,EAAE6C,OAAOlC,IAAI;AAChB;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../../../src/components/Calendar/utils.tsx"],"sourcesContent":["import dayjs from \"dayjs\";\n\nimport isNil from \"lodash/isNil\";\nimport capitalize from \"lodash/capitalize\";\n\nimport { DateRangeProp } from \"./types\";\n\n/**\n * Constant with the number of weeks to be displayed on the calendar.\n */\nexport const CALENDAR_WEEKS = 6;\n\n/**\n * Constant with the default locale that should be used as the default.\n */\nexport const DEFAULT_LOCALE = \"en\";\n\n/**\n * Pads a string value with leading zeroes(0) until length is reached.\n *\n * @param value - Value to be padded.\n * @param length - Length of the value after the padding is added.\n * @returns The value as a string with the received amount of padding.\n *\n * @example zeroPad(5, 2) => \"05\"\n */\nexport const zeroPad = (value: number, length: number) =>\n `${value}`.padStart(length, \"0\");\n\n/**\n * Returns the number of days in the month given a month and year.\n *\n * @param month - Number of the month (1 to 12).\n * @param year - Number of the year.\n * @returns The number of days in a month for the received year.\n */\nexport const getMonthDays = (month: number, year: number) =>\n new Date(year, month, 0).getDate();\n\n/**\n * Gets the week day of the first day of a given month and year.\n * From 0 (Sunday) to 6 (Saturday).\n *\n * @param month - Number of the month (1 to 12).\n * @param year - Number of the year.\n * @returns The zero indexed week day where 0 is Sunday (0 to 6).\n */\nexport const getMonthFirstWeekday = (month: number, year: number) =>\n new Date(year, month - 1, 1).getDay();\n\n/**\n * Creates a `Date` instance in UTC timezone.\n *\n * @param year - The year of the date.\n * @param monthIndex - The zero indexed month of the year (0 to 11).\n * @param day - The day of the month.\n * @param [hour=1] - The hour of the day.\n * @returns A `Date` instance in UTC timezone.\n */\nexport const makeUTCDate = (\n year: number,\n monthIndex: number,\n day: number,\n hour = 1\n) => new Date(Date.UTC(year, monthIndex, day, hour));\n\n/**\n * Checks if the received date is a valid date.\n *\n * @param date - The date to be validated.\n * @returns A flag stating if the date is valid or not.\n */\nexport const isDate = (date: any): date is Date =>\n Object.prototype.toString.call(date) === \"[object Date]\" &&\n !Number.isNaN(date.valueOf());\n\nexport const isDateRangeProp = (date: any): date is DateRangeProp =>\n \"startDate\" in date;\n\n/**\n * Checks if two dates are in the same month and year.\n *\n * @param date1 - First date.\n * @param date2 - Second date.\n * @returns A flag stating if the dates are in the same month and year or not.\n */\nexport const isSameMonth = (date1: any, date2: any) => {\n if (!(isDate(date1) && isDate(date2))) return false;\n\n return (\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n};\n\n/**\n * Checks if two dates are on the same day.\n *\n * @param date1 - First date.\n * @param date2 - Second date.\n * @returns A flag stating if the dates are in the same day or not.\n */\nexport const isSameDay = (date1: any, date2: any) => {\n if (!(isDate(date1) && isDate(date2))) return false;\n\n return (\n date1.getDate() === date2.getDate() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getFullYear() === date2.getFullYear()\n );\n};\n\n/**\n * Formats the received date using the ISO format (YYYY-MM-DD).\n *\n * @param date - The date to be formatted.\n * @returns The formatted date in ISO format.\n */\nexport const getDateISO = (date?: Date) => {\n if (!isDate(date)) return null;\n\n return [\n date.getFullYear(),\n zeroPad(date.getMonth() + 1, 2),\n zeroPad(date.getDate(), 2),\n ].join(\"-\");\n};\n\n/**\n * Returns an object with the previous month taking also into consideration the year.\n * For example the previous month of January 2000 will be December 1999.\n *\n * @param month - Number of the month.\n * @param year - Number of the year.\n * @returns Object with new month and year defined.\n */\nexport const getPreviousMonth = (month: number, year: number) => {\n const prevMonth = month > 1 ? month - 1 : 12;\n const prevMonthYear = month > 1 ? year : year - 1;\n\n return { month: prevMonth, year: prevMonthYear };\n};\n\n/**\n * Returns an object with the next month taking also into consideration the year.\n * For example the next month of December 2000 will be January 2001.\n *\n * @param month - Number of the month.\n * @param year - Number of the year.\n * @returns Object with new month and year defined.\n */\nexport const getNextMonth = (month: number, year: number) => {\n const nextMonth = month < 12 ? month + 1 : 1;\n const nextMonthYear = month < 12 ? year : year + 1;\n\n return { month: nextMonth, year: nextMonthYear };\n};\n\n/**\n * Returns a list with the names of all the months localized in the received locale and representation value.\n *\n * @param locale - The locale to be applied to the Intl format.\n * @param representationValue - The representation value for the month.\n * @returns An array with all the months names.\n */\nexport const getMonthNamesList = (\n locale: string | undefined,\n representationValue: Intl.DateTimeFormatOptions[\"month\"] = \"long\"\n) => {\n const options = { month: representationValue, timeZone: \"UTC\" };\n\n return [...new Array(12)].map((n, index) => {\n const auxDate = makeUTCDate(1970, index, 1);\n return capitalize(Intl.DateTimeFormat(locale, options).format(auxDate));\n });\n};\n\n/**\n * Returns a list with the names of all the weekdays localized in the received locale and representation value.\n *\n * @param locale - The locale to be applied.\n * @param dateTimeFormatValue - The representation value for the weekday.\n * @returns An array with all the weekday names.\n */\nexport const getWeekdayNamesList = (\n locale: string,\n dateTimeFormatValue: Intl.DateTimeFormatOptions[\"weekday\"] = \"long\"\n) => {\n const options = { weekday: dateTimeFormatValue, timeZone: \"UTC\" };\n const weekdayNames: string[] = [];\n\n for (let day = 4; day <= 10; day += 1) {\n const auxDate = makeUTCDate(1970, 0, day);\n weekdayNames.push(Intl.DateTimeFormat(locale, options).format(auxDate));\n }\n return weekdayNames;\n};\n\n/**\n * Returns the name of the month for the supplied month localized in the received locale and representation value.\n *\n * @param date - The date from which the month name is extracted.\n * @param locale - The locale to be applied to the Intl format.\n * @param representationValue - The locale to be applied to the Intl format.\n * @returns The name of the month.\n */\nexport const getMonthName = (\n date: Date,\n locale: string,\n representationValue: Intl.DateTimeFormatOptions[\"month\"] = \"long\"\n) =>\n new Intl.DateTimeFormat(locale, { month: representationValue }).format(date);\n\n/**\n * Formats the received date according to Design System specifications.\n * Currently: day month, year => `14 Aug, 2019`.\n *\n * @param date - UTC date to be formatted.\n * @param locale - The locale to be applied to the Intl format.\n * @returns The formatted date as a string.\n */\nexport const getFormattedDate = (\n // TODO: fix this\n date: any,\n locale: any,\n rep: Intl.DateTimeFormatOptions[\"month\"] = \"short\"\n) =>\n `${date.getDate()} ${getMonthName(date, locale, rep)} ${date.getFullYear()}`;\n\n/**\n * Creates an array of 42 days. The complete current month and enough days from the previous and next months to fill\n * the 42 positions.\n *\n * @param month - The number of the month (1 to 12).\n * @param year - The number of the year.\n * @returns The array of dates.\n */\nexport const createDatesArray = (month: number, year: number) => {\n // Initializes the variables needed to calculate the dates for the received month and year\n const monthDays = getMonthDays(month, year);\n const daysFromPrevMonth = getMonthFirstWeekday(month, year);\n const daysFromNextMonth =\n CALENDAR_WEEKS * 7 - (daysFromPrevMonth + monthDays);\n const prevMonthYear = getPreviousMonth(month, year);\n const nextMonthYear = getNextMonth(month, year);\n const prevMonthDays = getMonthDays(prevMonthYear.month, prevMonthYear.year);\n\n // Creates the arrays for the dates for previous, current and next months\n const prevMonthDates = [...new Array(daysFromPrevMonth)].map((n, index) => {\n const day = index + 1 + (prevMonthDays - daysFromPrevMonth);\n return new Date(prevMonthYear.year, prevMonthYear.month - 1, day);\n });\n const currentMonthDates = [...new Array(monthDays)].map((n, index) => {\n const day = index + 1;\n return new Date(year, month - 1, day);\n });\n const nextMonthDates = [...new Array(daysFromNextMonth)].map((n, index) => {\n const day = index + 1;\n return new Date(nextMonthYear.year, nextMonthYear.month - 1, day);\n });\n\n return [...prevMonthDates, ...currentMonthDates, ...nextMonthDates];\n};\n\n/**\n * Checks if the received locale is valid according to Intl.\n *\n * @param locale - The locale to be checked\n * @returns True if the locale is valid, false otherwise.\n */\nexport const isValidLocale = (locale: string) => {\n try {\n if (Intl.DateTimeFormat.supportedLocalesOf(locale).length > 0) {\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(`${locale} is not supported. Falling back to a known locale.`);\n return false;\n } catch (error) {\n if (\n error != null &&\n typeof error === \"object\" &&\n \"name\" in error &&\n error?.name === \"RangeError\"\n ) {\n // eslint-disable-next-line no-console\n console.error(`Invalid locale: ${locale}`);\n return false;\n }\n if (error != null && typeof error === \"object\" && \"message\" in error) {\n // eslint-disable-next-line no-console\n console.error(error?.message);\n return false;\n }\n\n return false;\n }\n};\n\nexport const isRange = (date): date is DateRangeProp =>\n date != null && typeof date === \"object\" && \"startDate\" in date;\n\n/**\n * Checks if the date falls within a specified date range.\n *\n * @param date - The date to be evaluated.\n * @param providedValueRange - Provided selection range.\n * @returns - True if the date falls within the range, false otherwise.\n */\nexport const dateInProvidedValueRange = (\n date: any,\n providedValueRange: any\n) => {\n const { startDate, endDate } = providedValueRange;\n\n if (!isRange(providedValueRange) || isNil(endDate)) return false;\n const localEndDate = endDate;\n\n const modStartDate = dayjs(startDate).format(\"YYYY-MM-DD\");\n const modEndDate = dayjs(localEndDate).format(\"YYYY-MM-DD\");\n\n const convertedDate = dayjs(date).format(\"YYYY-MM-DD\");\n\n return convertedDate >= modStartDate && convertedDate <= modEndDate;\n};\n\nexport const checkIfDateIsDisabled = (\n date?: string | number | Date | dayjs.Dayjs,\n minimumDate?: string | number | Date | dayjs.Dayjs,\n maximumDate?: string | number | Date | dayjs.Dayjs\n) => {\n if (!minimumDate && !maximumDate) return false;\n const modStartDate = minimumDate\n ? dayjs(minimumDate).format(\"YYYY-MM-DD\")\n : undefined;\n const modEndDate = maximumDate\n ? dayjs(maximumDate).format(\"YYYY-MM-DD\")\n : undefined;\n\n const convertedDate = dayjs(date).format(\"YYYY-MM-DD\");\n\n return (\n (modStartDate !== undefined && convertedDate < modStartDate) ||\n (modEndDate !== undefined && convertedDate > modEndDate)\n );\n};\n\nexport const formatToLocale = (date, locale) => {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\",\n }).format(date);\n};\n"],"names":["CALENDAR_WEEKS","getMonthDays","month","year","Date","getDate","getMonthFirstWeekday","getDay","makeUTCDate","monthIndex","day","hour","UTC","isDate","date","Object","prototype","toString","call","Number","isNaN","valueOf","isDateRangeProp","isSameMonth","date1","date2","getMonth","getFullYear","isSameDay","getPreviousMonth","prevMonth","prevMonthYear","getNextMonth","nextMonth","nextMonthYear","getMonthNamesList","locale","representationValue","options","timeZone","Array","map","n","index","auxDate","capitalize","Intl","DateTimeFormat","format","getWeekdayNamesList","dateTimeFormatValue","weekday","weekdayNames","push","getMonthName","getFormattedDate","rep","createDatesArray","monthDays","daysFromPrevMonth","daysFromNextMonth","prevMonthDays","prevMonthDates","currentMonthDates","nextMonthDates","isRange","dateInProvidedValueRange","providedValueRange","startDate","endDate","isNil","localEndDate","modStartDate","dayjs","modEndDate","convertedDate","checkIfDateIsDisabled","minimumDate","maximumDate","undefined","formatToLocale"],"mappings":";;;;;;;;;AAUO,MAAMA,iBAAiB;AA0BjBC,MAAAA,eAAeA,CAACC,OAAeC,SAC1C,IAAIC,KAAKD,MAAMD,OAAO,CAAC,EAAEG,QAAQ;AAUtBC,MAAAA,uBAAuBA,CAACJ,OAAeC,SAClD,IAAIC,KAAKD,MAAMD,QAAQ,GAAG,CAAC,EAAEK,OAAO;AAW/B,MAAMC,cAAcA,CACzBL,MACAM,YACAC,KACAC,OAAO,MACJ,IAAIP,KAAKA,KAAKQ,IAAIT,MAAMM,YAAYC,KAAKC,IAAI,CAAC;AAQ5C,MAAME,SAASA,CAACC,SACrBC,OAAOC,UAAUC,SAASC,KAAKJ,IAAI,MAAM,mBACzC,CAACK,OAAOC,MAAMN,KAAKO,SAAS;AAEjBC,MAAAA,kBAAkBA,CAACR,SAC9B,eAAeA;AASJS,MAAAA,cAAcA,CAACC,OAAYC,UAAe;AACrD,MAAI,EAAEZ,OAAOW,KAAK,KAAKX,OAAOY,KAAK;AAAW,WAAA;AAG5CD,SAAAA,MAAME,eAAeD,MAAMC,SAAAA,KAC3BF,MAAMG,YAAkBF,MAAAA,MAAME;AAElC;AASaC,MAAAA,YAAYA,CAACJ,OAAYC,UAAe;AACnD,MAAI,EAAEZ,OAAOW,KAAK,KAAKX,OAAOY,KAAK;AAAW,WAAA;AAE9C,SACED,MAAMnB,QAAQ,MAAMoB,MAAMpB,QAAAA,KAC1BmB,MAAME,SAAAA,MAAeD,MAAMC,SAC3BF,KAAAA,MAAMG,YAAY,MAAMF,MAAME;AAElC;AA0BaE,MAAAA,mBAAmBA,CAAC3B,OAAeC,SAAiB;AAC/D,QAAM2B,YAAY5B,QAAQ,IAAIA,QAAQ,IAAI;AAC1C,QAAM6B,gBAAgB7B,QAAQ,IAAIC,OAAOA,OAAO;AAEz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ACtBA,QAAQ,QAAQ,OAAOA,SAAS,YAAY,eAAeA;AAShDoD,MAAAA,2BAA2BA,CACtCpD,MACAqD,uBACG;AACG,QAAA;AAAA,IAAEC;AAAAA,IAAWC;AAAAA,EAAYF,IAAAA;AAE/B,MAAI,CAACF,QAAQE,kBAAkB,KAAKG,eAAAA,QAAMD,OAAO;AAAU,WAAA;AAC3D,QAAME,eAAeF;AAErB,QAAMG,eAAeC,eAAAA,QAAML,SAAS,EAAEpB,OAAO,YAAY;AACzD,QAAM0B,aAAaD,eAAAA,QAAMF,YAAY,EAAEvB,OAAO,YAAY;AAE1D,QAAM2B,gBAAgBF,eAAAA,QAAM3D,IAAI,EAAEkC,OAAO,YAAY;AAE9C2B,SAAAA,iBAAiBH,gBAAgBG,iBAAiBD;AAC3D;AAEO,MAAME,wBAAwBA,CACnC9D,MACA+D,aACAC,gBACG;AACC,MAAA,CAACD,eAAe,CAACC;AAAoB,WAAA;AACzC,QAAMN,eAAeK,cACjBJ,uBAAMI,WAAW,EAAE7B,OAAO,YAAY,IACtC+B;AACJ,QAAML,aAAaI,cACfL,uBAAMK,WAAW,EAAE9B,OAAO,YAAY,IACtC+B;AAEJ,QAAMJ,gBAAgBF,eAAAA,QAAM3D,IAAI,EAAEkC,OAAO,YAAY;AAErD,SACGwB,iBAAiBO,UAAaJ,gBAAgBH,gBAC9CE,eAAeK,UAAaJ,gBAAgBD;AAEjD;AAEaM,MAAAA,iBAAiBA,CAAClE,MAAMsB,WAAW;AACvC,SAAA,IAAIU,KAAKC,eAAeX,QAAQ;AAAA,IACrC1B,KAAK;AAAA,IACLR,OAAO;AAAA,IACPC,MAAM;AAAA,EAAA,CACP,EAAE6C,OAAOlC,IAAI;AAChB;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.styles.cjs","sources":["../../../../src/components/Card/Card.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCard\", {\n root: {\n overflow: \"visible\",\n position: \"relative\",\n outline: theme.card.outline,\n borderRadius: theme.card.borderRadius,\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n },\n selected: {\n outline: `1px solid ${theme.colors.secondary}`,\n \"&:hover\": {\n outline: `1px solid ${theme.colors.secondary}`,\n },\n \"&:focus\": {\n outline: `1px solid ${theme.colors.secondary}`,\n },\n },\n selectable: {\n \"&:hover\": {\n outline: `1px solid ${theme.card.hoverColor}`,\n },\n },\n semanticContainer: {\n position: \"relative\",\n \"& > *\": {\n position: \"absolute\",\n zIndex: 1,\n },\n },\n icon: {\n top: `calc(${theme.card.iconMargin} + ${theme.space.xs})`,\n right: `calc(${theme.card.iconMargin} + ${theme.space.xs})`,\n },\n semanticBar: {\n width: \"100%\",\n top: -1,\n right: 0,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","overflow","position","outline","theme","card","borderRadius","outlineStyles","selected","colors","secondary","selectable","hoverColor","semanticContainer","zIndex","icon","top","iconMargin","space","xs","right","semanticBar","width"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,UAAU;AAAA,EACnEC,MAAM;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,IACVC,SAASC,YAAAA,MAAMC,KAAKF;AAAAA,IACpBG,cAAcF,YAAAA,MAAMC,KAAKC;AAAAA,IACzB,mBAAmB;AAAA,MACjB,GAAGC,WAAAA;AAAAA,IACL;AAAA,IACA,WAAW;AAAA,MACTJ,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACAK,UAAU;AAAA,IACRL,SAAU,aAAYC,
|
|
1
|
+
{"version":3,"file":"Card.styles.cjs","sources":["../../../../src/components/Card/Card.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCard\", {\n root: {\n overflow: \"visible\",\n position: \"relative\",\n outline: theme.card.outline,\n borderRadius: theme.card.borderRadius,\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n \"&:focus\": {\n outline: \"none\",\n },\n },\n selected: {\n outline: `1px solid ${theme.colors.secondary}`,\n \"&:hover\": {\n outline: `1px solid ${theme.colors.secondary}`,\n },\n \"&:focus\": {\n outline: `1px solid ${theme.colors.secondary}`,\n },\n },\n selectable: {\n \"&:hover\": {\n outline: `1px solid ${theme.card.hoverColor}`,\n },\n },\n semanticContainer: {\n position: \"relative\",\n \"& > *\": {\n position: \"absolute\",\n zIndex: 1,\n },\n },\n icon: {\n top: `calc(${theme.card.iconMargin} + ${theme.space.xs})`,\n right: `calc(${theme.card.iconMargin} + ${theme.space.xs})`,\n },\n semanticBar: {\n width: \"100%\",\n top: -1,\n right: 0,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","overflow","position","outline","theme","card","borderRadius","outlineStyles","selected","colors","secondary","selectable","hoverColor","semanticContainer","zIndex","icon","top","iconMargin","space","xs","right","semanticBar","width"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,UAAU;AAAA,EACnEC,MAAM;AAAA,IACJC,UAAU;AAAA,IACVC,UAAU;AAAA,IACVC,SAASC,YAAAA,MAAMC,KAAKF;AAAAA,IACpBG,cAAcF,YAAAA,MAAMC,KAAKC;AAAAA,IACzB,mBAAmB;AAAA,MACjB,GAAGC,WAAAA;AAAAA,IACL;AAAA,IACA,WAAW;AAAA,MACTJ,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACAK,UAAU;AAAA,IACRL,SAAU,aAAYC,YAAMK,MAAAA,OAAOC,SAAU;AAAA,IAC7C,WAAW;AAAA,MACTP,SAAU,aAAYC,YAAMK,MAAAA,OAAOC,SAAU;AAAA,IAC/C;AAAA,IACA,WAAW;AAAA,MACTP,SAAU,aAAYC,YAAMK,MAAAA,OAAOC,SAAU;AAAA,IAC/C;AAAA,EACF;AAAA,EACAC,YAAY;AAAA,IACV,WAAW;AAAA,MACTR,SAAU,aAAYC,YAAMC,MAAAA,KAAKO,UAAW;AAAA,IAC9C;AAAA,EACF;AAAA,EACAC,mBAAmB;AAAA,IACjBX,UAAU;AAAA,IACV,SAAS;AAAA,MACPA,UAAU;AAAA,MACVY,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACAC,MAAM;AAAA,IACJC,KAAM,QAAOZ,YAAMC,MAAAA,KAAKY,UAAW,MAAKb,kBAAMc,MAAMC,EAAG;AAAA,IACvDC,OAAQ,QAAOhB,YAAMC,MAAAA,KAAKY,UAAW,MAAKb,kBAAMc,MAAMC,EAAG;AAAA,EAC3D;AAAA,EACAE,aAAa;AAAA,IACXC,OAAO;AAAA,IACPN,KAAK;AAAA,IACLI,OAAO;AAAA,EACT;AACF,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.styles.cjs","sources":["../../../../../src/components/Card/Content/Content.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCardContent\", {\n content: {\n padding: `0 ${theme.space.sm} 15px ${theme.space.sm}`,\n \"&:last-child\": {\n paddingBottom: theme.space.sm,\n },\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","content","padding","theme","space","sm","paddingBottom"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,iBAAiB;AAAA,EAC1EC,SAAS;AAAA,IACPC,SAAU,KAAIC,YAAAA,MAAMC,MAAMC,
|
|
1
|
+
{"version":3,"file":"Content.styles.cjs","sources":["../../../../../src/components/Card/Content/Content.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCardContent\", {\n content: {\n padding: `0 ${theme.space.sm} 15px ${theme.space.sm}`,\n \"&:last-child\": {\n paddingBottom: theme.space.sm,\n },\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","content","padding","theme","space","sm","paddingBottom"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,iBAAiB;AAAA,EAC1EC,SAAS;AAAA,IACPC,SAAU,KAAIC,YAAAA,MAAMC,MAAMC,EAAG,SAAQF,YAAAA,MAAMC,MAAMC,EAAG;AAAA,IACpD,gBAAgB;AAAA,MACdC,eAAeH,YAAAA,MAAMC,MAAMC;AAAAA,IAC7B;AAAA,EACF;AACF,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.styles.cjs","sources":["../../../../../src/components/Card/Header/Header.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCardHeader\", {\n root: { padding: `15px ${theme.space.sm}`, position: \"relative\" },\n titleShort: {\n fontFamily: theme.fontFamily.body,\n marginRight: \"30px\",\n },\n title: {\n fontFamily: theme.fontFamily.body,\n },\n subheader: {\n fontFamily: theme.fontFamily.body,\n },\n content: {},\n action: {\n position: \"absolute\",\n right: 20,\n marginTop: 0,\n marginRight: \"0px\",\n paddingLeft: theme.space.xs,\n top: \"15px\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","padding","theme","space","sm","position","titleShort","fontFamily","body","marginRight","title","subheader","content","action","right","marginTop","paddingLeft","xs","top"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IAAEC,SAAU,QAAOC,
|
|
1
|
+
{"version":3,"file":"Header.styles.cjs","sources":["../../../../../src/components/Card/Header/Header.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCardHeader\", {\n root: { padding: `15px ${theme.space.sm}`, position: \"relative\" },\n titleShort: {\n fontFamily: theme.fontFamily.body,\n marginRight: \"30px\",\n },\n title: {\n fontFamily: theme.fontFamily.body,\n },\n subheader: {\n fontFamily: theme.fontFamily.body,\n },\n content: {},\n action: {\n position: \"absolute\",\n right: 20,\n marginTop: 0,\n marginRight: \"0px\",\n paddingLeft: theme.space.xs,\n top: \"15px\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","padding","theme","space","sm","position","titleShort","fontFamily","body","marginRight","title","subheader","content","action","right","marginTop","paddingLeft","xs","top"],"mappings":";;;;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,gBAAgB;AAAA,EACzEC,MAAM;AAAA,IAAEC,SAAU,QAAOC,YAAMC,MAAAA,MAAMC,EAAG;AAAA,IAAGC,UAAU;AAAA,EAAW;AAAA,EAChEC,YAAY;AAAA,IACVC,YAAYL,YAAAA,MAAMK,WAAWC;AAAAA,IAC7BC,aAAa;AAAA,EACf;AAAA,EACAC,OAAO;AAAA,IACLH,YAAYL,YAAAA,MAAMK,WAAWC;AAAAA,EAC/B;AAAA,EACAG,WAAW;AAAA,IACTJ,YAAYL,YAAAA,MAAMK,WAAWC;AAAAA,EAC/B;AAAA,EACAI,SAAS,CAAC;AAAA,EACVC,QAAQ;AAAA,IACNR,UAAU;AAAA,IACVS,OAAO;AAAA,IACPC,WAAW;AAAA,IACXN,aAAa;AAAA,IACbO,aAAad,YAAAA,MAAMC,MAAMc;AAAAA,IACzBC,KAAK;AAAA,EACP;AACF,CAAC;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.cjs","sources":["../../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n Children,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport useCarousel, { EmblaOptionsType } from \"embla-carousel-react\";\n\nimport {\n Backwards,\n Forwards,\n Close,\n Fullscreen,\n} from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvButton } from \"@core/components/Button\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { HvTooltip } from \"@core/components/Tooltip\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { HvContainer } from \"@core/components/Container\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { HvCarouselControls } from \"./CarouselControls\";\nimport { HvCarouselThumbnails } from \"./CarouselThumbnails\";\nimport { staticClasses, useClasses } from \"./Carousel.styles\";\n\nconst clamp = (num: number, max: number, min = 0) =>\n Math.min(Math.max(num, min), max);\n\nexport { staticClasses as carouselClasses };\n\nexport type HvCarouselClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCarouselProps\n extends HvBaseProps<HTMLDivElement, \"title\" | \"onChange\"> {\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvCarouselClasses;\n /** Height of the Slider container. If `undefined`, images will keep a 16/9 aspect-ratio */\n height?: CSSProperties[\"height\"];\n /** Width of the thumbnail. Height will try to maintain a 16/9 aspect-ratio */\n thumbnailWidth?: CSSProperties[\"width\"];\n /** Title of the carousel */\n title?: React.ReactNode;\n /** Content slides to be displayed. @see `<HvCarouselSlide />` */\n children?: React.ReactNode;\n /** Custom content to render in the actions area */\n actions?: React.ReactNode;\n /** Whether Carousel is in \"xs mode\" - to use in embedded contexts */\n xs?: boolean;\n /** Whether to show dots instead of arrow pagination. Defaults to true under 5 elements */\n showDots?: boolean;\n /** Whether to show the counter on the top-right corner of the active slide */\n showCounter?: boolean;\n /** Whether to show the back/forwards buttons over the active slide */\n showSlideControls?: boolean;\n /** Whether to enable the fullscreen toggle button */\n showFullscreen?: boolean;\n /** Whether to hide the thumbnails. Hidden by default in \"xs\" mode */\n hideThumbnails?: boolean;\n controlsPosition?: \"top\" | \"bottom\";\n thumbnailsPosition?: \"top\" | \"bottom\";\n /** Carousel configuration options. @see https://www.embla-carousel.com/api/options/ */\n carouselOptions?: EmblaOptionsType;\n /** */\n renderThumbnail?: (index: number) => React.ReactNode;\n /** The callback fired when the active slide changes. */\n onChange?: (index: number) => void;\n}\n\n/**\n * A Carousel is commonly used to browse images, it can also be used to browse any kind of content like text, video, or charts.\n * It allows you to focus on a particular content while having a notion of how many you have to explore.\n */\nexport const HvCarousel = (props: HvCarouselProps) => {\n const {\n className,\n classes: classesProp,\n height: heightProp = \"auto\",\n thumbnailWidth = 90,\n title,\n children,\n actions: actionsProp,\n xs,\n showDots: showDotsProp,\n showCounter: showCounterProp,\n showSlideControls,\n showFullscreen: showFullscreenProp,\n hideThumbnails: hideThumbnailsProp,\n controlsPosition: controlsPositionProp,\n thumbnailsPosition: thumbnailsPositionProp,\n carouselOptions,\n renderThumbnail,\n onChange,\n ...others\n } = useDefaultProps(\"HvCarousel\", props);\n const { activeTheme } = useTheme();\n const { classes, css, cx } = useClasses(classesProp);\n const thumbnailsRef = useRef<HTMLDivElement>(null);\n const [isFullscreen, setIsFullscreen] = useState(false);\n\n const isDs3 = activeTheme?.name === \"ds3\";\n const actionsPosition = isDs3 ? \"header\" : \"controls\";\n const controlsPosition = controlsPositionProp ?? (isDs3 ? \"bottom\" : \"top\");\n const thumbnailsPosition = thumbnailsPositionProp ?? \"bottom\";\n\n const [containerRef, controller] = useCarousel({\n align: \"start\",\n loop: true,\n ...carouselOptions,\n });\n\n const [selectedIndex, setSelectedIndex] = useState(\n carouselOptions?.startIndex ?? 0\n );\n\n const numSlides = Children.count(children);\n\n const handlePrevious = useCallback(() => {\n controller?.scrollPrev();\n }, [controller]);\n\n const handleNext = useCallback(() => {\n controller?.scrollNext();\n }, [controller]);\n\n const handleScroll = (index: number) => {\n controller?.scrollTo(index);\n };\n\n const handleSelect = useCallback(() => {\n if (!controller) return;\n\n const slideIndex = controller.selectedScrollSnap();\n setSelectedIndex(slideIndex);\n\n // scroll to thumbnail button\n thumbnailsRef.current\n ?.querySelectorAll(\"button\")\n ?.[slideIndex]?.scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n });\n\n onChange?.(slideIndex);\n }, [controller, onChange]);\n\n useEffect(() => {\n if (!controller) return;\n\n controller.on(\"select\", handleSelect);\n\n return () => {\n controller.off(\"select\", handleSelect);\n };\n }, [controller, handleSelect]);\n\n useEffect(() => {\n if (!controller) return;\n\n controller.reInit();\n setSelectedIndex((currentIndex) => clamp(currentIndex, numSlides, 0));\n }, [numSlides, controller]);\n\n const canPrev = controller?.canScrollPrev() ?? false;\n const canNext = controller?.canScrollNext() ?? false;\n const showTitle = !!title && (!xs || isFullscreen);\n const showFullscreen = showFullscreenProp ?? xs;\n const height = isFullscreen ? \"100%\" : heightProp ?? \"auto\";\n const showCounter = xs;\n const hideThumbnails = hideThumbnailsProp ?? (xs && !isFullscreen);\n const showThumbnails = !hideThumbnails && !!renderThumbnail;\n const showDots = showDotsProp ?? numSlides <= 5;\n\n const actions = (\n <div\n className={cx(\n classes.actions,\n actionsPosition === \"header\"\n ? css({ position: \"relative\", top: -40, height: 0 })\n : css({ position: \"absolute\" })\n )}\n >\n {actionsProp}\n {showFullscreen && (\n <HvTooltip title={isFullscreen ? \"Close\" : \"Fullscreen\"}>\n <HvButton\n icon\n onClick={() => setIsFullscreen((curr) => !curr)}\n className={classes.closeButton}\n >\n {isFullscreen ? <Close /> : <Fullscreen />}\n </HvButton>\n </HvTooltip>\n )}\n </div>\n );\n\n const controls = (\n <HvCarouselControls\n classes={classes}\n showDots={showDots}\n page={selectedIndex}\n pages={numSlides}\n canPrevious={canPrev}\n canNext={canNext}\n onPreviousClick={handlePrevious}\n onNextClick={handleNext}\n actions={actionsPosition === \"controls\" && actions}\n />\n );\n\n const thumbnails = showThumbnails && (\n <HvCarouselThumbnails\n classes={classes}\n ref={thumbnailsRef}\n page={selectedIndex}\n pages={numSlides}\n width={thumbnailWidth}\n onThumbnailClick={(evt, i) => handleScroll(i)}\n renderThumbnail={renderThumbnail}\n />\n );\n\n return (\n <HvContainer\n className={cx(classes.root, className, {\n [classes.xs]: xs,\n [classes.fullscreen]: isFullscreen,\n })}\n {...others}\n >\n {showTitle && (\n <HvTypography variant=\"title2\" className={classes.title}>\n {title}\n </HvTypography>\n )}\n\n {actionsPosition === \"header\" && actions}\n {thumbnailsPosition === \"top\" && thumbnails}\n {controlsPosition === \"top\" && controls}\n <div\n className={cx(classes.main, {\n [classes.mainXs]: xs,\n [classes.mainFullscreen]: isFullscreen,\n })}\n >\n {showCounter && (\n <div className={classes.counterContainer}>\n <span className={classes.counter}>\n {`${selectedIndex + 1}/${numSlides}`}\n </span>\n </div>\n )}\n\n {showSlideControls && (\n <div className={classes.slideControls}>\n <HvButton\n icon\n disabled={!canPrev}\n variant=\"secondary\"\n aria-label=\"Backwards\"\n onClick={handlePrevious}\n >\n <Backwards iconSize=\"XS\" />\n </HvButton>\n <HvButton\n icon\n disabled={!canNext}\n variant=\"secondary\"\n aria-label=\"Forwards\"\n onClick={handleNext}\n >\n <Forwards iconSize=\"XS\" />\n </HvButton>\n </div>\n )}\n\n <div\n ref={containerRef}\n style={{ height }}\n className={classes.slidesViewport}\n >\n <div className={classes.slidesContainer}>{children}</div>\n </div>\n </div>\n {controlsPosition === \"bottom\" && controls}\n {thumbnailsPosition === \"bottom\" && thumbnails}\n </HvContainer>\n );\n};\n"],"names":["clamp","num","max","min","Math","HvCarousel","props","className","classes","classesProp","height","heightProp","thumbnailWidth","title","children","actions","actionsProp","xs","showDots","showDotsProp","showCounter","showCounterProp","showSlideControls","showFullscreen","showFullscreenProp","hideThumbnails","hideThumbnailsProp","controlsPosition","controlsPositionProp","thumbnailsPosition","thumbnailsPositionProp","carouselOptions","renderThumbnail","onChange","others","useDefaultProps","activeTheme","useTheme","css","cx","useClasses","thumbnailsRef","useRef","isFullscreen","setIsFullscreen","useState","isDs3","name","actionsPosition","containerRef","controller","useCarousel","align","loop","selectedIndex","setSelectedIndex","startIndex","numSlides","Children","count","handlePrevious","useCallback","scrollPrev","handleNext","scrollNext","handleScroll","index","scrollTo","handleSelect","slideIndex","selectedScrollSnap","current","querySelectorAll","scrollIntoView","behavior","block","useEffect","on","off","reInit","currentIndex","canPrev","canScrollPrev","canNext","canScrollNext","showTitle","showThumbnails","position","top","HvTooltip","HvButton","icon","onClick","curr","closeButton","_jsx","Close","Fullscreen","controls","HvCarouselControls","page","pages","canPrevious","onPreviousClick","onNextClick","thumbnails","HvCarouselThumbnails","ref","width","onThumbnailClick","evt","i","HvContainer","root","fullscreen","HvTypography","variant","_jsxs","main","mainXs","mainFullscreen","counterContainer","counter","slideControls","disabled","Backwards","iconSize","Forwards","style","slidesViewport","slidesContainer"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,MAAMA,QAAQA,CAACC,KAAaC,KAAaC,MAAM,MAC7CC,KAAKD,IAAIC,KAAKF,IAAID,KAAKE,GAAG,GAAGD,GAAG;AA8CrBG,MAAAA,aAAaA,CAACC,UAA2B;AAC9C,QAAA;AAAA,IACJC;AAAAA,IACAC,SAASC;AAAAA,IACTC,QAAQC,aAAa;AAAA,IACrBC,iBAAiB;AAAA,IACjBC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC,UAAUC;AAAAA,IACVC,aAAaC;AAAAA,IACbC;AAAAA,IACAC,gBAAgBC;AAAAA,IAChBC,gBAAgBC;AAAAA,IAChBC,kBAAkBC;AAAAA,IAClBC,oBAAoBC;AAAAA,IACpBC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,gBA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carousel.cjs","sources":["../../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n Children,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport useCarousel, { EmblaOptionsType } from \"embla-carousel-react\";\n\nimport {\n Backwards,\n Forwards,\n Close,\n Fullscreen,\n} from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvButton } from \"@core/components/Button\";\nimport { useTheme } from \"@core/hooks/useTheme\";\nimport { HvTooltip } from \"@core/components/Tooltip\";\nimport { HvTypography } from \"@core/components/Typography\";\nimport { HvContainer } from \"@core/components/Container\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { HvCarouselControls } from \"./CarouselControls\";\nimport { HvCarouselThumbnails } from \"./CarouselThumbnails\";\nimport { staticClasses, useClasses } from \"./Carousel.styles\";\n\nconst clamp = (num: number, max: number, min = 0) =>\n Math.min(Math.max(num, min), max);\n\nexport { staticClasses as carouselClasses };\n\nexport type HvCarouselClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCarouselProps\n extends HvBaseProps<HTMLDivElement, \"title\" | \"onChange\"> {\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvCarouselClasses;\n /** Height of the Slider container. If `undefined`, images will keep a 16/9 aspect-ratio */\n height?: CSSProperties[\"height\"];\n /** Width of the thumbnail. Height will try to maintain a 16/9 aspect-ratio */\n thumbnailWidth?: CSSProperties[\"width\"];\n /** Title of the carousel */\n title?: React.ReactNode;\n /** Content slides to be displayed. @see `<HvCarouselSlide />` */\n children?: React.ReactNode;\n /** Custom content to render in the actions area */\n actions?: React.ReactNode;\n /** Whether Carousel is in \"xs mode\" - to use in embedded contexts */\n xs?: boolean;\n /** Whether to show dots instead of arrow pagination. Defaults to true under 5 elements */\n showDots?: boolean;\n /** Whether to show the counter on the top-right corner of the active slide */\n showCounter?: boolean;\n /** Whether to show the back/forwards buttons over the active slide */\n showSlideControls?: boolean;\n /** Whether to enable the fullscreen toggle button */\n showFullscreen?: boolean;\n /** Whether to hide the thumbnails. Hidden by default in \"xs\" mode */\n hideThumbnails?: boolean;\n controlsPosition?: \"top\" | \"bottom\";\n thumbnailsPosition?: \"top\" | \"bottom\";\n /** Carousel configuration options. @see https://www.embla-carousel.com/api/options/ */\n carouselOptions?: EmblaOptionsType;\n /** */\n renderThumbnail?: (index: number) => React.ReactNode;\n /** The callback fired when the active slide changes. */\n onChange?: (index: number) => void;\n}\n\n/**\n * A Carousel is commonly used to browse images, it can also be used to browse any kind of content like text, video, or charts.\n * It allows you to focus on a particular content while having a notion of how many you have to explore.\n */\nexport const HvCarousel = (props: HvCarouselProps) => {\n const {\n className,\n classes: classesProp,\n height: heightProp = \"auto\",\n thumbnailWidth = 90,\n title,\n children,\n actions: actionsProp,\n xs,\n showDots: showDotsProp,\n showCounter: showCounterProp,\n showSlideControls,\n showFullscreen: showFullscreenProp,\n hideThumbnails: hideThumbnailsProp,\n controlsPosition: controlsPositionProp,\n thumbnailsPosition: thumbnailsPositionProp,\n carouselOptions,\n renderThumbnail,\n onChange,\n ...others\n } = useDefaultProps(\"HvCarousel\", props);\n const { activeTheme } = useTheme();\n const { classes, css, cx } = useClasses(classesProp);\n const thumbnailsRef = useRef<HTMLDivElement>(null);\n const [isFullscreen, setIsFullscreen] = useState(false);\n\n const isDs3 = activeTheme?.name === \"ds3\";\n const actionsPosition = isDs3 ? \"header\" : \"controls\";\n const controlsPosition = controlsPositionProp ?? (isDs3 ? \"bottom\" : \"top\");\n const thumbnailsPosition = thumbnailsPositionProp ?? \"bottom\";\n\n const [containerRef, controller] = useCarousel({\n align: \"start\",\n loop: true,\n ...carouselOptions,\n });\n\n const [selectedIndex, setSelectedIndex] = useState(\n carouselOptions?.startIndex ?? 0\n );\n\n const numSlides = Children.count(children);\n\n const handlePrevious = useCallback(() => {\n controller?.scrollPrev();\n }, [controller]);\n\n const handleNext = useCallback(() => {\n controller?.scrollNext();\n }, [controller]);\n\n const handleScroll = (index: number) => {\n controller?.scrollTo(index);\n };\n\n const handleSelect = useCallback(() => {\n if (!controller) return;\n\n const slideIndex = controller.selectedScrollSnap();\n setSelectedIndex(slideIndex);\n\n // scroll to thumbnail button\n thumbnailsRef.current\n ?.querySelectorAll(\"button\")\n ?.[slideIndex]?.scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n });\n\n onChange?.(slideIndex);\n }, [controller, onChange]);\n\n useEffect(() => {\n if (!controller) return;\n\n controller.on(\"select\", handleSelect);\n\n return () => {\n controller.off(\"select\", handleSelect);\n };\n }, [controller, handleSelect]);\n\n useEffect(() => {\n if (!controller) return;\n\n controller.reInit();\n setSelectedIndex((currentIndex) => clamp(currentIndex, numSlides, 0));\n }, [numSlides, controller]);\n\n const canPrev = controller?.canScrollPrev() ?? false;\n const canNext = controller?.canScrollNext() ?? false;\n const showTitle = !!title && (!xs || isFullscreen);\n const showFullscreen = showFullscreenProp ?? xs;\n const height = isFullscreen ? \"100%\" : heightProp ?? \"auto\";\n const showCounter = xs;\n const hideThumbnails = hideThumbnailsProp ?? (xs && !isFullscreen);\n const showThumbnails = !hideThumbnails && !!renderThumbnail;\n const showDots = showDotsProp ?? numSlides <= 5;\n\n const actions = (\n <div\n className={cx(\n classes.actions,\n actionsPosition === \"header\"\n ? css({ position: \"relative\", top: -40, height: 0 })\n : css({ position: \"absolute\" })\n )}\n >\n {actionsProp}\n {showFullscreen && (\n <HvTooltip title={isFullscreen ? \"Close\" : \"Fullscreen\"}>\n <HvButton\n icon\n onClick={() => setIsFullscreen((curr) => !curr)}\n className={classes.closeButton}\n >\n {isFullscreen ? <Close /> : <Fullscreen />}\n </HvButton>\n </HvTooltip>\n )}\n </div>\n );\n\n const controls = (\n <HvCarouselControls\n classes={classes}\n showDots={showDots}\n page={selectedIndex}\n pages={numSlides}\n canPrevious={canPrev}\n canNext={canNext}\n onPreviousClick={handlePrevious}\n onNextClick={handleNext}\n actions={actionsPosition === \"controls\" && actions}\n />\n );\n\n const thumbnails = showThumbnails && (\n <HvCarouselThumbnails\n classes={classes}\n ref={thumbnailsRef}\n page={selectedIndex}\n pages={numSlides}\n width={thumbnailWidth}\n onThumbnailClick={(evt, i) => handleScroll(i)}\n renderThumbnail={renderThumbnail}\n />\n );\n\n return (\n <HvContainer\n className={cx(classes.root, className, {\n [classes.xs]: xs,\n [classes.fullscreen]: isFullscreen,\n })}\n {...others}\n >\n {showTitle && (\n <HvTypography variant=\"title2\" className={classes.title}>\n {title}\n </HvTypography>\n )}\n\n {actionsPosition === \"header\" && actions}\n {thumbnailsPosition === \"top\" && thumbnails}\n {controlsPosition === \"top\" && controls}\n <div\n className={cx(classes.main, {\n [classes.mainXs]: xs,\n [classes.mainFullscreen]: isFullscreen,\n })}\n >\n {showCounter && (\n <div className={classes.counterContainer}>\n <span className={classes.counter}>\n {`${selectedIndex + 1}/${numSlides}`}\n </span>\n </div>\n )}\n\n {showSlideControls && (\n <div className={classes.slideControls}>\n <HvButton\n icon\n disabled={!canPrev}\n variant=\"secondary\"\n aria-label=\"Backwards\"\n onClick={handlePrevious}\n >\n <Backwards iconSize=\"XS\" />\n </HvButton>\n <HvButton\n icon\n disabled={!canNext}\n variant=\"secondary\"\n aria-label=\"Forwards\"\n onClick={handleNext}\n >\n <Forwards iconSize=\"XS\" />\n </HvButton>\n </div>\n )}\n\n <div\n ref={containerRef}\n style={{ height }}\n className={classes.slidesViewport}\n >\n <div className={classes.slidesContainer}>{children}</div>\n </div>\n </div>\n {controlsPosition === \"bottom\" && controls}\n {thumbnailsPosition === \"bottom\" && thumbnails}\n </HvContainer>\n );\n};\n"],"names":["clamp","num","max","min","Math","HvCarousel","props","className","classes","classesProp","height","heightProp","thumbnailWidth","title","children","actions","actionsProp","xs","showDots","showDotsProp","showCounter","showCounterProp","showSlideControls","showFullscreen","showFullscreenProp","hideThumbnails","hideThumbnailsProp","controlsPosition","controlsPositionProp","thumbnailsPosition","thumbnailsPositionProp","carouselOptions","renderThumbnail","onChange","others","useDefaultProps","activeTheme","useTheme","css","cx","useClasses","thumbnailsRef","useRef","isFullscreen","setIsFullscreen","useState","isDs3","name","actionsPosition","containerRef","controller","useCarousel","align","loop","selectedIndex","setSelectedIndex","startIndex","numSlides","Children","count","handlePrevious","useCallback","scrollPrev","handleNext","scrollNext","handleScroll","index","scrollTo","handleSelect","slideIndex","selectedScrollSnap","current","querySelectorAll","scrollIntoView","behavior","block","useEffect","on","off","reInit","currentIndex","canPrev","canScrollPrev","canNext","canScrollNext","showTitle","showThumbnails","position","top","HvTooltip","HvButton","icon","onClick","curr","closeButton","_jsx","Close","Fullscreen","controls","HvCarouselControls","page","pages","canPrevious","onPreviousClick","onNextClick","thumbnails","HvCarouselThumbnails","ref","width","onThumbnailClick","evt","i","HvContainer","root","fullscreen","HvTypography","variant","_jsxs","main","mainXs","mainFullscreen","counterContainer","counter","slideControls","disabled","Backwards","iconSize","Forwards","style","slidesViewport","slidesContainer"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,MAAMA,QAAQA,CAACC,KAAaC,KAAaC,MAAM,MAC7CC,KAAKD,IAAIC,KAAKF,IAAID,KAAKE,GAAG,GAAGD,GAAG;AA8CrBG,MAAAA,aAAaA,CAACC,UAA2B;AAC9C,QAAA;AAAA,IACJC;AAAAA,IACAC,SAASC;AAAAA,IACTC,QAAQC,aAAa;AAAA,IACrBC,iBAAiB;AAAA,IACjBC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC;AAAAA,IACAC,UAAUC;AAAAA,IACVC,aAAaC;AAAAA,IACbC;AAAAA,IACAC,gBAAgBC;AAAAA,IAChBC,gBAAgBC;AAAAA,IAChBC,kBAAkBC;AAAAA,IAClBC,oBAAoBC;AAAAA,IACpBC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,gBAAA,cAAc7B,KAAK;AACjC,QAAA;AAAA,IAAE8B;AAAAA,M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../src/components/Carousel/CarouselControls.tsx"],"sourcesContent":["import { MouseEventHandler, ReactNode } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvButton } from \"@core/components/Button\";\nimport { HvPaginationProps } from \"@core/components/Pagination\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./Carousel.styles\";\n\ninterface HvCarouselControlsProps\n extends HvBaseProps<HTMLDivElement>,\n Pick<HvPaginationProps, \"page\" | \"pages\" | \"canPrevious\" | \"canNext\"> {\n showDots?: boolean;\n classes?: ExtractNames<typeof useClasses>;\n actions?: ReactNode;\n onPreviousClick?: MouseEventHandler<HTMLButtonElement>;\n onNextClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const HvCarouselControls = (props: HvCarouselControlsProps) => {\n const {\n classes: classesProp,\n className,\n showDots,\n page,\n pages,\n canPrevious,\n canNext,\n actions,\n onPreviousClick,\n onNextClick,\n } = useDefaultProps(\"HvCarouselControls\", props);\n const { classes, cx } = useClasses(classesProp, false);\n\n const selectedIndex = page || 0;\n const numSlides = pages;\n\n return (\n <div className={cx(classes.controls, className)}>\n {showDots ? (\n <div className={classes.dots}>\n {Array.from(Array(numSlides)).map((el, index) => (\n <span\n key={`circle-${index}`}\n className={cx(classes.dot, {\n [classes.dotSelected]: index === selectedIndex,\n })}\n />\n ))}\n </div>\n ) : (\n <>\n <HvButton\n icon\n disabled={!canPrevious}\n aria-label=\"Backwards\"\n onClick={onPreviousClick}\n >\n <Backwards iconSize=\"XS\" />\n </HvButton>\n <div className={classes.pageCounter}>\n {`${selectedIndex + 1} / ${numSlides}`}\n </div>\n <HvButton\n icon\n disabled={!canNext}\n aria-label=\"Forwards\"\n onClick={onNextClick}\n >\n <Forwards iconSize=\"XS\" />\n </HvButton>\n </>\n )}\n {actions}\n </div>\n );\n};\n"],"names":["HvCarouselControls","props","classes","classesProp","className","showDots","page","pages","canPrevious","canNext","actions","onPreviousClick","onNextClick","useDefaultProps","cx","useClasses","selectedIndex","numSlides","controls","children","_jsx","dots","Array","from","map","el","index","dot","dotSelected","_jsxs","_Fragment","HvButton","icon","disabled","onClick","Backwards","iconSize","pageCounter","Forwards"],"mappings":";;;;;;;AAsBaA,MAAAA,qBAAqBA,CAACC,UAAmC;AAC9D,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,EAAAA,IACEC,gBAAgB,gBAAA,sBAAsBZ,KAAK;AACzC,QAAA;AAAA,IAAEC;AAAAA,IAASY;AAAAA,EAAAA,IAAOC,gBAAWZ,WAAAA,aAAa,KAAK;AAErD,QAAMa,gBAAgBV,QAAQ;AAC9B,QAAMW,YAAYV;AAElB,yCACE,OAAA;AAAA,IAAKH,WAAWU,GAAGZ,QAAQgB,UAAUd,SAAS;AAAA,IAAEe,UAAA,CAC7Cd,WACCe,2BAAAA,IAAA,OAAA;AAAA,MAAKhB,WAAWF,QAAQmB;AAAAA,MAAKF,UAC1BG,MAAMC,KAAKD,MAAML,SAAS,CAAC,EAAEO,IAAI,CAACC,IAAIC,UACrCN,2BAAAA,IAAA,QAAA;AAAA,QAEEhB,WAAWU,GAAGZ,QAAQyB,KAAK;AAAA,UACzB,CAACzB,QAAQ0B,WAAW,GAAGF,UAAUV;AAAAA,QAAAA,CAClC;AAAA,
|
|
1
|
+
{"version":3,"file":"CarouselControls.cjs","sources":["../../../../src/components/Carousel/CarouselControls.tsx"],"sourcesContent":["import { MouseEventHandler, ReactNode } from \"react\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\n\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvButton } from \"@core/components/Button\";\nimport { HvPaginationProps } from \"@core/components/Pagination\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./Carousel.styles\";\n\ninterface HvCarouselControlsProps\n extends HvBaseProps<HTMLDivElement>,\n Pick<HvPaginationProps, \"page\" | \"pages\" | \"canPrevious\" | \"canNext\"> {\n showDots?: boolean;\n classes?: ExtractNames<typeof useClasses>;\n actions?: ReactNode;\n onPreviousClick?: MouseEventHandler<HTMLButtonElement>;\n onNextClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const HvCarouselControls = (props: HvCarouselControlsProps) => {\n const {\n classes: classesProp,\n className,\n showDots,\n page,\n pages,\n canPrevious,\n canNext,\n actions,\n onPreviousClick,\n onNextClick,\n } = useDefaultProps(\"HvCarouselControls\", props);\n const { classes, cx } = useClasses(classesProp, false);\n\n const selectedIndex = page || 0;\n const numSlides = pages;\n\n return (\n <div className={cx(classes.controls, className)}>\n {showDots ? (\n <div className={classes.dots}>\n {Array.from(Array(numSlides)).map((el, index) => (\n <span\n key={`circle-${index}`}\n className={cx(classes.dot, {\n [classes.dotSelected]: index === selectedIndex,\n })}\n />\n ))}\n </div>\n ) : (\n <>\n <HvButton\n icon\n disabled={!canPrevious}\n aria-label=\"Backwards\"\n onClick={onPreviousClick}\n >\n <Backwards iconSize=\"XS\" />\n </HvButton>\n <div className={classes.pageCounter}>\n {`${selectedIndex + 1} / ${numSlides}`}\n </div>\n <HvButton\n icon\n disabled={!canNext}\n aria-label=\"Forwards\"\n onClick={onNextClick}\n >\n <Forwards iconSize=\"XS\" />\n </HvButton>\n </>\n )}\n {actions}\n </div>\n );\n};\n"],"names":["HvCarouselControls","props","classes","classesProp","className","showDots","page","pages","canPrevious","canNext","actions","onPreviousClick","onNextClick","useDefaultProps","cx","useClasses","selectedIndex","numSlides","controls","children","_jsx","dots","Array","from","map","el","index","dot","dotSelected","_jsxs","_Fragment","HvButton","icon","disabled","onClick","Backwards","iconSize","pageCounter","Forwards"],"mappings":";;;;;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A,QACPC,MAAI;AAAA,QACJC,UAAU,CAACxB;AAAAA,QACX,cAAW;AAAA,QACXyB,SAAStB;AAAAA,QAAYO,yCAEpBmB,0BAAQ;AAAA,UAACF,UAAS;AAAA,QAAA,CAAM;AAAA,MAAA,CACjB,CAAC;AAAA,IACX,CAAA,GAEH1B,OAAO;AAAA,EAAA,CACL;AAET;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselSlide.cjs","sources":["../../../../../src/components/Carousel/CarouselSlide/CarouselSlide.tsx"],"sourcesContent":["import { ImgHTMLAttributes } from \"react\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./CarouselSlide.styles\";\n\nexport type HvCarouselSlideClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCarouselSlideProps\n extends ImgHTMLAttributes<HTMLImageElement> {\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvCarouselSlideClasses;\n /** The width of the Slide. Defaults to `100%` */\n size?: string;\n /** Content of a slide to be displayed */\n children?: React.ReactNode;\n}\n\n/**\n * A container to use as `children` of `HvCarousel`.\n * Pass `img` props directly to it, or `children` for any custom content\n */\nexport const HvCarouselSlide = ({\n classes: classesProp,\n className,\n children,\n size: flexBasis = \"100%\",\n src,\n alt,\n ...props\n}: HvCarouselSlideProps) => {\n const { classes, css, cx } = useClasses(classesProp);\n return (\n <div\n className={cx(\n css({ flex: `0 0 ${flexBasis}` }),\n classes.slide,\n className\n )}\n >\n {children ?? (\n <img className={classes.image} src={src} alt={alt} {...props} />\n )}\n </div>\n );\n};\n"],"names":["HvCarouselSlide","classes","classesProp","className","children","size","flexBasis","src","alt","props","css","cx","useClasses","flex","slide","_jsx","image"],"mappings":";;;;AAsBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,MAAMC,YAAY;AAAA,EAClBC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACiB,MAAM;AACpB,QAAA;AAAA,IAAER;AAAAA,IAASS;AAAAA,IAAKC;AAAAA,EAAAA,IAAOC,qBAAAA,WAAWV,WAAW;AACnD,wCACE,OAAA;AAAA,IACEC,WAAWQ,GACTD,IAAI;AAAA,MAAEG,MAAO,OAAMP;
|
|
1
|
+
{"version":3,"file":"CarouselSlide.cjs","sources":["../../../../../src/components/Carousel/CarouselSlide/CarouselSlide.tsx"],"sourcesContent":["import { ImgHTMLAttributes } from \"react\";\n\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./CarouselSlide.styles\";\n\nexport type HvCarouselSlideClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCarouselSlideProps\n extends ImgHTMLAttributes<HTMLImageElement> {\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvCarouselSlideClasses;\n /** The width of the Slide. Defaults to `100%` */\n size?: string;\n /** Content of a slide to be displayed */\n children?: React.ReactNode;\n}\n\n/**\n * A container to use as `children` of `HvCarousel`.\n * Pass `img` props directly to it, or `children` for any custom content\n */\nexport const HvCarouselSlide = ({\n classes: classesProp,\n className,\n children,\n size: flexBasis = \"100%\",\n src,\n alt,\n ...props\n}: HvCarouselSlideProps) => {\n const { classes, css, cx } = useClasses(classesProp);\n return (\n <div\n className={cx(\n css({ flex: `0 0 ${flexBasis}` }),\n classes.slide,\n className\n )}\n >\n {children ?? (\n <img className={classes.image} src={src} alt={alt} {...props} />\n )}\n </div>\n );\n};\n"],"names":["HvCarouselSlide","classes","classesProp","className","children","size","flexBasis","src","alt","props","css","cx","useClasses","flex","slide","_jsx","image"],"mappings":";;;;AAsBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,MAAMC,YAAY;AAAA,EAClBC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACiB,MAAM;AACpB,QAAA;AAAA,IAAER;AAAAA,IAASS;AAAAA,IAAKC;AAAAA,EAAAA,IAAOC,qBAAAA,WAAWV,WAAW;AACnD,wCACE,OAAA;AAAA,IACEC,WAAWQ,GACTD,IAAI;AAAA,MAAEG,MAAO,OAAMP,SAAU;AAAA,IAAA,CAAG,GAChCL,QAAQa,OACRX,SACF;AAAA,IAAEC,UAEDA,YACCW,2BAAAA,IAAA,OAAA;AAAA,MAAKZ,WAAWF,QAAQe;AAAAA,MAAOT;AAAAA,MAAUC;AAAAA,MAAS,GAAKC;AAAAA,IAAAA,CAAQ;AAAA,EAAA,CAE9D;AAET;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselThumbnails.cjs","sources":["../../../../src/components/Carousel/CarouselThumbnails.tsx"],"sourcesContent":["import { CSSProperties, MouseEvent, forwardRef } from \"react\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvPaginationProps } from \"@core/components/Pagination\";\nimport { HvStack } from \"@core/components/Stack\";\nimport { HvButton, HvButtonProps } from \"@core/components/Button\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./Carousel.styles\";\n\ninterface HvCarouselThumbnailsProps\n extends HvBaseProps<HTMLDivElement, \"children\">,\n Pick<HvPaginationProps, \"page\" | \"pages\" | \"canPrevious\" | \"canNext\"> {\n width?: CSSProperties[\"width\"];\n classes?: ExtractNames<typeof useClasses>;\n onThumbnailClick?: (\n event: MouseEvent<HTMLButtonElement>,\n index: number\n ) => void;\n thumbnailProps?: Partial<HvButtonProps>;\n showDots?: boolean;\n renderThumbnail?: (index: number) => React.ReactNode;\n}\n\nexport const HvCarouselThumbnails = forwardRef<\n HTMLDivElement,\n HvCarouselThumbnailsProps\n>((props, ref) => {\n const {\n classes: classesProp,\n className,\n page,\n pages,\n width,\n renderThumbnail,\n onThumbnailClick,\n thumbnailProps,\n ...others\n } = props;\n const { classes, cx } = useClasses(classesProp);\n\n const selectedIndex = page || 0;\n const numSlides = pages;\n\n return (\n <div ref={ref} className={cx(classes.panel, className)} {...others}>\n <HvStack direction=\"row\" spacing=\"xs\">\n {Array.from(Array(numSlides)).map((doc, i) => (\n <HvButton\n icon\n key={`thumbnail-${i}`}\n style={{ width }}\n variant=\"secondaryGhost\"\n className={cx(classes.thumbnail, {\n [classes.thumbnailSelected]: i === selectedIndex,\n })}\n onClick={(event) => onThumbnailClick?.(event, i)}\n {...thumbnailProps}\n >\n {renderThumbnail?.(i)}\n </HvButton>\n ))}\n </HvStack>\n </div>\n );\n});\n"],"names":["HvCarouselThumbnails","forwardRef","props","ref","classes","classesProp","className","page","pages","width","renderThumbnail","onThumbnailClick","thumbnailProps","others","cx","useClasses","selectedIndex","numSlides","panel","children","HvStack","direction","spacing","Array","from","map","doc","i","_jsx","HvButton","icon","style","variant","thumbnail","thumbnailSelected","onClick","event"],"mappings":";;;;;;;AAwBO,MAAMA,uBAAuBC,MAAAA,WAGlC,CAACC,OAAOC,QAAQ;AACV,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EACDX,IAAAA;AACE,QAAA;AAAA,IAAEE;AAAAA,IAASU;AAAAA,EAAAA,IAAOC,gBAAAA,WAAWV,WAAW;AAE9C,QAAMW,gBAAgBT,QAAQ;AAC9B,QAAMU,YAAYT;AAElB,wCACE,OAAA;AAAA,IAAKL;AAAAA,IAAUG,WAAWQ,GAAGV,QAAQc,OAAOZ,SAAS;AAAA,IAAE,GAAKO;AAAAA,IAAMM,yCAC/DC,eAAO;AAAA,MAACC,WAAU;AAAA,MAAMC,SAAQ;AAAA,MAAIH,UAClCI,MAAMC,KAAKD,MAAMN,SAAS,CAAC,EAAEQ,IAAI,CAACC,KAAKC,MACtCC,2BAAAA,IAACC,OAAAA,UAAQ;AAAA,QACPC,MAAI;AAAA,QAEJC,OAAO;AAAA,UAAEtB;AAAAA,QAAM;AAAA,QACfuB,SAAQ;AAAA,QACR1B,WAAWQ,GAAGV,QAAQ6B,WAAW;AAAA,UAC/B,CAAC7B,QAAQ8B,iBAAiB,GAAGP,MAAMX;AAAAA,QAAAA,CACpC;AAAA,QACDmB,SAAUC,CAAAA,UAAUzB,qDAAmByB,OAAOT;AAAAA,QAAG,GAC7Cf;AAAAA,QAAcO,UAEjBT,mDAAkBiB;AAAAA,
|
|
1
|
+
{"version":3,"file":"CarouselThumbnails.cjs","sources":["../../../../src/components/Carousel/CarouselThumbnails.tsx"],"sourcesContent":["import { CSSProperties, MouseEvent, forwardRef } from \"react\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvPaginationProps } from \"@core/components/Pagination\";\nimport { HvStack } from \"@core/components/Stack\";\nimport { HvButton, HvButtonProps } from \"@core/components/Button\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses } from \"./Carousel.styles\";\n\ninterface HvCarouselThumbnailsProps\n extends HvBaseProps<HTMLDivElement, \"children\">,\n Pick<HvPaginationProps, \"page\" | \"pages\" | \"canPrevious\" | \"canNext\"> {\n width?: CSSProperties[\"width\"];\n classes?: ExtractNames<typeof useClasses>;\n onThumbnailClick?: (\n event: MouseEvent<HTMLButtonElement>,\n index: number\n ) => void;\n thumbnailProps?: Partial<HvButtonProps>;\n showDots?: boolean;\n renderThumbnail?: (index: number) => React.ReactNode;\n}\n\nexport const HvCarouselThumbnails = forwardRef<\n HTMLDivElement,\n HvCarouselThumbnailsProps\n>((props, ref) => {\n const {\n classes: classesProp,\n className,\n page,\n pages,\n width,\n renderThumbnail,\n onThumbnailClick,\n thumbnailProps,\n ...others\n } = props;\n const { classes, cx } = useClasses(classesProp);\n\n const selectedIndex = page || 0;\n const numSlides = pages;\n\n return (\n <div ref={ref} className={cx(classes.panel, className)} {...others}>\n <HvStack direction=\"row\" spacing=\"xs\">\n {Array.from(Array(numSlides)).map((doc, i) => (\n <HvButton\n icon\n key={`thumbnail-${i}`}\n style={{ width }}\n variant=\"secondaryGhost\"\n className={cx(classes.thumbnail, {\n [classes.thumbnailSelected]: i === selectedIndex,\n })}\n onClick={(event) => onThumbnailClick?.(event, i)}\n {...thumbnailProps}\n >\n {renderThumbnail?.(i)}\n </HvButton>\n ))}\n </HvStack>\n </div>\n );\n});\n"],"names":["HvCarouselThumbnails","forwardRef","props","ref","classes","classesProp","className","page","pages","width","renderThumbnail","onThumbnailClick","thumbnailProps","others","cx","useClasses","selectedIndex","numSlides","panel","children","HvStack","direction","spacing","Array","from","map","doc","i","_jsx","HvButton","icon","style","variant","thumbnail","thumbnailSelected","onClick","event"],"mappings":";;;;;;;AAwBO,MAAMA,uBAAuBC,MAAAA,WAGlC,CAACC,OAAOC,QAAQ;AACV,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACA,GAAGC;AAAAA,EACDX,IAAAA;AACE,QAAA;AAAA,IAAEE;AAAAA,IAASU;AAAAA,EAAAA,IAAOC,gBAAAA,WAAWV,WAAW;AAE9C,QAAMW,gBAAgBT,QAAQ;AAC9B,QAAMU,YAAYT;AAElB,wCACE,OAAA;AAAA,IAAKL;AAAAA,IAAUG,WAAWQ,GAAGV,QAAQc,OAAOZ,SAAS;AAAA,IAAE,GAAKO;AAAAA,IAAMM,yCAC/DC,eAAO;AAAA,MAACC,WAAU;AAAA,MAAMC,SAAQ;AAAA,MAAIH,UAClCI,MAAMC,KAAKD,MAAMN,SAAS,CAAC,EAAEQ,IAAI,CAACC,KAAKC,MACtCC,2BAAAA,IAACC,OAAAA,UAAQ;AAAA,QACPC,MAAI;AAAA,QAEJC,OAAO;AAAA,UAAEtB;AAAAA,QAAM;AAAA,QACfuB,SAAQ;AAAA,QACR1B,WAAWQ,GAAGV,QAAQ6B,WAAW;AAAA,UAC/B,CAAC7B,QAAQ8B,iBAAiB,GAAGP,MAAMX;AAAAA,QAAAA,CACpC;AAAA,QACDmB,SAAUC,CAAAA,UAAUzB,qDAAmByB,OAAOT;AAAAA,QAAG,GAC7Cf;AAAAA,QAAcO,UAEjBT,mDAAkBiB;AAAAA,MATb,GAAA,aAAYA,CAAE,EAUZ,CACX;AAAA,IAAA,CACM;AAAA,EAAA,CACN;AAET,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.styles.cjs","sources":["../../../../src/components/CheckBox/CheckBox.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCheckBox\", {\n root: { display: \"inline-block\" },\n container: {\n cursor: \"pointer\",\n display: \"flex\",\n height: \"32px\",\n transition: \"background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms\",\n\n \"&:hover\": {\n backgroundColor: theme.checkbox.hoverColor,\n borderRadius: theme.checkbox.borderRadius,\n },\n },\n disabled: {\n cursor: \"not-allowed\",\n \"& $label\": { color: theme.colors.secondary_60, cursor: \"not-allowed\" },\n },\n focusVisible: {\n ...outlineStyles,\n\n \"& div\": {\n backgroundColor: theme.colors.atmo3,\n },\n\n [`& $checkbox div > svg`]: {\n outline: \"none\",\n boxShadow: \"none\",\n },\n },\n invalidContainer: {\n borderBottom: `1px solid ${theme.colors.negative}`,\n\n \"&:hover\": {\n borderBottomLeftRadius: \"0px\",\n borderBottomRightRadius: \"0px\",\n },\n },\n checkbox: { height: \"32px\" },\n invalidCheckbox: {\n borderBottom: `1px solid ${theme.colors.negative}`,\n borderBottomLeftRadius: \"0px\",\n borderBottomRightRadius: \"0px\",\n },\n label: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n verticalAlign: \"middle\",\n paddingRight: theme.space.xs,\n whiteSpace: \"nowrap\",\n ...theme.typography.body,\n cursor: \"pointer\",\n height: \"32px\",\n lineHeight: \"32px\",\n width: \"100%\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","container","cursor","height","transition","backgroundColor","theme","checkbox","hoverColor","borderRadius","disabled","color","colors","secondary_60","focusVisible","outlineStyles","atmo3","outline","boxShadow","invalidContainer","borderBottom","negative","borderBottomLeftRadius","borderBottomRightRadius","invalidCheckbox","label","overflow","textOverflow","verticalAlign","paddingRight","space","xs","whiteSpace","typography","body","lineHeight","width"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,cAAc;AAAA,EACvEC,MAAM;AAAA,IAAEC,SAAS;AAAA,EAAe;AAAA,EAChCC,WAAW;AAAA,IACTC,QAAQ;AAAA,IACRF,SAAS;AAAA,IACTG,QAAQ;AAAA,IACRC,YAAY;AAAA,IAEZ,WAAW;AAAA,MACTC,iBAAiBC,YAAAA,MAAMC,SAASC;AAAAA,MAChCC,cAAcH,YAAAA,MAAMC,SAASE;AAAAA,IAC/B;AAAA,EACF;AAAA,EACAC,UAAU;AAAA,IACRR,QAAQ;AAAA,IACR,YAAY;AAAA,MAAES,OAAOL,YAAAA,MAAMM,OAAOC;AAAAA,MAAcX,QAAQ;AAAA,IAAc;AAAA,EACxE;AAAA,EACAY,cAAc;AAAA,IACZ,GAAGC,WAAAA;AAAAA,IAEH,SAAS;AAAA,MACPV,iBAAiBC,YAAAA,MAAMM,OAAOI;AAAAA,IAChC;AAAA,IAEA,CAAE,uBAAsB,GAAG;AAAA,MACzBC,SAAS;AAAA,MACTC,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACAC,kBAAkB;AAAA,IAChBC,cAAe,aAAYd,
|
|
1
|
+
{"version":3,"file":"CheckBox.styles.cjs","sources":["../../../../src/components/CheckBox/CheckBox.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"@core/utils/focusUtils\";\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvCheckBox\", {\n root: { display: \"inline-block\" },\n container: {\n cursor: \"pointer\",\n display: \"flex\",\n height: \"32px\",\n transition: \"background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms\",\n\n \"&:hover\": {\n backgroundColor: theme.checkbox.hoverColor,\n borderRadius: theme.checkbox.borderRadius,\n },\n },\n disabled: {\n cursor: \"not-allowed\",\n \"& $label\": { color: theme.colors.secondary_60, cursor: \"not-allowed\" },\n },\n focusVisible: {\n ...outlineStyles,\n\n \"& div\": {\n backgroundColor: theme.colors.atmo3,\n },\n\n [`& $checkbox div > svg`]: {\n outline: \"none\",\n boxShadow: \"none\",\n },\n },\n invalidContainer: {\n borderBottom: `1px solid ${theme.colors.negative}`,\n\n \"&:hover\": {\n borderBottomLeftRadius: \"0px\",\n borderBottomRightRadius: \"0px\",\n },\n },\n checkbox: { height: \"32px\" },\n invalidCheckbox: {\n borderBottom: `1px solid ${theme.colors.negative}`,\n borderBottomLeftRadius: \"0px\",\n borderBottomRightRadius: \"0px\",\n },\n label: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n verticalAlign: \"middle\",\n paddingRight: theme.space.xs,\n whiteSpace: \"nowrap\",\n ...theme.typography.body,\n cursor: \"pointer\",\n height: \"32px\",\n lineHeight: \"32px\",\n width: \"100%\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","container","cursor","height","transition","backgroundColor","theme","checkbox","hoverColor","borderRadius","disabled","color","colors","secondary_60","focusVisible","outlineStyles","atmo3","outline","boxShadow","invalidContainer","borderBottom","negative","borderBottomLeftRadius","borderBottomRightRadius","invalidCheckbox","label","overflow","textOverflow","verticalAlign","paddingRight","space","xs","whiteSpace","typography","body","lineHeight","width"],"mappings":";;;;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,QAAAA,cAAc,cAAc;AAAA,EACvEC,MAAM;AAAA,IAAEC,SAAS;AAAA,EAAe;AAAA,EAChCC,WAAW;AAAA,IACTC,QAAQ;AAAA,IACRF,SAA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