@hitachivantara/uikit-react-core 5.55.0 → 5.57.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.
Files changed (76) hide show
  1. package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs +39 -21
  2. package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs.map +1 -1
  3. package/dist/cjs/Banner/Banner.cjs +3 -0
  4. package/dist/cjs/Banner/Banner.cjs.map +1 -1
  5. package/dist/cjs/Banner/BannerContent/ActionContainer/ActionContainer.cjs +5 -2
  6. package/dist/cjs/Banner/BannerContent/ActionContainer/ActionContainer.cjs.map +1 -1
  7. package/dist/cjs/Banner/BannerContent/BannerContent.cjs +7 -3
  8. package/dist/cjs/Banner/BannerContent/BannerContent.cjs.map +1 -1
  9. package/dist/cjs/Banner/BannerContent/MessageContainer/MessageContainer.cjs +9 -4
  10. package/dist/cjs/Banner/BannerContent/MessageContainer/MessageContainer.cjs.map +1 -1
  11. package/dist/cjs/BulkActions/BulkActions.cjs +4 -1
  12. package/dist/cjs/BulkActions/BulkActions.cjs.map +1 -1
  13. package/dist/cjs/Carousel/Carousel.cjs +6 -6
  14. package/dist/cjs/Carousel/Carousel.cjs.map +1 -1
  15. package/dist/cjs/Dialog/Dialog.cjs +5 -6
  16. package/dist/cjs/Dialog/Dialog.cjs.map +1 -1
  17. package/dist/cjs/Drawer/Drawer.cjs +2 -3
  18. package/dist/cjs/Drawer/Drawer.cjs.map +1 -1
  19. package/dist/cjs/DropDownMenu/DropDownMenu.cjs +1 -0
  20. package/dist/cjs/DropDownMenu/DropDownMenu.cjs.map +1 -1
  21. package/dist/cjs/IconButton/IconButton.cjs +34 -0
  22. package/dist/cjs/IconButton/IconButton.cjs.map +1 -0
  23. package/dist/cjs/Pagination/Pagination.cjs +5 -5
  24. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  25. package/dist/cjs/QueryBuilder/Rule/Rule.cjs +2 -2
  26. package/dist/cjs/QueryBuilder/Rule/Rule.cjs.map +1 -1
  27. package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs +2 -2
  28. package/dist/cjs/QueryBuilder/RuleGroup/RuleGroup.cjs.map +1 -1
  29. package/dist/cjs/Snackbar/Snackbar.cjs +3 -0
  30. package/dist/cjs/Snackbar/Snackbar.cjs.map +1 -1
  31. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +5 -2
  32. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs.map +1 -1
  33. package/dist/cjs/Tooltip/Tooltip.cjs.map +1 -1
  34. package/dist/cjs/index.cjs +2 -0
  35. package/dist/cjs/index.cjs.map +1 -1
  36. package/dist/esm/ActionsGeneric/ActionsGeneric.js +39 -21
  37. package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
  38. package/dist/esm/Banner/Banner.js +3 -0
  39. package/dist/esm/Banner/Banner.js.map +1 -1
  40. package/dist/esm/Banner/BannerContent/ActionContainer/ActionContainer.js +5 -2
  41. package/dist/esm/Banner/BannerContent/ActionContainer/ActionContainer.js.map +1 -1
  42. package/dist/esm/Banner/BannerContent/BannerContent.js +7 -3
  43. package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
  44. package/dist/esm/Banner/BannerContent/MessageContainer/MessageContainer.js +9 -4
  45. package/dist/esm/Banner/BannerContent/MessageContainer/MessageContainer.js.map +1 -1
  46. package/dist/esm/BulkActions/BulkActions.js +4 -1
  47. package/dist/esm/BulkActions/BulkActions.js.map +1 -1
  48. package/dist/esm/Carousel/Carousel.js +6 -6
  49. package/dist/esm/Carousel/Carousel.js.map +1 -1
  50. package/dist/esm/Dialog/Dialog.js +5 -6
  51. package/dist/esm/Dialog/Dialog.js.map +1 -1
  52. package/dist/esm/Drawer/Drawer.js +2 -3
  53. package/dist/esm/Drawer/Drawer.js.map +1 -1
  54. package/dist/esm/DropDownMenu/DropDownMenu.js +1 -0
  55. package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
  56. package/dist/esm/IconButton/IconButton.js +34 -0
  57. package/dist/esm/IconButton/IconButton.js.map +1 -0
  58. package/dist/esm/Pagination/Pagination.js +5 -5
  59. package/dist/esm/Pagination/Pagination.js.map +1 -1
  60. package/dist/esm/QueryBuilder/Rule/Rule.js +2 -2
  61. package/dist/esm/QueryBuilder/Rule/Rule.js.map +1 -1
  62. package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js +2 -2
  63. package/dist/esm/QueryBuilder/RuleGroup/RuleGroup.js.map +1 -1
  64. package/dist/esm/Snackbar/Snackbar.js +3 -0
  65. package/dist/esm/Snackbar/Snackbar.js.map +1 -1
  66. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +5 -2
  67. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
  68. package/dist/esm/Tooltip/Tooltip.js.map +1 -1
  69. package/dist/esm/index.js +2 -0
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/types/index.d.ts +144 -76
  72. package/package.json +2 -2
  73. package/dist/cjs/utils/IconButton/IconButton.cjs +0 -11
  74. package/dist/cjs/utils/IconButton/IconButton.cjs.map +0 -1
  75. package/dist/esm/utils/IconButton/IconButton.js +0 -11
  76. package/dist/esm/utils/IconButton/IconButton.js.map +0 -1
@@ -1183,24 +1183,34 @@ export declare interface HvActionBarProps extends HvBaseProps {
1183
1183
 
1184
1184
  declare type HvActionContainerClasses = ExtractNames<typeof useClasses_27>;
1185
1185
 
1186
- declare interface HvActionContainerProps extends HvBaseProps<HTMLButtonElement> {
1187
- /** onClose function. */
1186
+ declare interface HvActionContainerProps extends HvBaseProps<HTMLButtonElement>, Pick<Partial<HvActionsGenericProps>, "onAction"> {
1187
+ /** Function called when clicking on the close button. */
1188
1188
  onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
1189
1189
  /** Actions to display. */
1190
- action?: React.ReactNode | HvActionGeneric[];
1191
- /** The callback function ran when an action is triggered, receiving `action` as param */
1192
- actionCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
1190
+ action?: HvActionsGenericProps["actions"];
1191
+ /**
1192
+ * The callback function called when an action is triggered, receiving `action` as parameter.
1193
+ *
1194
+ * @deprecated Use `onAction` instead.
1195
+ * */
1196
+ actionCallback?: HvActionsGenericProps["actionsCallback"];
1193
1197
  /** A Jss Object used to override or extend the styles applied to the component. */
1194
1198
  classes?: HvActionContainerClasses;
1195
1199
  }
1196
1200
 
1197
1201
  export declare interface HvActionGeneric {
1202
+ /** Action id. */
1198
1203
  id: string;
1204
+ /** Action label. */
1199
1205
  label: string;
1200
- icon?: React_2.ReactNode | ((params: {
1206
+ /** Action icon. */
1207
+ icon?: React.ReactNode | ((params: {
1201
1208
  isDisabled?: boolean;
1202
- }) => React_2.ReactNode);
1209
+ }) => React.ReactNode);
1210
+ /** Whether the action is disabled or not. */
1203
1211
  disabled?: boolean;
1212
+ /** When set to `true`, the button will have the icon has its content and a tooltip with the label will appear when the button is visible and hovered. */
1213
+ iconOnly?: boolean;
1204
1214
  }
1205
1215
 
1206
1216
  export declare const HvActionsGeneric: (props: HvActionsGenericProps) => JSX_3.Element | null;
@@ -1208,15 +1218,29 @@ export declare const HvActionsGeneric: (props: HvActionsGenericProps) => JSX_3.E
1208
1218
  export declare type HvActionsGenericClasses = ExtractNames<typeof useClasses_20>;
1209
1219
 
1210
1220
  export declare interface HvActionsGenericProps extends HvBaseProps {
1211
- /** Button category. */
1221
+ /**
1222
+ * The button category for all actions.
1223
+ *
1224
+ * @deprecated Use `variant` instead.
1225
+ */
1212
1226
  category?: HvButtonVariant;
1213
- /** Whether actions should be all disabled */
1227
+ /** The button variant for all actions. */
1228
+ variant?: HvButtonVariant;
1229
+ /** Whether the actions should be all disabled. */
1214
1230
  disabled?: boolean;
1215
- /** The renderable content inside the actions slot of the footer, or an Array of actions `{id, label, icon, disabled}` */
1216
- actions: React_2.ReactNode | HvActionGeneric[];
1217
- /** The callback function ran when an action is triggered, receiving `action` as param */
1218
- actionsCallback?: (event: React_2.SyntheticEvent, id: string, action: HvActionGeneric) => void;
1219
- /** The number of maximum visible actions before they're collapsed into a `DropDownMenu`. */
1231
+ /** Whether the actions should be all icon buttons when visible. */
1232
+ iconOnly?: boolean;
1233
+ /** The renderable content inside the actions slot of the footer, or an array of actions. */
1234
+ actions: React.ReactNode | HvActionGeneric[];
1235
+ /**
1236
+ * The callback function called when an action is triggered, receiving the `action` as parameter.
1237
+ *
1238
+ * @deprecated Use `onAction` instead.
1239
+ * */
1240
+ actionsCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
1241
+ /** The callback function called when an action is triggered, receiving the `action` as parameter. */
1242
+ onAction?: (event: React.SyntheticEvent, action: HvActionGeneric) => void;
1243
+ /** The maximum number of visible actions before they're collapsed into a dropdown menu. */
1220
1244
  maxVisibleActions?: number;
1221
1245
  /** A Jss Object used to override or extend the styles applied to the component. */
1222
1246
  classes?: HvActionsGenericClasses;
@@ -1462,12 +1486,18 @@ export declare interface HvBannerContentProps extends Omit<SnackbarContentProps,
1462
1486
  showIcon?: boolean;
1463
1487
  /** Custom icon to replace the variant default. */
1464
1488
  customIcon?: React.ReactNode;
1465
- /** onClose function. */
1489
+ /** Function called when clicking on the close button. */
1466
1490
  onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
1467
1491
  /** Actions to display on the right side. */
1468
- actions?: React.ReactNode | HvActionGeneric[];
1469
- /** The callback function ran when an action is triggered, receiving `action` as param */
1470
- actionsCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
1492
+ actions?: HvActionsGenericProps["actions"];
1493
+ /**
1494
+ * The callback function called when an action is triggered, receiving `action` as parameter.
1495
+ *
1496
+ * @deprecated Use `onAction` instead.
1497
+ * */
1498
+ actionsCallback?: HvActionsGenericProps["actionsCallback"];
1499
+ /** The callback function called when an action is triggered, receiving `action` as parameter. */
1500
+ onAction?: HvActionsGenericProps["onAction"];
1471
1501
  /** The position property of the header. */
1472
1502
  actionsPosition?: HvBannerActionPosition;
1473
1503
  /** The props to pass down to the Action Container. */
@@ -1479,7 +1509,11 @@ export declare interface HvBannerContentProps extends Omit<SnackbarContentProps,
1479
1509
  export declare interface HvBannerProps extends Omit<SnackbarProps, "anchorOrigin" | "classes" | "onClose"> {
1480
1510
  /** If true, the snackbar is open. */
1481
1511
  open: boolean;
1482
- /** Callback fired when the component requests to be closed. Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop. The reason parameter can optionally be used to control the response to onClose, for example ignoring clickaway. */
1512
+ /**
1513
+ * Callback fired when the component requests to be closed.
1514
+ * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.
1515
+ * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.
1516
+ * */
1483
1517
  onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
1484
1518
  /** The message to display. */
1485
1519
  label?: string;
@@ -1492,9 +1526,15 @@ export declare interface HvBannerProps extends Omit<SnackbarProps, "anchorOrigin
1492
1526
  /** Controls if the associated icon to the variant should be shown. */
1493
1527
  showIcon?: boolean;
1494
1528
  /** Actions to display on the right side. */
1495
- actions?: React.ReactNode | HvActionGeneric[];
1496
- /** The callback function ran when an action is triggered, receiving `action` as param */
1497
- actionsCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
1529
+ actions?: HvActionsGenericProps["actions"];
1530
+ /**
1531
+ * The callback function called when an action is triggered, receiving `action` as parameter.
1532
+ *
1533
+ * @deprecated Use `onAction` instead.
1534
+ * */
1535
+ actionsCallback?: HvActionsGenericProps["actionsCallback"];
1536
+ /** The callback function called when an action is triggered, receiving `action` as parameter. */
1537
+ onAction?: HvActionsGenericProps["onAction"];
1498
1538
  /** The position property of the header. */
1499
1539
  actionsPosition?: HvBannerActionPosition;
1500
1540
  /** How much the transition animation last in milliseconds, if 0 no animation is played. */
@@ -1947,67 +1987,41 @@ export declare type HvBulkActionsClasses = ExtractNames<typeof useClasses_34>;
1947
1987
  export declare type HvBulkActionsPropGetter<D extends object> = PropGetter<D, HvTAbleBulkActionsProps>;
1948
1988
 
1949
1989
  export declare interface HvBulkActionsProps extends HvBaseProps {
1950
- /**
1951
- * Custom label for select all checkbox
1952
- */
1990
+ /** Custom label for select all checkbox */
1953
1991
  selectAllLabel?: React.ReactNode;
1954
- /**
1955
- * Custom label for select all checkbox conjunction
1956
- */
1992
+ /** Custom label for select all checkbox conjunction */
1957
1993
  selectAllConjunctionLabel?: string;
1958
- /**
1959
- * Custom label for select all pages button
1960
- */
1994
+ /** Custom label for select all pages button */
1961
1995
  selectAllPagesLabel?: React.ReactNode;
1962
- /**
1963
- * Whether select all pages element should be visible
1964
- */
1996
+ /** Whether select all pages element should be visible */
1965
1997
  showSelectAllPages?: boolean;
1966
- /**
1967
- * The total number of elements
1968
- */
1998
+ /** The total number of elements */
1969
1999
  numTotal?: number;
1970
- /**
1971
- * The number of elements currently selected
1972
- */
2000
+ /** The number of elements currently selected */
1973
2001
  numSelected?: number;
1974
- /**
1975
- * Function called when the "select all" Checkbox is toggled.
1976
- */
2002
+ /** Function called when the "select all" Checkbox is toggled. */
1977
2003
  onSelectAll?: HvCheckBoxProps["onChange"];
1978
- /**
1979
- * Function called when the "select all pages" button is clicked toggled.
1980
- */
2004
+ /** Function called when the "select all pages" button is clicked toggled. */
1981
2005
  onSelectAllPages?: HvButtonProps["onClick"];
1982
- /**
1983
- * Whether the bulk actions should use the semantic styles when there are selected elements.
1984
- */
2006
+ /** Whether the bulk actions should use the semantic styles when there are selected elements. */
1985
2007
  semantic?: boolean;
1986
- /**
1987
- * The renderable content inside the right actions slot,
1988
- * or an Array of actions `{ id, label, icon, disabled, ... }`
1989
- */
1990
- actions?: React.ReactNode | HvActionGeneric[];
1991
- /**
1992
- * Whether actions should be all disabled
1993
- */
2008
+ /** The renderable content inside the right actions slot, or an array of actions `{ id, label, icon, disabled, ... }` */
2009
+ actions?: HvActionsGenericProps["actions"];
2010
+ /** Whether actions should be all disabled */
1994
2011
  actionsDisabled?: boolean;
1995
2012
  /**
1996
- * The callback function ran when an action is triggered, receiving `action` as param
1997
- */
2013
+ * The callback function called when an action is triggered, receiving `action` as parameter.
2014
+ *
2015
+ * @deprecated Use `onAction` instead.
2016
+ * */
1998
2017
  actionsCallback?: HvActionsGenericProps["actionsCallback"];
1999
- /**
2000
- * The number of maximum visible actions before they're collapsed into a `DropDownMenu`.
2001
- */
2018
+ /** The callback function called when an action is triggered, receiving `action` as parameter. */
2019
+ onAction?: HvActionsGenericProps["onAction"];
2020
+ /** The number of maximum visible actions before they're collapsed into a `DropDownMenu`. */
2002
2021
  maxVisibleActions?: number;
2003
- /**
2004
- * Properties to be passed onto the checkbox component, the values of the object are equivalent to the
2005
- * HvCheckbox API.
2006
- */
2022
+ /** Properties to be passed onto the checkbox component, the values of the object are equivalent to the HvCheckbox API. */
2007
2023
  checkboxProps?: HvCheckBoxProps;
2008
- /**
2009
- * A Jss Object used to override or extend the styles applied.
2010
- */
2024
+ /** A Jss Object used to override or extend the styles applied. */
2011
2025
  classes?: HvBulkActionsClasses;
2012
2026
  }
2013
2027
 
@@ -4082,6 +4096,39 @@ export declare interface HvHooks<D extends object = Record<string, unknown>, H e
4082
4096
 
4083
4097
  export declare type HvHorizontalScrollListItemClasses = ExtractNames<typeof useClasses_96>;
4084
4098
 
4099
+ /**
4100
+ * The `HvIconButton` component wraps a `HvTooltip` with a label around a `HvButton` with only an icon as its content.
4101
+ * As defined by Design System, a tooltip with the button’s label should always be displayed when hovering an icon only button.
4102
+ * This component provides this behavior out of the box.
4103
+ */
4104
+ 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"> & {
4105
+ /** Label to be displayed in the tooltip when hovered. This label will be used as the button's `aria-label`. */
4106
+ title: React.ReactNode;
4107
+ /** Number of milliseconds to wait before showing the tooltip. @default 500 */
4108
+ enterDelay?: HvTooltipProps["enterDelay"];
4109
+ /** Tooltip placement. @default top */
4110
+ placement?: HvTooltipProps["placement"];
4111
+ /** Extra tooltip properties. */
4112
+ tooltipProps?: Omit<Partial<HvTooltipProps>, "children"> | undefined;
4113
+ } & {
4114
+ component?: C | undefined;
4115
+ } & {
4116
+ children?: ReactNode;
4117
+ } & (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) & {
4118
+ ref?: PolymorphicRef<C> | undefined;
4119
+ } & RefAttributes<unknown>) => ReactElement<any, string | JSXElementConstructor<any>> | null;
4120
+
4121
+ export declare type HvIconButtonProps<C extends React.ElementType = "button"> = PolymorphicComponentRef<C, Omit<HvButtonProps<C>, "icon" | "focusableWhenDisabled" | "title" | "startIcon" | "endIcon" | "children" | "ref" | "component"> & {
4122
+ /** Label to be displayed in the tooltip when hovered. This label will be used as the button's `aria-label`. */
4123
+ title: React.ReactNode;
4124
+ /** Number of milliseconds to wait before showing the tooltip. @default 500 */
4125
+ enterDelay?: HvTooltipProps["enterDelay"];
4126
+ /** Tooltip placement. @default top */
4127
+ placement?: HvTooltipProps["placement"];
4128
+ /** Extra tooltip properties. */
4129
+ tooltipProps?: Omit<Partial<HvTooltipProps>, "children">;
4130
+ }>;
4131
+
4085
4132
  /**
4086
4133
  * Provides the user with additional descriptive text for the form element.
4087
4134
  */
@@ -5889,7 +5936,7 @@ export declare interface HvSliderProps extends HvBaseProps<HTMLDivElement, "onCh
5889
5936
  * One is the HvSnackbar, which wraps all the positioning, transition, auto hide, etc.
5890
5937
  * The other is the HvSnackbarContent, which allows a finer control and customization of the content of the Snackbar.
5891
5938
  */
5892
- export declare const HvSnackbar: ({ classes: classesProp, className, id, open, onClose, label, anchorOrigin, autoHideDuration, variant, showIcon, customIcon, action, actionCallback, transitionDuration, transitionDirection, container, offset, snackbarContentProps, ...others }: HvSnackbarProps) => JSX_3.Element;
5939
+ export declare const HvSnackbar: ({ classes: classesProp, className, id, open, onClose, label, anchorOrigin, autoHideDuration, variant, showIcon, customIcon, action, actionCallback, onAction, transitionDuration, transitionDirection, container, offset, snackbarContentProps, ...others }: HvSnackbarProps) => JSX_3.Element;
5893
5940
 
5894
5941
  export declare type HvSnackbarClasses = ExtractNames<typeof useClasses_101>;
5895
5942
 
@@ -5908,8 +5955,14 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
5908
5955
  customIcon?: React.ReactNode;
5909
5956
  /** Action to display. */
5910
5957
  action?: React.ReactNode | HvActionGeneric;
5911
- /** The callback function ran when an action is triggered, receiving `action` as param */
5912
- actionCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
5958
+ /**
5959
+ * The callback function called when an action is triggered, receiving `action` as parameter.
5960
+ *
5961
+ * @deprecated Use `onAction` instead.
5962
+ * */
5963
+ actionCallback?: HvActionsGenericProps["actionsCallback"];
5964
+ /** The callback function called when an action is triggered, receiving `action` as parameter. */
5965
+ onAction?: HvActionsGenericProps["onAction"];
5913
5966
  /** A Jss Object used to override or extend the styles applied to the component. */
5914
5967
  classes?: HvSnackbarContentClasses;
5915
5968
  }
@@ -5917,11 +5970,17 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
5917
5970
  export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" | "classes" | "children"> {
5918
5971
  /** If true, Snackbar is open. */
5919
5972
  open?: boolean;
5920
- /** Callback fired when the component requests to be closed. Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop. The reason parameter can optionally be used to control the response to onClose, for example ignoring clickaway. */
5973
+ /**
5974
+ * Callback fired when the component requests to be closed.
5975
+ * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.
5976
+ * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.
5977
+ * */
5921
5978
  onClose?: ((event: Event | SyntheticEvent<any, Event>, reason: SnackbarCloseReason) => void) | undefined;
5922
5979
  /** The message to display. */
5923
5980
  label?: React.ReactNode;
5924
- /** The anchor of the Snackbar. vertical: "top", "bottom" | horizontal: "left","center","right. It defines where the snackbar will end his animation */
5981
+ /**
5982
+ * The anchor of the Snackbar. vertical: "top", "bottom" | horizontal: "left", "center", "right".
5983
+ * It defines where the snackbar will end his animation */
5925
5984
  anchorOrigin?: SnackbarOrigin;
5926
5985
  /** The number of milliseconds to wait before automatically calling the onClose function. onClose should then set the state of the open prop to hide the Snackbar */
5927
5986
  autoHideDuration?: number;
@@ -5933,8 +5992,14 @@ export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" |
5933
5992
  showIcon?: boolean;
5934
5993
  /** Action to display. */
5935
5994
  action?: React.ReactNode | HvActionGeneric;
5936
- /** The callback function ran when an action is triggered, receiving `action` as param */
5937
- actionCallback?: (event: React.SyntheticEvent, id: string, action: HvActionGeneric) => void;
5995
+ /**
5996
+ * The callback function called when an action is triggered, receiving `action` as parameter.
5997
+ *
5998
+ * @deprecated Use `onAction` instead.
5999
+ * */
6000
+ actionCallback?: HvActionsGenericProps["actionsCallback"];
6001
+ /** The callback function called when an action is triggered, receiving `action` as parameter. */
6002
+ onAction?: HvActionsGenericProps["onAction"];
5938
6003
  /** Duration of transition in milliseconds. */
5939
6004
  transitionDuration?: number;
5940
6005
  /** Direction of slide transition. */
@@ -6951,6 +7016,9 @@ export declare interface HvToggleButtonProps extends HvBaseProps<HTMLButtonEleme
6951
7016
  /**
6952
7017
  * Tooltips display informative text when users hover over, focus on, or tap an element.
6953
7018
  * Accessibility-wise, the tooltip automatically labels the `children` content.
7019
+ *
7020
+ * If you are looking to wrap an icon only button with a tooltip, take a look at the `HvIconButton` component
7021
+ * which offers you thus behavior out of the box.
6954
7022
  */
6955
7023
  export declare const HvTooltip: ForwardRefExoticComponent<Omit<HvTooltipProps, "ref"> & RefAttributes<unknown>>;
6956
7024
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.55.0",
3
+ "version": "5.57.0",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "Core React components for the NEXT Design System.",
@@ -63,7 +63,7 @@
63
63
  "access": "public",
64
64
  "directory": "package"
65
65
  },
66
- "gitHead": "234825f75fb09872e06901116a798496e415e50e",
66
+ "gitHead": "2ee2a5f6502b55ac9f6aafd36baf96bbb8c9d765",
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;"}