@hitachivantara/uikit-react-core 5.88.0 → 5.89.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 (86) hide show
  1. package/dist/cjs/ActionsGeneric/ActionsGeneric.cjs +1 -2
  2. package/dist/cjs/AppSwitcher/Action/Action.styles.cjs +2 -2
  3. package/dist/cjs/Banner/Banner.cjs +5 -5
  4. package/dist/cjs/Banner/BannerContent/BannerContent.cjs +59 -97
  5. package/dist/cjs/Banner/BannerContent/BannerContent.styles.cjs +18 -46
  6. package/dist/cjs/BaseDropdown/BaseDropdown.styles.cjs +1 -2
  7. package/dist/cjs/Button/Button.cjs +1 -2
  8. package/dist/cjs/Button/Button.styles.cjs +0 -6
  9. package/dist/cjs/DotPagination/DotPagination.styles.cjs +3 -0
  10. package/dist/cjs/FormElement/Adornment/Adornment.styles.cjs +1 -4
  11. package/dist/cjs/IconContainer/IconContainer.cjs +81 -0
  12. package/dist/cjs/ListContainer/ListItem/ListItem.styles.cjs +0 -6
  13. package/dist/cjs/Loading/Loading.cjs +1 -2
  14. package/dist/cjs/Loading/Loading.styles.cjs +3 -1
  15. package/dist/cjs/Snackbar/Snackbar.cjs +6 -5
  16. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.cjs +20 -28
  17. package/dist/cjs/Snackbar/SnackbarContent/SnackbarContent.styles.cjs +26 -56
  18. package/dist/cjs/{TableSection → Table/TableSection}/TableSection.cjs +2 -2
  19. package/dist/cjs/{TableSection → Table/TableSection}/TableSection.styles.cjs +12 -12
  20. package/dist/cjs/Table/hooks/useHvRowExpand.cjs +3 -3
  21. package/dist/cjs/Tabs/Tab/Tab.styles.cjs +0 -3
  22. package/dist/cjs/TagsInput/TagsInput.styles.cjs +1 -1
  23. package/dist/cjs/Typography/Typography.styles.cjs +2 -1
  24. package/dist/cjs/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +0 -3
  25. package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +0 -4
  26. package/dist/cjs/index.cjs +9 -4
  27. package/dist/cjs/utils/Callout.cjs +134 -0
  28. package/dist/esm/ActionsGeneric/ActionsGeneric.js +1 -2
  29. package/dist/esm/ActionsGeneric/ActionsGeneric.js.map +1 -1
  30. package/dist/esm/AppSwitcher/Action/Action.styles.js +2 -2
  31. package/dist/esm/AppSwitcher/Action/Action.styles.js.map +1 -1
  32. package/dist/esm/Banner/Banner.js +5 -5
  33. package/dist/esm/Banner/Banner.js.map +1 -1
  34. package/dist/esm/Banner/BannerContent/BannerContent.js +60 -96
  35. package/dist/esm/Banner/BannerContent/BannerContent.js.map +1 -1
  36. package/dist/esm/Banner/BannerContent/BannerContent.styles.js +18 -46
  37. package/dist/esm/Banner/BannerContent/BannerContent.styles.js.map +1 -1
  38. package/dist/esm/BaseDropdown/BaseDropdown.styles.js +1 -2
  39. package/dist/esm/BaseDropdown/BaseDropdown.styles.js.map +1 -1
  40. package/dist/esm/Button/Button.js +2 -3
  41. package/dist/esm/Button/Button.js.map +1 -1
  42. package/dist/esm/Button/Button.styles.js +0 -6
  43. package/dist/esm/Button/Button.styles.js.map +1 -1
  44. package/dist/esm/DotPagination/DotPagination.styles.js +3 -0
  45. package/dist/esm/DotPagination/DotPagination.styles.js.map +1 -1
  46. package/dist/esm/FormElement/Adornment/Adornment.styles.js +1 -4
  47. package/dist/esm/FormElement/Adornment/Adornment.styles.js.map +1 -1
  48. package/dist/esm/IconContainer/IconContainer.js +81 -0
  49. package/dist/esm/IconContainer/IconContainer.js.map +1 -0
  50. package/dist/esm/ListContainer/ListItem/ListItem.styles.js +0 -6
  51. package/dist/esm/ListContainer/ListItem/ListItem.styles.js.map +1 -1
  52. package/dist/esm/Loading/Loading.js +1 -2
  53. package/dist/esm/Loading/Loading.js.map +1 -1
  54. package/dist/esm/Loading/Loading.styles.js +3 -1
  55. package/dist/esm/Loading/Loading.styles.js.map +1 -1
  56. package/dist/esm/Snackbar/Snackbar.js +6 -5
  57. package/dist/esm/Snackbar/Snackbar.js.map +1 -1
  58. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js +23 -29
  59. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.js.map +1 -1
  60. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js +26 -56
  61. package/dist/esm/Snackbar/SnackbarContent/SnackbarContent.styles.js.map +1 -1
  62. package/dist/esm/Table/Table.js.map +1 -1
  63. package/dist/esm/{TableSection → Table/TableSection}/TableSection.js +2 -2
  64. package/dist/esm/Table/TableSection/TableSection.js.map +1 -0
  65. package/dist/esm/{TableSection → Table/TableSection}/TableSection.styles.js +12 -12
  66. package/dist/esm/Table/TableSection/TableSection.styles.js.map +1 -0
  67. package/dist/esm/Table/hooks/useHvRowExpand.js +3 -3
  68. package/dist/esm/Table/hooks/useHvRowExpand.js.map +1 -1
  69. package/dist/esm/Tabs/Tab/Tab.styles.js +0 -3
  70. package/dist/esm/Tabs/Tab/Tab.styles.js.map +1 -1
  71. package/dist/esm/TagsInput/TagsInput.styles.js +1 -1
  72. package/dist/esm/TagsInput/TagsInput.styles.js.map +1 -1
  73. package/dist/esm/Typography/Typography.styles.js +2 -1
  74. package/dist/esm/Typography/Typography.styles.js.map +1 -1
  75. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +0 -3
  76. package/dist/esm/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
  77. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js +0 -4
  78. package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
  79. package/dist/esm/index.js +56 -51
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/utils/Callout.js +132 -0
  82. package/dist/esm/utils/Callout.js.map +1 -0
  83. package/dist/types/index.d.ts +518 -452
  84. package/package.json +6 -6
  85. package/dist/esm/TableSection/TableSection.js.map +0 -1
  86. package/dist/esm/TableSection/TableSection.styles.js.map +0 -1
@@ -60,9 +60,6 @@ const { staticClasses, useClasses } = createClasses("HvListItem", {
60
60
  "& svg": {
61
61
  boxShadow: "none !important",
62
62
  outline: "none !important"
63
- },
64
- "$disabled > svg *.color0": {
65
- fill: theme.colors.secondary_60
66
63
  }
67
64
  },
68
65
  withEndAdornment: {
@@ -70,9 +67,6 @@ const { staticClasses, useClasses } = createClasses("HvListItem", {
70
67
  "& svg": {
71
68
  boxShadow: "none !important",
72
69
  outline: "none !important"
73
- },
74
- "$disabled > svg *.color0": {
75
- fill: theme.colors.secondary_60
76
70
  }
77
71
  }
78
72
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.styles.js","sources":["../../../../src/ListContainer/ListItem/ListItem.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvListItem\", {\n root: {\n ...theme.typography.body,\n padding: 0,\n display: \"block\",\n height: \"32px\",\n lineHeight: \"32px\",\n listStyleType: \"none\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n position: \"relative\",\n alignContent: \"center\",\n\n \"&:not(:last-child)\": {\n marginBottom: \"8px\",\n },\n\n \"&$condensed\": {\n marginBottom: 0,\n },\n\n \"&.HvIsFocused\": {\n ...outlineStyles,\n backgroundColor: theme.colors.atmo3,\n zIndex: 2,\n },\n },\n focus: { backgroundColor: theme.colors.atmo3, zIndex: 2 },\n startAdornment: {},\n endAdornment: {},\n gutters: {\n padding: `0 ${theme.space.xs}`,\n\n \"&$withStartAdornment\": {\n paddingLeft: 0,\n },\n \"&$withEndAdornment\": {\n paddingRight: 0,\n },\n },\n condensed: {},\n interactive: {\n cursor: \"pointer\",\n \"&:not($disabled):not($selected):hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n },\n \"&$disabled\": {\n cursor: \"not-allowed\",\n },\n },\n selected: { backgroundColor: theme.colors.containerBackgroundHover },\n disabled: {\n color: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo3,\n },\n withStartAdornment: {\n \"& > div\": {\n float: \"left\",\n },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n \"$disabled > svg *.color0\": {\n fill: theme.colors.secondary_60,\n },\n },\n withEndAdornment: {\n \"& > div\": { float: \"right\" },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n \"$disabled > svg *.color0\": {\n fill: theme.colors.secondary_60,\n },\n },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,cAAc;AAAA,EACvE,MAAM;AAAA,IACJ,GAAG,MAAM,WAAW;AAAA,IACpB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,IAEd,sBAAsB;AAAA,MACpB,cAAc;AAAA,IAChB;AAAA,IAEA,eAAe;AAAA,MACb,cAAc;AAAA,IAChB;AAAA,IAEA,iBAAiB;AAAA,MACf,GAAG;AAAA,MACH,iBAAiB,MAAM,OAAO;AAAA,MAC9B,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,OAAO,EAAE,iBAAiB,MAAM,OAAO,OAAO,QAAQ,EAAE;AAAA,EACxD,gBAAgB,CAAC;AAAA,EACjB,cAAc,CAAC;AAAA,EACf,SAAS;AAAA,IACP,SAAS,KAAK,MAAM,MAAM,EAAE;AAAA,IAE5B,wBAAwB;AAAA,MACtB,aAAa;AAAA,IACf;AAAA,IACA,sBAAsB;AAAA,MACpB,cAAc;AAAA,IAAA;AAAA,EAElB;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,yCAAyC;AAAA,MACvC,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,cAAc;AAAA,MACZ,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,UAAU,EAAE,iBAAiB,MAAM,OAAO,yBAAyB;AAAA,EACnE,UAAU;AAAA,IACR,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,oBAAoB;AAAA,IAClB,WAAW;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IAEA,SAAS;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,IACX;AAAA,IACA,4BAA4B;AAAA,MAC1B,MAAM,MAAM,OAAO;AAAA,IAAA;AAAA,EAEvB;AAAA,EACA,kBAAkB;AAAA,IAChB,WAAW,EAAE,OAAO,QAAQ;AAAA,IAE5B,SAAS;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,IACX;AAAA,IACA,4BAA4B;AAAA,MAC1B,MAAM,MAAM,OAAO;AAAA,IAAA;AAAA,EACrB;AAEJ,CAAC;"}
1
+ {"version":3,"file":"ListItem.styles.js","sources":["../../../../src/ListContainer/ListItem/ListItem.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvListItem\", {\n root: {\n ...theme.typography.body,\n padding: 0,\n display: \"block\",\n height: \"32px\",\n lineHeight: \"32px\",\n listStyleType: \"none\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n position: \"relative\",\n alignContent: \"center\",\n\n \"&:not(:last-child)\": {\n marginBottom: \"8px\",\n },\n\n \"&$condensed\": {\n marginBottom: 0,\n },\n\n \"&.HvIsFocused\": {\n ...outlineStyles,\n backgroundColor: theme.colors.atmo3,\n zIndex: 2,\n },\n },\n focus: { backgroundColor: theme.colors.atmo3, zIndex: 2 },\n startAdornment: {},\n endAdornment: {},\n gutters: {\n padding: `0 ${theme.space.xs}`,\n\n \"&$withStartAdornment\": {\n paddingLeft: 0,\n },\n \"&$withEndAdornment\": {\n paddingRight: 0,\n },\n },\n condensed: {},\n interactive: {\n cursor: \"pointer\",\n \"&:not($disabled):not($selected):hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n },\n \"&$disabled\": {\n cursor: \"not-allowed\",\n },\n },\n selected: { backgroundColor: theme.colors.containerBackgroundHover },\n disabled: {\n color: theme.colors.secondary_60,\n backgroundColor: theme.colors.atmo3,\n },\n withStartAdornment: {\n \"& > div\": {\n float: \"left\",\n },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n },\n withEndAdornment: {\n \"& > div\": { float: \"right\" },\n\n \"& svg\": {\n boxShadow: \"none !important\",\n outline: \"none !important\",\n },\n },\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,cAAc;AAAA,EACvE,MAAM;AAAA,IACJ,GAAG,MAAM,WAAW;AAAA,IACpB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,IAEd,sBAAsB;AAAA,MACpB,cAAc;AAAA,IAChB;AAAA,IAEA,eAAe;AAAA,MACb,cAAc;AAAA,IAChB;AAAA,IAEA,iBAAiB;AAAA,MACf,GAAG;AAAA,MACH,iBAAiB,MAAM,OAAO;AAAA,MAC9B,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,OAAO,EAAE,iBAAiB,MAAM,OAAO,OAAO,QAAQ,EAAE;AAAA,EACxD,gBAAgB,CAAC;AAAA,EACjB,cAAc,CAAC;AAAA,EACf,SAAS;AAAA,IACP,SAAS,KAAK,MAAM,MAAM,EAAE;AAAA,IAE5B,wBAAwB;AAAA,MACtB,aAAa;AAAA,IACf;AAAA,IACA,sBAAsB;AAAA,MACpB,cAAc;AAAA,IAAA;AAAA,EAElB;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,aAAa;AAAA,IACX,QAAQ;AAAA,IACR,yCAAyC;AAAA,MACvC,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,cAAc;AAAA,MACZ,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,UAAU,EAAE,iBAAiB,MAAM,OAAO,yBAAyB;AAAA,EACnE,UAAU;AAAA,IACR,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,oBAAoB;AAAA,IAClB,WAAW;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IAEA,SAAS;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,kBAAkB;AAAA,IAChB,WAAW,EAAE,OAAO,QAAQ;AAAA,IAE5B,SAAS;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ,CAAC;"}
@@ -5,7 +5,6 @@ import { getColor } from "@hitachivantara/uikit-styles";
5
5
  import { range } from "../utils/helpers.js";
6
6
  import { useClasses } from "./Loading.styles.js";
7
7
  import { staticClasses } from "./Loading.styles.js";
8
- import { HvTypography } from "../Typography/Typography.js";
9
8
  const HvLoading = forwardRef(function HvLoading2(props, ref) {
10
9
  const {
11
10
  color,
@@ -50,7 +49,7 @@ const HvLoading = forwardRef(function HvLoading2(props, ref) {
50
49
  },
51
50
  e
52
51
  )) }),
53
- label && /* @__PURE__ */ jsx(HvTypography, { variant: "caption1", className: classes.label, children: label })
52
+ label && /* @__PURE__ */ jsx("div", { className: classes.label, children: label })
54
53
  ]
55
54
  }
56
55
  );
@@ -1 +1 @@
1
- {"version":3,"file":"Loading.js","sources":["../../../src/Loading/Loading.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n mergeStyles,\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny } from \"@hitachivantara/uikit-styles\";\n\nimport { HvBaseProps } from \"../types/generic\";\nimport { HvTypography } from \"../Typography\";\nimport { range } from \"../utils/helpers\";\nimport { staticClasses, useClasses } from \"./Loading.styles\";\n\nexport { staticClasses as loadingClasses };\n\nexport type HvLoadingClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvLoadingProps extends HvBaseProps {\n /** Indicates if the component should be render in a small size. */\n small?: boolean;\n /** The label to be displayed. */\n label?: React.ReactNode;\n /** Whether the loading animation is hidden. */\n hidden?: boolean;\n /** Color applied to the bars. */\n color?: HvColorAny;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvLoadingClasses;\n}\n\n/**\n * Loading provides feedback about a process that is taking place in the application.\n */\nexport const HvLoading = forwardRef<\n // no-indent\n React.ComponentRef<\"div\">,\n HvLoadingProps\n>(function HvLoading(props, ref) {\n const {\n color,\n hidden,\n small,\n label,\n classes: classesProp,\n style,\n className,\n ...others\n } = useDefaultProps(\"HvLoading\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const size = small ? \"small\" : \"regular\";\n const colorVariant = color && (`${size}Color` as const);\n\n return (\n <div\n ref={ref}\n hidden={!!hidden}\n style={mergeStyles(style, {\n color: getColor(color, small ? \"secondary\" : \"brand\"),\n \"--customColor\": getColor(color),\n })}\n className={cx(\n classes.root,\n {\n [classes.hidden]: hidden,\n },\n className,\n )}\n {...others}\n >\n <div className={classes.barContainer}>\n {range(3).map((e) => (\n <div\n key={e}\n className={cx(\n classes.loadingBar,\n // TODO: hoist to parent & remove unused `colorVariant` in v6\n classes[size],\n classes[colorVariant!],\n )}\n />\n ))}\n </div>\n {label && (\n <HvTypography variant=\"caption1\" className={classes.label}>\n {label}\n </HvTypography>\n )}\n </div>\n );\n});\n"],"names":["HvLoading"],"mappings":";;;;;;;;AAiCO,MAAM,YAAY,WAIvB,SAASA,WAAU,OAAO,KAAK;AACzB,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,aAAa,KAAK;AAEtC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,OAAO,QAAQ,UAAU;AACzB,QAAA,eAAe,SAAU,GAAG,IAAI;AAGpC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,QAAQ,CAAC,CAAC;AAAA,MACV,OAAO,YAAY,OAAO;AAAA,QACxB,OAAO,SAAS,OAAO,QAAQ,cAAc,OAAO;AAAA,QACpD,iBAAiB,SAAS,KAAK;AAAA,MAAA,CAChC;AAAA,MACD,WAAW;AAAA,QACT,QAAQ;AAAA,QACR;AAAA,UACE,CAAC,QAAQ,MAAM,GAAG;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC,oBAAA,OAAA,EAAI,WAAW,QAAQ,cACrB,gBAAM,CAAC,EAAE,IAAI,CAAC,MACb;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAW;AAAA,cACT,QAAQ;AAAA;AAAA,cAER,QAAQ,IAAI;AAAA,cACZ,QAAQ,YAAa;AAAA,YAAA;AAAA,UACvB;AAAA,UANK;AAAA,QAQR,CAAA,GACH;AAAA,QACC,6BACE,cAAa,EAAA,SAAQ,YAAW,WAAW,QAAQ,OACjD,UACH,MAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Loading.js","sources":["../../../src/Loading/Loading.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n mergeStyles,\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\nimport { getColor, HvColorAny } from \"@hitachivantara/uikit-styles\";\n\nimport { HvBaseProps } from \"../types/generic\";\nimport { range } from \"../utils/helpers\";\nimport { staticClasses, useClasses } from \"./Loading.styles\";\n\nexport { staticClasses as loadingClasses };\n\nexport type HvLoadingClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvLoadingProps extends HvBaseProps {\n /** Indicates if the component should be render in a small size. */\n small?: boolean;\n /** The label to be displayed. */\n label?: React.ReactNode;\n /** Whether the loading animation is hidden. */\n hidden?: boolean;\n /** Color applied to the bars. */\n color?: HvColorAny;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvLoadingClasses;\n}\n\n/**\n * Loading provides feedback about a process that is taking place in the application.\n */\nexport const HvLoading = forwardRef<\n // no-indent\n React.ComponentRef<\"div\">,\n HvLoadingProps\n>(function HvLoading(props, ref) {\n const {\n color,\n hidden,\n small,\n label,\n classes: classesProp,\n style,\n className,\n ...others\n } = useDefaultProps(\"HvLoading\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const size = small ? \"small\" : \"regular\";\n const colorVariant = color && (`${size}Color` as const);\n\n return (\n <div\n ref={ref}\n hidden={!!hidden}\n style={mergeStyles(style, {\n color: getColor(color, small ? \"secondary\" : \"brand\"),\n \"--customColor\": getColor(color),\n })}\n className={cx(\n classes.root,\n {\n [classes.hidden]: hidden,\n },\n className,\n )}\n {...others}\n >\n <div className={classes.barContainer}>\n {range(3).map((e) => (\n <div\n key={e}\n className={cx(\n classes.loadingBar,\n // TODO: hoist to parent & remove unused `colorVariant` in v6\n classes[size],\n classes[colorVariant!],\n )}\n />\n ))}\n </div>\n {label && <div className={classes.label}>{label}</div>}\n </div>\n );\n});\n"],"names":["HvLoading"],"mappings":";;;;;;;AAgCO,MAAM,YAAY,WAIvB,SAASA,WAAU,OAAO,KAAK;AACzB,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,aAAa,KAAK;AAEtC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,OAAO,QAAQ,UAAU;AACzB,QAAA,eAAe,SAAU,GAAG,IAAI;AAGpC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,QAAQ,CAAC,CAAC;AAAA,MACV,OAAO,YAAY,OAAO;AAAA,QACxB,OAAO,SAAS,OAAO,QAAQ,cAAc,OAAO;AAAA,QACpD,iBAAiB,SAAS,KAAK;AAAA,MAAA,CAChC;AAAA,MACD,WAAW;AAAA,QACT,QAAQ;AAAA,QACR;AAAA,UACE,CAAC,QAAQ,MAAM,GAAG;AAAA,QACpB;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC,oBAAA,OAAA,EAAI,WAAW,QAAQ,cACrB,gBAAM,CAAC,EAAE,IAAI,CAAC,MACb;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAW;AAAA,cACT,QAAQ;AAAA;AAAA,cAER,QAAQ,IAAI;AAAA,cACZ,QAAQ,YAAa;AAAA,YAAA;AAAA,UACvB;AAAA,UANK;AAAA,QAQR,CAAA,GACH;AAAA,QACC,SAAU,oBAAA,OAAA,EAAI,WAAW,QAAQ,OAAQ,UAAM,MAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD;AAEJ,CAAC;"}
@@ -38,7 +38,9 @@ const { staticClasses, useClasses } = createClasses("HvLoading", {
38
38
  ":nth-of-type(2)": { animationDelay: "0.22s" },
39
39
  ":nth-of-type(3)": { animationDelay: "0.44s" }
40
40
  },
41
- label: {},
41
+ label: {
42
+ ...theme.typography.caption1
43
+ },
42
44
  overlay: {},
43
45
  blur: {},
44
46
  hidden: { display: "none" },
@@ -1 +1 @@
1
- {"version":3,"file":"Loading.styles.js","sources":["../../../src/Loading/Loading.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvLoading\", {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: theme.space.xs,\n },\n barContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-around\",\n\n \":has($regular)\": {\n width: 30,\n height: 30,\n },\n\n \":has($small)\": {\n \"--height\": \"40%\",\n width: 18,\n height: 18,\n },\n },\n loadingBar: {\n backgroundColor: \"currentcolor\",\n display: \"inline-block\",\n animation: \"loading 1s ease-in-out infinite\",\n // TODO: make this the default when it has better support\n width: \"round(up, 0.11em, 2px)\",\n height: \"100%\",\n\n \"@keyframes loading\": {\n \"50%\": {\n height: \"var(--height, 60%)\",\n backgroundColor: `var(--customColor, ${theme.colors.secondary})`,\n },\n },\n\n \":nth-of-type(2)\": { animationDelay: \"0.22s\" },\n \":nth-of-type(3)\": { animationDelay: \"0.44s\" },\n },\n label: {},\n overlay: {},\n blur: {},\n hidden: { display: \"none\" },\n small: {\n width: 2,\n },\n regular: {\n width: 4,\n },\n smallColor: {},\n regularColor: {},\n});\n"],"names":[],"mappings":";;AAGO,MAAM,EAAE,eAAe,eAAe,cAAc,aAAa;AAAA,EACtE,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,KAAK,MAAM,MAAM;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAEhB,kBAAkB;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAEA,gBAAgB;AAAA,MACd,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,YAAY;AAAA,IACV,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,WAAW;AAAA;AAAA,IAEX,OAAO;AAAA,IACP,QAAQ;AAAA,IAER,sBAAsB;AAAA,MACpB,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,iBAAiB,sBAAsB,MAAM,OAAO,SAAS;AAAA,MAAA;AAAA,IAEjE;AAAA,IAEA,mBAAmB,EAAE,gBAAgB,QAAQ;AAAA,IAC7C,mBAAmB,EAAE,gBAAgB,QAAQ;AAAA,EAC/C;AAAA,EACA,OAAO,CAAC;AAAA,EACR,SAAS,CAAC;AAAA,EACV,MAAM,CAAC;AAAA,EACP,QAAQ,EAAE,SAAS,OAAO;AAAA,EAC1B,OAAO;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,SAAS;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,YAAY,CAAC;AAAA,EACb,cAAc,CAAA;AAChB,CAAC;"}
1
+ {"version":3,"file":"Loading.styles.js","sources":["../../../src/Loading/Loading.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvLoading\", {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: theme.space.xs,\n },\n barContainer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-around\",\n\n \":has($regular)\": {\n width: 30,\n height: 30,\n },\n\n \":has($small)\": {\n \"--height\": \"40%\",\n width: 18,\n height: 18,\n },\n },\n loadingBar: {\n backgroundColor: \"currentcolor\",\n display: \"inline-block\",\n animation: \"loading 1s ease-in-out infinite\",\n // TODO: make this the default when it has better support\n width: \"round(up, 0.11em, 2px)\",\n height: \"100%\",\n\n \"@keyframes loading\": {\n \"50%\": {\n height: \"var(--height, 60%)\",\n backgroundColor: `var(--customColor, ${theme.colors.secondary})`,\n },\n },\n\n \":nth-of-type(2)\": { animationDelay: \"0.22s\" },\n \":nth-of-type(3)\": { animationDelay: \"0.44s\" },\n },\n label: {\n ...theme.typography.caption1,\n },\n overlay: {},\n blur: {},\n hidden: { display: \"none\" },\n small: {\n width: 2,\n },\n regular: {\n width: 4,\n },\n smallColor: {},\n regularColor: {},\n});\n"],"names":[],"mappings":";;AAGO,MAAM,EAAE,eAAe,eAAe,cAAc,aAAa;AAAA,EACtE,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,KAAK,MAAM,MAAM;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAEhB,kBAAkB;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAEA,gBAAgB;AAAA,MACd,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,YAAY;AAAA,IACV,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,WAAW;AAAA;AAAA,IAEX,OAAO;AAAA,IACP,QAAQ;AAAA,IAER,sBAAsB;AAAA,MACpB,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,iBAAiB,sBAAsB,MAAM,OAAO,SAAS;AAAA,MAAA;AAAA,IAEjE;AAAA,IAEA,mBAAmB,EAAE,gBAAgB,QAAQ;AAAA,IAC7C,mBAAmB,EAAE,gBAAgB,QAAQ;AAAA,EAC/C;AAAA,EACA,OAAO;AAAA,IACL,GAAG,MAAM,WAAW;AAAA,EACtB;AAAA,EACA,SAAS,CAAC;AAAA,EACV,MAAM,CAAC;AAAA,EACP,QAAQ,EAAE,SAAS,OAAO;AAAA,EAC1B,OAAO;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EACA,SAAS;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA,YAAY,CAAC;AAAA,EACb,cAAc,CAAA;AAChB,CAAC;"}
@@ -15,13 +15,13 @@ const HvSnackbar = forwardRef(function HvSnackbar2(props, ref) {
15
15
  id,
16
16
  open = false,
17
17
  onClose,
18
- label = "",
18
+ label,
19
19
  anchorOrigin = { vertical: "top", horizontal: "right" },
20
20
  autoHideDuration = 5e3,
21
- variant = "default",
22
- showIcon = false,
23
- customIcon = null,
24
- action = null,
21
+ variant,
22
+ showIcon,
23
+ customIcon,
24
+ action,
25
25
  actionCallback,
26
26
  // TODO - remove in v6
27
27
  onAction,
@@ -78,6 +78,7 @@ const HvSnackbar = forwardRef(function HvSnackbar2(props, ref) {
78
78
  action,
79
79
  actionCallback,
80
80
  onAction,
81
+ onClose,
81
82
  ...snackbarContentProps
82
83
  }
83
84
  )
@@ -1 +1 @@
1
- {"version":3,"file":"Snackbar.js","sources":["../../../src/Snackbar/Snackbar.tsx"],"sourcesContent":["import { forwardRef, useCallback } from \"react\";\nimport Slide, { SlideProps } from \"@mui/material/Slide\";\nimport MuiSnackbar, {\n SnackbarProps as MuiSnackbarProps,\n SnackbarCloseReason,\n SnackbarOrigin,\n} from \"@mui/material/Snackbar\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionGeneric, HvActionsGenericProps } from \"../ActionsGeneric\";\nimport { capitalize } from \"../utils/helpers\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./Snackbar.styles\";\nimport { HvSnackbarContent, HvSnackbarContentProps } from \"./SnackbarContent\";\nimport { HvSnackbarVariant } from \"./types\";\n\nexport { staticClasses as snackbarClasses };\n\nexport type HvSnackbarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSnackbarProps\n extends Omit<MuiSnackbarProps, \"action\" | \"classes\" | \"children\"> {\n /** If true, Snackbar is open. */\n open?: boolean;\n /**\n * Callback fired when the component requests to be closed.\n * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.\n * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.\n * */\n onClose?: (\n event: Event | React.SyntheticEvent<any, Event>,\n reason: SnackbarCloseReason,\n ) => void;\n /** The message to display. */\n label?: React.ReactNode;\n /**\n * The anchor of the Snackbar. vertical: \"top\", \"bottom\" | horizontal: \"left\", \"center\", \"right\".\n * It defines where the snackbar will end his animation */\n anchorOrigin?: SnackbarOrigin;\n /** 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 */\n autoHideDuration?: number;\n /** Variant of the snackbar. */\n variant?: HvSnackbarVariant;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Action to display. */\n action?: React.ReactNode | HvActionGeneric;\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** Duration of transition in milliseconds. */\n transitionDuration?: number;\n /** Direction of slide transition. */\n transitionDirection?: \"up\" | \"down\" | \"left\" | \"right\";\n /** The container the snackbar should slide from. */\n container?: SlideProps[\"container\"];\n /** Custom offset from top/bottom of the page, in px. */\n offset?: number;\n /** Others applied to the content of the snackbar. */\n snackbarContentProps?: HvSnackbarContentProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvSnackbarClasses;\n /** @ignore */\n ref?: MuiSnackbarProps[\"ref\"];\n}\n\n/**\n * A Snackbar provides brief messages about app processes.\n * It is dismissed automatically after a given interval.\n *\n * Snackbar can be built with two different components:\n * - `HvSnackbar`, which wraps all the positioning, transition, auto hide, etc.\n * - `HvSnackbarContent`, which allows a finer control and customization of the content of the Snackbar.\n */\nexport const HvSnackbar = forwardRef<\n React.ComponentRef<typeof MuiSnackbar>,\n HvSnackbarProps\n>(function HvSnackbar(props, ref) {\n const {\n classes: classesProp,\n className,\n id,\n open = false,\n onClose,\n label = \"\",\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n autoHideDuration = 5000,\n variant = \"default\",\n showIcon = false,\n customIcon = null,\n action = null,\n actionCallback, // TODO - remove in v6\n onAction,\n transitionDuration = 300,\n transitionDirection = \"left\",\n container,\n offset = 60,\n snackbarContentProps,\n ...others\n } = useDefaultProps(\"HvSnackbar\", props);\n const { classes } = useClasses(classesProp);\n\n const anchorOriginOffset = {\n anchorOriginTop: {\n top: `${offset}px`,\n },\n anchorOriginBottom: {\n bottom: `${offset}px`,\n },\n };\n\n const SlideTransition = useCallback<\n NonNullable<MuiSnackbarProps[\"TransitionComponent\"]>\n >(\n (properties) => (\n <Slide\n {...properties}\n container={container}\n direction={transitionDirection}\n />\n ),\n [container, transitionDirection],\n );\n\n return (\n <MuiSnackbar\n ref={ref}\n style={\n anchorOriginOffset[`anchorOrigin${capitalize(anchorOrigin.vertical)}`]\n }\n classes={classes}\n className={className}\n id={id}\n anchorOrigin={anchorOrigin}\n open={open}\n onClose={onClose}\n autoHideDuration={autoHideDuration}\n transitionDuration={transitionDuration}\n TransitionComponent={SlideTransition}\n {...others}\n >\n <HvSnackbarContent\n id={setId(id, \"content\")}\n label={label}\n variant={variant}\n customIcon={customIcon}\n showIcon={showIcon}\n action={action}\n actionCallback={actionCallback}\n onAction={onAction}\n {...snackbarContentProps}\n />\n </MuiSnackbar>\n );\n});\n"],"names":["HvSnackbar","MuiSnackbar"],"mappings":";;;;;;;;;;AAoFO,MAAM,aAAa,WAGxB,SAASA,YAAW,OAAO,KAAK;AAC1B,QAAA;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,QAAQ;AAAA,IACR,eAAe,EAAE,UAAU,OAAO,YAAY,QAAQ;AAAA,IACtD,mBAAmB;AAAA,IACnB,UAAU;AAAA,IACV,WAAW;AAAA,IACX,aAAa;AAAA,IACb,SAAS;AAAA,IACT;AAAA;AAAA,IACA;AAAA,IACA,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,cAAc,KAAK;AACvC,QAAM,EAAE,QAAA,IAAY,WAAW,WAAW;AAE1C,QAAM,qBAAqB;AAAA,IACzB,iBAAiB;AAAA,MACf,KAAK,GAAG,MAAM;AAAA,IAChB;AAAA,IACA,oBAAoB;AAAA,MAClB,QAAQ,GAAG,MAAM;AAAA,IAAA;AAAA,EAErB;AAEA,QAAM,kBAAkB;AAAA,IAGtB,CAAC,eACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,CAAC,WAAW,mBAAmB;AAAA,EACjC;AAGE,SAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,OACE,mBAAmB,eAAe,WAAW,aAAa,QAAQ,CAAC,EAAE;AAAA,MAEvE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACpB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAI,MAAM,IAAI,SAAS;AAAA,UACvB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Snackbar.js","sources":["../../../src/Snackbar/Snackbar.tsx"],"sourcesContent":["import { forwardRef, useCallback } from \"react\";\nimport Slide, { SlideProps } from \"@mui/material/Slide\";\nimport MuiSnackbar, {\n SnackbarProps as MuiSnackbarProps,\n SnackbarCloseReason,\n SnackbarOrigin,\n} from \"@mui/material/Snackbar\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionGeneric, HvActionsGenericProps } from \"../ActionsGeneric\";\nimport { capitalize } from \"../utils/helpers\";\nimport { setId } from \"../utils/setId\";\nimport { staticClasses, useClasses } from \"./Snackbar.styles\";\nimport { HvSnackbarContent, HvSnackbarContentProps } from \"./SnackbarContent\";\nimport { HvSnackbarVariant } from \"./types\";\n\nexport { staticClasses as snackbarClasses };\n\nexport type HvSnackbarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSnackbarProps\n extends Omit<MuiSnackbarProps, \"action\" | \"classes\" | \"children\"> {\n /** If true, Snackbar is open. */\n open?: boolean;\n /**\n * Callback fired when the component requests to be closed.\n * Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop.\n * The reason parameter can optionally be used to control the response to onClose, for example ignoring click away.\n * */\n onClose?: (\n event: Event | React.SyntheticEvent<any, Event>,\n reason: SnackbarCloseReason,\n ) => void;\n /** The message to display. */\n label?: React.ReactNode;\n /**\n * The anchor of the Snackbar. vertical: \"top\", \"bottom\" | horizontal: \"left\", \"center\", \"right\".\n * It defines where the snackbar will end his animation */\n anchorOrigin?: SnackbarOrigin;\n /** 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 */\n autoHideDuration?: number;\n /** Variant of the snackbar. */\n variant?: HvSnackbarVariant;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Action to display. */\n action?: React.ReactNode | HvActionGeneric;\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** Duration of transition in milliseconds. */\n transitionDuration?: number;\n /** Direction of slide transition. */\n transitionDirection?: \"up\" | \"down\" | \"left\" | \"right\";\n /** The container the snackbar should slide from. */\n container?: SlideProps[\"container\"];\n /** Custom offset from top/bottom of the page, in px. */\n offset?: number;\n /** Others applied to the content of the snackbar. */\n snackbarContentProps?: HvSnackbarContentProps;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvSnackbarClasses;\n /** @ignore */\n ref?: MuiSnackbarProps[\"ref\"];\n}\n\n/**\n * A Snackbar provides brief messages about app processes.\n * It is dismissed automatically after a given interval.\n *\n * Snackbar can be built with two different components:\n * - `HvSnackbar`, which wraps all the positioning, transition, auto hide, etc.\n * - `HvSnackbarContent`, which allows a finer control and customization of the content of the Snackbar.\n */\nexport const HvSnackbar = forwardRef<\n React.ComponentRef<typeof MuiSnackbar>,\n HvSnackbarProps\n>(function HvSnackbar(props, ref) {\n const {\n classes: classesProp,\n className,\n id,\n open = false,\n onClose,\n label,\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n autoHideDuration = 5000,\n variant,\n showIcon,\n customIcon,\n action,\n actionCallback, // TODO - remove in v6\n onAction,\n transitionDuration = 300,\n transitionDirection = \"left\",\n container,\n offset = 60,\n snackbarContentProps,\n ...others\n } = useDefaultProps(\"HvSnackbar\", props);\n const { classes } = useClasses(classesProp);\n\n const anchorOriginOffset = {\n anchorOriginTop: {\n top: `${offset}px`,\n },\n anchorOriginBottom: {\n bottom: `${offset}px`,\n },\n };\n\n const SlideTransition = useCallback<\n NonNullable<MuiSnackbarProps[\"TransitionComponent\"]>\n >(\n (properties) => (\n <Slide\n {...properties}\n container={container}\n direction={transitionDirection}\n />\n ),\n [container, transitionDirection],\n );\n\n return (\n <MuiSnackbar\n ref={ref}\n style={\n anchorOriginOffset[`anchorOrigin${capitalize(anchorOrigin.vertical)}`]\n }\n classes={classes}\n className={className}\n id={id}\n anchorOrigin={anchorOrigin}\n open={open}\n onClose={onClose}\n autoHideDuration={autoHideDuration}\n transitionDuration={transitionDuration}\n TransitionComponent={SlideTransition}\n {...others}\n >\n <HvSnackbarContent\n id={setId(id, \"content\")}\n label={label}\n variant={variant}\n customIcon={customIcon}\n showIcon={showIcon}\n action={action}\n actionCallback={actionCallback}\n onAction={onAction}\n onClose={onClose}\n {...snackbarContentProps}\n />\n </MuiSnackbar>\n );\n});\n"],"names":["HvSnackbar","MuiSnackbar"],"mappings":";;;;;;;;;;AAoFO,MAAM,aAAa,WAGxB,SAASA,YAAW,OAAO,KAAK;AAC1B,QAAA;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,eAAe,EAAE,UAAU,OAAO,YAAY,QAAQ;AAAA,IACtD,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA,IACA,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,cAAc,KAAK;AACvC,QAAM,EAAE,QAAA,IAAY,WAAW,WAAW;AAE1C,QAAM,qBAAqB;AAAA,IACzB,iBAAiB;AAAA,MACf,KAAK,GAAG,MAAM;AAAA,IAChB;AAAA,IACA,oBAAoB;AAAA,MAClB,QAAQ,GAAG,MAAM;AAAA,IAAA;AAAA,EAErB;AAEA,QAAM,kBAAkB;AAAA,IAGtB,CAAC,eACC;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,CAAC,WAAW,mBAAmB;AAAA,EACjC;AAGE,SAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,OACE,mBAAmB,eAAe,WAAW,aAAa,QAAQ,CAAC,EAAE;AAAA,MAEvE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACpB,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAI,MAAM,IAAI,SAAS;AAAA,UACvB;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EACF;AAEJ,CAAC;"}
@@ -1,12 +1,10 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, isValidElement } from "react";
3
- import SnackbarContent from "@mui/material/SnackbarContent";
4
- import { useDefaultProps, useTheme } from "@hitachivantara/uikit-react-utils";
5
- import { iconVariant } from "../../utils/iconVariant.js";
6
- import { setId } from "../../utils/setId.js";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
4
+ import { HvCallout } from "../../utils/Callout.js";
7
5
  import { useClasses } from "./SnackbarContent.styles.js";
8
6
  import { staticClasses } from "./SnackbarContent.styles.js";
9
- import { HvActionsGeneric } from "../../ActionsGeneric/ActionsGeneric.js";
7
+ const isActionGeneric = (action) => action && typeof action === "object" && "id" in action && "label" in action;
10
8
  const HvSnackbarContent = forwardRef(function HvSnackbarContent2(props, ref) {
11
9
  const {
12
10
  className,
@@ -20,37 +18,33 @@ const HvSnackbarContent = forwardRef(function HvSnackbarContent2(props, ref) {
20
18
  actionCallback,
21
19
  // TODO - remove in v6
22
20
  onAction,
21
+ onClose,
23
22
  ...others
24
23
  } = useDefaultProps("HvSnackbarContent", props);
25
- const icon = customIcon || showIcon && iconVariant(variant, "base_dark");
26
- const innerAction = isValidElement(action) ? action : [action];
27
24
  const { classes, cx } = useClasses(classesProp);
28
- const { activeTheme } = useTheme();
29
25
  return /* @__PURE__ */ jsx(
30
- SnackbarContent,
26
+ HvCallout,
31
27
  {
32
28
  ref,
33
29
  id,
30
+ variant,
34
31
  classes: {
35
- root: classes.root,
36
- message: classes.message
32
+ root: cx(classes.root, classes[variant], className),
33
+ message: cx(classes.message, classes.messageSpan),
34
+ messageIcon: classes.iconVariant,
35
+ messageContent: classes.messageText,
36
+ action: classes.action
37
37
  },
38
- className: cx(classes?.[variant], className),
39
- message: /* @__PURE__ */ jsxs("div", { id: setId(id, "message"), className: classes.messageSpan, children: [
40
- icon && /* @__PURE__ */ jsx("div", { className: classes.iconVariant, children: icon }),
41
- /* @__PURE__ */ jsx("div", { className: classes.messageText, children: label }),
42
- action && /* @__PURE__ */ jsx("div", { id: setId(id, "action"), className: classes.action, children: /* @__PURE__ */ jsx(
43
- HvActionsGeneric,
44
- {
45
- id,
46
- variant: activeTheme?.snackbar.actionButtonVariant,
47
- actions: innerAction,
48
- actionsCallback: actionCallback,
49
- onAction
50
- }
51
- ) })
52
- ] }),
53
- ...others
38
+ showIcon,
39
+ customIcon,
40
+ actions: isActionGeneric(action) ? [action] : action,
41
+ onClose,
42
+ onAction: (evt, action2) => {
43
+ onAction?.(evt, action2);
44
+ actionCallback?.(evt, id, action2);
45
+ },
46
+ ...others,
47
+ children: label
54
48
  }
55
49
  );
56
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SnackbarContent.js","sources":["../../../../src/Snackbar/SnackbarContent/SnackbarContent.tsx"],"sourcesContent":["import { forwardRef, isValidElement } from \"react\";\nimport SnackbarContent, {\n SnackbarContentProps as MuiSnackbarContentProps,\n} from \"@mui/material/SnackbarContent\";\nimport {\n useDefaultProps,\n useTheme,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport {\n HvActionGeneric,\n HvActionsGeneric,\n HvActionsGenericProps,\n} from \"../../ActionsGeneric\";\nimport { HvButtonVariant } from \"../../Button\";\nimport { iconVariant } from \"../../utils/iconVariant\";\nimport { setId } from \"../../utils/setId\";\nimport { HvSnackbarVariant } from \"../types\";\nimport { staticClasses, useClasses } from \"./SnackbarContent.styles\";\n\nexport { staticClasses as snackbarContentClasses };\n\nexport type HvSnackbarContentClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvSnackbarContentProps\n extends Omit<MuiSnackbarContentProps, \"variant\" | \"action\" | \"classes\"> {\n /** The message to display. */\n label?: React.ReactNode;\n /** Variant of the snackbar. */\n variant?: HvSnackbarVariant;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Action to display. */\n action?: React.ReactNode | HvActionGeneric;\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvSnackbarContentClasses;\n}\n\nexport const HvSnackbarContent = forwardRef<\n HTMLDivElement,\n HvSnackbarContentProps\n>(function HvSnackbarContent(props, ref) {\n const {\n className,\n id,\n classes: classesProp,\n label,\n variant = \"default\",\n showIcon,\n customIcon,\n action,\n actionCallback, // TODO - remove in v6\n onAction,\n ...others\n } = useDefaultProps(\"HvSnackbarContent\", props);\n\n const icon = customIcon || (showIcon && iconVariant(variant, \"base_dark\"));\n const innerAction: any = isValidElement(action) ? action : [action];\n\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme } = useTheme();\n\n return (\n <SnackbarContent\n ref={ref}\n id={id}\n classes={{\n root: classes.root,\n message: classes.message,\n }}\n className={cx(classes?.[variant], className)}\n message={\n <div id={setId(id, \"message\")} className={classes.messageSpan}>\n {icon && <div className={classes.iconVariant}>{icon}</div>}\n <div className={classes.messageText}>{label}</div>\n {action && (\n <div id={setId(id, \"action\")} className={classes.action}>\n <HvActionsGeneric\n id={id}\n variant={\n activeTheme?.snackbar.actionButtonVariant as HvButtonVariant\n }\n actions={innerAction}\n actionsCallback={actionCallback}\n onAction={onAction}\n />\n </div>\n )}\n </div>\n }\n {...others}\n />\n );\n});\n"],"names":["HvSnackbarContent"],"mappings":";;;;;;;;;AAiDO,MAAM,oBAAoB,WAG/B,SAASA,mBAAkB,OAAO,KAAK;AACjC,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,qBAAqB,KAAK;AAE9C,QAAM,OAAO,cAAe,YAAY,YAAY,SAAS,WAAW;AACxE,QAAM,cAAmB,eAAe,MAAM,IAAI,SAAS,CAAC,MAAM;AAElE,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AACxC,QAAA,EAAE,YAAY,IAAI,SAAS;AAG/B,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP,MAAM,QAAQ;AAAA,QACd,SAAS,QAAQ;AAAA,MACnB;AAAA,MACA,WAAW,GAAG,UAAU,OAAO,GAAG,SAAS;AAAA,MAC3C,SACG,qBAAA,OAAA,EAAI,IAAI,MAAM,IAAI,SAAS,GAAG,WAAW,QAAQ,aAC/C,UAAA;AAAA,QAAA,QAAS,oBAAA,OAAA,EAAI,WAAW,QAAQ,aAAc,UAAK,MAAA;AAAA,QACnD,oBAAA,OAAA,EAAI,WAAW,QAAQ,aAAc,UAAM,OAAA;AAAA,QAC3C,UACE,oBAAA,OAAA,EAAI,IAAI,MAAM,IAAI,QAAQ,GAAG,WAAW,QAAQ,QAC/C,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC;AAAA,YACA,SACE,aAAa,SAAS;AAAA,YAExB,SAAS;AAAA,YACT,iBAAiB;AAAA,YACjB;AAAA,UAAA;AAAA,QAAA,EAEJ,CAAA;AAAA,MAAA,GAEJ;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ,CAAC;"}
1
+ {"version":3,"file":"SnackbarContent.js","sources":["../../../../src/Snackbar/SnackbarContent/SnackbarContent.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { type SnackbarProps as MuiSnackbarProps } from \"@mui/material/Snackbar\";\nimport { type SnackbarContentProps as MuiSnackbarContentProps } from \"@mui/material/SnackbarContent\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { HvActionGeneric, HvActionsGenericProps } from \"../../ActionsGeneric\";\nimport { HvCallout } from \"../../utils/Callout\";\nimport { HvSnackbarVariant } from \"../types\";\nimport { staticClasses, useClasses } from \"./SnackbarContent.styles\";\n\nexport { staticClasses as snackbarContentClasses };\n\nexport type HvSnackbarContentClasses = ExtractNames<typeof useClasses>;\n\nconst isActionGeneric = (action: any): action is HvActionGeneric =>\n action && typeof action === \"object\" && \"id\" in action && \"label\" in action;\n\nexport interface HvSnackbarContentProps\n extends Omit<MuiSnackbarContentProps, \"variant\" | \"action\" | \"classes\"> {\n /** The message to display. */\n label?: React.ReactNode;\n /** Variant of the snackbar. */\n variant?: HvSnackbarVariant;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n /** Action to display. */\n action?: React.ReactNode | HvActionGeneric;\n /**\n * The callback function called when an action is triggered, receiving `action` as parameter.\n *\n * @deprecated Use `onAction` instead.\n * */\n actionCallback?: HvActionsGenericProps[\"actionsCallback\"];\n /** The callback function called when an action is triggered, receiving `action` as parameter. */\n onAction?: HvActionsGenericProps[\"onAction\"];\n /** @inheritdoc */\n onClose?: MuiSnackbarProps[\"onClose\"];\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvSnackbarContentClasses;\n}\n\nexport const HvSnackbarContent = forwardRef<\n HTMLDivElement,\n HvSnackbarContentProps\n>(function HvSnackbarContent(props, ref) {\n const {\n className,\n id,\n classes: classesProp,\n label,\n variant = \"default\",\n showIcon,\n customIcon,\n action,\n actionCallback, // TODO - remove in v6\n onAction,\n onClose,\n ...others\n } = useDefaultProps(\"HvSnackbarContent\", props);\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <HvCallout\n ref={ref}\n id={id}\n variant={variant}\n classes={{\n root: cx(classes.root, classes[variant], className),\n message: cx(classes.message, classes.messageSpan),\n messageIcon: classes.iconVariant,\n messageContent: classes.messageText,\n action: classes.action,\n }}\n showIcon={showIcon}\n customIcon={customIcon}\n actions={isActionGeneric(action) ? [action] : action}\n onClose={onClose}\n onAction={(evt, action) => {\n onAction?.(evt, action);\n actionCallback?.(evt, id!, action);\n }}\n {...others}\n >\n {label}\n </HvCallout>\n );\n});\n"],"names":["HvSnackbarContent","action"],"mappings":";;;;;;AAiBA,MAAM,kBAAkB,CAAC,WACvB,UAAU,OAAO,WAAW,YAAY,QAAQ,UAAU,WAAW;AA4BhE,MAAM,oBAAoB,WAG/B,SAASA,mBAAkB,OAAO,KAAK;AACjC,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,qBAAqB,KAAK;AAC9C,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAG5C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP,MAAM,GAAG,QAAQ,MAAM,QAAQ,OAAO,GAAG,SAAS;AAAA,QAClD,SAAS,GAAG,QAAQ,SAAS,QAAQ,WAAW;AAAA,QAChD,aAAa,QAAQ;AAAA,QACrB,gBAAgB,QAAQ;AAAA,QACxB,QAAQ,QAAQ;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,gBAAgB,MAAM,IAAI,CAAC,MAAM,IAAI;AAAA,MAC9C;AAAA,MACA,UAAU,CAAC,KAAKC,YAAW;AACzB,mBAAW,KAAKA,OAAM;AACL,yBAAA,KAAK,IAAKA,OAAM;AAAA,MACnC;AAAA,MACC,GAAG;AAAA,MAEH,UAAA;AAAA,IAAA;AAAA,EACH;AAEJ,CAAC;"}
@@ -1,61 +1,31 @@
1
1
  import { createClasses } from "@hitachivantara/uikit-react-utils";
2
2
  import { theme } from "@hitachivantara/uikit-styles";
3
- import { staticClasses as staticClasses$1 } from "../../ActionsGeneric/ActionsGeneric.styles.js";
4
- const { useClasses, staticClasses } = createClasses(
5
- "HvSnackbar-Content",
6
- {
7
- root: {
8
- width: "310px",
9
- minHeight: "52px",
10
- maxHeight: "92px",
11
- padding: theme.space.xs,
12
- boxShadow: "none"
13
- },
14
- success: {
15
- backgroundColor: theme.colors.positive_20
16
- },
17
- error: {
18
- backgroundColor: theme.colors.negative_20
19
- },
20
- default: {
21
- backgroundColor: theme.colors.neutral_20
22
- },
23
- warning: {
24
- backgroundColor: theme.colors.warning_20
25
- },
26
- message: {
27
- padding: 0,
28
- width: "100%"
29
- },
30
- messageSpan: {
31
- display: "flex",
32
- alignItems: "center",
33
- minHeight: "32px"
34
- },
35
- messageText: {
36
- paddingLeft: theme.space.xs,
37
- color: theme.colors.base_dark,
38
- fontFamily: theme.fontFamily.body,
39
- maxHeight: "72px",
40
- wordBreak: "break-word",
41
- textWrap: "balance",
42
- overflow: "hidden"
43
- },
44
- action: {
45
- textAlign: "right",
46
- paddingLeft: theme.space.xs,
47
- marginLeft: "auto",
48
- [`& .${staticClasses$1.button}`]: {
49
- borderColor: theme.colors.base_dark,
50
- color: theme.colors.base_dark,
51
- "&:hover": {
52
- borderColor: theme.colors.base_dark
53
- }
54
- }
55
- },
56
- iconVariant: {}
57
- }
58
- );
3
+ const name = "HvSnackbarContent";
4
+ const { useClasses, staticClasses } = createClasses(name, {
5
+ root: {
6
+ width: "310px",
7
+ minHeight: "52px",
8
+ maxHeight: "92px",
9
+ padding: theme.space.xs
10
+ },
11
+ success: {},
12
+ error: {},
13
+ default: {},
14
+ warning: {},
15
+ message: {
16
+ padding: 0,
17
+ width: "100%",
18
+ minHeight: "32px"
19
+ },
20
+ action: {},
21
+ messageText: {
22
+ paddingLeft: theme.space.xs,
23
+ maxHeight: "72px"
24
+ },
25
+ iconVariant: {},
26
+ /** @deprecated use `classes.message` instead */
27
+ messageSpan: {}
28
+ });
59
29
  export {
60
30
  staticClasses,
61
31
  useClasses
@@ -1 +1 @@
1
- {"version":3,"file":"SnackbarContent.styles.js","sources":["../../../../src/Snackbar/SnackbarContent/SnackbarContent.styles.ts"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { actionsGenericClasses } from \"../../ActionsGeneric\";\n\nexport const { useClasses, staticClasses } = createClasses(\n \"HvSnackbar-Content\",\n {\n root: {\n width: \"310px\",\n minHeight: \"52px\",\n maxHeight: \"92px\",\n padding: theme.space.xs,\n boxShadow: \"none\",\n },\n success: {\n backgroundColor: theme.colors.positive_20,\n },\n error: {\n backgroundColor: theme.colors.negative_20,\n },\n default: {\n backgroundColor: theme.colors.neutral_20,\n },\n warning: {\n backgroundColor: theme.colors.warning_20,\n },\n message: {\n padding: 0,\n width: \"100%\",\n },\n messageSpan: {\n display: \"flex\",\n alignItems: \"center\",\n minHeight: \"32px\",\n },\n messageText: {\n paddingLeft: theme.space.xs,\n color: theme.colors.base_dark,\n fontFamily: theme.fontFamily.body,\n maxHeight: \"72px\",\n wordBreak: \"break-word\",\n textWrap: \"balance\",\n overflow: \"hidden\",\n },\n action: {\n textAlign: \"right\",\n paddingLeft: theme.space.xs,\n marginLeft: \"auto\",\n [`& .${actionsGenericClasses.button}`]: {\n borderColor: theme.colors.base_dark,\n color: theme.colors.base_dark,\n \"&:hover\": {\n borderColor: theme.colors.base_dark,\n },\n },\n },\n iconVariant: {},\n },\n);\n"],"names":["actionsGenericClasses"],"mappings":";;;AAKa,MAAA,EAAE,YAAY,cAAA,IAAkB;AAAA,EAC3C;AAAA,EACA;AAAA,IACE,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,WAAW;AAAA,MACX,SAAS,MAAM,MAAM;AAAA,MACrB,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,OAAO;AAAA,MACL,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,SAAS;AAAA,MACP,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,SAAS;AAAA,MACP,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,SAAS;AAAA,MACP,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA,aAAa;AAAA,MACX,aAAa,MAAM,MAAM;AAAA,MACzB,OAAO,MAAM,OAAO;AAAA,MACpB,YAAY,MAAM,WAAW;AAAA,MAC7B,WAAW;AAAA,MACX,WAAW;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,IACZ;AAAA,IACA,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,aAAa,MAAM,MAAM;AAAA,MACzB,YAAY;AAAA,MACZ,CAAC,MAAMA,gBAAsB,MAAM,EAAE,GAAG;AAAA,QACtC,aAAa,MAAM,OAAO;AAAA,QAC1B,OAAO,MAAM,OAAO;AAAA,QACpB,WAAW;AAAA,UACT,aAAa,MAAM,OAAO;AAAA,QAAA;AAAA,MAC5B;AAAA,IAEJ;AAAA,IACA,aAAa,CAAA;AAAA,EAAC;AAElB;"}
1
+ {"version":3,"file":"SnackbarContent.styles.js","sources":["../../../../src/Snackbar/SnackbarContent/SnackbarContent.styles.ts"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nconst name = \"HvSnackbarContent\";\nexport const { useClasses, staticClasses } = createClasses(name, {\n root: {\n width: \"310px\",\n minHeight: \"52px\",\n maxHeight: \"92px\",\n padding: theme.space.xs,\n },\n success: {},\n error: {},\n default: {},\n warning: {},\n message: {\n padding: 0,\n width: \"100%\",\n minHeight: \"32px\",\n },\n action: {},\n messageText: {\n paddingLeft: theme.space.xs,\n maxHeight: \"72px\",\n },\n iconVariant: {},\n /** @deprecated use `classes.message` instead */\n messageSpan: {},\n});\n"],"names":[],"mappings":";;AAGA,MAAM,OAAO;AACN,MAAM,EAAE,YAAY,kBAAkB,cAAc,MAAM;AAAA,EAC/D,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,WAAW;AAAA,IACX,SAAS,MAAM,MAAM;AAAA,EACvB;AAAA,EACA,SAAS,CAAC;AAAA,EACV,OAAO,CAAC;AAAA,EACR,SAAS,CAAC;AAAA,EACV,SAAS,CAAC;AAAA,EACV,SAAS;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,QAAQ,CAAC;AAAA,EACT,aAAa;AAAA,IACX,aAAa,MAAM,MAAM;AAAA,IACzB,WAAW;AAAA,EACb;AAAA,EACA,aAAa,CAAC;AAAA;AAAA,EAEd,aAAa,CAAA;AACf,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../../src/Table/Table.tsx"],"sourcesContent":["import { forwardRef, useMemo, useRef } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./Table.styles\";\nimport TableContext from \"./TableContext\";\n\nexport { staticClasses as tableClasses };\n\nexport type HvTableClasses = ExtractNames<typeof useClasses>;\n\nexport type HvTableVariant = \"listrow\" | \"default\";\nexport type HvTableCellAlign =\n | \"center\"\n | \"inherit\"\n | \"justify\"\n | \"left\"\n | \"right\";\nexport type HvTableCellType = \"body\" | \"footer\" | \"head\";\nexport type HvTableCellVariant =\n | \"checkbox\"\n | \"expand\"\n | \"actions\"\n | \"default\"\n | \"none\";\n\nexport interface HvTableProps\n extends React.TableHTMLAttributes<HTMLTableElement> {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component?: React.ElementType;\n /** Content to be rendered */\n children: React.ReactNode;\n /** Whether the `HvTable` has a sticky header row. */\n stickyHeader?: boolean;\n /** Whether the `HvTable` has sticky columns. */\n stickyColumns?: boolean;\n /** Whether the `HvTable` has the list row styles or the default. */\n variant?: HvTableVariant;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTableClasses;\n}\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent: React.ElementType<any>) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A table gathers relational data. It displays values arranged to allow quick numerical analysis like comparison and sorting.\n *\n * The **HvTable** component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection.\n * See the <a href=\"?id=guides-table-table-hooks--use-hv-hooks&viewMode=docs\" target=\"_self\">Table Hooks documentation</a> for more details.\n */\nexport const HvTable = forwardRef<\n // no-indent\n HTMLElement,\n HvTableProps\n>(function HvTable(props, ref) {\n const {\n classes: classesProp,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n variant = \"default\",\n ...others\n } = useDefaultProps(\"HvTable\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const containerRef = useRef(ref);\n\n const components = useMemo(\n () => computeTablePartComponents(component),\n [component],\n );\n\n const tableContext = useMemo(\n () => ({ components, variant, containerRef }),\n [components, variant, containerRef],\n );\n\n const Table = useMemo(() => components.Table, [components]);\n\n return (\n <TableContext.Provider value={tableContext}>\n <Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={cx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n [classes.listRow]: variant === \"listrow\",\n },\n className,\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n"],"names":["HvTable"],"mappings":";;;;;;AAiDA,MAAM,mBAAmB;AAEzB,MAAM,6BAA6B,CAAC,kBAA0C;AAC5E,MAAI,kBAAkB,SAAS;AACtB,WAAA;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EAAA;AAGK,SAAA;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACF;AAYO,MAAM,UAAU,WAIrB,SAASA,SAAQ,OAAO,KAAK;AACvB,QAAA;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,IACD,gBAAgB,WAAW,KAAK;AACpC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,eAAe,OAAO,GAAG;AAE/B,QAAM,aAAa;AAAA,IACjB,MAAM,2BAA2B,SAAS;AAAA,IAC1C,CAAC,SAAS;AAAA,EACZ;AAEA,QAAM,eAAe;AAAA,IACnB,OAAO,EAAE,YAAY,SAAS;IAC9B,CAAC,YAAY,SAAS,YAAY;AAAA,EACpC;AAEA,QAAM,QAAQ,QAAQ,MAAM,WAAW,OAAO,CAAC,UAAU,CAAC;AAE1D,SACG,oBAAA,aAAa,UAAb,EAAsB,OAAO,cAC5B,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAM,cAAc,mBAAmB,OAAO;AAAA,MAC9C,WAAW;AAAA,QACT,QAAQ;AAAA,QACR;AAAA,UACE,CAAC,QAAQ,YAAY,GAAG;AAAA,UACxB,CAAC,QAAQ,aAAa,GAAG;AAAA,UACzB,CAAC,QAAQ,OAAO,GAAG,YAAY;AAAA,QACjC;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Table.js","sources":["../../../src/Table/Table.tsx"],"sourcesContent":["import { forwardRef, useMemo, useRef } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { staticClasses, useClasses } from \"./Table.styles\";\nimport TableContext from \"./TableContext\";\n\nexport { staticClasses as tableClasses };\n\nexport type HvTableClasses = ExtractNames<typeof useClasses>;\n\nexport type HvTableVariant = \"listrow\" | \"default\";\nexport type HvTableCellAlign =\n | \"center\"\n | \"inherit\"\n | \"justify\"\n | \"left\"\n | \"right\";\nexport type HvTableCellType = \"body\" | \"footer\" | \"head\";\nexport type HvTableCellVariant =\n | \"checkbox\"\n | \"expand\"\n | \"actions\"\n | \"default\"\n | \"none\";\n\nexport interface HvTableProps\n extends React.TableHTMLAttributes<HTMLTableElement> {\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `table`.\n *\n * When using non-table elements, layout is up to the developer using the component.\n */\n component?: React.ElementType;\n /** Content to be rendered */\n children: React.ReactNode;\n /** Whether the `HvTable` has a sticky header row. */\n stickyHeader?: boolean;\n /** Whether the `HvTable` has sticky columns. */\n stickyColumns?: boolean;\n /** Whether the `HvTable` has the list row styles or the default. */\n variant?: HvTableVariant;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTableClasses;\n}\n\nconst defaultComponent = \"table\";\n\nconst computeTablePartComponents = (rootComponent: React.ElementType<any>) => {\n if (rootComponent === \"table\") {\n return {\n Table: \"table\",\n THead: \"thead\",\n TBody: \"tbody\",\n Tr: \"tr\",\n Th: \"th\",\n Td: \"td\",\n };\n }\n\n return {\n Table: rootComponent,\n THead: rootComponent,\n TBody: rootComponent,\n Tr: rootComponent,\n Th: rootComponent,\n Td: rootComponent,\n };\n};\n\n/**\n * A table gathers relational data. It displays values arranged to allow quick numerical analysis like comparison and sorting.\n *\n * The `HvTable` component offers a set of HTML-equivalent elements, **styled to Design System's specification**,\n * for building tables.\n * You can rely on these **elements** when your table doesn’t have many interactions or you need it to be very lightweight.\n *\n * For better data handling and **advanced features** we recommend the use of the utility hooks collection.\n * See the [Table Hooks documentation](https://lumada-design.github.io/uikit/master/?path=/docs/visualizations-table-table-hooks--docs) for more details.\n */\nexport const HvTable = forwardRef<\n // no-indent\n HTMLElement,\n HvTableProps\n>(function HvTable(props, ref) {\n const {\n classes: classesProp,\n className,\n component = defaultComponent,\n stickyHeader = false,\n stickyColumns = false,\n variant = \"default\",\n ...others\n } = useDefaultProps(\"HvTable\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const containerRef = useRef(ref);\n\n const components = useMemo(\n () => computeTablePartComponents(component),\n [component],\n );\n\n const tableContext = useMemo(\n () => ({ components, variant, containerRef }),\n [components, variant, containerRef],\n );\n\n const Table = useMemo(() => components.Table, [components]);\n\n return (\n <TableContext.Provider value={tableContext}>\n <Table\n ref={ref}\n role={component === defaultComponent ? null : \"table\"}\n className={cx(\n classes.root,\n {\n [classes.stickyHeader]: stickyHeader,\n [classes.stickyColumns]: stickyColumns,\n [classes.listRow]: variant === \"listrow\",\n },\n className,\n )}\n {...others}\n />\n </TableContext.Provider>\n );\n});\n"],"names":["HvTable"],"mappings":";;;;;;AAiDA,MAAM,mBAAmB;AAEzB,MAAM,6BAA6B,CAAC,kBAA0C;AAC5E,MAAI,kBAAkB,SAAS;AACtB,WAAA;AAAA,MACL,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EAAA;AAGK,SAAA;AAAA,IACL,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACF;AAYO,MAAM,UAAU,WAIrB,SAASA,SAAQ,OAAO,KAAK;AACvB,QAAA;AAAA,IACJ,SAAS;AAAA,IACT;AAAA,IACA,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,GAAG;AAAA,EAAA,IACD,gBAAgB,WAAW,KAAK;AACpC,QAAM,EAAE,SAAS,OAAO,WAAW,WAAW;AAExC,QAAA,eAAe,OAAO,GAAG;AAE/B,QAAM,aAAa;AAAA,IACjB,MAAM,2BAA2B,SAAS;AAAA,IAC1C,CAAC,SAAS;AAAA,EACZ;AAEA,QAAM,eAAe;AAAA,IACnB,OAAO,EAAE,YAAY,SAAS;IAC9B,CAAC,YAAY,SAAS,YAAY;AAAA,EACpC;AAEA,QAAM,QAAQ,QAAQ,MAAM,WAAW,OAAO,CAAC,UAAU,CAAC;AAE1D,SACG,oBAAA,aAAa,UAAb,EAAsB,OAAO,cAC5B,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAM,cAAc,mBAAmB,OAAO;AAAA,MAC9C,WAAW;AAAA,QACT,QAAQ;AAAA,QACR;AAAA,UACE,CAAC,QAAQ,YAAY,GAAG;AAAA,UACxB,CAAC,QAAQ,aAAa,GAAG;AAAA,UACzB,CAAC,QAAQ,OAAO,GAAG,YAAY;AAAA,QACjC;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ,CAAC;"}
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
4
- import { useUniqueId } from "../hooks/useUniqueId.js";
4
+ import { useUniqueId } from "../../hooks/useUniqueId.js";
5
5
  import { useClasses } from "./TableSection.styles.js";
6
6
  import { staticClasses } from "./TableSection.styles.js";
7
- import { HvSection } from "../Section/Section.js";
7
+ import { HvSection } from "../../Section/Section.js";
8
8
  const HvTableSection = forwardRef(
9
9
  function HvTableSection2(props, ref) {
10
10
  const {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSection.js","sources":["../../../../src/Table/TableSection/TableSection.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n useDefaultProps,\n type ExtractNames,\n} from \"@hitachivantara/uikit-react-utils\";\n\nimport { useUniqueId } from \"../../hooks/useUniqueId\";\nimport { HvSection, HvSectionProps } from \"../../Section\";\nimport { staticClasses, useClasses } from \"./TableSection.styles\";\n\nexport { staticClasses as tableSectionClasses };\n\nexport type HvTableSectionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTableSectionProps extends HvSectionProps {}\n\n/**\n * The `TableSection` component is a wrapper for the `Section` component that applies\n * specific stylings for tables that follow the latest DS specifications.\n */\nexport const HvTableSection = forwardRef<HTMLDivElement, HvTableSectionProps>(\n function HvTableSection(props, ref) {\n const {\n id,\n classes: classesProp,\n children,\n ...others\n } = useDefaultProps(\"HvTableSection\", props);\n\n const { classes } = useClasses(classesProp);\n const elementId = useUniqueId(id);\n\n return (\n <HvSection id={elementId} ref={ref} classes={classes} {...others}>\n {children}\n </HvSection>\n );\n },\n);\n"],"names":["HvTableSection"],"mappings":";;;;;;;AAoBO,MAAM,iBAAiB;AAAA,EAC5B,SAASA,gBAAe,OAAO,KAAK;AAC5B,UAAA;AAAA,MACJ;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA,GAAG;AAAA,IAAA,IACD,gBAAgB,kBAAkB,KAAK;AAE3C,UAAM,EAAE,QAAA,IAAY,WAAW,WAAW;AACpC,UAAA,YAAY,YAAY,EAAE;AAG9B,WAAA,oBAAC,aAAU,IAAI,WAAW,KAAU,SAAmB,GAAG,QACvD,UACH;AAAA,EAAA;AAGN;"}
@@ -1,17 +1,17 @@
1
1
  import { createClasses } from "@hitachivantara/uikit-react-utils";
2
2
  import { theme } from "@hitachivantara/uikit-styles";
3
- import { staticClasses as staticClasses$1 } from "../Pagination/Pagination.styles.js";
4
- import "../Pagination/Pagination.js";
5
- import { staticClasses as staticClasses$2 } from "../BulkActions/BulkActions.styles.js";
6
- import "../BulkActions/BulkActions.js";
7
- import { staticClasses as staticClasses$3 } from "../Table/TableCell/TableCell.styles.js";
8
- import "../Table/TableCell/TableCell.js";
9
- import { staticClasses as staticClasses$4 } from "../Table/TableRow/TableRow.styles.js";
10
- import "../Table/TableRow/TableRow.js";
11
- import { staticClasses as staticClasses$5 } from "../Table/TableHeader/TableHeader.styles.js";
12
- import "../Table/TableHeader/TableHeader.js";
13
- import { staticClasses as staticClasses$6 } from "../Table/TableContainer/TableContainer.styles.js";
14
- import "../Table/TableContainer/TableContainer.js";
3
+ import { staticClasses as staticClasses$1 } from "../../Pagination/Pagination.styles.js";
4
+ import "../../Pagination/Pagination.js";
5
+ import { staticClasses as staticClasses$2 } from "../../BulkActions/BulkActions.styles.js";
6
+ import "../../BulkActions/BulkActions.js";
7
+ import { staticClasses as staticClasses$3 } from "../TableCell/TableCell.styles.js";
8
+ import "../TableCell/TableCell.js";
9
+ import { staticClasses as staticClasses$4 } from "../TableRow/TableRow.styles.js";
10
+ import "../TableRow/TableRow.js";
11
+ import { staticClasses as staticClasses$5 } from "../TableHeader/TableHeader.styles.js";
12
+ import "../TableHeader/TableHeader.js";
13
+ import { staticClasses as staticClasses$6 } from "../TableContainer/TableContainer.styles.js";
14
+ import "../TableContainer/TableContainer.js";
15
15
  const { staticClasses, useClasses } = createClasses("HvTableSection", {
16
16
  root: {},
17
17
  header: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableSection.styles.js","sources":["../../../../src/Table/TableSection/TableSection.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { bulkActionsClasses } from \"../../BulkActions\";\nimport { paginationClasses } from \"../../Pagination\";\nimport { tableCellClasses } from \"../TableCell\";\nimport { tableContainerClasses } from \"../TableContainer\";\nimport { tableHeaderClasses } from \"../TableHeader\";\nimport { tableRowClasses } from \"../TableRow\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTableSection\", {\n root: {},\n header: {\n // Only apply the border to divide the header and content when both are displayed\n \"+ div\": {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n },\n },\n actions: {},\n content: {\n marginTop: 0,\n padding: 0,\n\n // Apply border radius to the first child if there's not an header\n \"&:first-of-type\": {\n \"& > :first-of-type\": {\n borderTopLeftRadius: \"inherit\",\n borderTopRightRadius: \"inherit\",\n },\n },\n\n \"& > :last-child\": {\n borderBottomLeftRadius: \"inherit\",\n borderBottomRightRadius: \"inherit\",\n },\n\n [`& .${tableContainerClasses.root}`]: {\n paddingBottom: 0,\n borderTopLeftRadius: \"inherit\",\n borderTopRightRadius: \"inherit\",\n },\n\n [`& .${tableHeaderClasses.head}`]: {\n backgroundColor: theme.colors.atmo2,\n borderBottomColor: theme.colors.atmo3,\n [`&.${tableHeaderClasses.variantCheckbox}`]: {\n borderRight: \"none\",\n },\n [`&.${tableHeaderClasses.variantActions}`]: {\n borderLeft: \"none\",\n },\n },\n\n // Remove border for the last table row\n [`& .${tableRowClasses.root}`]: {\n \"&:last-child\": {\n [`& .${tableCellClasses.root}`]: { borderBottom: \"none\" },\n },\n },\n\n [`& .${tableCellClasses.root}`]: {\n borderBottomColor: theme.colors.atmo3,\n },\n\n [`& .${tableCellClasses.variantCheckbox}`]: {\n borderRight: \"none\",\n },\n\n [`& .${tableCellClasses.variantActions}`]: {\n borderLeft: \"none\",\n },\n\n [`& .${bulkActionsClasses.root}`]: {\n marginBottom: 0,\n border: \"none\",\n borderBottom: `1px solid ${theme.colors.atmo3}`,\n padding: theme.spacing(\"xs\", \"sm\"),\n },\n\n [`& .${paginationClasses.root}`]: {\n margin: 0,\n backgroundColor: theme.colors.atmo2,\n padding: theme.space.xs,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n borderBottomLeftRadius: \"inherit\",\n borderBottomRightRadius: \"inherit\",\n },\n\n [`& .${paginationClasses.pageSizeOptions}`]: {\n left: theme.space.sm,\n },\n [`& .${paginationClasses.pageSizeHeader}`]: {\n border: \"none\",\n \"&:hover\": {\n border: \"none\",\n },\n },\n },\n hidden: {},\n raisedHeader: {\n \"& $content\": {\n paddingTop: 0,\n },\n },\n hasHeader: {},\n /** @deprecated use `hasHeader` instead */\n spaceTop: {},\n});\n"],"names":["tableContainerClasses","tableHeaderClasses","tableRowClasses","tableCellClasses","bulkActionsClasses","paginationClasses"],"mappings":";;;;;;;;;;;;;;AAUO,MAAM,EAAE,eAAe,eAAe,cAAc,kBAAkB;AAAA,EAC3E,MAAM,CAAC;AAAA,EACP,QAAQ;AAAA;AAAA,IAEN,SAAS;AAAA,MACP,qBAAqB;AAAA,MACrB,sBAAsB;AAAA,IAAA;AAAA,EAE1B;AAAA,EACA,SAAS,CAAC;AAAA,EACV,SAAS;AAAA,IACP,WAAW;AAAA,IACX,SAAS;AAAA;AAAA,IAGT,mBAAmB;AAAA,MACjB,sBAAsB;AAAA,QACpB,qBAAqB;AAAA,QACrB,sBAAsB;AAAA,MAAA;AAAA,IAE1B;AAAA,IAEA,mBAAmB;AAAA,MACjB,wBAAwB;AAAA,MACxB,yBAAyB;AAAA,IAC3B;AAAA,IAEA,CAAC,MAAMA,gBAAsB,IAAI,EAAE,GAAG;AAAA,MACpC,eAAe;AAAA,MACf,qBAAqB;AAAA,MACrB,sBAAsB;AAAA,IACxB;AAAA,IAEA,CAAC,MAAMC,gBAAmB,IAAI,EAAE,GAAG;AAAA,MACjC,iBAAiB,MAAM,OAAO;AAAA,MAC9B,mBAAmB,MAAM,OAAO;AAAA,MAChC,CAAC,KAAKA,gBAAmB,eAAe,EAAE,GAAG;AAAA,QAC3C,aAAa;AAAA,MACf;AAAA,MACA,CAAC,KAAKA,gBAAmB,cAAc,EAAE,GAAG;AAAA,QAC1C,YAAY;AAAA,MAAA;AAAA,IAEhB;AAAA;AAAA,IAGA,CAAC,MAAMC,gBAAgB,IAAI,EAAE,GAAG;AAAA,MAC9B,gBAAgB;AAAA,QACd,CAAC,MAAMC,gBAAiB,IAAI,EAAE,GAAG,EAAE,cAAc,OAAO;AAAA,MAAA;AAAA,IAE5D;AAAA,IAEA,CAAC,MAAMA,gBAAiB,IAAI,EAAE,GAAG;AAAA,MAC/B,mBAAmB,MAAM,OAAO;AAAA,IAClC;AAAA,IAEA,CAAC,MAAMA,gBAAiB,eAAe,EAAE,GAAG;AAAA,MAC1C,aAAa;AAAA,IACf;AAAA,IAEA,CAAC,MAAMA,gBAAiB,cAAc,EAAE,GAAG;AAAA,MACzC,YAAY;AAAA,IACd;AAAA,IAEA,CAAC,MAAMC,gBAAmB,IAAI,EAAE,GAAG;AAAA,MACjC,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,cAAc,aAAa,MAAM,OAAO,KAAK;AAAA,MAC7C,SAAS,MAAM,QAAQ,MAAM,IAAI;AAAA,IACnC;AAAA,IAEA,CAAC,MAAMC,gBAAkB,IAAI,EAAE,GAAG;AAAA,MAChC,QAAQ;AAAA,MACR,iBAAiB,MAAM,OAAO;AAAA,MAC9B,SAAS,MAAM,MAAM;AAAA,MACrB,WAAW,aAAa,MAAM,OAAO,KAAK;AAAA,MAC1C,wBAAwB;AAAA,MACxB,yBAAyB;AAAA,IAC3B;AAAA,IAEA,CAAC,MAAMA,gBAAkB,eAAe,EAAE,GAAG;AAAA,MAC3C,MAAM,MAAM,MAAM;AAAA,IACpB;AAAA,IACA,CAAC,MAAMA,gBAAkB,cAAc,EAAE,GAAG;AAAA,MAC1C,QAAQ;AAAA,MACR,WAAW;AAAA,QACT,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EAEJ;AAAA,EACA,QAAQ,CAAC;AAAA,EACT,cAAc;AAAA,IACZ,cAAc;AAAA,MACZ,YAAY;AAAA,IAAA;AAAA,EAEhB;AAAA,EACA,WAAW,CAAC;AAAA;AAAA,EAEZ,UAAU,CAAA;AACZ,CAAC;"}
@@ -1,7 +1,6 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { DropDownXS } from "@hitachivantara/uikit-react-icons";
3
3
  import { useLabels } from "../../hooks/useLabels.js";
4
- import { DefaultCell } from "../renderers/DefaultCell.js";
5
4
  import { HvButton } from "../../Button/Button.js";
6
5
  import { HvTypography } from "../../Typography/Typography.js";
7
6
  const DEFAULT_LABELS = {
@@ -34,11 +33,12 @@ const visibleColumnsHook = (columns, { instance }) => {
34
33
  return columns;
35
34
  }
36
35
  const firstDataColumnIndex = columns.findIndex(
37
- (c) => c.id?.indexOf("_hv_") !== 0
36
+ (c) => !c.id?.startsWith("_hv_")
38
37
  );
39
38
  if (firstDataColumnIndex !== -1) {
40
39
  const firstDataColumn = columns[firstDataColumnIndex];
41
- if (firstDataColumn.Cell == null || firstDataColumn.Cell !== DefaultCell) {
40
+ if (firstDataColumn.Cell === CellWithExpandButton) return columns;
41
+ if (firstDataColumn.Cell == null) {
42
42
  firstDataColumn.Cell = CellWithExpandButton;
43
43
  firstDataColumn.variant = "expand";
44
44
  return columns;
@@ -1 +1 @@
1
- {"version":3,"file":"useHvRowExpand.js","sources":["../../../../src/Table/hooks/useHvRowExpand.tsx"],"sourcesContent":["import {\n Hooks,\n TableExpandedToggleProps,\n UseExpandedRowProps,\n} from \"react-table\";\nimport { DropDownXS } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvButton } from \"../../Button\";\nimport { useLabels } from \"../../hooks/useLabels\";\nimport { HvTypography } from \"../../Typography\";\nimport { DefaultCell } from \"../renderers/DefaultCell\";\nimport type { HvCellProps } from \"./useHvTable\";\n\n// #region ##### TYPES #####\n\nexport interface UseHvRowExpandTableRowProps {\n expanded?: boolean;\n}\n\nexport type UseHvRowExpandTableOptions = {\n disableCreateExpandButton?: boolean;\n};\n\nexport interface UseHvRowExpandRowToggleProps extends TableExpandedToggleProps {\n onClick?: React.MouseEventHandler<unknown>;\n}\n\nexport interface UseHvRowExpandRowInstance<\n D extends object = Record<string, unknown>,\n> extends UseExpandedRowProps<D> {\n getToggleRowExpandedProps: (\n props?: Partial<TableExpandedToggleProps>,\n ) => UseHvRowExpandRowToggleProps;\n}\n\nexport type UseRowExpandProps = (<D extends object = Record<string, unknown>>(\n hooks: Hooks<D>,\n) => void) & { pluginName: string };\n\n// #endregion ##### TYPES #####\n\nconst DEFAULT_LABELS = {\n expandRowButtonAriaLabel: \"Expand this row\",\n collapseRowButtonAriaLabel: \"Collapse this row\",\n};\n\nexport const CellWithExpandButton = ({\n row,\n cell,\n labels: labelsProp,\n}: HvCellProps<any>) => {\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n const rowProps = row.getToggleRowExpandedProps?.();\n\n return (\n <>\n <HvButton\n icon\n aria-label={\n row.isExpanded\n ? labels.collapseRowButtonAriaLabel\n : labels.expandRowButtonAriaLabel\n }\n aria-expanded={row.isExpanded}\n onClick={rowProps?.onClick}\n >\n <DropDownXS rotate={row.isExpanded} />\n </HvButton>\n {cell?.value && (\n <HvTypography variant=\"label\" component=\"span\">\n {cell.value}\n </HvTypography>\n )}\n </>\n );\n};\n\nconst visibleColumnsHook = (columns: any, { instance }: any) => {\n if (instance.disableCreateExpandButton) {\n return columns;\n }\n\n // add a button to first data column, unless it has a custom renderer\n // if so, add an extra column instead\n const firstDataColumnIndex = columns.findIndex(\n (c: any) => c.id?.indexOf(\"_hv_\") !== 0,\n );\n\n if (firstDataColumnIndex !== -1) {\n const firstDataColumn = columns[firstDataColumnIndex];\n\n if (firstDataColumn.Cell == null || firstDataColumn.Cell !== DefaultCell) {\n firstDataColumn.Cell = CellWithExpandButton;\n firstDataColumn.variant = \"expand\";\n\n return columns;\n }\n }\n\n const expandColumn = {\n id: \"_hv_expand\",\n variant: \"none\",\n\n width: 32,\n\n // this will only work when using useHvTableSticky\n // but ensures it stays left of any sticky column\n sticky: \"left\",\n\n Cell: CellWithExpandButton,\n };\n\n const columnsCopy = [...columns];\n columnsCopy.splice(\n firstDataColumnIndex !== -1 ? firstDataColumnIndex : 0,\n 0,\n expandColumn,\n );\n\n return columnsCopy;\n};\n\nconst getRowPropsHook = (props: any, { row }: any) => {\n const nextProps: UseHvRowExpandTableRowProps = {\n expanded: row.isExpanded,\n };\n\n return [props, nextProps];\n};\n\nexport const useHvRowExpand: UseRowExpandProps = (hooks) => {\n hooks.visibleColumns.push(visibleColumnsHook);\n hooks.getRowProps.push(getRowPropsHook);\n};\nuseHvRowExpand.pluginName = \"useHvRowExpand\";\n"],"names":[],"mappings":";;;;;;AAyCA,MAAM,iBAAiB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,4BAA4B;AAC9B;AAEO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAwB;AAChB,QAAA,SAAS,UAAU,gBAAgB,UAAU;AAC7C,QAAA,WAAW,IAAI,4BAA4B;AAEjD,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAI;AAAA,QACJ,cACE,IAAI,aACA,OAAO,6BACP,OAAO;AAAA,QAEb,iBAAe,IAAI;AAAA,QACnB,SAAS,UAAU;AAAA,QAEnB,UAAC,oBAAA,YAAA,EAAW,QAAQ,IAAI,WAAY,CAAA;AAAA,MAAA;AAAA,IACtC;AAAA,IACC,MAAM,SACJ,oBAAA,cAAA,EAAa,SAAQ,SAAQ,WAAU,QACrC,UAAA,KAAK,MACR,CAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA,MAAM,qBAAqB,CAAC,SAAc,EAAE,eAAoB;AAC9D,MAAI,SAAS,2BAA2B;AAC/B,WAAA;AAAA,EAAA;AAKT,QAAM,uBAAuB,QAAQ;AAAA,IACnC,CAAC,MAAW,EAAE,IAAI,QAAQ,MAAM,MAAM;AAAA,EACxC;AAEA,MAAI,yBAAyB,IAAI;AACzB,UAAA,kBAAkB,QAAQ,oBAAoB;AAEpD,QAAI,gBAAgB,QAAQ,QAAQ,gBAAgB,SAAS,aAAa;AACxE,sBAAgB,OAAO;AACvB,sBAAgB,UAAU;AAEnB,aAAA;AAAA,IAAA;AAAA,EACT;AAGF,QAAM,eAAe;AAAA,IACnB,IAAI;AAAA,IACJ,SAAS;AAAA,IAET,OAAO;AAAA;AAAA;AAAA,IAIP,QAAQ;AAAA,IAER,MAAM;AAAA,EACR;AAEM,QAAA,cAAc,CAAC,GAAG,OAAO;AACnB,cAAA;AAAA,IACV,yBAAyB,KAAK,uBAAuB;AAAA,IACrD;AAAA,IACA;AAAA,EACF;AAEO,SAAA;AACT;AAEA,MAAM,kBAAkB,CAAC,OAAY,EAAE,UAAe;AACpD,QAAM,YAAyC;AAAA,IAC7C,UAAU,IAAI;AAAA,EAChB;AAEO,SAAA,CAAC,OAAO,SAAS;AAC1B;AAEa,MAAA,iBAAoC,CAAC,UAAU;AACpD,QAAA,eAAe,KAAK,kBAAkB;AACtC,QAAA,YAAY,KAAK,eAAe;AACxC;AACA,eAAe,aAAa;"}
1
+ {"version":3,"file":"useHvRowExpand.js","sources":["../../../../src/Table/hooks/useHvRowExpand.tsx"],"sourcesContent":["import type {\n Hooks,\n TableExpandedToggleProps,\n UseExpandedRowProps,\n} from \"react-table\";\nimport { DropDownXS } from \"@hitachivantara/uikit-react-icons\";\n\nimport { HvButton } from \"../../Button\";\nimport { useLabels } from \"../../hooks/useLabels\";\nimport { HvTypography } from \"../../Typography\";\nimport type { HvCellProps, HvColumnInstance } from \"./useHvTable\";\n\n// #region ##### TYPES #####\n\nexport interface UseHvRowExpandTableRowProps {\n expanded?: boolean;\n}\n\nexport type UseHvRowExpandTableOptions = {\n disableCreateExpandButton?: boolean;\n};\n\nexport interface UseHvRowExpandRowToggleProps extends TableExpandedToggleProps {\n onClick?: React.MouseEventHandler<unknown>;\n}\n\nexport interface UseHvRowExpandRowInstance<\n D extends object = Record<string, unknown>,\n> extends UseExpandedRowProps<D> {\n getToggleRowExpandedProps: (\n props?: Partial<TableExpandedToggleProps>,\n ) => UseHvRowExpandRowToggleProps;\n}\n\nexport type UseRowExpandProps = (<D extends object = Record<string, unknown>>(\n hooks: Hooks<D>,\n) => void) & { pluginName: string };\n\n// #endregion ##### TYPES #####\n\nconst DEFAULT_LABELS = {\n expandRowButtonAriaLabel: \"Expand this row\",\n collapseRowButtonAriaLabel: \"Collapse this row\",\n};\n\nexport const CellWithExpandButton = ({\n row,\n cell,\n labels: labelsProp,\n}: HvCellProps<any>) => {\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n const rowProps = row.getToggleRowExpandedProps?.();\n\n return (\n <>\n <HvButton\n icon\n aria-label={\n row.isExpanded\n ? labels.collapseRowButtonAriaLabel\n : labels.expandRowButtonAriaLabel\n }\n aria-expanded={row.isExpanded}\n onClick={rowProps?.onClick}\n >\n <DropDownXS rotate={row.isExpanded} />\n </HvButton>\n {cell?.value && (\n <HvTypography variant=\"label\" component=\"span\">\n {cell.value}\n </HvTypography>\n )}\n </>\n );\n};\n\nconst visibleColumnsHook = (columns: any, { instance }: any) => {\n if (instance.disableCreateExpandButton) {\n return columns;\n }\n\n // add a button to first data column, or an extra column for non-default renderers\n const firstDataColumnIndex = (columns as HvColumnInstance<any>[]).findIndex(\n (c) => !c.id?.startsWith(\"_hv_\"),\n );\n\n if (firstDataColumnIndex !== -1) {\n const firstDataColumn = columns[firstDataColumnIndex];\n\n // keep columns if CellWithExpandButton has already been added\n if (firstDataColumn.Cell === CellWithExpandButton) return columns;\n\n if (firstDataColumn.Cell == null) {\n firstDataColumn.Cell = CellWithExpandButton;\n firstDataColumn.variant = \"expand\";\n\n return columns;\n }\n }\n\n const expandColumn = {\n id: \"_hv_expand\",\n variant: \"none\",\n\n width: 32,\n\n // this will only work when using useHvTableSticky\n // but ensures it stays left of any sticky column\n sticky: \"left\",\n\n Cell: CellWithExpandButton,\n };\n\n const columnsCopy = [...columns];\n columnsCopy.splice(\n firstDataColumnIndex !== -1 ? firstDataColumnIndex : 0,\n 0,\n expandColumn,\n );\n\n return columnsCopy;\n};\n\nconst getRowPropsHook = (props: any, { row }: any) => {\n const nextProps: UseHvRowExpandTableRowProps = {\n expanded: row.isExpanded,\n };\n\n return [props, nextProps];\n};\n\nexport const useHvRowExpand: UseRowExpandProps = (hooks) => {\n hooks.visibleColumns.push(visibleColumnsHook);\n hooks.getRowProps.push(getRowPropsHook);\n};\nuseHvRowExpand.pluginName = \"useHvRowExpand\";\n"],"names":[],"mappings":";;;;;AAwCA,MAAM,iBAAiB;AAAA,EACrB,0BAA0B;AAAA,EAC1B,4BAA4B;AAC9B;AAEO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAwB;AAChB,QAAA,SAAS,UAAU,gBAAgB,UAAU;AAC7C,QAAA,WAAW,IAAI,4BAA4B;AAEjD,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAI;AAAA,QACJ,cACE,IAAI,aACA,OAAO,6BACP,OAAO;AAAA,QAEb,iBAAe,IAAI;AAAA,QACnB,SAAS,UAAU;AAAA,QAEnB,UAAC,oBAAA,YAAA,EAAW,QAAQ,IAAI,WAAY,CAAA;AAAA,MAAA;AAAA,IACtC;AAAA,IACC,MAAM,SACJ,oBAAA,cAAA,EAAa,SAAQ,SAAQ,WAAU,QACrC,UAAA,KAAK,MACR,CAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA,MAAM,qBAAqB,CAAC,SAAc,EAAE,eAAoB;AAC9D,MAAI,SAAS,2BAA2B;AAC/B,WAAA;AAAA,EAAA;AAIT,QAAM,uBAAwB,QAAoC;AAAA,IAChE,CAAC,MAAM,CAAC,EAAE,IAAI,WAAW,MAAM;AAAA,EACjC;AAEA,MAAI,yBAAyB,IAAI;AACzB,UAAA,kBAAkB,QAAQ,oBAAoB;AAGhD,QAAA,gBAAgB,SAAS,qBAA6B,QAAA;AAEtD,QAAA,gBAAgB,QAAQ,MAAM;AAChC,sBAAgB,OAAO;AACvB,sBAAgB,UAAU;AAEnB,aAAA;AAAA,IAAA;AAAA,EACT;AAGF,QAAM,eAAe;AAAA,IACnB,IAAI;AAAA,IACJ,SAAS;AAAA,IAET,OAAO;AAAA;AAAA;AAAA,IAIP,QAAQ;AAAA,IAER,MAAM;AAAA,EACR;AAEM,QAAA,cAAc,CAAC,GAAG,OAAO;AACnB,cAAA;AAAA,IACV,yBAAyB,KAAK,uBAAuB;AAAA,IACrD;AAAA,IACA;AAAA,EACF;AAEO,SAAA;AACT;AAEA,MAAM,kBAAkB,CAAC,OAAY,EAAE,UAAe;AACpD,QAAM,YAAyC;AAAA,IAC7C,UAAU,IAAI;AAAA,EAChB;AAEO,SAAA,CAAC,OAAO,SAAS;AAC1B;AAEa,MAAA,iBAAoC,CAAC,UAAU;AACpD,QAAA,eAAe,KAAK,kBAAkB;AACtC,QAAA,YAAY,KAAK,eAAe;AACxC;AACA,eAAe,aAAa;"}
@@ -42,9 +42,6 @@ const { staticClasses, useClasses } = createClasses("HvTab", {
42
42
  // Override Mui styling: https://mui.com/material-ui/api/tab/#css
43
43
  "& .MuiTab-iconWrapper": {
44
44
  margin: 0
45
- },
46
- "& svg .color0": {
47
- fill: "currentcolor"
48
45
  }
49
46
  },
50
47
  focusVisible: {
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.styles.js","sources":["../../../../src/Tabs/Tab/Tab.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTab\", {\n root: {\n marginTop: \"3px\",\n padding: theme.spacing(0, \"sm\"),\n minWidth: 70,\n minHeight: 32,\n textTransform: \"none\",\n ...theme.typography.body,\n borderRadius: `${theme.radii.base} ${theme.radii.base} 0 0`,\n \"&:hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n \"&::after\": {\n height: \"1px\",\n backgroundColor: theme.colors.atmo4,\n },\n },\n \"&$selected\": {\n fontWeight: theme.typography.label.fontWeight,\n },\n \"&$disabled\": {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n pointerEvents: \"all\",\n opacity: 1,\n \"&:hover\": {\n background: \"none\",\n },\n },\n opacity: 1,\n \"&::after\": {\n position: \"absolute\",\n left: 0,\n top: \"calc(100% - 1px)\",\n height: \"1px\",\n width: \"100%\",\n backgroundColor: theme.colors.atmo4,\n content: \"''\",\n },\n // Override Mui styling: https://mui.com/material-ui/api/tab/#css\n \"& .MuiTab-iconWrapper\": {\n margin: 0,\n },\n \"& svg .color0\": {\n fill: \"currentcolor\",\n },\n },\n focusVisible: {\n ...outlineStyles,\n },\n selected: {},\n disabled: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,SAAS;AAAA,EAClE,MAAM;AAAA,IACJ,WAAW;AAAA,IACX,SAAS,MAAM,QAAQ,GAAG,IAAI;AAAA,IAC9B,UAAU;AAAA,IACV,WAAW;AAAA,IACX,eAAe;AAAA,IACf,GAAG,MAAM,WAAW;AAAA,IACpB,cAAc,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,IAAI;AAAA,IACrD,WAAW;AAAA,MACT,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,iBAAiB,MAAM,OAAO;AAAA,MAAA;AAAA,IAElC;AAAA,IACA,cAAc;AAAA,MACZ,YAAY,MAAM,WAAW,MAAM;AAAA,IACrC;AAAA,IACA,cAAc;AAAA,MACZ,OAAO,MAAM,OAAO;AAAA,MACpB,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,SAAS;AAAA,MACT,WAAW;AAAA,QACT,YAAY;AAAA,MAAA;AAAA,IAEhB;AAAA,IACA,SAAS;AAAA,IACT,YAAY;AAAA,MACV,UAAU;AAAA,MACV,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,iBAAiB,MAAM,OAAO;AAAA,MAC9B,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,yBAAyB;AAAA,MACvB,QAAQ;AAAA,IACV;AAAA,IACA,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EAEV;AAAA,EACA,cAAc;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,UAAU,CAAC;AAAA,EACX,UAAU,CAAA;AACZ,CAAC;"}
1
+ {"version":3,"file":"Tab.styles.js","sources":["../../../../src/Tabs/Tab/Tab.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTab\", {\n root: {\n marginTop: \"3px\",\n padding: theme.spacing(0, \"sm\"),\n minWidth: 70,\n minHeight: 32,\n textTransform: \"none\",\n ...theme.typography.body,\n borderRadius: `${theme.radii.base} ${theme.radii.base} 0 0`,\n \"&:hover\": {\n backgroundColor: theme.colors.containerBackgroundHover,\n \"&::after\": {\n height: \"1px\",\n backgroundColor: theme.colors.atmo4,\n },\n },\n \"&$selected\": {\n fontWeight: theme.typography.label.fontWeight,\n },\n \"&$disabled\": {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n pointerEvents: \"all\",\n opacity: 1,\n \"&:hover\": {\n background: \"none\",\n },\n },\n opacity: 1,\n \"&::after\": {\n position: \"absolute\",\n left: 0,\n top: \"calc(100% - 1px)\",\n height: \"1px\",\n width: \"100%\",\n backgroundColor: theme.colors.atmo4,\n content: \"''\",\n },\n // Override Mui styling: https://mui.com/material-ui/api/tab/#css\n \"& .MuiTab-iconWrapper\": {\n margin: 0,\n },\n },\n focusVisible: {\n ...outlineStyles,\n },\n selected: {},\n disabled: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,SAAS;AAAA,EAClE,MAAM;AAAA,IACJ,WAAW;AAAA,IACX,SAAS,MAAM,QAAQ,GAAG,IAAI;AAAA,IAC9B,UAAU;AAAA,IACV,WAAW;AAAA,IACX,eAAe;AAAA,IACf,GAAG,MAAM,WAAW;AAAA,IACpB,cAAc,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,IAAI;AAAA,IACrD,WAAW;AAAA,MACT,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,iBAAiB,MAAM,OAAO;AAAA,MAAA;AAAA,IAElC;AAAA,IACA,cAAc;AAAA,MACZ,YAAY,MAAM,WAAW,MAAM;AAAA,IACrC;AAAA,IACA,cAAc;AAAA,MACZ,OAAO,MAAM,OAAO;AAAA,MACpB,QAAQ;AAAA,MACR,eAAe;AAAA,MACf,SAAS;AAAA,MACT,WAAW;AAAA,QACT,YAAY;AAAA,MAAA;AAAA,IAEhB;AAAA,IACA,SAAS;AAAA,IACT,YAAY;AAAA,MACV,UAAU;AAAA,MACV,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,iBAAiB,MAAM,OAAO;AAAA,MAC9B,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,yBAAyB;AAAA,MACvB,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAAA,EACA,cAAc;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,UAAU,CAAC;AAAA,EACX,UAAU,CAAA;AACZ,CAAC;"}
@@ -27,7 +27,7 @@ const { staticClasses, useClasses } = createClasses("HvTagsInput", {
27
27
  }
28
28
  }
29
29
  },
30
- resizable: { width: "auto", resize: "both", overflow: "auto" },
30
+ resizable: { width: "auto", resize: "both", clear: "both", overflow: "auto" },
31
31
  invalid: {},
32
32
  labelContainer: { float: "left", display: "flex", alignItems: "flex-start" },
33
33
  label: {},
@@ -1 +1 @@
1
- {"version":3,"file":"TagsInput.styles.js","sources":["../../../src/TagsInput/TagsInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTagsInput\", {\n /** @deprecated unused */\n listItemGutters: {},\n /** @deprecated use `chipRoot` */\n listItemRoot: {},\n root: { display: \"inline-block\", width: \"100%\" },\n // TODO: consider renaming this\n chipRoot: {\n maxWidth: \"none\",\n },\n disabled: {\n \"& $tagsList\": {\n backgroundColor: theme.colors.atmo2,\n \"&,:hover\": {\n borderColor: theme.colors.atmo4,\n },\n },\n },\n readOnly: {\n \"& $tagsList\": {\n backgroundColor: theme.colors.atmo2,\n \"&,:hover\": {\n borderColor: theme.colors.secondary_60,\n },\n },\n },\n resizable: { width: \"auto\", resize: \"both\", overflow: \"auto\" },\n invalid: {},\n labelContainer: { float: \"left\", display: \"flex\", alignItems: \"flex-start\" },\n label: {},\n description: { display: \"block\", float: \"left\" },\n characterCounter: {\n display: \"block\",\n float: \"right\",\n textAlign: \"right\",\n marginBottom: \"6px\",\n },\n tagsList: {\n display: \"flex\",\n alignItems: \"center\",\n alignContent: \"flex-start\",\n gap: theme.spacing(\"xxs\", \"xs\"),\n cursor: \"text\",\n width: \"100%\",\n minHeight: 32,\n padding: theme.spacing(\"xxs\", \"xs\"),\n overflow: \"auto\",\n position: \"relative\",\n\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n\n backgroundColor: theme.colors.atmo1,\n borderWidth: 1,\n borderColor: theme.colors.secondary_80,\n borderRadius: theme.radii.base,\n\n \"&:hover\": {\n borderColor: theme.colors.primary,\n },\n\n \"&:focus-within, &:focus-visible\": {\n ...outlineStyles,\n },\n\n \"&$singleLine\": {\n flexWrap: \"nowrap\",\n },\n\n \"&$error\": {\n borderColor: theme.colors.negative_120,\n },\n\n \"&$invalid\": {\n borderColor: theme.colors.negative_120,\n },\n },\n /** @deprecated use `classes.input` instead */\n tagInputContainerRoot: {},\n /** @deprecated use `classes.input` instead */\n tagInputRoot: {},\n input: {\n display: \"flex\",\n flex: \"1 0 auto\",\n height: \"auto\",\n width: 0,\n minWidth: 60,\n border: \"none\",\n margin: 0,\n padding: 0,\n ...theme.typography.caption1,\n backgroundColor: \"transparent\",\n outline: \"none\",\n boxShadow: \"none\",\n },\n /** @deprecated unused. use `:focus` or `:focus-visible` instead */\n tagSelected: {},\n /** @deprecated unused. use `::after` instead */\n tagInputBorderContainer: {},\n /** @deprecated unused. use `:focus` or `:focus-visible` instead */\n tagInputRootFocused: {},\n /** @deprecated unused */\n tagInputRootEmpty: {},\n singleLine: {},\n error: { float: \"left\" },\n inputExtension: {},\n suggestionsContainer: {},\n suggestionList: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA;AAAA,EAExE,iBAAiB,CAAC;AAAA;AAAA,EAElB,cAAc,CAAC;AAAA,EACf,MAAM,EAAE,SAAS,gBAAgB,OAAO,OAAO;AAAA;AAAA,EAE/C,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,aAAa,MAAM,OAAO;AAAA,MAAA;AAAA,IAC5B;AAAA,EAEJ;AAAA,EACA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,aAAa,MAAM,OAAO;AAAA,MAAA;AAAA,IAC5B;AAAA,EAEJ;AAAA,EACA,WAAW,EAAE,OAAO,QAAQ,QAAQ,QAAQ,UAAU,OAAO;AAAA,EAC7D,SAAS,CAAC;AAAA,EACV,gBAAgB,EAAE,OAAO,QAAQ,SAAS,QAAQ,YAAY,aAAa;AAAA,EAC3E,OAAO,CAAC;AAAA,EACR,aAAa,EAAE,SAAS,SAAS,OAAO,OAAO;AAAA,EAC/C,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,KAAK,MAAM,QAAQ,OAAO,IAAI;AAAA,IAC9B,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,WAAW;AAAA,IACX,SAAS,MAAM,QAAQ,OAAO,IAAI;AAAA,IAClC,UAAU;AAAA,IACV,UAAU;AAAA,IAEV,eAAe;AAAA,IACf,UAAU;AAAA,IAEV,iBAAiB,MAAM,OAAO;AAAA,IAC9B,aAAa;AAAA,IACb,aAAa,MAAM,OAAO;AAAA,IAC1B,cAAc,MAAM,MAAM;AAAA,IAE1B,WAAW;AAAA,MACT,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IAEA,mCAAmC;AAAA,MACjC,GAAG;AAAA,IACL;AAAA,IAEA,gBAAgB;AAAA,MACd,UAAU;AAAA,IACZ;AAAA,IAEA,WAAW;AAAA,MACT,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IAEA,aAAa;AAAA,MACX,aAAa,MAAM,OAAO;AAAA,IAAA;AAAA,EAE9B;AAAA;AAAA,EAEA,uBAAuB,CAAC;AAAA;AAAA,EAExB,cAAc,CAAC;AAAA,EACf,OAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,GAAG,MAAM,WAAW;AAAA,IACpB,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA;AAAA,EAEA,aAAa,CAAC;AAAA;AAAA,EAEd,yBAAyB,CAAC;AAAA;AAAA,EAE1B,qBAAqB,CAAC;AAAA;AAAA,EAEtB,mBAAmB,CAAC;AAAA,EACpB,YAAY,CAAC;AAAA,EACb,OAAO,EAAE,OAAO,OAAO;AAAA,EACvB,gBAAgB,CAAC;AAAA,EACjB,sBAAsB,CAAC;AAAA,EACvB,gBAAgB,CAAA;AAClB,CAAC;"}
1
+ {"version":3,"file":"TagsInput.styles.js","sources":["../../../src/TagsInput/TagsInput.styles.tsx"],"sourcesContent":["import { createClasses } from \"@hitachivantara/uikit-react-utils\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { outlineStyles } from \"../utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTagsInput\", {\n /** @deprecated unused */\n listItemGutters: {},\n /** @deprecated use `chipRoot` */\n listItemRoot: {},\n root: { display: \"inline-block\", width: \"100%\" },\n // TODO: consider renaming this\n chipRoot: {\n maxWidth: \"none\",\n },\n disabled: {\n \"& $tagsList\": {\n backgroundColor: theme.colors.atmo2,\n \"&,:hover\": {\n borderColor: theme.colors.atmo4,\n },\n },\n },\n readOnly: {\n \"& $tagsList\": {\n backgroundColor: theme.colors.atmo2,\n \"&,:hover\": {\n borderColor: theme.colors.secondary_60,\n },\n },\n },\n resizable: { width: \"auto\", resize: \"both\", clear: \"both\", overflow: \"auto\" },\n invalid: {},\n labelContainer: { float: \"left\", display: \"flex\", alignItems: \"flex-start\" },\n label: {},\n description: { display: \"block\", float: \"left\" },\n characterCounter: {\n display: \"block\",\n float: \"right\",\n textAlign: \"right\",\n marginBottom: \"6px\",\n },\n tagsList: {\n display: \"flex\",\n alignItems: \"center\",\n alignContent: \"flex-start\",\n gap: theme.spacing(\"xxs\", \"xs\"),\n cursor: \"text\",\n width: \"100%\",\n minHeight: 32,\n padding: theme.spacing(\"xxs\", \"xs\"),\n overflow: \"auto\",\n position: \"relative\",\n\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n\n backgroundColor: theme.colors.atmo1,\n borderWidth: 1,\n borderColor: theme.colors.secondary_80,\n borderRadius: theme.radii.base,\n\n \"&:hover\": {\n borderColor: theme.colors.primary,\n },\n\n \"&:focus-within, &:focus-visible\": {\n ...outlineStyles,\n },\n\n \"&$singleLine\": {\n flexWrap: \"nowrap\",\n },\n\n \"&$error\": {\n borderColor: theme.colors.negative_120,\n },\n\n \"&$invalid\": {\n borderColor: theme.colors.negative_120,\n },\n },\n /** @deprecated use `classes.input` instead */\n tagInputContainerRoot: {},\n /** @deprecated use `classes.input` instead */\n tagInputRoot: {},\n input: {\n display: \"flex\",\n flex: \"1 0 auto\",\n height: \"auto\",\n width: 0,\n minWidth: 60,\n border: \"none\",\n margin: 0,\n padding: 0,\n ...theme.typography.caption1,\n backgroundColor: \"transparent\",\n outline: \"none\",\n boxShadow: \"none\",\n },\n /** @deprecated unused. use `:focus` or `:focus-visible` instead */\n tagSelected: {},\n /** @deprecated unused. use `::after` instead */\n tagInputBorderContainer: {},\n /** @deprecated unused. use `:focus` or `:focus-visible` instead */\n tagInputRootFocused: {},\n /** @deprecated unused */\n tagInputRootEmpty: {},\n singleLine: {},\n error: { float: \"left\" },\n inputExtension: {},\n suggestionsContainer: {},\n suggestionList: {},\n});\n"],"names":[],"mappings":";;;AAKO,MAAM,EAAE,eAAe,eAAe,cAAc,eAAe;AAAA;AAAA,EAExE,iBAAiB,CAAC;AAAA;AAAA,EAElB,cAAc,CAAC;AAAA,EACf,MAAM,EAAE,SAAS,gBAAgB,OAAO,OAAO;AAAA;AAAA,EAE/C,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,aAAa,MAAM,OAAO;AAAA,MAAA;AAAA,IAC5B;AAAA,EAEJ;AAAA,EACA,UAAU;AAAA,IACR,eAAe;AAAA,MACb,iBAAiB,MAAM,OAAO;AAAA,MAC9B,YAAY;AAAA,QACV,aAAa,MAAM,OAAO;AAAA,MAAA;AAAA,IAC5B;AAAA,EAEJ;AAAA,EACA,WAAW,EAAE,OAAO,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,UAAU,OAAO;AAAA,EAC5E,SAAS,CAAC;AAAA,EACV,gBAAgB,EAAE,OAAO,QAAQ,SAAS,QAAQ,YAAY,aAAa;AAAA,EAC3E,OAAO,CAAC;AAAA,EACR,aAAa,EAAE,SAAS,SAAS,OAAO,OAAO;AAAA,EAC/C,kBAAkB;AAAA,IAChB,SAAS;AAAA,IACT,OAAO;AAAA,IACP,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,KAAK,MAAM,QAAQ,OAAO,IAAI;AAAA,IAC9B,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,WAAW;AAAA,IACX,SAAS,MAAM,QAAQ,OAAO,IAAI;AAAA,IAClC,UAAU;AAAA,IACV,UAAU;AAAA,IAEV,eAAe;AAAA,IACf,UAAU;AAAA,IAEV,iBAAiB,MAAM,OAAO;AAAA,IAC9B,aAAa;AAAA,IACb,aAAa,MAAM,OAAO;AAAA,IAC1B,cAAc,MAAM,MAAM;AAAA,IAE1B,WAAW;AAAA,MACT,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IAEA,mCAAmC;AAAA,MACjC,GAAG;AAAA,IACL;AAAA,IAEA,gBAAgB;AAAA,MACd,UAAU;AAAA,IACZ;AAAA,IAEA,WAAW;AAAA,MACT,aAAa,MAAM,OAAO;AAAA,IAC5B;AAAA,IAEA,aAAa;AAAA,MACX,aAAa,MAAM,OAAO;AAAA,IAAA;AAAA,EAE9B;AAAA;AAAA,EAEA,uBAAuB,CAAC;AAAA;AAAA,EAExB,cAAc,CAAC;AAAA,EACf,OAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,GAAG,MAAM,WAAW;AAAA,IACpB,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA;AAAA,EAEA,aAAa,CAAC;AAAA;AAAA,EAEd,yBAAyB,CAAC;AAAA;AAAA,EAE1B,qBAAqB,CAAC;AAAA;AAAA,EAEtB,mBAAmB,CAAC;AAAA,EACpB,YAAY,CAAC;AAAA,EACb,OAAO,EAAE,OAAO,OAAO;AAAA,EACvB,gBAAgB,CAAC;AAAA,EACjB,sBAAsB,CAAC;AAAA,EACvB,gBAAgB,CAAA;AAClB,CAAC;"}