@hitachivantara/uikit-react-core 5.56.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 (40) 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 +1 -1
  14. package/dist/cjs/DropDownMenu/DropDownMenu.cjs +1 -0
  15. package/dist/cjs/DropDownMenu/DropDownMenu.cjs.map +1 -1
  16. package/dist/cjs/Snackbar/Snackbar.cjs +3 -0
  17. package/dist/cjs/Snackbar/Snackbar.cjs.map +1 -1
  18. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +5 -2
  19. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs.map +1 -1
  20. package/dist/esm/ActionsGeneric/ActionsGeneric.js +39 -21
  21. package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
  22. package/dist/esm/Banner/Banner.js +3 -0
  23. package/dist/esm/Banner/Banner.js.map +1 -1
  24. package/dist/esm/Banner/BannerContent/ActionContainer/ActionContainer.js +5 -2
  25. package/dist/esm/Banner/BannerContent/ActionContainer/ActionContainer.js.map +1 -1
  26. package/dist/esm/Banner/BannerContent/BannerContent.js +7 -3
  27. package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
  28. package/dist/esm/Banner/BannerContent/MessageContainer/MessageContainer.js +9 -4
  29. package/dist/esm/Banner/BannerContent/MessageContainer/MessageContainer.js.map +1 -1
  30. package/dist/esm/BulkActions/BulkActions.js +4 -1
  31. package/dist/esm/BulkActions/BulkActions.js.map +1 -1
  32. package/dist/esm/Carousel/Carousel.js +1 -1
  33. package/dist/esm/DropDownMenu/DropDownMenu.js +1 -0
  34. package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
  35. package/dist/esm/Snackbar/Snackbar.js +3 -0
  36. package/dist/esm/Snackbar/Snackbar.js.map +1 -1
  37. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +5 -2
  38. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
  39. package/dist/types/index.d.ts +108 -76
  40. package/package.json +2 -2
@@ -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
 
@@ -5922,7 +5936,7 @@ export declare interface HvSliderProps extends HvBaseProps<HTMLDivElement, "onCh
5922
5936
  * One is the HvSnackbar, which wraps all the positioning, transition, auto hide, etc.
5923
5937
  * The other is the HvSnackbarContent, which allows a finer control and customization of the content of the Snackbar.
5924
5938
  */
5925
- 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;
5926
5940
 
5927
5941
  export declare type HvSnackbarClasses = ExtractNames<typeof useClasses_101>;
5928
5942
 
@@ -5941,8 +5955,14 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
5941
5955
  customIcon?: React.ReactNode;
5942
5956
  /** Action to display. */
5943
5957
  action?: React.ReactNode | HvActionGeneric;
5944
- /** The callback function ran when an action is triggered, receiving `action` as param */
5945
- 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"];
5946
5966
  /** A Jss Object used to override or extend the styles applied to the component. */
5947
5967
  classes?: HvSnackbarContentClasses;
5948
5968
  }
@@ -5950,11 +5970,17 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
5950
5970
  export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" | "classes" | "children"> {
5951
5971
  /** If true, Snackbar is open. */
5952
5972
  open?: boolean;
5953
- /** 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
+ * */
5954
5978
  onClose?: ((event: Event | SyntheticEvent<any, Event>, reason: SnackbarCloseReason) => void) | undefined;
5955
5979
  /** The message to display. */
5956
5980
  label?: React.ReactNode;
5957
- /** 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 */
5958
5984
  anchorOrigin?: SnackbarOrigin;
5959
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 */
5960
5986
  autoHideDuration?: number;
@@ -5966,8 +5992,14 @@ export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" |
5966
5992
  showIcon?: boolean;
5967
5993
  /** Action to display. */
5968
5994
  action?: React.ReactNode | HvActionGeneric;
5969
- /** The callback function ran when an action is triggered, receiving `action` as param */
5970
- 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"];
5971
6003
  /** Duration of transition in milliseconds. */
5972
6004
  transitionDuration?: number;
5973
6005
  /** Direction of slide transition. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.56.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": "67ac3fbb762df89f4f55c563f24f691c775fe99c",
66
+ "gitHead": "2ee2a5f6502b55ac9f6aafd36baf96bbb8c9d765",
67
67
  "main": "dist/cjs/index.cjs",
68
68
  "exports": {
69
69
  ".": {