@hitachivantara/uikit-react-core 5.91.3 → 5.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Accordion/Accordion.cjs +2 -2
- package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs +2 -2
- package/dist/cjs/AppSwitcher/Action/Action.cjs +10 -2
- package/dist/cjs/Avatar/Avatar.cjs +3 -2
- package/dist/cjs/BaseDropdown/BaseDropdown.cjs +5 -5
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +1 -1
- package/dist/cjs/BreadCrumb/PathElement/PathElement.cjs +4 -2
- package/dist/cjs/BreadCrumb/utils.cjs +2 -2
- package/dist/cjs/ButtonBase/ButtonBase.styles.cjs +1 -4
- package/dist/cjs/Calendar/CalendarNavigation/Navigation/Navigation.cjs +3 -3
- package/dist/cjs/Carousel/Carousel.cjs +4 -4
- package/dist/cjs/Carousel/CarouselControls.cjs +3 -3
- package/dist/cjs/ColorPicker/ColorPicker.cjs +2 -2
- package/dist/cjs/ColorPicker/ColorPicker.styles.cjs +4 -2
- package/dist/cjs/ColorPicker/SavedColors/SavedColors.cjs +3 -3
- package/dist/cjs/ColorPicker/SavedColors/SavedColors.styles.cjs +1 -10
- package/dist/cjs/DatePicker/DatePicker.cjs +2 -2
- package/dist/cjs/Dialog/Dialog.cjs +2 -2
- package/dist/cjs/Drawer/Drawer.cjs +2 -2
- package/dist/cjs/DropDownMenu/DropDownMenu.cjs +2 -2
- package/dist/cjs/DropDownMenu/DropDownMenu.styles.cjs +6 -1
- package/dist/cjs/DropdownButton/DropdownButton.cjs +5 -4
- package/dist/cjs/FileUploader/DropZone/DropZone.cjs +9 -2
- package/dist/cjs/FileUploader/File/File.cjs +4 -4
- package/dist/cjs/FileUploader/Preview/Preview.cjs +2 -2
- package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs +2 -2
- package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +5 -1
- package/dist/cjs/FormElement/InfoMessage/InfoMessage.styles.cjs +1 -1
- package/dist/cjs/FormElement/Label/Label.styles.cjs +1 -1
- package/dist/cjs/FormElement/Suggestions/Suggestions.cjs +2 -2
- package/dist/cjs/FormElement/WarningText/WarningText.cjs +2 -2
- package/dist/cjs/FormElement/WarningText/WarningText.styles.cjs +1 -1
- package/dist/cjs/InlineEditor/InlineEditor.cjs +3 -2
- package/dist/cjs/Input/Input.cjs +17 -27
- package/dist/cjs/Input/Input.styles.cjs +10 -12
- package/dist/cjs/Input/icons.cjs +4 -1
- package/dist/cjs/List/List.cjs +2 -2
- package/dist/cjs/Pagination/Pagination.cjs +5 -5
- package/dist/cjs/QueryBuilder/Rule/Rule.cjs +2 -2
- package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs +6 -5
- package/dist/cjs/Section/Section.cjs +2 -2
- package/dist/cjs/Table/TableHeader/TableHeader.cjs +8 -5
- package/dist/cjs/Table/TableHeader/utils.cjs +5 -6
- package/dist/cjs/Table/hooks/useHvRowExpand.cjs +2 -2
- package/dist/cjs/Table/renderers/renderers.cjs +2 -2
- package/dist/cjs/Tag/Tag.cjs +6 -5
- package/dist/cjs/Tag/Tag.styles.cjs +8 -3
- package/dist/cjs/TimePicker/TimePicker.cjs +2 -8
- package/dist/cjs/TimePicker/Unit/Unit.cjs +3 -3
- package/dist/cjs/TreeView/TreeView.cjs +3 -3
- package/dist/cjs/VerticalNavigation/Header/Header.cjs +4 -4
- package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.cjs +2 -2
- package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.cjs +3 -3
- package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +1 -1
- package/dist/cjs/icons.cjs +83 -0
- package/dist/cjs/utils/Callout.cjs +5 -3
- package/dist/cjs/utils/iconVariant.cjs +9 -13
- package/dist/esm/Accordion/Accordion.js +2 -2
- package/dist/esm/Accordion/Accordion.js.map +1 -1
- package/dist/esm/ActionsGeneric/ActionsGeneric.js +2 -2
- package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/esm/AppSwitcher/Action/Action.js +10 -2
- package/dist/esm/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/esm/Avatar/Avatar.js +3 -2
- package/dist/esm/Avatar/Avatar.js.map +1 -1
- package/dist/esm/BaseDropdown/BaseDropdown.js +5 -5
- package/dist/esm/BaseDropdown/BaseDropdown.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js +1 -1
- package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/BreadCrumb/PathElement/PathElement.js +4 -2
- package/dist/esm/BreadCrumb/PathElement/PathElement.js.map +1 -1
- package/dist/esm/BreadCrumb/utils.js +2 -2
- package/dist/esm/BreadCrumb/utils.js.map +1 -1
- package/dist/esm/ButtonBase/ButtonBase.styles.js +1 -4
- package/dist/esm/ButtonBase/ButtonBase.styles.js.map +1 -1
- package/dist/esm/Calendar/CalendarNavigation/Navigation/Navigation.js +3 -3
- package/dist/esm/Calendar/CalendarNavigation/Navigation/Navigation.js.map +1 -1
- package/dist/esm/Carousel/Carousel.js +4 -4
- package/dist/esm/Carousel/Carousel.js.map +1 -1
- package/dist/esm/Carousel/CarouselControls.js +3 -3
- package/dist/esm/Carousel/CarouselControls.js.map +1 -1
- package/dist/esm/ColorPicker/ColorPicker.js +2 -2
- package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/ColorPicker/ColorPicker.styles.js +4 -2
- package/dist/esm/ColorPicker/ColorPicker.styles.js.map +1 -1
- package/dist/esm/ColorPicker/SavedColors/SavedColors.js +3 -3
- package/dist/esm/ColorPicker/SavedColors/SavedColors.js.map +1 -1
- package/dist/esm/ColorPicker/SavedColors/SavedColors.styles.js +1 -10
- package/dist/esm/ColorPicker/SavedColors/SavedColors.styles.js.map +1 -1
- package/dist/esm/DatePicker/DatePicker.js +2 -2
- package/dist/esm/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/Dialog/Dialog.js +2 -2
- package/dist/esm/Dialog/Dialog.js.map +1 -1
- package/dist/esm/Drawer/Drawer.js +2 -2
- package/dist/esm/Drawer/Drawer.js.map +1 -1
- package/dist/esm/DropDownMenu/DropDownMenu.js +2 -2
- package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
- package/dist/esm/DropDownMenu/DropDownMenu.styles.js +6 -1
- package/dist/esm/DropDownMenu/DropDownMenu.styles.js.map +1 -1
- package/dist/esm/DropdownButton/DropdownButton.js +5 -4
- package/dist/esm/DropdownButton/DropdownButton.js.map +1 -1
- package/dist/esm/FileUploader/DropZone/DropZone.js +9 -2
- package/dist/esm/FileUploader/DropZone/DropZone.js.map +1 -1
- package/dist/esm/FileUploader/File/File.js +4 -4
- package/dist/esm/FileUploader/File/File.js.map +1 -1
- package/dist/esm/FileUploader/Preview/Preview.js +2 -2
- package/dist/esm/FileUploader/Preview/Preview.js.map +1 -1
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js +2 -2
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
- package/dist/esm/FormElement/Adornment/Adornment.styles.js +5 -1
- package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
- package/dist/esm/FormElement/InfoMessage/InfoMessage.styles.js +1 -1
- package/dist/esm/FormElement/InfoMessage/InfoMessage.styles.js.map +1 -1
- package/dist/esm/FormElement/Label/Label.styles.js +1 -1
- package/dist/esm/FormElement/Label/Label.styles.js.map +1 -1
- package/dist/esm/FormElement/Suggestions/Suggestions.js +2 -2
- package/dist/esm/FormElement/Suggestions/Suggestions.js.map +1 -1
- package/dist/esm/FormElement/WarningText/WarningText.js +2 -2
- package/dist/esm/FormElement/WarningText/WarningText.js.map +1 -1
- package/dist/esm/FormElement/WarningText/WarningText.styles.js +1 -1
- package/dist/esm/FormElement/WarningText/WarningText.styles.js.map +1 -1
- package/dist/esm/InlineEditor/InlineEditor.js +3 -2
- package/dist/esm/InlineEditor/InlineEditor.js.map +1 -1
- package/dist/esm/Input/Input.js +16 -26
- package/dist/esm/Input/Input.js.map +1 -1
- package/dist/esm/Input/Input.styles.js +10 -12
- package/dist/esm/Input/Input.styles.js.map +1 -1
- package/dist/esm/Input/icons.js +4 -1
- package/dist/esm/Input/icons.js.map +1 -1
- package/dist/esm/List/List.js +2 -2
- package/dist/esm/List/List.js.map +1 -1
- package/dist/esm/Pagination/Pagination.js +5 -5
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/QueryBuilder/Rule/Rule.js +2 -2
- package/dist/esm/QueryBuilder/Rule/Rule.js.map +1 -1
- package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js +6 -5
- package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
- package/dist/esm/Section/Section.js +2 -2
- package/dist/esm/Section/Section.js.map +1 -1
- package/dist/esm/Table/TableHeader/TableHeader.js +10 -7
- package/dist/esm/Table/TableHeader/TableHeader.js.map +1 -1
- package/dist/esm/Table/TableHeader/utils.js +5 -6
- package/dist/esm/Table/TableHeader/utils.js.map +1 -1
- package/dist/esm/Table/hooks/useHvRowExpand.js +2 -2
- package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
- package/dist/esm/Table/renderers/renderers.js +2 -2
- package/dist/esm/Table/renderers/renderers.js.map +1 -1
- package/dist/esm/Tag/Tag.js +6 -5
- package/dist/esm/Tag/Tag.js.map +1 -1
- package/dist/esm/Tag/Tag.styles.js +8 -3
- package/dist/esm/Tag/Tag.styles.js.map +1 -1
- package/dist/esm/TimePicker/TimePicker.js +4 -10
- package/dist/esm/TimePicker/TimePicker.js.map +1 -1
- package/dist/esm/TimePicker/Unit/Unit.js +3 -3
- package/dist/esm/TimePicker/Unit/Unit.js.map +1 -1
- package/dist/esm/TreeView/TreeView.js +3 -3
- package/dist/esm/TreeView/TreeView.js.map +1 -1
- package/dist/esm/VerticalNavigation/Header/Header.js +4 -4
- package/dist/esm/VerticalNavigation/Header/Header.js.map +1 -1
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js +2 -2
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js +3 -3
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +1 -1
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
- package/dist/esm/icons.js +83 -0
- package/dist/esm/icons.js.map +1 -1
- package/dist/esm/utils/Callout.js +5 -3
- package/dist/esm/utils/Callout.js.map +1 -1
- package/dist/esm/utils/iconVariant.js +9 -13
- package/dist/esm/utils/iconVariant.js.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/package.json +5 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import SnackbarContent from "@mui/material/SnackbarContent";
|
|
4
|
-
import { Close } from "@hitachivantara/uikit-react-icons";
|
|
5
4
|
import { useDefaultProps, createClasses, useTheme } from "@hitachivantara/uikit-react-utils";
|
|
6
5
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
6
|
+
import { HvIcon } from "../icons.js";
|
|
7
7
|
import { iconVariant } from "./iconVariant.js";
|
|
8
8
|
import { HvActionsGeneric } from "../ActionsGeneric/ActionsGeneric.js";
|
|
9
9
|
import { HvButton } from "../Button/Button.js";
|
|
@@ -43,7 +43,9 @@ const { useClasses } = createClasses("HvCallout", {
|
|
|
43
43
|
overflow: "hidden",
|
|
44
44
|
wordBreak: "break-word"
|
|
45
45
|
},
|
|
46
|
-
messageIcon: {
|
|
46
|
+
messageIcon: {
|
|
47
|
+
lineHeight: 0
|
|
48
|
+
},
|
|
47
49
|
messageTitle: {
|
|
48
50
|
display: "block",
|
|
49
51
|
fontWeight: theme.fontWeights.semibold
|
|
@@ -126,7 +128,7 @@ const HvCallout = forwardRef(function HvCallout2(props, ref) {
|
|
|
126
128
|
"aria-label": "Close",
|
|
127
129
|
onClick: (evt) => onClose?.(evt, "clickaway"),
|
|
128
130
|
...actionProps,
|
|
129
|
-
children: /* @__PURE__ */ jsx(
|
|
131
|
+
children: /* @__PURE__ */ jsx(HvIcon, { size: "xs", name: "Close" })
|
|
130
132
|
}
|
|
131
133
|
),
|
|
132
134
|
showCustomActions && actionsContent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sources":["../../../src/utils/Callout.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { SnackbarProps as MuiSnackbarProps } from \"@mui/material/Snackbar\";\nimport SnackbarContent, {\n type SnackbarContentProps as MuiSnackbarContentProps,\n} from \"@mui/material/SnackbarContent\";\nimport {
|
|
1
|
+
{"version":3,"file":"Callout.js","sources":["../../../src/utils/Callout.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { SnackbarProps as MuiSnackbarProps } from \"@mui/material/Snackbar\";\nimport SnackbarContent, {\n type SnackbarContentProps as MuiSnackbarContentProps,\n} from \"@mui/material/SnackbarContent\";\nimport {\n createClasses,\n useDefaultProps,\n useTheme,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { HvActionsGeneric, HvActionsGenericProps } from \"../ActionsGeneric\";\nimport { HvButton, HvButtonProps } from \"../Button\";\nimport { HvIcon } from \"../icons\";\nimport { iconVariant } from \"./iconVariant\";\n\nconst { useClasses } = createClasses(\"HvCallout\", {\n root: {\n position: \"relative\",\n boxShadow: \"none\",\n flexWrap: \"nowrap\",\n padding: 0,\n },\n success: {\n backgroundColor: theme.colors.positiveDimmed,\n },\n warning: {\n backgroundColor: theme.colors.warningDimmed,\n },\n error: {\n backgroundColor: theme.colors.negativeDimmed,\n },\n info: {\n backgroundColor: theme.colors.infoDimmed,\n },\n accent: {\n backgroundColor: theme.colors.accentDimmed,\n },\n default: {\n backgroundColor: theme.colors.infoDimmed,\n },\n message: {\n display: \"flex\",\n alignItems: \"center\",\n padding: 0,\n color: theme.colors.textDark,\n },\n messageContent: {\n textWrap: \"balance\",\n overflow: \"hidden\",\n wordBreak: \"break-word\",\n },\n messageIcon: {\n lineHeight: 0,\n },\n messageTitle: {\n display: \"block\",\n fontWeight: theme.fontWeights.semibold,\n },\n action: {\n marginRight: 0,\n },\n actionContent: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n justifyContent: \"space-between\",\n gap: theme.space.xs,\n },\n actionCustom: {\n flex: \"0 0 auto\",\n },\n actionClose: {\n alignSelf: \"flex-end\",\n },\n});\n\nexport type HvCalloutVariant =\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"default\"\n | \"info\"\n | \"accent\";\n\nexport type HvCalloutActionPosition = \"auto\" | \"inline\" | \"bottom-right\";\n\nexport type HvCalloutClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvCalloutProps\n extends Omit<\n MuiSnackbarContentProps,\n \"title\" | \"variant\" | \"classes\" | \"onClose\"\n > {\n /** The title to display. */\n title?: React.ReactNode;\n /** The message to display. */\n children?: React.ReactNode;\n /** Variant of the snackbar. */\n variant?: HvCalloutVariant;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Controls whether to show the close icon */\n showClose?: boolean;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** @inheritdoc */\n onClose?: MuiSnackbarProps[\"onClose\"];\n /** Actions to display on the right side. */\n actions?: HvActionsGenericProps[\"actions\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** The position property of the header. */\n actionsPosition?: HvCalloutActionPosition;\n /** The props to pass down to the Action Container. */\n actionProps?: Partial<HvButtonProps>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvCalloutClasses;\n}\n\n/**\n * `HvCallout` is the internal content handler for the snackbars and banners. Might be promoted to a component.\n * @private @internal\n */\nexport const HvCallout = forwardRef<\n // no-indent\n HTMLDivElement,\n HvCalloutProps\n>(function HvCallout(props, ref) {\n const {\n id,\n classes: classesProp,\n className,\n title,\n showClose,\n showIcon,\n customIcon,\n variant = \"default\",\n onClose,\n actions,\n onAction,\n actionsPosition: actionsPositionProp = \"auto\",\n children,\n actionProps,\n ...others\n } = useDefaultProps(\"HvCallout\", props);\n const { classes, cx } = useClasses(classesProp, false);\n const { activeTheme } = useTheme();\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n // TODO: consider making this flex-flow only, so it adapts according to the\n // content length, available space, number of actions, etc.\n const actionsPosition =\n actionsPositionProp === \"auto\" ? \"inline\" : actionsPositionProp;\n\n const actionsContent = (\n <HvActionsGeneric\n id={id}\n className={classes.actionCustom}\n variant={activeTheme?.snackbar.actionButtonVariant as any}\n actions={actions}\n onAction={onAction}\n />\n );\n\n const showCustomActions = actions && actionsPosition === \"bottom-right\";\n\n return (\n <SnackbarContent\n ref={ref}\n id={id}\n classes={{\n root: cx(classes.root, classes[variant], className),\n message: classes.message,\n action: classes.action,\n }}\n message={\n <>\n {icon && <div className={classes.messageIcon}>{icon}</div>}\n <div className={classes.messageContent}>\n {title && <b className={classes.messageTitle}>{title}</b>}\n {children}\n </div>\n {actions && actionsPosition === \"inline\" && actionsContent}\n </>\n }\n action={\n (showClose || showCustomActions) && (\n <div className={classes.actionContent}>\n {showClose && (\n <HvButton\n icon\n className={classes.actionClose}\n variant=\"semantic\"\n aria-label=\"Close\"\n onClick={(evt) => onClose?.(evt, \"clickaway\")}\n {...actionProps}\n >\n <HvIcon size=\"xs\" name=\"Close\" />\n </HvButton>\n )}\n {showCustomActions && actionsContent}\n </div>\n )\n }\n {...others}\n />\n );\n});\n"],"names":["HvCallout"],"mappings":";;;;;;;;;AAkBA,MAAM,EAAE,WAAA,IAAe,cAAc,aAAa;AAAA,EAChD,MAAM;AAAA,IACJ,UAAU;AAAA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oBAAA,QAAA,EAAO,MAAK,MAAK,MAAK,QAAQ,CAAA;AAAA,UAAA;AAAA,QACjC;AAAA,QAED,qBAAqB;AAAA,MAAA,GACxB;AAAA,MAGH,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ,CAAC;"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { HvIcon } from "../icons.js";
|
|
3
|
+
const variantIconMap = {
|
|
4
|
+
success: "Success",
|
|
5
|
+
warning: "Caution",
|
|
6
|
+
error: "Fail",
|
|
7
|
+
info: "Info"
|
|
8
|
+
};
|
|
3
9
|
const iconVariant = (variant, color) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return /* @__PURE__ */ jsx(Success, { color });
|
|
7
|
-
case "warning":
|
|
8
|
-
return /* @__PURE__ */ jsx(Caution, { color });
|
|
9
|
-
case "error":
|
|
10
|
-
return /* @__PURE__ */ jsx(Fail, { color });
|
|
11
|
-
case "info":
|
|
12
|
-
return /* @__PURE__ */ jsx(Info, { color });
|
|
13
|
-
default:
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
10
|
+
if (variant === "default" || variant === "accent") return null;
|
|
11
|
+
return /* @__PURE__ */ jsx(HvIcon, { name: variantIconMap[variant], color });
|
|
16
12
|
};
|
|
17
13
|
export {
|
|
18
14
|
iconVariant
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconVariant.js","sources":["../../../src/utils/iconVariant.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"iconVariant.js","sources":["../../../src/utils/iconVariant.tsx"],"sourcesContent":["import { HvColorAny } from \"@hitachivantara/uikit-styles\";\n\nimport { HvIcon } from \"../icons\";\nimport type { HvCalloutVariant } from \"./Callout\";\n\nconst variantIconMap = {\n success: \"Success\",\n warning: \"Caution\",\n error: \"Fail\",\n info: \"Info\",\n} as const;\n\nexport const iconVariant = (variant: HvCalloutVariant, color?: HvColorAny) => {\n if (variant === \"default\" || variant === \"accent\") return null;\n\n return <HvIcon name={variantIconMap[variant]} color={color} />;\n};\n"],"names":[],"mappings":";;AAKA,MAAM,iBAAiB;AAAA,EACrB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AACR;AAEa,MAAA,cAAc,CAAC,SAA2B,UAAuB;AAC5E,MAAI,YAAY,aAAa,YAAY,SAAiB,QAAA;AAE1D,6BAAQ,QAAO,EAAA,MAAM,eAAe,OAAO,GAAG,OAAc;AAC9D;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -53,7 +53,6 @@ import { HvThemeColorModeStructure } from '@hitachivantara/uikit-styles';
|
|
|
53
53
|
import { HvThemeContext } from '@hitachivantara/uikit-react-shared';
|
|
54
54
|
import { HvThemeContextValue } from '@hitachivantara/uikit-react-shared';
|
|
55
55
|
import { HvThemeStructure } from '@hitachivantara/uikit-styles';
|
|
56
|
-
import { IconBaseProps } from '@hitachivantara/uikit-react-icons';
|
|
57
56
|
import { IdType as IdType_2 } from 'react-table';
|
|
58
57
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
59
58
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -708,7 +707,7 @@ declare const DEFAULT_LABELS_3: {
|
|
|
708
707
|
declare const DEFAULT_LABELS_4: {
|
|
709
708
|
/** The label of the clear button. */
|
|
710
709
|
clearButtonLabel: string;
|
|
711
|
-
/** The label of the reveal password button. */
|
|
710
|
+
/** The label of the reveal password button. @deprecated unused */
|
|
712
711
|
revealPasswordButtonLabel: string;
|
|
713
712
|
/** The tooltip of the reveal password button when the password is hidden. */
|
|
714
713
|
revealPasswordButtonClickToShowTooltip: string;
|
|
@@ -7467,7 +7466,7 @@ export declare interface HvWarningTextProps extends HvBaseProps {
|
|
|
7467
7466
|
classes?: HvWarningTextClasses;
|
|
7468
7467
|
}
|
|
7469
7468
|
|
|
7470
|
-
export declare const iconVariant: (variant: HvCalloutVariant, color?:
|
|
7469
|
+
export declare const iconVariant: (variant: HvCalloutVariant, color?: HvColorAny) => JSX_2.Element | null;
|
|
7471
7470
|
|
|
7472
7471
|
declare type IdType<D> = StringKey<D> | string;
|
|
7473
7472
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.92.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -32,10 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@emotion/cache": "^11.11.0",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
|
-
"@hitachivantara/uikit-react-
|
|
36
|
-
"@hitachivantara/uikit-react-
|
|
37
|
-
"@hitachivantara/uikit-
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.44.3",
|
|
35
|
+
"@hitachivantara/uikit-react-shared": "^5.3.31",
|
|
36
|
+
"@hitachivantara/uikit-react-utils": "^0.2.32",
|
|
37
|
+
"@hitachivantara/uikit-styles": "^5.45.0",
|
|
39
38
|
"@internationalized/date": "^3.2.0",
|
|
40
39
|
"@mui/base": "5.0.0-beta.68",
|
|
41
40
|
"@popperjs/core": "^2.11.8",
|
|
@@ -62,7 +61,7 @@
|
|
|
62
61
|
"access": "public",
|
|
63
62
|
"directory": "package"
|
|
64
63
|
},
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "63a3b4cee40c7f8cbc42e4d2e53c3c67b828ca68",
|
|
66
65
|
"exports": {
|
|
67
66
|
".": {
|
|
68
67
|
"types": "./dist/types/index.d.ts",
|