@hitachivantara/uikit-react-core 5.19.0 → 5.19.2

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/cjs/components/Dialog/Actions/Actions.cjs +14 -7
  2. package/dist/cjs/components/Dialog/Actions/Actions.cjs.map +1 -1
  3. package/dist/cjs/components/Dialog/Actions/Actions.styles.cjs +18 -38
  4. package/dist/cjs/components/Dialog/Actions/Actions.styles.cjs.map +1 -1
  5. package/dist/cjs/components/Dialog/Content/Content.cjs +11 -6
  6. package/dist/cjs/components/Dialog/Content/Content.cjs.map +1 -1
  7. package/dist/cjs/components/Dialog/Content/Content.styles.cjs +13 -32
  8. package/dist/cjs/components/Dialog/Content/Content.styles.cjs.map +1 -1
  9. package/dist/cjs/components/Dialog/Dialog.cjs +55 -53
  10. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
  11. package/dist/cjs/components/Dialog/Dialog.styles.cjs +0 -31
  12. package/dist/cjs/components/Dialog/Dialog.styles.cjs.map +1 -1
  13. package/dist/cjs/components/Dialog/Title/Title.cjs +22 -11
  14. package/dist/cjs/components/Dialog/Title/Title.cjs.map +1 -1
  15. package/dist/cjs/components/Dialog/Title/Title.styles.cjs +18 -64
  16. package/dist/cjs/components/Dialog/Title/Title.styles.cjs.map +1 -1
  17. package/dist/cjs/components/Drawer/Drawer.cjs +4 -5
  18. package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
  19. package/dist/cjs/components/InlineEditor/InlineEditor.cjs +5 -10
  20. package/dist/cjs/components/InlineEditor/InlineEditor.cjs.map +1 -1
  21. package/dist/cjs/components/Input/Input.cjs +10 -10
  22. package/dist/cjs/components/Input/Input.cjs.map +1 -1
  23. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
  24. package/dist/cjs/components/QueryBuilder/QueryBuilder.cjs.map +1 -1
  25. package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.cjs.map +1 -1
  26. package/dist/cjs/components/Snackbar/SnackbarProvider/SnackbarProvider.cjs +1 -1
  27. package/dist/cjs/components/Snackbar/SnackbarProvider/SnackbarProvider.cjs.map +1 -1
  28. package/dist/cjs/components/Table/TableCell/TableCell.cjs +6 -6
  29. package/dist/cjs/components/Table/TableCell/TableCell.cjs.map +1 -1
  30. package/dist/cjs/components/Table/TableRow/TableRow.cjs +6 -5
  31. package/dist/cjs/components/Table/TableRow/TableRow.cjs.map +1 -1
  32. package/dist/cjs/index.cjs +10 -10
  33. package/dist/cjs/utils/theme.cjs +6 -7
  34. package/dist/cjs/utils/theme.cjs.map +1 -1
  35. package/dist/esm/components/Dialog/Actions/Actions.js +15 -9
  36. package/dist/esm/components/Dialog/Actions/Actions.js.map +1 -1
  37. package/dist/esm/components/Dialog/Actions/Actions.styles.js +18 -35
  38. package/dist/esm/components/Dialog/Actions/Actions.styles.js.map +1 -1
  39. package/dist/esm/components/Dialog/Content/Content.js +14 -8
  40. package/dist/esm/components/Dialog/Content/Content.js.map +1 -1
  41. package/dist/esm/components/Dialog/Content/Content.styles.js +13 -30
  42. package/dist/esm/components/Dialog/Content/Content.styles.js.map +1 -1
  43. package/dist/esm/components/Dialog/Dialog.js +55 -54
  44. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  45. package/dist/esm/components/Dialog/Dialog.styles.js +0 -29
  46. package/dist/esm/components/Dialog/Dialog.styles.js.map +1 -1
  47. package/dist/esm/components/Dialog/Title/Title.js +23 -13
  48. package/dist/esm/components/Dialog/Title/Title.js.map +1 -1
  49. package/dist/esm/components/Dialog/Title/Title.styles.js +18 -61
  50. package/dist/esm/components/Dialog/Title/Title.styles.js.map +1 -1
  51. package/dist/esm/components/Drawer/Drawer.js +4 -5
  52. package/dist/esm/components/Drawer/Drawer.js.map +1 -1
  53. package/dist/esm/components/InlineEditor/InlineEditor.js +5 -10
  54. package/dist/esm/components/InlineEditor/InlineEditor.js.map +1 -1
  55. package/dist/esm/components/Input/Input.js +10 -10
  56. package/dist/esm/components/Input/Input.js.map +1 -1
  57. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  58. package/dist/esm/components/QueryBuilder/QueryBuilder.js.map +1 -1
  59. package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js.map +1 -1
  60. package/dist/esm/components/Snackbar/SnackbarProvider/SnackbarProvider.js +1 -1
  61. package/dist/esm/components/Snackbar/SnackbarProvider/SnackbarProvider.js.map +1 -1
  62. package/dist/esm/components/Table/TableCell/TableCell.js +6 -6
  63. package/dist/esm/components/Table/TableCell/TableCell.js.map +1 -1
  64. package/dist/esm/components/Table/TableRow/TableRow.js +6 -5
  65. package/dist/esm/components/Table/TableRow/TableRow.js.map +1 -1
  66. package/dist/esm/index.js +218 -218
  67. package/dist/esm/utils/theme.js +6 -7
  68. package/dist/esm/utils/theme.js.map +1 -1
  69. package/dist/types/index.d.ts +144 -120
  70. package/package.json +5 -5
  71. package/dist/cjs/components/Dialog/Actions/actionsClasses.cjs +0 -8
  72. package/dist/cjs/components/Dialog/Actions/actionsClasses.cjs.map +0 -1
  73. package/dist/cjs/components/Dialog/Content/contentClasses.cjs +0 -8
  74. package/dist/cjs/components/Dialog/Content/contentClasses.cjs.map +0 -1
  75. package/dist/cjs/components/Dialog/Title/titleClasses.cjs +0 -8
  76. package/dist/cjs/components/Dialog/Title/titleClasses.cjs.map +0 -1
  77. package/dist/esm/components/Dialog/Actions/actionsClasses.js +0 -8
  78. package/dist/esm/components/Dialog/Actions/actionsClasses.js.map +0 -1
  79. package/dist/esm/components/Dialog/Content/contentClasses.js +0 -8
  80. package/dist/esm/components/Dialog/Content/contentClasses.js.map +0 -1
  81. package/dist/esm/components/Dialog/Title/titleClasses.js +0 -8
  82. package/dist/esm/components/Dialog/Title/titleClasses.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme.cjs","sources":["../../../src/utils/theme.ts"],"sourcesContent":["/* eslint import/namespace: [2, { allowComputed: true }] */\nimport { CSSProperties } from \"react\";\nimport {\n themes,\n HvThemeColorModeStructure,\n HvThemeStructure,\n theme,\n} from \"@hitachivantara/uikit-styles\";\nimport { HvTheme, HvCreateThemeProps } from \"@core/types\";\n\n/**\n * Sets the element style properties.\n */\nconst setElementStyle = (element: HTMLElement, style: CSSProperties) => {\n Object.entries(style).forEach(([property, value]) => {\n element.style[property] = value;\n });\n};\n\n/**\n * Sets the element attributes and style for a theme and color mode.\n */\nexport const setElementAttrs = (\n themeName: string,\n modeName: string,\n colorScheme: string,\n themeRootId?: string\n) => {\n const element = themeRootId\n ? document.getElementById(themeRootId)\n : document.body;\n\n if (element) {\n element.setAttribute(`data-theme`, themeName);\n element.setAttribute(`data-color-mode`, modeName);\n\n // Set default properties for all components to inherit\n setElementStyle(element, {\n colorScheme,\n backgroundColor: theme.colors.backgroundColor,\n accentColor: theme.colors.secondary,\n color: theme.colors.secondary,\n fontSize: theme.typography.body.fontSize,\n fontWeight: theme.typography.body.fontWeight,\n lineHeight: theme.typography.body.lineHeight,\n letterSpacing: theme.typography.body.letterSpacing,\n fontFamily: theme.fontFamily.body,\n });\n }\n};\n\n/**\n * Applies customizations to a theme.\n */\nconst applyThemeCustomizations = (obj: object, customizations: object) => {\n const isObject = (val: any) =>\n val && typeof val === \"object\" && !Array.isArray(val);\n\n // Customized theme\n const customizedTheme = { ...obj };\n\n // Add new values to the theme or replace values\n Object.keys(customizations).forEach((key) => {\n if (customizedTheme[key]) {\n if (isObject(customizedTheme[key]) && isObject(customizations[key])) {\n customizedTheme[key] = applyThemeCustomizations(\n customizedTheme[key],\n customizations[key]\n );\n } else if (typeof customizedTheme[key] === typeof customizations[key]) {\n customizedTheme[key] = customizations[key];\n }\n } else {\n customizedTheme[key] = customizations[key];\n }\n });\n\n return customizedTheme;\n};\n\n/**\n * Creates a customized theme based on the base theme and customizations given.\n * For the color modes, the colors that are not defined will be replaced by the values from the dawn mode of the base theme.\n */\nexport const createTheme = (\n props: HvCreateThemeProps\n): HvTheme | HvThemeStructure => {\n const {\n name,\n base = \"ds5\",\n inheritColorModes = true,\n ...customizations\n } = props;\n\n // Apply customizations to the base theme\n const customizedTheme: HvTheme | HvThemeStructure = customizations\n ? (applyThemeCustomizations(themes[base], customizations) as HvTheme)\n : { ...themes[base] };\n\n // Set theme name\n customizedTheme.name = name.trim();\n // Set theme base\n customizedTheme.base = base;\n\n // Fill new color modes with missing colors\n if (customizations) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!themes[base].colors.modes[mode]) {\n customizedTheme.colors.modes[mode] = {\n ...themes[base].colors.modes.dawn,\n ...(customizedTheme.colors.modes[mode] as Partial<\n HvThemeColorModeStructure & { [key: string]: string }\n >),\n };\n }\n });\n }\n\n // If the flag `inheritColorModes` is false and customizations were given for the color modes,\n // we're removing any color modes that might have been inherited\n if (!inheritColorModes && customizations.colors?.modes) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!Object.keys(customizations.colors?.modes || {}).includes(mode)) {\n delete customizedTheme.colors.modes[mode];\n }\n });\n }\n\n // Created theme\n return customizedTheme;\n};\n\n/**\n * Process the themes provided to the HvProvider:\n * - Cleans themes with the same name\n * - Returns the default if the list is empty (ds5)\n */\nexport const processThemes = (\n themesList?: (HvTheme | HvThemeStructure)[]\n): (HvTheme | HvThemeStructure)[] => {\n if (themesList && Array.isArray(themesList) && themesList.length > 0) {\n const list: (HvTheme | HvThemeStructure)[] = [];\n\n themesList.forEach((thm) => {\n const i: number = list.findIndex(\n (t) => t.name.trim() === thm.name.trim()\n );\n\n if (i !== -1) {\n list.splice(i, 1);\n list.push(thm);\n } else {\n list.push(thm);\n }\n });\n\n // Cleaned themes\n return list;\n }\n // DS5\n return [themes.ds5];\n};\n\n/**\n * Returns the computed value of a theme CSS var\n */\nexport const getVarValue = (cssVar: string): string => {\n const tempEl = document.createElement(\"div\");\n tempEl.style.setProperty(\"--temp\", cssVar);\n document.body.appendChild(tempEl);\n const computedValue = getComputedStyle(tempEl)\n .getPropertyValue(\"--temp\")\n .trim();\n document.body.removeChild(tempEl);\n return computedValue;\n};\n"],"names":["setElementStyle","element","style","entries","forEach","property","value","setElementAttrs","themeName","modeName","colorScheme","themeRootId","document","getElementById","body","setAttribute","backgroundColor","theme","colors","accentColor","secondary","color","fontSize","typography","fontWeight","lineHeight","letterSpacing","fontFamily","applyThemeCustomizations","obj","customizations","isObject","val","Array","isArray","customizedTheme","Object","keys","key","createTheme","props","name","base","inheritColorModes","themes","trim","modes","mode","dawn","includes","processThemes","themesList","length","list","thm","i","findIndex","t","splice","push","ds5","getVarValue","cssVar","tempEl","createElement","setProperty","appendChild","computedValue","getComputedStyle","getPropertyValue","removeChild"],"mappings":";;;AAaA,MAAMA,kBAAkBA,CAACC,SAAsBC,UAAyB;AAC/DC,SAAAA,QAAQD,KAAK,EAAEE,QAAQ,CAAC,CAACC,UAAUC,KAAK,MAAM;AAC3CJ,YAAAA,MAAMG,QAAQ,IAAIC;AAAAA,EAAAA,CAC3B;AACH;AAKO,MAAMC,kBAAkBA,CAC7BC,WACAC,UACAC,aACAC,gBACG;AACH,QAAMV,UAAUU,cACZC,SAASC,eAAeF,WAAW,IACnCC,SAASE;AAEb,MAAIb,SAAS;AACHc,YAAAA,aAAc,cAAaP,SAAS;AACpCO,YAAAA,aAAc,mBAAkBN,QAAQ;AAGhDT,oBAAgBC,SAAS;AAAA,MACvBS;AAAAA,MACAM,iBAAiBC,YAAAA,MAAMC,OAAOF;AAAAA,MAC9BG,aAAaF,YAAAA,MAAMC,OAAOE;AAAAA,MAC1BC,OAAOJ,YAAAA,MAAMC,OAAOE;AAAAA,MACpBE,UAAUL,YAAMM,MAAAA,WAAWT,KAAKQ;AAAAA,MAChCE,YAAYP,YAAMM,MAAAA,WAAWT,KAAKU;AAAAA,MAClCC,YAAYR,YAAMM,MAAAA,WAAWT,KAAKW;AAAAA,MAClCC,eAAeT,YAAMM,MAAAA,WAAWT,KAAKY;AAAAA,MACrCC,YAAYV,YAAAA,MAAMU,WAAWb;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AAMI,gBAAgBC,iBAAiBL,MAAM,EAC1CM,iBAAiB,QAAQ,EACzBxB;AACM/B,WAAAA,KAAKwD,YAAYP,MAAM;AACzBI,SAAAA;AACT;;;;;"}
1
+ {"version":3,"file":"theme.cjs","sources":["../../../src/utils/theme.ts"],"sourcesContent":["/* eslint import/namespace: [2, { allowComputed: true }] */\nimport { CSSProperties } from \"react\";\nimport {\n themes,\n HvThemeColorModeStructure,\n HvThemeStructure,\n theme,\n} from \"@hitachivantara/uikit-styles\";\nimport { HvTheme, HvCreateThemeProps } from \"@core/types\";\n\n/**\n * Sets the element style properties.\n */\nconst setElementStyle = (element: HTMLElement, style: CSSProperties) => {\n Object.entries(style).forEach(([property, value]) => {\n element.style[property] = value;\n });\n};\n\n/**\n * Sets the element attributes and style for a theme and color mode.\n */\nexport const setElementAttrs = (\n themeName: string,\n modeName: string,\n colorScheme: string,\n themeRootId?: string\n) => {\n const element = themeRootId\n ? document.getElementById(themeRootId)\n : document.body;\n\n if (element) {\n element.setAttribute(`data-theme`, themeName);\n element.setAttribute(`data-color-mode`, modeName);\n\n // Set default properties for all components to inherit\n setElementStyle(element, {\n colorScheme,\n backgroundColor: theme.colors.backgroundColor,\n accentColor: theme.colors.secondary,\n color: theme.colors.secondary,\n fontSize: theme.typography.body.fontSize,\n fontWeight: theme.typography.body.fontWeight,\n lineHeight: theme.typography.body.lineHeight,\n letterSpacing: theme.typography.body.letterSpacing,\n fontFamily: theme.fontFamily.body,\n });\n }\n};\n\n/**\n * Applies customizations to a theme.\n */\nconst applyThemeCustomizations = (obj: object, customizations: object) => {\n const isObject = (val: any) =>\n val && typeof val === \"object\" && !Array.isArray(val);\n\n // Customized theme\n const customizedTheme = { ...obj };\n\n // Add new values to the theme or replace values\n Object.keys(customizations).forEach((key) => {\n if (customizedTheme[key]) {\n if (isObject(customizedTheme[key]) && isObject(customizations[key])) {\n customizedTheme[key] = applyThemeCustomizations(\n customizedTheme[key],\n customizations[key]\n );\n } else if (typeof customizedTheme[key] === typeof customizations[key]) {\n customizedTheme[key] = customizations[key];\n }\n } else {\n customizedTheme[key] = customizations[key];\n }\n });\n\n return customizedTheme;\n};\n\n/**\n * Creates a customized theme based on the base theme and customizations given.\n * For the color modes, the colors that are not defined will be replaced by the values from the dawn mode of the base theme.\n */\nexport const createTheme = (\n props: HvCreateThemeProps\n): HvTheme | HvThemeStructure => {\n const {\n name,\n base = \"ds5\",\n inheritColorModes = true,\n ...customizations\n } = props;\n\n // Apply customizations to the base theme\n const customizedTheme: HvTheme | HvThemeStructure = customizations\n ? (applyThemeCustomizations(themes[base], customizations) as HvTheme)\n : { ...themes[base] };\n\n // Set theme name\n customizedTheme.name = name.trim();\n // Set theme base\n customizedTheme.base = base;\n\n // Fill new color modes with missing colors\n if (customizations) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!themes[base].colors.modes[mode]) {\n customizedTheme.colors.modes[mode] = {\n ...themes[base].colors.modes.dawn,\n ...(customizedTheme.colors.modes[mode] as Partial<\n HvThemeColorModeStructure & { [key: string]: string }\n >),\n };\n }\n });\n }\n\n // If the flag `inheritColorModes` is false and customizations were given for the color modes,\n // we're removing any color modes that might have been inherited\n if (!inheritColorModes && customizations.colors?.modes) {\n Object.keys(customizedTheme.colors.modes).forEach((mode) => {\n if (!Object.keys(customizations.colors?.modes || {}).includes(mode)) {\n delete customizedTheme.colors.modes[mode];\n }\n });\n }\n\n // Created theme\n return customizedTheme;\n};\n\n/**\n * Process the themes provided to the HvProvider:\n * - Cleans themes with the same name\n * - Returns the default if the list is empty (ds5)\n */\nexport const processThemes = (\n themesList?: (HvTheme | HvThemeStructure)[]\n): (HvTheme | HvThemeStructure)[] => {\n if (themesList && Array.isArray(themesList) && themesList.length > 0) {\n const list: (HvTheme | HvThemeStructure)[] = [];\n\n themesList.forEach((thm) => {\n const i: number = list.findIndex(\n (t) => t.name.trim() === thm.name.trim()\n );\n\n if (i !== -1) {\n list.splice(i, 1);\n list.push(thm);\n } else {\n list.push(thm);\n }\n });\n\n // Cleaned themes\n return list;\n }\n // DS5\n return [themes.ds5];\n};\n\nexport const getVarValue = (cssVar: string, rootElementId?: string) => {\n const root = document.getElementById(rootElementId || \"hv-root\");\n if (root) {\n const computedValue = getComputedStyle(root)\n .getPropertyValue(cssVar.replace(\"var(\", \"\").replace(\")\", \"\"))\n .trim();\n\n return computedValue;\n }\n};\n"],"names":["setElementStyle","element","style","entries","forEach","property","value","setElementAttrs","themeName","modeName","colorScheme","themeRootId","document","getElementById","body","setAttribute","backgroundColor","theme","colors","accentColor","secondary","color","fontSize","typography","fontWeight","lineHeight","letterSpacing","fontFamily","applyThemeCustomizations","obj","customizations","isObject","val","Array","isArray","customizedTheme","Object","keys","key","createTheme","props","name","base","inheritColorModes","themes","trim","modes","mode","dawn","includes","processThemes","themesList","length","list","thm","i","findIndex","t","splice","push","ds5","getVarValue","cssVar","rootElementId","root","computedValue","getComputedStyle","getPropertyValue","replace"],"mappings":";;;AAaA,MAAMA,kBAAkBA,CAACC,SAAsBC,UAAyB;AAC/DC,SAAAA,QAAQD,KAAK,EAAEE,QAAQ,CAAC,CAACC,UAAUC,KAAK,MAAM;AAC3CJ,YAAAA,MAAMG,QAAQ,IAAIC;AAAAA,EAAAA,CAC3B;AACH;AAKO,MAAMC,kBAAkBA,CAC7BC,WACAC,UACAC,aACAC,gBACG;AACH,QAAMV,UAAUU,cACZC,SAASC,eAAeF,WAAW,IACnCC,SAASE;AAEb,MAAIb,SAAS;AACHc,YAAAA,aAAc,cAAaP,SAAS;AACpCO,YAAAA,aAAc,mBAAkBN,QAAQ;AAGhDT,oBAAgBC,SAAS;AAAA,MACvBS;AAAAA,MACAM,iBAAiBC,YAAAA,MAAMC,OAAOF;AAAAA,MAC9BG,aAAaF,YAAAA,MAAMC,OAAOE;AAAAA,MAC1BC,OAAOJ,YAAAA,MAAMC,OAAOE;AAAAA,MACpBE,UAAUL,YAAMM,MAAAA,WAAWT,KAAKQ;AAAAA,MAChCE,YAAYP,YAAMM,MA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AAEaC,MAAAA,cAAcA,CAACC,QAAgBC,kBAA2B;AACrE,QAAMC,OAAOpD,SAASC,eAAekD,iBAAiB,SAAS;AAC/D,MAAIC,MAAM;AACR,UAAMC,gBAAgBC,iBAAiBF,IAAI,EACxCG,iBAAiBL,OAAOM,QAAQ,QAAQ,EAAE,EAAEA,QAAQ,KAAK,EAAE,CAAC,EAC5DvB;AAEIoB,WAAAA;AAAAA,EACT;AACF;;;;;"}
@@ -1,26 +1,32 @@
1
- import { clsx } from "clsx";
2
- import { StyledActions } from "./Actions.styles.js";
3
- import dialogActionClasses from "./actionsClasses.js";
1
+ import MuiDialogActions from "@mui/material/DialogActions";
2
+ import { useClasses } from "./Actions.styles.js";
3
+ import { staticClasses } from "./Actions.styles.js";
4
4
  import { jsx } from "@emotion/react/jsx-runtime";
5
5
  const HvDialogActions = ({
6
- classes,
6
+ classes: classesProp,
7
7
  className,
8
8
  children,
9
9
  fullscreen = false,
10
10
  ...others
11
11
  }) => {
12
- return /* @__PURE__ */ jsx(StyledActions, {
12
+ const {
13
+ classes,
14
+ cx
15
+ } = useClasses(classesProp);
16
+ return /* @__PURE__ */ jsx(MuiDialogActions, {
13
17
  className,
14
18
  classes: {
15
- root: clsx(dialogActionClasses.root, classes == null ? void 0 : classes.root, fullscreen && clsx(dialogActionClasses.fullscreen, classes == null ? void 0 : classes.fullscreen)),
16
- spacing: clsx(dialogActionClasses.spacing, classes == null ? void 0 : classes.spacing)
19
+ root: cx(classes.root, {
20
+ [classes.fullscreen]: fullscreen
21
+ }),
22
+ spacing: classes.spacing
17
23
  },
18
- $fullscreen: fullscreen,
19
24
  ...others,
20
25
  children
21
26
  });
22
27
  };
23
28
  export {
24
- HvDialogActions
29
+ HvDialogActions,
30
+ staticClasses as dialogActionClasses
25
31
  };
26
32
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Dialog/Actions/Actions.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { DialogActionsProps as MuiDialogActionsProps } from \"@mui/material/DialogActions\";\nimport { HvBaseProps } from \"@core/types\";\nimport { StyledActions } from \"./Actions.styles\";\nimport dialogActionClasses, { HvDialogActionClasses } from \"./actionsClasses\";\n\nexport interface HvDialogActionsProps\n extends Omit<MuiDialogActionsProps, \"classes\">,\n HvBaseProps {\n /** Set the dialog to fullscreen mode. */\n fullscreen?: boolean;\n classes?: HvDialogActionClasses;\n}\n\nexport const HvDialogActions = ({\n classes,\n className,\n children,\n fullscreen = false,\n ...others\n}: HvDialogActionsProps) => {\n return (\n <StyledActions\n className={className}\n classes={{\n root: clsx(\n dialogActionClasses.root,\n classes?.root,\n fullscreen &&\n clsx(dialogActionClasses.fullscreen, classes?.fullscreen)\n ),\n spacing: clsx(dialogActionClasses.spacing, classes?.spacing),\n }}\n $fullscreen={fullscreen}\n {...others}\n >\n {children}\n </StyledActions>\n );\n};\n"],"names":["HvDialogActions","classes","className","children","fullscreen","others","StyledActions","root","clsx","dialogActionClasses","spacing","$fullscreen"],"mappings":";;;;AAcO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,aAAa;AAAA,EACb,GAAGC;AACiB,MAAM;AAC1B,6BACGC,eAAa;AAAA,IACZJ;AAAAA,IACAD,SAAS;AAAA,MACPM,MAAMC,KACJC,oBAAoBF,MACpBN,mCAASM,MACTH,cACEI,KAAKC,oBAAoBL,YAAYH,mCAASG,UAAU,CAC5D;AAAA,MACAM,SAASF,KAAKC,oBAAoBC,SAAST,mCAASS,OAAO;AAAA,IAC7D;AAAA,IACAC,aAAaP;AAAAA,IAAW,GACpBC;AAAAA,IAAMF;AAAAA,EAAAA,CAGG;AAEnB;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Dialog/Actions/Actions.tsx"],"sourcesContent":["import MuiDialogActions, {\n DialogActionsProps as MuiDialogActionsProps,\n} from \"@mui/material/DialogActions\";\n\nimport { HvBaseProps } from \"@core/types\";\nimport { ExtractNames } from \"@core/utils\";\n\nimport { staticClasses, useClasses } from \"./Actions.styles\";\n\nexport { staticClasses as dialogActionClasses };\n\nexport type HvDialogActionClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDialogActionsProps\n extends Omit<MuiDialogActionsProps, \"classes\">,\n HvBaseProps {\n /** Set the dialog to fullscreen mode. */\n fullscreen?: boolean;\n classes?: HvDialogActionClasses;\n}\n\nexport const HvDialogActions = ({\n classes: classesProp,\n className,\n children,\n fullscreen = false,\n ...others\n}: HvDialogActionsProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <MuiDialogActions\n className={className}\n classes={{\n root: cx(classes.root, { [classes.fullscreen]: fullscreen }),\n spacing: classes.spacing,\n }}\n {...others}\n >\n {children}\n </MuiDialogActions>\n );\n};\n"],"names":["HvDialogActions","classes","classesProp","className","children","fullscreen","others","cx","useClasses","MuiDialogActions","root","spacing"],"mappings":";;;;AAqBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,aAAa;AAAA,EACb,GAAGC;AACiB,MAAM;AACpB,QAAA;AAAA,IAAEL;AAAAA,IAASM;AAAAA,EAAAA,IAAOC,WAAWN,WAAW;AAE9C,6BACGO,kBAAgB;AAAA,IACfN;AAAAA,IACAF,SAAS;AAAA,MACPS,MAAMH,GAAGN,QAAQS,MAAM;AAAA,QAAE,CAACT,QAAQI,UAAU,GAAGA;AAAAA,MAAAA,CAAY;AAAA,MAC3DM,SAASV,QAAQU;AAAAA,IACnB;AAAA,IAAE,GACEL;AAAAA,IAAMF;AAAAA,EAAAA,CAGM;AAEtB;"}
@@ -1,48 +1,31 @@
1
- import _styled from "@emotion/styled/base";
2
1
  import { theme } from "@hitachivantara/uikit-styles";
3
- import DialogActions from "@mui/material/DialogActions";
4
- import { transientOptions } from "../../../utils/transientOptions.js";
5
- function _extends() {
6
- _extends = Object.assign ? Object.assign.bind() : function(target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
- for (var key in source) {
10
- if (Object.prototype.hasOwnProperty.call(source, key)) {
11
- target[key] = source[key];
12
- }
13
- }
14
- }
15
- return target;
16
- };
17
- return _extends.apply(this, arguments);
18
- }
19
- const StyledActions = /* @__PURE__ */ _styled(DialogActions, process.env.NODE_ENV === "production" ? _extends({}, {
20
- target: "e5nbcch0"
21
- }, transientOptions) : _extends({}, {
22
- target: "e5nbcch0",
23
- label: "StyledActions"
24
- }, transientOptions))(({
25
- $fullscreen
26
- }) => ({
27
- margin: "0",
28
- padding: theme.space.sm,
29
- borderTop: `3px solid ${theme.colors.atmo2}`,
30
- height: 65,
31
- maxHeight: 65,
32
- flex: 1,
33
- ...$fullscreen && {
2
+ import { createClasses } from "../../../utils/classes.js";
3
+ const {
4
+ staticClasses,
5
+ useClasses
6
+ } = createClasses("HvDialog-Action", {
7
+ root: {
8
+ margin: "0",
9
+ padding: theme.space.sm,
10
+ borderTop: `3px solid ${theme.colors.atmo2}`,
11
+ height: 65,
12
+ maxHeight: 65,
13
+ flex: 1
14
+ },
15
+ fullscreen: {
34
16
  position: "fixed",
35
17
  width: "100%",
36
18
  bottom: 0,
37
19
  left: 0
38
20
  },
39
- "&.MuiDialogActions-spacing": {
21
+ spacing: {
40
22
  "& > :not(:first-of-type)": {
41
23
  marginLeft: theme.space.xs
42
24
  }
43
25
  }
44
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvRGlhbG9nL0FjdGlvbnMvQWN0aW9ucy5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUs2QiIsImZpbGUiOiIvaG9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joge1xuICAgICAgbWFyZ2luTGVmdDogdGhlbWUuc3BhY2UueHMsXG4gICAgfSxcbiAgfSxcbn0pKTtcbiJdfQ== */");
26
+ });
45
27
  export {
46
- StyledActions
28
+ staticClasses,
29
+ useClasses
47
30
  };
48
31
  //# sourceMappingURL=Actions.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.styles.js","sources":["../../../../../src/components/Dialog/Actions/Actions.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport DialogActions from \"@mui/material/DialogActions\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\n\nexport const StyledActions = styled(\n DialogActions,\n transientOptions\n)(({ $fullscreen }: { $fullscreen: boolean }) => ({\n margin: \"0\",\n padding: theme.space.sm,\n borderTop: `3px solid ${theme.colors.atmo2}`,\n height: 65,\n maxHeight: 65,\n flex: 1,\n ...($fullscreen && {\n position: \"fixed\",\n width: \"100%\",\n bottom: 0,\n left: 0,\n }),\n \"&.MuiDialogActions-spacing\": {\n \"& > :not(:first-of-type)\": {\n marginLeft: theme.space.xs,\n },\n },\n}));\n"],"names":["StyledActions","DialogActions","process","env","NODE_ENV","_extends","target","transientOptions","label","$fullscreen","margin","padding","theme","space","sm","borderTop","colors","atmo2","height","maxHeight","flex","position","width","bottom","left","marginLeft","xs"],"mappings":";;;;;;;;;;;;;;;;;;AAKaA,MAAAA,wCACXC,eAAaC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACbC,gBAAgB,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,gBAAgB,CAClB,EAAE,CAAC;AAAA,EAAEE;AAAsC,OAAO;AAAA,EAChDC,QAAQ;AAAA,EACRC,SAASC,MAAMC,MAAMC;AAAAA,EACrBC,WAAY,aAAYH,MAAMI,OAAOC;AAAAA,EACrCC,QAAQ;AAAA,EACRC,WAAW;AAAA,EACXC,MAAM;AAAA,EACN,GAAIX,eAAe;AAAA,IACjBY,UAAU;AAAA,IACVC,OAAO;AAAA,IACPC,QAAQ;AAAA,IACRC,MAAM;AAAA,EACR;AAAA,EACA,8BAA8B;AAAA,IAC5B,4BAA4B;AAAA,MAC1BC,YAAYb,MAAMC,MAAMa;AAAAA,IAC1B;AAAA,EACF;AACF,IAAExB,QAAAC,IAAAC,aAAC,eAAA,KAAA,y7CAAA;"}
1
+ {"version":3,"file":"Actions.styles.js","sources":["../../../../../src/components/Dialog/Actions/Actions.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvDialog-Action\", {\n root: {\n margin: \"0\",\n padding: theme.space.sm,\n borderTop: `3px solid ${theme.colors.atmo2}`,\n height: 65,\n maxHeight: 65,\n flex: 1,\n },\n fullscreen: { position: \"fixed\", width: \"100%\", bottom: 0, left: 0 },\n spacing: {\n \"& > :not(:first-of-type)\": {\n marginLeft: theme.space.xs,\n },\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","margin","padding","theme","space","sm","borderTop","colors","atmo2","height","maxHeight","flex","fullscreen","position","width","bottom","left","spacing","marginLeft","xs"],"mappings":";;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,mBAAmB;AAAA,EAC5EC,MAAM;AAAA,IACJC,QAAQ;AAAA,IACRC,SAASC,MAAMC,MAAMC;AAAAA,IACrBC,WAAY,aAAYH,MAAMI,OAAOC;AAAAA,IACrCC,QAAQ;AAAA,IACRC,WAAW;AAAA,IACXC,MAAM;AAAA,EACR;AAAA,EACAC,YAAY;AAAA,IAAEC,UAAU;AAAA,IAASC,OAAO;AAAA,IAAQC,QAAQ;AAAA,IAAGC,MAAM;AAAA,EAAE;AAAA,EACnEC,SAAS;AAAA,IACP,4BAA4B;AAAA,MAC1BC,YAAYf,MAAMC,MAAMe;AAAAA,IAC1B;AAAA,EACF;AACF,CAAC;"}
@@ -1,22 +1,28 @@
1
- import { clsx } from "clsx";
2
1
  import MuiDialogContent from "@mui/material/DialogContent";
3
- import { StyledTypography } from "./Content.styles.js";
4
- import dialogContentClasses from "./contentClasses.js";
2
+ import { useClasses } from "./Content.styles.js";
3
+ import { staticClasses } from "./Content.styles.js";
5
4
  import { jsx } from "@emotion/react/jsx-runtime";
5
+ import { HvTypography } from "../../Typography/Typography.js";
6
6
  const HvDialogContent = ({
7
- classes,
7
+ classes: classesProp,
8
8
  className,
9
9
  children,
10
10
  indentContent = false
11
11
  }) => {
12
- return /* @__PURE__ */ jsx(StyledTypography, {
12
+ const {
13
+ classes,
14
+ cx
15
+ } = useClasses(classesProp);
16
+ return /* @__PURE__ */ jsx(HvTypography, {
13
17
  component: MuiDialogContent,
14
- className: clsx(className, dialogContentClasses.root, classes == null ? void 0 : classes.root, !!indentContent && clsx(dialogContentClasses.textContent, classes == null ? void 0 : classes.textContent)),
15
- $indentContent: indentContent,
18
+ className: cx(classes.root, {
19
+ [classes.textContent]: !!indentContent
20
+ }, className),
16
21
  children
17
22
  });
18
23
  };
19
24
  export {
20
- HvDialogContent
25
+ HvDialogContent,
26
+ staticClasses as dialogContentClasses
21
27
  };
22
28
  //# sourceMappingURL=Content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../../src/components/Dialog/Content/Content.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport MuiDialogContent, {\n DialogContentProps as MuiDialogContentProps,\n} from \"@mui/material/DialogContent\";\nimport { HvBaseProps } from \"@core/types\";\nimport { StyledTypography } from \"./Content.styles\";\nimport dialogContentClasses, { HvDialogContentClasses } from \"./contentClasses\";\n\nexport interface HvDialogContentProps\n extends Omit<MuiDialogContentProps, \"classes\">,\n HvBaseProps {\n /** Content should be indented in relationship to the Dialog title. */\n indentContent?: boolean;\n classes?: HvDialogContentClasses;\n}\n\nexport const HvDialogContent = ({\n classes,\n className,\n children,\n indentContent = false,\n}: HvDialogContentProps) => {\n return (\n <StyledTypography\n component={MuiDialogContent}\n className={clsx(\n className,\n dialogContentClasses.root,\n classes?.root,\n !!indentContent &&\n clsx(dialogContentClasses.textContent, classes?.textContent)\n )}\n $indentContent={indentContent}\n >\n {children}\n </StyledTypography>\n );\n};\n"],"names":["HvDialogContent","classes","className","children","indentContent","StyledTypography","component","MuiDialogContent","clsx","dialogContentClasses","root","textContent","$indentContent"],"mappings":";;;;;AAgBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,gBAAgB;AACI,MAAM;AAC1B,6BACGC,kBAAgB;AAAA,IACfC,WAAWC;AAAAA,IACXL,WAAWM,KACTN,WACAO,qBAAqBC,MACrBT,mCAASS,MACT,CAAC,CAACN,iBACAI,KAAKC,qBAAqBE,aAAaV,mCAASU,WAAW,CAC/D;AAAA,IACAC,gBAAgBR;AAAAA,IAAcD;AAAAA,EAAAA,CAGd;AAEtB;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../../src/components/Dialog/Content/Content.tsx"],"sourcesContent":["import MuiDialogContent, {\n DialogContentProps as MuiDialogContentProps,\n} from \"@mui/material/DialogContent\";\n\nimport { HvBaseProps } from \"@core/types\";\nimport { ExtractNames } from \"@core/utils\";\nimport { HvTypography } from \"@core/components\";\n\nimport { staticClasses, useClasses } from \"./Content.styles\";\n\nexport { staticClasses as dialogContentClasses };\n\nexport type HvDialogContentClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDialogContentProps\n extends Omit<MuiDialogContentProps, \"classes\">,\n HvBaseProps {\n /** Content should be indented in relationship to the Dialog title. */\n indentContent?: boolean;\n classes?: HvDialogContentClasses;\n}\n\nexport const HvDialogContent = ({\n classes: classesProp,\n className,\n children,\n indentContent = false,\n}: HvDialogContentProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <HvTypography\n component={MuiDialogContent}\n className={cx(\n classes.root,\n { [classes.textContent]: !!indentContent },\n className\n )}\n >\n {children}\n </HvTypography>\n );\n};\n"],"names":["HvDialogContent","classes","classesProp","className","children","indentContent","cx","useClasses","HvTypography","component","MuiDialogContent","root","textContent"],"mappings":";;;;;AAsBO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,gBAAgB;AACI,MAAM;AACpB,QAAA;AAAA,IAAEJ;AAAAA,IAASK;AAAAA,EAAAA,IAAOC,WAAWL,WAAW;AAE9C,6BACGM,cAAY;AAAA,IACXC,WAAWC;AAAAA,IACXP,WAAWG,GACTL,QAAQU,MACR;AAAA,MAAE,CAACV,QAAQW,WAAW,GAAG,CAAC,CAACP;AAAAA,OAC3BF,SACF;AAAA,IAAEC;AAAAA,EAAAA,CAGU;AAElB;"}
@@ -1,39 +1,22 @@
1
- import _styled from "@emotion/styled/base";
2
1
  import { theme } from "@hitachivantara/uikit-styles";
3
- import { transientOptions } from "../../../utils/transientOptions.js";
4
- import { HvTypography } from "../../Typography/Typography.js";
5
- function _extends() {
6
- _extends = Object.assign ? Object.assign.bind() : function(target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
- for (var key in source) {
10
- if (Object.prototype.hasOwnProperty.call(source, key)) {
11
- target[key] = source[key];
12
- }
13
- }
14
- }
15
- return target;
16
- };
17
- return _extends.apply(this, arguments);
18
- }
19
- const StyledTypography = /* @__PURE__ */ _styled(HvTypography, process.env.NODE_ENV === "production" ? _extends({}, {
20
- target: "e4uf5ag0"
21
- }, transientOptions) : _extends({}, {
22
- target: "e4uf5ag0",
23
- label: "StyledTypography"
24
- }, transientOptions))(({
25
- $indentContent
26
- }) => ({
27
- padding: `0 ${theme.space.sm} ${theme.space.sm} ${theme.space.sm}`,
28
- flex: "none",
29
- ...$indentContent && {
2
+ import { createClasses } from "../../../utils/classes.js";
3
+ const {
4
+ staticClasses,
5
+ useClasses
6
+ } = createClasses("HvDialog-Content", {
7
+ root: {
8
+ padding: `0 ${theme.space.sm} ${theme.space.sm} ${theme.space.sm}`,
9
+ flex: "none"
10
+ },
11
+ textContent: {
30
12
  marginLeft: "42px",
31
13
  paddingRight: "62px",
32
14
  flex: 1,
33
15
  overflowY: "auto"
34
16
  }
35
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvRGlhbG9nL0NvbnRlbnQvQ29udGVudC5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtnQyIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9jb21wb25lbnRzL0RpYWxvZy9Db250ZW50L0NvbnRlbnQuc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgdGhlbWUgfSBmcm9tIFwiQGhpdGFjaGl2YW50YXJhL3Vpa2l0LXN0eWxlc1wiO1xuaW1wb3J0IHsgSHZUeXBvZ3JhcGh5IH0gZnJvbSBcIkBjb3JlL2NvbXBvbmVudHNcIjtcbmltcG9ydCB7IHRyYW5zaWVudE9wdGlvbnMgfSBmcm9tIFwiQGNvcmUvdXRpbHMvdHJhbnNpZW50T3B0aW9uc1wiO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVHlwb2dyYXBoeSA9IHN0eWxlZChcbiAgSHZUeXBvZ3JhcGh5LFxuICB0cmFuc2llbnRPcHRpb25zXG4pKCh7ICRpbmRlbnRDb250ZW50IH06IHsgJGluZGVudENvbnRlbnQ6IGJvb2xlYW4gfSkgPT4gKHtcbiAgcGFkZGluZzogYDAgJHt0aGVtZS5zcGFjZS5zbX0gJHt0aGVtZS5zcGFjZS5zbX0gJHt0aGVtZS5zcGFjZS5zbX1gLFxuICBmbGV4OiBcIm5vbmVcIixcbiAgLi4uKCRpbmRlbnRDb250ZW50ICYmIHtcbiAgICBtYXJnaW5MZWZ0OiBcIjQycHhcIixcbiAgICBwYWRkaW5nUmlnaHQ6IFwiNjJweFwiLFxuICAgIGZsZXg6IDEsXG4gICAgb3ZlcmZsb3dZOiBcImF1dG9cIixcbiAgfSksXG59KSk7XG4iXX0= */");
17
+ });
36
18
  export {
37
- StyledTypography
19
+ staticClasses,
20
+ useClasses
38
21
  };
39
22
  //# sourceMappingURL=Content.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content.styles.js","sources":["../../../../../src/components/Dialog/Content/Content.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { HvTypography } from \"@core/components\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\n\nexport const StyledTypography = styled(\n HvTypography,\n transientOptions\n)(({ $indentContent }: { $indentContent: boolean }) => ({\n padding: `0 ${theme.space.sm} ${theme.space.sm} ${theme.space.sm}`,\n flex: \"none\",\n ...($indentContent && {\n marginLeft: \"42px\",\n paddingRight: \"62px\",\n flex: 1,\n overflowY: \"auto\",\n }),\n}));\n"],"names":["StyledTypography","HvTypography","process","env","NODE_ENV","_extends","target","transientOptions","label","$indentContent","padding","theme","space","sm","flex","marginLeft","paddingRight","overflowY"],"mappings":";;;;;;;;;;;;;;;;;;AAKaA,MAAAA,2CACXC,cAAYC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACZC,gBAAgB,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,gBAAgB,CAClB,EAAE,CAAC;AAAA,EAAEE;AAA4C,OAAO;AAAA,EACtDC,SAAU,KAAIC,MAAMC,MAAMC,MAAMF,MAAMC,MAAMC,MAAMF,MAAMC,MAAMC;AAAAA,EAC9DC,MAAM;AAAA,EACN,GAAIL,kBAAkB;AAAA,IACpBM,YAAY;AAAA,IACZC,cAAc;AAAA,IACdF,MAAM;AAAA,IACNG,WAAW;AAAA,EACb;AACF,IAAEf,QAAAC,IAAAC,aAAC,eAAA,KAAA,6uCAAA;"}
1
+ {"version":3,"file":"Content.styles.js","sources":["../../../../../src/components/Dialog/Content/Content.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\nimport { createClasses } from \"@core/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvDialog-Content\", {\n root: {\n padding: `0 ${theme.space.sm} ${theme.space.sm} ${theme.space.sm}`,\n flex: \"none\",\n },\n textContent: {\n marginLeft: \"42px\",\n paddingRight: \"62px\",\n flex: 1,\n overflowY: \"auto\",\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","padding","theme","space","sm","flex","textContent","marginLeft","paddingRight","overflowY"],"mappings":";;AAGa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,oBAAoB;AAAA,EAC7EC,MAAM;AAAA,IACJC,SAAU,KAAIC,MAAMC,MAAMC,MAAMF,MAAMC,MAAMC,MAAMF,MAAMC,MAAMC;AAAAA,IAC9DC,MAAM;AAAA,EACR;AAAA,EACAC,aAAa;AAAA,IACXC,YAAY;AAAA,IACZC,cAAc;AAAA,IACdH,MAAM;AAAA,IACNI,WAAW;AAAA,EACb;AACF,CAAC;"}
@@ -1,25 +1,16 @@
1
1
  import React__default, { useCallback, useMemo } from "react";
2
2
  import MuiDialog from "@mui/material/Dialog";
3
+ import MuiBackdrop from "@mui/material/Backdrop";
3
4
  import { Close } from "@hitachivantara/uikit-react-icons";
4
5
  import { theme } from "@hitachivantara/uikit-styles";
5
- import { useClasses, StyledBackdrop } from "./Dialog.styles.js";
6
+ import fade from "../../utils/hexToRgbA.js";
7
+ import { useClasses } from "./Dialog.styles.js";
6
8
  import { staticClasses } from "./Dialog.styles.js";
7
9
  import { jsx, jsxs } from "@emotion/react/jsx-runtime";
8
10
  import withTooltip from "../../hocs/withTooltip.js";
9
11
  import { HvButton } from "../Button/Button.js";
10
12
  import { useTheme } from "../../hooks/useTheme.js";
11
13
  import { setId } from "../../utils/setId.js";
12
- const DialogBackdrop = (backdropProps) => {
13
- var _a;
14
- const {
15
- activeTheme,
16
- selectedMode
17
- } = useTheme();
18
- return /* @__PURE__ */ jsx(StyledBackdrop, {
19
- $backColor: ((_a = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _a.modes[selectedMode].atmo4) || theme.colors.atmo4,
20
- ...backdropProps
21
- });
22
- };
23
14
  const HvDialog = ({
24
15
  classes: classesProp,
25
16
  className,
@@ -33,6 +24,7 @@ const HvDialog = ({
33
24
  disableBackdropClick = false,
34
25
  ...others
35
26
  }) => {
27
+ var _a;
36
28
  const {
37
29
  classes,
38
30
  css,
@@ -40,7 +32,9 @@ const HvDialog = ({
40
32
  } = useClasses(classesProp);
41
33
  delete others.fullScreen;
42
34
  const {
43
- rootId
35
+ rootId,
36
+ activeTheme,
37
+ selectedMode
44
38
  } = useTheme();
45
39
  const wrappedClose = useCallback((event, bypassValidation = false, reason) => {
46
40
  if (bypassValidation || !disableBackdropClick) {
@@ -58,54 +52,61 @@ const HvDialog = ({
58
52
  });
59
53
  const CloseButtonTooltipWrapper = buttonTitle ? withTooltip(closeButtonDisplay, buttonTitle, "top") : closeButtonDisplay;
60
54
  const slots = useMemo(() => ({
61
- backdrop: (backdropProps) => /* @__PURE__ */ jsx(DialogBackdrop, {
55
+ backdrop: (backdropProps) => /* @__PURE__ */ jsx(MuiBackdrop, {
62
56
  open,
63
57
  onClick: wrappedClose,
64
58
  ...backdropProps
65
59
  })
66
60
  }), [open, wrappedClose]);
67
- return /* @__PURE__ */ jsxs(MuiDialog, {
68
- container: document.getElementById(rootId || "") || document.body,
69
- className: cx(className, classes.root),
70
- id,
71
- ref: measuredRef,
72
- open,
73
- fullScreen: fullscreen,
74
- onClose: (event, reason) => wrappedClose(event, void 0, reason),
75
- slots,
76
- classes: {
77
- container: css({
78
- position: "relative"
79
- })
80
- },
81
- BackdropProps: {
82
- classes: {
83
- root: classes.background
84
- }
85
- },
86
- PaperProps: {
61
+ return /* @__PURE__ */ jsxs(
62
+ MuiDialog,
63
+ {
64
+ container: document.getElementById(rootId || "") || document.body,
65
+ className: cx(className, classes.root),
87
66
  classes: {
88
- root: cx(css({
89
- position: "absolute"
90
- }), classes.paper, {
91
- fullscreen,
92
- [classes.fullscreen]: fullscreen
67
+ container: css({
68
+ position: "relative"
93
69
  })
94
- }
95
- },
96
- "aria-modal": true,
97
- ...others,
98
- children: [/* @__PURE__ */ jsx(HvButton, {
99
- id: setId(id, "close"),
100
- className: classes.closeButton,
101
- variant: "secondaryGhost",
102
- onClick: (event) => wrappedClose(event, true, void 0),
103
- "aria-label": buttonTitle,
104
- children: /* @__PURE__ */ jsx(CloseButtonTooltipWrapper, {})
105
- }), children && typeof children === "object" ? React__default.Children.map(children, (c) => c && React__default.cloneElement(c, {
106
- fullscreen
107
- })) : children]
108
- });
70
+ },
71
+ id,
72
+ ref: measuredRef,
73
+ open,
74
+ fullScreen: fullscreen,
75
+ onClose: (event, reason) => wrappedClose(event, void 0, reason),
76
+ slots,
77
+ slotProps: {
78
+ backdrop: {
79
+ classes: {
80
+ root: cx(css({
81
+ background: fade(((_a = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _a.modes[selectedMode].atmo4) || theme.colors.atmo4, 0.8)
82
+ }), classes.background)
83
+ }
84
+ }
85
+ },
86
+ PaperProps: {
87
+ classes: {
88
+ root: cx(css({
89
+ position: "absolute"
90
+ }), classes.paper, {
91
+ fullscreen,
92
+ [classes.fullscreen]: fullscreen
93
+ })
94
+ }
95
+ },
96
+ "aria-modal": true,
97
+ ...others,
98
+ children: [/* @__PURE__ */ jsx(HvButton, {
99
+ id: setId(id, "close"),
100
+ className: classes.closeButton,
101
+ variant: "secondaryGhost",
102
+ onClick: (event) => wrappedClose(event, true, void 0),
103
+ "aria-label": buttonTitle,
104
+ children: /* @__PURE__ */ jsx(CloseButtonTooltipWrapper, {})
105
+ }), children && typeof children === "object" ? React__default.Children.map(children, (c) => c && React__default.cloneElement(c, {
106
+ fullscreen
107
+ })) : children]
108
+ }
109
+ );
109
110
  };
110
111
  export {
111
112
  HvDialog,
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport MuiDialog, { DialogProps as MuiDialogProps } from \"@mui/material/Dialog\";\nimport { BackdropProps } from \"@mui/material\";\n\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames, setId } from \"@core/utils\";\nimport { withTooltip } from \"@core/hocs\";\nimport { useTheme } from \"@core/hooks\";\nimport { StyledBackdrop, staticClasses, useClasses } from \"./Dialog.styles\";\nimport { HvButton } from \"..\";\n\nexport { staticClasses as dialogClasses };\n\nexport type HvDialogClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDialogProps\n extends Omit<MuiDialogProps, \"fullScreen\" | \"classes\" | \"open\">,\n HvBaseProps {\n /** Id to be applied to the root node. */\n id?: string;\n /** Current state of the Dialog. */\n open?: boolean;\n /** Function executed on close. */\n onClose?: (\n event: React.SyntheticEvent,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => void;\n /** @inheritdoc */\n maxWidth?: MuiDialogProps[\"maxWidth\"];\n /** @inheritdoc */\n fullWidth?: MuiDialogProps[\"fullWidth\"];\n /**\n * Element id that should be focus when the Dialog opens.\n * Auto-focusing elements can cause usability issues, so this should be avoided.\n * @deprecated Use `autoFocus` on the element instead, if auto-focusing is required.\n */\n firstFocusable?: string;\n /** Title for the button close. */\n buttonTitle?: string;\n /** Set the dialog to fullscreen mode. */\n fullscreen?: boolean;\n /** Prevent closing the dialog when clicking on the backdrop. */\n disableBackdropClick?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvDialogClasses;\n}\n\nconst DialogBackdrop = (backdropProps: BackdropProps) => {\n const { activeTheme, selectedMode } = useTheme();\n return (\n <StyledBackdrop\n $backColor={\n activeTheme?.colors?.modes[selectedMode].atmo4 || theme.colors.atmo4\n }\n {...backdropProps}\n />\n );\n};\n\nexport const HvDialog = ({\n classes: classesProp,\n className,\n id,\n children,\n open = false,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n disableBackdropClick = false,\n ...others\n}: HvDialogProps) => {\n const { classes, css, cx } = useClasses(classesProp);\n delete (others as any).fullScreen;\n\n const { rootId } = useTheme();\n\n // Because the `disableBackdropClick` property was deprecated in MUI5\n // and we want to maintain that functionality to the user we're wrapping\n // the onClose call here to make that check.\n const wrappedClose = useCallback(\n (\n event: any,\n bypassValidation: boolean = false,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => {\n if (bypassValidation || !disableBackdropClick) {\n onClose?.(event, reason);\n }\n },\n [onClose, disableBackdropClick]\n );\n\n const measuredRef = useCallback(() => {\n if (!firstFocusable) return;\n\n const element = document.getElementById(firstFocusable);\n element?.focus();\n }, [firstFocusable]);\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n const slots = useMemo<MuiDialogProps[\"slots\"]>(\n () => ({\n backdrop: (backdropProps) => (\n <DialogBackdrop open={open} onClick={wrappedClose} {...backdropProps} />\n ),\n }),\n [open, wrappedClose]\n );\n\n return (\n <MuiDialog\n container={document.getElementById(rootId || \"\") || document.body}\n className={cx(className, classes.root)}\n id={id}\n ref={measuredRef}\n open={open}\n fullScreen={fullscreen}\n onClose={(event, reason) => wrappedClose(event, undefined, reason)}\n slots={slots}\n classes={{ container: css({ position: \"relative\" }) }}\n BackdropProps={{\n classes: {\n root: classes.background,\n },\n }}\n PaperProps={{\n classes: {\n root: cx(css({ position: \"absolute\" }), classes.paper, {\n fullscreen,\n [classes.fullscreen]: fullscreen,\n }),\n },\n }}\n aria-modal\n {...others}\n >\n <HvButton\n id={setId(id, \"close\")}\n className={classes.closeButton}\n variant=\"secondaryGhost\"\n onClick={(event) => wrappedClose(event, true, undefined)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </HvButton>\n {children && typeof children === \"object\"\n ? React.Children.map(\n children,\n (c: React.ReactNode) =>\n c && React.cloneElement(c as React.ReactElement, { fullscreen })\n )\n : children}\n </MuiDialog>\n );\n};\n"],"names":["DialogBackdrop","backdropProps","activeTheme","selectedMode","useTheme","StyledBackdrop","$backColor","colors","modes","atmo4","theme","HvDialog","classes","classesProp","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","disableBackdropClick","others","css","cx","useClasses","fullScreen","rootId","wrappedClose","useCallback","event","bypassValidation","reason","measuredRef","element","document","getElementById","focus","closeButtonDisplay","_jsx","Close","role","CloseButtonTooltipWrapper","withTooltip","slots","useMemo","backdrop","onClick","MuiDialog","container","body","root","ref","undefined","position","BackdropProps","background","PaperProps","paper","HvButton","setId","closeButton","variant","React","Children","map","c","cloneElement"],"mappings":";;;;;;;;;;;AAiDA,MAAMA,iBAAiBA,CAACC,kBAAiC;;AACjD,QAAA;AAAA,IAAEC;AAAAA,IAAaC;AAAAA,MAAiBC,SAAS;AAC/C,6BACGC,gBAAc;AAAA,IACbC,cACEJ,gDAAaK,WAAbL,mBAAqBM,MAAML,cAAcM,UAASC,MAAMH,OAAOE;AAAAA,IAChE,GACGR;AAAAA,EAAAA,CACL;AAEL;AAEO,MAAMU,WAAWA,CAAC;AAAA,EACvBC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACA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AWJ,aAAaE,OAAOuB,QAAWrB,MAAM;AAAA,IACjEY;AAAAA,IACAjC,SAAS;AAAA,MAAEsC,WAAW1B,IAAI;AAAA,QAAE+B,UAAU;AAAA,MAAA,CAAY;AAAA,IAAE;AAAA,IACpDC,eAAe;AAAA,MACb5C,SAAS;AAAA,QACPwC,MAAMxC,QAAQ6C;AAAAA,MAChB;AAAA,IACF;AAAA,IACAC,YAAY;AAAA,MACV9C,SAAS;AAAA,QACPwC,MAAM3B,GAAGD,IAAI;AAAA,UAAE+B,UAAU;AAAA,QAAA,CAAY,GAAG3C,QAAQ+C,OAAO;AAAA,UACrDtC;AAAAA,UACA,CAACT,QAAQS,UAAU,GAAGA;AAAAA,QAAAA,CACvB;AAAA,MACH;AAAA,IACF;AAAA,IACA,cAAU;AAAA,IAAA,GACNE;AAAAA,IAAMP,UAAA,CAEVwB,oBAACoB,UAAQ;AAAA,MACP7C,IAAI8C,MAAM9C,IAAI,OAAO;AAAA,MACrBD,WAAWF,QAAQkD;AAAAA,MACnBC,SAAQ;AAAA,MACRf,SAAUjB,CAAAA,UAAUF,aAAaE,OAAO,MAAMuB,MAAS;AAAA,MACvD,cAAYlC;AAAAA,MAAYJ,UAExBwB,oBAACG,2BAA2B,EAAA;AAAA,IACpB,CAAA,GACT3B,YAAY,OAAOA,aAAa,WAC7BgD,eAAMC,SAASC,IACblD,UACA,CAACmD,MACCA,KAAKH,eAAMI,aAAaD,GAAyB;AAAA,MAAE9C;AAAAA,IAAAA,CAAY,CACnE,IACAL,QAAQ;AAAA,EAAA,CACH;AAEf;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport MuiDialog, { DialogProps as MuiDialogProps } from \"@mui/material/Dialog\";\nimport MuiBackdrop from \"@mui/material/Backdrop\";\n\nimport { Close } from \"@hitachivantara/uikit-react-icons\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames, setId } from \"@core/utils\";\nimport { withTooltip } from \"@core/hocs\";\nimport { useTheme } from \"@core/hooks\";\nimport fade from \"@core/utils/hexToRgbA\";\n\nimport { staticClasses, useClasses } from \"./Dialog.styles\";\nimport { HvButton } from \"..\";\n\nexport { staticClasses as dialogClasses };\n\nexport type HvDialogClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDialogProps\n extends Omit<MuiDialogProps, \"fullScreen\" | \"classes\" | \"open\">,\n HvBaseProps {\n /** Id to be applied to the root node. */\n id?: string;\n /** Current state of the Dialog. */\n open?: boolean;\n /** Function executed on close. */\n onClose?: (\n event: React.SyntheticEvent,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => void;\n /** @inheritdoc */\n maxWidth?: MuiDialogProps[\"maxWidth\"];\n /** @inheritdoc */\n fullWidth?: MuiDialogProps[\"fullWidth\"];\n /**\n * Element id that should be focus when the Dialog opens.\n * Auto-focusing elements can cause usability issues, so this should be avoided.\n * @deprecated Use `autoFocus` on the element instead, if auto-focusing is required.\n */\n firstFocusable?: string;\n /** Title for the button close. */\n buttonTitle?: string;\n /** Set the dialog to fullscreen mode. */\n fullscreen?: boolean;\n /** Prevent closing the dialog when clicking on the backdrop. */\n disableBackdropClick?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvDialogClasses;\n}\n\nexport const HvDialog = ({\n classes: classesProp,\n className,\n id,\n children,\n open = false,\n onClose,\n firstFocusable,\n buttonTitle = \"Close\",\n fullscreen = false,\n disableBackdropClick = false,\n ...others\n}: HvDialogProps) => {\n const { classes, css, cx } = useClasses(classesProp);\n delete (others as any).fullScreen;\n\n const { rootId, activeTheme, selectedMode } = useTheme();\n\n // Because the `disableBackdropClick` property was deprecated in MUI5\n // and we want to maintain that functionality to the user we're wrapping\n // the onClose call here to make that check.\n const wrappedClose = useCallback(\n (\n event: any,\n bypassValidation: boolean = false,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => {\n if (bypassValidation || !disableBackdropClick) {\n onClose?.(event, reason);\n }\n },\n [onClose, disableBackdropClick]\n );\n\n const measuredRef = useCallback(() => {\n if (!firstFocusable) return;\n\n const element = document.getElementById(firstFocusable);\n element?.focus();\n }, [firstFocusable]);\n\n const closeButtonDisplay = () => <Close role=\"presentation\" />;\n\n const CloseButtonTooltipWrapper = buttonTitle\n ? withTooltip(closeButtonDisplay, buttonTitle, \"top\")\n : closeButtonDisplay;\n\n const slots = useMemo<MuiDialogProps[\"slots\"]>(\n () => ({\n backdrop: (backdropProps) => (\n <MuiBackdrop open={open} onClick={wrappedClose} {...backdropProps} />\n ),\n }),\n [open, wrappedClose]\n );\n\n return (\n <MuiDialog\n // TODO: review\n // eslint-disable-next-line ssr-friendly/no-dom-globals-in-react-fc\n container={document.getElementById(rootId || \"\") || document.body}\n className={cx(className, classes.root)}\n classes={{ container: css({ position: \"relative\" }) }}\n id={id}\n ref={measuredRef}\n open={open}\n fullScreen={fullscreen}\n onClose={(event, reason) => wrappedClose(event, undefined, reason)}\n slots={slots}\n slotProps={{\n backdrop: {\n classes: {\n root: cx(\n css({\n background: fade(\n activeTheme?.colors?.modes[selectedMode].atmo4 ||\n theme.colors.atmo4,\n 0.8\n ),\n }),\n classes.background\n ),\n },\n },\n }}\n PaperProps={{\n classes: {\n root: cx(css({ position: \"absolute\" }), classes.paper, {\n fullscreen,\n [classes.fullscreen]: fullscreen,\n }),\n },\n }}\n aria-modal\n {...others}\n >\n <HvButton\n id={setId(id, \"close\")}\n className={classes.closeButton}\n variant=\"secondaryGhost\"\n onClick={(event) => wrappedClose(event, true, undefined)}\n aria-label={buttonTitle}\n >\n <CloseButtonTooltipWrapper />\n </HvButton>\n {children && typeof children === \"object\"\n ? React.Children.map(\n children,\n (c: React.ReactNode) =>\n c && React.cloneElement(c as React.ReactElement, { fullscreen })\n )\n : children}\n </MuiDialog>\n );\n};\n"],"names":["HvDialog","classes","classesProp","className","id","children","open","onClose","firstFocusable","buttonTitle","fullscreen","disableBackdropClick","others","css","cx","useClasses","fullScreen","rootId","activeTheme","selectedMode","useTheme","wrappedClose","useCallback","event","bypassValidation","reason","measuredRef","element","document","getElementById","focus","closeButtonDisplay","_jsx","Close","role","CloseButtonTooltipWrapper","withTooltip","slots","useMemo","backdrop","backdropProps","MuiBackdrop","onClick","_jsxs","MuiDialog","container","body","root","position","ref","undefined","slotProps","background","fade","colors","modes","atmo4","theme","PaperProps","paper","HvButton","setId","closeButton","variant","React","Children","map","c","cloneElement"],"mappings":";;;;;;;;;;;;;AAqDO,MAAMA,WAAWA,CAAC;AAAA,EACvBC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,OAAO;AAAA,EACPC;AAAAA,EACAC;AAAAA,EACAC,cAAc;AAAA,EACdC,aAAa;AAAA,EACbC,uBAAuB;AAAA,EACvB,GAAGC;AACU,MAAM;;AACb,QAAA;AAAA,IAAEX;AAAAA,IAASY;AAAAA,IAAKC;AAAAA,EAAAA,IAAOC,WAAWb,WAAW;AACnD,SAAQU,OAAeI;AAEjB,QAAA;AAAA,IAAEC;AAAAA,IAAQC;AAAAA,IAAaC;AAAAA,MAAiBC,SAAS;AAKvD,QAAMC,eAAeC,YACnB,CACEC,OACAC,mBAA4B,OAC5BC,WACG;AACCD,QAAAA,oBAAoB,CAACb,sBAAsB;AAC7CJ,yCAAUgB,OAAOE;AAAAA,IACnB;AAAA,EAAA,GAEF,CAAClB,SAASI,oBAAoB,CAChC;AAEMe,QAAAA,cAAcJ,YAAY,MAAM;AACpC,QAAI,CAACd;AAAgB;AAEfmB,UAAAA,UAAUC,SAASC,eAAerB,cAAc;AACtDmB,uCAASG;AAAAA,EAAM,GACd,CAACtB,cAAc,CAAC;AAEbuB,QAAAA,qBAAqBA,MAAMC,oBAACC,OAAK;AAAA,IAACC,MAAK;AAAA,EAAA,CAAgB;AAE7D,QAAMC,4BAA4B1B,cAC9B2B,YAAYL,oBAAoBtB,aAAa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D,MAAMzD,IAAI,OAAO;AAAA,QACrBD,WAAWF,QAAQ6D;AAAAA,QACnBC,SAAQ;AAAA,QACRrB,SAAUnB,CAAAA,UAAUF,aAAaE,OAAO,MAAM2B,MAAS;AAAA,QACvD,cAAYzC;AAAAA,QAAYJ,UAExB2B,oBAACG,2BAA2B,EAAA;AAAA,MACpB,CAAA,GACT9B,YAAY,OAAOA,aAAa,WAC7B2D,eAAMC,SAASC,IACb7D,UACA,CAAC8D,MACCA,KAAKH,eAAMI,aAAaD,GAAyB;AAAA,QAAEzD;AAAAA,MAAAA,CAAY,CACnE,IACAL,QAAQ;AAAA,IAAA;AAAA,EAAA;AAGlB;"}
@@ -1,23 +1,5 @@
1
- import _styled from "@emotion/styled/base";
2
- import { Backdrop } from "@mui/material";
3
1
  import { theme } from "@hitachivantara/uikit-styles";
4
- import { transientOptions } from "../../utils/transientOptions.js";
5
- import fade from "../../utils/hexToRgbA.js";
6
2
  import { createClasses } from "../../utils/classes.js";
7
- function _extends() {
8
- _extends = Object.assign ? Object.assign.bind() : function(target) {
9
- for (var i = 1; i < arguments.length; i++) {
10
- var source = arguments[i];
11
- for (var key in source) {
12
- if (Object.prototype.hasOwnProperty.call(source, key)) {
13
- target[key] = source[key];
14
- }
15
- }
16
- }
17
- return target;
18
- };
19
- return _extends.apply(this, arguments);
20
- }
21
3
  const {
22
4
  staticClasses,
23
5
  useClasses
@@ -41,18 +23,7 @@ const {
41
23
  height: 32
42
24
  }
43
25
  });
44
- const StyledBackdrop = /* @__PURE__ */ _styled(Backdrop, process.env.NODE_ENV === "production" ? _extends({}, {
45
- target: "e1x1ml1b0"
46
- }, transientOptions) : _extends({}, {
47
- target: "e1x1ml1b0",
48
- label: "StyledBackdrop"
49
- }, transientOptions))(({
50
- $backColor
51
- }) => ({
52
- background: fade($backColor, 0.8)
53
- }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzI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XCJub25lXCIsIHRoZW1lLmNvbG9ycy5zaGFkb3ddLFxuICAgIGJvcmRlclJhZGl1czogdGhlbWUuZGlhbG9nLmJvcmRlclJhZGl1cyxcbiAgfSxcbiAgZnVsbHNjcmVlbjoge30sXG4gIGNsb3NlQnV0dG9uOiB7XG4gICAgcGFkZGluZzogMCxcbiAgICBtaW5XaWR0aDogXCJhdXRvXCIsXG4gICAgcG9zaXRpb246IFwiYWJzb2x1dGVcIixcbiAgICB0b3A6IHRoZW1lLnNwYWNlLnNtLFxuICAgIHJpZ2h0OiB0aGVtZS5zcGFjZS5zbSxcbiAgICB3aWR0aDogMzIsXG4gICAgaGVpZ2h0OiAzMixcbiAgfSxcbn0pO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQmFja2Ryb3AgPSBzdHlsZWQoXG4gIE11aUJhY2tkcm9wLFxuICB0cmFuc2llbnRPcHRpb25zXG4pKCh7ICRiYWNrQ29sb3IgfTogeyAkYmFja0NvbG9yOiBzdHJpbmcgfSkgPT4gKHtcbiAgYmFja2dyb3VuZDogZmFkZSgkYmFja0NvbG9yLCAwLjgpLFxufSkpO1xuIl19 */");
54
26
  export {
55
- StyledBackdrop,
56
27
  staticClasses,
57
28
  useClasses
58
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.styles.js","sources":["../../../../src/components/Dialog/Dialog.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport { Backdrop as MuiBackdrop } from \"@mui/material\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\nimport fade from \"@core/utils/hexToRgbA\";\nimport { createClasses } from \"@core/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvDialog\", {\n root: {},\n background: {},\n paper: {\n color: theme.colors.secondary,\n backgroundColor: theme.colors.atmo1,\n boxShadow: [\"none\", theme.colors.shadow],\n borderRadius: theme.dialog.borderRadius,\n },\n fullscreen: {},\n closeButton: {\n padding: 0,\n minWidth: \"auto\",\n position: \"absolute\",\n top: theme.space.sm,\n right: theme.space.sm,\n width: 32,\n height: 32,\n },\n});\n\nexport const StyledBackdrop = styled(\n MuiBackdrop,\n transientOptions\n)(({ $backColor }: { $backColor: string }) => ({\n background: fade($backColor, 0.8),\n}));\n"],"names":["staticClasses","useClasses","createClasses","root","background","paper","color","theme","colors","secondary","backgroundColor","atmo1","boxShadow","shadow","borderRadius","dialog","fullscreen","closeButton","padding","minWidth","position","top","space","sm","right","width","height","StyledBackdrop","MuiBackdrop","process","env","NODE_ENV","_extends","target","transientOptions","label","$backColor","fade"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,YAAY;AAAA,EACrEC,MAAM,CAAC;AAAA,EACPC,YAAY,CAAC;AAAA,EACbC,OAAO;AAAA,IACLC,OAAOC,MAAMC,OAAOC;AAAAA,IACpBC,iBAAiBH,MAAMC,OAAOG;AAAAA,IAC9BC,WAAW,CAAC,QAAQL,MAAMC,OAAOK,MAAM;AAAA,IACvCC,cAAcP,MAAMQ,OAAOD;AAAAA,EAC7B;AAAA,EACAE,YAAY,CAAC;AAAA,EACbC,aAAa;AAAA,IACXC,SAAS;AAAA,IACTC,UAAU;AAAA,IACVC,UAAU;AAAA,IACVC,KAAKd,MAAMe,MAAMC;AAAAA,IACjBC,OAAOjB,MAAMe,MAAMC;AAAAA,IACnBE,OAAO;AAAA,IACPC,QAAQ;AAAA,EACV;AACF,CAAC;AAEYC,MAAAA,yCACXC,UAAWC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACXC,gBAAgB,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,gBAAgB,CAClB,EAAE,CAAC;AAAA,EAAEE;AAAmC,OAAO;AAAA,EAC7ChC,YAAYiC,KAAKD,YAAY,GAAG;AAClC,IAAEP,QAAAC,IAAAC,aAAC,eAAA,KAAA,6vDAAA;"}
1
+ {"version":3,"file":"Dialog.styles.js","sources":["../../../../src/components/Dialog/Dialog.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvDialog\", {\n root: {},\n background: {},\n paper: {\n color: theme.colors.secondary,\n backgroundColor: theme.colors.atmo1,\n boxShadow: [\"none\", theme.colors.shadow],\n borderRadius: theme.dialog.borderRadius,\n },\n fullscreen: {},\n closeButton: {\n padding: 0,\n minWidth: \"auto\",\n position: \"absolute\",\n top: theme.space.sm,\n right: theme.space.sm,\n width: 32,\n height: 32,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","background","paper","color","theme","colors","secondary","backgroundColor","atmo1","boxShadow","shadow","borderRadius","dialog","fullscreen","closeButton","padding","minWidth","position","top","space","sm","right","width","height"],"mappings":";;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,YAAY;AAAA,EACrEC,MAAM,CAAC;AAAA,EACPC,YAAY,CAAC;AAAA,EACbC,OAAO;AAAA,IACLC,OAAOC,MAAMC,OAAOC;AAAAA,IACpBC,iBAAiBH,MAAMC,OAAOG;AAAAA,IAC9BC,WAAW,CAAC,QAAQL,MAAMC,OAAOK,MAAM;AAAA,IACvCC,cAAcP,MAAMQ,OAAOD;AAAAA,EAC7B;AAAA,EACAE,YAAY,CAAC;AAAA,EACbC,aAAa;AAAA,IACXC,SAAS;AAAA,IACTC,UAAU;AAAA,IACVC,UAAU;AAAA,IACVC,KAAKd,MAAMe,MAAMC;AAAAA,IACjBC,OAAOjB,MAAMe,MAAMC;AAAAA,IACnBE,OAAO;AAAA,IACPC,QAAQ;AAAA,EACV;AACF,CAAC;"}