@hitachivantara/uikit-react-core 4.1.1 → 4.3.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 (82) hide show
  1. package/dist/BreadCrumb/BreadCrumb.js +32 -20
  2. package/dist/BreadCrumb/BreadCrumb.js.map +1 -1
  3. package/dist/BreadCrumb/styles.js +3 -0
  4. package/dist/BreadCrumb/styles.js.map +1 -1
  5. package/dist/BreadCrumb/utils.js +3 -8
  6. package/dist/BreadCrumb/utils.js.map +1 -1
  7. package/dist/Dialog/Dialog.d.ts +1 -1
  8. package/dist/Dialog/Dialog.js +11 -13
  9. package/dist/Dialog/Dialog.js.map +1 -1
  10. package/dist/Dialog/DialogActions/DialogActions.js.map +1 -1
  11. package/dist/Dialog/DialogActions/styles.js +2 -9
  12. package/dist/Dialog/DialogActions/styles.js.map +1 -1
  13. package/dist/Dialog/DialogContent/DialogContent.js +19 -5
  14. package/dist/Dialog/DialogContent/DialogContent.js.map +1 -1
  15. package/dist/Dialog/DialogContent/styles.js +2 -3
  16. package/dist/Dialog/DialogContent/styles.js.map +1 -1
  17. package/dist/Dialog/DialogTitle/DialogTitle.js +1 -6
  18. package/dist/Dialog/DialogTitle/DialogTitle.js.map +1 -1
  19. package/dist/Dialog/DialogTitle/styles.js +1 -4
  20. package/dist/Dialog/DialogTitle/styles.js.map +1 -1
  21. package/dist/Dialog/styles.js +10 -6
  22. package/dist/Dialog/styles.js.map +1 -1
  23. package/dist/Dropdown/Dropdown.d.ts +4 -0
  24. package/dist/Dropdown/Dropdown.js +7 -1
  25. package/dist/Dropdown/Dropdown.js.map +1 -1
  26. package/dist/Dropdown/List/List.js +9 -4
  27. package/dist/Dropdown/List/List.js.map +1 -1
  28. package/dist/legacy/BreadCrumb/BreadCrumb.js +31 -19
  29. package/dist/legacy/BreadCrumb/BreadCrumb.js.map +1 -1
  30. package/dist/legacy/BreadCrumb/styles.js +3 -0
  31. package/dist/legacy/BreadCrumb/styles.js.map +1 -1
  32. package/dist/legacy/BreadCrumb/utils.js +2 -6
  33. package/dist/legacy/BreadCrumb/utils.js.map +1 -1
  34. package/dist/legacy/Dialog/Dialog.d.ts +1 -1
  35. package/dist/legacy/Dialog/Dialog.js +16 -18
  36. package/dist/legacy/Dialog/Dialog.js.map +1 -1
  37. package/dist/legacy/Dialog/DialogActions/DialogActions.js.map +1 -1
  38. package/dist/legacy/Dialog/DialogActions/styles.js +2 -9
  39. package/dist/legacy/Dialog/DialogActions/styles.js.map +1 -1
  40. package/dist/legacy/Dialog/DialogContent/DialogContent.js +19 -5
  41. package/dist/legacy/Dialog/DialogContent/DialogContent.js.map +1 -1
  42. package/dist/legacy/Dialog/DialogContent/styles.js +2 -3
  43. package/dist/legacy/Dialog/DialogContent/styles.js.map +1 -1
  44. package/dist/legacy/Dialog/DialogTitle/DialogTitle.js +1 -6
  45. package/dist/legacy/Dialog/DialogTitle/DialogTitle.js.map +1 -1
  46. package/dist/legacy/Dialog/DialogTitle/styles.js +1 -4
  47. package/dist/legacy/Dialog/DialogTitle/styles.js.map +1 -1
  48. package/dist/legacy/Dialog/styles.js +10 -6
  49. package/dist/legacy/Dialog/styles.js.map +1 -1
  50. package/dist/legacy/Dropdown/Dropdown.d.ts +4 -0
  51. package/dist/legacy/Dropdown/Dropdown.js +7 -1
  52. package/dist/legacy/Dropdown/Dropdown.js.map +1 -1
  53. package/dist/legacy/Dropdown/List/List.js +9 -4
  54. package/dist/legacy/Dropdown/List/List.js.map +1 -1
  55. package/dist/modern/BreadCrumb/BreadCrumb.js +12 -7
  56. package/dist/modern/BreadCrumb/BreadCrumb.js.map +1 -1
  57. package/dist/modern/BreadCrumb/styles.js +3 -0
  58. package/dist/modern/BreadCrumb/styles.js.map +1 -1
  59. package/dist/modern/BreadCrumb/utils.js +2 -2
  60. package/dist/modern/BreadCrumb/utils.js.map +1 -1
  61. package/dist/modern/Dialog/Dialog.d.ts +1 -1
  62. package/dist/modern/Dialog/Dialog.js +9 -7
  63. package/dist/modern/Dialog/Dialog.js.map +1 -1
  64. package/dist/modern/Dialog/DialogActions/DialogActions.js.map +1 -1
  65. package/dist/modern/Dialog/DialogActions/styles.js +2 -9
  66. package/dist/modern/Dialog/DialogActions/styles.js.map +1 -1
  67. package/dist/modern/Dialog/DialogContent/DialogContent.js +18 -10
  68. package/dist/modern/Dialog/DialogContent/DialogContent.js.map +1 -1
  69. package/dist/modern/Dialog/DialogContent/styles.js +2 -3
  70. package/dist/modern/Dialog/DialogContent/styles.js.map +1 -1
  71. package/dist/modern/Dialog/DialogTitle/DialogTitle.js +1 -8
  72. package/dist/modern/Dialog/DialogTitle/DialogTitle.js.map +1 -1
  73. package/dist/modern/Dialog/DialogTitle/styles.js +1 -4
  74. package/dist/modern/Dialog/DialogTitle/styles.js.map +1 -1
  75. package/dist/modern/Dialog/styles.js +10 -6
  76. package/dist/modern/Dialog/styles.js.map +1 -1
  77. package/dist/modern/Dropdown/Dropdown.d.ts +4 -0
  78. package/dist/modern/Dropdown/Dropdown.js +7 -1
  79. package/dist/modern/Dropdown/Dropdown.js.map +1 -1
  80. package/dist/modern/Dropdown/List/List.js +9 -4
  81. package/dist/modern/Dropdown/List/List.js.map +1 -1
  82. package/package.json +3 -3
@@ -36,6 +36,9 @@ var styles = function styles(theme) {
36
36
  "&:focus": {
37
37
  backgroundColor: theme.hv.palette.atmosphere.atmo3
38
38
  }
39
+ },
40
+ label: {
41
+ textTransform: "capitalize"
39
42
  }
40
43
  };
41
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","theme","root","display","alignItems","zIndex","centerContainer","link","maxWidth","color","hv","palette","accent","acce1","cursor","backgroundColor","atmosphere","atmo3","separatorContainer","orderedList","paddingLeft","marginLeft","spacing","currentPage","padding","a","textDecoration","borderRadius"],"sources":["../../../src/BreadCrumb/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n display: \"flex\",\n alignItems: \"center\",\n zIndex: 0,\n },\n centerContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n link: {\n maxWidth: \"170px\",\n color: theme.hv.palette.accent.acce1,\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n },\n separatorContainer: {},\n orderedList: {\n display: \"flex\",\n paddingLeft: 0,\n marginLeft: `-${theme.spacing(\"xs\")}`,\n },\n currentPage: {\n padding: `8px ${theme.spacing(\"xs\")}`,\n },\n a: {\n padding: `8px ${theme.spacing(\"xs\")}`,\n textDecoration: \"none\",\n borderRadius: \"2px\",\n \"&:hover\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n \"&:focus\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,MAAM,EAAE;IACV,CAAC;IACDC,eAAe,EAAE;MACfH,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE;IACd,CAAC;IACDG,IAAI,EAAE;MACJC,QAAQ,EAAE,OAAO;MACjBC,KAAK,EAAER,KAAK,CAACS,EAAE,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK;MACpC,SAAS,EAAE;QACTC,MAAM,EAAE,SAAS;QACjBC,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C;IACF,CAAC;IACDC,kBAAkB,EAAE,CAAC,CAAC;IACtBC,WAAW,EAAE;MACXhB,OAAO,EAAE,MAAM;MACfiB,WAAW,EAAE,CAAC;MACdC,UAAU,aAAMpB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC;IACrC,CAAC;IACDC,WAAW,EAAE;MACXC,OAAO,gBAASvB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC;IACrC,CAAC;IACDG,CAAC,EAAE;MACDD,OAAO,gBAASvB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC,CAAE;MACrCI,cAAc,EAAE,MAAM;MACtBC,YAAY,EAAE,KAAK;MACnB,SAAS,EAAE;QACTZ,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C,CAAC;MACD,SAAS,EAAE;QACTF,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C;IACF;EACF,CAAC;AAAA,CAAC;AAEF,eAAejB,MAAM"}
1
+ {"version":3,"file":"styles.js","names":["styles","theme","root","display","alignItems","zIndex","centerContainer","link","maxWidth","color","hv","palette","accent","acce1","cursor","backgroundColor","atmosphere","atmo3","separatorContainer","orderedList","paddingLeft","marginLeft","spacing","currentPage","padding","a","textDecoration","borderRadius","label","textTransform"],"sources":["../../../src/BreadCrumb/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n display: \"flex\",\n alignItems: \"center\",\n zIndex: 0,\n },\n centerContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n link: {\n maxWidth: \"170px\",\n color: theme.hv.palette.accent.acce1,\n \"&:hover\": {\n cursor: \"pointer\",\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n },\n separatorContainer: {},\n orderedList: {\n display: \"flex\",\n paddingLeft: 0,\n marginLeft: `-${theme.spacing(\"xs\")}`,\n },\n currentPage: {\n padding: `8px ${theme.spacing(\"xs\")}`,\n },\n a: {\n padding: `8px ${theme.spacing(\"xs\")}`,\n textDecoration: \"none\",\n borderRadius: \"2px\",\n \"&:hover\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n \"&:focus\": {\n backgroundColor: theme.hv.palette.atmosphere.atmo3,\n },\n },\n label: {\n textTransform: \"capitalize\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,MAAM,EAAE;IACV,CAAC;IACDC,eAAe,EAAE;MACfH,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE;IACd,CAAC;IACDG,IAAI,EAAE;MACJC,QAAQ,EAAE,OAAO;MACjBC,KAAK,EAAER,KAAK,CAACS,EAAE,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK;MACpC,SAAS,EAAE;QACTC,MAAM,EAAE,SAAS;QACjBC,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C;IACF,CAAC;IACDC,kBAAkB,EAAE,CAAC,CAAC;IACtBC,WAAW,EAAE;MACXhB,OAAO,EAAE,MAAM;MACfiB,WAAW,EAAE,CAAC;MACdC,UAAU,aAAMpB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC;IACrC,CAAC;IACDC,WAAW,EAAE;MACXC,OAAO,gBAASvB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC;IACrC,CAAC;IACDG,CAAC,EAAE;MACDD,OAAO,gBAASvB,KAAK,CAACqB,OAAO,CAAC,IAAI,CAAC,CAAE;MACrCI,cAAc,EAAE,MAAM;MACtBC,YAAY,EAAE,KAAK;MACnB,SAAS,EAAE;QACTZ,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C,CAAC;MACD,SAAS,EAAE;QACTF,eAAe,EAAEd,KAAK,CAACS,EAAE,CAACC,OAAO,CAACK,UAAU,CAACC;MAC/C;IACF,CAAC;IACDW,KAAK,EAAE;MACLC,aAAa,EAAE;IACjB;EACF,CAAC;AAAA,CAAC;AAEF,eAAe7B,MAAM"}
@@ -2,8 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  var _MoreOptionsHorizonta;
3
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- import "core-js/modules/es.array.includes.js";
6
- import "core-js/modules/es.string.includes.js";
7
5
  import "core-js/modules/es.array.slice.js";
8
6
  import "core-js/modules/es.array.splice.js";
9
7
  import "core-js/modules/es.object.keys.js";
@@ -18,10 +16,7 @@ import { MoreOptionsHorizontal } from "@hitachivantara/uikit-react-icons";
18
16
  import { HvDropDownMenu } from "..";
19
17
  import { setId } from "../utils";
20
18
  import { jsx as _jsx } from "react/jsx-runtime";
21
- export var removeExtension = function removeExtension(label) {
22
- return label.includes(".") ? label.substring(0, label.lastIndexOf(".")) : label;
23
- };
24
- export var pathWithSubMenu = function pathWithSubMenu(id, classes, listRoute, maxVisible, dropDownMenuProps) {
19
+ var pathWithSubMenu = function pathWithSubMenu(id, classes, listRoute, maxVisible, dropDownMenuProps) {
25
20
  var nbrElemToSubMenu = listRoute.length - maxVisible;
26
21
  var subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);
27
22
  listRoute.splice(1, nbrElemToSubMenu, /*#__PURE__*/_jsx(HvDropDownMenu, _objectSpread({
@@ -34,4 +29,5 @@ export var pathWithSubMenu = function pathWithSubMenu(id, classes, listRoute, ma
34
29
  }, dropDownMenuProps)));
35
30
  return listRoute;
36
31
  };
32
+ export default pathWithSubMenu;
37
33
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["React","MoreOptionsHorizontal","HvDropDownMenu","setId","removeExtension","label","includes","substring","lastIndexOf","pathWithSubMenu","id","classes","listRoute","maxVisible","dropDownMenuProps","nbrElemToSubMenu","length","subMenuList","slice","splice"],"sources":["../../../src/BreadCrumb/utils.js"],"sourcesContent":["import React from \"react\";\nimport { MoreOptionsHorizontal } from \"@hitachivantara/uikit-react-icons\";\nimport { HvDropDownMenu } from \"..\";\nimport { setId } from \"../utils\";\n\nexport const removeExtension = (label) =>\n label.includes(\".\") ? label.substring(0, label.lastIndexOf(\".\")) : label;\n\nexport const pathWithSubMenu = (id, classes, listRoute, maxVisible, dropDownMenuProps) => {\n const nbrElemToSubMenu = listRoute.length - maxVisible;\n const subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);\n\n listRoute.splice(\n 1,\n nbrElemToSubMenu,\n <HvDropDownMenu\n id={setId(id, \"submenu\")}\n icon={<MoreOptionsHorizontal iconSize=\"S\" color=\"acce1\" />}\n dataList={subMenuList}\n {...dropDownMenuProps}\n />\n );\n\n return listRoute;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,qBAAqB,QAAQ,mCAAmC;AACzE,SAASC,cAAc,QAAQ,IAAI;AACnC,SAASC,KAAK,QAAQ,UAAU;AAAC;AAEjC,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAIC,KAAK;EAAA,OACnCA,KAAK,CAACC,QAAQ,CAAC,GAAG,CAAC,GAAGD,KAAK,CAACE,SAAS,CAAC,CAAC,EAAEF,KAAK,CAACG,WAAW,CAAC,GAAG,CAAC,CAAC,GAAGH,KAAK;AAAA;AAE1E,OAAO,IAAMI,eAAe,GAAG,SAAlBA,eAAe,CAAIC,EAAE,EAAEC,OAAO,EAAEC,SAAS,EAAEC,UAAU,EAAEC,iBAAiB,EAAK;EACxF,IAAMC,gBAAgB,GAAGH,SAAS,CAACI,MAAM,GAAGH,UAAU;EACtD,IAAMI,WAAW,GAAGL,SAAS,CAACM,KAAK,CAAC,CAAC,EAAEH,gBAAgB,GAAG,CAAC,CAAC;EAE5DH,SAAS,CAACO,MAAM,CACd,CAAC,EACDJ,gBAAgB,eAChB,KAAC,cAAc;IACb,EAAE,EAAEZ,KAAK,CAACO,EAAE,EAAE,SAAS,CAAE;IACzB,IAAI,iEAAE,KAAC,qBAAqB;MAAC,QAAQ,EAAC,GAAG;MAAC,KAAK,EAAC;IAAO,EAAG,CAAC;IAC3D,QAAQ,EAAEO;EAAY,GAClBH,iBAAiB,EACrB,CACH;EAED,OAAOF,SAAS;AAClB,CAAC"}
1
+ {"version":3,"file":"utils.js","names":["React","MoreOptionsHorizontal","HvDropDownMenu","setId","pathWithSubMenu","id","classes","listRoute","maxVisible","dropDownMenuProps","nbrElemToSubMenu","length","subMenuList","slice","splice"],"sources":["../../../src/BreadCrumb/utils.js"],"sourcesContent":["import React from \"react\";\nimport { MoreOptionsHorizontal } from \"@hitachivantara/uikit-react-icons\";\nimport { HvDropDownMenu } from \"..\";\nimport { setId } from \"../utils\";\n\nconst pathWithSubMenu = (id, classes, listRoute, maxVisible, dropDownMenuProps) => {\n const nbrElemToSubMenu = listRoute.length - maxVisible;\n const subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);\n\n listRoute.splice(\n 1,\n nbrElemToSubMenu,\n <HvDropDownMenu\n id={setId(id, \"submenu\")}\n icon={<MoreOptionsHorizontal iconSize=\"S\" color=\"acce1\" />}\n dataList={subMenuList}\n {...dropDownMenuProps}\n />\n );\n\n return listRoute;\n};\n\nexport default pathWithSubMenu;\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,qBAAqB,QAAQ,mCAAmC;AACzE,SAASC,cAAc,QAAQ,IAAI;AACnC,SAASC,KAAK,QAAQ,UAAU;AAAC;AAEjC,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAIC,EAAE,EAAEC,OAAO,EAAEC,SAAS,EAAEC,UAAU,EAAEC,iBAAiB,EAAK;EACjF,IAAMC,gBAAgB,GAAGH,SAAS,CAACI,MAAM,GAAGH,UAAU;EACtD,IAAMI,WAAW,GAAGL,SAAS,CAACM,KAAK,CAAC,CAAC,EAAEH,gBAAgB,GAAG,CAAC,CAAC;EAE5DH,SAAS,CAACO,MAAM,CACd,CAAC,EACDJ,gBAAgB,eAChB,KAAC,cAAc;IACb,EAAE,EAAEP,KAAK,CAACE,EAAE,EAAE,SAAS,CAAE;IACzB,IAAI,iEAAE,KAAC,qBAAqB;MAAC,QAAQ,EAAC,GAAG;MAAC,KAAK,EAAC;IAAO,EAAG,CAAC;IAC3D,QAAQ,EAAEO;EAAY,GAClBH,iBAAiB,EACrB,CACH;EAED,OAAOF,SAAS;AAClB,CAAC;AAED,eAAeH,eAAe"}
@@ -1,6 +1,6 @@
1
1
  import { DialogProps, StandardProps } from "@mui/material";
2
2
 
3
- export type HvDialogClassKey = "root" | "background" | "paper" | "closeButton";
3
+ export type HvDialogClassKey = "root" | "background" | "paper" | "fullscreen" | "closeButton";
4
4
 
5
5
  export interface HvDialogProps extends StandardProps<DialogProps, HvDialogClassKey> {
6
6
  /**
@@ -1,12 +1,3 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- import _typeof from "@babel/runtime/helpers/esm/typeof";
3
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _Close;
6
- var _excluded = ["classes", "className", "id", "children", "open", "onClose", "firstFocusable", "buttonTitle", "fullscreen", "disableBackdropClick"];
7
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
- import "core-js/modules/es.array.map.js";
10
1
  import "core-js/modules/es.object.keys.js";
11
2
  import "core-js/modules/es.symbol.js";
12
3
  import "core-js/modules/es.array.filter.js";
@@ -14,6 +5,13 @@ import "core-js/modules/es.object.to-string.js";
14
5
  import "core-js/modules/es.object.get-own-property-descriptor.js";
15
6
  import "core-js/modules/web.dom-collections.for-each.js";
16
7
  import "core-js/modules/es.object.get-own-property-descriptors.js";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
10
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
11
+ var _Close;
12
+ var _excluded = ["classes", "className", "id", "children", "open", "onClose", "firstFocusable", "buttonTitle", "fullscreen", "disableBackdropClick"];
13
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
15
  import React, { useCallback, useState } from "react";
18
16
  import clsx from "clsx";
19
17
  import PropTypes from "prop-types";
@@ -117,7 +115,7 @@ var HvDialog = function HvDialog(_ref) {
117
115
  open: open,
118
116
  PaperProps: {
119
117
  classes: {
120
- root: clsx(classes.paper, fullscreen && "fullscreen")
118
+ root: clsx(classes.paper, fullscreen && classes.fullscreen)
121
119
  }
122
120
  },
123
121
  fullScreen: fullscreen,
@@ -129,9 +127,9 @@ var HvDialog = function HvDialog(_ref) {
129
127
  onClose: function onClose(event, reason) {
130
128
  return wrappedClose(event, reason);
131
129
  },
132
- onKeyDown: keyDownHandler
130
+ onKeyDown: keyDownHandler,
131
+ "aria-modal": true
133
132
  }, others), {}, {
134
- "aria-modal": true,
135
133
  children: [/*#__PURE__*/_jsx(Button, {
136
134
  id: setId(id, "close"),
137
135
  className: classes.closeButton,
@@ -141,11 +139,7 @@ var HvDialog = function HvDialog(_ref) {
141
139
  },
142
140
  "aria-label": buttonTitle,
143
141
  children: /*#__PURE__*/_jsx(CloseButtonTooltipWrapper, {})
144
- }), children && _typeof(children) === "object" ? React.Children.map(children, function (c) {
145
- return /*#__PURE__*/React.cloneElement(c, {
146
- fullscreen: fullscreen
147
- });
148
- }) : children]
142
+ }), children]
149
143
  }));
150
144
  };
151
145
  process.env.NODE_ENV !== "production" ? HvDialog.propTypes = {
@@ -170,9 +164,13 @@ process.env.NODE_ENV !== "production" ? HvDialog.propTypes = {
170
164
  */
171
165
  background: PropTypes.string,
172
166
  /**
173
- * Style applied to the component (root).
167
+ * Style applied to the paper component.
174
168
  */
175
169
  paper: PropTypes.string,
170
+ /**
171
+ * Style applied to the paper component when it's fullscreen.
172
+ */
173
+ fullscreen: PropTypes.string,
176
174
  /**
177
175
  * Style applied to the close button.
178
176
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["React","useCallback","useState","clsx","PropTypes","Dialog","withStyles","Close","isNil","Button","isKeypress","KeyboardCodes","setId","styles","withTooltip","getFocusableList","HvDialog","classes","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","disableBackdropClick","others","focusableQueue","setFocusableQueue","wrappedClose","event","reason","bypassValidation","measuredRef","node","focusableList","first","last","length","focus","element","document","getElementById","console","warn","keyDownHandler","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","closeButton","undefined","Children","map","c","cloneElement","propTypes","string","shape","isRequired","bool","func","name"],"sources":["../../../src/Dialog/Dialog.js"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { Dialog } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport isNil from \"lodash/isNil\";\nimport Button from \"../Button\";\nimport { isKeypress, KeyboardCodes, setId } from \"../utils\";\nimport styles from \"./styles\";\nimport withTooltip from \"../withTooltip\";\nimport { getFocusableList } from \"../utils/focusableElementFinder\";\n\n/**\n * The Dialog component provides a solid foundation for creating dialogs, popovers, lightboxes, etc.\n * It is created by the composition of DialogTitle, DialogContent and DialogActions components, passed as child elements.\n */\nconst HvDialog = ({\n classes,\n className,\n id,\n children,\n open,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n disableBackdropClick = false,\n ...others\n}) => {\n const [focusableQueue, setFocusableQueue] = useState(null);\n\n // Because the `disableBackdropClick` property was deprecated in MUI5\n // and we want to maintain that funcionality to the user we're wrapping\n // the onClose call here to make that check.\n const wrappedClose = (event, reason, bypassValidation = false) => {\n if (bypassValidation) {\n onClose?.(event, reason);\n } else if (!disableBackdropClick) {\n onClose?.(event, reason);\n }\n };\n\n const measuredRef = useCallback(\n (node) => {\n if (node) {\n const focusableList = getFocusableList(node);\n setFocusableQueue({\n first: focusableList[1],\n last: focusableList[focusableList.length - 2],\n });\n if (isNil(firstFocusable)) focusableList[1].focus();\n else {\n const element = document.getElementById(firstFocusable);\n if (element) element.focus();\n else {\n // eslint-disable-next-line no-console\n console.warn(`firstFocusable element ${firstFocusable} not found.`);\n focusableList[1].focus();\n }\n }\n }\n },\n [firstFocusable]\n );\n\n const keyDownHandler = (event) => {\n if (isKeypress(event, KeyboardCodes.Tab) && !isNil(event.target) && !isNil(focusableQueue)) {\n if (event.shiftKey && event.target === focusableQueue.first) {\n focusableQueue.last.focus();\n event.preventDefault();\n }\n if (!event.shiftKey && event.target === focusableQueue.last) {\n focusableQueue.first.focus();\n event.preventDefault();\n }\n }\n // Needed as this handler overrides the one in the material ui Modal.\n else if (isKeypress(event, KeyboardCodes.Esc)) {\n if (others.onEscapeKeyDown) {\n others.onEscapeKeyDown(event);\n }\n\n if (!others.disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n wrappedClose(event, \"escapeKeyDown\", true);\n }\n }\n };\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n return (\n <Dialog\n className={clsx(classes.root, className)}\n id={id}\n ref={measuredRef}\n open={open}\n PaperProps={{\n classes: {\n root: clsx(classes.paper, fullscreen ? \"fullscreen\" : \"\"),\n },\n }}\n fullScreen={fullscreen}\n BackdropProps={{\n classes: {\n root: classes.background,\n },\n }}\n onClose={(event, reason) => wrappedClose(event, reason)}\n onKeyDown={keyDownHandler}\n {...others}\n aria-modal\n >\n <Button\n id={setId(id, \"close\")}\n className={classes.closeButton}\n category=\"ghost\"\n onClick={(event) => wrappedClose(event, undefined, true)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </Button>\n {children && typeof children === \"object\"\n ? React.Children.map(children, (c) => React.cloneElement(c, { fullscreen }))\n : children}\n </Dialog>\n );\n};\n\nHvDialog.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the background (outside) of the component.\n */\n background: PropTypes.string,\n /**\n * Style applied to the component (root).\n */\n paper: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Components of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Current state of the Dialog.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func,\n /**\n * Element id that should be focus when the Dialog opens.\n */\n firstFocusable: PropTypes.string,\n /**\n * Title for the button close.\n */\n buttonTitle: PropTypes.string,\n /**\n * Set the dialog to fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n /**\n * Prevent closing the dialog when clicking on the backdrop.\n */\n disableBackdropClick: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialog\" })(HvDialog);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpD,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,KAAK,QAAQ,mCAAmC;AACzD,OAAOC,KAAK,MAAM,cAAc;AAChC,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,UAAU,EAAEC,aAAa,EAAEC,KAAK,QAAQ,UAAU;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,WAAW,MAAM,gBAAgB;AACxC,SAASC,gBAAgB,QAAQ,iCAAiC;;AAElE;AACA;AACA;AACA;AAHA;AAAA;AAIA,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,OAYR;EAAA,IAXJC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IACTC,EAAE,QAAFA,EAAE;IACFC,QAAQ,QAARA,QAAQ;IACRC,IAA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EACnB;AACF;AACA;EACEhD,SAAS,EAAEd,SAAS,CAAC+D,MAAM;EAC3B;AACF;AACA;EACEhD,EAAE,EAAEf,SAAS,CAAC+D,MAAM;EACpB;AACF;AACA;EACElD,OAAO,EAAEb,SAAS,CAACgE,KAAK,CAAC;IACvB;AACJ;AACA;IACIX,IAAI,EAAErD,SAAS,CAAC+D,MAAM;IACtB;AACJ;AACA;IACIR,UAAU,EAAEvD,SAAS,CAAC+D,MAAM;IAC5B;AACJ;AACA;IACIT,KAAK,EAAEtD,SAAS,CAAC+D,MAAM;IACvB;AACJ;AACA;IACIP,WAAW,EAAExD,SAAS,CAAC+D;EACzB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACEjD,QAAQ,EAAEhB,SAAS,CAAC+B,IAAI,CAACkC,UAAU;EACnC;AACF;AACA;EACEhD,IAAI,EAAEjB,SAAS,CAACkE,IAAI,CAACD,UAAU;EAC/B;AACF;AACA;EACE/C,OAAO,EAAElB,SAAS,CAACmE,IAAI;EACvB;AACF;AACA;EACEhD,cAAc,EAAEnB,SAAS,CAAC+D,MAAM;EAChC;AACF;AACA;EACE3C,WAAW,EAAEpB,SAAS,CAAC+D,MAAM;EAC7B;AACF;AACA;EACE1C,UAAU,EAAErB,SAAS,CAACkE,IAAI;EAC1B;AACF;AACA;EACE5C,oBAAoB,EAAEtB,SAAS,CAACkE;AAClC,CAAC;AAED,eAAehE,UAAU,CAACO,MAAM,EAAE;EAAE2D,IAAI,EAAE;AAAW,CAAC,CAAC,CAACxD,QAAQ,CAAC"}
1
+ {"version":3,"file":"Dialog.js","names":["React","useCallback","useState","clsx","PropTypes","Dialog","withStyles","Close","isNil","Button","isKeypress","KeyboardCodes","setId","styles","withTooltip","getFocusableList","HvDialog","classes","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","disableBackdropClick","others","focusableQueue","setFocusableQueue","wrappedClose","event","reason","bypassValidation","measuredRef","node","focusableList","first","last","length","focus","element","document","getElementById","console","warn","keyDownHandler","Tab","target","shiftKey","preventDefault","Esc","onEscapeKeyDown","disableEscapeKeyDown","stopPropagation","closeButtonDisplay","CloseButtonTooltipWrapper","root","paper","background","closeButton","undefined","propTypes","string","shape","isRequired","bool","func","name"],"sources":["../../../src/Dialog/Dialog.js"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { Dialog } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport isNil from \"lodash/isNil\";\nimport Button from \"../Button\";\nimport { isKeypress, KeyboardCodes, setId } from \"../utils\";\nimport styles from \"./styles\";\nimport withTooltip from \"../withTooltip\";\nimport { getFocusableList } from \"../utils/focusableElementFinder\";\n\n/**\n * The Dialog component provides a solid foundation for creating dialogs, popovers, lightboxes, etc.\n * It is created by the composition of DialogTitle, DialogContent and DialogActions components, passed as child elements.\n */\nconst HvDialog = ({\n classes,\n className,\n id,\n children,\n open,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n disableBackdropClick = false,\n ...others\n}) => {\n const [focusableQueue, setFocusableQueue] = useState(null);\n\n // Because the `disableBackdropClick` property was deprecated in MUI5\n // and we want to maintain that funcionality to the user we're wrapping\n // the onClose call here to make that check.\n const wrappedClose = (event, reason, bypassValidation = false) => {\n if (bypassValidation) {\n onClose?.(event, reason);\n } else if (!disableBackdropClick) {\n onClose?.(event, reason);\n }\n };\n\n const measuredRef = useCallback(\n (node) => {\n if (node) {\n const focusableList = getFocusableList(node);\n setFocusableQueue({\n first: focusableList[1],\n last: focusableList[focusableList.length - 2],\n });\n if (isNil(firstFocusable)) focusableList[1].focus();\n else {\n const element = document.getElementById(firstFocusable);\n if (element) element.focus();\n else {\n // eslint-disable-next-line no-console\n console.warn(`firstFocusable element ${firstFocusable} not found.`);\n focusableList[1].focus();\n }\n }\n }\n },\n [firstFocusable]\n );\n\n const keyDownHandler = (event) => {\n if (isKeypress(event, KeyboardCodes.Tab) && !isNil(event.target) && !isNil(focusableQueue)) {\n if (event.shiftKey && event.target === focusableQueue.first) {\n focusableQueue.last.focus();\n event.preventDefault();\n }\n if (!event.shiftKey && event.target === focusableQueue.last) {\n focusableQueue.first.focus();\n event.preventDefault();\n }\n }\n // Needed as this handler overrides the one in the material ui Modal.\n else if (isKeypress(event, KeyboardCodes.Esc)) {\n if (others.onEscapeKeyDown) {\n others.onEscapeKeyDown(event);\n }\n\n if (!others.disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n wrappedClose(event, \"escapeKeyDown\", true);\n }\n }\n };\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n return (\n <Dialog\n className={clsx(classes.root, className)}\n id={id}\n ref={measuredRef}\n open={open}\n PaperProps={{\n classes: {\n root: clsx(classes.paper, { [classes.fullscreen]: fullscreen }),\n },\n }}\n fullScreen={fullscreen}\n BackdropProps={{\n classes: {\n root: classes.background,\n },\n }}\n onClose={(event, reason) => wrappedClose(event, reason)}\n onKeyDown={keyDownHandler}\n aria-modal\n {...others}\n >\n <Button\n id={setId(id, \"close\")}\n className={classes.closeButton}\n category=\"ghost\"\n onClick={(event) => wrappedClose(event, undefined, true)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </Button>\n {children}\n </Dialog>\n );\n};\n\nHvDialog.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Id to be applied to the root node.\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the background (outside) of the component.\n */\n background: PropTypes.string,\n /**\n * Style applied to the paper component.\n */\n paper: PropTypes.string,\n /**\n * Style applied to the paper component when it's fullscreen.\n */\n fullscreen: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Components of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Current state of the Dialog.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func,\n /**\n * Element id that should be focus when the Dialog opens.\n */\n firstFocusable: PropTypes.string,\n /**\n * Title for the button close.\n */\n buttonTitle: PropTypes.string,\n /**\n * Set the dialog to fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n /**\n * Prevent closing the dialog when clicking on the backdrop.\n */\n disableBackdropClick: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialog\" })(HvDialog);\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpD,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,KAAK,QAAQ,mCAAmC;AACzD,OAAOC,KAAK,MAAM,cAAc;AAChC,OAAOC,MAAM,MAAM,WAAW;AAC9B,SAASC,UAAU,EAAEC,aAAa,EAAEC,KAAK,QAAQ,UAAU;AAC3D,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,WAAW,MAAM,gBAAgB;AACxC,SAASC,gBAAgB,QAAQ,iCAAiC;;AAElE;AACA;AACA;AACA;AAHA;AAAA;AAIA,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,OAYR;EAAA,IAXJC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IACTC,EAAE,QAAFA,EAAE;IACFC,QAAQ,QAARA,QAAQ;IACRC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IACPC,cAAc,QAAdA,cAAc;IAAA,wBACdC,WAAW;IAAXA,WAAW,iCA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KAAK,EAAEtD,SAAS,CAAC2D,MAAM;IACvB;AACJ;AACA;IACItC,UAAU,EAAErB,SAAS,CAAC2D,MAAM;IAC5B;AACJ;AACA;IACIH,WAAW,EAAExD,SAAS,CAAC2D;EACzB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACE7C,QAAQ,EAAEhB,SAAS,CAAC+B,IAAI,CAAC8B,UAAU;EACnC;AACF;AACA;EACE5C,IAAI,EAAEjB,SAAS,CAAC8D,IAAI,CAACD,UAAU;EAC/B;AACF;AACA;EACE3C,OAAO,EAAElB,SAAS,CAAC+D,IAAI;EACvB;AACF;AACA;EACE5C,cAAc,EAAEnB,SAAS,CAAC2D,MAAM;EAChC;AACF;AACA;EACEvC,WAAW,EAAEpB,SAAS,CAAC2D,MAAM;EAC7B;AACF;AACA;EACEtC,UAAU,EAAErB,SAAS,CAAC8D,IAAI;EAC1B;AACF;AACA;EACExC,oBAAoB,EAAEtB,SAAS,CAAC8D;AAClC,CAAC;AAED,eAAe5D,UAAU,CAACO,MAAM,EAAE;EAAEuD,IAAI,EAAE;AAAW,CAAC,CAAC,CAACpD,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.js","names":["React","clsx","PropTypes","DialogActions","withStyles","styles","HvDialogActions","props","classes","className","children","fullscreen","others","root","spacing","propTypes","string","shape","isRequired","node","bool","name"],"sources":["../../../../src/Dialog/DialogActions/DialogActions.js"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { DialogActions } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport styles from \"./styles\";\n\nconst HvDialogActions = (props) => {\n const { classes, className, children, fullscreen = false, ...others } = props;\n return (\n <DialogActions\n classes={{\n root: clsx(classes.root, fullscreen && classes.fullscreen),\n spacing: classes.spacing,\n }}\n className={className}\n {...others}\n >\n {children}\n </DialogActions>\n );\n};\n\nHvDialogActions.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the actions).\n */\n root: PropTypes.string,\n /**\n * Style applied to the root of the component if disableSpacing is off.\n */\n spacing: PropTypes.string,\n /**\n * Style applied to the root of the component if fullscreen is on.\n */\n fullscreen: PropTypes.string,\n }).isRequired,\n /**\n * Actions of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Whether or not the dialog is in fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialogActions\" })(HvDialogActions);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAIC,KAAK,EAAK;EACjC,IAAQC,OAAO,GAAyDD,KAAK,CAArEC,OAAO;IAAEC,SAAS,GAA8CF,KAAK,CAA5DE,SAAS;IAAEC,QAAQ,GAAoCH,KAAK,CAAjDG,QAAQ;IAAA,oBAAoCH,KAAK,CAAvCI,UAAU;IAAVA,UAAU,kCAAG,KAAK;IAAKC,MAAM,4BAAKL,KAAK;EAC7E,oBACE,KAAC,aAAa;IACZ,OAAO,EAAE;MACPM,IAAI,EAAEZ,IAAI,CAACO,OAAO,CAACK,IAAI,EAAEF,UAAU,IAAIH,OAAO,CAACG,UAAU,CAAC;MAC1DG,OAAO,EAAEN,OAAO,CAACM;IACnB,CAAE;IACF,SAAS,EAAEL;EAAU,GACjBG,MAAM;IAAA,UAETF;EAAQ,GACK;AAEpB,CAAC;AAED,wCAAAJ,eAAe,CAACS,SAAS,GAAG;EAC1B;AACF;AACA;EACEN,SAAS,EAAEP,SAAS,CAACc,MAAM;EAC3B;AACF;AACA;EACER,OAAO,EAAEN,SAAS,CAACe,KAAK,CAAC;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEX,SAAS,CAACc,MAAM;IACtB;AACJ;AACA;IACIF,OAAO,EAAEZ,SAAS,CAACc,MAAM;IACzB;AACJ;AACA;IACIL,UAAU,EAAET,SAAS,CAACc;EACxB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACER,QAAQ,EAAER,SAAS,CAACiB,IAAI,CAACD,UAAU;EACnC;AACF;AACA;EACEP,UAAU,EAAET,SAAS,CAACkB;AACxB,CAAC;AAED,eAAehB,UAAU,CAACC,MAAM,EAAE;EAAEgB,IAAI,EAAE;AAAkB,CAAC,CAAC,CAACf,eAAe,CAAC"}
1
+ {"version":3,"file":"DialogActions.js","names":["React","clsx","PropTypes","DialogActions","withStyles","styles","HvDialogActions","props","classes","className","children","fullscreen","others","root","spacing","propTypes","string","shape","isRequired","node","bool","name"],"sources":["../../../../src/Dialog/DialogActions/DialogActions.js"],"sourcesContent":["import React from \"react\";\nimport clsx from \"clsx\";\nimport PropTypes from \"prop-types\";\nimport { DialogActions } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport styles from \"./styles\";\n\nconst HvDialogActions = (props) => {\n const { classes, className, children, fullscreen = false, ...others } = props;\n return (\n <DialogActions\n classes={{\n root: clsx(classes.root, { [classes.fullscreen]: fullscreen }),\n spacing: classes.spacing,\n }}\n className={className}\n {...others}\n >\n {children}\n </DialogActions>\n );\n};\n\nHvDialogActions.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the actions).\n */\n root: PropTypes.string,\n /**\n * Style applied to the root of the component if disableSpacing is off.\n */\n spacing: PropTypes.string,\n /**\n * Style applied to the root of the component if fullscreen is on.\n */\n fullscreen: PropTypes.string,\n }).isRequired,\n /**\n * Actions of the Dialog.\n */\n children: PropTypes.node.isRequired,\n /**\n * Whether or not the dialog is in fullscreen mode.\n */\n fullscreen: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDialogActions\" })(HvDialogActions);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,IAAMC,eAAe,GAAG,SAAlBA,eAAe,CAAIC,KAAK,EAAK;EACjC,IAAQC,OAAO,GAAyDD,KAAK,CAArEC,OAAO;IAAEC,SAAS,GAA8CF,KAAK,CAA5DE,SAAS;IAAEC,QAAQ,GAAoCH,KAAK,CAAjDG,QAAQ;IAAA,oBAAoCH,KAAK,CAAvCI,UAAU;IAAVA,UAAU,kCAAG,KAAK;IAAKC,MAAM,4BAAKL,KAAK;EAC7E,oBACE,KAAC,aAAa;IACZ,OAAO,EAAE;MACPM,IAAI,EAAEZ,IAAI,CAACO,OAAO,CAACK,IAAI,EAA0BF,UAAU,IAA/BH,OAAO,CAACG,UAAU,CAAgB;MAC9DG,OAAO,EAAEN,OAAO,CAACM;IACnB,CAAE;IACF,SAAS,EAAEL;EAAU,GACjBG,MAAM;IAAA,UAETF;EAAQ,GACK;AAEpB,CAAC;AAED,wCAAAJ,eAAe,CAACS,SAAS,GAAG;EAC1B;AACF;AACA;EACEN,SAAS,EAAEP,SAAS,CAACc,MAAM;EAC3B;AACF;AACA;EACER,OAAO,EAAEN,SAAS,CAACe,KAAK,CAAC;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEX,SAAS,CAACc,MAAM;IACtB;AACJ;AACA;IACIF,OAAO,EAAEZ,SAAS,CAACc,MAAM;IACzB;AACJ;AACA;IACIL,UAAU,EAAET,SAAS,CAACc;EACxB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACER,QAAQ,EAAER,SAAS,CAACiB,IAAI,CAACD,UAAU;EACnC;AACF;AACA;EACEP,UAAU,EAAET,SAAS,CAACkB;AACxB,CAAC;AAED,eAAehB,UAAU,CAACC,MAAM,EAAE;EAAEgB,IAAI,EAAE;AAAkB,CAAC,CAAC,CAACf,eAAe,CAAC"}
@@ -3,21 +3,14 @@ var styles = function styles(theme) {
3
3
  root: {
4
4
  margin: "0",
5
5
  padding: theme.hv.spacing.sm,
6
- borderTop: "3px solid ".concat(theme.hv.palette.atmosphere.atmo2),
7
- height: 100,
8
- flex: 1
6
+ borderTop: "3px solid ".concat(theme.hv.palette.atmosphere.atmo2)
9
7
  },
10
8
  spacing: {
11
9
  "& > :not(:first-child)": {
12
10
  marginLeft: theme.hv.spacing.xs
13
11
  }
14
12
  },
15
- fullscreen: {
16
- position: "fixed",
17
- width: "100%",
18
- bottom: 0,
19
- left: 0
20
- }
13
+ fullscreen: {}
21
14
  };
22
15
  };
23
16
  export default styles;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","theme","root","margin","padding","hv","spacing","sm","borderTop","palette","atmosphere","atmo2","height","flex","marginLeft","xs","fullscreen","position","width","bottom","left"],"sources":["../../../../src/Dialog/DialogActions/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n margin: \"0\",\n padding: theme.hv.spacing.sm,\n borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n height: 100,\n flex: 1,\n },\n spacing: {\n \"& > :not(:first-child)\": {\n marginLeft: theme.hv.spacing.xs,\n },\n },\n fullscreen: {\n position: \"fixed\",\n width: \"100%\",\n bottom: 0,\n left: 0,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,MAAM,EAAE,GAAG;MACXC,OAAO,EAAEH,KAAK,CAACI,EAAE,CAACC,OAAO,CAACC,EAAE;MAC5BC,SAAS,sBAAeP,KAAK,CAACI,EAAE,CAACI,OAAO,CAACC,UAAU,CAACC,KAAK,CAAE;MAC3DC,MAAM,EAAE,GAAG;MACXC,IAAI,EAAE;IACR,CAAC;IACDP,OAAO,EAAE;MACP,wBAAwB,EAAE;QACxBQ,UAAU,EAAEb,KAAK,CAACI,EAAE,CAACC,OAAO,CAACS;MAC/B;IACF,CAAC;IACDC,UAAU,EAAE;MACVC,QAAQ,EAAE,OAAO;MACjBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE,CAAC;MACTC,IAAI,EAAE;IACR;EACF,CAAC;AAAA,CAAC;AAEF,eAAepB,MAAM"}
1
+ {"version":3,"file":"styles.js","names":["styles","theme","root","margin","padding","hv","spacing","sm","borderTop","palette","atmosphere","atmo2","marginLeft","xs","fullscreen"],"sources":["../../../../src/Dialog/DialogActions/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n margin: \"0\",\n padding: theme.hv.spacing.sm,\n borderTop: `3px solid ${theme.hv.palette.atmosphere.atmo2}`,\n },\n spacing: {\n \"& > :not(:first-child)\": {\n marginLeft: theme.hv.spacing.xs,\n },\n },\n fullscreen: {},\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,MAAM,EAAE,GAAG;MACXC,OAAO,EAAEH,KAAK,CAACI,EAAE,CAACC,OAAO,CAACC,EAAE;MAC5BC,SAAS,sBAAeP,KAAK,CAACI,EAAE,CAACI,OAAO,CAACC,UAAU,CAACC,KAAK;IAC3D,CAAC;IACDL,OAAO,EAAE;MACP,wBAAwB,EAAE;QACxBM,UAAU,EAAEX,KAAK,CAACI,EAAE,CAACC,OAAO,CAACO;MAC/B;IACF,CAAC;IACDC,UAAU,EAAE,CAAC;EACf,CAAC;AAAA,CAAC;AAEF,eAAed,MAAM"}
@@ -1,3 +1,15 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ import "core-js/modules/es.array.filter.js";
4
+ import "core-js/modules/es.object.to-string.js";
5
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
6
+ import "core-js/modules/web.dom-collections.for-each.js";
7
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
10
+ var _excluded = ["classes", "className", "children", "indentContent"];
11
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
13
  import React from "react";
2
14
  import PropTypes from "prop-types";
3
15
  import { DialogContent } from "@mui/material";
@@ -11,12 +23,14 @@ var HvDialogContent = function HvDialogContent(_ref) {
11
23
  className = _ref.className,
12
24
  children = _ref.children,
13
25
  _ref$indentContent = _ref.indentContent,
14
- indentContent = _ref$indentContent === void 0 ? false : _ref$indentContent;
15
- return /*#__PURE__*/_jsx(HvTypography, {
26
+ indentContent = _ref$indentContent === void 0 ? false : _ref$indentContent,
27
+ others = _objectWithoutProperties(_ref, _excluded);
28
+ return /*#__PURE__*/_jsx(HvTypography, _objectSpread(_objectSpread({
16
29
  component: DialogContent,
17
- className: clsx(className, classes.root, indentContent && classes.textContent),
30
+ className: clsx(className, classes.root, indentContent && classes.textContent)
31
+ }, others), {}, {
18
32
  children: children
19
- });
33
+ }));
20
34
  };
21
35
  process.env.NODE_ENV !== "production" ? HvDialogContent.propTypes = {
22
36
  /**
@@ -32,7 +46,7 @@ process.env.NODE_ENV !== "production" ? HvDialogContent.propTypes = {
32
46
  */
33
47
  root: PropTypes.string,
34
48
  /**
35
- * Style applied when the content is a string.
49
+ * Style applied when the content is indented.
36
50
  */
37
51
  textContent: PropTypes.string
38
52
  }).isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","names":["React","PropTypes","DialogContent","withStyles","clsx","HvTypography","styles","HvDialogContent","classes","className","children","indentContent","root","textContent","propTypes","string","shape","isRequired","bool","node","name"],"sources":["../../../../src/Dialog/DialogContent/DialogContent.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { DialogContent } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport clsx from \"clsx\";\nimport HvTypography from \"../../Typography\";\nimport styles from \"./styles\";\n\nconst HvDialogContent = ({ classes, className, children, indentContent = false }) => {\n return (\n <HvTypography\n component={DialogContent}\n className={clsx(className, classes.root, { [classes.textContent]: indentContent })}\n >\n {children}\n </HvTypography>\n );\n};\n\nHvDialogContent.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the content).\n */\n root: PropTypes.string,\n /**\n * Style applied when the content is a string.\n */\n textContent: PropTypes.string,\n }).isRequired,\n /**\n * Content should be indented in relationship to the Dialog title.\n */\n indentContent: PropTypes.bool,\n /**\n * Content to be rendered.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDialogContent\" })(HvDialogContent);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,IAAMC,eAAe,GAAG,SAAlBA,eAAe,OAAgE;EAAA,IAA1DC,OAAO,QAAPA,OAAO;IAAEC,SAAS,QAATA,SAAS;IAAEC,QAAQ,QAARA,QAAQ;IAAA,0BAAEC,aAAa;IAAbA,aAAa,mCAAG,KAAK;EAC5E,oBACE,KAAC,YAAY;IACX,SAAS,EAAET,aAAc;IACzB,SAAS,EAAEE,IAAI,CAACK,SAAS,EAAED,OAAO,CAACI,IAAI,EAA2BD,aAAa,IAAnCH,OAAO,CAACK,WAAW,CAAoB;IAAA,UAElFH;EAAQ,EACI;AAEnB,CAAC;AAED,wCAAAH,eAAe,CAACO,SAAS,GAAG;EAC1B;AACF;AACA;EACEL,SAAS,EAAER,SAAS,CAACc,MAAM;EAC3B;AACF;AACA;EACEP,OAAO,EAAEP,SAAS,CAACe,KAAK,CAAC;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEX,SAAS,CAACc,MAAM;IACtB;AACJ;AACA;IACIF,WAAW,EAAEZ,SAAS,CAACc;EACzB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACEN,aAAa,EAAEV,SAAS,CAACiB,IAAI;EAC7B;AACF;AACA;EACER,QAAQ,EAAET,SAAS,CAACkB,IAAI,CAACF;AAC3B,CAAC;AAED,eAAed,UAAU,CAACG,MAAM,EAAE;EAAEc,IAAI,EAAE;AAAkB,CAAC,CAAC,CAACb,eAAe,CAAC"}
1
+ {"version":3,"file":"DialogContent.js","names":["React","PropTypes","DialogContent","withStyles","clsx","HvTypography","styles","HvDialogContent","classes","className","children","indentContent","others","root","textContent","propTypes","string","shape","isRequired","bool","node","name"],"sources":["../../../../src/Dialog/DialogContent/DialogContent.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { DialogContent } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport clsx from \"clsx\";\nimport HvTypography from \"../../Typography\";\nimport styles from \"./styles\";\n\nconst HvDialogContent = ({ classes, className, children, indentContent = false, ...others }) => {\n return (\n <HvTypography\n component={DialogContent}\n className={clsx(className, classes.root, { [classes.textContent]: indentContent })}\n {...others}\n >\n {children}\n </HvTypography>\n );\n};\n\nHvDialogContent.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the content).\n */\n root: PropTypes.string,\n /**\n * Style applied when the content is indented.\n */\n textContent: PropTypes.string,\n }).isRequired,\n /**\n * Content should be indented in relationship to the Dialog title.\n */\n indentContent: PropTypes.bool,\n /**\n * Content to be rendered.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDialogContent\" })(HvDialogContent);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,MAAM,MAAM,UAAU;AAAC;AAE9B,IAAMC,eAAe,GAAG,SAAlBA,eAAe,OAA2E;EAAA,IAArEC,OAAO,QAAPA,OAAO;IAAEC,SAAS,QAATA,SAAS;IAAEC,QAAQ,QAARA,QAAQ;IAAA,0BAAEC,aAAa;IAAbA,aAAa,mCAAG,KAAK;IAAKC,MAAM;EACvF,oBACE,KAAC,YAAY;IACX,SAAS,EAAEV,aAAc;IACzB,SAAS,EAAEE,IAAI,CAACK,SAAS,EAAED,OAAO,CAACK,IAAI,EAA2BF,aAAa,IAAnCH,OAAO,CAACM,WAAW;EAAoB,GAC/EF,MAAM;IAAA,UAETF;EAAQ,GACI;AAEnB,CAAC;AAED,wCAAAH,eAAe,CAACQ,SAAS,GAAG;EAC1B;AACF;AACA;EACEN,SAAS,EAAER,SAAS,CAACe,MAAM;EAC3B;AACF;AACA;EACER,OAAO,EAAEP,SAAS,CAACgB,KAAK,CAAC;IACvB;AACJ;AACA;IACIJ,IAAI,EAAEZ,SAAS,CAACe,MAAM;IACtB;AACJ;AACA;IACIF,WAAW,EAAEb,SAAS,CAACe;EACzB,CAAC,CAAC,CAACE,UAAU;EACb;AACF;AACA;EACEP,aAAa,EAAEV,SAAS,CAACkB,IAAI;EAC7B;AACF;AACA;EACET,QAAQ,EAAET,SAAS,CAACmB,IAAI,CAACF;AAC3B,CAAC;AAED,eAAef,UAAU,CAACG,MAAM,EAAE;EAAEe,IAAI,EAAE;AAAkB,CAAC,CAAC,CAACd,eAAe,CAAC"}
@@ -2,11 +2,10 @@ var styles = function styles(theme) {
2
2
  return {
3
3
  root: {
4
4
  padding: theme.hvSpacing(0, "sm", "sm", "sm"),
5
- flex: "none"
5
+ flex: 1
6
6
  },
7
7
  textContent: {
8
- marginLeft: "42px",
9
- paddingRight: "62px",
8
+ margin: "0 42px",
10
9
  flex: 1,
11
10
  overflowY: "auto"
12
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","flex","textContent","marginLeft","paddingRight","overflowY"],"sources":["../../../../src/Dialog/DialogContent/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(0, \"sm\", \"sm\", \"sm\"),\n flex: \"none\",\n },\n textContent: {\n marginLeft: \"42px\",\n paddingRight: \"62px\",\n flex: 1,\n overflowY: \"auto\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;MAC7CC,IAAI,EAAE;IACR,CAAC;IACDC,WAAW,EAAE;MACXC,UAAU,EAAE,MAAM;MAClBC,YAAY,EAAE,MAAM;MACpBH,IAAI,EAAE,CAAC;MACPI,SAAS,EAAE;IACb;EACF,CAAC;AAAA,CAAC;AAEF,eAAeT,MAAM"}
1
+ {"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","flex","textContent","margin","overflowY"],"sources":["../../../../src/Dialog/DialogContent/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(0, \"sm\", \"sm\", \"sm\"),\n flex: 1,\n },\n textContent: {\n margin: \"0 42px\",\n flex: 1,\n overflowY: \"auto\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;MAC7CC,IAAI,EAAE;IACR,CAAC;IACDC,WAAW,EAAE;MACXC,MAAM,EAAE,QAAQ;MAChBF,IAAI,EAAE,CAAC;MACPG,SAAS,EAAE;IACb;EACF,CAAC;AAAA,CAAC;AAEF,eAAeR,MAAM"}
@@ -32,14 +32,9 @@ var HvDialogTitle = function HvDialogTitle(_ref) {
32
32
  customIcon = _ref$customIcon === void 0 ? null : _ref$customIcon,
33
33
  others = _objectWithoutProperties(_ref, _excluded);
34
34
  var isString = typeof children === "string";
35
- var fullscreen = others.fullscreen;
36
-
37
- // prevent the `fullscreen` prop from being passed to the `DialogTitle` component
38
- // eslint-disable-next-line no-param-reassign
39
- delete others.fullscreen;
40
35
  var icon = customIcon || showIcon && iconVariant(variant);
41
36
  return /*#__PURE__*/_jsx(DialogTitle, _objectSpread(_objectSpread({
42
- className: clsx(classes.root, className, fullscreen && "fullscreen")
37
+ className: clsx(classes.root, className)
43
38
  }, others), {}, {
44
39
  children: /*#__PURE__*/_jsxs("div", {
45
40
  className: classes.messageContainer,
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.js","names":["React","PropTypes","clsx","DialogTitle","withStyles","HvTypography","iconVariant","styles","HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","fullscreen","icon","root","messageContainer","textWithIcon","propTypes","string","shape","closeButton","isRequired","oneOf","bool","node","name"],"sources":["../../../../src/Dialog/DialogTitle/DialogTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { DialogTitle } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport HvTypography from \"../../Typography\";\nimport iconVariant from \"../../utils/iconVariant\";\nimport styles from \"./styles\";\n\nconst HvDialogTitle = ({\n classes,\n className,\n children,\n variant = \"default\",\n showIcon = true,\n customIcon = null,\n ...others\n}) => {\n const isString = typeof children === \"string\";\n const { fullscreen } = others;\n\n // prevent the `fullscreen` prop from being passed to the `DialogTitle` component\n // eslint-disable-next-line no-param-reassign\n delete others.fullscreen;\n\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n return (\n <DialogTitle\n className={clsx(classes.root, className, fullscreen ? \"fullscreen\" : \"\")}\n {...others}\n >\n <div className={classes.messageContainer}>\n {icon}\n <div className={clsx({ [classes.textWithIcon]: icon })}>\n {!isString && children}\n {isString && <HvTypography variant=\"xxsTitle\">{children}</HvTypography>}\n </div>\n </div>\n </DialogTitle>\n );\n};\n\nHvDialogTitle.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the title).\n */\n root: PropTypes.string,\n /**\n * Style applied to the container of the title\n */\n messageContainer: PropTypes.string,\n /**\n * Style applied to the text when the icon is present.\n */\n textWithIcon: PropTypes.string,\n /**\n * Style applied to the icon.\n */\n icon: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Variant of the Dialog.\n */\n variant: PropTypes.oneOf([\"success\", \"warning\", \"error\", \"info\", \"default\"]),\n /**\n * Controls if the associated icon to the variant should be shown.\n */\n showIcon: PropTypes.bool,\n /**\n * Custom icon to replace the variant default.\n */\n customIcon: PropTypes.node,\n /**\n * Node to be render.\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDialogTitle\" })(HvDialogTitle);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,MAAM;AACvB,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,MAAM,MAAM,UAAU;AAAC;AAAA;AAE9B,IAAMC,aAAa,GAAG,SAAhBA,aAAa,OAQb;EAAA,IAPJC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IAAA,oBACRC,OAAO;IAAPA,OAAO,6BAAG,SAAS;IAAA,qBACnBC,QAAQ;IAARA,QAAQ,8BAAG,IAAI;IAAA,uBACfC,UAAU;IAAVA,UAAU,gCAAG,IAAI;IACdC,MAAM;EAET,IAAMC,QAAQ,GAAG,OAAOL,QAAQ,KAAK,QAAQ;EAC7C,IAAQM,UAAU,GAAKF,MAAM,CAArBE,UAAU;;EAElB;EACA;EACA,OAAOF,MAAM,CAACE,UAAU;EAExB,IAAMC,IAAI,GAAGJ,UAAU,IAAKD,QAAQ,IAAIP,WAAW,CAACM,OAAO,CAAE;EAE7D,oBACE,KAAC,WAAW;IACV,SAAS,EAAEV,IAAI,CAACO,OAAO,CAACU,IAAI,EAAET,SAAS,EAAEO,UAAU,IAAG,YAAY;EAAO,GACrEF,MAAM;IAAA,uBAEV;MAAK,SAAS,EAAEN,OAAO,CAACW,gBAAiB;MAAA,WACtCF,IAAI,eACL;QAAK,SAAS,EAAEhB,IAAI,CAA2BgB,IAAI,IAA3BT,OAAO,CAACY,YAAY,CAAW;QAAA,WACpD,CAACL,QAAQ,IAAIL,QAAQ,EACrBK,QAAQ,iBAAI,KAAC,YAAY;UAAC,OAAO,EAAC,UAAU;UAAA,UAAEL;QAAQ,EAAgB;MAAA,EACnE;IAAA;EACF,GACM;AAElB,CAAC;AAED,wCAAAH,aAAa,CAACc,SAAS,GAAG;EACxB;AACF;AACA;EACEZ,SAAS,EAAET,SAAS,CAACsB,MAAM;EAC3B;AACF;AACA;EACEd,OAAO,EAAER,SAAS,CAACuB,KAAK,CAAC;IACvB;AACJ;AACA;IACIL,IAAI,EAAElB,SAAS,CAACsB,MAAM;IACtB;AACJ;AACA;IACIH,gBAAgB,EAAEnB,SAAS,CAACsB,MAAM;IAClC;AACJ;AACA;IACIF,YAAY,EAAEpB,SAAS,CAACsB,MAAM;IAC9B;AACJ;AACA;IACIL,IAAI,EAAEjB,SAAS,CAACsB,MAAM;IACtB;AACJ;AACA;IACIE,WAAW,EAAExB,SAAS,CAACsB;EACzB,CAAC,CAAC,CAACG,UAAU;EACb;AACF;AACA;EACEd,OAAO,EAAEX,SAAS,CAAC0B,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;EAC5E;AACF;AACA;EACEd,QAAQ,EAAEZ,SAAS,CAAC2B,IAAI;EACxB;AACF;AACA;EACEd,UAAU,EAAEb,SAAS,CAAC4B,IAAI;EAC1B;AACF;AACA;EACElB,QAAQ,EAAEV,SAAS,CAAC4B,IAAI,CAACH;AAC3B,CAAC;AAED,eAAetB,UAAU,CAACG,MAAM,EAAE;EAAEuB,IAAI,EAAE;AAAgB,CAAC,CAAC,CAACtB,aAAa,CAAC"}
1
+ {"version":3,"file":"DialogTitle.js","names":["React","PropTypes","clsx","DialogTitle","withStyles","HvTypography","iconVariant","styles","HvDialogTitle","classes","className","children","variant","showIcon","customIcon","others","isString","icon","root","messageContainer","textWithIcon","propTypes","string","shape","closeButton","isRequired","oneOf","bool","node","name"],"sources":["../../../../src/Dialog/DialogTitle/DialogTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { DialogTitle } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport HvTypography from \"../../Typography\";\nimport iconVariant from \"../../utils/iconVariant\";\nimport styles from \"./styles\";\n\nconst HvDialogTitle = ({\n classes,\n className,\n children,\n variant = \"default\",\n showIcon = true,\n customIcon = null,\n ...others\n}) => {\n const isString = typeof children === \"string\";\n\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n return (\n <DialogTitle className={clsx(classes.root, className)} {...others}>\n <div className={classes.messageContainer}>\n {icon}\n <div className={clsx({ [classes.textWithIcon]: icon })}>\n {!isString && children}\n {isString && <HvTypography variant=\"xxsTitle\">{children}</HvTypography>}\n </div>\n </div>\n </DialogTitle>\n );\n};\n\nHvDialogTitle.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component (container for the title).\n */\n root: PropTypes.string,\n /**\n * Style applied to the container of the title\n */\n messageContainer: PropTypes.string,\n /**\n * Style applied to the text when the icon is present.\n */\n textWithIcon: PropTypes.string,\n /**\n * Style applied to the icon.\n */\n icon: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Variant of the Dialog.\n */\n variant: PropTypes.oneOf([\"success\", \"warning\", \"error\", \"info\", \"default\"]),\n /**\n * Controls if the associated icon to the variant should be shown.\n */\n showIcon: PropTypes.bool,\n /**\n * Custom icon to replace the variant default.\n */\n customIcon: PropTypes.node,\n /**\n * Node to be render.\n */\n children: PropTypes.node.isRequired,\n};\n\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EX,SAAS,EAAET,SAAS,CAACqB,MAAM;EAC3B;AACF;AACA;EACEb,OAAO,EAAER,SAAS,CAACsB,KAAK,CAAC;IACvB;AACJ;AACA;IACIL,IAAI,EAAEjB,SAAS,CAACqB,MAAM;IACtB;AACJ;AACA;IACIH,gBAAgB,EAAElB,SAAS,CAACqB,MAAM;IAClC;AACJ;AACA;IACIF,YAAY,EAAEnB,SAAS,CAACqB,MAAM;IAC9B;AACJ;AACA;IACIL,IAAI,EAAEhB,SAAS,CAACqB,MAAM;IACtB;AACJ;AACA;IACIE,WAAW,EAAEvB,SAAS,CAACqB;EACzB,CAAC,CAAC,CAACG,UAAU;EACb;AACF;AACA;EACEb,OAAO,EAAEX,SAAS,CAACyB,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;EAC5E;AACF;AACA;EACEb,QAAQ,EAAEZ,SAAS,CAAC0B,IAAI;EACxB;AACF;AACA;EACEb,UAAU,EAAEb,SAAS,CAAC2B,IAAI;EAC1B;AACF;AACA;EACEjB,QAAQ,EAAEV,SAAS,CAAC2B,IAAI,CAACH;AAC3B,CAAC;AAED,eAAerB,UAAU,CAACG,MAAM,EAAE;EAAEsB,IAAI,EAAE;AAAgB,CAAC,CAAC,CAACrB,aAAa,CAAC"}
@@ -2,10 +2,7 @@ var styles = function styles(theme) {
2
2
  return {
3
3
  root: {
4
4
  padding: theme.hvSpacing("sm"),
5
- margin: 0,
6
- "&:not(.fullscreen)": {
7
- flex: 1
8
- }
5
+ margin: 0
9
6
  },
10
7
  messageContainer: {
11
8
  display: "flex",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","margin","flex","messageContainer","display","alignItems","textWithIcon","marginLeft","marginRight","icon","hv","spacing","md","width","height"],"sources":["../../../../src/Dialog/DialogTitle/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(\"sm\"),\n margin: 0,\n \"&:not(.fullscreen)\": {\n flex: 1,\n },\n },\n messageContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n textWithIcon: {\n marginLeft: theme.hvSpacing(\"xs\"),\n // 32px is the icon width\n marginRight: `calc(32px + ${theme.hvSpacing(\"xs\")})`,\n },\n icon: {\n marginRight: theme.hv.spacing.md,\n width: 48,\n height: 48,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;MAC9BC,MAAM,EAAE,CAAC;MACT,oBAAoB,EAAE;QACpBC,IAAI,EAAE;MACR;IACF,CAAC;IACDC,gBAAgB,EAAE;MAChBC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZC,UAAU,EAAEV,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;MACjC;MACAQ,WAAW,wBAAiBX,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;IACnD,CAAC;IACDS,IAAI,EAAE;MACJD,WAAW,EAAEX,KAAK,CAACa,EAAE,CAACC,OAAO,CAACC,EAAE;MAChCC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAC;AAAA,CAAC;AAEF,eAAelB,MAAM"}
1
+ {"version":3,"file":"styles.js","names":["styles","theme","root","padding","hvSpacing","margin","messageContainer","display","alignItems","textWithIcon","marginLeft","marginRight","icon","hv","spacing","md","width","height"],"sources":["../../../../src/Dialog/DialogTitle/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: theme.hvSpacing(\"sm\"),\n margin: 0,\n },\n messageContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n textWithIcon: {\n marginLeft: theme.hvSpacing(\"xs\"),\n // 32px is the icon width\n marginRight: `calc(32px + ${theme.hvSpacing(\"xs\")})`,\n },\n icon: {\n marginRight: theme.hv.spacing.md,\n width: 48,\n height: 48,\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,IAAI,EAAE;MACJC,OAAO,EAAEF,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;MAC9BC,MAAM,EAAE;IACV,CAAC;IACDC,gBAAgB,EAAE;MAChBC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZC,UAAU,EAAET,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;MACjC;MACAO,WAAW,wBAAiBV,KAAK,CAACG,SAAS,CAAC,IAAI,CAAC;IACnD,CAAC;IACDQ,IAAI,EAAE;MACJD,WAAW,EAAEV,KAAK,CAACY,EAAE,CAACC,OAAO,CAACC,EAAE;MAChCC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAC;AAAA,CAAC;AAEF,eAAejB,MAAM"}
@@ -5,16 +5,20 @@ var styles = function styles(theme) {
5
5
  background: fade(theme.hv.palette.atmosphere.atmo4, 0.8)
6
6
  },
7
7
  paper: {
8
- background: "".concat(theme.hv.palette.atmosphere.atmo1),
9
- padding: "0px",
8
+ background: theme.hv.palette.atmosphere.atmo1,
9
+ padding: 0,
10
10
  overflow: "auto",
11
11
  boxShadow: theme.hv.shadows[1],
12
- "&:not(.fullscreen)": {
13
- maxHeight: "calc(100% - 200px)",
14
- display: "flex",
15
- flexDirection: "column"
12
+ maxHeight: "calc(100% - 200px)",
13
+ "@media (max-height:720px)": {
14
+ maxHeight: "calc(100% - 40px)" // "sm" margin
15
+ },
16
+
17
+ "&$fullscreen": {
18
+ maxHeight: "none"
16
19
  }
17
20
  },
21
+ fullscreen: {},
18
22
  closeButton: {
19
23
  padding: 0,
20
24
  minWidth: "inherit",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["fade","styles","theme","background","hv","palette","atmosphere","atmo4","paper","atmo1","padding","overflow","boxShadow","shadows","maxHeight","display","flexDirection","closeButton","minWidth","position","top","hvSpacing","right"],"sources":["../../../src/Dialog/styles.js"],"sourcesContent":["import fade from \"../utils/hexToRgbA\";\n\nconst styles = (theme) => ({\n background: {\n background: fade(theme.hv.palette.atmosphere.atmo4, 0.8),\n },\n paper: {\n background: `${theme.hv.palette.atmosphere.atmo1}`,\n padding: \"0px\",\n overflow: \"auto\",\n boxShadow: theme.hv.shadows[1],\n \"&:not(.fullscreen)\": {\n maxHeight: \"calc(100% - 200px)\",\n display: \"flex\",\n flexDirection: \"column\",\n },\n },\n closeButton: {\n padding: 0,\n minWidth: \"inherit\",\n position: \"absolute\",\n top: theme.hvSpacing(\"sm\"),\n right: theme.hvSpacing(\"sm\"),\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,oBAAoB;AAErC,IAAMC,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,UAAU,EAAE;MACVA,UAAU,EAAEH,IAAI,CAACE,KAAK,CAACE,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK,EAAE,GAAG;IACzD,CAAC;IACDC,KAAK,EAAE;MACLL,UAAU,YAAKD,KAAK,CAACE,EAAE,CAACC,OAAO,CAACC,UAAU,CAACG,KAAK,CAAE;MAClDC,OAAO,EAAE,KAAK;MACdC,QAAQ,EAAE,MAAM;MAChBC,SAAS,EAAEV,KAAK,CAACE,EAAE,CAACS,OAAO,CAAC,CAAC,CAAC;MAC9B,oBAAoB,EAAE;QACpBC,SAAS,EAAE,oBAAoB;QAC/BC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE;MACjB;IACF,CAAC;IACDC,WAAW,EAAE;MACXP,OAAO,EAAE,CAAC;MACVQ,QAAQ,EAAE,SAAS;MACnBC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAElB,KAAK,CAACmB,SAAS,CAAC,IAAI,CAAC;MAC1BC,KAAK,EAAEpB,KAAK,CAACmB,SAAS,CAAC,IAAI;IAC7B;EACF,CAAC;AAAA,CAAC;AAEF,eAAepB,MAAM"}
1
+ {"version":3,"file":"styles.js","names":["fade","styles","theme","background","hv","palette","atmosphere","atmo4","paper","atmo1","padding","overflow","boxShadow","shadows","maxHeight","fullscreen","closeButton","minWidth","position","top","hvSpacing","right"],"sources":["../../../src/Dialog/styles.js"],"sourcesContent":["import fade from \"../utils/hexToRgbA\";\n\nconst styles = (theme) => ({\n background: {\n background: fade(theme.hv.palette.atmosphere.atmo4, 0.8),\n },\n paper: {\n background: theme.hv.palette.atmosphere.atmo1,\n padding: 0,\n overflow: \"auto\",\n boxShadow: theme.hv.shadows[1],\n maxHeight: \"calc(100% - 200px)\",\n \"@media (max-height:720px)\": {\n maxHeight: \"calc(100% - 40px)\", // \"sm\" margin\n },\n \"&$fullscreen\": {\n maxHeight: \"none\",\n },\n },\n fullscreen: {},\n closeButton: {\n padding: 0,\n minWidth: \"inherit\",\n position: \"absolute\",\n top: theme.hvSpacing(\"sm\"),\n right: theme.hvSpacing(\"sm\"),\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,oBAAoB;AAErC,IAAMC,MAAM,GAAG,SAATA,MAAM,CAAIC,KAAK;EAAA,OAAM;IACzBC,UAAU,EAAE;MACVA,UAAU,EAAEH,IAAI,CAACE,KAAK,CAACE,EAAE,CAACC,OAAO,CAACC,UAAU,CAACC,KAAK,EAAE,GAAG;IACzD,CAAC;IACDC,KAAK,EAAE;MACLL,UAAU,EAAED,KAAK,CAACE,EAAE,CAACC,OAAO,CAACC,UAAU,CAACG,KAAK;MAC7CC,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE,MAAM;MAChBC,SAAS,EAAEV,KAAK,CAACE,EAAE,CAACS,OAAO,CAAC,CAAC,CAAC;MAC9BC,SAAS,EAAE,oBAAoB;MAC/B,2BAA2B,EAAE;QAC3BA,SAAS,EAAE,mBAAmB,CAAE;MAClC,CAAC;;MACD,cAAc,EAAE;QACdA,SAAS,EAAE;MACb;IACF,CAAC;IACDC,UAAU,EAAE,CAAC,CAAC;IACdC,WAAW,EAAE;MACXN,OAAO,EAAE,CAAC;MACVO,QAAQ,EAAE,SAAS;MACnBC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAEjB,KAAK,CAACkB,SAAS,CAAC,IAAI,CAAC;MAC1BC,KAAK,EAAEnB,KAAK,CAACkB,SAAS,CAAC,IAAI;IAC7B;EACF,CAAC;AAAA,CAAC;AAEF,eAAenB,MAAM"}
@@ -143,6 +143,10 @@ export interface HvDropdownProps
143
143
  * Experimental. Height of the dropdown, in case you want to control it from a prop. Styles can also be used through dropdownListContainer class. Required in case virtualized is used
144
144
  */
145
145
  height?: number;
146
+ /**
147
+ * Experimental. Max height of the dropdown, in case you want to control it from a prop. Styles can also be used through dropdownListContainer class.
148
+ */
149
+ maxHeight?: number;
146
150
  /**
147
151
  * Experimental. Uses dropdown in a virtualized form, where not all options are rendered initially. Good for use cases with a lot of options.
148
152
  */
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["classes", "className", "id", "name", "required", "disabled", "readOnly", "label", "aria-label", "aria-labelledby", "description", "aria-describedby", "placeholder", "onChange", "status", "statusMessage", "aria-errormessage", "onCancel", "onToggle", "onClickOutside", "onFocus", "onBlur", "values", "multiSelect", "showSearch", "expanded", "defaultExpanded", "notifyChangesOnFirstRender", "labels", "hasTooltips", "disablePortal", "singleSelectionToggle", "placement", "variableWidth", "popperProps", "height", "virtualized", "baseDropdownProps", "listProps"];
5
+ var _excluded = ["classes", "className", "id", "name", "required", "disabled", "readOnly", "label", "aria-label", "aria-labelledby", "description", "aria-describedby", "placeholder", "onChange", "status", "statusMessage", "aria-errormessage", "onCancel", "onToggle", "onClickOutside", "onFocus", "onBlur", "values", "multiSelect", "showSearch", "expanded", "defaultExpanded", "notifyChangesOnFirstRender", "labels", "hasTooltips", "disablePortal", "singleSelectionToggle", "placement", "variableWidth", "popperProps", "height", "maxHeight", "virtualized", "baseDropdownProps", "listProps"];
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
  import "core-js/modules/es.function.name.js";
@@ -93,6 +93,7 @@ var HvDropdown = function HvDropdown(props) {
93
93
  _props$popperProps = props.popperProps,
94
94
  popperProps = _props$popperProps === void 0 ? {} : _props$popperProps,
95
95
  height = props.height,
96
+ maxHeight = props.maxHeight,
96
97
  _props$virtualized = props.virtualized,
97
98
  virtualized = _props$virtualized === void 0 ? false : _props$virtualized,
98
99
  _props$baseDropdownPr = props.baseDropdownProps,
@@ -316,6 +317,7 @@ var HvDropdown = function HvDropdown(props) {
316
317
  singleSelectionToggle: singleSelectionToggle,
317
318
  "aria-labelledby": hasLabel ? setId(elementId, "label") : undefined,
318
319
  height: height,
320
+ maxHeight: maxHeight,
319
321
  virtualized: virtualized
320
322
  }, listProps))
321
323
  })), canShowError && /*#__PURE__*/_jsx(HvWarningText, {
@@ -578,6 +580,10 @@ process.env.NODE_ENV !== "production" ? HvDropdown.propTypes = {
578
580
  * Experimental. Height of the dropdown, in case you want to control it from a prop. Styles can also be used through dropdownListContainer class. Required in case virtualized is used
579
581
  */
580
582
  height: PropTypes.number,
583
+ /**
584
+ * Experimental. Max height of the dropdown, in case you want to control it from a prop. Styles can also be used through dropdownListContainer class.
585
+ */
586
+ maxHeight: PropTypes.number,
581
587
  /**
582
588
  * Experimental. Uses dropdown in a virtualized form, where not all options are rendered initially. Good for use cases with a lot of options.
583
589
  */