@hitachivantara/uikit-react-core 5.74.0 → 5.75.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/Badge/Badge.cjs +18 -13
- package/dist/cjs/Badge/Badge.styles.cjs +25 -14
- package/dist/esm/Badge/Badge.js +18 -13
- package/dist/esm/Badge/Badge.js.map +1 -1
- package/dist/esm/Badge/Badge.styles.js +25 -14
- package/dist/esm/Badge/Badge.styles.js.map +1 -1
- package/dist/types/index.d.ts +12 -9
- package/package.json +6 -6
package/dist/cjs/Badge/Badge.cjs
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
4
5
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
5
6
|
const Badge_styles = require("./Badge.styles.cjs");
|
|
6
7
|
const Typography = require("../Typography/Typography.cjs");
|
|
7
|
-
const HvBadge = (props) => {
|
|
8
|
+
const HvBadge = React.forwardRef((props, ref) => {
|
|
8
9
|
const {
|
|
9
10
|
classes: classesProp,
|
|
10
11
|
className,
|
|
11
12
|
showCount = false,
|
|
12
|
-
count = 0,
|
|
13
|
+
count: countProp = 0,
|
|
13
14
|
maxCount = 99,
|
|
14
|
-
label
|
|
15
|
-
icon
|
|
16
|
-
text
|
|
17
|
-
textVariant
|
|
15
|
+
label,
|
|
16
|
+
icon,
|
|
17
|
+
text,
|
|
18
|
+
textVariant,
|
|
18
19
|
...others
|
|
19
20
|
} = uikitReactUtils.useDefaultProps("HvBadge", props);
|
|
20
21
|
const { classes, cx } = Badge_styles.useClasses(classesProp);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const count = typeof label === "number" ? label : countProp;
|
|
23
|
+
const countValue = count > maxCount ? `${maxCount}+` : count;
|
|
24
|
+
const renderedCount = showCount && count > 0 ? countValue : "";
|
|
25
|
+
const renderedCountOrLabel = label && typeof label !== "number" ? label : renderedCount;
|
|
26
|
+
const children = icon || text && /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { variant: textVariant, children: text });
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cx(classes.root, className), ...others, children: [
|
|
28
|
+
children,
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx({ [classes.badgeContainer]: children }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
30
|
"div",
|
|
28
31
|
{
|
|
29
32
|
className: cx(classes.badgePosition, {
|
|
33
|
+
[classes.badgeHidden]: !(count > 0 || renderedCountOrLabel),
|
|
34
|
+
// TODO: remove unnecessary classes in v6 (hoist+rename `badge` to `badgePosition`)
|
|
30
35
|
[classes.badge]: !!(count > 0 || renderedCountOrLabel),
|
|
31
36
|
[classes.showCount]: !!(!label && renderedCountOrLabel),
|
|
32
37
|
[classes.showLabel]: !!label,
|
|
@@ -37,6 +42,6 @@ const HvBadge = (props) => {
|
|
|
37
42
|
}
|
|
38
43
|
) })
|
|
39
44
|
] });
|
|
40
|
-
};
|
|
45
|
+
});
|
|
41
46
|
exports.badgeClasses = Badge_styles.staticClasses;
|
|
42
47
|
exports.HvBadge = HvBadge;
|
|
@@ -2,27 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
|
|
4
4
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
5
|
-
const labelBaseStyle = {
|
|
6
|
-
...uikitStyles.theme.typography.caption2,
|
|
7
|
-
padding: "0 5px",
|
|
8
|
-
color: uikitStyles.theme.colors.atmo1,
|
|
9
|
-
lineHeight: "16px"
|
|
10
|
-
};
|
|
11
5
|
const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvBadge", {
|
|
12
6
|
root: { position: "relative", "&>*": { float: "left" } },
|
|
7
|
+
/** class applied to the badge container when it has content */
|
|
13
8
|
badgeContainer: { width: 0 },
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/** class applied to the badge */
|
|
10
|
+
badgePosition: {
|
|
11
|
+
...uikitStyles.theme.typography.caption2,
|
|
12
|
+
color: uikitStyles.theme.colors.atmo1,
|
|
13
|
+
borderRadius: uikitStyles.theme.radii.full,
|
|
17
14
|
backgroundColor: uikitStyles.theme.colors.secondary,
|
|
15
|
+
lineHeight: "16px",
|
|
16
|
+
minWidth: 8,
|
|
17
|
+
padding: "0 5px",
|
|
18
18
|
float: "left",
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
wordBreak: "keep-all",
|
|
20
|
+
textAlign: "center",
|
|
21
|
+
":empty": {
|
|
22
|
+
height: 8,
|
|
23
|
+
width: 8,
|
|
24
|
+
padding: 0
|
|
25
|
+
}
|
|
21
26
|
},
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
/** applied to the badge when it's visible */
|
|
28
|
+
badge: {},
|
|
29
|
+
/** applied to the badge when it's hidden */
|
|
30
|
+
badgeHidden: {
|
|
31
|
+
display: "none"
|
|
32
|
+
},
|
|
33
|
+
showCount: {},
|
|
34
|
+
showLabel: {},
|
|
24
35
|
badgeIcon: { position: "relative", top: "1px", left: "-7px" },
|
|
25
|
-
badgeOneDigit: { padding: 0, width: "16px"
|
|
36
|
+
badgeOneDigit: { padding: 0, width: "16px" }
|
|
26
37
|
});
|
|
27
38
|
exports.staticClasses = staticClasses;
|
|
28
39
|
exports.useClasses = useClasses;
|
package/dist/esm/Badge/Badge.js
CHANGED
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
3
4
|
import { useClasses } from "./Badge.styles.js";
|
|
4
5
|
import { staticClasses } from "./Badge.styles.js";
|
|
5
6
|
import { HvTypography } from "../Typography/Typography.js";
|
|
6
|
-
const HvBadge = (props) => {
|
|
7
|
+
const HvBadge = forwardRef((props, ref) => {
|
|
7
8
|
const {
|
|
8
9
|
classes: classesProp,
|
|
9
10
|
className,
|
|
10
11
|
showCount = false,
|
|
11
|
-
count = 0,
|
|
12
|
+
count: countProp = 0,
|
|
12
13
|
maxCount = 99,
|
|
13
|
-
label
|
|
14
|
-
icon
|
|
15
|
-
text
|
|
16
|
-
textVariant
|
|
14
|
+
label,
|
|
15
|
+
icon,
|
|
16
|
+
text,
|
|
17
|
+
textVariant,
|
|
17
18
|
...others
|
|
18
19
|
} = useDefaultProps("HvBadge", props);
|
|
19
20
|
const { classes, cx } = useClasses(classesProp);
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const count = typeof label === "number" ? label : countProp;
|
|
22
|
+
const countValue = count > maxCount ? `${maxCount}+` : count;
|
|
23
|
+
const renderedCount = showCount && count > 0 ? countValue : "";
|
|
24
|
+
const renderedCountOrLabel = label && typeof label !== "number" ? label : renderedCount;
|
|
25
|
+
const children = icon || text && /* @__PURE__ */ jsx(HvTypography, { variant: textVariant, children: text });
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cx(classes.root, className), ...others, children: [
|
|
27
|
+
children,
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: cx({ [classes.badgeContainer]: children }), children: /* @__PURE__ */ jsx(
|
|
26
29
|
"div",
|
|
27
30
|
{
|
|
28
31
|
className: cx(classes.badgePosition, {
|
|
32
|
+
[classes.badgeHidden]: !(count > 0 || renderedCountOrLabel),
|
|
33
|
+
// TODO: remove unnecessary classes in v6 (hoist+rename `badge` to `badgePosition`)
|
|
29
34
|
[classes.badge]: !!(count > 0 || renderedCountOrLabel),
|
|
30
35
|
[classes.showCount]: !!(!label && renderedCountOrLabel),
|
|
31
36
|
[classes.showLabel]: !!label,
|
|
@@ -36,7 +41,7 @@ const HvBadge = (props) => {
|
|
|
36
41
|
}
|
|
37
42
|
) })
|
|
38
43
|
] });
|
|
39
|
-
};
|
|
44
|
+
});
|
|
40
45
|
export {
|
|
41
46
|
HvBadge,
|
|
42
47
|
staticClasses as badgeClasses
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/Badge/Badge.tsx"],"sourcesContent":["import {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvBaseProps } from \"../types/generic\";\nimport { HvTypography, HvTypographyVariants } from \"../Typography\";\nimport { staticClasses, useClasses } from \"./Badge.styles\";\n\nexport { staticClasses as badgeClasses };\n\nexport type HvBadgeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBadgeProps extends HvBaseProps {\n /**\n * Count is the number of unread notifications.\n * Note count and label are mutually exclusive.\n * count is ignored when label is specified at the same time.\n */\n count?: number;\n /**\n * True if count should be displayed.\n
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/Badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvBaseProps } from \"../types/generic\";\nimport { HvTypography, HvTypographyVariants } from \"../Typography\";\nimport { staticClasses, useClasses } from \"./Badge.styles\";\n\nexport { staticClasses as badgeClasses };\n\nexport type HvBadgeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBadgeProps extends HvBaseProps {\n /**\n * Count is the number of unread notifications.\n * Note count and label are mutually exclusive.\n * count is ignored when label is specified at the same time.\n * @deprecated use numeric `label` instead\n */\n count?: number;\n /**\n * True if `count` should be displayed.\n *\n * NOTE: `showCount` is ignored when a **non-numeric** `label` is specified.\n */\n showCount?: boolean;\n /** The maximum number of unread notifications to be displayed */\n maxCount?: number;\n /**\n * Badge content to show in.\n *\n * If value is numeric, then `showCount` and `maxCount` will show or limit the value respectively.\n */\n label?: React.ReactNode;\n /** Icon which the notification will be attached. */\n icon?: React.ReactNode;\n /** Text which the notification will be attached. */\n text?: string;\n /** Text variant. */\n textVariant?: HvTypographyVariants;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvBadgeClasses;\n}\n\n/**\n * The badge is a component used to notify the user that something has occurred, in the app context.\n */\nexport const HvBadge = forwardRef<\n // no-indent\n HTMLDivElement,\n HvBadgeProps\n>((props, ref) => {\n const {\n classes: classesProp,\n className,\n showCount = false,\n count: countProp = 0,\n maxCount = 99,\n label,\n icon,\n text,\n textVariant,\n ...others\n } = useDefaultProps(\"HvBadge\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const count = typeof label === \"number\" ? label : countProp;\n const countValue = count > maxCount ? `${maxCount}+` : count;\n const renderedCount = showCount && count > 0 ? countValue : \"\";\n // If label is specified and non-empty, render it.\n // If showCount is specified and count > 0, render the count.\n // Otherwise, render nothing on the badge.\n // (Note count=0 should not be rendered to avoid ghosty 0.)\n const renderedCountOrLabel =\n label && typeof label !== \"number\" ? label : renderedCount;\n const children =\n icon || (text && <HvTypography variant={textVariant}>{text}</HvTypography>);\n\n return (\n <div ref={ref} className={cx(classes.root, className)} {...others}>\n {children}\n <div className={cx({ [classes.badgeContainer]: children })}>\n <div\n className={cx(classes.badgePosition, {\n [classes.badgeHidden]: !(count > 0 || renderedCountOrLabel),\n // TODO: remove unnecessary classes in v6 (hoist+rename `badge` to `badgePosition`)\n [classes.badge]: !!(count > 0 || renderedCountOrLabel),\n [classes.showCount]: !!(!label && renderedCountOrLabel),\n [classes.showLabel]: !!label,\n [classes.badgeIcon]: !!icon,\n [classes.badgeOneDigit]: String(renderedCountOrLabel).length === 1,\n })}\n >\n {renderedCountOrLabel}\n </div>\n </div>\n </div>\n );\n});\n"],"names":[],"mappings":";;;;;;AAiDO,MAAM,UAAU,WAIrB,CAAC,OAAO,QAAQ;AACV,QAAA;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA,YAAY;AAAA,IACZ,OAAO,YAAY;AAAA,IACnB,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,WAAW,KAAK;AAEpC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AAE9C,QAAM,QAAQ,OAAO,UAAU,WAAW,QAAQ;AAClD,QAAM,aAAa,QAAQ,WAAW,GAAG,QAAQ,MAAM;AACvD,QAAM,gBAAgB,aAAa,QAAQ,IAAI,aAAa;AAK5D,QAAM,uBACJ,SAAS,OAAO,UAAU,WAAW,QAAQ;AAC/C,QAAM,WACJ,QAAS,4BAAS,cAAa,EAAA,SAAS,aAAc,UAAK,KAAA,CAAA;AAG3D,SAAA,qBAAC,OAAI,EAAA,KAAU,WAAW,GAAG,QAAQ,MAAM,SAAS,GAAI,GAAG,QACxD,UAAA;AAAA,IAAA;AAAA,IACD,oBAAC,OAAI,EAAA,WAAW,GAAG,EAAE,CAAC,QAAQ,cAAc,GAAG,UAAU,GACvD,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,QAAQ,eAAe;AAAA,UACnC,CAAC,QAAQ,WAAW,GAAG,EAAE,QAAQ,KAAK;AAAA;AAAA,UAEtC,CAAC,QAAQ,KAAK,GAAG,CAAC,EAAE,QAAQ,KAAK;AAAA,UACjC,CAAC,QAAQ,SAAS,GAAG,CAAC,EAAE,CAAC,SAAS;AAAA,UAClC,CAAC,QAAQ,SAAS,GAAG,CAAC,CAAC;AAAA,UACvB,CAAC,QAAQ,SAAS,GAAG,CAAC,CAAC;AAAA,UACvB,CAAC,QAAQ,aAAa,GAAG,OAAO,oBAAoB,EAAE,WAAW;AAAA,QAAA,CAClE;AAAA,QAEA,UAAA;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
const labelBaseStyle = {
|
|
4
|
-
...theme.typography.caption2,
|
|
5
|
-
padding: "0 5px",
|
|
6
|
-
color: theme.colors.atmo1,
|
|
7
|
-
lineHeight: "16px"
|
|
8
|
-
};
|
|
9
3
|
const { staticClasses, useClasses } = createClasses("HvBadge", {
|
|
10
4
|
root: { position: "relative", "&>*": { float: "left" } },
|
|
5
|
+
/** class applied to the badge container when it has content */
|
|
11
6
|
badgeContainer: { width: 0 },
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
/** class applied to the badge */
|
|
8
|
+
badgePosition: {
|
|
9
|
+
...theme.typography.caption2,
|
|
10
|
+
color: theme.colors.atmo1,
|
|
11
|
+
borderRadius: theme.radii.full,
|
|
15
12
|
backgroundColor: theme.colors.secondary,
|
|
13
|
+
lineHeight: "16px",
|
|
14
|
+
minWidth: 8,
|
|
15
|
+
padding: "0 5px",
|
|
16
16
|
float: "left",
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
wordBreak: "keep-all",
|
|
18
|
+
textAlign: "center",
|
|
19
|
+
":empty": {
|
|
20
|
+
height: 8,
|
|
21
|
+
width: 8,
|
|
22
|
+
padding: 0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
/** applied to the badge when it's visible */
|
|
26
|
+
badge: {},
|
|
27
|
+
/** applied to the badge when it's hidden */
|
|
28
|
+
badgeHidden: {
|
|
29
|
+
display: "none"
|
|
19
30
|
},
|
|
20
|
-
showCount: {
|
|
21
|
-
showLabel: {
|
|
31
|
+
showCount: {},
|
|
32
|
+
showLabel: {},
|
|
22
33
|
badgeIcon: { position: "relative", top: "1px", left: "-7px" },
|
|
23
|
-
badgeOneDigit: { padding: 0, width: "16px"
|
|
34
|
+
badgeOneDigit: { padding: 0, width: "16px" }
|
|
24
35
|
});
|
|
25
36
|
export {
|
|
26
37
|
staticClasses,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.styles.js","sources":["../../../src/Badge/Badge.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\
|
|
1
|
+
{"version":3,"file":"Badge.styles.js","sources":["../../../src/Badge/Badge.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvBadge\", {\n root: { position: \"relative\", \"&>*\": { float: \"left\" } },\n /** class applied to the badge container when it has content */\n badgeContainer: { width: 0 },\n /** class applied to the badge */\n badgePosition: {\n ...theme.typography.caption2,\n color: theme.colors.atmo1,\n borderRadius: theme.radii.full,\n backgroundColor: theme.colors.secondary,\n lineHeight: \"16px\",\n minWidth: 8,\n padding: \"0 5px\",\n float: \"left\",\n wordBreak: \"keep-all\",\n textAlign: \"center\",\n\n \":empty\": {\n height: 8,\n width: 8,\n padding: 0,\n },\n },\n /** applied to the badge when it's visible */\n badge: {},\n /** applied to the badge when it's hidden */\n badgeHidden: {\n display: \"none\",\n },\n showCount: {},\n showLabel: {},\n badgeIcon: { position: \"relative\", top: \"1px\", left: \"-7px\" },\n badgeOneDigit: { padding: 0, width: \"16px\" },\n});\n"],"names":[],"mappings":";;AAGO,MAAM,EAAE,eAAe,eAAe,cAAc,WAAW;AAAA,EACpE,MAAM,EAAE,UAAU,YAAY,OAAO,EAAE,OAAO,SAAS;AAAA;AAAA,EAEvD,gBAAgB,EAAE,OAAO,EAAE;AAAA;AAAA,EAE3B,eAAe;AAAA,IACb,GAAG,MAAM,WAAW;AAAA,IACpB,OAAO,MAAM,OAAO;AAAA,IACpB,cAAc,MAAM,MAAM;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,IAC9B,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW;AAAA,IACX,WAAW;AAAA,IAEX,UAAU;AAAA,MACR,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,EACF;AAAA;AAAA,EAEA,OAAO,CAAC;AAAA;AAAA,EAER,aAAa;AAAA,IACX,SAAS;AAAA,EACX;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,WAAW,CAAC;AAAA,EACZ,WAAW,EAAE,UAAU,YAAY,KAAK,OAAO,MAAM,OAAO;AAAA,EAC5D,eAAe,EAAE,SAAS,GAAG,OAAO,OAAO;AAC7C,CAAC;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -285,6 +285,7 @@ export declare const badgeClasses: {
|
|
|
285
285
|
badgeContainer: string;
|
|
286
286
|
badgePosition: string;
|
|
287
287
|
badge: string;
|
|
288
|
+
badgeHidden: string;
|
|
288
289
|
showCount: string;
|
|
289
290
|
showLabel: string;
|
|
290
291
|
badgeIcon: string;
|
|
@@ -1402,7 +1403,7 @@ export declare type HvAvatarVariant = "circular" | "square";
|
|
|
1402
1403
|
/**
|
|
1403
1404
|
* The badge is a component used to notify the user that something has occurred, in the app context.
|
|
1404
1405
|
*/
|
|
1405
|
-
export declare const HvBadge:
|
|
1406
|
+
export declare const HvBadge: ForwardRefExoticComponent<HvBadgeProps & RefAttributes<HTMLDivElement>>;
|
|
1406
1407
|
|
|
1407
1408
|
export declare type HvBadgeClasses = ExtractNames<typeof useClasses_28>;
|
|
1408
1409
|
|
|
@@ -1411,22 +1412,23 @@ export declare interface HvBadgeProps extends HvBaseProps {
|
|
|
1411
1412
|
* Count is the number of unread notifications.
|
|
1412
1413
|
* Note count and label are mutually exclusive.
|
|
1413
1414
|
* count is ignored when label is specified at the same time.
|
|
1415
|
+
* @deprecated use numeric `label` instead
|
|
1414
1416
|
*/
|
|
1415
1417
|
count?: number;
|
|
1416
1418
|
/**
|
|
1417
|
-
* True if count should be displayed.
|
|
1418
|
-
*
|
|
1419
|
-
* showCount is ignored when label is specified
|
|
1419
|
+
* True if `count` should be displayed.
|
|
1420
|
+
*
|
|
1421
|
+
* NOTE: `showCount` is ignored when a **non-numeric** `label` is specified.
|
|
1420
1422
|
*/
|
|
1421
1423
|
showCount?: boolean;
|
|
1422
1424
|
/** The maximum number of unread notifications to be displayed */
|
|
1423
1425
|
maxCount?: number;
|
|
1424
1426
|
/**
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1427
|
+
* Badge content to show in.
|
|
1428
|
+
*
|
|
1429
|
+
* If value is numeric, then `showCount` and `maxCount` will show or limit the value respectively.
|
|
1428
1430
|
*/
|
|
1429
|
-
label?:
|
|
1431
|
+
label?: React.ReactNode;
|
|
1430
1432
|
/** Icon which the notification will be attached. */
|
|
1431
1433
|
icon?: React.ReactNode;
|
|
1432
1434
|
/** Text which the notification will be attached. */
|
|
@@ -9130,12 +9132,13 @@ declare const useClasses_27: (classesProp?: Partial<Record<"root" | "row" | "col
|
|
|
9130
9132
|
readonly cx: (...args: any) => string;
|
|
9131
9133
|
};
|
|
9132
9134
|
|
|
9133
|
-
declare const useClasses_28: (classesProp?: Partial<Record<"root" | "badge" | "showLabel" | "badgeContainer" | "
|
|
9135
|
+
declare const useClasses_28: (classesProp?: Partial<Record<"root" | "badgePosition" | "badge" | "showLabel" | "badgeContainer" | "badgeHidden" | "showCount" | "badgeIcon" | "badgeOneDigit", string>>, addStatic?: boolean) => {
|
|
9134
9136
|
readonly classes: {
|
|
9135
9137
|
root: string;
|
|
9136
9138
|
badgeContainer: string;
|
|
9137
9139
|
badgePosition: string;
|
|
9138
9140
|
badge: string;
|
|
9141
|
+
badgeHidden: string;
|
|
9139
9142
|
showCount: string;
|
|
9140
9143
|
showLabel: string;
|
|
9141
9144
|
badgeIcon: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.75.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@emotion/cache": "^11.11.0",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
|
-
"@hitachivantara/uikit-react-icons": "^5.12.
|
|
36
|
-
"@hitachivantara/uikit-react-shared": "^5.3.
|
|
37
|
-
"@hitachivantara/uikit-react-utils": "^0.2.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.
|
|
35
|
+
"@hitachivantara/uikit-react-icons": "^5.12.3",
|
|
36
|
+
"@hitachivantara/uikit-react-shared": "^5.3.8",
|
|
37
|
+
"@hitachivantara/uikit-react-utils": "^0.2.8",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.35.0",
|
|
39
39
|
"@internationalized/date": "^3.2.0",
|
|
40
40
|
"@mui/base": "^5.0.0-beta.40",
|
|
41
41
|
"@popperjs/core": "^2.11.8",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"access": "public",
|
|
63
63
|
"directory": "package"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "aa5244d3de7afa8083e492d2df7ac2891e6bb657",
|
|
66
66
|
"exports": {
|
|
67
67
|
".": {
|
|
68
68
|
"types": "./dist/types/index.d.ts",
|