@hitachivantara/uikit-react-core 5.87.3 → 5.89.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/ActionsGeneric/ActionsGeneric.cjs +2 -3
- package/dist/cjs/AppSwitcher/Action/Action.styles.cjs +2 -2
- package/dist/cjs/Banner/Banner.cjs +5 -5
- package/dist/cjs/Banner/BannerContent/BannerContent.cjs +59 -97
- package/dist/cjs/Banner/BannerContent/BannerContent.styles.cjs +18 -46
- package/dist/cjs/BaseDropdown/BaseDropdown.styles.cjs +1 -2
- package/dist/cjs/BaseInput/BaseInput.styles.cjs +1 -1
- package/dist/cjs/BaseInput/validations.cjs +2 -1
- package/dist/cjs/Button/Button.cjs +1 -2
- package/dist/cjs/Button/Button.styles.cjs +0 -6
- package/dist/cjs/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/cjs/DatePicker/DatePicker.cjs +12 -12
- package/dist/cjs/DotPagination/DotPagination.styles.cjs +3 -0
- package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs +1 -1
- package/dist/cjs/FormElement/Adornment/Adornment.cjs +15 -36
- package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +12 -21
- package/dist/cjs/IconContainer/IconContainer.cjs +81 -0
- package/dist/cjs/Input/Input.cjs +29 -51
- package/dist/cjs/Input/Input.styles.cjs +1 -0
- package/dist/cjs/List/List.cjs +1 -1
- package/dist/cjs/ListContainer/ListItem/ListItem.styles.cjs +0 -6
- package/dist/cjs/Loading/Loading.cjs +1 -2
- package/dist/cjs/Loading/Loading.styles.cjs +3 -1
- package/dist/cjs/Pagination/Pagination.styles.cjs +2 -2
- package/dist/cjs/Pagination/Select.cjs +1 -1
- package/dist/cjs/Snackbar/Snackbar.cjs +6 -5
- package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +20 -28
- package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs +26 -56
- package/dist/cjs/Table/TableBody/TableBody.cjs +16 -17
- package/dist/cjs/{TableSection → Table/TableSection}/TableSection.cjs +2 -2
- package/dist/cjs/{TableSection → Table/TableSection}/TableSection.styles.cjs +12 -12
- package/dist/cjs/Table/hooks/useHvRowExpand.cjs +3 -3
- package/dist/cjs/Tabs/Tab/Tab.styles.cjs +0 -3
- package/dist/cjs/Tag/Tag.cjs +1 -1
- package/dist/cjs/TagsInput/TagsInput.cjs +103 -169
- package/dist/cjs/TagsInput/TagsInput.styles.cjs +45 -106
- package/dist/cjs/TextArea/TextArea.cjs +1 -3
- package/dist/cjs/TimePicker/TimePicker.cjs +5 -4
- package/dist/cjs/Typography/Typography.styles.cjs +2 -1
- package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +0 -3
- package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +0 -4
- package/dist/cjs/hooks/useFocus.cjs +38 -0
- package/dist/cjs/index.cjs +9 -4
- package/dist/cjs/utils/Callout.cjs +134 -0
- package/dist/cjs/utils/focusUtils.cjs +0 -4
- package/dist/esm/ActionsGeneric/ActionsGeneric.js +2 -3
- package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
- package/dist/esm/AppSwitcher/Action/Action.styles.js +2 -2
- package/dist/esm/AppSwitcher/Action/Action.styles.js.map +1 -1
- package/dist/esm/AvatarGroup/AvatarGroupContext.js +1 -1
- package/dist/esm/Banner/Banner.js +5 -5
- package/dist/esm/Banner/Banner.js.map +1 -1
- package/dist/esm/Banner/BannerContent/BannerContent.js +60 -96
- package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
- package/dist/esm/Banner/BannerContent/BannerContent.styles.js +18 -46
- package/dist/esm/Banner/BannerContent/BannerContent.styles.js.map +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.js +1 -1
- package/dist/esm/BaseDropdown/BaseDropdown.js +3 -3
- package/dist/esm/BaseDropdown/BaseDropdown.styles.js +1 -2
- package/dist/esm/BaseDropdown/BaseDropdown.styles.js.map +1 -1
- package/dist/esm/BaseInput/BaseInput.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/BaseInput/validations.js +2 -1
- package/dist/esm/BaseInput/validations.js.map +1 -1
- package/dist/esm/BaseRadio/BaseRadio.js +1 -1
- package/dist/esm/Button/Button.js +3 -4
- package/dist/esm/Button/Button.js.map +1 -1
- package/dist/esm/Button/Button.styles.js +0 -6
- package/dist/esm/Button/Button.styles.js.map +1 -1
- package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js +1 -1
- package/dist/esm/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
- package/dist/esm/ColorPicker/ColorPicker.js +1 -1
- package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/ColorPicker/Fields/Fields.js.map +1 -1
- package/dist/esm/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/DatePicker/utils.js +1 -1
- package/dist/esm/Dialog/context.js +1 -1
- package/dist/esm/DotPagination/DotPagination.js +1 -1
- package/dist/esm/DotPagination/DotPagination.styles.js +3 -0
- package/dist/esm/DotPagination/DotPagination.styles.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/DropdownButton/DropdownButton.js.map +1 -1
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js +1 -1
- package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
- package/dist/esm/FilterGroup/FilterGroupContext.js +1 -1
- package/dist/esm/Focus/Focus.js +1 -1
- package/dist/esm/FormElement/Adornment/Adornment.js +15 -36
- package/dist/esm/FormElement/Adornment/Adornment.js.map +1 -1
- package/dist/esm/FormElement/Adornment/Adornment.styles.js +12 -21
- package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
- package/dist/esm/Header/Navigation/useSelectionPath.js.map +1 -1
- package/dist/esm/IconContainer/IconContainer.js +81 -0
- package/dist/esm/IconContainer/IconContainer.js.map +1 -0
- package/dist/esm/Input/Input.js +30 -52
- package/dist/esm/Input/Input.js.map +1 -1
- package/dist/esm/Input/Input.styles.js +1 -0
- package/dist/esm/Input/Input.styles.js.map +1 -1
- package/dist/esm/List/List.js +1 -1
- package/dist/esm/ListContainer/ListItem/ListItem.styles.js +0 -6
- package/dist/esm/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/Loading/Loading.js +1 -2
- package/dist/esm/Loading/Loading.js.map +1 -1
- package/dist/esm/Loading/Loading.styles.js +3 -1
- package/dist/esm/Loading/Loading.styles.js.map +1 -1
- package/dist/esm/Pagination/Pagination.styles.js +5 -5
- package/dist/esm/Pagination/Select.js +1 -1
- package/dist/esm/QueryBuilder/Context.js +1 -1
- package/dist/esm/QueryBuilder/QueryBuilder.js +1 -1
- package/dist/esm/QueryBuilder/utils/index.js +1 -1
- package/dist/esm/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/SelectionList/SelectionList.js.map +1 -1
- package/dist/esm/Slider/Slider.js +1 -1
- package/dist/esm/Slider/Slider.js.map +1 -1
- package/dist/esm/Snackbar/Snackbar.js +6 -5
- package/dist/esm/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +23 -29
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js +26 -56
- package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
- package/dist/esm/SnackbarProvider/SnackbarProvider.js +2 -2
- package/dist/esm/Table/Table.js.map +1 -1
- package/dist/esm/Table/TableBody/TableBody.js +16 -17
- package/dist/esm/Table/TableBody/TableBody.js.map +1 -1
- package/dist/esm/{TableSection → Table/TableSection}/TableSection.js +2 -2
- package/dist/esm/Table/TableSection/TableSection.js.map +1 -0
- package/dist/esm/{TableSection → Table/TableSection}/TableSection.styles.js +25 -25
- package/dist/esm/Table/TableSection/TableSection.styles.js.map +1 -0
- package/dist/esm/Table/hooks/useHvRowExpand.js +3 -3
- package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
- package/dist/esm/Tabs/Tab/Tab.styles.js +0 -3
- package/dist/esm/Tabs/Tab/Tab.styles.js.map +1 -1
- package/dist/esm/Tag/Tag.js +1 -1
- package/dist/esm/Tag/Tag.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.js +103 -169
- package/dist/esm/TagsInput/TagsInput.js.map +1 -1
- package/dist/esm/TagsInput/TagsInput.styles.js +45 -106
- package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
- package/dist/esm/TextArea/TextArea.js +1 -3
- package/dist/esm/TextArea/TextArea.js.map +1 -1
- package/dist/esm/TimePicker/TimePicker.js +1 -0
- package/dist/esm/TimePicker/TimePicker.js.map +1 -1
- package/dist/esm/TreeView/internals/TreeViewProvider.js +1 -1
- package/dist/esm/TreeView/internals/hooks/plugins/useTreeViewKeyboardNavigation.js +1 -1
- package/dist/esm/Typography/Typography.styles.js +2 -1
- package/dist/esm/Typography/Typography.styles.js.map +1 -1
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +0 -3
- package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +0 -4
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
- package/dist/esm/hooks/useFocus.js +38 -0
- package/dist/esm/hooks/useFocus.js.map +1 -0
- package/dist/esm/hooks/useScrollTo.js.map +1 -1
- package/dist/esm/index.js +56 -51
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/Callout.js +132 -0
- package/dist/esm/utils/Callout.js.map +1 -0
- package/dist/esm/utils/document.js.map +1 -1
- package/dist/esm/utils/focusUtils.js +0 -4
- package/dist/esm/utils/focusUtils.js.map +1 -1
- package/dist/types/index.d.ts +677 -670
- package/package.json +8 -8
- package/dist/esm/TableSection/TableSection.js.map +0 -1
- package/dist/esm/TableSection/TableSection.styles.js.map +0 -1
|
@@ -6,9 +6,9 @@ const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
|
6
6
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
7
7
|
const setId = require("../utils/setId.cjs");
|
|
8
8
|
const ActionsGeneric_styles = require("./ActionsGeneric.styles.cjs");
|
|
9
|
+
const DropDownMenu = require("../DropDownMenu/DropDownMenu.cjs");
|
|
9
10
|
const IconButton = require("../IconButton/IconButton.cjs");
|
|
10
11
|
const Button = require("../Button/Button.cjs");
|
|
11
|
-
const DropDownMenu = require("../DropDownMenu/DropDownMenu.cjs");
|
|
12
12
|
const HvActionsGeneric = React.forwardRef(function HvActionsGeneric2(props, ref) {
|
|
13
13
|
const {
|
|
14
14
|
id: idProp,
|
|
@@ -64,8 +64,7 @@ const HvActionsGeneric = React.forwardRef(function HvActionsGeneric2(props, ref)
|
|
|
64
64
|
const renderActionsGrid = () => {
|
|
65
65
|
const actsVisible = actions.slice(0, maxVisibleActions);
|
|
66
66
|
const actsDropdown = actions.slice(maxVisibleActions);
|
|
67
|
-
const
|
|
68
|
-
const iconColor = disabled && "secondary_60" || semantic && "base_dark" || void 0;
|
|
67
|
+
const iconColor = variant === "semantic" && "base_dark" || void 0;
|
|
69
68
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
70
69
|
actsVisible.map((action, idx) => renderButton(action, idx)),
|
|
71
70
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -26,7 +26,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses(
|
|
|
26
26
|
borderLeft: `solid 2px ${uikitStyles.theme.colors.secondary}`,
|
|
27
27
|
cursor: "pointer",
|
|
28
28
|
textDecoration: "inherit",
|
|
29
|
-
color: "inherit",
|
|
30
29
|
backgroundColor: "inherit",
|
|
31
30
|
"$disabled &": {
|
|
32
31
|
cursor: "not-allowed"
|
|
@@ -38,7 +37,8 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses(
|
|
|
38
37
|
textAlign: "left",
|
|
39
38
|
margin: `0 ${uikitStyles.theme.space.xs}`,
|
|
40
39
|
textWrap: "balance",
|
|
41
|
-
...uikitStyles.theme.typography.label
|
|
40
|
+
...uikitStyles.theme.typography.label,
|
|
41
|
+
color: "inherit"
|
|
42
42
|
},
|
|
43
43
|
titleAnchor: {
|
|
44
44
|
WebkitLineClamp: 2
|
|
@@ -19,17 +19,17 @@ const HvBanner = React.forwardRef(function HvBanner2(props, ref) {
|
|
|
19
19
|
open,
|
|
20
20
|
onClose,
|
|
21
21
|
anchorOrigin = "top",
|
|
22
|
-
variant
|
|
22
|
+
variant,
|
|
23
23
|
transitionDuration = 300,
|
|
24
24
|
transitionDirection = "down",
|
|
25
25
|
container,
|
|
26
|
-
showIcon
|
|
26
|
+
showIcon,
|
|
27
27
|
customIcon,
|
|
28
28
|
actions,
|
|
29
29
|
actionsCallback,
|
|
30
30
|
// TODO - remove in v6
|
|
31
31
|
onAction,
|
|
32
|
-
actionsPosition
|
|
32
|
+
actionsPosition,
|
|
33
33
|
label,
|
|
34
34
|
offset = 60,
|
|
35
35
|
bannerContentProps,
|
|
@@ -72,7 +72,6 @@ const HvBanner = React.forwardRef(function HvBanner2(props, ref) {
|
|
|
72
72
|
BannerContent.HvBannerContent,
|
|
73
73
|
{
|
|
74
74
|
id: setId.setId(id, "content"),
|
|
75
|
-
content: label,
|
|
76
75
|
variant,
|
|
77
76
|
customIcon,
|
|
78
77
|
showIcon,
|
|
@@ -81,7 +80,8 @@ const HvBanner = React.forwardRef(function HvBanner2(props, ref) {
|
|
|
81
80
|
onAction,
|
|
82
81
|
actionsPosition,
|
|
83
82
|
onClose,
|
|
84
|
-
...bannerContentProps
|
|
83
|
+
...bannerContentProps,
|
|
84
|
+
children: label
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
}
|
|
@@ -2,107 +2,69 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const iconVariant = require("../../utils/iconVariant.cjs");
|
|
8
|
-
const setId = require("../../utils/setId.cjs");
|
|
5
|
+
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
6
|
+
const Callout = require("../../utils/Callout.cjs");
|
|
9
7
|
const BannerContent_styles = require("./BannerContent.styles.cjs");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const HvBannerContent = React.forwardRef(function HvBannerContent2(props, ref) {
|
|
9
|
+
const {
|
|
10
|
+
id,
|
|
11
|
+
classes: classesProp,
|
|
12
|
+
className,
|
|
13
|
+
showIcon,
|
|
14
|
+
customIcon,
|
|
15
|
+
variant = "default",
|
|
16
|
+
onClose,
|
|
17
|
+
actions,
|
|
18
|
+
actionsCallback,
|
|
19
|
+
// TODO - remove in v6
|
|
20
|
+
onAction,
|
|
21
|
+
actionsPosition = "auto",
|
|
22
|
+
content,
|
|
23
|
+
children,
|
|
24
|
+
actionProps,
|
|
25
|
+
...others
|
|
26
|
+
} = uikitReactUtils.useDefaultProps("HvBannerContent", props);
|
|
27
|
+
const { classes, cx } = BannerContent_styles.useClasses(classesProp);
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
Callout.HvCallout,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
17
32
|
id,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
showIcon
|
|
33
|
+
variant,
|
|
34
|
+
showClose: true,
|
|
35
|
+
showIcon,
|
|
21
36
|
customIcon,
|
|
22
|
-
|
|
23
|
-
|
|
37
|
+
classes: {
|
|
38
|
+
root: cx(
|
|
39
|
+
classes.root,
|
|
40
|
+
classes.outContainer,
|
|
41
|
+
classes.baseVariant,
|
|
42
|
+
classes[variant],
|
|
43
|
+
className
|
|
44
|
+
),
|
|
45
|
+
message: classes.message,
|
|
46
|
+
action: classes.action,
|
|
47
|
+
messageIcon: classes.iconContainer,
|
|
48
|
+
messageContent: classes.messageContainer,
|
|
49
|
+
actionCustom: classes.messageActions,
|
|
50
|
+
actionContent: cx(
|
|
51
|
+
classes.actionContainer,
|
|
52
|
+
classes.actionsInnerContainer
|
|
53
|
+
),
|
|
54
|
+
actionClose: classes.closeAction
|
|
55
|
+
},
|
|
24
56
|
actions,
|
|
25
|
-
|
|
26
|
-
// TODO - remove in v6
|
|
27
|
-
onAction,
|
|
28
|
-
actionsPosition = "auto",
|
|
29
|
-
content,
|
|
30
|
-
children,
|
|
57
|
+
actionsPosition,
|
|
31
58
|
actionProps,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
SnackbarContent__default.default,
|
|
43
|
-
{
|
|
44
|
-
ref,
|
|
45
|
-
id,
|
|
46
|
-
classes: {
|
|
47
|
-
root: classes.root,
|
|
48
|
-
message: classes.message,
|
|
49
|
-
action: classes.action
|
|
50
|
-
},
|
|
51
|
-
className: cx(classes.baseVariant, classes[variant], className),
|
|
52
|
-
message: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
53
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.iconContainer, children: icon }),
|
|
54
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
id: setId.setId(id, "message-text"),
|
|
58
|
-
className: classes.messageContainer,
|
|
59
|
-
children: children ?? content
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
actions && effectiveActionsPosition === "inline" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
id: setId.setId(id, "message-actions"),
|
|
66
|
-
className: classes.messageActions,
|
|
67
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
-
ActionsGeneric.HvActionsGeneric,
|
|
69
|
-
{
|
|
70
|
-
id,
|
|
71
|
-
variant: "semantic",
|
|
72
|
-
actions,
|
|
73
|
-
onAction: handleAction
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] }),
|
|
79
|
-
action: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.actionContainer, children: [
|
|
80
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
-
Button.HvButton,
|
|
82
|
-
{
|
|
83
|
-
icon: true,
|
|
84
|
-
className: classes.closeAction,
|
|
85
|
-
variant: "semantic",
|
|
86
|
-
"aria-label": "Close",
|
|
87
|
-
onClick: onClose,
|
|
88
|
-
...actionProps,
|
|
89
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Close, { size: "XS" })
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
actions && effectiveActionsPosition === "bottom-right" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.actionsInnerContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
93
|
-
ActionsGeneric.HvActionsGeneric,
|
|
94
|
-
{
|
|
95
|
-
id,
|
|
96
|
-
variant: "semantic",
|
|
97
|
-
actions,
|
|
98
|
-
onAction: handleAction
|
|
99
|
-
}
|
|
100
|
-
) })
|
|
101
|
-
] }),
|
|
102
|
-
...others
|
|
103
|
-
}
|
|
104
|
-
) });
|
|
105
|
-
}
|
|
106
|
-
);
|
|
59
|
+
onClose: (evt) => onClose?.(evt),
|
|
60
|
+
onAction: (evt, action) => {
|
|
61
|
+
onAction?.(evt, action);
|
|
62
|
+
actionsCallback?.(evt, id, action);
|
|
63
|
+
},
|
|
64
|
+
...others,
|
|
65
|
+
children: children ?? content
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
});
|
|
107
69
|
exports.bannerContentClasses = BannerContent_styles.staticClasses;
|
|
108
70
|
exports.HvBannerContent = HvBannerContent;
|
|
@@ -5,72 +5,44 @@ const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
|
5
5
|
const { useClasses, staticClasses } = uikitReactUtils.createClasses("HvBannerContent", {
|
|
6
6
|
root: {
|
|
7
7
|
minWidth: "100%",
|
|
8
|
+
width: "100%",
|
|
8
9
|
position: "relative",
|
|
9
|
-
|
|
10
|
-
flexWrap: "nowrap",
|
|
11
|
-
boxShadow: "none",
|
|
10
|
+
gap: uikitStyles.theme.space.xs,
|
|
12
11
|
borderRadius: uikitStyles.theme.radii.none
|
|
13
12
|
},
|
|
13
|
+
success: {},
|
|
14
|
+
warning: {},
|
|
15
|
+
error: {},
|
|
16
|
+
default: {},
|
|
14
17
|
message: {
|
|
15
|
-
|
|
16
|
-
alignItems: "center",
|
|
18
|
+
gap: uikitStyles.theme.space.xs,
|
|
17
19
|
padding: uikitStyles.theme.spacing("xs", 0),
|
|
18
20
|
paddingLeft: uikitStyles.theme.space.sm,
|
|
19
21
|
...uikitStyles.theme.typography.body,
|
|
20
22
|
color: uikitStyles.theme.colors.base_dark
|
|
21
23
|
},
|
|
22
24
|
action: {
|
|
23
|
-
padding: uikitStyles.theme.
|
|
24
|
-
marginRight: 0,
|
|
25
|
+
padding: uikitStyles.theme.space.xs,
|
|
25
26
|
flex: "0 0 auto",
|
|
26
27
|
placeSelf: "stretch"
|
|
27
28
|
},
|
|
28
|
-
baseVariant: {
|
|
29
|
-
padding: 0
|
|
30
|
-
},
|
|
31
|
-
success: {
|
|
32
|
-
backgroundColor: uikitStyles.theme.colors.positive_20
|
|
33
|
-
},
|
|
34
|
-
warning: {
|
|
35
|
-
backgroundColor: uikitStyles.theme.colors.warning_20
|
|
36
|
-
},
|
|
37
|
-
error: {
|
|
38
|
-
backgroundColor: uikitStyles.theme.colors.negative_20
|
|
39
|
-
},
|
|
40
|
-
default: {
|
|
41
|
-
backgroundColor: uikitStyles.theme.colors.neutral_20
|
|
42
|
-
},
|
|
43
|
-
outContainer: {
|
|
44
|
-
width: "100%",
|
|
45
|
-
position: "relative"
|
|
46
|
-
},
|
|
47
29
|
messageContainer: {
|
|
48
|
-
|
|
49
|
-
maxWidth: 700,
|
|
50
|
-
overflow: "hidden",
|
|
51
|
-
marginRight: 10
|
|
30
|
+
maxWidth: 700
|
|
52
31
|
},
|
|
53
32
|
iconContainer: {
|
|
54
|
-
|
|
55
|
-
marginLeft: -uikitStyles.theme.space.xs
|
|
33
|
+
marginLeft: uikitStyles.theme.spacing(-1)
|
|
56
34
|
},
|
|
57
35
|
messageActions: {
|
|
58
36
|
flex: "0 0 auto"
|
|
59
37
|
},
|
|
60
|
-
actionContainer: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
marginTop: "8px"
|
|
69
|
-
// avoid overlap with close button outline focus ring
|
|
70
|
-
},
|
|
71
|
-
closeAction: {
|
|
72
|
-
alignSelf: "flex-end"
|
|
73
|
-
}
|
|
38
|
+
actionContainer: {},
|
|
39
|
+
closeAction: {},
|
|
40
|
+
/** @deprecated use ´classes.root` instead */
|
|
41
|
+
baseVariant: {},
|
|
42
|
+
/** @deprecated use `classes.root` instead */
|
|
43
|
+
outContainer: {},
|
|
44
|
+
/** @deprecated use `classes.actionContainer` instead */
|
|
45
|
+
actionsInnerContainer: {}
|
|
74
46
|
});
|
|
75
47
|
exports.staticClasses = staticClasses;
|
|
76
48
|
exports.useClasses = useClasses;
|
|
@@ -79,8 +79,7 @@ const { useClasses, staticClasses } = uikitReactUtils.createClasses("HvBaseDropd
|
|
|
79
79
|
height: "30px",
|
|
80
80
|
boxSizing: "border-box",
|
|
81
81
|
paddingLeft: uikitStyles.theme.space.xs,
|
|
82
|
-
paddingRight: uikitStyles.theme.sizes.sm
|
|
83
|
-
color: "inherit"
|
|
82
|
+
paddingRight: uikitStyles.theme.sizes.sm
|
|
84
83
|
},
|
|
85
84
|
selectionDisabled: {},
|
|
86
85
|
placeholder: {
|
|
@@ -96,7 +96,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBaseInput
|
|
|
96
96
|
height: "100%",
|
|
97
97
|
marginLeft: uikitStyles.theme.space.xs,
|
|
98
98
|
marginRight: uikitStyles.theme.space.xs,
|
|
99
|
-
padding:
|
|
99
|
+
padding: 0,
|
|
100
100
|
backgroundColor: "transparent",
|
|
101
101
|
overflow: "hidden",
|
|
102
102
|
textOverflow: "ellipsis",
|
|
@@ -49,7 +49,7 @@ const computeValidationMessage = (inputValidity, errorMessages) => {
|
|
|
49
49
|
}
|
|
50
50
|
return errorMessages.error;
|
|
51
51
|
};
|
|
52
|
-
const validateInput = (input,
|
|
52
|
+
const validateInput = (input, required, minCharQuantity, maxCharQuantity, validationType, validation) => {
|
|
53
53
|
const inputValidity = {
|
|
54
54
|
valid: input?.validity?.valid ?? true,
|
|
55
55
|
badInput: input?.validity?.badInput,
|
|
@@ -63,6 +63,7 @@ const validateInput = (input, value, required, minCharQuantity, maxCharQuantity,
|
|
|
63
63
|
typeMismatch: input?.validity?.typeMismatch,
|
|
64
64
|
valueMissing: input?.validity?.valueMissing
|
|
65
65
|
};
|
|
66
|
+
const value = input?.value;
|
|
66
67
|
if (!value) {
|
|
67
68
|
if (required) {
|
|
68
69
|
inputValidity.valueMissing = true;
|
|
@@ -30,7 +30,7 @@ const HvButton = generic.fixedForwardRef(function HvButton2(props, ref) {
|
|
|
30
30
|
endIcon,
|
|
31
31
|
size,
|
|
32
32
|
radius,
|
|
33
|
-
overrideIconColors
|
|
33
|
+
overrideIconColors,
|
|
34
34
|
component: Component = "button",
|
|
35
35
|
focusableWhenDisabled,
|
|
36
36
|
onClick: onClickProp,
|
|
@@ -68,7 +68,6 @@ const HvButton = generic.fixedForwardRef(function HvButton2(props, ref) {
|
|
|
68
68
|
classes[variant],
|
|
69
69
|
classes[variantProp],
|
|
70
70
|
// Placed after type and color CSS for DS3 override
|
|
71
|
-
overrideIconColors && css(Button_styles.getOverrideColors()),
|
|
72
71
|
{
|
|
73
72
|
[classes.icon]: icon,
|
|
74
73
|
[classes.disabled]: disabled
|
|
@@ -130,13 +130,7 @@ const getIconSizeStyles = (size) => {
|
|
|
130
130
|
width: height
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
|
-
const getOverrideColors = () => ({
|
|
134
|
-
"& svg .color0": {
|
|
135
|
-
fill: "currentcolor"
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
133
|
exports.getIconSizeStyles = getIconSizeStyles;
|
|
139
|
-
exports.getOverrideColors = getOverrideColors;
|
|
140
134
|
exports.getSizeStyles = getSizeStyles;
|
|
141
135
|
exports.staticClasses = staticClasses;
|
|
142
136
|
exports.useClasses = useClasses;
|
|
@@ -16,8 +16,8 @@ const FormElement = require("../FormElement/FormElement.cjs");
|
|
|
16
16
|
const Label = require("../FormElement/Label/Label.cjs");
|
|
17
17
|
const InfoMessage = require("../FormElement/InfoMessage/InfoMessage.cjs");
|
|
18
18
|
const BaseDropdown = require("../BaseDropdown/BaseDropdown.cjs");
|
|
19
|
-
const Typography = require("../Typography/Typography.cjs");
|
|
20
19
|
const Panel = require("../Panel/Panel.cjs");
|
|
20
|
+
const Typography = require("../Typography/Typography.cjs");
|
|
21
21
|
const DEFAULT_LABELS = {
|
|
22
22
|
recommendedColorsLabel: "Recommended colors:",
|
|
23
23
|
customColorsLabel: "Custom colors:"
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const utils = require("@mui/material/utils");
|
|
5
|
+
const utils$1 = require("@mui/material/utils");
|
|
6
6
|
const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
7
7
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
8
|
-
const utils
|
|
8
|
+
const utils = require("../Calendar/utils.cjs");
|
|
9
9
|
const useControlled = require("../hooks/useControlled.cjs");
|
|
10
10
|
const useLabels = require("../hooks/useLabels.cjs");
|
|
11
11
|
const useUniqueId = require("../hooks/useUniqueId.cjs");
|
|
@@ -13,10 +13,10 @@ const setId = require("../utils/setId.cjs");
|
|
|
13
13
|
const useSavedState = require("../utils/useSavedState.cjs");
|
|
14
14
|
const DatePicker_styles = require("./DatePicker.styles.cjs");
|
|
15
15
|
const useVisibleDate = require("./useVisibleDate.cjs");
|
|
16
|
-
const utils$
|
|
16
|
+
const utils$2 = require("./utils.cjs");
|
|
17
17
|
const Calendar = require("../Calendar/Calendar.cjs");
|
|
18
18
|
const Button = require("../Button/Button.cjs");
|
|
19
|
-
const utils$
|
|
19
|
+
const utils$3 = require("../FormElement/utils.cjs");
|
|
20
20
|
const FormElement = require("../FormElement/FormElement.cjs");
|
|
21
21
|
const Label = require("../FormElement/Label/Label.cjs");
|
|
22
22
|
const InfoMessage = require("../FormElement/InfoMessage/InfoMessage.cjs");
|
|
@@ -65,7 +65,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
65
65
|
rangeMode = false,
|
|
66
66
|
startAdornment,
|
|
67
67
|
horizontalPlacement = "right",
|
|
68
|
-
locale = utils
|
|
68
|
+
locale = utils.DEFAULT_LOCALE,
|
|
69
69
|
showActions,
|
|
70
70
|
showClear,
|
|
71
71
|
disablePortal = true,
|
|
@@ -93,7 +93,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
93
93
|
const [visibleDate, dispatchAction] = useVisibleDate.default(startDate, endDate);
|
|
94
94
|
const focusTarget = React.useRef(null);
|
|
95
95
|
const { ref: refProp, ...otherDropdownProps } = dropdownProps;
|
|
96
|
-
const dropdownForkedRef = utils.useForkRef(ref, refProp);
|
|
96
|
+
const dropdownForkedRef = utils$1.useForkRef(ref, refProp);
|
|
97
97
|
React.useEffect(() => {
|
|
98
98
|
setStartDate(rangeMode ? startValue : value, true);
|
|
99
99
|
setEndDate(endValue, true);
|
|
@@ -125,7 +125,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
125
125
|
setEndDate(endDate ?? startDate, true);
|
|
126
126
|
onChange?.(startDate, endDate);
|
|
127
127
|
setValidationState(() => {
|
|
128
|
-
if (required && (!utils
|
|
128
|
+
if (required && (!utils.isDate(startDate) || rangeMode && !utils.isDate(endDate))) {
|
|
129
129
|
return "invalid";
|
|
130
130
|
}
|
|
131
131
|
return "valid";
|
|
@@ -158,7 +158,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
158
158
|
focusTarget.current?.focus();
|
|
159
159
|
};
|
|
160
160
|
const handleDateChange = (event, newDate) => {
|
|
161
|
-
if (!utils
|
|
161
|
+
if (!utils.isDate(newDate)) return;
|
|
162
162
|
const autoSave = !showActions && !rangeMode;
|
|
163
163
|
if (rangeMode) {
|
|
164
164
|
if (!startDate || startDate && endDate || newDate < startDate) {
|
|
@@ -173,7 +173,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
173
173
|
if (autoSave) {
|
|
174
174
|
onChange?.(newDate);
|
|
175
175
|
setValidationState(() => {
|
|
176
|
-
if (required && !utils
|
|
176
|
+
if (required && !utils.isDate(newDate)) {
|
|
177
177
|
return "invalid";
|
|
178
178
|
}
|
|
179
179
|
return "valid";
|
|
@@ -182,7 +182,7 @@ const HvDatePicker = React.forwardRef(
|
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
const handleInputDateChange = (event, newDate, position) => {
|
|
185
|
-
if (!utils
|
|
185
|
+
if (!utils.isDate(newDate)) return;
|
|
186
186
|
if (!rangeMode) {
|
|
187
187
|
handleDateChange(event, newDate);
|
|
188
188
|
return;
|
|
@@ -232,11 +232,11 @@ const HvDatePicker = React.forwardRef(
|
|
|
232
232
|
] })
|
|
233
233
|
] });
|
|
234
234
|
const dateValue = rangeMode ? { startDate, endDate } : startDate;
|
|
235
|
-
const dateString = utils$
|
|
235
|
+
const dateString = utils$2.getDateLabel(dateValue, rangeMode, locale);
|
|
236
236
|
const hasLabel = label != null;
|
|
237
237
|
const hasDescription = description != null;
|
|
238
238
|
const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && required);
|
|
239
|
-
const isStateInvalid = utils$
|
|
239
|
+
const isStateInvalid = utils$3.isInvalid(validationState);
|
|
240
240
|
let errorMessageId;
|
|
241
241
|
if (isStateInvalid) {
|
|
242
242
|
errorMessageId = canShowError ? setId.setId(elementId, "error") : ariaErrorMessage;
|
|
@@ -15,6 +15,7 @@ const { useClasses, staticClasses } = uikitReactUtils.createClasses("HvDotPagina
|
|
|
15
15
|
height: 16,
|
|
16
16
|
width: 16,
|
|
17
17
|
minWidth: 16,
|
|
18
|
+
color: "inherit",
|
|
18
19
|
"&:hover": {
|
|
19
20
|
backgroundColor: uikitStyles.theme.colors.neutral_20,
|
|
20
21
|
borderRadius: "100%"
|
|
@@ -24,7 +25,9 @@ const { useClasses, staticClasses } = uikitReactUtils.createClasses("HvDotPagina
|
|
|
24
25
|
minWidth: 0,
|
|
25
26
|
width: 16,
|
|
26
27
|
height: 16,
|
|
28
|
+
color: "inherit",
|
|
27
29
|
"&& svg": {
|
|
30
|
+
color: "inherit",
|
|
28
31
|
border: "none",
|
|
29
32
|
width: "unset",
|
|
30
33
|
height: "unset"
|
|
@@ -12,8 +12,8 @@ const RightPanel = require("../RightPanel/RightPanel.cjs");
|
|
|
12
12
|
const Button = require("../../Button/Button.cjs");
|
|
13
13
|
const Typography = require("../../Typography/Typography.cjs");
|
|
14
14
|
const BaseDropdown = require("../../BaseDropdown/BaseDropdown.cjs");
|
|
15
|
-
const Counter = require("../Counter/Counter.cjs");
|
|
16
15
|
const ActionBar = require("../../ActionBar/ActionBar.cjs");
|
|
16
|
+
const Counter = require("../Counter/Counter.cjs");
|
|
17
17
|
const HvFilterGroupContent = React.forwardRef(function HvFilterGroupContent2(props, ref) {
|
|
18
18
|
const {
|
|
19
19
|
id,
|
|
@@ -6,68 +6,47 @@ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
|
6
6
|
const context = require("../context.cjs");
|
|
7
7
|
const Adornment_styles = require("./Adornment.styles.cjs");
|
|
8
8
|
const ButtonBase = require("../../ButtonBase/ButtonBase.cjs");
|
|
9
|
-
const noop = () => {
|
|
10
|
-
};
|
|
11
9
|
const HvAdornment = React.forwardRef(function HvAdornment2(props, ref) {
|
|
12
10
|
const {
|
|
13
|
-
id,
|
|
14
11
|
classes: classesProp,
|
|
15
12
|
className,
|
|
16
13
|
icon,
|
|
17
14
|
showWhen,
|
|
18
15
|
onClick,
|
|
19
16
|
isVisible,
|
|
17
|
+
tabIndex,
|
|
20
18
|
...others
|
|
21
19
|
} = uikitReactUtils.useDefaultProps("HvAdornment", props);
|
|
22
20
|
const { classes, cx } = Adornment_styles.useClasses(classesProp);
|
|
23
21
|
const { status, disabled } = React.useContext(context.HvFormElementContext);
|
|
24
22
|
const { input } = React.useContext(context.HvFormElementDescriptorsContext);
|
|
25
23
|
const displayIcon = isVisible ?? (showWhen == null || status === showWhen);
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
|
|
24
|
+
const Component = onClick ? ButtonBase.HvButtonBase : "div";
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
Component,
|
|
29
27
|
{
|
|
30
|
-
id,
|
|
31
|
-
focusableWhenDisabled: true,
|
|
32
28
|
ref,
|
|
33
|
-
|
|
34
|
-
tabIndex: -1,
|
|
35
|
-
"aria-controls": input?.[0]?.id,
|
|
29
|
+
"aria-hidden": tabIndex == null || tabIndex < 0 ? true : void 0,
|
|
36
30
|
className: cx(
|
|
37
31
|
classes.root,
|
|
38
32
|
classes.adornment,
|
|
39
|
-
classes.
|
|
33
|
+
classes.icon,
|
|
34
|
+
onClick ? classes.adornmentButton : classes.adornmentIcon,
|
|
40
35
|
{
|
|
41
36
|
[classes.hideIcon]: !displayIcon,
|
|
42
37
|
[classes.disabled]: disabled
|
|
43
38
|
},
|
|
44
39
|
className
|
|
45
40
|
),
|
|
46
|
-
onClick
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
...onClick && {
|
|
42
|
+
disabled,
|
|
43
|
+
tabIndex: tabIndex ?? -1,
|
|
44
|
+
"aria-controls": input?.[0]?.id,
|
|
45
|
+
onClick,
|
|
46
|
+
onMouseDown: (event) => event.preventDefault()
|
|
47
|
+
},
|
|
50
48
|
...others,
|
|
51
|
-
children:
|
|
52
|
-
}
|
|
53
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
-
"div",
|
|
55
|
-
{
|
|
56
|
-
id,
|
|
57
|
-
ref,
|
|
58
|
-
className: cx(
|
|
59
|
-
classes.root,
|
|
60
|
-
classes.adornment,
|
|
61
|
-
classes.adornmentIcon,
|
|
62
|
-
{
|
|
63
|
-
[classes.hideIcon]: !displayIcon,
|
|
64
|
-
[classes.disabled]: disabled
|
|
65
|
-
},
|
|
66
|
-
className
|
|
67
|
-
),
|
|
68
|
-
role: "presentation",
|
|
69
|
-
...others,
|
|
70
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.icon, children: icon })
|
|
49
|
+
children: icon
|
|
71
50
|
}
|
|
72
51
|
);
|
|
73
52
|
});
|
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
4
|
-
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
5
|
-
const focusUtils = require("../../utils/focusUtils.cjs");
|
|
6
4
|
const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvAdornment", {
|
|
7
|
-
root: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
backgroundColor: "transparent",
|
|
11
|
-
border: "none",
|
|
12
|
-
padding: 0,
|
|
13
|
-
margin: 0
|
|
5
|
+
root: {
|
|
6
|
+
width: 32,
|
|
7
|
+
height: 30
|
|
14
8
|
},
|
|
15
|
-
|
|
9
|
+
/** @deprecated use `classes.root` */
|
|
10
|
+
icon: {},
|
|
11
|
+
/** @deprecated use `classes.root` */
|
|
12
|
+
adornment: {},
|
|
13
|
+
/** @deprecated use `classes.root` */
|
|
14
|
+
adornmentIcon: {},
|
|
16
15
|
hideIcon: { display: "none" },
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
...focusUtils.outlineStyles
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
disabled: {
|
|
24
|
-
"&$adornmentButton": { cursor: "not-allowed" },
|
|
25
|
-
"&$adornmentIcon": { cursor: "not-allowed" },
|
|
26
|
-
"& svg *.color0": { fill: uikitStyles.theme.colors.secondary_60 }
|
|
27
|
-
}
|
|
16
|
+
/** @deprecated use `classes.root` */
|
|
17
|
+
adornmentButton: {},
|
|
18
|
+
disabled: {}
|
|
28
19
|
});
|
|
29
20
|
exports.staticClasses = staticClasses;
|
|
30
21
|
exports.useClasses = useClasses;
|