@hitachivantara/uikit-react-core 5.96.3 → 5.97.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 (34) 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/Table/hooks/useHvRowSelection.cjs +4 -4
  8. package/dist/cjs/TextArea/TextArea.cjs +1 -1
  9. package/dist/cjs/TimePicker/Placeholder.cjs +2 -2
  10. package/dist/cjs/TimePicker/TimePicker.cjs +2 -2
  11. package/dist/cjs/TreeView/TreeItem/TreeItem.cjs +1 -1
  12. package/dist/cjs/TreeView/TreeItem/useHvTreeItem.cjs +1 -19
  13. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.cjs +2 -2
  14. package/dist/cjs/hooks/useForkRef.cjs +1 -19
  15. package/dist/cjs/hooks/useImageLoaded.cjs +3 -9
  16. package/dist/cjs/themes/pentahoPlus.cjs +1 -1
  17. package/dist/esm/AppSwitcher/Action/Action.js +1 -1
  18. package/dist/esm/BreadCrumb/utils.js +1 -1
  19. package/dist/esm/FilterGroup/Counter/Counter.js +1 -1
  20. package/dist/esm/Header/Navigation/MenuBar/Bar.js +1 -1
  21. package/dist/esm/InlineEditor/InlineEditor.js +1 -1
  22. package/dist/esm/List/List.js +3 -3
  23. package/dist/esm/Table/hooks/useHvRowSelection.js +4 -4
  24. package/dist/esm/TextArea/TextArea.js +1 -1
  25. package/dist/esm/TimePicker/Placeholder.js +2 -2
  26. package/dist/esm/TimePicker/TimePicker.js +2 -2
  27. package/dist/esm/TreeView/TreeItem/TreeItem.js +1 -1
  28. package/dist/esm/TreeView/TreeItem/useHvTreeItem.js +2 -2
  29. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js +2 -2
  30. package/dist/esm/hooks/useForkRef.js +2 -2
  31. package/dist/esm/hooks/useImageLoaded.js +3 -9
  32. package/dist/esm/themes/pentahoPlus.js +1 -1
  33. package/dist/types/index.d.ts +4 -8
  34. package/package.json +4 -4
@@ -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,
@@ -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 () => {
@@ -51,7 +51,7 @@ 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
56
  "--outline": uikitStyles.theme.colors[`${color}Border`],
57
57
  "--bg": uikitStyles.theme.colors[`${color}Subtle`],
@@ -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,
@@ -121,7 +121,7 @@ function reducer(state, action, previousState, instance) {
121
121
  applyToggleAllRowsSelectedToPrefilteredRows
122
122
  } = instance;
123
123
  const rowsToSelect = applyToggleAllRowsSelectedToPrefilteredRows ? initialRowsById : nonGroupedRowsById;
124
- const selectAll = typeof setSelected !== "undefined" ? setSelected : !isAllRowsSelected;
124
+ const selectAll = setSelected ?? !isAllRowsSelected;
125
125
  const selectedRowIds = { ...state.selectedRowIds };
126
126
  if (selectAll) {
127
127
  Object.keys(rowsToSelect).forEach((rowId) => {
@@ -151,7 +151,7 @@ function reducer(state, action, previousState, instance) {
151
151
  }
152
152
  const { rowsById, selectSubRows = true, getSubRows } = instance;
153
153
  const isSelected = state.selectedRowIds[id];
154
- const shouldExist = typeof setSelected !== "undefined" ? setSelected : !isSelected;
154
+ const shouldExist = setSelected ?? !isSelected;
155
155
  if (isSelected === shouldExist) {
156
156
  return state;
157
157
  }
@@ -186,7 +186,7 @@ function reducer(state, action, previousState, instance) {
186
186
  isAllPageRowsSelected,
187
187
  getSubRows
188
188
  } = instance;
189
- const selectAll = typeof setSelected !== "undefined" ? setSelected : !isAllPageRowsSelected;
189
+ const selectAll = setSelected ?? !isAllPageRowsSelected;
190
190
  const newSelectedRowIds = { ...state.selectedRowIds };
191
191
  const handleRowById = (rowId) => {
192
192
  const row = rowsById[rowId];
@@ -220,7 +220,7 @@ function reducer(state, action, previousState, instance) {
220
220
  const { id, value: setLockedSelection } = action;
221
221
  const { rowsById, selectSubRows = true, getSubRows } = instance;
222
222
  const isLockedSelection = state.lockedSelectionRowIds[id];
223
- const shouldExist = typeof setLockedSelection !== "undefined" ? setLockedSelection : !isLockedSelection;
223
+ const shouldExist = setLockedSelection ?? !isLockedSelection;
224
224
  if (isLockedSelection === shouldExist) {
225
225
  return state;
226
226
  }
@@ -108,7 +108,7 @@ const HvTextArea = forwardRef(function HvTextArea2(props, ref) {
108
108
  const limitValue = (currentValue) => {
109
109
  if (currentValue === void 0 || !blockMax) return currentValue;
110
110
  const isOverflow = maxCharQuantity == null ? false : currentValue.length > maxCharQuantity;
111
- return !isOverflow ? currentValue : currentValue.substring(0, maxCharQuantity);
111
+ return !isOverflow ? currentValue : currentValue.slice(0, maxCharQuantity);
112
112
  };
113
113
  const onContainerBlurHandler = (event) => {
114
114
  setFocused(false);
@@ -34,14 +34,14 @@ const Placeholder = forwardRef(
34
34
  ...others,
35
35
  children: [
36
36
  name && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: getDateValue(value) }),
37
- segments.map((segment, i) => /* @__PURE__ */ jsx(
37
+ segments.map((segment) => /* @__PURE__ */ jsx(
38
38
  PlaceholderSegment,
39
39
  {
40
40
  segment,
41
41
  state,
42
42
  placeholder: placeholders[segment.type]
43
43
  },
44
- i
44
+ segment.type
45
45
  ))
46
46
  ]
47
47
  }
@@ -182,7 +182,7 @@ const HvTimePicker = forwardRef(
182
182
  ]
183
183
  },
184
184
  ...otherDropdownProps,
185
- children: /* @__PURE__ */ jsx("div", { ref: timeFieldRef, className: classes.timePopperContainer, children: state.segments.map((segment, i) => /* @__PURE__ */ jsx(
185
+ children: /* @__PURE__ */ jsx("div", { ref: timeFieldRef, className: classes.timePopperContainer, children: state.segments.map((segment) => /* @__PURE__ */ jsx(
186
186
  Unit,
187
187
  {
188
188
  state,
@@ -194,7 +194,7 @@ const HvTimePicker = forwardRef(
194
194
  state.setSegment(segment.type, Number(val));
195
195
  }
196
196
  },
197
- i
197
+ segment.type
198
198
  )) })
199
199
  }
200
200
  ),
@@ -70,7 +70,7 @@ const HvTreeItem = forwardRef(
70
70
  if (instance && label) {
71
71
  return instance.mapFirstChar(
72
72
  nodeId,
73
- (contentRef.current?.textContent ?? "").substring(0, 1).toLowerCase()
73
+ (contentRef.current?.textContent ?? "").slice(0, 1).toLowerCase()
74
74
  );
75
75
  }
76
76
  return void 0;
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ import { useContext } from "react";
2
2
  import { DescendantContext } from "../internals/DescendantProvider.js";
3
3
  import { useTreeViewContext } from "../internals/TreeViewProvider.js";
4
4
  function useHvTreeItem(nodeId) {
5
5
  const { instance, multiSelect } = useTreeViewContext();
6
- const { level = 0 } = React.useContext(DescendantContext);
6
+ const { level = 0 } = useContext(DescendantContext);
7
7
  const expandable = instance ? instance.isNodeExpandable(nodeId) : false;
8
8
  const expanded = instance ? instance.isNodeExpanded(nodeId) : false;
9
9
  const focused = instance ? instance.isNodeFocused(nodeId) : false;
@@ -119,7 +119,7 @@ const HvVerticalNavigationTreeViewItem = forwardRef(
119
119
  if (mapFirstChar && unMapFirstChar && label && contentRef.current?.textContent) {
120
120
  mapFirstChar(
121
121
  nodeId,
122
- contentRef.current?.textContent.substring(0, 1).toLowerCase()
122
+ contentRef.current?.textContent.slice(0, 1).toLowerCase()
123
123
  );
124
124
  return () => {
125
125
  unMapFirstChar(nodeId);
@@ -310,7 +310,7 @@ const HvVerticalNavigationTreeViewItem = forwardRef(
310
310
  variant: "square",
311
311
  size: "xs",
312
312
  backgroundColor: "textSubtle",
313
- children: payload?.label?.substring(0, 1)
313
+ children: payload?.label?.slice(0, 1)
314
314
  }
315
315
  ) : useIcons && icon,
316
316
  hasChildren && !isOpen ? /* @__PURE__ */ jsx(HvIcon, { name: "Forwards", size: "xs", compact: true }) : hasAnyChildWithData && !isOpen && /* @__PURE__ */ jsx("div", {})
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { useMemo } from "react";
2
2
  const setRef = (ref, value) => {
3
3
  if (typeof ref === "function") {
4
4
  ref(value);
@@ -7,7 +7,7 @@ const setRef = (ref, value) => {
7
7
  }
8
8
  };
9
9
  const useForkRef = (refA, refB) => {
10
- return React.useMemo(() => {
10
+ return useMemo(() => {
11
11
  if (refA == null && refB == null) {
12
12
  return null;
13
13
  }
@@ -2,24 +2,18 @@ import { useState, useEffect } from "react";
2
2
  const useImageLoaded = (src, srcSet) => {
3
3
  const [imageLoaded, setImageLoaded] = useState(false);
4
4
  useEffect(() => {
5
- if (!src && !srcSet) {
6
- return void 0;
7
- }
5
+ if (!src && !srcSet) return;
8
6
  setImageLoaded(false);
9
7
  let active = true;
10
8
  const image = new Image();
11
9
  image.src = src || "";
12
10
  image.srcset = srcSet || "";
13
11
  image.onload = () => {
14
- if (!active) {
15
- return;
16
- }
12
+ if (!active) return;
17
13
  setImageLoaded("loaded");
18
14
  };
19
15
  image.onerror = () => {
20
- if (!active) {
21
- return;
22
- }
16
+ if (!active) return;
23
17
  setImageLoaded("error");
24
18
  };
25
19
  return () => {
@@ -49,7 +49,7 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
49
49
  Object.entries(notificationMap).map(([variant, color]) => [
50
50
  variant,
51
51
  {
52
- backgroundColor: theme.colors[`${color}Dimmed`],
52
+ backgroundColor: theme.mix(`${color}Dimmed`, 0.5, "dimmer"),
53
53
  "--icolor": theme.colors[color],
54
54
  "--outline": theme.colors[`${color}Border`],
55
55
  "--bg": theme.colors[`${color}Subtle`],
@@ -6762,11 +6762,7 @@ export { HvThemeContextValue }
6762
6762
 
6763
6763
  export declare type HvThemeCustomizationProps = HvExtraDeepPartialProps<Omit<HvThemeStructure, "colors" | "name" | "base">> & {
6764
6764
  colors?: {
6765
- modes?: {
6766
- [key: string]: Partial<HvThemeColorModeStructure> & {
6767
- [key: string]: string;
6768
- };
6769
- };
6765
+ modes?: Record<string, Partial<HvThemeColorModeStructure> & Record<string, string>>;
6770
6766
  };
6771
6767
  };
6772
6768
 
@@ -10630,9 +10626,9 @@ export declare function useHvTreeItem(nodeId: string): {
10630
10626
  expanded: boolean;
10631
10627
  selected: boolean;
10632
10628
  focused: boolean;
10633
- handleExpansion: (event: React_2.MouseEvent) => void;
10634
- handleSelection: (event: React_2.MouseEvent) => void;
10635
- preventSelection: (event: React_2.MouseEvent) => void;
10629
+ handleExpansion: (event: React.MouseEvent) => void;
10630
+ handleSelection: (event: React.MouseEvent) => void;
10631
+ preventSelection: (event: React.MouseEvent) => void;
10636
10632
  };
10637
10633
 
10638
10634
  export declare const useImageLoaded: (src?: string, srcSet?: string) => string | boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.96.3",
3
+ "version": "5.97.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,8 +32,8 @@
32
32
  "dependencies": {
33
33
  "@emotion/cache": "^11.11.0",
34
34
  "@emotion/serialize": "^1.1.2",
35
- "@hitachivantara/uikit-react-shared": "^5.4.6",
36
- "@hitachivantara/uikit-react-utils": "^0.2.39",
35
+ "@hitachivantara/uikit-react-shared": "^5.5.0",
36
+ "@hitachivantara/uikit-react-utils": "^0.2.40",
37
37
  "@hitachivantara/uikit-styles": "^5.48.2",
38
38
  "@internationalized/date": "^3.2.0",
39
39
  "@mui/base": "5.0.0-beta.68",
@@ -61,7 +61,7 @@
61
61
  "access": "public",
62
62
  "directory": "package"
63
63
  },
64
- "gitHead": "e8e37e375a8b3101ac3d223d1a08ca06b53b43de",
64
+ "gitHead": "acfc9b4224682aaebdf1c171e80eb1bfc2632a47",
65
65
  "exports": {
66
66
  ".": {
67
67
  "types": "./dist/types/index.d.ts",