@hitachivantara/uikit-react-core 5.91.3 → 5.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/dist/cjs/Accordion/Accordion.cjs +2 -2
  2. package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs +2 -2
  3. package/dist/cjs/AppSwitcher/Action/Action.cjs +10 -2
  4. package/dist/cjs/Avatar/Avatar.cjs +3 -2
  5. package/dist/cjs/BaseDropdown/BaseDropdown.cjs +5 -5
  6. package/dist/cjs/BaseInput/BaseInput.styles.cjs +1 -1
  7. package/dist/cjs/BreadCrumb/PathElement/PathElement.cjs +4 -2
  8. package/dist/cjs/BreadCrumb/utils.cjs +2 -2
  9. package/dist/cjs/ButtonBase/ButtonBase.styles.cjs +1 -4
  10. package/dist/cjs/Calendar/CalendarNavigation/Navigation/Navigation.cjs +3 -3
  11. package/dist/cjs/Carousel/Carousel.cjs +4 -4
  12. package/dist/cjs/Carousel/CarouselControls.cjs +3 -3
  13. package/dist/cjs/ColorPicker/ColorPicker.cjs +2 -2
  14. package/dist/cjs/ColorPicker/ColorPicker.styles.cjs +4 -2
  15. package/dist/cjs/ColorPicker/SavedColors/SavedColors.cjs +3 -3
  16. package/dist/cjs/ColorPicker/SavedColors/SavedColors.styles.cjs +1 -10
  17. package/dist/cjs/DatePicker/DatePicker.cjs +2 -2
  18. package/dist/cjs/Dialog/Dialog.cjs +2 -2
  19. package/dist/cjs/Drawer/Drawer.cjs +2 -2
  20. package/dist/cjs/DropDownMenu/DropDownMenu.cjs +2 -2
  21. package/dist/cjs/DropDownMenu/DropDownMenu.styles.cjs +6 -1
  22. package/dist/cjs/DropdownButton/DropdownButton.cjs +5 -4
  23. package/dist/cjs/FileUploader/DropZone/DropZone.cjs +9 -2
  24. package/dist/cjs/FileUploader/File/File.cjs +4 -4
  25. package/dist/cjs/FileUploader/Preview/Preview.cjs +2 -2
  26. package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs +2 -2
  27. package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +5 -1
  28. package/dist/cjs/FormElement/InfoMessage/InfoMessage.styles.cjs +1 -1
  29. package/dist/cjs/FormElement/Label/Label.styles.cjs +1 -1
  30. package/dist/cjs/FormElement/Suggestions/Suggestions.cjs +2 -2
  31. package/dist/cjs/FormElement/WarningText/WarningText.cjs +2 -2
  32. package/dist/cjs/FormElement/WarningText/WarningText.styles.cjs +1 -1
  33. package/dist/cjs/InlineEditor/InlineEditor.cjs +3 -2
  34. package/dist/cjs/Input/Input.cjs +17 -27
  35. package/dist/cjs/Input/Input.styles.cjs +10 -12
  36. package/dist/cjs/Input/icons.cjs +4 -1
  37. package/dist/cjs/List/List.cjs +2 -2
  38. package/dist/cjs/Pagination/Pagination.cjs +5 -5
  39. package/dist/cjs/QueryBuilder/Rule/Rule.cjs +2 -2
  40. package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs +6 -5
  41. package/dist/cjs/Section/Section.cjs +2 -2
  42. package/dist/cjs/Table/TableHeader/TableHeader.cjs +8 -5
  43. package/dist/cjs/Table/TableHeader/utils.cjs +5 -6
  44. package/dist/cjs/Table/hooks/useHvRowExpand.cjs +2 -2
  45. package/dist/cjs/Table/renderers/renderers.cjs +2 -2
  46. package/dist/cjs/Tag/Tag.cjs +6 -5
  47. package/dist/cjs/Tag/Tag.styles.cjs +8 -3
  48. package/dist/cjs/TimePicker/TimePicker.cjs +2 -8
  49. package/dist/cjs/TimePicker/Unit/Unit.cjs +3 -3
  50. package/dist/cjs/TreeView/TreeView.cjs +3 -3
  51. package/dist/cjs/VerticalNavigation/Header/Header.cjs +4 -4
  52. package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.cjs +2 -2
  53. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.cjs +3 -3
  54. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +1 -1
  55. package/dist/cjs/icons.cjs +83 -0
  56. package/dist/cjs/utils/Callout.cjs +5 -3
  57. package/dist/cjs/utils/iconVariant.cjs +9 -13
  58. package/dist/esm/Accordion/Accordion.js +2 -2
  59. package/dist/esm/Accordion/Accordion.js.map +1 -1
  60. package/dist/esm/ActionsGeneric/ActionsGeneric.js +2 -2
  61. package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
  62. package/dist/esm/AppSwitcher/Action/Action.js +10 -2
  63. package/dist/esm/AppSwitcher/Action/Action.js.map +1 -1
  64. package/dist/esm/Avatar/Avatar.js +3 -2
  65. package/dist/esm/Avatar/Avatar.js.map +1 -1
  66. package/dist/esm/BaseDropdown/BaseDropdown.js +5 -5
  67. package/dist/esm/BaseDropdown/BaseDropdown.js.map +1 -1
  68. package/dist/esm/BaseInput/BaseInput.styles.js +1 -1
  69. package/dist/esm/BaseInput/BaseInput.styles.js.map +1 -1
  70. package/dist/esm/BreadCrumb/PathElement/PathElement.js +4 -2
  71. package/dist/esm/BreadCrumb/PathElement/PathElement.js.map +1 -1
  72. package/dist/esm/BreadCrumb/utils.js +2 -2
  73. package/dist/esm/BreadCrumb/utils.js.map +1 -1
  74. package/dist/esm/ButtonBase/ButtonBase.styles.js +1 -4
  75. package/dist/esm/ButtonBase/ButtonBase.styles.js.map +1 -1
  76. package/dist/esm/Calendar/CalendarNavigation/Navigation/Navigation.js +3 -3
  77. package/dist/esm/Calendar/CalendarNavigation/Navigation/Navigation.js.map +1 -1
  78. package/dist/esm/Carousel/Carousel.js +4 -4
  79. package/dist/esm/Carousel/Carousel.js.map +1 -1
  80. package/dist/esm/Carousel/CarouselControls.js +3 -3
  81. package/dist/esm/Carousel/CarouselControls.js.map +1 -1
  82. package/dist/esm/ColorPicker/ColorPicker.js +2 -2
  83. package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
  84. package/dist/esm/ColorPicker/ColorPicker.styles.js +4 -2
  85. package/dist/esm/ColorPicker/ColorPicker.styles.js.map +1 -1
  86. package/dist/esm/ColorPicker/SavedColors/SavedColors.js +3 -3
  87. package/dist/esm/ColorPicker/SavedColors/SavedColors.js.map +1 -1
  88. package/dist/esm/ColorPicker/SavedColors/SavedColors.styles.js +1 -10
  89. package/dist/esm/ColorPicker/SavedColors/SavedColors.styles.js.map +1 -1
  90. package/dist/esm/DatePicker/DatePicker.js +2 -2
  91. package/dist/esm/DatePicker/DatePicker.js.map +1 -1
  92. package/dist/esm/Dialog/Dialog.js +2 -2
  93. package/dist/esm/Dialog/Dialog.js.map +1 -1
  94. package/dist/esm/Drawer/Drawer.js +2 -2
  95. package/dist/esm/Drawer/Drawer.js.map +1 -1
  96. package/dist/esm/DropDownMenu/DropDownMenu.js +2 -2
  97. package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
  98. package/dist/esm/DropDownMenu/DropDownMenu.styles.js +6 -1
  99. package/dist/esm/DropDownMenu/DropDownMenu.styles.js.map +1 -1
  100. package/dist/esm/DropdownButton/DropdownButton.js +5 -4
  101. package/dist/esm/DropdownButton/DropdownButton.js.map +1 -1
  102. package/dist/esm/FileUploader/DropZone/DropZone.js +9 -2
  103. package/dist/esm/FileUploader/DropZone/DropZone.js.map +1 -1
  104. package/dist/esm/FileUploader/File/File.js +4 -4
  105. package/dist/esm/FileUploader/File/File.js.map +1 -1
  106. package/dist/esm/FileUploader/Preview/Preview.js +2 -2
  107. package/dist/esm/FileUploader/Preview/Preview.js.map +1 -1
  108. package/dist/esm/FilterGroup/FilterContent/FilterContent.js +2 -2
  109. package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
  110. package/dist/esm/FormElement/Adornment/Adornment.styles.js +5 -1
  111. package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
  112. package/dist/esm/FormElement/InfoMessage/InfoMessage.styles.js +1 -1
  113. package/dist/esm/FormElement/InfoMessage/InfoMessage.styles.js.map +1 -1
  114. package/dist/esm/FormElement/Label/Label.styles.js +1 -1
  115. package/dist/esm/FormElement/Label/Label.styles.js.map +1 -1
  116. package/dist/esm/FormElement/Suggestions/Suggestions.js +2 -2
  117. package/dist/esm/FormElement/Suggestions/Suggestions.js.map +1 -1
  118. package/dist/esm/FormElement/WarningText/WarningText.js +2 -2
  119. package/dist/esm/FormElement/WarningText/WarningText.js.map +1 -1
  120. package/dist/esm/FormElement/WarningText/WarningText.styles.js +1 -1
  121. package/dist/esm/FormElement/WarningText/WarningText.styles.js.map +1 -1
  122. package/dist/esm/InlineEditor/InlineEditor.js +3 -2
  123. package/dist/esm/InlineEditor/InlineEditor.js.map +1 -1
  124. package/dist/esm/Input/Input.js +16 -26
  125. package/dist/esm/Input/Input.js.map +1 -1
  126. package/dist/esm/Input/Input.styles.js +10 -12
  127. package/dist/esm/Input/Input.styles.js.map +1 -1
  128. package/dist/esm/Input/icons.js +4 -1
  129. package/dist/esm/Input/icons.js.map +1 -1
  130. package/dist/esm/List/List.js +2 -2
  131. package/dist/esm/List/List.js.map +1 -1
  132. package/dist/esm/Pagination/Pagination.js +5 -5
  133. package/dist/esm/Pagination/Pagination.js.map +1 -1
  134. package/dist/esm/QueryBuilder/Rule/Rule.js +2 -2
  135. package/dist/esm/QueryBuilder/Rule/Rule.js.map +1 -1
  136. package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js +6 -5
  137. package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
  138. package/dist/esm/Section/Section.js +2 -2
  139. package/dist/esm/Section/Section.js.map +1 -1
  140. package/dist/esm/Table/TableHeader/TableHeader.js +10 -7
  141. package/dist/esm/Table/TableHeader/TableHeader.js.map +1 -1
  142. package/dist/esm/Table/TableHeader/utils.js +5 -6
  143. package/dist/esm/Table/TableHeader/utils.js.map +1 -1
  144. package/dist/esm/Table/hooks/useHvRowExpand.js +2 -2
  145. package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
  146. package/dist/esm/Table/renderers/renderers.js +2 -2
  147. package/dist/esm/Table/renderers/renderers.js.map +1 -1
  148. package/dist/esm/Tag/Tag.js +6 -5
  149. package/dist/esm/Tag/Tag.js.map +1 -1
  150. package/dist/esm/Tag/Tag.styles.js +8 -3
  151. package/dist/esm/Tag/Tag.styles.js.map +1 -1
  152. package/dist/esm/TimePicker/TimePicker.js +4 -10
  153. package/dist/esm/TimePicker/TimePicker.js.map +1 -1
  154. package/dist/esm/TimePicker/Unit/Unit.js +3 -3
  155. package/dist/esm/TimePicker/Unit/Unit.js.map +1 -1
  156. package/dist/esm/TreeView/TreeView.js +3 -3
  157. package/dist/esm/TreeView/TreeView.js.map +1 -1
  158. package/dist/esm/VerticalNavigation/Header/Header.js +4 -4
  159. package/dist/esm/VerticalNavigation/Header/Header.js.map +1 -1
  160. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js +2 -2
  161. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.js.map +1 -1
  162. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js +3 -3
  163. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js.map +1 -1
  164. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +1 -1
  165. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
  166. package/dist/esm/icons.js +83 -0
  167. package/dist/esm/icons.js.map +1 -1
  168. package/dist/esm/utils/Callout.js +5 -3
  169. package/dist/esm/utils/Callout.js.map +1 -1
  170. package/dist/esm/utils/iconVariant.js +9 -13
  171. package/dist/esm/utils/iconVariant.js.map +1 -1
  172. package/dist/types/index.d.ts +2 -3
  173. package/package.json +5 -6
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const utils = require("@mui/base/utils");
5
- const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
6
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
+ const icons = require("../icons.cjs");
7
7
  const generic = require("../types/generic.cjs");
8
8
  const useTreeView = require("./internals/hooks/useTreeView.cjs");
9
9
  const TreeViewProvider = require("./internals/TreeViewProvider.cjs");
@@ -22,8 +22,8 @@ const HvTreeView = generic.fixedForwardRef(function HvTreeView2(props, ref) {
22
22
  selected,
23
23
  defaultSelected,
24
24
  disableSelection,
25
- defaultCollapseIcon = /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.DropDownXS, {}),
26
- defaultExpandIcon = /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.DropRightXS, {}),
25
+ defaultCollapseIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "CaretDown", size: "xs" }),
26
+ defaultExpandIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "CaretRight", size: "xs" }),
27
27
  defaultEndIcon,
28
28
  defaultParentIcon,
29
29
  onNodeSelect,
@@ -2,8 +2,8 @@
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 uikitReactIcons = require("@hitachivantara/uikit-react-icons");
6
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
6
+ const icons = require("../../icons.cjs");
7
7
  const VerticalNavigationContext = require("../VerticalNavigationContext.cjs");
8
8
  const Header_styles = require("./Header.styles.cjs");
9
9
  const Button = require("../../Button/Button.cjs");
@@ -34,8 +34,8 @@ const HvVerticalNavigationHeader = (props) => {
34
34
  [parentItem, slider]
35
35
  );
36
36
  if (!shouldShowTitle) return null;
37
- const openIcon = openIconProp ?? (!useIcons ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Menu, {}) : /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Forwards, {}));
38
- const closeIcon = closeIconProp ?? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Backwards, {});
37
+ const openIcon = openIconProp ?? /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: useIcons ? "Forwards" : "Menu" });
38
+ const closeIcon = closeIconProp ?? /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "Backwards" });
39
39
  const handleClickBack = () => navigateToParentHandler?.();
40
40
  const { className: backButtonClassName, ...otherBackButtonProps } = backButtonProps;
41
41
  const {
@@ -57,7 +57,7 @@ const HvVerticalNavigationHeader = (props) => {
57
57
  className: cx(classes.backButton, backButtonClassName),
58
58
  "aria-label": "Back",
59
59
  ...otherBackButtonProps,
60
- children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Backwards, { iconSize: "XS" })
60
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "Backwards", size: "xs" })
61
61
  }
62
62
  ),
63
63
  isOpen && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
5
4
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
5
+ const icons = require("../../icons.cjs");
6
6
  const NavigationSlider_styles = require("./NavigationSlider.styles.cjs");
7
7
  const Button = require("../../Button/Button.cjs");
8
8
  const ListContainer = require("../../ListContainer/ListContainer.cjs");
@@ -51,7 +51,7 @@ const HvVerticalNavigationSlider = (props) => {
51
51
  },
52
52
  className: classes.forwardButton,
53
53
  "aria-label": forwardButtonAriaLabel,
54
- children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.DropRightXS, {})
54
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "CaretRight", size: "xs" })
55
55
  }
56
56
  ) : void 0,
57
57
  children: /* @__PURE__ */ jsxRuntime.jsx(OverflowTooltip.HvOverflowTooltip, { data: item.label })
@@ -2,9 +2,9 @@
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 uikitReactIcons = require("@hitachivantara/uikit-react-icons");
6
5
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
7
6
  const useForkRef = require("../../hooks/useForkRef.cjs");
7
+ const icons = require("../../icons.cjs");
8
8
  const DescendantProvider = require("../../TreeView/internals/DescendantProvider.cjs");
9
9
  const setId = require("../../utils/setId.cjs");
10
10
  const VerticalNavigationContext = require("../VerticalNavigationContext.cjs");
@@ -314,7 +314,7 @@ const HvVerticalNavigationTreeViewItem = React.forwardRef(
314
314
  children: payload?.label?.substring(0, 1)
315
315
  }
316
316
  ) : useIcons && icon,
317
- hasChildren && !isOpen ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Forwards, { iconSize: "XS" }) : hasAnyChildWithData && !isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", {})
317
+ hasChildren && !isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "Forwards", size: "xs", compact: true }) : hasAnyChildWithData && !isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", {})
318
318
  ]
319
319
  }
320
320
  ),
@@ -328,7 +328,7 @@ const HvVerticalNavigationTreeViewItem = React.forwardRef(
328
328
  children: /* @__PURE__ */ jsxRuntime.jsx(OverflowTooltip.HvOverflowTooltip, { data: label })
329
329
  }
330
330
  ),
331
- isOpen && expandable && /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.DropDownXS, { rotate: expanded })
331
+ isOpen && expandable && /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: "CaretDown", size: "xs", rotate: expanded })
332
332
  ]
333
333
  }
334
334
  ) });
@@ -132,7 +132,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses(
132
132
  marginLeft: "var(--icon-margin-left)"
133
133
  },
134
134
  "> div:nth-of-type(2)": {
135
- width: "14px",
135
+ width: "12px",
136
136
  marginLeft: "auto"
137
137
  },
138
138
  [`&& .${Avatar_styles.staticClasses.root}`]: {
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
3
5
  const styled = require("@emotion/styled");
6
+ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
7
+ const uikitStyles = require("@hitachivantara/uikit-styles");
4
8
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
5
9
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
10
+ const svgSizeMap = {
11
+ xs: 12,
12
+ sm: 16,
13
+ md: 32,
14
+ lg: 96,
15
+ xl: 112
16
+ };
6
17
  const SvgBase = styled__default.default("svg")({
7
18
  display: "inline-block",
8
19
  fill: "currentcolor",
@@ -12,4 +23,76 @@ const SvgBase = styled__default.default("svg")({
12
23
  flexShrink: 0,
13
24
  transition: "rotate 0.2s ease"
14
25
  });
26
+ const Svg = styled__default.default(SvgBase)(({ size, color, compact, rotate }) => ({
27
+ rotate: rotate ? "180deg" : void 0,
28
+ margin: compact ? 0 : size === "xs" ? 10 : 8,
29
+ color: uikitStyles.getColor(color) ?? "inherit",
30
+ fontSize: svgSizeMap[size] ?? size ?? svgSizeMap.sm
31
+ }));
32
+ const defaultIconPathMap = {
33
+ // Semantic icons
34
+ Success: "M6.39 12 4 9.61l.7-.7 1.62 1.6 4.65-5.57.77.64zM8 15a7 7 0 0 1-4.94-2.06A7.02 7.02 0 1 1 8 15m8-7a8 8 0 1 0-8 8 8 8 0 0 0 8-8",
35
+ Caution: "M7.5 6h1v4h-1zm0 7h1v-1h-1zm8.5 2H0L8 1zM1.72 14h12.56L8 3.02z",
36
+ Fail: "M7.5 4h1v6h-1zm0 8h1v-1h-1zM16 8a8 8 0 1 0-8 8 8 8 0 0 0 8-8m-1 0a7 7 0 1 1-7-7 7 7 0 0 1 7 7",
37
+ Info: "M8 16a8 8 0 1 1 8-8 8 8 0 0 1-8 8M8 1a6.96 6.96 0 0 0-7 6.91V8a6.96 6.96 0 0 0 6.91 7H8a6.96 6.96 0 0 0 7-6.91V8a6.96 6.96 0 0 0-6.91-7zm-.5 11h1V6h-1zm0-7h1V4h-1z",
38
+ // Arrows/Navigation
39
+ CaretDown: "m8 11.53-6.13-6.13.93-.93L8 9.67l5.2-5.2.93.93z",
40
+ CaretRight: "m5.4 14.13-.93-.93L9.67 8l-5.2-5.2.93-.93L11.53 8z",
41
+ DotsHorizontal: "M9.1 7v2h-2V7zM2 7v2h2V7zm10 0v2h2V7z",
42
+ DotsVertical: "M7 6.9h2v2H7zM7 4h2V2H7zm0 10h2v-2H7z",
43
+ Start: "M2.99 16.05H2v-16h.99zm2.97-8 7.34 7.41.7-.7-6.64-6.71L14 1.33l-.7-.7z",
44
+ Backwards: "M11.3 15.5 4 8 11.3.5l.7.8L5.38 8 12 14.8z",
45
+ Forwards: "M4.79 15.5 4 14.8 10.62 8 4 1.3l.79-.8L12 8z",
46
+ End: "M13 0h1v16h-1zM2.58.58l-.7.7L8.57 8l-6.7 6.71.7.71L10 8z",
47
+ // Others
48
+ Add: "M16 8.5H8.5V16h-1V8.5H0v-1h7.5V0h1v7.5H16z",
49
+ Close: "m8.7 8 5.3 5.3-.7.7L8 8.7 2.7 14l-.7-.7L7.3 8 2 2.7l.7-.7L8 7.3 13.3 2l.7.7z",
50
+ Search: "M15.07 14.52 10.5 9.95a5.96 5.96 0 1 0-.72.7l4.58 4.58zM5.9 11A4.95 4.95 0 0 1 1 6v-.1A4.95 4.95 0 0 1 6 1h.1A4.95 4.95 0 0 1 11 6v.1A4.95 4.95 0 0 1 6 11z",
51
+ SortAsc: "M.08 6.07 6.5.01l6.42 6.06Zm0 0",
52
+ SortDesc: "M1.76 5 6 .76 10.24 5z",
53
+ Sort: "M10.24 7 6 11.24 1.76 7zM1.76 5 6 .76 10.24 5z",
54
+ // single-use icons in Widgets
55
+ Calendar: "M10.5 2V0h-1v2h-3V0h-1v2H0v14h16V2zM15 15H1V3h14zM3 6h2v2H3zm4 0h2v2H7zm4 0h2v2h-2zm-8 4h2v2H3zm4 0h2v2H7zm4 0h2v2h-2z",
56
+ ColorPicker: "M15.41.57a2.05 2.05 0 0 0-2.82 0l-2.12 2.12-1.42-1.42-.7.71L14 7.64l.7-.7-1.4-1.42 2.1-2.12a2 2 0 0 0 0-2.83zm-.69 2.11L12.59 4.8l-1.42-1.42 2.12-2.12a1 1 0 0 1 1.42 1.42zM0 13v3h3l9-9-3-3zm2.59 2H1v-1.58l8-8L10.59 7z",
57
+ CurrentStep: "M16 8a8 8 0 0 1-8 8 8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8",
58
+ Delete: "M12 1H4V0h8zm4 1v1h-2.1L13 16H3L2.1 3H0V2zm-3 1H3.1L4 15h8.1z",
59
+ Doc: "M9 0H2v16h12V5zm3.6 5H9V1.4zm.4 10H3V1h5v5h5z",
60
+ Edit: "M13.17 7.07 8.93 2.83 11.76 0 16 4.24zm-2.83-4.24 2.83 2.83 1.42-1.42-2.83-2.83zm-2.7 2.7L1 12.16V15h2.83l6.65-6.65-2.83-2.83m-.01-1.4 4.24 4.24L4.24 16H0v-4.24z",
61
+ Filters: "M1 2v1.6l6 6.1V14h2V9.7l6-6.1V2zM0 1h16v3l-6 6v5H6v-4.9L0 4z",
62
+ Fullscreen: "M16 0v4.5h-1V1.7l-4.65 4.65-.7-.7L14.29 1H11.5V0zM4.5 1V0H0v4.5h1V1.7l4.65 4.65.7-.7L1.71 1zM15 14.3l-4.65-4.65-.7.7L14.29 15H11.5v1H16v-4.5h-1zM5.65 9.64 1 14.29V11.5H0V16h4.5v-1H1.7l4.65-4.65z",
63
+ Menu: "M1 2v1.6l6 6.1V14h2V9.7l6-6.1V2zM0 1h16v3l-6 6v5H6v-4.9L0 4z",
64
+ OtherStep: "M12 8a4 4 0 0 1-4 4 4 4 0 0 1-4-4 4 4 0 0 1 4-4 4 4 0 0 1 4 4",
65
+ Time: "M8 15a7.02 7.02 0 1 0-4.94-2.06A7 7 0 0 0 8 15m0 1a8 8 0 1 1 8-8 8 8 0 0 1-8 8m2.65-4.65L7.5 8.21V3h1v4.8l2.85 2.85z",
66
+ User: "M9.6 8.7A4.5 4.5 0 0 0 8.04 0H8a4.5 4.5 0 0 0-4.5 4.46v.04a4.6 4.6 0 0 0 2.9 4.2A7.7 7.7 0 0 0 .5 16h1a6.5 6.5 0 0 1 6.47-6.5H8a6.5 6.5 0 0 1 6.5 6.47V16h1a7.5 7.5 0 0 0-5.9-7.3M4.5 4.5A3.54 3.54 0 0 1 8 1a3.54 3.54 0 0 1 3.5 3.5A3.54 3.54 0 0 1 8 8a3.54 3.54 0 0 1-3.5-3.5"
67
+ };
68
+ function HvIconInternal(props, ref) {
69
+ const { name, title, "aria-label": ariaLabel, children, ...others } = props;
70
+ const { activeTheme } = uikitReactUtils.useTheme();
71
+ const iconsPathMap = React.useMemo(
72
+ () => ({ ...defaultIconPathMap, ...activeTheme?.icons }),
73
+ [activeTheme?.icons]
74
+ );
75
+ const isDefaultIcon = iconsPathMap[name] === defaultIconPathMap[name];
76
+ return (
77
+ // @ts-expect-error `rotate` is fine
78
+ /* @__PURE__ */ jsxRuntime.jsxs(
79
+ Svg,
80
+ {
81
+ ref,
82
+ "data-name": name,
83
+ viewBox: !isDefaultIcon && activeTheme?.icons?.viewBox || "0 0 16 16",
84
+ focusable: false,
85
+ "aria-label": ariaLabel,
86
+ role: title || ariaLabel ? "img" : "none",
87
+ ...others,
88
+ children: [
89
+ title ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: title }) : null,
90
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: iconsPathMap[name] })
91
+ ]
92
+ }
93
+ )
94
+ );
95
+ }
96
+ const HvIcon = React.memo(React.forwardRef(HvIconInternal));
97
+ exports.HvIcon = HvIcon;
15
98
  exports.SvgBase = SvgBase;
@@ -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 SnackbarContent = require("@mui/material/SnackbarContent");
6
- const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
7
6
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
8
7
  const uikitStyles = require("@hitachivantara/uikit-styles");
8
+ 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");
@@ -47,7 +47,9 @@ const { useClasses } = uikitReactUtils.createClasses("HvCallout", {
47
47
  overflow: "hidden",
48
48
  wordBreak: "break-word"
49
49
  },
50
- messageIcon: {},
50
+ messageIcon: {
51
+ lineHeight: 0
52
+ },
51
53
  messageTitle: {
52
54
  display: "block",
53
55
  fontWeight: uikitStyles.theme.fontWeights.semibold
@@ -130,7 +132,7 @@ const HvCallout = React.forwardRef(function HvCallout2(props, ref) {
130
132
  "aria-label": "Close",
131
133
  onClick: (evt) => onClose?.(evt, "clickaway"),
132
134
  ...actionProps,
133
- children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Close, { size: "XS" })
135
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { size: "xs", name: "Close" })
134
136
  }
135
137
  ),
136
138
  showCustomActions && actionsContent
@@ -1,19 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
4
+ const icons = require("../icons.cjs");
5
+ const variantIconMap = {
6
+ success: "Success",
7
+ warning: "Caution",
8
+ error: "Fail",
9
+ info: "Info"
10
+ };
5
11
  const iconVariant = (variant, color) => {
6
- switch (variant) {
7
- case "success":
8
- return /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Success, { color });
9
- case "warning":
10
- return /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Caution, { color });
11
- case "error":
12
- return /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Fail, { color });
13
- case "info":
14
- return /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Info, { color });
15
- default:
16
- return null;
17
- }
12
+ if (variant === "default" || variant === "accent") return null;
13
+ return /* @__PURE__ */ jsxRuntime.jsx(icons.HvIcon, { name: variantIconMap[variant], color });
18
14
  };
19
15
  exports.iconVariant = iconVariant;
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useCallback, useMemo } from "react";
3
- import { DropUpXS } from "@hitachivantara/uikit-react-icons";
4
3
  import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
5
4
  import { useExpandable } from "../hooks/useExpandable.js";
5
+ import { HvIcon } from "../icons.js";
6
6
  import { useClasses } from "./Accordion.styles.js";
7
7
  import { staticClasses } from "./Accordion.styles.js";
8
8
  import { HvTypography } from "../Typography/Typography.js";
@@ -55,7 +55,7 @@ const HvAccordion = forwardRef(function HvAccordion2(props, ref) {
55
55
  onClick: handleClick,
56
56
  variant: labelVariant,
57
57
  children: [
58
- /* @__PURE__ */ jsx(DropUpXS, { rotate: !isOpen }),
58
+ /* @__PURE__ */ jsx(HvIcon, { name: "CaretDown", rotate: isOpen, size: "xs" }),
59
59
  label
60
60
  ]
61
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../../src/Accordion/Accordion.tsx"],"sourcesContent":["import { forwardRef, useCallback, useMemo } from \"react\";\nimport { DropUpXS } from \"@hitachivantara/uikit-react-icons\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvButtonBase } from \"../ButtonBase\";\nimport { useExpandable } from \"../hooks/useExpandable\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { HvTypography, HvTypographyVariants } from \"../Typography\";\nimport { staticClasses, useClasses } from \"./Accordion.styles\";\n\nexport { staticClasses as accordionClasses };\n\nexport type HvAccordionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvAccordionProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /** Content to be rendered. */\n children: React.ReactNode;\n /** The accordion label button. */\n label?: string;\n /** The function that will be executed whenever the accordion toggles. It will receive the state of the accordion. */\n onChange?: (event: React.SyntheticEvent, value: boolean) => void;\n /** Whether the accordion is open or not. If this property is defined the accordion must be fully controlled. */\n expanded?: boolean;\n /** When uncontrolled, defines the initial expanded state. */\n defaultExpanded?: boolean;\n /** An object containing props to be passed onto container holding the accordion children. */\n containerProps?: React.HTMLAttributes<HTMLDivElement>;\n /** Heading level to apply to accordion button. If ´undefined´ the button won't have a header wrapper. */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Whether the accordion is disabled. */\n disabled?: boolean;\n /** Typography variant for the label. */\n labelVariant?: HvTypographyVariants;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvAccordionClasses;\n /** Whether to disable the internal usage of `preventDefault` and `stopPropagation` when the `onChange` event is triggered. */\n disableEventHandling?: boolean; // TODO - remove in v6 as this should be the default behavior: `preventDefault` and `stopPropagation` shouldn't be triggered internally\n}\n\n/**\n * A accordion is a design element that expands in place to expose hidden information.\n */\nexport const HvAccordion = forwardRef<\n React.ComponentRef<\"div\">,\n HvAccordionProps\n>(function HvAccordion(props, ref) {\n const {\n id,\n className,\n classes: classesProp,\n disabled = false,\n label,\n onChange,\n children,\n expanded,\n headingLevel,\n defaultExpanded = false,\n containerProps,\n labelVariant = \"label\",\n disableEventHandling,\n ...others\n } = useDefaultProps(\"HvAccordion\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const { isOpen, toggleOpen, buttonProps, regionProps } = useExpandable({\n id,\n expanded,\n disabled,\n defaultExpanded,\n });\n\n const handleClick = useCallback(\n (event: React.SyntheticEvent) => {\n if (!disabled) {\n onChange?.(event, isOpen);\n toggleOpen();\n }\n\n if (!disableEventHandling) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n [disableEventHandling, disabled, isOpen, onChange, toggleOpen],\n );\n\n const accordionHeader = useMemo(() => {\n const accordionButton = (\n <HvTypography\n {...buttonProps}\n component={HvButtonBase}\n className={cx(classes.label, { [classes.disabled]: disabled })}\n disabled={disabled}\n onClick={handleClick}\n variant={labelVariant}\n >\n <DropUpXS rotate={!isOpen} />\n {label}\n </HvTypography>\n );\n\n return headingLevel === undefined ? (\n accordionButton\n ) : (\n <HvTypography component={`h${headingLevel}`} variant={labelVariant}>\n {accordionButton}\n </HvTypography>\n );\n }, [\n cx,\n classes,\n handleClick,\n label,\n buttonProps,\n disabled,\n headingLevel,\n isOpen,\n labelVariant,\n ]);\n\n return (\n <div ref={ref} id={id} className={cx(classes.root, className)} {...others}>\n {accordionHeader}\n <div\n className={cx(classes.container, { [classes.hidden]: !isOpen })}\n hidden={!isOpen}\n {...regionProps}\n {...containerProps}\n >\n {children}\n </div>\n </div>\n );\n});\n"],"names":["HvAccordion"],"mappings":";;;;;;;;;AA8CO,MAAM,cAAc,WAGzB,SAASA,aAAY,OAAO,KAAK;AAC3B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,eAAe,KAAK;AACxC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAE9C,QAAM,EAAE,QAAQ,YAAY,aAAa,YAAA,IAAgB,cAAc;AAAA,IACrE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,QAAM,cAAc;AAAA,IAClB,CAAC,UAAgC;AAC/B,UAAI,CAAC,UAAU;AACb,mBAAW,OAAO,MAAM;AACb,mBAAA;AAAA,MAAA;AAGb,UAAI,CAAC,sBAAsB;AACzB,cAAM,eAAe;AACrB,cAAM,gBAAgB;AAAA,MAAA;AAAA,IAE1B;AAAA,IACA,CAAC,sBAAsB,UAAU,QAAQ,UAAU,UAAU;AAAA,EAC/D;AAEM,QAAA,kBAAkB,QAAQ,MAAM;AACpC,UAAM,kBACJ;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,WAAW;AAAA,QACX,WAAW,GAAG,QAAQ,OAAO,EAAE,CAAC,QAAQ,QAAQ,GAAG,UAAU;AAAA,QAC7D;AAAA,QACA,SAAS;AAAA,QACT,SAAS;AAAA,QAET,UAAA;AAAA,UAAC,oBAAA,UAAA,EAAS,QAAQ,CAAC,OAAQ,CAAA;AAAA,UAC1B;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAGK,WAAA,iBAAiB,SACtB,kBAEC,oBAAA,cAAA,EAAa,WAAW,IAAI,YAAY,IAAI,SAAS,cACnD,UACH,iBAAA;AAAA,EAAA,GAED;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAGC,SAAA,qBAAC,OAAI,EAAA,KAAU,IAAQ,WAAW,GAAG,QAAQ,MAAM,SAAS,GAAI,GAAG,QAChE,UAAA;AAAA,IAAA;AAAA,IACD;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,QAAQ,WAAW,EAAE,CAAC,QAAQ,MAAM,GAAG,CAAC,QAAQ;AAAA,QAC9D,QAAQ,CAAC;AAAA,QACR,GAAG;AAAA,QACH,GAAG;AAAA,QAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../../src/Accordion/Accordion.tsx"],"sourcesContent":["import { forwardRef, useCallback, useMemo } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvButtonBase } from \"../ButtonBase\";\nimport { useExpandable } from \"../hooks/useExpandable\";\nimport { HvIcon } from \"../icons\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { HvTypography, HvTypographyVariants } from \"../Typography\";\nimport { staticClasses, useClasses } from \"./Accordion.styles\";\n\nexport { staticClasses as accordionClasses };\n\nexport type HvAccordionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvAccordionProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /** Content to be rendered. */\n children: React.ReactNode;\n /** The accordion label button. */\n label?: string;\n /** The function that will be executed whenever the accordion toggles. It will receive the state of the accordion. */\n onChange?: (event: React.SyntheticEvent, value: boolean) => void;\n /** Whether the accordion is open or not. If this property is defined the accordion must be fully controlled. */\n expanded?: boolean;\n /** When uncontrolled, defines the initial expanded state. */\n defaultExpanded?: boolean;\n /** An object containing props to be passed onto container holding the accordion children. */\n containerProps?: React.HTMLAttributes<HTMLDivElement>;\n /** Heading level to apply to accordion button. If ´undefined´ the button won't have a header wrapper. */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Whether the accordion is disabled. */\n disabled?: boolean;\n /** Typography variant for the label. */\n labelVariant?: HvTypographyVariants;\n /** A Jss Object used to override or extend the styles applied. */\n classes?: HvAccordionClasses;\n /** Whether to disable the internal usage of `preventDefault` and `stopPropagation` when the `onChange` event is triggered. */\n disableEventHandling?: boolean; // TODO - remove in v6 as this should be the default behavior: `preventDefault` and `stopPropagation` shouldn't be triggered internally\n}\n\n/**\n * A accordion is a design element that expands in place to expose hidden information.\n */\nexport const HvAccordion = forwardRef<\n React.ComponentRef<\"div\">,\n HvAccordionProps\n>(function HvAccordion(props, ref) {\n const {\n id,\n className,\n classes: classesProp,\n disabled = false,\n label,\n onChange,\n children,\n expanded,\n headingLevel,\n defaultExpanded = false,\n containerProps,\n labelVariant = \"label\",\n disableEventHandling,\n ...others\n } = useDefaultProps(\"HvAccordion\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const { isOpen, toggleOpen, buttonProps, regionProps } = useExpandable({\n id,\n expanded,\n disabled,\n defaultExpanded,\n });\n\n const handleClick = useCallback(\n (event: React.SyntheticEvent) => {\n if (!disabled) {\n onChange?.(event, isOpen);\n toggleOpen();\n }\n\n if (!disableEventHandling) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n [disableEventHandling, disabled, isOpen, onChange, toggleOpen],\n );\n\n const accordionHeader = useMemo(() => {\n const accordionButton = (\n <HvTypography\n {...buttonProps}\n component={HvButtonBase}\n className={cx(classes.label, { [classes.disabled]: disabled })}\n disabled={disabled}\n onClick={handleClick}\n variant={labelVariant}\n >\n <HvIcon name=\"CaretDown\" rotate={isOpen} size=\"xs\" />\n {label}\n </HvTypography>\n );\n\n return headingLevel === undefined ? (\n accordionButton\n ) : (\n <HvTypography component={`h${headingLevel}`} variant={labelVariant}>\n {accordionButton}\n </HvTypography>\n );\n }, [\n cx,\n classes,\n handleClick,\n label,\n buttonProps,\n disabled,\n headingLevel,\n isOpen,\n labelVariant,\n ]);\n\n return (\n <div ref={ref} id={id} className={cx(classes.root, className)} {...others}>\n {accordionHeader}\n <div\n className={cx(classes.container, { [classes.hidden]: !isOpen })}\n hidden={!isOpen}\n {...regionProps}\n {...containerProps}\n >\n {children}\n </div>\n </div>\n );\n});\n"],"names":["HvAccordion"],"mappings":";;;;;;;;;AA8CO,MAAM,cAAc,WAGzB,SAASA,aAAY,OAAO,KAAK;AAC3B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,eAAe,KAAK;AACxC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAE9C,QAAM,EAAE,QAAQ,YAAY,aAAa,YAAA,IAAgB,cAAc;AAAA,IACrE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,QAAM,cAAc;AAAA,I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, Fragment } from "react/jsx-runtime";
2
2
  import { forwardRef, isValidElement } from "react";
3
- import { MoreOptionsVertical } from "@hitachivantara/uikit-react-icons";
4
3
  import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
4
+ import { HvIcon } from "../icons.js";
5
5
  import { setId } from "../utils/setId.js";
6
6
  import { useClasses } from "./ActionsGeneric.styles.js";
7
7
  import { staticClasses } from "./ActionsGeneric.styles.js";
@@ -77,7 +77,7 @@ const HvActionsGeneric = forwardRef(function HvActionsGeneric2(props, ref) {
77
77
  icon: classes.dropDownMenuButton,
78
78
  iconSelected: classes.dropDownMenuButtonSelected
79
79
  },
80
- icon: /* @__PURE__ */ jsx(MoreOptionsVertical, { color: iconColor }),
80
+ icon: /* @__PURE__ */ jsx(HvIcon, { name: "DotsVertical", color: iconColor }),
81
81
  placement: "left",
82
82
  onClick: (event, action) => {
83
83
  handleCallback(event, idProp || "", action);
@@ -1 +1 @@
1
- {"version":3,"file":"ActionsGeneric.js","sources":["../../../src/ActionsGeneric/ActionsGeneric.tsx"],"sourcesContent":["import { forwardRef, isValidElement } from \"react\";\nimport { MoreOptionsVertical } from \"@hitachivantara/uikit-react-icons\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvButton, HvButtonProps, HvButtonVariant } from \"../Button\";\nimport { HvDropDownMenu, HvDropDownMenuProps } from \"../DropDownMenu\";\nimport { HvIconButton } from \"../IconButton\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./ActionsGeneric.styles\";\n\nexport { staticClasses as actionsGenericClasses };\n\nexport type HvActionsGenericClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvActionGeneric {\n /** Action id. */\n id: string;\n /** Action label. */\n label: string;\n /** Action icon. */\n icon?:\n | React.ReactNode\n | ((params: { isDisabled?: boolean }) => React.ReactNode);\n /** Whether the action is disabled or not. */\n disabled?: boolean;\n /** When set to `true`, the button will have the icon has its content and a tooltip with the label will appear when the button is visible and hovered. */\n iconOnly?: boolean;\n}\n\nexport interface HvActionsGenericProps extends HvBaseProps {\n /**\n * The button category for all actions.\n *\n * @deprecated Use `variant` instead.\n */\n category?: HvButtonVariant;\n /** The button variant for all actions. */\n variant?: HvButtonVariant;\n /** Whether the actions should be all disabled. */\n disabled?: boolean;\n /** Whether the actions should be all icon buttons when visible. */\n iconOnly?: boolean;\n /** The renderable content inside the actions slot of the footer, or an array of actions. */\n actions: React.ReactNode | HvActionGeneric[];\n /**\n * The callback function called when an action is triggered, receiving the `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionsCallback?: (\n event: React.SyntheticEvent,\n id: string,\n action: HvActionGeneric,\n ) => void;\n /** The callback function called when an action is triggered, receiving the `action` as parameter. */\n onAction?: (event: React.SyntheticEvent, action: HvActionGeneric) => void;\n /** The maximum number of visible actions before they're collapsed into a dropdown menu. */\n maxVisibleActions?: number;\n /** Props to be applied to the dropdown menu. */\n dropdownMenuProps?: Partial<HvDropDownMenuProps>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvActionsGenericClasses;\n}\n\nexport const HvActionsGeneric = forwardRef<\n React.ComponentRef<\"div\">,\n HvActionsGenericProps\n>(function HvActionsGeneric(props, ref) {\n const {\n id: idProp,\n classes: classesProp,\n className,\n category = \"secondaryGhost\", // TODO - remove and update variant default in v6\n variant: variantProp,\n disabled = false,\n actions = [],\n actionsCallback, // TODO - remove in v6\n onAction,\n maxVisibleActions = Infinity,\n iconOnly: iconOnlyProp,\n dropdownMenuProps: dropdownMenuPropsProp,\n ...others\n } = useDefaultProps(\"HvActionsGeneric\", props);\n\n const { onClick: onClickDropdownMenu, ...dropdownMenuProps } =\n dropdownMenuPropsProp || {};\n\n const variant = variantProp || category;\n\n const { classes, cx } = useClasses(classesProp);\n\n const handleCallback: HvActionsGenericProps[\"actionsCallback\"] = (\n event,\n id,\n action,\n ) => {\n actionsCallback?.(event, id, action);\n onAction?.(event, action);\n };\n\n if (!Array.isArray(actions)) return isValidElement(actions) ? actions : null;\n\n const renderButton = (action: HvActionGeneric, idx: number) => {\n const {\n disabled: actDisabled,\n id: actId,\n icon,\n label,\n iconOnly,\n ...other\n } = action;\n const actionId = setId(idProp, idx, \"action\", action.id);\n\n const renderedIcon = isValidElement(icon)\n ? icon\n : (icon as Function)?.({ isDisabled: disabled });\n\n const commonButtonProps: HvButtonProps = {\n id: actionId,\n variant,\n className: classes.button,\n disabled: actDisabled ?? disabled,\n onClick: (event) => handleCallback(event, idProp || \"\", action),\n ...other,\n };\n\n const key = actionId || idx;\n const isIcon = iconOnly ?? iconOnlyProp;\n\n if (isIcon) {\n return (\n <HvIconButton key={key} {...commonButtonProps} title={label}>\n {renderedIcon}\n </HvIconButton>\n );\n }\n\n return (\n <HvButton key={key} {...commonButtonProps} startIcon={renderedIcon}>\n {label}\n </HvButton>\n );\n };\n\n const renderActionsGrid = () => {\n const actsVisible = actions.slice(0, maxVisibleActions);\n const actsDropdown = actions.slice(maxVisibleActions);\n\n const iconColor = (variant === \"semantic\" && \"textDark\") || undefined;\n\n return (\n <>\n {actsVisible.map((action, idx) => renderButton(action, idx))}\n <HvDropDownMenu\n id={setId(idProp, \"menu\")}\n disabled={disabled}\n variant={variant}\n classes={{\n root: classes.dropDownMenu,\n icon: classes.dropDownMenuButton,\n iconSelected: classes.dropDownMenuButtonSelected,\n }}\n icon={<MoreOptionsVertical color={iconColor} />}\n placement=\"left\"\n onClick={(event, action) => {\n handleCallback(event, idProp || \"\", action as HvActionGeneric);\n onClickDropdownMenu?.(event, action);\n }}\n dataList={actsDropdown}\n keepOpened={false}\n disablePortal={false}\n {...dropdownMenuProps}\n />\n </>\n );\n };\n\n const actionOverflow = actions.length > maxVisibleActions;\n\n return (\n <div\n ref={ref}\n className={cx(\n classes.root,\n { [classes.actionContainer]: actionOverflow },\n className,\n )}\n {...others}\n >\n {actionOverflow\n ? renderActionsGrid()\n : actions.map((action, idx) => renderButton(action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AAG,CAAC;AAAA,IAAA;AAAA,EAC5D;AAEJ,CAAC;"}
1
+ {"version":3,"file":"ActionsGeneric.js","sources":["../../../src/ActionsGeneric/ActionsGeneric.tsx"],"sourcesContent":["import { forwardRef, isValidElement } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvButton, HvButtonProps, HvButtonVariant } from \"../Button\";\nimport { HvDropDownMenu, HvDropDownMenuProps } from \"../DropDownMenu\";\nimport { HvIconButton } from \"../IconButton\";\nimport { HvIcon } from \"../icons\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./ActionsGeneric.styles\";\n\nexport { staticClasses as actionsGenericClasses };\n\nexport type HvActionsGenericClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvActionGeneric {\n /** Action id. */\n id: string;\n /** Action label. */\n label: string;\n /** Action icon. */\n icon?:\n | React.ReactNode\n | ((params: { isDisabled?: boolean }) => React.ReactNode);\n /** Whether the action is disabled or not. */\n disabled?: boolean;\n /** When set to `true`, the button will have the icon has its content and a tooltip with the label will appear when the button is visible and hovered. */\n iconOnly?: boolean;\n}\n\nexport interface HvActionsGenericProps extends HvBaseProps {\n /**\n * The button category for all actions.\n *\n * @deprecated Use `variant` instead.\n */\n category?: HvButtonVariant;\n /** The button variant for all actions. */\n variant?: HvButtonVariant;\n /** Whether the actions should be all disabled. */\n disabled?: boolean;\n /** Whether the actions should be all icon buttons when visible. */\n iconOnly?: boolean;\n /** The renderable content inside the actions slot of the footer, or an array of actions. */\n actions: React.ReactNode | HvActionGeneric[];\n /**\n * The callback function called when an action is triggered, receiving the `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionsCallback?: (\n event: React.SyntheticEvent,\n id: string,\n action: HvActionGeneric,\n ) => void;\n /** The callback function called when an action is triggered, receiving the `action` as parameter. */\n onAction?: (event: React.SyntheticEvent, action: HvActionGeneric) => void;\n /** The maximum number of visible actions before they're collapsed into a dropdown menu. */\n maxVisibleActions?: number;\n /** Props to be applied to the dropdown menu. */\n dropdownMenuProps?: Partial<HvDropDownMenuProps>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvActionsGenericClasses;\n}\n\nexport const HvActionsGeneric = forwardRef<\n React.ComponentRef<\"div\">,\n HvActionsGenericProps\n>(function HvActionsGeneric(props, ref) {\n const {\n id: idProp,\n classes: classesProp,\n className,\n category = \"secondaryGhost\", // TODO - remove and update variant default in v6\n variant: variantProp,\n disabled = false,\n actions = [],\n actionsCallback, // TODO - remove in v6\n onAction,\n maxVisibleActions = Infinity,\n iconOnly: iconOnlyProp,\n dropdownMenuProps: dropdownMenuPropsProp,\n ...others\n } = useDefaultProps(\"HvActionsGeneric\", props);\n\n const { onClick: onClickDropdownMenu, ...dropdownMenuProps } =\n dropdownMenuPropsProp || {};\n\n const variant = variantProp || category;\n\n const { classes, cx } = useClasses(classesProp);\n\n const handleCallback: HvActionsGenericProps[\"actionsCallback\"] = (\n event,\n id,\n action,\n ) => {\n actionsCallback?.(event, id, action);\n onAction?.(event, action);\n };\n\n if (!Array.isArray(actions)) return isValidElement(actions) ? actions : null;\n\n const renderButton = (action: HvActionGeneric, idx: number) => {\n const {\n disabled: actDisabled,\n id: actId,\n icon,\n label,\n iconOnly,\n ...other\n } = action;\n const actionId = setId(idProp, idx, \"action\", action.id);\n\n const renderedIcon = isValidElement(icon)\n ? icon\n : (icon as Function)?.({ isDisabled: disabled });\n\n const commonButtonProps: HvButtonProps = {\n id: actionId,\n variant,\n className: classes.button,\n disabled: actDisabled ?? disabled,\n onClick: (event) => handleCallback(event, idProp || \"\", action),\n ...other,\n };\n\n const key = actionId || idx;\n const isIcon = iconOnly ?? iconOnlyProp;\n\n if (isIcon) {\n return (\n <HvIconButton key={key} {...commonButtonProps} title={label}>\n {renderedIcon}\n </HvIconButton>\n );\n }\n\n return (\n <HvButton key={key} {...commonButtonProps} startIcon={renderedIcon}>\n {label}\n </HvButton>\n );\n };\n\n const renderActionsGrid = () => {\n const actsVisible = actions.slice(0, maxVisibleActions);\n const actsDropdown = actions.slice(maxVisibleActions);\n\n const iconColor = (variant === \"semantic\" && \"textDark\") || undefined;\n\n return (\n <>\n {actsVisible.map((action, idx) => renderButton(action, idx))}\n <HvDropDownMenu\n id={setId(idProp, \"menu\")}\n disabled={disabled}\n variant={variant}\n classes={{\n root: classes.dropDownMenu,\n icon: classes.dropDownMenuButton,\n iconSelected: classes.dropDownMenuButtonSelected,\n }}\n icon={<HvIcon name=\"DotsVertical\" color={iconColor} />}\n placement=\"left\"\n onClick={(event, action) => {\n handleCallback(event, idProp || \"\", action as HvActionGeneric);\n onClickDropdownMenu?.(event, action);\n }}\n dataList={actsDropdown}\n keepOpened={false}\n disablePortal={false}\n {...dropdownMenuProps}\n />\n </>\n );\n };\n\n const actionOverflow = actions.length > maxVisibleActions;\n\n return (\n <div\n ref={ref}\n className={cx(\n classes.root,\n { [classes.actionContainer]: actionOverflow },\n className,\n )}\n {...others}\n >\n {actionOverflow\n ? renderActionsGrid()\n : actions.map((action, idx) => renderButton(action, idx))}\n </div>\n );\n});\n"],"names":["HvActionsGeneric"],"mappings":";;;;;;;;;;AAoEO,MAAM,mBAAmB,WAG9B,SAASA,kBAAiB,OAAO,KAAK;AAChC,QAAA;AAAA,IACJ,IAAI;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA,WAAW;AAAA;AAAA,IACX,SAAS;AAAA,IACT,WAAW;AAAA,IACX,UAAU,CAAC;AAAA,IACX;AAAA;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB,UAAU;AAAA,IACV,mBAAmB;AAAA,IACnB,GAAG;AAAA,EAAA,IACD,gBAAgB,oBAAoB,KAAK;AAE7C,QAAM,EAAE,SAAS,qBAAqB,GAAG,kBAAkB,IACzD,yBAAyB,CAAC;AAE5B,QAAM,UAAU,eAAe;AAE/B,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAE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ACA,SAAS;AAAA,YACP,MAAM,QAAQ;AAAA,YACd,MAAM,QAAQ;AAAA,YACd,cAAc,QAAQ;AAAA,UACxB;AAAA,UACA,MAAO,oBAAA,QAAA,EAAO,MAAK,gBAAe,OAAO,WAAW;AAAA,UACpD,WAAU;AAAA,UACV,SAAS,CAAC,OAAO,WAAW;AACX,2BAAA,OAAO,UAAU,IAAI,MAAyB;AAC7D,kCAAsB,OAAO,MAAM;AAAA,UACrC;AAAA,UACA,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,eAAe;AAAA,UACd,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN,GACF;AAAA,EAEJ;AAEM,QAAA,iBAAiB,QAAQ,SAAS;AAGtC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,QAAQ;AAAA,QACR,EAAE,CAAC,QAAQ,eAAe,GAAG,eAAe;AAAA,QAC5C;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH,UAAA,iBACG,kBAAkB,IAClB,QAAQ,IAAI,CAAC,QAAQ,QAAQ,aAAa,QAAQ,GAAG,CAAC;AAAA,IAAA;AAAA,EAC5D;AAEJ,CAAC;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from "react";
3
- import { Info } from "@hitachivantara/uikit-react-icons";
4
3
  import { getColor } from "@hitachivantara/uikit-styles";
5
4
  import { useUniqueId } from "../../hooks/useUniqueId.js";
5
+ import { HvIcon } from "../../icons.js";
6
6
  import { useClasses } from "./Action.styles.js";
7
7
  import { staticClasses } from "./Action.styles.js";
8
8
  import { HvAvatar } from "../../Avatar/Avatar.js";
@@ -97,7 +97,15 @@ const HvAppSwitcherAction = ({
97
97
  }
98
98
  }
99
99
  ),
100
- description && /* @__PURE__ */ jsx(HvTooltip, { title: description, children: /* @__PURE__ */ jsx(Info, { className: classes.iconInfo, id: descriptionElementId }) })
100
+ description && /* @__PURE__ */ jsx(HvTooltip, { title: description, children: /* @__PURE__ */ jsx(
101
+ HvIcon,
102
+ {
103
+ name: "Info",
104
+ compact: true,
105
+ className: classes.iconInfo,
106
+ id: descriptionElementId
107
+ }
108
+ ) })
101
109
  ]
102
110
  }
103
111
  )
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sources":["../../../../src/AppSwitcher/Action/Action.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\nimport { Info } from \"@hitachivantara/uikit-react-icons\";\nimport { type ExtractNames } from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny } from \"@hitachivantara/uikit-styles\";\n\nimport { HvAvatar } from \"../../Avatar\";\nimport { useUniqueId } from \"../../hooks/useUniqueId\";\nimport { HvListItem } from \"../../ListContainer\";\nimport { HvOverflowTooltip } from \"../../OverflowTooltip\";\nimport { HvTooltip } from \"../../Tooltip\";\nimport { HvBaseProps } from \"../../types/generic\";\nimport { HvTypography } from \"../../Typography\";\nimport { staticClasses, useClasses } from \"./Action.styles\";\n\nexport { staticClasses as appSwitcherActionClasses };\n\nexport type HvAppSwitcherActionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvAppSwitcherActionApplication {\n /** Id of the application. */\n id?: string;\n /** Name of the application, this is the value that will be displayed on the component. */\n name: string;\n /** URL with the icon location to be used to represent the application. iconUrl will only be used if no iconElement is provided. */\n iconUrl?: string;\n /** Element to be added as the icon representing the application. The iconElement will be the primary option to be displayed. */\n iconElement?: React.ReactElement<any>;\n /** Small description of the application. */\n description?: string;\n /** URL where the application is accessible. */\n url?: string;\n /** Defines if the application should be opened in the same tab or in a new one. */\n target?: \"_top\" | \"_blank\";\n /** If true, the item will be disabled. */\n disabled?: boolean;\n /** True when the application is selected, false otherwise. */\n isSelected?: boolean;\n /** The color of the application. */\n color?: HvColorAny;\n}\n\nexport interface HvAppSwitcherActionProps extends HvBaseProps {\n /** The application data to be used to render the Action object. */\n application: HvAppSwitcherActionApplication;\n /** Callback triggered when the action is clicked. */\n onClickCallback?: (\n event: React.MouseEvent,\n application: HvAppSwitcherActionApplication,\n ) => void;\n /** Must return a boolean stating if the action element is selected or not. */\n isSelectedCallback?: (application: HvAppSwitcherActionApplication) => boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvAppSwitcherActionClasses;\n}\n\nexport const HvAppSwitcherAction = ({\n id,\n className,\n classes: classesProp,\n application,\n onClickCallback = () => {},\n isSelectedCallback = () => false,\n}: HvAppSwitcherActionProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n const { name, description, disabled, iconElement, iconUrl, url, target } =\n application;\n\n const color = getColor(\n disabled ? \"textDisabled\" : application?.color,\n \"text\",\n );\n\n const [validIconUrl, setValidIconUrl] = useState<boolean>(true);\n\n const renderApplicationIcon = () => {\n if (iconElement) {\n return iconElement;\n }\n\n if (iconUrl && validIconUrl) {\n return (\n <img\n className={classes.iconUrl}\n src={iconUrl}\n onError={() => {\n setValidIconUrl(false);\n }}\n alt={description}\n />\n );\n }\n\n const brokenTitle = name.split(\" \");\n const initials =\n brokenTitle[0].substring(0, 1) +\n (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : \"\");\n\n return (\n <HvAvatar size=\"sm\" backgroundColor={color} variant=\"square\" aria-hidden>\n {initials}\n </HvAvatar>\n );\n };\n\n const isSelected = isSelectedCallback(application);\n\n /**\n * Handles the onClick event and triggers the appropriate callback if it exists.\n */\n const handleOnClick = useCallback(\n (event: React.MouseEvent) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n onClickCallback?.(event, { ...application, isSelected });\n },\n [application, disabled, isSelected, onClickCallback],\n );\n\n const isLink = url != null;\n const descriptionElementId = useUniqueId(id);\n\n return (\n <HvListItem\n id={id}\n interactive\n tabIndex={0}\n selected={isSelected}\n disabled={disabled}\n className={cx(\n classes.root,\n { [classes.disabled]: disabled, [classes.selected]: isSelected },\n className,\n )}\n >\n <HvTypography\n component=\"button\"\n className={classes.typography}\n onClick={handleOnClick}\n style={{ borderColor: color }}\n aria-label={name}\n {...(description && { \"aria-describedby\": descriptionElementId })}\n {...(isLink && { component: \"a\", href: url, target: target || \"_top\" })}\n >\n <div className={classes.icon}>{renderApplicationIcon()}</div>\n\n <HvOverflowTooltip\n paragraphOverflow\n className={classes.title}\n placement=\"top-start\"\n data={name}\n classes={{\n tooltipAnchorParagraph: classes.titleAnchor,\n }}\n />\n\n {description && (\n <HvTooltip title={description}>\n <Info className={classes.iconInfo} id={descriptionElementId} />\n </HvTooltip>\n )}\n </HvTypography>\n </HvListItem>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAuDO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,qBAAqB,MAAM;AAC7B,MAAgC;AAC9B,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,EAAE,MAAM,aAAa,UAAU,aAAa,SAAS,KAAK,WAC9D;AAEF,QAAM,QAAQ;AAAA,IACZ,WAAW,iBAAiB,aAAa;AAAA,IACzC;AAAA,EACF;AAEA,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,IAAI;AAE9D,QAAM,wBAAwB,MAAM;AAClC,QAAI,aAAa;AACR,aAAA;AAAA,IAAA;AAGT,QAAI,WAAW,cAAc;AAEzB,aAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,QAAQ;AAAA,UACnB,KAAK;AAAA,UACL,SAAS,MAAM;AACb,4BAAgB,KAAK;AAAA,UACvB;AAAA,UACA,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAIE,UAAA,cAAc,KAAK,MAAM,GAAG;AAClC,UAAM,WACJ,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC,KAC5B,YAAY,CAAC,IAAI,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC,IAAI;AAGnD,WAAA,oBAAC,UAAS,EAAA,MAAK,MAA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,oBAAC,MAAK,EAAA,WAAW,QAAQ,UAAU,IAAI,qBAAA,CAAsB,EAC/D,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"Action.js","sources":["../../../../src/AppSwitcher/Action/Action.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\nimport type { ExtractNames } from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny } from \"@hitachivantara/uikit-styles\";\n\nimport { HvAvatar } from \"../../Avatar\";\nimport { useUniqueId } from \"../../hooks/useUniqueId\";\nimport { HvIcon } from \"../../icons\";\nimport { HvListItem } from \"../../ListContainer\";\nimport { HvOverflowTooltip } from \"../../OverflowTooltip\";\nimport { HvTooltip } from \"../../Tooltip\";\nimport { HvBaseProps } from \"../../types/generic\";\nimport { HvTypography } from \"../../Typography\";\nimport { staticClasses, useClasses } from \"./Action.styles\";\n\nexport { staticClasses as appSwitcherActionClasses };\n\nexport type HvAppSwitcherActionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvAppSwitcherActionApplication {\n /** Id of the application. */\n id?: string;\n /** Name of the application, this is the value that will be displayed on the component. */\n name: string;\n /** URL with the icon location to be used to represent the application. iconUrl will only be used if no iconElement is provided. */\n iconUrl?: string;\n /** Element to be added as the icon representing the application. The iconElement will be the primary option to be displayed. */\n iconElement?: React.ReactElement<any>;\n /** Small description of the application. */\n description?: string;\n /** URL where the application is accessible. */\n url?: string;\n /** Defines if the application should be opened in the same tab or in a new one. */\n target?: \"_top\" | \"_blank\";\n /** If true, the item will be disabled. */\n disabled?: boolean;\n /** True when the application is selected, false otherwise. */\n isSelected?: boolean;\n /** The color of the application. */\n color?: HvColorAny;\n}\n\nexport interface HvAppSwitcherActionProps extends HvBaseProps {\n /** The application data to be used to render the Action object. */\n application: HvAppSwitcherActionApplication;\n /** Callback triggered when the action is clicked. */\n onClickCallback?: (\n event: React.MouseEvent,\n application: HvAppSwitcherActionApplication,\n ) => void;\n /** Must return a boolean stating if the action element is selected or not. */\n isSelectedCallback?: (application: HvAppSwitcherActionApplication) => boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvAppSwitcherActionClasses;\n}\n\nexport const HvAppSwitcherAction = ({\n id,\n className,\n classes: classesProp,\n application,\n onClickCallback = () => {},\n isSelectedCallback = () => false,\n}: HvAppSwitcherActionProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n const { name, description, disabled, iconElement, iconUrl, url, target } =\n application;\n\n const color = getColor(\n disabled ? \"textDisabled\" : application?.color,\n \"text\",\n );\n\n const [validIconUrl, setValidIconUrl] = useState<boolean>(true);\n\n const renderApplicationIcon = () => {\n if (iconElement) {\n return iconElement;\n }\n\n if (iconUrl && validIconUrl) {\n return (\n <img\n className={classes.iconUrl}\n src={iconUrl}\n onError={() => {\n setValidIconUrl(false);\n }}\n alt={description}\n />\n );\n }\n\n const brokenTitle = name.split(\" \");\n const initials =\n brokenTitle[0].substring(0, 1) +\n (brokenTitle[1] ? brokenTitle[1].substring(0, 1) : \"\");\n\n return (\n <HvAvatar size=\"sm\" backgroundColor={color} variant=\"square\" aria-hidden>\n {initials}\n </HvAvatar>\n );\n };\n\n const isSelected = isSelectedCallback(application);\n\n /**\n * Handles the onClick event and triggers the appropriate callback if it exists.\n */\n const handleOnClick = useCallback(\n (event: React.MouseEvent) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n onClickCallback?.(event, { ...application, isSelected });\n },\n [application, disabled, isSelected, onClickCallback],\n );\n\n const isLink = url != null;\n const descriptionElementId = useUniqueId(id);\n\n return (\n <HvListItem\n id={id}\n interactive\n tabIndex={0}\n selected={isSelected}\n disabled={disabled}\n className={cx(\n classes.root,\n { [classes.disabled]: disabled, [classes.selected]: isSelected },\n className,\n )}\n >\n <HvTypography\n component=\"button\"\n className={classes.typography}\n onClick={handleOnClick}\n style={{ borderColor: color }}\n aria-label={name}\n {...(description && { \"aria-describedby\": descriptionElementId })}\n {...(isLink && { component: \"a\", href: url, target: target || \"_top\" })}\n >\n <div className={classes.icon}>{renderApplicationIcon()}</div>\n\n <HvOverflowTooltip\n paragraphOverflow\n className={classes.title}\n placement=\"top-start\"\n data={name}\n classes={{\n tooltipAnchorParagraph: classes.titleAnchor,\n }}\n />\n\n {description && (\n <HvTooltip title={description}>\n <HvIcon\n name=\"Info\"\n compact\n className={classes.iconInfo}\n id={descriptionElementId}\n />\n </HvTooltip>\n )}\n </HvTypography>\n </HvListItem>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAuDO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,qBAAqB,MAAM;AAC7B,MAAgC;AAC9B,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,EAAE,MAAM,aAAa,UAAU,aAAa,SAAS,KAAK,WAC9D;AAEF,QAAM,QAAQ;AAAA,IACZ,WAAW,iBAAiB,aAAa;AAAA,IACzC;AAAA,EACF;AAEA,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,IAAI;AAE9D,QAAM,wBAAwB,MAAM;AAClC,QAAI,aAAa;AACR,aAAA;AAAA,IAAA;AAGT,QAAI,WAAW,cAAc;AAEzB,aAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,QAAQ;AAAA,UACnB,KAAK;AAAA,UACL,SAAS,MAAM;AACb,4BAAgB,KAAK;AAAA,UACvB;AAAA,UACA,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAIE,UAAA,cAAc,KAAK,MAAM,GAAG;AAClC,UAAM,WACJ,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC,KAC5B,YAAY,CAAC,IAAI,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC,IAAI;AAGnD,WAAA,oBAAC,UAAS,EAAA,MAAK,MAAK,iBAAiB,OAAO,SAAQ,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;AAAA,gBACC,MAAK;AAAA,gBACL,SAAO;AAAA,gBACP,WAAW,QAAQ;AAAA,gBACnB,IAAI;AAAA,cAAA;AAAA,YAAA,EAER,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AAEJ;"}
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import MuiAvatar from "@mui/material/Avatar";
4
- import { User } from "@hitachivantara/uikit-react-icons";
5
4
  import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
6
5
  import { getColor } from "@hitachivantara/uikit-styles";
7
6
  import { useAvatarGroupContext } from "../AvatarGroup/AvatarGroupContext.js";
8
7
  import { useImageLoaded } from "../hooks/useImageLoaded.js";
8
+ import { HvIcon } from "../icons.js";
9
9
  import { useClasses } from "./Avatar.styles.js";
10
10
  import { staticClasses } from "./Avatar.styles.js";
11
11
  const decreaseSizeMap = {
@@ -61,8 +61,9 @@ const HvAvatar = forwardRef(function HvAvatar2(props, ref) {
61
61
  [children] = alt;
62
62
  } else {
63
63
  children = /* @__PURE__ */ jsx(
64
- User,
64
+ HvIcon,
65
65
  {
66
+ name: "User",
66
67
  color,
67
68
  size: decreaseSizeMap[size],
68
69
  className: classes.fallback
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../../../src/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport MuiAvatar, { AvatarProps as MuiAvatarProps } from \"@mui/material/Avatar\";\nimport { User } from \"@hitachivantara/uikit-react-icons\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny, HvSize } from \"@hitachivantara/uikit-styles\";\n\nimport { useAvatarGroupContext } from \"../AvatarGroup/AvatarGroupContext\";\nimport { useImageLoaded } from \"../hooks/useImageLoaded\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { staticClasses, useClasses } from \"./Avatar.styles\";\n\nconst decreaseSizeMap = {\n xl: \"lg\",\n lg: \"md\",\n md: \"sm\",\n sm: \"xs\",\n xs: \"xs\",\n} satisfies Record<HvSize, HvSize>;\n\nexport { staticClasses as avatarClasses };\n\nexport type HvAvatarClasses = ExtractNames<typeof useClasses>;\n\nexport type HvAvatarVariant = \"circular\" | \"square\";\n\n/** @deprecated use `HvSize` instead */\nexport type HvAvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport interface HvAvatarProps extends HvBaseProps {\n /** The component used for the root node. Either a string to use a DOM element or a component. */\n component?: React.ElementType;\n /** Sets one of the standard sizes of the icons */\n size?: HvSize;\n /** A color representing the foreground color of the avatar's letters or the generic User icon fallback. */\n color?: HvColorAny;\n /** A String representing the background color of the avatar. */\n backgroundColor?: HvColorAny;\n /** The `src` attribute for the `img` element. */\n src?: string;\n /** The `srcSet` attribute for the `img` element. Use this attribute for responsive image display. */\n srcSet?: string;\n /** The `sizes` attribute for the `img` element. */\n sizes?: string;\n /** Used in combination with `src` or `srcSet` to provide an alt attribute for the rendered `img` element. */\n alt?: string;\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps?: React.HTMLAttributes<HTMLImageElement>;\n /** A string representing the type of avatar to display, circular or square. */\n variant?: HvAvatarVariant;\n /** A string representing the color of the avatar border that represents its status. */\n status?: string;\n /** A string representing the color of the avatar badge. */\n badge?: string;\n /** Attributes applied to the avatar element. */\n avatarProps?: MuiAvatarProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvAvatarClasses;\n}\n\n/**\n * Avatars can be used to represent a user or a brand.\n * They can show an image, an icon or the initial letters of a name, for example.\n */\nexport const HvAvatar = forwardRef<\n // no-indent\n React.ComponentRef<\"div\">,\n HvAvatarProps\n>(function HvAvatar(props, ref) {\n const {\n className,\n style,\n classes: classesProp,\n children: childrenProp,\n component = \"div\",\n size: sizeProp,\n backgroundColor = \"text\",\n color = \"bgContainer\",\n src,\n srcSet,\n sizes,\n alt,\n imgProps,\n status,\n badge,\n variant = \"circular\",\n avatarProps,\n ...others\n } = useDefaultProps(\"HvAvatar\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const avatarGroupContext = useAvatarGroupContext();\n\n const size = sizeProp || avatarGroupContext?.size || \"sm\";\n\n let children: React.ReactNode;\n\n // Use a hook instead of onError on the img element to support server-side rendering.\n const imageLoaded = useImageLoaded(src, srcSet);\n const hasImg = src || srcSet;\n const hasImgNotFailing = hasImg && imageLoaded !== \"error\";\n\n if (hasImgNotFailing) {\n children = (\n <img\n alt={alt}\n src={src}\n srcSet={srcSet}\n sizes={sizes}\n className={classes.img}\n {...imgProps}\n />\n );\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n [children] = alt;\n } else {\n children = (\n <User\n color={color}\n size={decreaseSizeMap[size]}\n className={classes.fallback}\n />\n );\n }\n\n const inlineStyle: React.CSSProperties = {\n ...style,\n };\n\n if (component != null && typeof component !== \"string\") {\n // override border-radius with custom components\n inlineStyle.borderRadius = \"50%\";\n }\n\n if (!hasImgNotFailing) {\n inlineStyle.backgroundColor = getColor(backgroundColor, \"text\");\n inlineStyle.color = getColor(color, \"textDimmed\");\n }\n\n const statusInlineStyle: React.CSSProperties = {};\n if (status) {\n // set the status border. we're using the boxShadow property to set the border\n // to be inside the container and not on its edge.\n const statusColor = getColor(status, \"positive\");\n statusInlineStyle.boxShadow = `inset 0px 0px 0px 2px ${statusColor}`;\n }\n\n return (\n <div\n ref={ref}\n className={cx(classes.container, classes.status, classes[variant])}\n style={statusInlineStyle}\n {...others}\n >\n {badge && (\n <div\n className={classes.badge}\n style={{ backgroundColor: getColor(badge, \"positive\") }}\n />\n )}\n <MuiAvatar\n component={component}\n // Consider not using the root and className classes in this component\n className={cx(classes.root, classes.avatar, classes[size], className)}\n style={inlineStyle}\n variant={variant}\n size={size}\n {...avatarProps}\n >\n {children}\n </MuiAvatar>\n </div>\n );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AAc,UAAU;AAEtD,gBAAY,eAAe;AAAA,EAAA;AAG7B,MAAI,CAAC,kBAAkB;AACT,gBAAA,kBAAkB,SAAS,iBAAiB,MAAM;AAClD,gBAAA,QAAQ,SAAS,OAAO,YAAY;AAAA,EAAA;AAGlD,QAAM,oBAAyC,CAAC;AAChD,MAAI,QAAQ;AAGJ,UAAA,cAAc,SAAS,QAAQ,UAAU;AAC7B,sBAAA,YAAY,yBAAyB,WAAW;AAAA,EAAA;AAIlE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACjE,OAAO;AAAA,MACN,GAAG;AAAA,MAEH,UAAA;AAAA,QACC,SAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,QAAQ;AAAA,YACnB,OAAO,EAAE,iBAAiB,SAAS,OAAO,UAAU,EAAE;AAAA,UAAA;AAAA,QACxD;AAAA,QAEF;AAAA,UAAC;AAAA,UAAA;AAAA,YACC;AAAA,YAEA,WAAW,GAAG,QAAQ,MAAM,QAAQ,QAAQ,QAAQ,IAAI,GAAG,SAAS;AAAA,YACpE,OAAO;AAAA,YACP;AAAA,YACA;AAAA,YACC,GAAG;AAAA,YAEH;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Avatar.js","sources":["../../../src/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport MuiAvatar, { AvatarProps as MuiAvatarProps } from \"@mui/material/Avatar\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny, HvSize } from \"@hitachivantara/uikit-styles\";\n\nimport { useAvatarGroupContext } from \"../AvatarGroup/AvatarGroupContext\";\nimport { useImageLoaded } from \"../hooks/useImageLoaded\";\nimport { HvIcon } from \"../icons\";\nimport { HvBaseProps } from \"../types/generic\";\nimport { staticClasses, useClasses } from \"./Avatar.styles\";\n\nconst decreaseSizeMap = {\n xl: \"lg\",\n lg: \"md\",\n md: \"sm\",\n sm: \"xs\",\n xs: \"xs\",\n} satisfies Record<HvSize, HvSize>;\n\nexport { staticClasses as avatarClasses };\n\nexport type HvAvatarClasses = ExtractNames<typeof useClasses>;\n\nexport type HvAvatarVariant = \"circular\" | \"square\";\n\n/** @deprecated use `HvSize` instead */\nexport type HvAvatarSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport interface HvAvatarProps extends HvBaseProps {\n /** The component used for the root node. Either a string to use a DOM element or a component. */\n component?: React.ElementType;\n /** Sets one of the standard sizes of the icons */\n size?: HvSize;\n /** A color representing the foreground color of the avatar's letters or the generic User icon fallback. */\n color?: HvColorAny;\n /** A String representing the background color of the avatar. */\n backgroundColor?: HvColorAny;\n /** The `src` attribute for the `img` element. */\n src?: string;\n /** The `srcSet` attribute for the `img` element. Use this attribute for responsive image display. */\n srcSet?: string;\n /** The `sizes` attribute for the `img` element. */\n sizes?: string;\n /** Used in combination with `src` or `srcSet` to provide an alt attribute for the rendered `img` element. */\n alt?: string;\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps?: React.HTMLAttributes<HTMLImageElement>;\n /** A string representing the type of avatar to display, circular or square. */\n variant?: HvAvatarVariant;\n /** A string representing the color of the avatar border that represents its status. */\n status?: string;\n /** A string representing the color of the avatar badge. */\n badge?: string;\n /** Attributes applied to the avatar element. */\n avatarProps?: MuiAvatarProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvAvatarClasses;\n}\n\n/**\n * Avatars can be used to represent a user or a brand.\n * They can show an image, an icon or the initial letters of a name, for example.\n */\nexport const HvAvatar = forwardRef<\n // no-indent\n React.ComponentRef<\"div\">,\n HvAvatarProps\n>(function HvAvatar(props, ref) {\n const {\n className,\n style,\n classes: classesProp,\n children: childrenProp,\n component = \"div\",\n size: sizeProp,\n backgroundColor = \"text\",\n color = \"bgContainer\",\n src,\n srcSet,\n sizes,\n alt,\n imgProps,\n status,\n badge,\n variant = \"circular\",\n avatarProps,\n ...others\n } = useDefaultProps(\"HvAvatar\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const avatarGroupContext = useAvatarGroupContext();\n\n const size = sizeProp || avatarGroupContext?.size || \"sm\";\n\n let children: React.ReactNode;\n\n // Use a hook instead of onError on the img element to support server-side rendering.\n const imageLoaded = useImageLoaded(src, srcSet);\n const hasImg = src || srcSet;\n const hasImgNotFailing = hasImg && imageLoaded !== \"error\";\n\n if (hasImgNotFailing) {\n children = (\n <img\n alt={alt}\n src={src}\n srcSet={srcSet}\n sizes={sizes}\n className={classes.img}\n {...imgProps}\n />\n );\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n [children] = alt;\n } else {\n children = (\n <HvIcon\n name=\"User\"\n color={color}\n size={decreaseSizeMap[size]}\n className={classes.fallback}\n />\n );\n }\n\n const inlineStyle: React.CSSProperties = {\n ...style,\n };\n\n if (component != null && typeof component !== \"string\") {\n // override border-radius with custom components\n inlineStyle.borderRadius = \"50%\";\n }\n\n if (!hasImgNotFailing) {\n inlineStyle.backgroundColor = getColor(backgroundColor, \"text\");\n inlineStyle.color = getColor(color, \"textDimmed\");\n }\n\n const statusInlineStyle: React.CSSProperties = {};\n if (status) {\n // set the status border. we're using the boxShadow property to set the border\n // to be inside the container and not on its edge.\n const statusColor = getColor(status, \"positive\");\n statusInlineStyle.boxShadow = `inset 0px 0px 0px 2px ${statusColor}`;\n }\n\n return (\n <div\n ref={ref}\n className={cx(classes.container, classes.status, classes[variant])}\n style={statusInlineStyle}\n {...others}\n >\n {badge && (\n <div\n className={classes.badge}\n style={{ backgroundColor: getColor(badge, \"positive\") }}\n />\n )}\n <MuiAvatar\n component={component}\n // Consider not using the root and className classes in this component\n className={cx(classes.root, classes.avatar, classes[size], className)}\n style={inlineStyle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IJ,QAAM,cAAmC;AAAA,IACvC,GAAG;AAAA,EACL;AAEA,MAAI,aAAa,QAAQ,OAAO,cAAc,UAAU;AAEtD,gBAAY,eAAe;AAAA,EAAA;AAG7B,MAAI,CAAC,kBAAkB;AACT,gBAAA,kBAAkB,SAAS,iBAAiB,MAAM;AAClD,gBAAA,QAAQ,SAAS,OAAO,YAAY;AAAA,EAAA;AAGlD,QAAM,oBAAyC,CAAC;AAChD,MAAI,QAAQ;AAGJ,UAAA,cAAc,SAAS,QAAQ,UAAU;AAC7B,sBAAA,YAAY,yBAAyB,WAAW;AAAA,EAAA;AAIlE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,OAAO,CAAC;AAAA,MACjE,OAAO;AAAA,MACN,GAAG;AAAA,MAEH,UAAA;AAAA,QACC,SAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,QAAQ;AAAA,YACnB,OAAO,EAAE,iBAAiB,SAAS,OAAO,UAAU,EAAE;AAAA,UAAA;AAAA,QACxD;AAAA,QAEF;AAAA,UAAC;AAAA,UAAA;AAAA,YACC;AAAA,YAEA,WAAW,GAAG,QAAQ,MAAM,QAAQ,QAAQ,QAAQ,IAAI,GAAG,SAAS;AAAA,YACpE,OAAO;AAAA,YACP;AAAA,YACA;AAAA,YACC,GAAG;AAAA,YAEH;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAEJ,CAAC;"}
@@ -3,10 +3,10 @@ import { forwardRef, useState, useCallback, useMemo, isValidElement, cloneElemen
3
3
  import { usePopper } from "react-popper";
4
4
  import { useForkRef } from "@mui/material/utils";
5
5
  import { detectOverflow } from "@popperjs/core";
6
- import { DropUpXS, DropDownXS } from "@hitachivantara/uikit-react-icons";
7
6
  import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
8
7
  import { useControlled } from "../hooks/useControlled.js";
9
8
  import { useUniqueId } from "../hooks/useUniqueId.js";
9
+ import { HvIcon } from "../icons.js";
10
10
  import { getFirstAndLastFocus } from "../utils/focusableElementFinder.js";
11
11
  import { isKey, isOneOfKeys } from "../utils/keyboardUtils.js";
12
12
  import { setId } from "../utils/setId.js";
@@ -90,7 +90,6 @@ const BaseDropdown = forwardRef(function BaseDropdown2(props, ref) {
90
90
  },
91
91
  [isOpen, disabled, setIsOpen, onToggle, referenceElement]
92
92
  );
93
- const ExpanderComponent = isOpen ? DropUpXS : DropDownXS;
94
93
  const defaultHeaderElement = /* @__PURE__ */ jsxs(
95
94
  "div",
96
95
  {
@@ -120,10 +119,11 @@ const BaseDropdown = forwardRef(function BaseDropdown2(props, ref) {
120
119
  }
121
120
  ),
122
121
  /* @__PURE__ */ jsx("div", { className: classes.arrowContainer, children: adornment || /* @__PURE__ */ jsx(
123
- ExpanderComponent,
122
+ HvIcon,
124
123
  {
125
- iconSize: "XS",
126
- color: disabled ? "textDisabled" : void 0,
124
+ name: "CaretDown",
125
+ size: "xs",
126
+ rotate: isOpen,
127
127
  className: classes.arrow
128
128
  }
129
129
  ) })