@hitachivantara/uikit-react-core 5.106.1 → 5.107.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.
@@ -1,8 +1,7 @@
1
1
  import { createClasses } from "@hitachivantara/uikit-react-utils";
2
2
  import { theme } from "@hitachivantara/uikit-styles";
3
- import { staticClasses as staticClasses$2 } from "../BaseDropdown/BaseDropdown.styles.js";
3
+ import { staticClasses as staticClasses$1 } from "../BaseDropdown/BaseDropdown.styles.js";
4
4
  import "../BaseDropdown/BaseDropdown.js";
5
- import { staticClasses as staticClasses$1 } from "../Input/Input.styles.js";
6
5
  const { staticClasses, useClasses } = createClasses("HvPagination", {
7
6
  /** Styles applied to the component root class. */
8
7
  root: {
@@ -13,24 +12,7 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
13
12
  alignItems: "stretch",
14
13
  flexWrap: "wrap",
15
14
  marginTop: theme.space.sm,
16
- [`& $pageSizeInput`]: {
17
- ...theme.typography.caption2,
18
- "&:focus": {
19
- padding: 0
20
- }
21
- },
22
- [`& $pageSizeInputContainer`]: {
23
- width: 24,
24
- minWidth: 24,
25
- maxWidth: theme.spacing(8)
26
- },
27
- [`&& $pageSizeInputRoot`]: {
28
- backgroundColor: "transparent",
29
- height: "24px",
30
- "&:focus, &:focus-within, &:hover": {
31
- backgroundColor: theme.colors.bgHover
32
- }
33
- }
15
+ ...theme.typography.caption2
34
16
  },
35
17
  /** Styles applied to the page size selector container. */
36
18
  pageSizeOptions: {
@@ -46,7 +28,7 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
46
28
  height: 24,
47
29
  display: "flex",
48
30
  alignItems: "center",
49
- [`& .${staticClasses$2.arrowContainer}`]: {
31
+ [`& .${staticClasses$1.arrowContainer}`]: {
50
32
  display: "flex",
51
33
  alignItems: "center",
52
34
  top: "unset",
@@ -58,6 +40,7 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
58
40
  }
59
41
  },
60
42
  pageSizeRoot: {
43
+ display: "inline-block",
61
44
  width: "auto"
62
45
  },
63
46
  /** Styles applied to the element that holds the labels for the page size selector */
@@ -66,18 +49,12 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
66
49
  alignItems: "center",
67
50
  justifyContent: "center",
68
51
  height: "24px",
69
- padding: "8px 0",
70
- ...theme.typography.caption2
71
- },
72
- totalPagesTextContainer: {
73
- ...theme.typography.caption2
74
- },
75
- /** Styles applied to the page size selector dropdown element. */
76
- pageSizeOptionsSelect: {
77
- display: "inline-block",
78
- width: "auto",
79
- ...theme.typography.caption2
52
+ padding: "8px 0"
80
53
  },
54
+ /** @deprecated unused */
55
+ totalPagesTextContainer: {},
56
+ /** Styles applied to the page size selector dropdown element. @deprecated use `classes.pageSizeRoot` instead. */
57
+ pageSizeOptionsSelect: {},
81
58
  /** Styles applied to the page navigation container. */
82
59
  pageNavigator: {
83
60
  display: "flex",
@@ -100,30 +77,39 @@ const { staticClasses, useClasses } = createClasses("HvPagination", {
100
77
  },
101
78
  /** Styles applied to the page selector input container. */
102
79
  pageJump: {
103
- display: "inline-block",
104
- marginRight: `4px`,
105
- [`& .${staticClasses$1.inputRoot}`]: {
106
- [`& $pageSizeInput`]: {
107
- paddingLeft: `4px`,
108
- paddingRight: `4px`,
109
- margin: 0,
110
- textAlign: "center",
111
- borderRadius: theme.radii.base,
112
- MozAppearance: "textfield",
113
- "&:focus": {
114
- backgroundColor: theme.colors.bgHover
115
- },
116
- "&:hover": {
117
- cursor: "pointer"
118
- }
119
- }
80
+ marginRight: 4,
81
+ width: 24,
82
+ minWidth: 24,
83
+ maxWidth: theme.spacing(8),
84
+ backgroundColor: "transparent",
85
+ height: "24px",
86
+ "&:focus, &:focus-within, &:hover": {
87
+ backgroundColor: theme.colors.bgHover
88
+ },
89
+ "&, & $pageSizeInput": {
90
+ fontSize: "inherit",
91
+ lineHeight: "inherit"
120
92
  }
121
93
  },
122
94
  /** Styles passed down to the page selector Input component as `input`. */
123
- pageSizeInput: {},
124
- /** Styles passed down to the page selector Input root. */
95
+ pageSizeInput: {
96
+ paddingLeft: 4,
97
+ paddingRight: 4,
98
+ margin: 0,
99
+ textAlign: "center",
100
+ borderRadius: theme.radii.base,
101
+ MozAppearance: "textfield",
102
+ "&:focus": {
103
+ padding: 0,
104
+ backgroundColor: theme.colors.bgHover
105
+ },
106
+ "&:hover": {
107
+ cursor: "pointer"
108
+ }
109
+ },
110
+ /** Styles passed down to the page selector Input root. @deprecated use `classes.pageJump` instead. */
125
111
  pageSizeInputRoot: {},
126
- /** Styles passed down to the page selector Input component as `container`. */
112
+ /** Styles passed down to the page selector Input component as `container`. @deprecated use `classes.pageJump` instead. */
127
113
  pageSizeInputContainer: {}
128
114
  });
129
115
  export {
@@ -19,7 +19,6 @@ import { HvListContainer } from "../ListContainer/ListContainer.js";
19
19
  import { HvWarningText } from "../FormElement/WarningText/WarningText.js";
20
20
  function defaultRenderValue(options) {
21
21
  if (Array.isArray(options)) {
22
- if (options.length === 0) return null;
23
22
  return /* @__PURE__ */ jsx(Fragment, { children: options.map((o) => o.label).join(", ") });
24
23
  }
25
24
  return options?.label ?? null;
@@ -45,6 +44,7 @@ const HvSelect = fixedForwardRef(function HvSelect2(props, ref) {
45
44
  defaultOpen,
46
45
  multiple,
47
46
  autoComplete,
47
+ renderValue: renderValueProp,
48
48
  options: optionsProp,
49
49
  variableWidth,
50
50
  value: valueProp,
@@ -95,6 +95,7 @@ const HvSelect = fixedForwardRef(function HvSelect2(props, ref) {
95
95
  onChange,
96
96
  onOpenChange: handleOpenChange
97
97
  });
98
+ const renderValue = renderValueProp ?? defaultRenderValue;
98
99
  const id = useUniqueId(idProp);
99
100
  const labelId = useUniqueId(setId(idProp, "label"));
100
101
  const descriptionId = useUniqueId(setId(idProp, "description"));
@@ -171,7 +172,7 @@ const HvSelect = fixedForwardRef(function HvSelect2(props, ref) {
171
172
  [descriptionId]: description
172
173
  }),
173
174
  ...getButtonProps(),
174
- children: defaultRenderValue(actualValue) ?? placeholder
175
+ children: renderValue(actualValue) ?? placeholder
175
176
  }
176
177
  ),
177
178
  /* @__PURE__ */ jsx(
@@ -55,8 +55,8 @@ const pentahoIconsMap = {
55
55
  ] })
56
56
  },
57
57
  info: {
58
- regular: /* @__PURE__ */ jsx("path", { d: "M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }),
59
- fill: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z" }),
58
+ regular: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z" }),
59
+ fill: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z" }),
60
60
  duotone: /* @__PURE__ */ jsxs(Fragment, { children: [
61
61
  /* @__PURE__ */ jsx(
62
62
  "path",
@@ -65,7 +65,7 @@ const pentahoIconsMap = {
65
65
  opacity: "0.2"
66
66
  }
67
67
  ),
68
- /* @__PURE__ */ jsx("path", { d: "M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" })
68
+ /* @__PURE__ */ jsx("path", { d: "M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z" })
69
69
  ] })
70
70
  }
71
71
  };
package/dist/esm/icons.js CHANGED
@@ -44,8 +44,8 @@ const defaultIconPathMap = {
44
44
  Add: "M16 8.5H8.5V16h-1V8.5H0v-1h7.5V0h1v7.5H16z",
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
- SortAsc: "M.08 6.07 6.5.01l6.42 6.06Zm0 0",
48
- SortDesc: "M12.92 8.93 6.5 14.99.08 8.93Zm0 0",
47
+ SortAsc: "M10.24 7 6 11.24 1.76 7z",
48
+ SortDesc: "M1.76 5 6 .76 10.24 5z",
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",
@@ -58,7 +58,7 @@ const HvThemeProvider = ({
58
58
  ]
59
59
  );
60
60
  const muiTheme = useMemo(() => {
61
- const colors = activeTheme.colors.modes[colorMode];
61
+ const colors = activeTheme.colors.modes[selectedMode];
62
62
  return createTheme({
63
63
  spacing: activeTheme.space.base,
64
64
  typography: {
@@ -98,7 +98,7 @@ const HvThemeProvider = ({
98
98
  },
99
99
  breakpoints: activeTheme.breakpoints
100
100
  });
101
- }, [activeTheme, colorMode]);
101
+ }, [activeTheme, selectedMode]);
102
102
  const emotionCacheValue = useMemo(
103
103
  () => ({ cache: emotionCache }),
104
104
  [emotionCache]
@@ -784,20 +784,19 @@ const ds3 = mergeTheme(ds3$1, {
784
784
  HvPagination: {
785
785
  classes: {
786
786
  root: {
787
- [`& .HvPagination-pageSizeInput`]: {
788
- ...theme.typography.label,
789
- "&:focus": {
790
- padding: "unset"
791
- }
792
- },
793
- [`& .HvPagination-pageSizeInputContainer`]: {
794
- width: 40,
795
- minWidth: 40
796
- },
797
- [`&& .HvPagination-pageSizeInputRoot`]: {
798
- height: 32
787
+ ...theme.typography.body
788
+ },
789
+ pageSizeInput: {
790
+ ...theme.typography.label,
791
+ "&:focus": {
792
+ padding: "unset"
799
793
  }
800
794
  },
795
+ pageJump: {
796
+ width: 40,
797
+ minWidth: 40,
798
+ height: 32
799
+ },
801
800
  icon: {
802
801
  fontSize: 16
803
802
  },
@@ -805,20 +804,10 @@ const ds3 = mergeTheme(ds3$1, {
805
804
  height: 32
806
805
  },
807
806
  pageSizeHeader: {
808
- height: "unset",
809
- [`& .HvBaseDropdown-arrowContainer`]: {
810
- marginTop: 0
811
- }
807
+ height: "unset"
812
808
  },
813
809
  pageSizeTextContainer: {
814
- height: 32,
815
- ...theme.typography.body
816
- },
817
- pageSizeOptionsSelect: {
818
- ...theme.typography.body
819
- },
820
- totalPagesTextContainer: {
821
- ...theme.typography.body
810
+ height: 32
822
811
  },
823
812
  pageNavigator: {
824
813
  alignItems: "stretch"
@@ -19,6 +19,18 @@ const popperStyles = {
19
19
  boxShadow: `0px 0px 6px 0px rgba(65, 65, 65, 0.08)`
20
20
  };
21
21
  const pentahoPlus = mergeTheme(pentahoPlus$1, {
22
+ icons: {
23
+ viewBox: "0 0 256 256",
24
+ // Semantic icons
25
+ Success: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z",
26
+ Caution: "M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z",
27
+ Fail: "M128,72a8,8,0,0,1,8,8v56a8,8,0,0,1-16,0V80A8,8,0,0,1,128,72ZM116,172a12,12,0,1,0,12-12A12,12,0,0,0,116,172Zm124-44a15.85,15.85,0,0,1-4.67,11.28l-96.05,96.06a16,16,0,0,1-22.56,0h0l-96-96.06a16,16,0,0,1,0-22.56l96.05-96.06a16,16,0,0,1,22.56,0l96.05,96.06A15.85,15.85,0,0,1,240,128Zm-16,0L128,32,32,128,128,224h0Z",
28
+ Info: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z",
29
+ Start: "M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z",
30
+ Backwards: "M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z",
31
+ Forwards: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z",
32
+ End: "M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z"
33
+ },
22
34
  components: {
23
35
  HvLoading: {
24
36
  classes: {
@@ -537,6 +549,16 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
537
549
  }
538
550
  }
539
551
  },
552
+ HvPagination: {
553
+ classes: {
554
+ root: {
555
+ ...theme.typography.caption1
556
+ },
557
+ icon: {
558
+ fontSize: 16
559
+ }
560
+ }
561
+ },
540
562
  HvHeader: {
541
563
  classes: {
542
564
  root: {
@@ -682,6 +704,9 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
682
704
  display: "none"
683
705
  }
684
706
  },
707
+ "& .MuiCardContent-root:last-child": {
708
+ paddingBottom: 0
709
+ },
685
710
  "& > :last-child:not(.HvCardMedia-root)": {
686
711
  paddingBottom: theme.space.sm
687
712
  },