@hitachivantara/uikit-react-core 5.106.2 → 5.108.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.
- package/dist/cjs/ActionBar/ActionBar.styles.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +22 -41
- package/dist/cjs/Pagination/Pagination.styles.cjs +36 -50
- package/dist/cjs/SearchInput/SearchInput.styles.cjs +1 -2
- package/dist/cjs/Select/Select.cjs +3 -2
- package/dist/cjs/StatusIcon/StatusIcon.cjs +3 -3
- package/dist/cjs/providers/ThemeProvider.cjs +2 -2
- package/dist/cjs/themes/ds3.cjs +13 -24
- package/dist/cjs/themes/pentahoPlus.cjs +35 -0
- package/dist/esm/ActionBar/ActionBar.styles.js +1 -1
- package/dist/esm/Pagination/Pagination.js +22 -41
- package/dist/esm/Pagination/Pagination.styles.js +38 -52
- package/dist/esm/SearchInput/SearchInput.styles.js +1 -2
- package/dist/esm/Select/Select.js +3 -2
- package/dist/esm/StatusIcon/StatusIcon.js +3 -3
- package/dist/esm/providers/ThemeProvider.js +2 -2
- package/dist/esm/themes/ds3.js +13 -24
- package/dist/esm/themes/pentahoPlus.js +35 -0
- package/dist/types/index.d.ts +80 -76
- package/package.json +8 -8
|
@@ -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$
|
|
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
|
-
|
|
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$
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
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 {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
|
-
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
2
|
const { staticClasses, useClasses } = createClasses("HvSearchInput", {
|
|
4
|
-
root: {
|
|
3
|
+
root: {},
|
|
5
4
|
input: { marginLeft: 0 }
|
|
6
5
|
});
|
|
7
6
|
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:
|
|
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: "
|
|
59
|
-
fill: /* @__PURE__ */ jsx("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,
|
|
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: "
|
|
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
|
};
|
|
@@ -58,7 +58,7 @@ const HvThemeProvider = ({
|
|
|
58
58
|
]
|
|
59
59
|
);
|
|
60
60
|
const muiTheme = useMemo(() => {
|
|
61
|
-
const colors = activeTheme.colors.modes[
|
|
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,
|
|
101
|
+
}, [activeTheme, selectedMode]);
|
|
102
102
|
const emotionCacheValue = useMemo(
|
|
103
103
|
() => ({ cache: emotionCache }),
|
|
104
104
|
[emotionCache]
|
package/dist/esm/themes/ds3.js
CHANGED
|
@@ -784,20 +784,19 @@ const ds3 = mergeTheme(ds3$1, {
|
|
|
784
784
|
HvPagination: {
|
|
785
785
|
classes: {
|
|
786
786
|
root: {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
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"
|
|
@@ -13,12 +13,25 @@ const inputColors = {
|
|
|
13
13
|
bg: ld("#FFFFFF", "#020617")
|
|
14
14
|
};
|
|
15
15
|
const popperStyles = {
|
|
16
|
+
margin: theme.spacing("xxs", 0),
|
|
16
17
|
backgroundColor: theme.colors.bgContainer,
|
|
17
18
|
border: `1px solid ${theme.colors.borderSubtle}`,
|
|
18
19
|
borderRadius: theme.radii.large,
|
|
19
20
|
boxShadow: `0px 0px 6px 0px rgba(65, 65, 65, 0.08)`
|
|
20
21
|
};
|
|
21
22
|
const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
23
|
+
icons: {
|
|
24
|
+
viewBox: "0 0 256 256",
|
|
25
|
+
// Semantic icons
|
|
26
|
+
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",
|
|
27
|
+
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",
|
|
28
|
+
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",
|
|
29
|
+
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",
|
|
30
|
+
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",
|
|
31
|
+
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",
|
|
32
|
+
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",
|
|
33
|
+
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"
|
|
34
|
+
},
|
|
22
35
|
components: {
|
|
23
36
|
HvLoading: {
|
|
24
37
|
classes: {
|
|
@@ -537,6 +550,16 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
|
537
550
|
}
|
|
538
551
|
}
|
|
539
552
|
},
|
|
553
|
+
HvPagination: {
|
|
554
|
+
classes: {
|
|
555
|
+
root: {
|
|
556
|
+
...theme.typography.caption1
|
|
557
|
+
},
|
|
558
|
+
icon: {
|
|
559
|
+
fontSize: 16
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
},
|
|
540
563
|
HvHeader: {
|
|
541
564
|
classes: {
|
|
542
565
|
root: {
|
|
@@ -682,6 +705,9 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
|
682
705
|
display: "none"
|
|
683
706
|
}
|
|
684
707
|
},
|
|
708
|
+
"& .MuiCardContent-root:last-child": {
|
|
709
|
+
paddingBottom: 0
|
|
710
|
+
},
|
|
685
711
|
"& > :last-child:not(.HvCardMedia-root)": {
|
|
686
712
|
paddingBottom: theme.space.sm
|
|
687
713
|
},
|
|
@@ -836,6 +862,15 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
|
|
|
836
862
|
borderRadius: theme.radii.none
|
|
837
863
|
}
|
|
838
864
|
}
|
|
865
|
+
},
|
|
866
|
+
HvTooltip: {
|
|
867
|
+
classes: {
|
|
868
|
+
popper: {
|
|
869
|
+
"& .HvTooltip-tooltip": {
|
|
870
|
+
padding: theme.spacing("xs", "sm")
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
839
874
|
}
|
|
840
875
|
}
|
|
841
876
|
});
|