@hitachivantara/uikit-react-core 5.19.0 → 5.19.1
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.
- package/dist/cjs/components/Dialog/Actions/Actions.cjs +14 -7
- package/dist/cjs/components/Dialog/Actions/Actions.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Actions/Actions.styles.cjs +18 -38
- package/dist/cjs/components/Dialog/Actions/Actions.styles.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Content/Content.cjs +11 -6
- package/dist/cjs/components/Dialog/Content/Content.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Content/Content.styles.cjs +13 -32
- package/dist/cjs/components/Dialog/Content/Content.styles.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +20 -21
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.styles.cjs +0 -31
- package/dist/cjs/components/Dialog/Dialog.styles.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Title/Title.cjs +22 -11
- package/dist/cjs/components/Dialog/Title/Title.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Title/Title.styles.cjs +18 -64
- package/dist/cjs/components/Dialog/Title/Title.styles.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +4 -5
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/InlineEditor/InlineEditor.cjs +5 -10
- package/dist/cjs/components/InlineEditor/InlineEditor.cjs.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/components/QueryBuilder/QueryBuilder.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.cjs.map +1 -1
- package/dist/cjs/components/Snackbar/SnackbarProvider/SnackbarProvider.cjs +1 -1
- package/dist/cjs/components/Snackbar/SnackbarProvider/SnackbarProvider.cjs.map +1 -1
- package/dist/cjs/components/Table/TableCell/TableCell.cjs +6 -6
- package/dist/cjs/components/Table/TableCell/TableCell.cjs.map +1 -1
- package/dist/cjs/components/Table/TableRow/TableRow.cjs +6 -5
- package/dist/cjs/components/Table/TableRow/TableRow.cjs.map +1 -1
- package/dist/cjs/index.cjs +10 -10
- package/dist/cjs/utils/theme.cjs +6 -7
- package/dist/cjs/utils/theme.cjs.map +1 -1
- package/dist/esm/components/Dialog/Actions/Actions.js +15 -9
- package/dist/esm/components/Dialog/Actions/Actions.js.map +1 -1
- package/dist/esm/components/Dialog/Actions/Actions.styles.js +18 -35
- package/dist/esm/components/Dialog/Actions/Actions.styles.js.map +1 -1
- package/dist/esm/components/Dialog/Content/Content.js +14 -8
- package/dist/esm/components/Dialog/Content/Content.js.map +1 -1
- package/dist/esm/components/Dialog/Content/Content.styles.js +13 -30
- package/dist/esm/components/Dialog/Content/Content.styles.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +20 -22
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.styles.js +0 -29
- package/dist/esm/components/Dialog/Dialog.styles.js.map +1 -1
- package/dist/esm/components/Dialog/Title/Title.js +23 -13
- package/dist/esm/components/Dialog/Title/Title.js.map +1 -1
- package/dist/esm/components/Dialog/Title/Title.styles.js +18 -61
- package/dist/esm/components/Dialog/Title/Title.styles.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +4 -5
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/InlineEditor/InlineEditor.js +5 -10
- package/dist/esm/components/InlineEditor/InlineEditor.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/QueryBuilder/QueryBuilder.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarContentWrapper/SnackbarContentWrapper.js.map +1 -1
- package/dist/esm/components/Snackbar/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/esm/components/Snackbar/SnackbarProvider/SnackbarProvider.js.map +1 -1
- package/dist/esm/components/Table/TableCell/TableCell.js +6 -6
- package/dist/esm/components/Table/TableCell/TableCell.js.map +1 -1
- package/dist/esm/components/Table/TableRow/TableRow.js +6 -5
- package/dist/esm/components/Table/TableRow/TableRow.js.map +1 -1
- package/dist/esm/index.js +218 -218
- package/dist/esm/utils/theme.js +6 -7
- package/dist/esm/utils/theme.js.map +1 -1
- package/dist/types/index.d.ts +144 -120
- package/package.json +2 -2
- package/dist/cjs/components/Dialog/Actions/actionsClasses.cjs +0 -8
- package/dist/cjs/components/Dialog/Actions/actionsClasses.cjs.map +0 -1
- package/dist/cjs/components/Dialog/Content/contentClasses.cjs +0 -8
- package/dist/cjs/components/Dialog/Content/contentClasses.cjs.map +0 -1
- package/dist/cjs/components/Dialog/Title/titleClasses.cjs +0 -8
- package/dist/cjs/components/Dialog/Title/titleClasses.cjs.map +0 -1
- package/dist/esm/components/Dialog/Actions/actionsClasses.js +0 -8
- package/dist/esm/components/Dialog/Actions/actionsClasses.js.map +0 -1
- package/dist/esm/components/Dialog/Content/contentClasses.js +0 -8
- package/dist/esm/components/Dialog/Content/contentClasses.js.map +0 -1
- package/dist/esm/components/Dialog/Title/titleClasses.js +0 -8
- package/dist/esm/components/Dialog/Title/titleClasses.js.map +0 -1
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const MuiDialogActions = require("@mui/material/DialogActions");
|
|
4
4
|
const Actions_styles = require("./Actions.styles.cjs");
|
|
5
|
-
const actionsClasses = require("./actionsClasses.cjs");
|
|
6
5
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
6
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
7
|
+
const MuiDialogActions__default = /* @__PURE__ */ _interopDefault(MuiDialogActions);
|
|
7
8
|
const HvDialogActions = ({
|
|
8
|
-
classes,
|
|
9
|
+
classes: classesProp,
|
|
9
10
|
className,
|
|
10
11
|
children,
|
|
11
12
|
fullscreen = false,
|
|
12
13
|
...others
|
|
13
14
|
}) => {
|
|
14
|
-
|
|
15
|
+
const {
|
|
16
|
+
classes,
|
|
17
|
+
cx
|
|
18
|
+
} = Actions_styles.useClasses(classesProp);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MuiDialogActions__default.default, {
|
|
15
20
|
className,
|
|
16
21
|
classes: {
|
|
17
|
-
root:
|
|
18
|
-
|
|
22
|
+
root: cx(classes.root, {
|
|
23
|
+
[classes.fullscreen]: fullscreen
|
|
24
|
+
}),
|
|
25
|
+
spacing: classes.spacing
|
|
19
26
|
},
|
|
20
|
-
$fullscreen: fullscreen,
|
|
21
27
|
...others,
|
|
22
28
|
children
|
|
23
29
|
});
|
|
24
30
|
};
|
|
31
|
+
exports.dialogActionClasses = Actions_styles.staticClasses;
|
|
25
32
|
exports.HvDialogActions = HvDialogActions;
|
|
26
33
|
//# sourceMappingURL=Actions.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.cjs","sources":["../../../../../src/components/Dialog/Actions/Actions.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Actions.cjs","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,eAAAA,WAAWN,WAAW;AAE9C,wCACGO,0BAAAA,SAAgB;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,51 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const _styled = require("@emotion/styled/base");
|
|
4
3
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
return _extends.apply(this, arguments);
|
|
23
|
-
}
|
|
24
|
-
const StyledActions = /* @__PURE__ */ _styled__default.default(DialogActions__default.default, process.env.NODE_ENV === "production" ? _extends({}, {
|
|
25
|
-
target: "e5nbcch0"
|
|
26
|
-
}, transientOptions.transientOptions) : _extends({}, {
|
|
27
|
-
target: "e5nbcch0",
|
|
28
|
-
label: "StyledActions"
|
|
29
|
-
}, transientOptions.transientOptions))(({
|
|
30
|
-
$fullscreen
|
|
31
|
-
}) => ({
|
|
32
|
-
margin: "0",
|
|
33
|
-
padding: uikitStyles.theme.space.sm,
|
|
34
|
-
borderTop: `3px solid ${uikitStyles.theme.colors.atmo2}`,
|
|
35
|
-
height: 65,
|
|
36
|
-
maxHeight: 65,
|
|
37
|
-
flex: 1,
|
|
38
|
-
...$fullscreen && {
|
|
4
|
+
const classes = require("../../../utils/classes.cjs");
|
|
5
|
+
const {
|
|
6
|
+
staticClasses,
|
|
7
|
+
useClasses
|
|
8
|
+
} = classes.createClasses("HvDialog-Action", {
|
|
9
|
+
root: {
|
|
10
|
+
margin: "0",
|
|
11
|
+
padding: uikitStyles.theme.space.sm,
|
|
12
|
+
borderTop: `3px solid ${uikitStyles.theme.colors.atmo2}`,
|
|
13
|
+
height: 65,
|
|
14
|
+
maxHeight: 65,
|
|
15
|
+
flex: 1
|
|
16
|
+
},
|
|
17
|
+
fullscreen: {
|
|
39
18
|
position: "fixed",
|
|
40
19
|
width: "100%",
|
|
41
20
|
bottom: 0,
|
|
42
21
|
left: 0
|
|
43
22
|
},
|
|
44
|
-
|
|
23
|
+
spacing: {
|
|
45
24
|
"& > :not(:first-of-type)": {
|
|
46
25
|
marginLeft: uikitStyles.theme.space.xs
|
|
47
26
|
}
|
|
48
27
|
}
|
|
49
|
-
})
|
|
50
|
-
exports.
|
|
28
|
+
});
|
|
29
|
+
exports.staticClasses = staticClasses;
|
|
30
|
+
exports.useClasses = useClasses;
|
|
51
31
|
//# sourceMappingURL=Actions.styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.styles.cjs","sources":["../../../../../src/components/Dialog/Actions/Actions.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Actions.styles.cjs","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,QAAAA,cAAc,mBAAmB;AAAA,EAC5EC,MAAM;AAAA,IACJC,QAAQ;AAAA,IACRC,SAASC,YAAAA,MAAMC,MAAMC;AAAAA,IACrBC,WAAY,aAAYH,YAAAA,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,YAAAA,MAAMC,MAAMe;AAAAA,IAC1B;AAAA,EACF;AACF,CAAC;;;"}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const clsx = require("clsx");
|
|
4
3
|
const MuiDialogContent = require("@mui/material/DialogContent");
|
|
5
4
|
const Content_styles = require("./Content.styles.cjs");
|
|
6
|
-
const contentClasses = require("./contentClasses.cjs");
|
|
7
5
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
6
|
+
const Typography = require("../../Typography/Typography.cjs");
|
|
8
7
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
9
8
|
const MuiDialogContent__default = /* @__PURE__ */ _interopDefault(MuiDialogContent);
|
|
10
9
|
const HvDialogContent = ({
|
|
11
|
-
classes,
|
|
10
|
+
classes: classesProp,
|
|
12
11
|
className,
|
|
13
12
|
children,
|
|
14
13
|
indentContent = false
|
|
15
14
|
}) => {
|
|
16
|
-
|
|
15
|
+
const {
|
|
16
|
+
classes,
|
|
17
|
+
cx
|
|
18
|
+
} = Content_styles.useClasses(classesProp);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, {
|
|
17
20
|
component: MuiDialogContent__default.default,
|
|
18
|
-
className:
|
|
19
|
-
|
|
21
|
+
className: cx(classes.root, {
|
|
22
|
+
[classes.textContent]: !!indentContent
|
|
23
|
+
}, className),
|
|
20
24
|
children
|
|
21
25
|
});
|
|
22
26
|
};
|
|
27
|
+
exports.dialogContentClasses = Content_styles.staticClasses;
|
|
23
28
|
exports.HvDialogContent = HvDialogContent;
|
|
24
29
|
//# sourceMappingURL=Content.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.cjs","sources":["../../../../../src/components/Dialog/Content/Content.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Content.cjs","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,eAAAA,WAAWL,WAAW;AAE9C,wCACGM,WAAAA,cAAY;AAAA,IACXC,WAAWC,0BAAAA;AAAAA,IACXP,WAAWG,GACTL,QAAQU,MACR;AAAA,MAAE,CAACV,QAAQW,WAAW,GAAG,CAAC,CAACP;AAAAA,OAC3BF,SACF;AAAA,IAAEC;AAAAA,EAAAA,CAGU;AAElB;;;"}
|
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const _styled = require("@emotion/styled/base");
|
|
4
3
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
target[key] = source[key];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return target;
|
|
20
|
-
};
|
|
21
|
-
return _extends.apply(this, arguments);
|
|
22
|
-
}
|
|
23
|
-
const StyledTypography = /* @__PURE__ */ _styled__default.default(Typography.HvTypography, process.env.NODE_ENV === "production" ? _extends({}, {
|
|
24
|
-
target: "e4uf5ag0"
|
|
25
|
-
}, transientOptions.transientOptions) : _extends({}, {
|
|
26
|
-
target: "e4uf5ag0",
|
|
27
|
-
label: "StyledTypography"
|
|
28
|
-
}, transientOptions.transientOptions))(({
|
|
29
|
-
$indentContent
|
|
30
|
-
}) => ({
|
|
31
|
-
padding: `0 ${uikitStyles.theme.space.sm} ${uikitStyles.theme.space.sm} ${uikitStyles.theme.space.sm}`,
|
|
32
|
-
flex: "none",
|
|
33
|
-
...$indentContent && {
|
|
4
|
+
const classes = require("../../../utils/classes.cjs");
|
|
5
|
+
const {
|
|
6
|
+
staticClasses,
|
|
7
|
+
useClasses
|
|
8
|
+
} = classes.createClasses("HvDialog-Content", {
|
|
9
|
+
root: {
|
|
10
|
+
padding: `0 ${uikitStyles.theme.space.sm} ${uikitStyles.theme.space.sm} ${uikitStyles.theme.space.sm}`,
|
|
11
|
+
flex: "none"
|
|
12
|
+
},
|
|
13
|
+
textContent: {
|
|
34
14
|
marginLeft: "42px",
|
|
35
15
|
paddingRight: "62px",
|
|
36
16
|
flex: 1,
|
|
37
17
|
overflowY: "auto"
|
|
38
18
|
}
|
|
39
|
-
})
|
|
40
|
-
exports.
|
|
19
|
+
});
|
|
20
|
+
exports.staticClasses = staticClasses;
|
|
21
|
+
exports.useClasses = useClasses;
|
|
41
22
|
//# sourceMappingURL=Content.styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.styles.cjs","sources":["../../../../../src/components/Dialog/Content/Content.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Content.styles.cjs","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,QAAAA,cAAc,oBAAoB;AAAA,EAC7EC,MAAM;AAAA,IACJC,SAAU,KAAIC,YAAMC,MAAAA,MAAMC,MAAMF,YAAMC,MAAAA,MAAMC,MAAMF,YAAAA,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;;;"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const MuiDialog = require("@mui/material/Dialog");
|
|
5
|
+
const MuiBackdrop = require("@mui/material/Backdrop");
|
|
5
6
|
const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
6
7
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
8
|
+
const hexToRgbA = require("../../utils/hexToRgbA.cjs");
|
|
7
9
|
const Dialog_styles = require("./Dialog.styles.cjs");
|
|
8
10
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
9
11
|
const withTooltip = require("../../hocs/withTooltip.cjs");
|
|
@@ -13,17 +15,7 @@ const setId = require("../../utils/setId.cjs");
|
|
|
13
15
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
16
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
15
17
|
const MuiDialog__default = /* @__PURE__ */ _interopDefault(MuiDialog);
|
|
16
|
-
const
|
|
17
|
-
var _a;
|
|
18
|
-
const {
|
|
19
|
-
activeTheme,
|
|
20
|
-
selectedMode
|
|
21
|
-
} = useTheme.useTheme();
|
|
22
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog_styles.StyledBackdrop, {
|
|
23
|
-
$backColor: ((_a = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _a.modes[selectedMode].atmo4) || uikitStyles.theme.colors.atmo4,
|
|
24
|
-
...backdropProps
|
|
25
|
-
});
|
|
26
|
-
};
|
|
18
|
+
const MuiBackdrop__default = /* @__PURE__ */ _interopDefault(MuiBackdrop);
|
|
27
19
|
const HvDialog = ({
|
|
28
20
|
classes: classesProp,
|
|
29
21
|
className,
|
|
@@ -37,6 +29,7 @@ const HvDialog = ({
|
|
|
37
29
|
disableBackdropClick = false,
|
|
38
30
|
...others
|
|
39
31
|
}) => {
|
|
32
|
+
var _a;
|
|
40
33
|
const {
|
|
41
34
|
classes,
|
|
42
35
|
css,
|
|
@@ -44,7 +37,9 @@ const HvDialog = ({
|
|
|
44
37
|
} = Dialog_styles.useClasses(classesProp);
|
|
45
38
|
delete others.fullScreen;
|
|
46
39
|
const {
|
|
47
|
-
rootId
|
|
40
|
+
rootId,
|
|
41
|
+
activeTheme,
|
|
42
|
+
selectedMode
|
|
48
43
|
} = useTheme.useTheme();
|
|
49
44
|
const wrappedClose = React.useCallback((event, bypassValidation = false, reason) => {
|
|
50
45
|
if (bypassValidation || !disableBackdropClick) {
|
|
@@ -62,7 +57,7 @@ const HvDialog = ({
|
|
|
62
57
|
});
|
|
63
58
|
const CloseButtonTooltipWrapper = buttonTitle ? withTooltip.default(closeButtonDisplay, buttonTitle, "top") : closeButtonDisplay;
|
|
64
59
|
const slots = React.useMemo(() => ({
|
|
65
|
-
backdrop: (backdropProps) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
backdrop: (backdropProps) => /* @__PURE__ */ jsxRuntime.jsx(MuiBackdrop__default.default, {
|
|
66
61
|
open,
|
|
67
62
|
onClick: wrappedClose,
|
|
68
63
|
...backdropProps
|
|
@@ -71,20 +66,24 @@ const HvDialog = ({
|
|
|
71
66
|
return /* @__PURE__ */ jsxRuntime.jsxs(MuiDialog__default.default, {
|
|
72
67
|
container: document.getElementById(rootId || "") || document.body,
|
|
73
68
|
className: cx(className, classes.root),
|
|
69
|
+
classes: {
|
|
70
|
+
container: css({
|
|
71
|
+
position: "relative"
|
|
72
|
+
})
|
|
73
|
+
},
|
|
74
74
|
id,
|
|
75
75
|
ref: measuredRef,
|
|
76
76
|
open,
|
|
77
77
|
fullScreen: fullscreen,
|
|
78
78
|
onClose: (event, reason) => wrappedClose(event, void 0, reason),
|
|
79
79
|
slots,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
root: classes.background
|
|
80
|
+
slotProps: {
|
|
81
|
+
backdrop: {
|
|
82
|
+
classes: {
|
|
83
|
+
root: cx(css({
|
|
84
|
+
background: hexToRgbA.default(((_a = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _a.modes[selectedMode].atmo4) || uikitStyles.theme.colors.atmo4, 0.8)
|
|
85
|
+
}), classes.background)
|
|
86
|
+
}
|
|
88
87
|
}
|
|
89
88
|
},
|
|
90
89
|
PaperProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.cjs","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport MuiDialog, { DialogProps as MuiDialogProps } from \"@mui/material/Dialog\";\nimport
|
|
1
|
+
{"version":3,"file":"Dialog.cjs","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 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","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":"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"}
|
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const _styled = require("@emotion/styled/base");
|
|
4
|
-
const material = require("@mui/material");
|
|
5
3
|
const uikitStyles = require("@hitachivantara/uikit-styles");
|
|
6
|
-
const transientOptions = require("../../utils/transientOptions.cjs");
|
|
7
|
-
const hexToRgbA = require("../../utils/hexToRgbA.cjs");
|
|
8
4
|
const classes = require("../../utils/classes.cjs");
|
|
9
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
|
-
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
11
|
-
function _extends() {
|
|
12
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
13
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
-
var source = arguments[i];
|
|
15
|
-
for (var key in source) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
-
target[key] = source[key];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return target;
|
|
22
|
-
};
|
|
23
|
-
return _extends.apply(this, arguments);
|
|
24
|
-
}
|
|
25
5
|
const {
|
|
26
6
|
staticClasses,
|
|
27
7
|
useClasses
|
|
@@ -45,17 +25,6 @@ const {
|
|
|
45
25
|
height: 32
|
|
46
26
|
}
|
|
47
27
|
});
|
|
48
|
-
const StyledBackdrop = /* @__PURE__ */ _styled__default.default(material.Backdrop, process.env.NODE_ENV === "production" ? _extends({}, {
|
|
49
|
-
target: "e1x1ml1b0"
|
|
50
|
-
}, transientOptions.transientOptions) : _extends({}, {
|
|
51
|
-
target: "e1x1ml1b0",
|
|
52
|
-
label: "StyledBackdrop"
|
|
53
|
-
}, transientOptions.transientOptions))(({
|
|
54
|
-
$backColor
|
|
55
|
-
}) => ({
|
|
56
|
-
background: hexToRgbA.default($backColor, 0.8)
|
|
57
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvRGlhbG9nL0RpYWxvZy5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRCOEIiLCJmaWxlIjoiL2hvbWUvcnVubmVyL3dvcmsvaHYtdWlraXQtcmVhY3QvaHYtdWlraXQtcmVhY3QvcGFja2FnZXMvY29yZS9zcmMvY29tcG9uZW50cy9EaWFsb2cvRGlhbG9nLnN0eWxlcy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IEJhY2tkcm9wIGFzIE11aUJhY2tkcm9wIH0gZnJvbSBcIkBtdWkvbWF0ZXJpYWxcIjtcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSBcIkBoaXRhY2hpdmFudGFyYS91aWtpdC1zdHlsZXNcIjtcbmltcG9ydCB7IHRyYW5zaWVudE9wdGlvbnMgfSBmcm9tIFwiQGNvcmUvdXRpbHMvdHJhbnNpZW50T3B0aW9uc1wiO1xuaW1wb3J0IGZhZGUgZnJvbSBcIkBjb3JlL3V0aWxzL2hleFRvUmdiQVwiO1xuaW1wb3J0IHsgY3JlYXRlQ2xhc3NlcyB9IGZyb20gXCJAY29yZS91dGlsc1wiO1xuXG5leHBvcnQgY29uc3QgeyBzdGF0aWNDbGFzc2VzLCB1c2VDbGFzc2VzIH0gPSBjcmVhdGVDbGFzc2VzKFwiSHZEaWFsb2dcIiwge1xuICByb290OiB7fSxcbiAgYmFja2dyb3VuZDoge30sXG4gIHBhcGVyOiB7XG4gICAgY29sb3I6IHRoZW1lLmNvbG9ycy5zZWNvbmRhcnksXG4gICAgYmFja2dyb3VuZENvbG9yOiB0aGVtZS5jb2xvcnMuYXRtbzEsXG4gICAgYm94U2hhZG93OiBbXCJub25lXCIsIHRoZW1lLmNvbG9ycy5zaGFkb3ddLFxuICAgIGJvcmRlclJhZGl1czogdGhlbWUuZGlhbG9nLmJvcmRlclJhZGl1cyxcbiAgfSxcbiAgZnVsbHNjcmVlbjoge30sXG4gIGNsb3NlQnV0dG9uOiB7XG4gICAgcGFkZGluZzogMCxcbiAgICBtaW5XaWR0aDogXCJhdXRvXCIsXG4gICAgcG9zaXRpb246IFwiYWJzb2x1dGVcIixcbiAgICB0b3A6IHRoZW1lLnNwYWNlLnNtLFxuICAgIHJpZ2h0OiB0aGVtZS5zcGFjZS5zbSxcbiAgICB3aWR0aDogMzIsXG4gICAgaGVpZ2h0OiAzMixcbiAgfSxcbn0pO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkQmFja2Ryb3AgPSBzdHlsZWQoXG4gIE11aUJhY2tkcm9wLFxuICB0cmFuc2llbnRPcHRpb25zXG4pKCh7ICRiYWNrQ29sb3IgfTogeyAkYmFja0NvbG9yOiBzdHJpbmcgfSkgPT4gKHtcbiAgYmFja2dyb3VuZDogZmFkZSgkYmFja0NvbG9yLCAwLjgpLFxufSkpO1xuIl19 */");
|
|
58
|
-
exports.StyledBackdrop = StyledBackdrop;
|
|
59
28
|
exports.staticClasses = staticClasses;
|
|
60
29
|
exports.useClasses = useClasses;
|
|
61
30
|
//# sourceMappingURL=Dialog.styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.styles.cjs","sources":["../../../../src/components/Dialog/Dialog.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Dialog.styles.cjs","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,QAAAA,cAAc,YAAY;AAAA,EACrEC,MAAM,CAAC;AAAA,EACPC,YAAY,CAAC;AAAA,EACbC,OAAO;AAAA,IACLC,OAAOC,YAAAA,MAAMC,OAAOC;AAAAA,IACpBC,iBAAiBH,YAAAA,MAAMC,OAAOG;AAAAA,IAC9BC,WAAW,CAAC,QAAQL,kBAAMC,OAAOK,MAAM;AAAA,IACvCC,cAAcP,YAAAA,MAAMQ,OAAOD;AAAAA,EAC7B;AAAA,EACAE,YAAY,CAAC;AAAA,EACbC,aAAa;AAAA,IACXC,SAAS;AAAA,IACTC,UAAU;AAAA,IACVC,UAAU;AAAA,IACVC,KAAKd,YAAAA,MAAMe,MAAMC;AAAAA,IACjBC,OAAOjB,YAAAA,MAAMe,MAAMC;AAAAA,IACnBE,OAAO;AAAA,IACPC,QAAQ;AAAA,EACV;AACF,CAAC;;;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const MuiDialogTitle = require("@mui/material/DialogTitle");
|
|
4
4
|
const Title_styles = require("./Title.styles.cjs");
|
|
5
|
-
const titleClasses = require("./titleClasses.cjs");
|
|
6
5
|
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
7
6
|
const iconVariant = require("../../../utils/iconVariant.cjs");
|
|
8
7
|
const useTheme = require("../../../hooks/useTheme.cjs");
|
|
9
8
|
const Typography = require("../../Typography/Typography.cjs");
|
|
9
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
|
+
const MuiDialogTitle__default = /* @__PURE__ */ _interopDefault(MuiDialogTitle);
|
|
10
11
|
const HvDialogTitle = ({
|
|
11
|
-
classes,
|
|
12
|
+
classes: classesProp,
|
|
12
13
|
className,
|
|
13
14
|
children,
|
|
14
15
|
variant = "default",
|
|
@@ -16,6 +17,11 @@ const HvDialogTitle = ({
|
|
|
16
17
|
customIcon = null,
|
|
17
18
|
...others
|
|
18
19
|
}) => {
|
|
20
|
+
const {
|
|
21
|
+
classes,
|
|
22
|
+
css,
|
|
23
|
+
cx
|
|
24
|
+
} = Title_styles.useClasses(classesProp);
|
|
19
25
|
const {
|
|
20
26
|
activeTheme
|
|
21
27
|
} = useTheme.useTheme();
|
|
@@ -25,15 +31,19 @@ const HvDialogTitle = ({
|
|
|
25
31
|
} = others;
|
|
26
32
|
delete others.fullscreen;
|
|
27
33
|
const icon = customIcon || showIcon && iconVariant.default(variant);
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
className:
|
|
30
|
-
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MuiDialogTitle__default.default, {
|
|
35
|
+
className: cx(!fullscreen && css({
|
|
36
|
+
flex: 1
|
|
37
|
+
}), classes.root, {
|
|
38
|
+
[classes.fullscreen]: fullscreen
|
|
39
|
+
}, className),
|
|
31
40
|
...others,
|
|
32
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33
|
-
className:
|
|
34
|
-
children: [icon, /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35
|
-
className:
|
|
36
|
-
|
|
41
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
42
|
+
className: classes.messageContainer,
|
|
43
|
+
children: [icon, /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
44
|
+
className: cx({
|
|
45
|
+
[classes.textWithIcon]: !!icon
|
|
46
|
+
}),
|
|
37
47
|
children: [!isString && children, isString && /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, {
|
|
38
48
|
variant: activeTheme == null ? void 0 : activeTheme.dialog.titleVariant,
|
|
39
49
|
children
|
|
@@ -42,5 +52,6 @@ const HvDialogTitle = ({
|
|
|
42
52
|
})
|
|
43
53
|
});
|
|
44
54
|
};
|
|
55
|
+
exports.dialogTitleClasses = Title_styles.staticClasses;
|
|
45
56
|
exports.HvDialogTitle = HvDialogTitle;
|
|
46
57
|
//# sourceMappingURL=Title.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.cjs","sources":["../../../../../src/components/Dialog/Title/Title.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Title.cjs","sources":["../../../../../src/components/Dialog/Title/Title.tsx"],"sourcesContent":["import MuiDialogTitle, {\n DialogTitleProps as MuiDialogTitleProps,\n} from \"@mui/material/DialogTitle\";\n\nimport { HvTypography } from \"@core/components\";\nimport { HvBaseProps } from \"@core/types\";\nimport { ExtractNames, iconVariant } from \"@core/utils\";\nimport { useTheme } from \"@core/hooks\";\n\nimport { staticClasses, useClasses } from \"./Title.styles\";\n\nexport { staticClasses as dialogTitleClasses };\n\nexport type HvDialogTitleClasses = ExtractNames<typeof useClasses>;\n\nexport type HvDialogTitleVariant =\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\"\n | \"default\";\n\nexport interface HvDialogTitleProps\n extends Omit<MuiDialogTitleProps, \"variant\" | \"classes\">,\n HvBaseProps<HTMLSpanElement, \"color\"> {\n /** Variant of the Dialog. */\n variant?: HvDialogTitleVariant;\n /** Controls if the associated icon to the variant should be shown. */\n showIcon?: boolean;\n /** Custom icon to replace the variant default. */\n customIcon?: React.ReactNode;\n classes?: HvDialogTitleClasses;\n}\n\nexport const HvDialogTitle = ({\n classes: classesProp,\n className,\n children,\n variant = \"default\",\n showIcon = true,\n customIcon = null,\n ...others\n}: HvDialogTitleProps) => {\n const { classes, css, cx } = useClasses(classesProp);\n\n const { activeTheme } = useTheme();\n\n const isString = typeof children === \"string\";\n\n const { fullscreen } = others as any;\n delete (others as any).fullscreen;\n\n const icon = customIcon || (showIcon && iconVariant(variant));\n\n return (\n <MuiDialogTitle\n className={cx(\n !fullscreen && css({ flex: 1 }),\n classes.root,\n {\n [classes.fullscreen]: fullscreen,\n },\n className\n )}\n {...others}\n >\n <div className={classes.messageContainer}>\n {icon}\n <div className={cx({ [classes.textWithIcon]: !!icon })}>\n {!isString && children}\n {isString && (\n <HvTypography variant={activeTheme?.dialog.titleVariant}>\n {children}\n </HvTypography>\n )}\n </div>\n </div>\n </MuiDialogTitle>\n );\n};\n"],"names":["HvDialogTitle","classes","classesProp","className","children","variant","showIcon","customIcon","others","css","cx","useClasses","activeTheme","useTheme","isString","fullscreen","icon","iconVariant","MuiDialogTitle","flex","root","messageContainer","_jsxs","textWithIcon","HvTypography","dialog","titleVariant"],"mappings":";;;;;;;;;;AAkCO,MAAMA,gBAAgBA,CAAC;AAAA,EAC5BC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC,UAAU;AAAA,EACVC,WAAW;AAAA,EACXC,aAAa;AAAA,EACb,GAAGC;AACe,MAAM;AAClB,QAAA;AAAA,IAAEP;AAAAA,IAASQ;AAAAA,IAAKC;AAAAA,EAAAA,IAAOC,aAAAA,WAAWT,WAAW;AAE7C,QAAA;AAAA,IAAEU;AAAAA,MAAgBC,SAAS,SAAA;AAE3BC,QAAAA,WAAW,OAAOV,aAAa;AAE/B,QAAA;AAAA,IAAEW;AAAAA,EAAeP,IAAAA;AACvB,SAAQA,OAAeO;AAEvB,QAAMC,OAAOT,cAAeD,YAAYW,YAAAA,QAAYZ,OAAO;AAE3D,wCACGa,wBAAAA,SAAc;AAAA,IACbf,WAAWO,GACT,CAACK,cAAcN,IAAI;AAAA,MAAEU,MAAM;AAAA,IAAA,CAAG,GAC9BlB,QAAQmB,MACR;AAAA,MACE,CAACnB,QAAQc,UAAU,GAAGA;AAAAA,OAExBZ,SACF;AAAA,IAAE,GACEK;AAAAA,IAAMJ,0CAEV,OAAA;AAAA,MAAKD,WAAWF,QAAQoB;AAAAA,MAAiBjB,UAAA,CACtCY,MACDM,2BAAAA,KAAA,OAAA;AAAA,QAAKnB,WAAWO,GAAG;AAAA,UAAE,CAACT,QAAQsB,YAAY,GAAG,CAAC,CAACP;AAAAA,QAAAA,CAAM;AAAA,QAAEZ,UAAA,CACpD,CAACU,YAAYV,UACbU,2CACEU,yBAAY;AAAA,UAACnB,SAASO,2CAAaa,OAAOC;AAAAA,UAAatB;AAAAA,QAAAA,CAE1C,CACf;AAAA,MAAA,CACE,CAAC;AAAA,IAAA,CACH;AAAA,EAAA,CACS;AAEpB;;;"}
|