@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.
Files changed (165) hide show
  1. package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs +2 -3
  2. package/dist/cjs/AppSwitcher/Action/Action.styles.cjs +2 -2
  3. package/dist/cjs/Banner/Banner.cjs +5 -5
  4. package/dist/cjs/Banner/BannerContent/BannerContent.cjs +59 -97
  5. package/dist/cjs/Banner/BannerContent/BannerContent.styles.cjs +18 -46
  6. package/dist/cjs/BaseDropdown/BaseDropdown.styles.cjs +1 -2
  7. package/dist/cjs/BaseInput/BaseInput.styles.cjs +1 -1
  8. package/dist/cjs/BaseInput/validations.cjs +2 -1
  9. package/dist/cjs/Button/Button.cjs +1 -2
  10. package/dist/cjs/Button/Button.styles.cjs +0 -6
  11. package/dist/cjs/ColorPicker/ColorPicker.cjs +1 -1
  12. package/dist/cjs/DatePicker/DatePicker.cjs +12 -12
  13. package/dist/cjs/DotPagination/DotPagination.styles.cjs +3 -0
  14. package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs +1 -1
  15. package/dist/cjs/FormElement/Adornment/Adornment.cjs +15 -36
  16. package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +12 -21
  17. package/dist/cjs/IconContainer/IconContainer.cjs +81 -0
  18. package/dist/cjs/Input/Input.cjs +29 -51
  19. package/dist/cjs/Input/Input.styles.cjs +1 -0
  20. package/dist/cjs/List/List.cjs +1 -1
  21. package/dist/cjs/ListContainer/ListItem/ListItem.styles.cjs +0 -6
  22. package/dist/cjs/Loading/Loading.cjs +1 -2
  23. package/dist/cjs/Loading/Loading.styles.cjs +3 -1
  24. package/dist/cjs/Pagination/Pagination.styles.cjs +2 -2
  25. package/dist/cjs/Pagination/Select.cjs +1 -1
  26. package/dist/cjs/Snackbar/Snackbar.cjs +6 -5
  27. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +20 -28
  28. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs +26 -56
  29. package/dist/cjs/Table/TableBody/TableBody.cjs +16 -17
  30. package/dist/cjs/{TableSection → Table/TableSection}/TableSection.cjs +2 -2
  31. package/dist/cjs/{TableSection → Table/TableSection}/TableSection.styles.cjs +12 -12
  32. package/dist/cjs/Table/hooks/useHvRowExpand.cjs +3 -3
  33. package/dist/cjs/Tabs/Tab/Tab.styles.cjs +0 -3
  34. package/dist/cjs/Tag/Tag.cjs +1 -1
  35. package/dist/cjs/TagsInput/TagsInput.cjs +103 -169
  36. package/dist/cjs/TagsInput/TagsInput.styles.cjs +45 -106
  37. package/dist/cjs/TextArea/TextArea.cjs +1 -3
  38. package/dist/cjs/TimePicker/TimePicker.cjs +5 -4
  39. package/dist/cjs/Typography/Typography.styles.cjs +2 -1
  40. package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +0 -3
  41. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +0 -4
  42. package/dist/cjs/hooks/useFocus.cjs +38 -0
  43. package/dist/cjs/index.cjs +9 -4
  44. package/dist/cjs/utils/Callout.cjs +134 -0
  45. package/dist/cjs/utils/focusUtils.cjs +0 -4
  46. package/dist/esm/ActionsGeneric/ActionsGeneric.js +2 -3
  47. package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
  48. package/dist/esm/AppSwitcher/Action/Action.styles.js +2 -2
  49. package/dist/esm/AppSwitcher/Action/Action.styles.js.map +1 -1
  50. package/dist/esm/AvatarGroup/AvatarGroupContext.js +1 -1
  51. package/dist/esm/Banner/Banner.js +5 -5
  52. package/dist/esm/Banner/Banner.js.map +1 -1
  53. package/dist/esm/Banner/BannerContent/BannerContent.js +60 -96
  54. package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
  55. package/dist/esm/Banner/BannerContent/BannerContent.styles.js +18 -46
  56. package/dist/esm/Banner/BannerContent/BannerContent.styles.js.map +1 -1
  57. package/dist/esm/BaseCheckBox/BaseCheckBox.js +1 -1
  58. package/dist/esm/BaseDropdown/BaseDropdown.js +3 -3
  59. package/dist/esm/BaseDropdown/BaseDropdown.styles.js +1 -2
  60. package/dist/esm/BaseDropdown/BaseDropdown.styles.js.map +1 -1
  61. package/dist/esm/BaseInput/BaseInput.js.map +1 -1
  62. package/dist/esm/BaseInput/BaseInput.styles.js +1 -1
  63. package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
  64. package/dist/esm/BaseInput/validations.js +2 -1
  65. package/dist/esm/BaseInput/validations.js.map +1 -1
  66. package/dist/esm/BaseRadio/BaseRadio.js +1 -1
  67. package/dist/esm/Button/Button.js +3 -4
  68. package/dist/esm/Button/Button.js.map +1 -1
  69. package/dist/esm/Button/Button.styles.js +0 -6
  70. package/dist/esm/Button/Button.styles.js.map +1 -1
  71. package/dist/esm/Calendar/CalendarHeader/CalendarHeader.js +1 -1
  72. package/dist/esm/CheckBoxGroup/CheckBoxGroup.js.map +1 -1
  73. package/dist/esm/ColorPicker/ColorPicker.js +1 -1
  74. package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
  75. package/dist/esm/ColorPicker/Fields/Fields.js.map +1 -1
  76. package/dist/esm/DatePicker/DatePicker.js.map +1 -1
  77. package/dist/esm/DatePicker/utils.js +1 -1
  78. package/dist/esm/Dialog/context.js +1 -1
  79. package/dist/esm/DotPagination/DotPagination.js +1 -1
  80. package/dist/esm/DotPagination/DotPagination.styles.js +3 -0
  81. package/dist/esm/DotPagination/DotPagination.styles.js.map +1 -1
  82. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  83. package/dist/esm/DropdownButton/DropdownButton.js.map +1 -1
  84. package/dist/esm/FilterGroup/FilterContent/FilterContent.js +1 -1
  85. package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
  86. package/dist/esm/FilterGroup/FilterGroupContext.js +1 -1
  87. package/dist/esm/Focus/Focus.js +1 -1
  88. package/dist/esm/FormElement/Adornment/Adornment.js +15 -36
  89. package/dist/esm/FormElement/Adornment/Adornment.js.map +1 -1
  90. package/dist/esm/FormElement/Adornment/Adornment.styles.js +12 -21
  91. package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
  92. package/dist/esm/Header/Navigation/useSelectionPath.js.map +1 -1
  93. package/dist/esm/IconContainer/IconContainer.js +81 -0
  94. package/dist/esm/IconContainer/IconContainer.js.map +1 -0
  95. package/dist/esm/Input/Input.js +30 -52
  96. package/dist/esm/Input/Input.js.map +1 -1
  97. package/dist/esm/Input/Input.styles.js +1 -0
  98. package/dist/esm/Input/Input.styles.js.map +1 -1
  99. package/dist/esm/List/List.js +1 -1
  100. package/dist/esm/ListContainer/ListItem/ListItem.styles.js +0 -6
  101. package/dist/esm/ListContainer/ListItem/ListItem.styles.js.map +1 -1
  102. package/dist/esm/Loading/Loading.js +1 -2
  103. package/dist/esm/Loading/Loading.js.map +1 -1
  104. package/dist/esm/Loading/Loading.styles.js +3 -1
  105. package/dist/esm/Loading/Loading.styles.js.map +1 -1
  106. package/dist/esm/Pagination/Pagination.styles.js +5 -5
  107. package/dist/esm/Pagination/Select.js +1 -1
  108. package/dist/esm/QueryBuilder/Context.js +1 -1
  109. package/dist/esm/QueryBuilder/QueryBuilder.js +1 -1
  110. package/dist/esm/QueryBuilder/utils/index.js +1 -1
  111. package/dist/esm/RadioGroup/RadioGroup.js.map +1 -1
  112. package/dist/esm/SelectionList/SelectionList.js.map +1 -1
  113. package/dist/esm/Slider/Slider.js +1 -1
  114. package/dist/esm/Slider/Slider.js.map +1 -1
  115. package/dist/esm/Snackbar/Snackbar.js +6 -5
  116. package/dist/esm/Snackbar/Snackbar.js.map +1 -1
  117. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +23 -29
  118. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
  119. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js +26 -56
  120. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
  121. package/dist/esm/SnackbarProvider/SnackbarProvider.js +2 -2
  122. package/dist/esm/Table/Table.js.map +1 -1
  123. package/dist/esm/Table/TableBody/TableBody.js +16 -17
  124. package/dist/esm/Table/TableBody/TableBody.js.map +1 -1
  125. package/dist/esm/{TableSection → Table/TableSection}/TableSection.js +2 -2
  126. package/dist/esm/Table/TableSection/TableSection.js.map +1 -0
  127. package/dist/esm/{TableSection → Table/TableSection}/TableSection.styles.js +25 -25
  128. package/dist/esm/Table/TableSection/TableSection.styles.js.map +1 -0
  129. package/dist/esm/Table/hooks/useHvRowExpand.js +3 -3
  130. package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
  131. package/dist/esm/Tabs/Tab/Tab.styles.js +0 -3
  132. package/dist/esm/Tabs/Tab/Tab.styles.js.map +1 -1
  133. package/dist/esm/Tag/Tag.js +1 -1
  134. package/dist/esm/Tag/Tag.js.map +1 -1
  135. package/dist/esm/TagsInput/TagsInput.js +103 -169
  136. package/dist/esm/TagsInput/TagsInput.js.map +1 -1
  137. package/dist/esm/TagsInput/TagsInput.styles.js +45 -106
  138. package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
  139. package/dist/esm/TextArea/TextArea.js +1 -3
  140. package/dist/esm/TextArea/TextArea.js.map +1 -1
  141. package/dist/esm/TimePicker/TimePicker.js +1 -0
  142. package/dist/esm/TimePicker/TimePicker.js.map +1 -1
  143. package/dist/esm/TreeView/internals/TreeViewProvider.js +1 -1
  144. package/dist/esm/TreeView/internals/hooks/plugins/useTreeViewKeyboardNavigation.js +1 -1
  145. package/dist/esm/Typography/Typography.styles.js +2 -1
  146. package/dist/esm/Typography/Typography.styles.js.map +1 -1
  147. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
  148. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +0 -3
  149. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
  150. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +0 -4
  151. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
  152. package/dist/esm/hooks/useFocus.js +38 -0
  153. package/dist/esm/hooks/useFocus.js.map +1 -0
  154. package/dist/esm/hooks/useScrollTo.js.map +1 -1
  155. package/dist/esm/index.js +56 -51
  156. package/dist/esm/index.js.map +1 -1
  157. package/dist/esm/utils/Callout.js +132 -0
  158. package/dist/esm/utils/Callout.js.map +1 -0
  159. package/dist/esm/utils/document.js.map +1 -1
  160. package/dist/esm/utils/focusUtils.js +0 -4
  161. package/dist/esm/utils/focusUtils.js.map +1 -1
  162. package/dist/types/index.d.ts +677 -670
  163. package/package.json +8 -8
  164. package/dist/esm/TableSection/TableSection.js.map +0 -1
  165. package/dist/esm/TableSection/TableSection.styles.js.map +0 -1
@@ -0,0 +1,81 @@
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 uikitStyles = require("@hitachivantara/uikit-styles");
7
+ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvIconContainer", {
8
+ root: {
9
+ display: "inline-flex",
10
+ flex: "0 0 auto",
11
+ // ensure icon doesn't flex grow/shrink
12
+ fontSize: `var(--icsize, 16px)`,
13
+ // default size of 16px
14
+ transition: "rotate 0.2s ease",
15
+ justifyContent: "center",
16
+ alignItems: "center",
17
+ padding: 8
18
+ // default padding
19
+ // we're assuming svg children inherits from text color and size
20
+ },
21
+ xs: {
22
+ fontSize: 12,
23
+ padding: 10
24
+ },
25
+ sm: {
26
+ fontSize: 16
27
+ },
28
+ md: {
29
+ fontSize: 32
30
+ },
31
+ lg: {
32
+ fontSize: 96
33
+ },
34
+ xl: {
35
+ fontSize: 112
36
+ }
37
+ });
38
+ const HvIconContainer = React.forwardRef(function HvIconContainer2(props, ref) {
39
+ const {
40
+ className,
41
+ classes: classesProp,
42
+ style,
43
+ color,
44
+ size: sizeProp = "S",
45
+ rotate,
46
+ children,
47
+ ...others
48
+ } = uikitReactUtils.useDefaultProps("HvIconContainer", props);
49
+ const { cx, classes } = useClasses(classesProp);
50
+ const size = mapSizes(sizeProp);
51
+ return /* @__PURE__ */ jsxRuntime.jsx(
52
+ "div",
53
+ {
54
+ ref,
55
+ className: cx(classes.root, className, {
56
+ [classes[size]]: size
57
+ }),
58
+ style: uikitReactUtils.mergeStyles(style, {
59
+ color: uikitStyles.getColor(color),
60
+ rotate: rotate ? "180deg" : void 0,
61
+ ...style
62
+ }),
63
+ ...others,
64
+ children
65
+ }
66
+ );
67
+ });
68
+ function mapSizes(size) {
69
+ if (typeof size === "number") return void 0;
70
+ const iconSizeMap = {
71
+ XS: "xs",
72
+ S: "sm",
73
+ M: "md",
74
+ L: "lg"
75
+ };
76
+ return iconSizeMap[size] || size;
77
+ }
78
+ exports.HvIconContainer = HvIconContainer;
79
+ exports.iconContainerClasses = staticClasses;
80
+ exports.staticClasses = staticClasses;
81
+ exports.useClasses = useClasses;
@@ -54,7 +54,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
54
54
  id,
55
55
  name,
56
56
  value: valueProp,
57
- defaultValue = "",
57
+ defaultValue,
58
58
  required,
59
59
  readOnly,
60
60
  disabled,
@@ -99,8 +99,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
99
99
  const suggestionsRef = React.useRef(null);
100
100
  const [focused, setFocused] = React.useState(false);
101
101
  const isDirty = React.useRef(false);
102
- const [value, setValue] = useControlled.useControlled(valueProp, defaultValue);
103
- const isEmptyValue = value == null || value === "";
102
+ const isEmptyValue = !inputRef.current?.value;
104
103
  const [validationState, setValidationState] = useControlled.useControlled(
105
104
  status,
106
105
  utils$1.validationStates.standBy
@@ -124,7 +123,6 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
124
123
  const performValidation = React.useCallback(() => {
125
124
  const inputValidity = validations.validateInput(
126
125
  inputRef.current,
127
- String(value),
128
126
  required,
129
127
  minCharQuantity,
130
128
  maxCharQuantity,
@@ -145,8 +143,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
145
143
  setValidationMessage,
146
144
  setValidationState,
147
145
  validation,
148
- validationType,
149
- value
146
+ validationType
150
147
  ]);
151
148
  const canShowError = ariaErrorMessage == null && (status !== void 0 && statusMessage !== void 0 || status === void 0 && validations.hasBuiltInValidations(
152
149
  required,
@@ -200,7 +197,6 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
200
197
  };
201
198
  const onChangeHandler = (event, newValue) => {
202
199
  isDirty.current = true;
203
- setValue(newValue);
204
200
  onChange?.(event, newValue);
205
201
  if (canShowSuggestions) {
206
202
  suggestionHandler(newValue);
@@ -210,12 +206,12 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
210
206
  if (eventTargetIsInsideContainer(suggestionsRef.current, event)) return;
211
207
  setFocused(false);
212
208
  const inputValidity = performValidation();
213
- onBlur?.(event, String(value), inputValidity);
209
+ onBlur?.(event, event.target.value, inputValidity);
214
210
  };
215
211
  const onFocusHandler = (event) => {
216
212
  setFocused(true);
217
213
  setValidationState(utils$1.validationStates.standBy);
218
- onFocus?.(event, String(value));
214
+ onFocus?.(event, event.target.value);
219
215
  };
220
216
  const getSuggestions = (li) => {
221
217
  const listEl = document.getElementById(
@@ -232,13 +228,14 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
232
228
  }
233
229
  };
234
230
  const onKeyDownHandler = (event) => {
231
+ const { value } = event.currentTarget;
235
232
  if (keyboardUtils.isKey(event, "ArrowDown") && hasSuggestions) {
236
233
  const li = getSuggestions(0);
237
234
  li?.focus();
238
235
  } else if (keyboardUtils.isKey(event, "Enter")) {
239
- onEnter?.(event, String(value));
236
+ onEnter?.(event, value);
240
237
  }
241
- onKeyDown?.(event, String(value));
238
+ onKeyDown?.(event, value);
242
239
  };
243
240
  const onContainerBlurHandler = (event) => {
244
241
  if (event.relatedTarget) {
@@ -248,8 +245,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
248
245
  }, 10);
249
246
  }
250
247
  };
251
- const hasOnEnter = onEnter != null;
252
- const showClear = !disabled && !readOnly && !disableClear && !isEmptyValue && (!hasOnEnter || type !== "search" || disableSearchButton || validationState !== utils$1.validationStates.standBy);
248
+ const showClear = !disabled && !readOnly && !disableClear && !isEmptyValue && (!onEnter || type !== "search" || disableSearchButton || validationState !== utils$1.validationStates.standBy);
253
249
  const showSearchIcon = type === "search" && !disableSearchButton;
254
250
  const showRevealPasswordButton = type === "password" && !disableRevealPassword;
255
251
  const handleClear = React.useCallback(
@@ -289,42 +285,27 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
289
285
  elementId,
290
286
  cx
291
287
  ]);
292
- const handleSearch = React.useCallback(
293
- (event) => {
294
- onEnter?.(event, String(value));
295
- },
296
- [onEnter, value]
297
- );
298
288
  const searchButton = React.useMemo(() => {
299
- const reallyShowIt = showSearchIcon && (isEmptyValue || hasOnEnter && validationState === utils$1.validationStates.standBy);
300
- if (!reallyShowIt) {
301
- return null;
302
- }
289
+ const reallyShowIt = showSearchIcon && (isEmptyValue || onEnter && validationState === utils$1.validationStates.standBy);
290
+ if (!reallyShowIt) return null;
303
291
  return /* @__PURE__ */ jsxRuntime.jsx(
304
292
  Adornment.HvAdornment,
305
293
  {
306
294
  className: classes.adornmentButton,
307
- onClick: hasOnEnter ? handleSearch : void 0,
308
- "aria-label": labels?.searchButtonLabel,
309
- icon: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Search, {})
295
+ onClick: onEnter && ((evt) => onEnter?.(evt, inputRef.current?.value ?? "")),
296
+ icon: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Search, { title: labels.searchButtonLabel })
310
297
  }
311
298
  );
312
299
  }, [
313
300
  showSearchIcon,
314
301
  isEmptyValue,
315
- hasOnEnter,
302
+ onEnter,
316
303
  validationState,
317
304
  classes.adornmentButton,
318
- handleSearch,
319
- labels?.searchButtonLabel
305
+ labels.searchButtonLabel
320
306
  ]);
321
- const handleRevealPassword = React.useCallback(() => {
322
- setRevealPassword(!revealPassword);
323
- }, [revealPassword]);
324
307
  const revealPasswordButton = React.useMemo(() => {
325
- if (!showRevealPasswordButton) {
326
- return null;
327
- }
308
+ if (!showRevealPasswordButton) return null;
328
309
  return /* @__PURE__ */ jsxRuntime.jsx(
329
310
  Tooltip.HvTooltip,
330
311
  {
@@ -335,10 +316,12 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
335
316
  Adornment.HvAdornment,
336
317
  {
337
318
  className: classes.adornmentButton,
338
- onClick: handleRevealPassword,
319
+ onClick: () => setRevealPassword((s) => !s),
339
320
  "aria-label": labels?.revealPasswordButtonLabel,
340
321
  "aria-controls": setId.setId(elementId, "input"),
341
- icon: revealPassword ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.PreviewOff, {}) : /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Preview, {})
322
+ icon: revealPassword ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.PreviewOff, {}) : /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Preview, {}),
323
+ tabIndex: 0,
324
+ ...{ selected: revealPassword }
342
325
  }
343
326
  )
344
327
  }
@@ -350,28 +333,23 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
350
333
  labels?.revealPasswordButtonClickToShowTooltip,
351
334
  labels?.revealPasswordButtonLabel,
352
335
  classes.adornmentButton,
353
- handleRevealPassword,
354
336
  elementId
355
337
  ]);
356
338
  const validationIcon = React.useMemo(() => {
357
- if (!showValidationIcon) {
358
- return null;
359
- }
360
- if (!utils$1.isValid(validationState)) {
361
- return null;
362
- }
339
+ if (!showValidationIcon) return null;
340
+ if (!utils$1.isValid(validationState)) return null;
363
341
  return /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Success, { color: "positive", className: classes.icon });
364
342
  }, [showValidationIcon, validationState, classes.icon]);
365
343
  const customIconEl = React.useMemo(
366
- () => React.isValidElement(endAdornment) && React.cloneElement(endAdornment, {
344
+ () => React.isValidElement(endAdornment) ? React.cloneElement(endAdornment, {
367
345
  className: cx(endAdornment.props.className, classes.icon)
368
- }),
346
+ }) : endAdornment,
369
347
  [classes.icon, endAdornment, cx]
370
348
  );
371
349
  const adornments = React.useMemo(() => {
372
350
  if (!clearButton && !revealPasswordButton && !searchButton && !validationIcon && !customIconEl)
373
351
  return null;
374
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.adornmentsBox, "aria-hidden": "true", children: [
352
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.adornmentsBox, children: [
375
353
  clearButton,
376
354
  revealPasswordButton,
377
355
  searchButton,
@@ -435,7 +413,8 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
435
413
  {
436
414
  id: hasLabel || showClear || showRevealPasswordButton ? setId.setId(elementId, "input") : setId.setId(id, "input"),
437
415
  name,
438
- value,
416
+ value: valueProp,
417
+ defaultValue,
439
418
  required,
440
419
  readOnly,
441
420
  disabled,
@@ -461,13 +440,12 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
461
440
  "aria-errormessage": errorMessageId,
462
441
  "aria-describedby": ariaDescribedBy != null ? ariaDescribedBy : description ? setId.setId(elementId, "description") : void 0,
463
442
  "aria-controls": canShowSuggestions ? setId.setId(elementId, "suggestions") : void 0,
464
- ref: inputRef,
465
443
  // prevent browsers auto-fill/suggestions when we have our own
466
444
  autoComplete: canShowSuggestions ? "off" : void 0,
467
445
  onFocus: (event) => {
468
446
  inputProps.onFocus?.(event);
469
447
  if (canShowSuggestions && suggestOnFocus) {
470
- suggestionHandler(String(value));
448
+ suggestionHandler(event.currentTarget.value);
471
449
  }
472
450
  },
473
451
  onClick: (event) => {
@@ -476,7 +454,7 @@ const HvInput = generic.fixedForwardRef(function HvInput2(props, ref) {
476
454
  },
477
455
  ...inputProps
478
456
  },
479
- inputRef: forkedRef,
457
+ ref: forkedRef,
480
458
  endAdornment: adornments,
481
459
  ...others
482
460
  }
@@ -13,6 +13,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvInput", {
13
13
  display: "flex",
14
14
  flexDirection: "row",
15
15
  height: "30px",
16
+ alignItems: "center",
16
17
  justifyContent: "center",
17
18
  marginRight: 1
18
19
  },
@@ -11,9 +11,9 @@ const List_styles = require("./List.styles.cjs");
11
11
  const useSelectableList = require("./useSelectableList.cjs");
12
12
  const utils = require("./utils.cjs");
13
13
  const CheckBox = require("../CheckBox/CheckBox.cjs");
14
+ const Radio = require("../Radio/Radio.cjs");
14
15
  const OverflowTooltip = require("../OverflowTooltip/OverflowTooltip.cjs");
15
16
  const Link = require("../Link/Link.cjs");
16
- const Radio = require("../Radio/Radio.cjs");
17
17
  const ListContainer = require("../ListContainer/ListContainer.cjs");
18
18
  const ListItem = require("../ListContainer/ListItem/ListItem.cjs");
19
19
  const DEFAULT_LABELS = {
@@ -62,9 +62,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvListItem"
62
62
  "& svg": {
63
63
  boxShadow: "none !important",
64
64
  outline: "none !important"
65
- },
66
- "$disabled > svg *.color0": {
67
- fill: uikitStyles.theme.colors.secondary_60
68
65
  }
69
66
  },
70
67
  withEndAdornment: {
@@ -72,9 +69,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvListItem"
72
69
  "& svg": {
73
70
  boxShadow: "none !important",
74
71
  outline: "none !important"
75
- },
76
- "$disabled > svg *.color0": {
77
- fill: uikitStyles.theme.colors.secondary_60
78
72
  }
79
73
  }
80
74
  });
@@ -6,7 +6,6 @@ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
6
  const uikitStyles = require("@hitachivantara/uikit-styles");
7
7
  const helpers = require("../utils/helpers.cjs");
8
8
  const Loading_styles = require("./Loading.styles.cjs");
9
- const Typography = require("../Typography/Typography.cjs");
10
9
  const HvLoading = React.forwardRef(function HvLoading2(props, ref) {
11
10
  const {
12
11
  color,
@@ -51,7 +50,7 @@ const HvLoading = React.forwardRef(function HvLoading2(props, ref) {
51
50
  },
52
51
  e
53
52
  )) }),
54
- label && /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { variant: "caption1", className: classes.label, children: label })
53
+ label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.label, children: label })
55
54
  ]
56
55
  }
57
56
  );
@@ -40,7 +40,9 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvLoading",
40
40
  ":nth-of-type(2)": { animationDelay: "0.22s" },
41
41
  ":nth-of-type(3)": { animationDelay: "0.44s" }
42
42
  },
43
- label: {},
43
+ label: {
44
+ ...uikitStyles.theme.typography.caption1
45
+ },
44
46
  overlay: {},
45
47
  blur: {},
46
48
  hidden: { display: "none" },
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
4
  const uikitStyles = require("@hitachivantara/uikit-styles");
5
- const BaseDropdown_styles = require("../BaseDropdown/BaseDropdown.styles.cjs");
6
- require("../BaseDropdown/BaseDropdown.cjs");
7
5
  const Input_styles = require("../Input/Input.styles.cjs");
8
6
  require("../Input/Input.cjs");
7
+ const BaseDropdown_styles = require("../BaseDropdown/BaseDropdown.styles.cjs");
8
+ require("../BaseDropdown/BaseDropdown.cjs");
9
9
  const hoverColor = uikitStyles.theme.colors.atmo3;
10
10
  const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvPagination", {
11
11
  /** Styles applied to the component root class. */
@@ -4,10 +4,10 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
6
  const Select_styles = require("./Select.styles.cjs");
7
- const ListItem = require("../ListContainer/ListItem/ListItem.cjs");
8
7
  const BaseDropdown = require("../BaseDropdown/BaseDropdown.cjs");
9
8
  const Panel = require("../Panel/Panel.cjs");
10
9
  const SelectionList = require("../SelectionList/SelectionList.cjs");
10
+ const ListItem = require("../ListContainer/ListItem/ListItem.cjs");
11
11
  const Option = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(ListItem.HvListItem, { ...props });
12
12
  const HvSelect = (props) => {
13
13
  const {
@@ -19,13 +19,13 @@ const HvSnackbar = React.forwardRef(function HvSnackbar2(props, ref) {
19
19
  id,
20
20
  open = false,
21
21
  onClose,
22
- label = "",
22
+ label,
23
23
  anchorOrigin = { vertical: "top", horizontal: "right" },
24
24
  autoHideDuration = 5e3,
25
- variant = "default",
26
- showIcon = false,
27
- customIcon = null,
28
- action = null,
25
+ variant,
26
+ showIcon,
27
+ customIcon,
28
+ action,
29
29
  actionCallback,
30
30
  // TODO - remove in v6
31
31
  onAction,
@@ -82,6 +82,7 @@ const HvSnackbar = React.forwardRef(function HvSnackbar2(props, ref) {
82
82
  action,
83
83
  actionCallback,
84
84
  onAction,
85
+ onClose,
85
86
  ...snackbarContentProps
86
87
  }
87
88
  )
@@ -2,14 +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 SnackbarContent = require("@mui/material/SnackbarContent");
6
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
7
- const iconVariant = require("../../utils/iconVariant.cjs");
8
- const setId = require("../../utils/setId.cjs");
6
+ const Callout = require("../../utils/Callout.cjs");
9
7
  const SnackbarContent_styles = require("./SnackbarContent.styles.cjs");
10
- const ActionsGeneric = require("../../ActionsGeneric/ActionsGeneric.cjs");
11
- const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
12
- const SnackbarContent__default = /* @__PURE__ */ _interopDefault(SnackbarContent);
8
+ const isActionGeneric = (action) => action && typeof action === "object" && "id" in action && "label" in action;
13
9
  const HvSnackbarContent = React.forwardRef(function HvSnackbarContent2(props, ref) {
14
10
  const {
15
11
  className,
@@ -23,37 +19,33 @@ const HvSnackbarContent = React.forwardRef(function HvSnackbarContent2(props, re
23
19
  actionCallback,
24
20
  // TODO - remove in v6
25
21
  onAction,
22
+ onClose,
26
23
  ...others
27
24
  } = uikitReactUtils.useDefaultProps("HvSnackbarContent", props);
28
- const icon = customIcon || showIcon && iconVariant.iconVariant(variant, "base_dark");
29
- const innerAction = React.isValidElement(action) ? action : [action];
30
25
  const { classes, cx } = SnackbarContent_styles.useClasses(classesProp);
31
- const { activeTheme } = uikitReactUtils.useTheme();
32
26
  return /* @__PURE__ */ jsxRuntime.jsx(
33
- SnackbarContent__default.default,
27
+ Callout.HvCallout,
34
28
  {
35
29
  ref,
36
30
  id,
31
+ variant,
37
32
  classes: {
38
- root: classes.root,
39
- message: classes.message
33
+ root: cx(classes.root, classes[variant], className),
34
+ message: cx(classes.message, classes.messageSpan),
35
+ messageIcon: classes.iconVariant,
36
+ messageContent: classes.messageText,
37
+ action: classes.action
40
38
  },
41
- className: cx(classes?.[variant], className),
42
- message: /* @__PURE__ */ jsxRuntime.jsxs("div", { id: setId.setId(id, "message"), className: classes.messageSpan, children: [
43
- icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.iconVariant, children: icon }),
44
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.messageText, children: label }),
45
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { id: setId.setId(id, "action"), className: classes.action, children: /* @__PURE__ */ jsxRuntime.jsx(
46
- ActionsGeneric.HvActionsGeneric,
47
- {
48
- id,
49
- variant: activeTheme?.snackbar.actionButtonVariant,
50
- actions: innerAction,
51
- actionsCallback: actionCallback,
52
- onAction
53
- }
54
- ) })
55
- ] }),
56
- ...others
39
+ showIcon,
40
+ customIcon,
41
+ actions: isActionGeneric(action) ? [action] : action,
42
+ onClose,
43
+ onAction: (evt, action2) => {
44
+ onAction?.(evt, action2);
45
+ actionCallback?.(evt, id, action2);
46
+ },
47
+ ...others,
48
+ children: label
57
49
  }
58
50
  );
59
51
  });
@@ -2,61 +2,31 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
4
  const uikitStyles = require("@hitachivantara/uikit-styles");
5
- const ActionsGeneric_styles = require("../../ActionsGeneric/ActionsGeneric.styles.cjs");
6
- const { useClasses, staticClasses } = uikitReactUtils.createClasses(
7
- "HvSnackbar-Content",
8
- {
9
- root: {
10
- width: "310px",
11
- minHeight: "52px",
12
- maxHeight: "92px",
13
- padding: uikitStyles.theme.space.xs,
14
- boxShadow: "none"
15
- },
16
- success: {
17
- backgroundColor: uikitStyles.theme.colors.positive_20
18
- },
19
- error: {
20
- backgroundColor: uikitStyles.theme.colors.negative_20
21
- },
22
- default: {
23
- backgroundColor: uikitStyles.theme.colors.neutral_20
24
- },
25
- warning: {
26
- backgroundColor: uikitStyles.theme.colors.warning_20
27
- },
28
- message: {
29
- padding: 0,
30
- width: "100%"
31
- },
32
- messageSpan: {
33
- display: "flex",
34
- alignItems: "center",
35
- minHeight: "32px"
36
- },
37
- messageText: {
38
- paddingLeft: uikitStyles.theme.space.xs,
39
- color: uikitStyles.theme.colors.base_dark,
40
- fontFamily: uikitStyles.theme.fontFamily.body,
41
- maxHeight: "72px",
42
- wordBreak: "break-word",
43
- textWrap: "balance",
44
- overflow: "hidden"
45
- },
46
- action: {
47
- textAlign: "right",
48
- paddingLeft: uikitStyles.theme.space.xs,
49
- marginLeft: "auto",
50
- [`& .${ActionsGeneric_styles.staticClasses.button}`]: {
51
- borderColor: uikitStyles.theme.colors.base_dark,
52
- color: uikitStyles.theme.colors.base_dark,
53
- "&:hover": {
54
- borderColor: uikitStyles.theme.colors.base_dark
55
- }
56
- }
57
- },
58
- iconVariant: {}
59
- }
60
- );
5
+ const name = "HvSnackbarContent";
6
+ const { useClasses, staticClasses } = uikitReactUtils.createClasses(name, {
7
+ root: {
8
+ width: "310px",
9
+ minHeight: "52px",
10
+ maxHeight: "92px",
11
+ padding: uikitStyles.theme.space.xs
12
+ },
13
+ success: {},
14
+ error: {},
15
+ default: {},
16
+ warning: {},
17
+ message: {
18
+ padding: 0,
19
+ width: "100%",
20
+ minHeight: "32px"
21
+ },
22
+ action: {},
23
+ messageText: {
24
+ paddingLeft: uikitStyles.theme.space.xs,
25
+ maxHeight: "72px"
26
+ },
27
+ iconVariant: {},
28
+ /** @deprecated use `classes.message` instead */
29
+ messageSpan: {}
30
+ });
61
31
  exports.staticClasses = staticClasses;
62
32
  exports.useClasses = useClasses;
@@ -10,7 +10,7 @@ const TableBody_styles = require("./TableBody.styles.cjs");
10
10
  const Focus = require("../../Focus/Focus.cjs");
11
11
  const tableSectionContext = {
12
12
  type: "body",
13
- filterClassName: "_grid"
13
+ filterClassName: "_trgrid"
14
14
  };
15
15
  const defaultComponent = "tbody";
16
16
  const HvTableBody = React.forwardRef(
@@ -36,22 +36,21 @@ const HvTableBody = React.forwardRef(
36
36
  role: Component === defaultComponent ? null : "rowgroup",
37
37
  ...others,
38
38
  children: withNavigation ? React.Children.map(children, (element) => {
39
- if (React.isValidElement(element)) {
40
- return /* @__PURE__ */ jsxRuntime.jsx(
41
- Focus.HvFocus,
42
- {
43
- id: `my-id-${element.key}`,
44
- rootRef: bodyRef,
45
- strategy: "grid",
46
- filterClass: tableSectionContext.filterClassName,
47
- navigationJump: 1,
48
- focusDisabled: false,
49
- selected: element.props.selected,
50
- children: element
51
- },
52
- `row-${element.key}`
53
- );
54
- }
39
+ if (!React.isValidElement(element)) return void 0;
40
+ return /* @__PURE__ */ jsxRuntime.jsx(
41
+ Focus.HvFocus,
42
+ {
43
+ id: `my-id-${element.key}`,
44
+ rootRef: bodyRef,
45
+ strategy: "grid",
46
+ filterClass: tableSectionContext.filterClassName,
47
+ navigationJump: 1,
48
+ focusDisabled: false,
49
+ selected: element.props.selected,
50
+ children: element
51
+ },
52
+ `row-${element.key}`
53
+ );
55
54
  }) : children
56
55
  }
57
56
  ) });
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
- const useUniqueId = require("../hooks/useUniqueId.cjs");
6
+ const useUniqueId = require("../../hooks/useUniqueId.cjs");
7
7
  const TableSection_styles = require("./TableSection.styles.cjs");
8
- const Section = require("../Section/Section.cjs");
8
+ const Section = require("../../Section/Section.cjs");
9
9
  const HvTableSection = React.forwardRef(
10
10
  function HvTableSection2(props, ref) {
11
11
  const {