@hitachivantara/uikit-react-core 5.94.0 → 5.95.1
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/Avatar/Avatar.styles.cjs +1 -1
- package/dist/cjs/Badge/Badge.styles.cjs +1 -1
- package/dist/cjs/BaseCheckBox/BaseCheckBox.cjs +3 -1
- package/dist/cjs/BaseCheckBox/CheckBoxIcon.cjs +4 -2
- package/dist/cjs/BaseRadio/BaseRadio.cjs +2 -1
- package/dist/cjs/BaseRadio/RadioIcon.cjs +4 -2
- package/dist/esm/Avatar/Avatar.styles.js +1 -1
- package/dist/esm/Badge/Badge.styles.js +1 -1
- package/dist/esm/BaseCheckBox/BaseCheckBox.js +3 -1
- package/dist/esm/BaseCheckBox/CheckBoxIcon.js +6 -4
- package/dist/esm/BaseRadio/BaseRadio.js +2 -1
- package/dist/esm/BaseRadio/RadioIcon.js +6 -4
- package/dist/types/index.d.ts +22 -5
- package/package.json +5 -5
|
@@ -37,7 +37,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvAvatar",
|
|
|
37
37
|
md: { width: 40, height: 40, fontSize: "1rem" },
|
|
38
38
|
lg: { width: 52, height: 52, fontSize: "1.5rem" },
|
|
39
39
|
xl: { width: 88, height: 88, fontSize: "2rem" },
|
|
40
|
-
avatar: {},
|
|
40
|
+
avatar: { borderRadius: "inherit" },
|
|
41
41
|
badge: {
|
|
42
42
|
width: 8,
|
|
43
43
|
height: 8,
|
|
@@ -9,7 +9,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBadge", {
|
|
|
9
9
|
":has($badgeIcon)": {
|
|
10
10
|
width: "fit-content",
|
|
11
11
|
height: "fit-content",
|
|
12
|
-
"&>div:first-
|
|
12
|
+
"&>div:first-of-type": {
|
|
13
13
|
minWidth: 32,
|
|
14
14
|
minHeight: 32,
|
|
15
15
|
"--icsize": "100%"
|
|
@@ -24,6 +24,8 @@ const HvBaseCheckBox = React.forwardRef(function HvBaseCheckBox2(props, ref) {
|
|
|
24
24
|
readOnly = false,
|
|
25
25
|
disabled = false,
|
|
26
26
|
semantic = false,
|
|
27
|
+
color,
|
|
28
|
+
style,
|
|
27
29
|
...others
|
|
28
30
|
} = uikitReactUtils.useDefaultProps("HvBaseCheckBox", props);
|
|
29
31
|
const { classes, cx } = BaseCheckBox_styles.useClasses(classesProp);
|
|
@@ -51,7 +53,7 @@ const HvBaseCheckBox = React.forwardRef(function HvBaseCheckBox2(props, ref) {
|
|
|
51
53
|
},
|
|
52
54
|
[onFocusVisible]
|
|
53
55
|
);
|
|
54
|
-
const params = { indeterminate, disabled, semantic };
|
|
56
|
+
const params = { indeterminate, disabled, semantic, color };
|
|
55
57
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
58
|
MuiCheckbox__default.default,
|
|
57
59
|
{
|
|
@@ -13,7 +13,7 @@ const { useClasses } = uikitReactUtils.createClasses("HvCheckBoxIcon", {
|
|
|
13
13
|
},
|
|
14
14
|
checked: {
|
|
15
15
|
borderColor: "transparent",
|
|
16
|
-
backgroundColor: uikitStyles.theme.colors.primaryStrong
|
|
16
|
+
backgroundColor: `var(--bg-color, ${uikitStyles.theme.colors.primaryStrong})`,
|
|
17
17
|
color: uikitStyles.theme.colors.bgContainer
|
|
18
18
|
},
|
|
19
19
|
indeterminate: {
|
|
@@ -42,7 +42,8 @@ const HvCheckBoxIcon = (props) => {
|
|
|
42
42
|
classes: classesProp,
|
|
43
43
|
variant,
|
|
44
44
|
disabled,
|
|
45
|
-
semantic
|
|
45
|
+
semantic,
|
|
46
|
+
color
|
|
46
47
|
} = uikitReactUtils.useDefaultProps("HvCheckBoxIcon", props);
|
|
47
48
|
const { classes, cx } = useClasses(classesProp, false);
|
|
48
49
|
const d = React.useMemo(() => {
|
|
@@ -67,6 +68,7 @@ const HvCheckBoxIcon = (props) => {
|
|
|
67
68
|
[classes.semantic]: semantic,
|
|
68
69
|
[classes.disabled]: disabled
|
|
69
70
|
}),
|
|
71
|
+
style: uikitReactUtils.mergeStyles({}, { "--bg-color": uikitStyles.getColor(color) }),
|
|
70
72
|
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d })
|
|
71
73
|
}
|
|
72
74
|
);
|
|
@@ -22,6 +22,7 @@ const HvBaseRadio = React.forwardRef(
|
|
|
22
22
|
onChange,
|
|
23
23
|
semantic,
|
|
24
24
|
inputProps,
|
|
25
|
+
color,
|
|
25
26
|
onFocusVisible,
|
|
26
27
|
onBlur,
|
|
27
28
|
...others
|
|
@@ -66,7 +67,7 @@ const HvBaseRadio = React.forwardRef(
|
|
|
66
67
|
className
|
|
67
68
|
),
|
|
68
69
|
icon: /* @__PURE__ */ jsxRuntime.jsx(RadioIcon.HvRadioIcon, { disabled }),
|
|
69
|
-
checkedIcon: /* @__PURE__ */ jsxRuntime.jsx(RadioIcon.HvRadioIcon, { checked: true, disabled }),
|
|
70
|
+
checkedIcon: /* @__PURE__ */ jsxRuntime.jsx(RadioIcon.HvRadioIcon, { checked: true, disabled, color }),
|
|
70
71
|
color: "default",
|
|
71
72
|
disabled,
|
|
72
73
|
required,
|
|
@@ -12,7 +12,7 @@ const { useClasses } = uikitReactUtils.createClasses("HvRadioIcon", {
|
|
|
12
12
|
},
|
|
13
13
|
checked: {
|
|
14
14
|
borderColor: "transparent",
|
|
15
|
-
backgroundColor: uikitStyles.theme.colors.primaryStrong
|
|
15
|
+
backgroundColor: `var(--bg-color, ${uikitStyles.theme.colors.primaryStrong})`,
|
|
16
16
|
color: uikitStyles.theme.colors.bgContainer
|
|
17
17
|
},
|
|
18
18
|
disabled: {
|
|
@@ -30,7 +30,8 @@ const HvRadioIcon = (props) => {
|
|
|
30
30
|
className,
|
|
31
31
|
classes: classesProp,
|
|
32
32
|
checked,
|
|
33
|
-
disabled
|
|
33
|
+
disabled,
|
|
34
|
+
color
|
|
34
35
|
} = uikitReactUtils.useDefaultProps("HvRadioIcon", props);
|
|
35
36
|
const { classes, cx } = useClasses(classesProp, false);
|
|
36
37
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42,6 +43,7 @@ const HvRadioIcon = (props) => {
|
|
|
42
43
|
[classes.disabled]: disabled,
|
|
43
44
|
[classes.checkedDisabled]: checked && disabled
|
|
44
45
|
}),
|
|
46
|
+
style: uikitReactUtils.mergeStyles({}, { "--bg-color": uikitStyles.getColor(color) }),
|
|
45
47
|
children: checked && /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "4.5" })
|
|
46
48
|
}
|
|
47
49
|
);
|
|
@@ -35,7 +35,7 @@ const { staticClasses, useClasses } = createClasses("HvAvatar", {
|
|
|
35
35
|
md: { width: 40, height: 40, fontSize: "1rem" },
|
|
36
36
|
lg: { width: 52, height: 52, fontSize: "1.5rem" },
|
|
37
37
|
xl: { width: 88, height: 88, fontSize: "2rem" },
|
|
38
|
-
avatar: {},
|
|
38
|
+
avatar: { borderRadius: "inherit" },
|
|
39
39
|
badge: {
|
|
40
40
|
width: 8,
|
|
41
41
|
height: 8,
|
|
@@ -21,6 +21,8 @@ const HvBaseCheckBox = forwardRef(function HvBaseCheckBox2(props, ref) {
|
|
|
21
21
|
readOnly = false,
|
|
22
22
|
disabled = false,
|
|
23
23
|
semantic = false,
|
|
24
|
+
color,
|
|
25
|
+
style,
|
|
24
26
|
...others
|
|
25
27
|
} = useDefaultProps("HvBaseCheckBox", props);
|
|
26
28
|
const { classes, cx } = useClasses(classesProp);
|
|
@@ -48,7 +50,7 @@ const HvBaseCheckBox = forwardRef(function HvBaseCheckBox2(props, ref) {
|
|
|
48
50
|
},
|
|
49
51
|
[onFocusVisible]
|
|
50
52
|
);
|
|
51
|
-
const params = { indeterminate, disabled, semantic };
|
|
53
|
+
const params = { indeterminate, disabled, semantic, color };
|
|
52
54
|
return /* @__PURE__ */ jsx(
|
|
53
55
|
MuiCheckbox,
|
|
54
56
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
4
|
-
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
+
import { useDefaultProps, createClasses, mergeStyles } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { getColor, theme } from "@hitachivantara/uikit-styles";
|
|
5
5
|
import { SvgBase } from "../icons.js";
|
|
6
6
|
const { useClasses } = createClasses("HvCheckBoxIcon", {
|
|
7
7
|
root: {
|
|
@@ -11,7 +11,7 @@ const { useClasses } = createClasses("HvCheckBoxIcon", {
|
|
|
11
11
|
},
|
|
12
12
|
checked: {
|
|
13
13
|
borderColor: "transparent",
|
|
14
|
-
backgroundColor: theme.colors.primaryStrong
|
|
14
|
+
backgroundColor: `var(--bg-color, ${theme.colors.primaryStrong})`,
|
|
15
15
|
color: theme.colors.bgContainer
|
|
16
16
|
},
|
|
17
17
|
indeterminate: {
|
|
@@ -40,7 +40,8 @@ const HvCheckBoxIcon = (props) => {
|
|
|
40
40
|
classes: classesProp,
|
|
41
41
|
variant,
|
|
42
42
|
disabled,
|
|
43
|
-
semantic
|
|
43
|
+
semantic,
|
|
44
|
+
color
|
|
44
45
|
} = useDefaultProps("HvCheckBoxIcon", props);
|
|
45
46
|
const { classes, cx } = useClasses(classesProp, false);
|
|
46
47
|
const d = useMemo(() => {
|
|
@@ -65,6 +66,7 @@ const HvCheckBoxIcon = (props) => {
|
|
|
65
66
|
[classes.semantic]: semantic,
|
|
66
67
|
[classes.disabled]: disabled
|
|
67
68
|
}),
|
|
69
|
+
style: mergeStyles({}, { "--bg-color": getColor(color) }),
|
|
68
70
|
children: /* @__PURE__ */ jsx("path", { d })
|
|
69
71
|
}
|
|
70
72
|
);
|
|
@@ -19,6 +19,7 @@ const HvBaseRadio = forwardRef(
|
|
|
19
19
|
onChange,
|
|
20
20
|
semantic,
|
|
21
21
|
inputProps,
|
|
22
|
+
color,
|
|
22
23
|
onFocusVisible,
|
|
23
24
|
onBlur,
|
|
24
25
|
...others
|
|
@@ -63,7 +64,7 @@ const HvBaseRadio = forwardRef(
|
|
|
63
64
|
className
|
|
64
65
|
),
|
|
65
66
|
icon: /* @__PURE__ */ jsx(HvRadioIcon, { disabled }),
|
|
66
|
-
checkedIcon: /* @__PURE__ */ jsx(HvRadioIcon, { checked: true, disabled }),
|
|
67
|
+
checkedIcon: /* @__PURE__ */ jsx(HvRadioIcon, { checked: true, disabled, color }),
|
|
67
68
|
color: "default",
|
|
68
69
|
disabled,
|
|
69
70
|
required,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
3
|
-
import { theme } from "@hitachivantara/uikit-styles";
|
|
2
|
+
import { useDefaultProps, createClasses, mergeStyles } from "@hitachivantara/uikit-react-utils";
|
|
3
|
+
import { getColor, theme } from "@hitachivantara/uikit-styles";
|
|
4
4
|
import { SvgBase } from "../icons.js";
|
|
5
5
|
const { useClasses } = createClasses("HvRadioIcon", {
|
|
6
6
|
root: {
|
|
@@ -10,7 +10,7 @@ const { useClasses } = createClasses("HvRadioIcon", {
|
|
|
10
10
|
},
|
|
11
11
|
checked: {
|
|
12
12
|
borderColor: "transparent",
|
|
13
|
-
backgroundColor: theme.colors.primaryStrong
|
|
13
|
+
backgroundColor: `var(--bg-color, ${theme.colors.primaryStrong})`,
|
|
14
14
|
color: theme.colors.bgContainer
|
|
15
15
|
},
|
|
16
16
|
disabled: {
|
|
@@ -28,7 +28,8 @@ const HvRadioIcon = (props) => {
|
|
|
28
28
|
className,
|
|
29
29
|
classes: classesProp,
|
|
30
30
|
checked,
|
|
31
|
-
disabled
|
|
31
|
+
disabled,
|
|
32
|
+
color
|
|
32
33
|
} = useDefaultProps("HvRadioIcon", props);
|
|
33
34
|
const { classes, cx } = useClasses(classesProp, false);
|
|
34
35
|
return /* @__PURE__ */ jsx(
|
|
@@ -40,6 +41,7 @@ const HvRadioIcon = (props) => {
|
|
|
40
41
|
[classes.disabled]: disabled,
|
|
41
42
|
[classes.checkedDisabled]: checked && disabled
|
|
42
43
|
}),
|
|
44
|
+
style: mergeStyles({}, { "--bg-color": getColor(color) }),
|
|
43
45
|
children: checked && /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "4.5" })
|
|
44
46
|
}
|
|
45
47
|
);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1072,7 +1072,7 @@ export declare interface HvAccordionProps extends HvBaseProps<HTMLDivElement, "o
|
|
|
1072
1072
|
defaultExpanded?: boolean;
|
|
1073
1073
|
/** An object containing props to be passed onto container holding the accordion children. */
|
|
1074
1074
|
containerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
1075
|
-
/** Heading level to apply to accordion button. If
|
|
1075
|
+
/** Heading level to apply to accordion button. If `undefined` the button won't have a header wrapper. */
|
|
1076
1076
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
1077
1077
|
/** Whether the accordion is disabled. */
|
|
1078
1078
|
disabled?: boolean;
|
|
@@ -1313,9 +1313,9 @@ export declare interface HvAvatarProps extends HvBaseProps {
|
|
|
1313
1313
|
/** A string representing the type of avatar to display, circular or square. */
|
|
1314
1314
|
variant?: HvAvatarVariant;
|
|
1315
1315
|
/** A string representing the color of the avatar border that represents its status. */
|
|
1316
|
-
status?:
|
|
1316
|
+
status?: HvColorAny;
|
|
1317
1317
|
/** A string representing the color of the avatar badge. */
|
|
1318
|
-
badge?:
|
|
1318
|
+
badge?: HvColorAny;
|
|
1319
1319
|
/** Attributes applied to the avatar element. */
|
|
1320
1320
|
avatarProps?: AvatarProps;
|
|
1321
1321
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
@@ -1471,7 +1471,7 @@ export declare const HvBaseCheckBox: ForwardRefExoticComponent<Omit<HvBaseCheckB
|
|
|
1471
1471
|
|
|
1472
1472
|
export declare type HvBaseCheckBoxClasses = ExtractNames<typeof useClasses_32>;
|
|
1473
1473
|
|
|
1474
|
-
export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChange" | "classes"> {
|
|
1474
|
+
export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChange" | "classes" | "color"> {
|
|
1475
1475
|
/**
|
|
1476
1476
|
* The input name.
|
|
1477
1477
|
*/
|
|
@@ -1532,6 +1532,10 @@ export declare interface HvBaseCheckBoxProps extends Omit<CheckboxProps, "onChan
|
|
|
1532
1532
|
* Callback fired when the component is blurred.
|
|
1533
1533
|
*/
|
|
1534
1534
|
onBlur?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
1535
|
+
/**
|
|
1536
|
+
* Color applied to the check box.
|
|
1537
|
+
*/
|
|
1538
|
+
color?: HvColorAny;
|
|
1535
1539
|
/**
|
|
1536
1540
|
* A Jss Object used to override or extend the styles applied to the checkbox.
|
|
1537
1541
|
*/
|
|
@@ -1698,7 +1702,7 @@ export declare const HvBaseRadio: ForwardRefExoticComponent<Omit<HvBaseRadioProp
|
|
|
1698
1702
|
|
|
1699
1703
|
export declare type HvBaseRadioClasses = ExtractNames<typeof useClasses_33>;
|
|
1700
1704
|
|
|
1701
|
-
export declare interface HvBaseRadioProps extends Omit<RadioProps, "onChange" | "classes"> {
|
|
1705
|
+
export declare interface HvBaseRadioProps extends Omit<RadioProps, "onChange" | "classes" | "color"> {
|
|
1702
1706
|
/**
|
|
1703
1707
|
* Class names to be applied.
|
|
1704
1708
|
*/
|
|
@@ -1743,6 +1747,10 @@ export declare interface HvBaseRadioProps extends Omit<RadioProps, "onChange" |
|
|
|
1743
1747
|
* When uncontrolled, defines the initial checked state.
|
|
1744
1748
|
*/
|
|
1745
1749
|
defaultChecked?: boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Color applied to the radio button.
|
|
1752
|
+
*/
|
|
1753
|
+
color?: HvColorAny;
|
|
1746
1754
|
/**
|
|
1747
1755
|
* The callback fired when the radio button is pressed.
|
|
1748
1756
|
*/
|
|
@@ -3671,6 +3679,11 @@ declare type HvFooterProps_2<D extends object = Record<string, unknown>> = HvTab
|
|
|
3671
3679
|
* analogous to MUI's [`FormControl`](https://mui.com/material-ui/api/form-control/) component.
|
|
3672
3680
|
*
|
|
3673
3681
|
* It is used internally to build UI Kit's form components (eg. `HvInput`, `HvDatePicker`), and can be used to build custom form components.
|
|
3682
|
+
*
|
|
3683
|
+
* It exposes the common properties to be shared between all form components: `required`, `disabled`, `readOnly`, and `status`.
|
|
3684
|
+
*
|
|
3685
|
+
* Along with the properties above, form components also share the `value`/`defaultValue` and `onChange` props,
|
|
3686
|
+
* used to control the value of the form component, analogous to the native `input` component.
|
|
3674
3687
|
*/
|
|
3675
3688
|
export declare const HvFormElement: {
|
|
3676
3689
|
(props: HvFormElementProps): JSX_2.Element;
|
|
@@ -3734,6 +3747,10 @@ export declare type HvFormStatus = "standBy" | "valid" | "invalid" | "empty";
|
|
|
3734
3747
|
/**
|
|
3735
3748
|
* Global Actions are actions that affect the entire page they live in.
|
|
3736
3749
|
* They should persist while scrolling down the screen.
|
|
3750
|
+
*
|
|
3751
|
+
* It uses `variant="global"` by default, rendering an `h1` element and applying sticky positioning.
|
|
3752
|
+
* Use `variant="section"` to group related content blocks.
|
|
3753
|
+
* Use it sparingly, as it introduces strong visual separation, which may not always be necessary.
|
|
3737
3754
|
*/
|
|
3738
3755
|
export declare const HvGlobalActions: ForwardRefExoticComponent<HvGlobalActionsProps & RefAttributes<HTMLDivElement>>;
|
|
3739
3756
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.95.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@emotion/cache": "^11.11.0",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
|
-
"@hitachivantara/uikit-react-shared": "^5.4.
|
|
36
|
-
"@hitachivantara/uikit-react-utils": "^0.2.
|
|
37
|
-
"@hitachivantara/uikit-styles": "^5.
|
|
35
|
+
"@hitachivantara/uikit-react-shared": "^5.4.5",
|
|
36
|
+
"@hitachivantara/uikit-react-utils": "^0.2.38",
|
|
37
|
+
"@hitachivantara/uikit-styles": "^5.48.1",
|
|
38
38
|
"@internationalized/date": "^3.2.0",
|
|
39
39
|
"@mui/base": "5.0.0-beta.68",
|
|
40
40
|
"@popperjs/core": "^2.11.8",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public",
|
|
62
62
|
"directory": "package"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "5ed545e2d3d9374198340f910ac464cb84b309ed",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/types/index.d.ts",
|