@hitachivantara/uikit-react-core 5.96.3 → 5.98.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.
Files changed (46) hide show
  1. package/dist/cjs/AppSwitcher/Action/Action.cjs +1 -1
  2. package/dist/cjs/BreadCrumb/utils.cjs +1 -1
  3. package/dist/cjs/FilterGroup/Counter/Counter.cjs +1 -1
  4. package/dist/cjs/Header/Navigation/MenuBar/Bar.cjs +1 -1
  5. package/dist/cjs/InlineEditor/InlineEditor.cjs +1 -1
  6. package/dist/cjs/List/List.cjs +3 -3
  7. package/dist/cjs/StatusIcon/StatusIcon.cjs +45 -0
  8. package/dist/cjs/StatusIcon/StatusIcon.styles.cjs +57 -0
  9. package/dist/cjs/Table/hooks/useHvRowSelection.cjs +4 -4
  10. package/dist/cjs/TextArea/TextArea.cjs +1 -1
  11. package/dist/cjs/TimePicker/Placeholder.cjs +2 -2
  12. package/dist/cjs/TimePicker/TimePicker.cjs +2 -2
  13. package/dist/cjs/TreeView/TreeItem/TreeItem.cjs +1 -1
  14. package/dist/cjs/TreeView/TreeItem/useHvTreeItem.cjs +1 -19
  15. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.cjs +2 -2
  16. package/dist/cjs/hooks/useForkRef.cjs +1 -19
  17. package/dist/cjs/hooks/useImageLoaded.cjs +3 -9
  18. package/dist/cjs/index.cjs +4 -0
  19. package/dist/cjs/themes/ds3.cjs +7 -0
  20. package/dist/cjs/themes/ds5.cjs +11 -0
  21. package/dist/cjs/themes/pentahoPlus.cjs +3 -9
  22. package/dist/cjs/utils/Callout.cjs +10 -5
  23. package/dist/esm/AppSwitcher/Action/Action.js +1 -1
  24. package/dist/esm/BreadCrumb/utils.js +1 -1
  25. package/dist/esm/FilterGroup/Counter/Counter.js +1 -1
  26. package/dist/esm/Header/Navigation/MenuBar/Bar.js +1 -1
  27. package/dist/esm/InlineEditor/InlineEditor.js +1 -1
  28. package/dist/esm/List/List.js +3 -3
  29. package/dist/esm/StatusIcon/StatusIcon.js +46 -0
  30. package/dist/esm/StatusIcon/StatusIcon.styles.js +57 -0
  31. package/dist/esm/Table/hooks/useHvRowSelection.js +4 -4
  32. package/dist/esm/TextArea/TextArea.js +1 -1
  33. package/dist/esm/TimePicker/Placeholder.js +2 -2
  34. package/dist/esm/TimePicker/TimePicker.js +2 -2
  35. package/dist/esm/TreeView/TreeItem/TreeItem.js +1 -1
  36. package/dist/esm/TreeView/TreeItem/useHvTreeItem.js +2 -2
  37. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js +2 -2
  38. package/dist/esm/hooks/useForkRef.js +2 -2
  39. package/dist/esm/hooks/useImageLoaded.js +3 -9
  40. package/dist/esm/index.js +63 -59
  41. package/dist/esm/themes/ds3.js +7 -0
  42. package/dist/esm/themes/ds5.js +11 -0
  43. package/dist/esm/themes/pentahoPlus.js +3 -9
  44. package/dist/esm/utils/Callout.js +10 -5
  45. package/dist/types/index.d.ts +119 -82
  46. package/package.json +5 -5
@@ -45,7 +45,7 @@ const HvAppSwitcherAction = ({
45
45
  );
46
46
  }
47
47
  const brokenTitle = name.split(" ");
48
- const initials = brokenTitle[0].substring(0, 1) + (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : "");
48
+ const initials = brokenTitle[0].slice(0, 1) + (brokenTitle[1] ? brokenTitle[1].slice(0, 1) : "");
49
49
  return /* @__PURE__ */ jsxRuntime.jsx(Avatar.HvAvatar, { size: "sm", backgroundColor: color, variant: "square", "aria-hidden": true, children: initials });
50
50
  };
51
51
  const isSelected = isSelectedCallback(application);
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const icons = require("../icons.cjs");
5
5
  const setId = require("../utils/setId.cjs");
6
6
  const DropDownMenu = require("../DropDownMenu/DropDownMenu.cjs");
7
- const removeExtension = (label) => label.includes(".") ? label.substring(0, label.lastIndexOf(".")) : label;
7
+ const removeExtension = (label) => label.includes(".") ? label.slice(0, label.lastIndexOf(".")) : label;
8
8
  const pathWithSubMenu = (id, listRoute, maxVisible, onClick, dropDownMenuProps) => {
9
9
  const nbrElemToSubMenu = listRoute.length - maxVisible;
10
10
  const subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);
@@ -26,7 +26,7 @@ const HvFilterGroupCounter = (props) => {
26
26
  filterValues = [],
27
27
  appliedFilters = []
28
28
  } = React.useContext(FilterGroupContext.HvFilterGroupContext);
29
- const options = groupId && filterOptions.find((option) => option.id === groupId) ? [filterOptions.find((option) => option.id === groupId)] : filterOptions;
29
+ const options = groupId && filterOptions.some((option) => option.id === groupId) ? [filterOptions.find((option) => option.id === groupId)] : filterOptions;
30
30
  const optionIdx = filterOptions.findIndex((option) => option.id === groupId);
31
31
  let groupsCounter = 0;
32
32
  appliedFilters.forEach((fg, i) => {
@@ -17,7 +17,7 @@ const Bar = (props) => {
17
17
  const { classes, cx } = Bar_styles.useClasses(classesProp);
18
18
  const selectionPath = React.useContext(SelectionContext.SelectionContext);
19
19
  const isMenu = type === "menu";
20
- const isActive = isMenu && data.filter((item) => item.id === selectionPath?.[1]).length > 0;
20
+ const isActive = isMenu && data.some((item) => item.id === selectionPath?.[1]);
21
21
  return /* @__PURE__ */ jsxRuntime.jsx(
22
22
  "div",
23
23
  {
@@ -111,7 +111,7 @@ const HvInlineEditor = generic.fixedForwardRef(function HvInlineEditor2(props, r
111
111
  }
112
112
  ),
113
113
  className: cx(classes.button, {
114
- [classes.largeText]: parseInt(lineHeight, 10) >= 28
114
+ [classes.largeText]: Number(lineHeight) >= 28
115
115
  }),
116
116
  onClick: handleClick,
117
117
  disabled,
@@ -177,9 +177,9 @@ const HvList = (props) => {
177
177
  return renderListItem(item, index, {
178
178
  style: {
179
179
  ...style,
180
- top: `${parseFloat(style.top) + 5}px`,
181
- left: `${parseFloat(style.left) + 5}px`,
182
- width: `calc(${parseFloat(style.width)}% - 10px)`
180
+ top: `${Number.parseFloat(style.top) + 5}px`,
181
+ left: `${Number.parseFloat(style.left) + 5}px`,
182
+ width: `calc(${Number.parseFloat(style.width)}% - 10px)`
183
183
  },
184
184
  tabIndex,
185
185
  interactive: true,
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
+ const icons = require("../icons.cjs");
7
+ const StatusIcon_styles = require("./StatusIcon.styles.cjs");
8
+ const IconContainer = require("../IconContainer/IconContainer.cjs");
9
+ const variantIconMap = {
10
+ success: "Success",
11
+ warning: "Caution",
12
+ error: "Fail",
13
+ info: "Info"
14
+ };
15
+ const HvStatusIcon = React.forwardRef(function HvStatusIcon2(props, ref) {
16
+ const {
17
+ classes: classesProp,
18
+ className,
19
+ variant = "default",
20
+ customIcon,
21
+ size = "sm",
22
+ type = "full"
23
+ } = uikitReactUtils.useDefaultProps("HvStatusIcon", props);
24
+ const { classes, cx } = StatusIcon_styles.useClasses(classesProp);
25
+ return /* @__PURE__ */ jsxRuntime.jsx(
26
+ "div",
27
+ {
28
+ ref,
29
+ "data-variant": variant,
30
+ "data-type": type,
31
+ "data-size": size,
32
+ className: cx(classes.root, className),
33
+ children: /* @__PURE__ */ jsxRuntime.jsx(IconContainer.HvIconContainer, { size, children: customIcon || /* @__PURE__ */ jsxRuntime.jsx(
34
+ icons.HvIcon,
35
+ {
36
+ compact: true,
37
+ className: classes.icon,
38
+ name: variantIconMap[variant]
39
+ }
40
+ ) })
41
+ }
42
+ );
43
+ });
44
+ exports.statusIconClasses = StatusIcon_styles.staticClasses;
45
+ exports.HvStatusIcon = HvStatusIcon;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
+ const uikitStyles = require("@hitachivantara/uikit-styles");
5
+ const notificationMap = {
6
+ success: "positive",
7
+ warning: "warning",
8
+ error: "negative",
9
+ default: "info",
10
+ info: "info",
11
+ accent: "accent"
12
+ };
13
+ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvStatusIcon", {
14
+ root: {
15
+ display: "inline-flex",
16
+ lineHeight: 0,
17
+ flexShrink: 0,
18
+ padding: uikitStyles.theme.space.xxs,
19
+ "--icsize": "auto",
20
+ [`&[data-size=xs]`]: { borderRadius: uikitStyles.theme.radii.base },
21
+ [`&[data-size=sm]`]: { borderRadius: uikitStyles.theme.radii.base },
22
+ [`&[data-size=md]`]: { borderRadius: uikitStyles.theme.radii.round },
23
+ [`&[data-size=lg]`]: { borderRadius: uikitStyles.theme.radii.large },
24
+ [`&[data-size=xl]`]: { borderRadius: uikitStyles.theme.radii.large },
25
+ [`:not([data-type="simple"])`]: {
26
+ outline: "1px solid currentcolor"
27
+ },
28
+ ...Object.fromEntries(
29
+ Object.entries(notificationMap).map(([variant, color]) => [
30
+ [`&[data-variant="${variant}"]`],
31
+ {
32
+ color: uikitStyles.theme.colors[color],
33
+ outline: `1px solid ${uikitStyles.theme.colors[`${color}Border`]}`,
34
+ backgroundColor: uikitStyles.theme.colors[`${color}Dimmed`],
35
+ [`&[data-type="simple"]`]: {
36
+ outline: "none",
37
+ backgroundColor: "transparent"
38
+ }
39
+ }
40
+ ])
41
+ ),
42
+ [`&[data-variant="default"]`]: {
43
+ color: uikitStyles.theme.colors.text,
44
+ backgroundColor: uikitStyles.theme.colors.bgContainerSecondary,
45
+ outline: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
46
+ [`&[data-type="simple"]`]: {
47
+ outline: "none",
48
+ backgroundColor: "transparent"
49
+ }
50
+ }
51
+ },
52
+ icon: {
53
+ fontSize: "inherit"
54
+ }
55
+ });
56
+ exports.staticClasses = staticClasses;
57
+ exports.useClasses = useClasses;
@@ -123,7 +123,7 @@ function reducer(state, action, previousState, instance) {
123
123
  applyToggleAllRowsSelectedToPrefilteredRows
124
124
  } = instance;
125
125
  const rowsToSelect = applyToggleAllRowsSelectedToPrefilteredRows ? initialRowsById : nonGroupedRowsById;
126
- const selectAll = typeof setSelected !== "undefined" ? setSelected : !isAllRowsSelected;
126
+ const selectAll = setSelected ?? !isAllRowsSelected;
127
127
  const selectedRowIds = { ...state.selectedRowIds };
128
128
  if (selectAll) {
129
129
  Object.keys(rowsToSelect).forEach((rowId) => {
@@ -153,7 +153,7 @@ function reducer(state, action, previousState, instance) {
153
153
  }
154
154
  const { rowsById, selectSubRows = true, getSubRows } = instance;
155
155
  const isSelected = state.selectedRowIds[id];
156
- const shouldExist = typeof setSelected !== "undefined" ? setSelected : !isSelected;
156
+ const shouldExist = setSelected ?? !isSelected;
157
157
  if (isSelected === shouldExist) {
158
158
  return state;
159
159
  }
@@ -188,7 +188,7 @@ function reducer(state, action, previousState, instance) {
188
188
  isAllPageRowsSelected,
189
189
  getSubRows
190
190
  } = instance;
191
- const selectAll = typeof setSelected !== "undefined" ? setSelected : !isAllPageRowsSelected;
191
+ const selectAll = setSelected ?? !isAllPageRowsSelected;
192
192
  const newSelectedRowIds = { ...state.selectedRowIds };
193
193
  const handleRowById = (rowId) => {
194
194
  const row = rowsById[rowId];
@@ -222,7 +222,7 @@ function reducer(state, action, previousState, instance) {
222
222
  const { id, value: setLockedSelection } = action;
223
223
  const { rowsById, selectSubRows = true, getSubRows } = instance;
224
224
  const isLockedSelection = state.lockedSelectionRowIds[id];
225
- const shouldExist = typeof setLockedSelection !== "undefined" ? setLockedSelection : !isLockedSelection;
225
+ const shouldExist = setLockedSelection ?? !isLockedSelection;
226
226
  if (isLockedSelection === shouldExist) {
227
227
  return state;
228
228
  }
@@ -109,7 +109,7 @@ const HvTextArea = React.forwardRef(function HvTextArea2(props, ref) {
109
109
  const limitValue = (currentValue) => {
110
110
  if (currentValue === void 0 || !blockMax) return currentValue;
111
111
  const isOverflow = maxCharQuantity == null ? false : currentValue.length > maxCharQuantity;
112
- return !isOverflow ? currentValue : currentValue.substring(0, maxCharQuantity);
112
+ return !isOverflow ? currentValue : currentValue.slice(0, maxCharQuantity);
113
113
  };
114
114
  const onContainerBlurHandler = (event) => {
115
115
  setFocused(false);
@@ -36,14 +36,14 @@ const Placeholder = React.forwardRef(
36
36
  ...others,
37
37
  children: [
38
38
  name && /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: getDateValue(value) }),
39
- segments.map((segment, i) => /* @__PURE__ */ jsxRuntime.jsx(
39
+ segments.map((segment) => /* @__PURE__ */ jsxRuntime.jsx(
40
40
  PlaceholderSegment,
41
41
  {
42
42
  segment,
43
43
  state,
44
44
  placeholder: placeholders[segment.type]
45
45
  },
46
- i
46
+ segment.type
47
47
  ))
48
48
  ]
49
49
  }
@@ -183,7 +183,7 @@ const HvTimePicker = React.forwardRef(
183
183
  ]
184
184
  },
185
185
  ...otherDropdownProps,
186
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: timeFieldRef, className: classes.timePopperContainer, children: state.segments.map((segment, i) => /* @__PURE__ */ jsxRuntime.jsx(
186
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: timeFieldRef, className: classes.timePopperContainer, children: state.segments.map((segment) => /* @__PURE__ */ jsxRuntime.jsx(
187
187
  Unit.Unit,
188
188
  {
189
189
  state,
@@ -195,7 +195,7 @@ const HvTimePicker = React.forwardRef(
195
195
  state.setSegment(segment.type, Number(val));
196
196
  }
197
197
  },
198
- i
198
+ segment.type
199
199
  )) })
200
200
  }
201
201
  ),
@@ -73,7 +73,7 @@ const HvTreeItem = React.forwardRef(
73
73
  if (instance && label) {
74
74
  return instance.mapFirstChar(
75
75
  nodeId,
76
- (contentRef.current?.textContent ?? "").substring(0, 1).toLowerCase()
76
+ (contentRef.current?.textContent ?? "").slice(0, 1).toLowerCase()
77
77
  );
78
78
  }
79
79
  return void 0;
@@ -3,27 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
4
  const DescendantProvider = require("../internals/DescendantProvider.cjs");
5
5
  const TreeViewProvider = require("../internals/TreeViewProvider.cjs");
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
8
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
- if (e) {
10
- for (const k in e) {
11
- if (k !== "default") {
12
- const d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: () => e[k]
16
- });
17
- }
18
- }
19
- }
20
- n.default = e;
21
- return Object.freeze(n);
22
- }
23
- const React__namespace = /* @__PURE__ */ _interopNamespace(React);
24
6
  function useHvTreeItem(nodeId) {
25
7
  const { instance, multiSelect } = TreeViewProvider.useTreeViewContext();
26
- const { level = 0 } = React__namespace.useContext(DescendantProvider.DescendantContext);
8
+ const { level = 0 } = React.useContext(DescendantProvider.DescendantContext);
27
9
  const expandable = instance ? instance.isNodeExpandable(nodeId) : false;
28
10
  const expanded = instance ? instance.isNodeExpanded(nodeId) : false;
29
11
  const focused = instance ? instance.isNodeFocused(nodeId) : false;
@@ -120,7 +120,7 @@ const HvVerticalNavigationTreeViewItem = React.forwardRef(
120
120
  if (mapFirstChar && unMapFirstChar && label && contentRef.current?.textContent) {
121
121
  mapFirstChar(
122
122
  nodeId,
123
- contentRef.current?.textContent.substring(0, 1).toLowerCase()
123
+ contentRef.current?.textContent.slice(0, 1).toLowerCase()
124
124
  );
125
125
  return () => {
126
126
  unMapFirstChar(nodeId);
@@ -311,7 +311,7 @@ const HvVerticalNavigationTreeViewItem = React.forwardRef(
311
311
  variant: "square",
312
312
  size: "xs",
313
313
  backgroundColor: "textSubtle",
314
- children: payload?.label?.substring(0, 1)
314
+ children: payload?.label?.slice(0, 1)
315
315
  }
316
316
  ) : useIcons && icon,
317
317
  hasChildren && !isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "Forwards", size: "xs", compact: true }) : hasAnyChildWithData && !isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", {})
@@ -1,24 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const React = require("react");
4
- function _interopNamespace(e) {
5
- if (e && e.__esModule) return e;
6
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
- if (e) {
8
- for (const k in e) {
9
- if (k !== "default") {
10
- const d = Object.getOwnPropertyDescriptor(e, k);
11
- Object.defineProperty(n, k, d.get ? d : {
12
- enumerable: true,
13
- get: () => e[k]
14
- });
15
- }
16
- }
17
- }
18
- n.default = e;
19
- return Object.freeze(n);
20
- }
21
- const React__namespace = /* @__PURE__ */ _interopNamespace(React);
22
4
  const setRef = (ref, value) => {
23
5
  if (typeof ref === "function") {
24
6
  ref(value);
@@ -27,7 +9,7 @@ const setRef = (ref, value) => {
27
9
  }
28
10
  };
29
11
  const useForkRef = (refA, refB) => {
30
- return React__namespace.useMemo(() => {
12
+ return React.useMemo(() => {
31
13
  if (refA == null && refB == null) {
32
14
  return null;
33
15
  }
@@ -4,24 +4,18 @@ const React = require("react");
4
4
  const useImageLoaded = (src, srcSet) => {
5
5
  const [imageLoaded, setImageLoaded] = React.useState(false);
6
6
  React.useEffect(() => {
7
- if (!src && !srcSet) {
8
- return void 0;
9
- }
7
+ if (!src && !srcSet) return;
10
8
  setImageLoaded(false);
11
9
  let active = true;
12
10
  const image = new Image();
13
11
  image.src = src || "";
14
12
  image.srcset = srcSet || "";
15
13
  image.onload = () => {
16
- if (!active) {
17
- return;
18
- }
14
+ if (!active) return;
19
15
  setImageLoaded("loaded");
20
16
  };
21
17
  image.onerror = () => {
22
- if (!active) {
23
- return;
24
- }
18
+ if (!active) return;
25
19
  setImageLoaded("error");
26
20
  };
27
21
  return () => {
@@ -231,6 +231,8 @@ const SnackbarProvider_styles = require("./SnackbarProvider/SnackbarProvider.sty
231
231
  const SnackbarProvider = require("./SnackbarProvider/SnackbarProvider.cjs");
232
232
  const Stack_styles = require("./Stack/Stack.styles.cjs");
233
233
  const Stack = require("./Stack/Stack.cjs");
234
+ const StatusIcon_styles = require("./StatusIcon/StatusIcon.styles.cjs");
235
+ const StatusIcon = require("./StatusIcon/StatusIcon.cjs");
234
236
  const Switch_styles = require("./Switch/Switch.styles.cjs");
235
237
  const Switch = require("./Switch/Switch.cjs");
236
238
  const useHvTable = require("./Table/hooks/useHvTable.cjs");
@@ -575,6 +577,8 @@ exports.HvSnackbarProvider = SnackbarProvider.HvSnackbarProvider;
575
577
  exports.useHvSnackbar = SnackbarProvider.useHvSnackbar;
576
578
  exports.stackClasses = Stack_styles.staticClasses;
577
579
  exports.HvStack = Stack.HvStack;
580
+ exports.statusIconClasses = StatusIcon_styles.staticClasses;
581
+ exports.HvStatusIcon = StatusIcon.HvStatusIcon;
578
582
  exports.switchClasses = Switch_styles.staticClasses;
579
583
  exports.HvSwitch = Switch.HvSwitch;
580
584
  exports.useHvData = useHvTable.useHvTable;
@@ -21,6 +21,10 @@ const ds3 = uikitStyles.mergeTheme(uikitStyles.ds3, {
21
21
  classes: {
22
22
  root: {
23
23
  borderRadius: 0
24
+ },
25
+ messageIcon: {
26
+ color: "inherit !important",
27
+ padding: 0
24
28
  }
25
29
  }
26
30
  },
@@ -1202,6 +1206,9 @@ const ds3 = uikitStyles.mergeTheme(uikitStyles.ds3, {
1202
1206
  maxHeight: "calc(100% - (2 * 100px))"
1203
1207
  }
1204
1208
  }
1209
+ },
1210
+ HvStatusIcon: {
1211
+ type: "simple"
1205
1212
  }
1206
1213
  }
1207
1214
  });
@@ -78,6 +78,14 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
78
78
  }
79
79
  }
80
80
  },
81
+ HvCallout: {
82
+ classes: {
83
+ messageIcon: {
84
+ color: "inherit !important",
85
+ padding: 0
86
+ }
87
+ }
88
+ },
81
89
  HvDropdownButton: {
82
90
  classes: {
83
91
  open: {
@@ -118,6 +126,9 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
118
126
  }
119
127
  }
120
128
  },
129
+ HvStatusIcon: {
130
+ type: "simple"
131
+ },
121
132
  HvTab: {
122
133
  classes: {
123
134
  root: {
@@ -51,10 +51,8 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
51
51
  Object.entries(notificationMap).map(([variant, color]) => [
52
52
  variant,
53
53
  {
54
- backgroundColor: uikitStyles.theme.colors[`${color}Dimmed`],
54
+ backgroundColor: uikitStyles.theme.mix(`${color}Dimmed`, 0.5, "dimmer"),
55
55
  "--icolor": uikitStyles.theme.colors[color],
56
- "--outline": uikitStyles.theme.colors[`${color}Border`],
57
- "--bg": uikitStyles.theme.colors[`${color}Subtle`],
58
56
  "--title": uikitStyles.theme.colors[`${color}Deep`]
59
57
  }
60
58
  ])
@@ -65,11 +63,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
65
63
  }
66
64
  },
67
65
  messageIcon: {
68
- alignSelf: "start",
69
- borderRadius: uikitStyles.theme.radii.round,
70
- color: "var(--icolor)",
71
- outline: `1px solid var(--outline)`,
72
- backgroundColor: "var(--bg)"
66
+ alignSelf: "start"
73
67
  },
74
68
  messageTitle: {
75
69
  color: "var(--title)"
@@ -291,7 +285,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
291
285
  sm: { fontSize: 20, padding: 2 },
292
286
  md: { fontSize: 26, padding: 3 },
293
287
  lg: { fontSize: 36, padding: 6 },
294
- xl: { fontSize: 48, padding: 8 }
288
+ xl: { fontSize: 48, padding: 5 }
295
289
  }
296
290
  },
297
291
  HvInlineEditor: {
@@ -9,6 +9,7 @@ const icons = require("../icons.cjs");
9
9
  const iconVariant = require("./iconVariant.cjs");
10
10
  const ActionsGeneric = require("../ActionsGeneric/ActionsGeneric.cjs");
11
11
  const Button = require("../Button/Button.cjs");
12
+ const StatusIcon = require("../StatusIcon/StatusIcon.cjs");
12
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
13
14
  const SnackbarContent__default = /* @__PURE__ */ _interopDefault(SnackbarContent);
14
15
  const { useClasses } = uikitReactUtils.createClasses("HvCallout", {
@@ -48,10 +49,7 @@ const { useClasses } = uikitReactUtils.createClasses("HvCallout", {
48
49
  overflow: "hidden",
49
50
  wordBreak: "break-word"
50
51
  },
51
- messageIcon: {
52
- lineHeight: 0,
53
- flexShrink: 0
54
- },
52
+ messageIcon: {},
55
53
  messageTitle: {
56
54
  display: "block",
57
55
  fontWeight: uikitStyles.theme.fontWeights.semibold
@@ -117,7 +115,14 @@ const HvCallout = React.forwardRef(function HvCallout2(props, ref) {
117
115
  action: classes.action
118
116
  },
119
117
  message: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
120
- icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.messageIcon, children: icon }),
118
+ icon && /* @__PURE__ */ jsxRuntime.jsx(
119
+ StatusIcon.HvStatusIcon,
120
+ {
121
+ className: classes.messageIcon,
122
+ variant: variant === "default" ? "info" : variant,
123
+ customIcon
124
+ }
125
+ ),
121
126
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.messageContent, children: [
122
127
  title && /* @__PURE__ */ jsxRuntime.jsx("b", { className: classes.messageTitle, children: title }),
123
128
  children
@@ -44,7 +44,7 @@ const HvAppSwitcherAction = ({
44
44
  );
45
45
  }
46
46
  const brokenTitle = name.split(" ");
47
- const initials = brokenTitle[0].substring(0, 1) + (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : "");
47
+ const initials = brokenTitle[0].slice(0, 1) + (brokenTitle[1] ? brokenTitle[1].slice(0, 1) : "");
48
48
  return /* @__PURE__ */ jsx(HvAvatar, { size: "sm", backgroundColor: color, variant: "square", "aria-hidden": true, children: initials });
49
49
  };
50
50
  const isSelected = isSelectedCallback(application);
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { HvIcon } from "../icons.js";
3
3
  import { setId } from "../utils/setId.js";
4
4
  import { HvDropDownMenu } from "../DropDownMenu/DropDownMenu.js";
5
- const removeExtension = (label) => label.includes(".") ? label.substring(0, label.lastIndexOf(".")) : label;
5
+ const removeExtension = (label) => label.includes(".") ? label.slice(0, label.lastIndexOf(".")) : label;
6
6
  const pathWithSubMenu = (id, listRoute, maxVisible, onClick, dropDownMenuProps) => {
7
7
  const nbrElemToSubMenu = listRoute.length - maxVisible;
8
8
  const subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);
@@ -25,7 +25,7 @@ const HvFilterGroupCounter = (props) => {
25
25
  filterValues = [],
26
26
  appliedFilters = []
27
27
  } = useContext(HvFilterGroupContext);
28
- const options = groupId && filterOptions.find((option) => option.id === groupId) ? [filterOptions.find((option) => option.id === groupId)] : filterOptions;
28
+ const options = groupId && filterOptions.some((option) => option.id === groupId) ? [filterOptions.find((option) => option.id === groupId)] : filterOptions;
29
29
  const optionIdx = filterOptions.findIndex((option) => option.id === groupId);
30
30
  let groupsCounter = 0;
31
31
  appliedFilters.forEach((fg, i) => {
@@ -16,7 +16,7 @@ const Bar = (props) => {
16
16
  const { classes, cx } = useClasses(classesProp);
17
17
  const selectionPath = useContext(SelectionContext);
18
18
  const isMenu = type === "menu";
19
- const isActive = isMenu && data.filter((item) => item.id === selectionPath?.[1]).length > 0;
19
+ const isActive = isMenu && data.some((item) => item.id === selectionPath?.[1]);
20
20
  return /* @__PURE__ */ jsx(
21
21
  "div",
22
22
  {
@@ -110,7 +110,7 @@ const HvInlineEditor = fixedForwardRef(function HvInlineEditor2(props, ref) {
110
110
  }
111
111
  ),
112
112
  className: cx(classes.button, {
113
- [classes.largeText]: parseInt(lineHeight, 10) >= 28
113
+ [classes.largeText]: Number(lineHeight) >= 28
114
114
  }),
115
115
  onClick: handleClick,
116
116
  disabled,
@@ -176,9 +176,9 @@ const HvList = (props) => {
176
176
  return renderListItem(item, index, {
177
177
  style: {
178
178
  ...style,
179
- top: `${parseFloat(style.top) + 5}px`,
180
- left: `${parseFloat(style.left) + 5}px`,
181
- width: `calc(${parseFloat(style.width)}% - 10px)`
179
+ top: `${Number.parseFloat(style.top) + 5}px`,
180
+ left: `${Number.parseFloat(style.left) + 5}px`,
181
+ width: `calc(${Number.parseFloat(style.width)}% - 10px)`
182
182
  },
183
183
  tabIndex,
184
184
  interactive: true,
@@ -0,0 +1,46 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
4
+ import { HvIcon } from "../icons.js";
5
+ import { useClasses } from "./StatusIcon.styles.js";
6
+ import { staticClasses } from "./StatusIcon.styles.js";
7
+ import { HvIconContainer } from "../IconContainer/IconContainer.js";
8
+ const variantIconMap = {
9
+ success: "Success",
10
+ warning: "Caution",
11
+ error: "Fail",
12
+ info: "Info"
13
+ };
14
+ const HvStatusIcon = forwardRef(function HvStatusIcon2(props, ref) {
15
+ const {
16
+ classes: classesProp,
17
+ className,
18
+ variant = "default",
19
+ customIcon,
20
+ size = "sm",
21
+ type = "full"
22
+ } = useDefaultProps("HvStatusIcon", props);
23
+ const { classes, cx } = useClasses(classesProp);
24
+ return /* @__PURE__ */ jsx(
25
+ "div",
26
+ {
27
+ ref,
28
+ "data-variant": variant,
29
+ "data-type": type,
30
+ "data-size": size,
31
+ className: cx(classes.root, className),
32
+ children: /* @__PURE__ */ jsx(HvIconContainer, { size, children: customIcon || /* @__PURE__ */ jsx(
33
+ HvIcon,
34
+ {
35
+ compact: true,
36
+ className: classes.icon,
37
+ name: variantIconMap[variant]
38
+ }
39
+ ) })
40
+ }
41
+ );
42
+ });
43
+ export {
44
+ HvStatusIcon,
45
+ staticClasses as statusIconClasses
46
+ };