@hitachivantara/uikit-react-core 5.100.0 → 5.101.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.
@@ -292,6 +292,7 @@ const HvDropdown = generic.fixedForwardRef(function HvDropdown2(props, ref) {
292
292
  height,
293
293
  maxHeight,
294
294
  virtualized,
295
+ "data-is-dropdown": "true",
295
296
  ...listProps
296
297
  }
297
298
  )
@@ -7,7 +7,6 @@ const SelectionContext = require("../utils/SelectionContext.cjs");
7
7
  const Bar_styles = require("./Bar.styles.cjs");
8
8
  const Bar = (props) => {
9
9
  const {
10
- id,
11
10
  data = [],
12
11
  type = "menubar",
13
12
  className,
@@ -30,7 +29,7 @@ const Bar = (props) => {
30
29
  },
31
30
  className
32
31
  ),
33
- children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes.list, id, onFocus: () => {
32
+ children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes.list, onFocus: () => {
34
33
  }, children })
35
34
  }
36
35
  );
@@ -4,14 +4,14 @@ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
4
  const uikitStyles = require("@hitachivantara/uikit-styles");
5
5
  const show = {
6
6
  top: uikitStyles.theme.header.height,
7
- transition: ["top"],
7
+ transitionProperty: "top",
8
8
  boxShadow: uikitStyles.theme.colors.shadow,
9
9
  transitionDuration: "500ms",
10
10
  backgroundColor: uikitStyles.theme.colors.bgPage
11
11
  };
12
12
  const hide = {
13
13
  top: 0,
14
- transition: ["top"],
14
+ transitionProperty: "top",
15
15
  boxShadow: "none",
16
16
  transitionDuration: "300ms"
17
17
  };
@@ -49,7 +49,14 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvPaginatio
49
49
  display: "flex",
50
50
  alignItems: "center",
51
51
  [`& .${BaseDropdown_styles.staticClasses.arrowContainer}`]: {
52
- marginTop: -2
52
+ display: "flex",
53
+ alignItems: "center",
54
+ top: "unset",
55
+ height: 24,
56
+ "> svg": {
57
+ marginTop: 0,
58
+ marginBottom: 0
59
+ }
53
60
  }
54
61
  },
55
62
  pageSizeRoot: {
@@ -41,7 +41,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvStatusIco
41
41
  ),
42
42
  [`&[data-variant="default"]`]: {
43
43
  color: uikitStyles.theme.colors.text,
44
- backgroundColor: uikitStyles.theme.colors.bgContainerSecondary,
44
+ backgroundColor: uikitStyles.theme.colors.bgPage,
45
45
  outline: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
46
46
  [`&[data-type="simple"]`]: {
47
47
  outline: "none",
@@ -91,6 +91,8 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTableHead
91
91
  },
92
92
  sortable: {},
93
93
  sortButton: {
94
+ paddingLeft: 4,
95
+ paddingTop: 4,
94
96
  ":focus-visible": {
95
97
  boxShadow: "none",
96
98
  backgroundColor: "transparent"
@@ -11,7 +11,6 @@ const SwitchColumnCell = require("./SwitchColumnCell.cjs");
11
11
  const Button = require("../../Button/Button.cjs");
12
12
  const Tag = require("../../Tag/Tag.cjs");
13
13
  const OverflowTooltip = require("../../OverflowTooltip/OverflowTooltip.cjs");
14
- const Typography = require("../../Typography/Typography.cjs");
15
14
  const EM_DASH = "—";
16
15
  const hvStringFallback = (value) => {
17
16
  return typeof value === "string" && value !== "" ? value : EM_DASH;
@@ -102,7 +101,7 @@ function hvTagColumn(col, valueDataKey, colorDataKey, textColorDataKey, fromRowD
102
101
  return /* @__PURE__ */ jsxRuntime.jsx(
103
102
  Tag.HvTag,
104
103
  {
105
- label: /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { variant: "body", children: name }),
104
+ label: name,
106
105
  type: "semantic",
107
106
  color,
108
107
  style: textColor != null ? { color: textColor } : {},
@@ -11,6 +11,12 @@ const keyboardUtils = require("../utils/keyboardUtils.cjs");
11
11
  const Tag_styles = require("./Tag.styles.cjs");
12
12
  const ButtonBase = require("../ButtonBase/ButtonBase.cjs");
13
13
  const Typography = require("../Typography/Typography.cjs");
14
+ const colorMap = {
15
+ positive_20: "positive",
16
+ negative_20: "negative",
17
+ warning_20: "warning",
18
+ neutral_20: "info"
19
+ };
14
20
  const HvTag = React.forwardRef(function HvTag2(props, ref) {
15
21
  const {
16
22
  classes: classesProp,
@@ -26,7 +32,7 @@ const HvTag = React.forwardRef(function HvTag2(props, ref) {
26
32
  selected,
27
33
  defaultSelected = false,
28
34
  showSelectIcon = selectable,
29
- color,
35
+ color: colorProp,
30
36
  icon: iconProp,
31
37
  deleteIcon: deleteIconProp,
32
38
  onDelete,
@@ -38,6 +44,7 @@ const HvTag = React.forwardRef(function HvTag2(props, ref) {
38
44
  ...others
39
45
  } = uikitReactUtils.useDefaultProps("HvTag", props);
40
46
  const { classes, cx } = Tag_styles.useClasses(classesProp);
47
+ const { activeTheme } = uikitReactUtils.useTheme();
41
48
  const [isSelected, setIsSelected] = useControlled.useControlled(
42
49
  selected,
43
50
  Boolean(defaultSelected)
@@ -46,6 +53,7 @@ const HvTag = React.forwardRef(function HvTag2(props, ref) {
46
53
  event.stopPropagation();
47
54
  onDelete?.(event);
48
55
  };
56
+ const color = activeTheme?.name === "pentahoPlus" && colorMap[colorProp] || colorProp;
49
57
  const tagColor = (
50
58
  // backwards-compatibility for `type` prop
51
59
  type === "categorical" && uikitStyles.theme.alpha(color || "cat1", 0.2) || // use the palette color if it matches
@@ -10,7 +10,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTag", {
10
10
  cursor: "default",
11
11
  color: uikitStyles.theme.colors.textDark,
12
12
  borderColor: uikitStyles.theme.colors.border,
13
- borderRadius: 0,
13
+ borderRadius: uikitStyles.theme.radii.round,
14
14
  maxWidth: 180,
15
15
  whiteSpace: "nowrap",
16
16
  transition: "background-color 0.3s ease",
@@ -24,7 +24,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTag", {
24
24
  }
25
25
  },
26
26
  hasIcon: {
27
- paddingLeft: 2
27
+ paddingLeft: uikitStyles.theme.space.xxs
28
28
  },
29
29
  /** @deprecated */
30
30
  outlined: {
@@ -66,11 +66,12 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTag", {
66
66
  }
67
67
  },
68
68
  label: {
69
- padding: uikitStyles.theme.spacing(0, "xxs"),
69
+ padding: uikitStyles.theme.spacing(0, "xs"),
70
70
  color: "inherit"
71
71
  },
72
72
  deleteIcon: {
73
73
  margin: 0,
74
+ marginRight: uikitStyles.theme.space.xxs,
74
75
  padding: 2,
75
76
  ":hover": {
76
77
  backgroundColor: uikitStyles.theme.colors.bgHover
@@ -49,7 +49,7 @@ const defaultIconPathMap = {
49
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
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
51
  SortAsc: "M.08 6.07 6.5.01l6.42 6.06Zm0 0",
52
- SortDesc: "M1.76 5 6 .76 10.24 5z",
52
+ SortDesc: "M12.92 8.93 6.5 14.99.08 8.93Zm0 0",
53
53
  Sort: "M10.24 7 6 11.24 1.76 7zM1.76 5 6 .76 10.24 5z",
54
54
  // single-use icons in Widgets
55
55
  Calendar: "M10.5 2V0h-1v2h-3V0h-1v2H0v14h16V2zM15 15H1V3h14zM3 6h2v2H3zm4 0h2v2H7zm4 0h2v2h-2zm-8 4h2v2H3zm4 0h2v2H7zm4 0h2v2h-2z",
@@ -1153,9 +1153,6 @@ const ds3 = uikitStyles.mergeTheme(uikitStyles.ds3, {
1153
1153
  "& button&.HvMultiButton-button&.HvMultiButton-selected": {
1154
1154
  height: 32
1155
1155
  }
1156
- },
1157
- splitDisabled: {
1158
- backgroundColor: uikitStyles.theme.colors.atmo3
1159
1156
  }
1160
1157
  }
1161
1158
  },
@@ -31,53 +31,88 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
31
31
  panel: {
32
32
  "--r": uikitStyles.theme.radii.round,
33
33
  "&[data-popper-placement*='top']": {
34
+ top: 1,
35
+ borderRadius: "var(--r) var(--r) var(--r) 0"
36
+ },
37
+ "&[data-popper-placement*='top']:has([data-is-dropdown='true'])": {
34
38
  top: 1,
35
39
  borderRadius: "var(--r) var(--r) 0 0"
36
40
  },
37
41
  "&[data-popper-placement*='bottom']": {
42
+ top: -1,
43
+ borderRadius: "0 var(--r) var(--r) var(--r)"
44
+ },
45
+ "&[data-popper-placement*='bottom']:has([data-is-dropdown='true'])": {
38
46
  top: -1,
39
47
  borderRadius: "0 0 var(--r) var(--r)"
40
48
  }
41
49
  }
42
50
  }
43
51
  },
52
+ HvBreadCrumb: {
53
+ classes: {
54
+ link: {
55
+ borderRadius: uikitStyles.theme.radii.round
56
+ }
57
+ }
58
+ },
44
59
  HvButton: {
45
60
  radius: "round",
46
61
  classes: {
47
62
  root: {
48
63
  ":where(:not(.HvButton-disabled,.HvButton-contained))": {
49
- "&[data-color=warning]": { color: uikitStyles.theme.colors.warning_140 }
64
+ "&[data-color=warning]": { color: uikitStyles.theme.colors.warningDeep }
50
65
  }
51
66
  },
52
67
  contained: {
53
68
  ":where([data-color=primary]:not(.HvButton-disabled))": {
54
69
  ":hover, &:focus-visible": {
55
- backgroundColor: uikitStyles.theme.colors.primary_80,
56
- borderColor: uikitStyles.theme.colors.primary_80
70
+ backgroundColor: uikitStyles.theme.colors.primaryStrong,
71
+ borderColor: uikitStyles.theme.colors.primaryStrong
57
72
  }
58
73
  },
59
74
  ":where([data-color=positive]:not(.HvButton-disabled))": {
60
75
  ":hover, &:focus-visible": {
61
- backgroundColor: uikitStyles.theme.colors.positive_80,
62
- borderColor: uikitStyles.theme.colors.positive_80
76
+ backgroundColor: uikitStyles.theme.colors.positiveStrong,
77
+ borderColor: uikitStyles.theme.colors.positiveStrong
63
78
  }
64
79
  },
65
80
  ":where([data-color=warning]:not(.HvButton-disabled))": {
66
- backgroundColor: uikitStyles.theme.colors.warning_120,
81
+ backgroundColor: uikitStyles.theme.colors.warningStrong,
67
82
  ":hover, &:focus-visible": {
68
- backgroundColor: uikitStyles.theme.colors.warning_140,
69
- borderColor: uikitStyles.theme.colors.warning_140
83
+ backgroundColor: uikitStyles.theme.colors.warningDeep,
84
+ borderColor: uikitStyles.theme.colors.warningDeep
70
85
  }
71
86
  },
72
87
  ":where([data-color=negative]:not(.HvButton-disabled))": {
73
88
  ":hover, &:focus-visible": {
74
- backgroundColor: uikitStyles.theme.colors.negative_80,
75
- borderColor: uikitStyles.theme.colors.negative_80
89
+ backgroundColor: uikitStyles.theme.colors.negativeStrong,
90
+ borderColor: uikitStyles.theme.colors.negativeStrong
76
91
  }
77
92
  }
78
93
  }
79
94
  }
80
95
  },
96
+ HvCalendar: {
97
+ classes: {
98
+ root: {
99
+ " .HvCalendarCell-cellContainer": {
100
+ borderRadius: uikitStyles.theme.radii.round,
101
+ "& .HvCalendarCell-startBookend": {
102
+ borderTopLeftRadius: uikitStyles.theme.radii.round,
103
+ borderBottomLeftRadius: uikitStyles.theme.radii.round
104
+ },
105
+ "& .HvCalendarCell-endBookend": {
106
+ borderTopRightRadius: uikitStyles.theme.radii.round,
107
+ borderBottomRightRadius: uikitStyles.theme.radii.round
108
+ }
109
+ },
110
+ " .HvCalendarCell-calendarDateSelected": {
111
+ borderRadius: uikitStyles.theme.radii.round
112
+ }
113
+ }
114
+ }
115
+ },
81
116
  HvCallout: {
82
117
  classes: {
83
118
  messageIcon: {
@@ -86,6 +121,27 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
86
121
  }
87
122
  }
88
123
  },
124
+ HvColorPicker: {
125
+ classes: {
126
+ colorPicker: {
127
+ " .HvColorPickerPresetColors-swatchWrap > span > div": {
128
+ borderRadius: uikitStyles.theme.radii.round
129
+ },
130
+ " .HvColorPickerSavedColors-swatchWrap > span > div": {
131
+ borderRadius: uikitStyles.theme.radii.round
132
+ },
133
+ " .HvColorPickerPicker-saturation > div": {
134
+ borderRadius: uikitStyles.theme.radii.round,
135
+ " .saturation-white": {
136
+ borderRadius: uikitStyles.theme.radii.round,
137
+ " .saturation-black": {
138
+ borderRadius: uikitStyles.theme.radii.round
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ },
89
145
  HvDropdownButton: {
90
146
  classes: {
91
147
  open: {
@@ -102,13 +158,29 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
102
158
  },
103
159
  HvMultiButton: {
104
160
  classes: {
161
+ multiple: {
162
+ borderRadius: uikitStyles.theme.radii.round,
163
+ "& .HvMultiButton-button.HvMultiButton-selected": {
164
+ borderRadius: uikitStyles.theme.radii.round,
165
+ borderColor: uikitStyles.theme.colors.primary,
166
+ borderWidth: 2
167
+ }
168
+ },
169
+ vertical: {
170
+ borderRadius: uikitStyles.theme.radii.round,
171
+ "& .HvMultiButton-button.HvMultiButton-selected": {
172
+ borderRadius: uikitStyles.theme.radii.round,
173
+ borderColor: uikitStyles.theme.colors.primary,
174
+ borderWidth: 2
175
+ }
176
+ },
105
177
  splitGroup: {
106
178
  // NEXT5 subtle multi-buttons have a custom background
107
179
  "& .HvButton-subtle": {
108
- backgroundColor: uikitStyles.theme.colors.atmo1
180
+ backgroundColor: uikitStyles.theme.colors.bgContainer
109
181
  },
110
182
  "&& .HvButton-disabled": {
111
- backgroundColor: uikitStyles.theme.colors.atmo3
183
+ backgroundColor: uikitStyles.theme.colors.bgDisabled
112
184
  }
113
185
  }
114
186
  }
@@ -126,6 +198,13 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
126
198
  }
127
199
  }
128
200
  },
201
+ HvSnackbarContent: {
202
+ classes: {
203
+ root: {
204
+ borderRadius: uikitStyles.theme.radii.round
205
+ }
206
+ }
207
+ },
129
208
  HvStatusIcon: {
130
209
  type: "simple"
131
210
  },
@@ -133,7 +212,7 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
133
212
  classes: {
134
213
  root: {
135
214
  "&.HvTab-selected": {
136
- color: uikitStyles.theme.colors.secondary
215
+ color: uikitStyles.theme.colors.text
137
216
  }
138
217
  }
139
218
  }
@@ -145,6 +224,9 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
145
224
  },
146
225
  categorical: {
147
226
  "--tagColor": uikitStyles.theme.alpha("cat1", 0.2)
227
+ },
228
+ xs: {
229
+ height: 19
148
230
  }
149
231
  }
150
232
  },
@@ -155,7 +237,7 @@ const ds5 = uikitStyles.mergeTheme(uikitStyles.ds5, {
155
237
  padding: 0
156
238
  },
157
239
  "& .HvIconContainer-root": {
158
- color: `${uikitStyles.theme.colors.secondary}!important`
240
+ color: `${uikitStyles.theme.colors.text}!important`
159
241
  }
160
242
  }
161
243
  }
@@ -186,7 +186,6 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
186
186
  classes: {
187
187
  content: {
188
188
  backgroundColor: uikitStyles.theme.colors.bgPage
189
- // = bgContainerSecondary
190
189
  }
191
190
  }
192
191
  },
@@ -254,7 +253,6 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
254
253
  root: {
255
254
  outline: `1px solid ${uikitStyles.theme.colors.border}`,
256
255
  outlineOffset: -1,
257
- borderRadius: uikitStyles.theme.radii.round,
258
256
  ":where(:not([data-color],.HvTag-disabled))": {
259
257
  color: uikitStyles.theme.colors.text,
260
258
  "--tagColor": uikitStyles.theme.colors.bgContainer
@@ -394,7 +392,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
394
392
  },
395
393
  "&[data-color=secondary]": {
396
394
  borderColor: uikitStyles.theme.colors.border,
397
- backgroundColor: uikitStyles.theme.colors.bgContainerSecondary
395
+ backgroundColor: uikitStyles.theme.colors.bgPage
398
396
  },
399
397
  ":hover": {
400
398
  backgroundColor: uikitStyles.theme.colors.primaryDimmed
@@ -291,6 +291,7 @@ const HvDropdown = fixedForwardRef(function HvDropdown2(props, ref) {
291
291
  height,
292
292
  maxHeight,
293
293
  virtualized,
294
+ "data-is-dropdown": "true",
294
295
  ...listProps
295
296
  }
296
297
  )
@@ -6,7 +6,6 @@ import { useClasses } from "./Bar.styles.js";
6
6
  import { staticClasses } from "./Bar.styles.js";
7
7
  const Bar = (props) => {
8
8
  const {
9
- id,
10
9
  data = [],
11
10
  type = "menubar",
12
11
  className,
@@ -29,7 +28,7 @@ const Bar = (props) => {
29
28
  },
30
29
  className
31
30
  ),
32
- children: /* @__PURE__ */ jsx("ul", { className: classes.list, id, onFocus: () => {
31
+ children: /* @__PURE__ */ jsx("ul", { className: classes.list, onFocus: () => {
33
32
  }, children })
34
33
  }
35
34
  );
@@ -2,14 +2,14 @@ import { createClasses } from "@hitachivantara/uikit-react-utils";
2
2
  import { theme } from "@hitachivantara/uikit-styles";
3
3
  const show = {
4
4
  top: theme.header.height,
5
- transition: ["top"],
5
+ transitionProperty: "top",
6
6
  boxShadow: theme.colors.shadow,
7
7
  transitionDuration: "500ms",
8
8
  backgroundColor: theme.colors.bgPage
9
9
  };
10
10
  const hide = {
11
11
  top: 0,
12
- transition: ["top"],
12
+ transitionProperty: "top",
13
13
  boxShadow: "none",
14
14
  transitionDuration: "300ms"
15
15
  };
@@ -47,7 +47,14 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
47
47
  display: "flex",
48
48
  alignItems: "center",
49
49
  [`& .${staticClasses$2.arrowContainer}`]: {
50
- marginTop: -2
50
+ display: "flex",
51
+ alignItems: "center",
52
+ top: "unset",
53
+ height: 24,
54
+ "> svg": {
55
+ marginTop: 0,
56
+ marginBottom: 0
57
+ }
51
58
  }
52
59
  },
53
60
  pageSizeRoot: {
@@ -39,7 +39,7 @@ const { staticClasses, useClasses } = createClasses("HvStatusIcon", {
39
39
  ),
40
40
  [`&[data-variant="default"]`]: {
41
41
  color: theme.colors.text,
42
- backgroundColor: theme.colors.bgContainerSecondary,
42
+ backgroundColor: theme.colors.bgPage,
43
43
  outline: `1px solid ${theme.colors.borderSubtle}`,
44
44
  [`&[data-type="simple"]`]: {
45
45
  outline: "none",
@@ -89,6 +89,8 @@ const { staticClasses, useClasses } = createClasses("HvTableHeader", {
89
89
  },
90
90
  sortable: {},
91
91
  sortButton: {
92
+ paddingLeft: 4,
93
+ paddingTop: 4,
92
94
  ":focus-visible": {
93
95
  boxShadow: "none",
94
96
  backgroundColor: "transparent"
@@ -9,7 +9,6 @@ import { HvSwitchColumnCell } from "./SwitchColumnCell.js";
9
9
  import { HvButton } from "../../Button/Button.js";
10
10
  import { HvTag } from "../../Tag/Tag.js";
11
11
  import { HvOverflowTooltip } from "../../OverflowTooltip/OverflowTooltip.js";
12
- import { HvTypography } from "../../Typography/Typography.js";
13
12
  const EM_DASH = "—";
14
13
  const hvStringFallback = (value) => {
15
14
  return typeof value === "string" && value !== "" ? value : EM_DASH;
@@ -100,7 +99,7 @@ function hvTagColumn(col, valueDataKey, colorDataKey, textColorDataKey, fromRowD
100
99
  return /* @__PURE__ */ jsx(
101
100
  HvTag,
102
101
  {
103
- label: /* @__PURE__ */ jsx(HvTypography, { variant: "body", children: name }),
102
+ label: name,
104
103
  type: "semantic",
105
104
  color,
106
105
  style: textColor != null ? { color: textColor } : {},
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, isValidElement, cloneElement } from "react";
3
- import { useDefaultProps, mergeStyles } from "@hitachivantara/uikit-react-utils";
3
+ import { useDefaultProps, useTheme, mergeStyles } from "@hitachivantara/uikit-react-utils";
4
4
  import { theme, getColor } from "@hitachivantara/uikit-styles";
5
5
  import { HvCheckBoxIcon } from "../BaseCheckBox/CheckBoxIcon.js";
6
6
  import { useControlled } from "../hooks/useControlled.js";
@@ -10,6 +10,12 @@ import { useClasses } from "./Tag.styles.js";
10
10
  import { staticClasses } from "./Tag.styles.js";
11
11
  import { HvButtonBase } from "../ButtonBase/ButtonBase.js";
12
12
  import { HvTypography } from "../Typography/Typography.js";
13
+ const colorMap = {
14
+ positive_20: "positive",
15
+ negative_20: "negative",
16
+ warning_20: "warning",
17
+ neutral_20: "info"
18
+ };
13
19
  const HvTag = forwardRef(function HvTag2(props, ref) {
14
20
  const {
15
21
  classes: classesProp,
@@ -25,7 +31,7 @@ const HvTag = forwardRef(function HvTag2(props, ref) {
25
31
  selected,
26
32
  defaultSelected = false,
27
33
  showSelectIcon = selectable,
28
- color,
34
+ color: colorProp,
29
35
  icon: iconProp,
30
36
  deleteIcon: deleteIconProp,
31
37
  onDelete,
@@ -37,6 +43,7 @@ const HvTag = forwardRef(function HvTag2(props, ref) {
37
43
  ...others
38
44
  } = useDefaultProps("HvTag", props);
39
45
  const { classes, cx } = useClasses(classesProp);
46
+ const { activeTheme } = useTheme();
40
47
  const [isSelected, setIsSelected] = useControlled(
41
48
  selected,
42
49
  Boolean(defaultSelected)
@@ -45,6 +52,7 @@ const HvTag = forwardRef(function HvTag2(props, ref) {
45
52
  event.stopPropagation();
46
53
  onDelete?.(event);
47
54
  };
55
+ const color = activeTheme?.name === "pentahoPlus" && colorMap[colorProp] || colorProp;
48
56
  const tagColor = (
49
57
  // backwards-compatibility for `type` prop
50
58
  type === "categorical" && theme.alpha(color || "cat1", 0.2) || // use the palette color if it matches
@@ -8,7 +8,7 @@ const { staticClasses, useClasses } = createClasses("HvTag", {
8
8
  cursor: "default",
9
9
  color: theme.colors.textDark,
10
10
  borderColor: theme.colors.border,
11
- borderRadius: 0,
11
+ borderRadius: theme.radii.round,
12
12
  maxWidth: 180,
13
13
  whiteSpace: "nowrap",
14
14
  transition: "background-color 0.3s ease",
@@ -22,7 +22,7 @@ const { staticClasses, useClasses } = createClasses("HvTag", {
22
22
  }
23
23
  },
24
24
  hasIcon: {
25
- paddingLeft: 2
25
+ paddingLeft: theme.space.xxs
26
26
  },
27
27
  /** @deprecated */
28
28
  outlined: {
@@ -64,11 +64,12 @@ const { staticClasses, useClasses } = createClasses("HvTag", {
64
64
  }
65
65
  },
66
66
  label: {
67
- padding: theme.spacing(0, "xxs"),
67
+ padding: theme.spacing(0, "xs"),
68
68
  color: "inherit"
69
69
  },
70
70
  deleteIcon: {
71
71
  margin: 0,
72
+ marginRight: theme.space.xxs,
72
73
  padding: 2,
73
74
  ":hover": {
74
75
  backgroundColor: theme.colors.bgHover
package/dist/esm/icons.js CHANGED
@@ -45,7 +45,7 @@ const defaultIconPathMap = {
45
45
  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",
46
46
  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",
47
47
  SortAsc: "M.08 6.07 6.5.01l6.42 6.06Zm0 0",
48
- SortDesc: "M1.76 5 6 .76 10.24 5z",
48
+ SortDesc: "M12.92 8.93 6.5 14.99.08 8.93Zm0 0",
49
49
  Sort: "M10.24 7 6 11.24 1.76 7zM1.76 5 6 .76 10.24 5z",
50
50
  // single-use icons in Widgets
51
51
  Calendar: "M10.5 2V0h-1v2h-3V0h-1v2H0v14h16V2zM15 15H1V3h14zM3 6h2v2H3zm4 0h2v2H7zm4 0h2v2h-2zm-8 4h2v2H3zm4 0h2v2H7zm4 0h2v2h-2z",
@@ -1151,9 +1151,6 @@ const ds3 = mergeTheme(ds3$1, {
1151
1151
  "& button&.HvMultiButton-button&.HvMultiButton-selected": {
1152
1152
  height: 32
1153
1153
  }
1154
- },
1155
- splitDisabled: {
1156
- backgroundColor: theme.colors.atmo3
1157
1154
  }
1158
1155
  }
1159
1156
  },