@hitachivantara/uikit-react-core 5.54.0 → 5.56.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/Carousel/Carousel.cjs +6 -6
- package/dist/cjs/Carousel/Carousel.cjs.map +1 -1
- package/dist/cjs/Dialog/Dialog.cjs +5 -6
- package/dist/cjs/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/Drawer/Drawer.cjs +2 -3
- package/dist/cjs/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/IconButton/IconButton.cjs +34 -0
- package/dist/cjs/IconButton/IconButton.cjs.map +1 -0
- package/dist/cjs/Pagination/Pagination.cjs +5 -5
- package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/Rule/Rule.cjs +2 -2
- package/dist/cjs/QueryBuilder/Rule/Rule.cjs.map +1 -1
- package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs +2 -2
- package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs.map +1 -1
- package/dist/cjs/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +6 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/Carousel/Carousel.js +6 -6
- package/dist/esm/Carousel/Carousel.js.map +1 -1
- package/dist/esm/Dialog/Dialog.js +5 -6
- package/dist/esm/Dialog/Dialog.js.map +1 -1
- package/dist/esm/Drawer/Drawer.js +2 -3
- package/dist/esm/Drawer/Drawer.js.map +1 -1
- package/dist/esm/IconButton/IconButton.js +34 -0
- package/dist/esm/IconButton/IconButton.js.map +1 -0
- package/dist/esm/Pagination/Pagination.js +5 -5
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/QueryBuilder/Rule/Rule.js +2 -2
- package/dist/esm/QueryBuilder/Rule/Rule.js.map +1 -1
- package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js +2 -2
- package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
- package/dist/esm/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +39 -0
- package/package.json +5 -5
- package/dist/cjs/utils/IconButton/IconButton.cjs +0 -11
- package/dist/cjs/utils/IconButton/IconButton.cjs.map +0 -1
- package/dist/esm/utils/IconButton/IconButton.js +0 -11
- package/dist/esm/utils/IconButton/IconButton.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ import { MouseEventHandler } from 'react';
|
|
|
71
71
|
import { OptionGroupProps } from '@mui/base/OptionGroup';
|
|
72
72
|
import { OptionOwnProps } from '@mui/base/Option';
|
|
73
73
|
import { OptionsObject } from 'notistack';
|
|
74
|
+
import { pentahoPlus } from '@hitachivantara/uikit-styles';
|
|
74
75
|
import { PopperProps } from 'react-popper';
|
|
75
76
|
import { PropGetter } from 'react-table';
|
|
76
77
|
import { PropsWithoutRef } from 'react';
|
|
@@ -4081,6 +4082,39 @@ export declare interface HvHooks<D extends object = Record<string, unknown>, H e
|
|
|
4081
4082
|
|
|
4082
4083
|
export declare type HvHorizontalScrollListItemClasses = ExtractNames<typeof useClasses_96>;
|
|
4083
4084
|
|
|
4085
|
+
/**
|
|
4086
|
+
* The `HvIconButton` component wraps a `HvTooltip` with a label around a `HvButton` with only an icon as its content.
|
|
4087
|
+
* As defined by Design System, a tooltip with the button’s label should always be displayed when hovering an icon only button.
|
|
4088
|
+
* This component provides this behavior out of the box.
|
|
4089
|
+
*/
|
|
4090
|
+
export declare const HvIconButton: <C extends ElementType<any, keyof JSX_2.IntrinsicElements> = "button">(props: Omit<HvButtonProps<C>, "icon" | "title" | "component" | "ref" | "children" | "startIcon" | "endIcon" | "focusableWhenDisabled"> & {
|
|
4091
|
+
/** Label to be displayed in the tooltip when hovered. This label will be used as the button's `aria-label`. */
|
|
4092
|
+
title: React.ReactNode;
|
|
4093
|
+
/** Number of milliseconds to wait before showing the tooltip. @default 500 */
|
|
4094
|
+
enterDelay?: HvTooltipProps["enterDelay"];
|
|
4095
|
+
/** Tooltip placement. @default top */
|
|
4096
|
+
placement?: HvTooltipProps["placement"];
|
|
4097
|
+
/** Extra tooltip properties. */
|
|
4098
|
+
tooltipProps?: Omit<Partial<HvTooltipProps>, "children"> | undefined;
|
|
4099
|
+
} & {
|
|
4100
|
+
component?: C | undefined;
|
|
4101
|
+
} & {
|
|
4102
|
+
children?: ReactNode;
|
|
4103
|
+
} & (Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "title" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "placement" | "overrideIconColors" | "enterDelay" | "tooltipProps" | Exclude<keyof (Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "icon" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "startIcon" | "endIcon" | "overrideIconColors" | "focusableWhenDisabled"> extends infer T ? T extends Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "icon" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "startIcon" | "endIcon" | "overrideIconColors" | "focusableWhenDisabled"> ? T extends any ? T : never : never : never), "icon" | "title" | "component" | "ref" | "children" | "startIcon" | "endIcon" | "focusableWhenDisabled">> extends infer T_1 ? T_1 extends Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "title" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "placement" | "overrideIconColors" | "enterDelay" | "tooltipProps" | Exclude<keyof (Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "icon" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "startIcon" | "endIcon" | "overrideIconColors" | "focusableWhenDisabled"> extends infer T ? T extends Omit<PropsWithoutRef<ComponentProps<C>>, "classes" | "disabled" | "icon" | "selected" | "size" | "component" | "className" | "radius" | "variant" | "startIcon" | "endIcon" | "overrideIconColors" | "focusableWhenDisabled"> ? T extends any ? T : never : never : never), "icon" | "title" | "component" | "ref" | "children" | "startIcon" | "endIcon" | "focusableWhenDisabled">> ? T_1 extends any ? T_1 : never : never : never) & {
|
|
4104
|
+
ref?: PolymorphicRef<C> | undefined;
|
|
4105
|
+
} & RefAttributes<unknown>) => ReactElement<any, string | JSXElementConstructor<any>> | null;
|
|
4106
|
+
|
|
4107
|
+
export declare type HvIconButtonProps<C extends React.ElementType = "button"> = PolymorphicComponentRef<C, Omit<HvButtonProps<C>, "icon" | "focusableWhenDisabled" | "title" | "startIcon" | "endIcon" | "children" | "ref" | "component"> & {
|
|
4108
|
+
/** Label to be displayed in the tooltip when hovered. This label will be used as the button's `aria-label`. */
|
|
4109
|
+
title: React.ReactNode;
|
|
4110
|
+
/** Number of milliseconds to wait before showing the tooltip. @default 500 */
|
|
4111
|
+
enterDelay?: HvTooltipProps["enterDelay"];
|
|
4112
|
+
/** Tooltip placement. @default top */
|
|
4113
|
+
placement?: HvTooltipProps["placement"];
|
|
4114
|
+
/** Extra tooltip properties. */
|
|
4115
|
+
tooltipProps?: Omit<Partial<HvTooltipProps>, "children">;
|
|
4116
|
+
}>;
|
|
4117
|
+
|
|
4084
4118
|
/**
|
|
4085
4119
|
* Provides the user with additional descriptive text for the form element.
|
|
4086
4120
|
*/
|
|
@@ -6950,6 +6984,9 @@ export declare interface HvToggleButtonProps extends HvBaseProps<HTMLButtonEleme
|
|
|
6950
6984
|
/**
|
|
6951
6985
|
* Tooltips display informative text when users hover over, focus on, or tap an element.
|
|
6952
6986
|
* Accessibility-wise, the tooltip automatically labels the `children` content.
|
|
6987
|
+
*
|
|
6988
|
+
* If you are looking to wrap an icon only button with a tooltip, take a look at the `HvIconButton` component
|
|
6989
|
+
* which offers you thus behavior out of the box.
|
|
6953
6990
|
*/
|
|
6954
6991
|
export declare const HvTooltip: ForwardRefExoticComponent<Omit<HvTooltipProps, "ref"> & RefAttributes<unknown>>;
|
|
6955
6992
|
|
|
@@ -7925,6 +7962,8 @@ export declare const panelClasses: {
|
|
|
7925
7962
|
root: "HvPanel-root";
|
|
7926
7963
|
};
|
|
7927
7964
|
|
|
7965
|
+
export { pentahoPlus }
|
|
7966
|
+
|
|
7928
7967
|
declare type PolymorphicComponent<C extends React.ElementType, Props = {}> = React.PropsWithChildren<Props & AsProp<C>> & FixComponentProps<Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>>;
|
|
7929
7968
|
|
|
7930
7969
|
export declare type PolymorphicComponentRef<C extends React.ElementType, Props = {}> = PolymorphicComponent<C, Props> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.56.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"@emotion/css": "^11.11.2",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
35
|
"@emotion/utils": "^1.2.1",
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.8.
|
|
37
|
-
"@hitachivantara/uikit-react-shared": "^5.1.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.8.6",
|
|
37
|
+
"@hitachivantara/uikit-react-shared": "^5.1.31",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.22.0",
|
|
39
39
|
"@internationalized/date": "^3.2.0",
|
|
40
40
|
"@mui/base": "^5.0.0-beta.34",
|
|
41
41
|
"@popperjs/core": "^2.11.8",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"access": "public",
|
|
64
64
|
"directory": "package"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "67ac3fbb762df89f4f55c563f24f691c775fe99c",
|
|
67
67
|
"main": "dist/cjs/index.cjs",
|
|
68
68
|
"exports": {
|
|
69
69
|
".": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const Button = require("../../Button/Button.cjs");
|
|
5
|
-
const Tooltip = require("../../Tooltip/Tooltip.cjs");
|
|
6
|
-
const IconButton = ({
|
|
7
|
-
title,
|
|
8
|
-
placement = "top",
|
|
9
|
-
...others
|
|
10
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(Tooltip.HvTooltip, { enterDelay: 500, title, placement, children: /* @__PURE__ */ jsxRuntime.jsx(Button.HvButton, { focusableWhenDisabled: true, icon: true, ...others }) });
|
|
11
|
-
exports.IconButton = IconButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.cjs","sources":["../../../../src/utils/IconButton/IconButton.tsx"],"sourcesContent":["import { HvButton, HvButtonProps } from \"../../Button\";\nimport { HvTooltip, HvTooltipProps } from \"../../Tooltip\";\n\nexport interface IconButtonProps\n extends Omit<HvButtonProps, \"icon\" | \"title\" | \"component\"> {\n title: React.ReactNode;\n placement?: HvTooltipProps[\"placement\"];\n onClick?: HvButtonProps[\"onClick\"];\n}\n\n/** An `HvButton` of type icon wrapped in a tooltip */\nexport const IconButton = ({\n title,\n placement = \"top\",\n ...others\n}: IconButtonProps) => (\n <HvTooltip enterDelay={500} title={title} placement={placement}>\n <HvButton focusableWhenDisabled icon {...others} />\n </HvTooltip>\n);\n"],"names":["jsx","HvTooltip","HvButton"],"mappings":";;;;;AAWO,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,MACGA,2BAAAA,IAAAC,QAAAA,WAAA,EAAU,YAAY,KAAK,OAAc,WACxC,UAAAD,2BAAA,IAACE,OAAS,UAAA,EAAA,uBAAqB,MAAC,MAAI,MAAE,GAAG,QAAQ,EACnD,CAAA;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { HvButton } from "../../Button/Button.js";
|
|
3
|
-
import { HvTooltip } from "../../Tooltip/Tooltip.js";
|
|
4
|
-
const IconButton = ({
|
|
5
|
-
title,
|
|
6
|
-
placement = "top",
|
|
7
|
-
...others
|
|
8
|
-
}) => /* @__PURE__ */ jsx(HvTooltip, { enterDelay: 500, title, placement, children: /* @__PURE__ */ jsx(HvButton, { focusableWhenDisabled: true, icon: true, ...others }) });
|
|
9
|
-
export {
|
|
10
|
-
IconButton
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/utils/IconButton/IconButton.tsx"],"sourcesContent":["import { HvButton, HvButtonProps } from \"../../Button\";\nimport { HvTooltip, HvTooltipProps } from \"../../Tooltip\";\n\nexport interface IconButtonProps\n extends Omit<HvButtonProps, \"icon\" | \"title\" | \"component\"> {\n title: React.ReactNode;\n placement?: HvTooltipProps[\"placement\"];\n onClick?: HvButtonProps[\"onClick\"];\n}\n\n/** An `HvButton` of type icon wrapped in a tooltip */\nexport const IconButton = ({\n title,\n placement = \"top\",\n ...others\n}: IconButtonProps) => (\n <HvTooltip enterDelay={500} title={title} placement={placement}>\n <HvButton focusableWhenDisabled icon {...others} />\n </HvTooltip>\n);\n"],"names":[],"mappings":";;;AAWO,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,MACG,oBAAA,WAAA,EAAU,YAAY,KAAK,OAAc,WACxC,UAAA,oBAAC,UAAS,EAAA,uBAAqB,MAAC,MAAI,MAAE,GAAG,QAAQ,EACnD,CAAA;"}
|