@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
|
@@ -51,12 +51,12 @@ const StyledTableCell = (c) => /* @__PURE__ */ _styled__default.default(c, proce
|
|
|
51
51
|
backgroundImage: `linear-gradient(to right, ${$sortedColor}, ${$sortedColor})`
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
54
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3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cbiAgICAgICAgICBbY2xhc3Nlcy5yZXNpemFibGVdOiByZXNpemFibGUsXG4gICAgICAgICAgW2NsYXNzZXMucmVzaXppbmddOiByZXNpemluZyxcbiAgICAgICAgfSl9XG4gICAgICAgICR0eXBlPXt0eXBlfVxuICAgICAgICAkc3RpY2t5Q29sdW1uPXtzdGlja3lDb2x1bW59XG4gICAgICAgICRzb3J0ZWRDb2xvcj17c29ydGVkQ29sb3J9XG4gICAgICAgIHsuLi5vdGhlcnN9XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvVGFibGVDZWxsPlxuICAgICk7XG4gIH1cbik7XG4iXX0= */");
|
|
55
55
|
const getSortedColor = (color, alpha) => {
|
|
56
56
|
return checkValidHexColorValue.default(color) && alpha ? hexToRgbA.default(color, parseFloat(alpha)) : color;
|
|
57
57
|
};
|
|
58
58
|
const HvTableCell = React.forwardRef((props, externalRef) => {
|
|
59
|
-
var _a
|
|
59
|
+
var _a;
|
|
60
60
|
const {
|
|
61
61
|
children,
|
|
62
62
|
component,
|
|
@@ -82,7 +82,7 @@ const HvTableCell = React.forwardRef((props, externalRef) => {
|
|
|
82
82
|
} = TableCell_styles.useClasses(classesProp);
|
|
83
83
|
const {
|
|
84
84
|
activeTheme,
|
|
85
|
-
|
|
85
|
+
rootId
|
|
86
86
|
} = useTheme.useTheme();
|
|
87
87
|
const tableContext = React.useContext(TableContext.default);
|
|
88
88
|
const tableSectionContext = React.useContext(TableSectionContext.default);
|
|
@@ -93,10 +93,10 @@ const HvTableCell = React.forwardRef((props, externalRef) => {
|
|
|
93
93
|
const TableCell = React.useMemo(() => StyledTableCell(Component), [Component]);
|
|
94
94
|
const [sortedColor, setSortedColor] = React.useState(getSortedColor(sortedColorValue, sortedColorAlpha));
|
|
95
95
|
React.useEffect(() => {
|
|
96
|
-
setSortedColorValue(theme.getVarValue(uikitStyles.theme.table.rowSortedColor));
|
|
97
|
-
setSortedColorAlpha(theme.getVarValue(uikitStyles.theme.table.rowSortedColorAlpha));
|
|
96
|
+
setSortedColorValue(theme.getVarValue(uikitStyles.theme.table.rowSortedColor, rootId));
|
|
97
|
+
setSortedColorAlpha(theme.getVarValue(uikitStyles.theme.table.rowSortedColorAlpha, rootId));
|
|
98
98
|
setSortedColor(getSortedColor(sortedColorValue, sortedColorAlpha));
|
|
99
|
-
}, [
|
|
99
|
+
}, [activeTheme == null ? void 0 : activeTheme.colors.modes.selectedMode, sortedColorValue, sortedColorAlpha, rootId]);
|
|
100
100
|
return /* @__PURE__ */ jsxRuntime.jsx(TableCell, {
|
|
101
101
|
ref: externalRef,
|
|
102
102
|
role: Component === defaultComponent ? null : "cell",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.cjs","sources":["../../../../../src/components/Table/TableCell/TableCell.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport capitalize from \"lodash/capitalize\";\nimport {\n CSSProperties,\n forwardRef,\n TdHTMLAttributes,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\nimport {\n checkValidHexColorValue,\n ExtractNames,\n getVarValue,\n hexToRgbA,\n} from \"@core/utils\";\nimport { useTheme } from \"@core/hooks\";\nimport {\n HvTableCellAlign,\n HvTableCellType,\n HvTableCellVariant,\n} from \"../Table\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport { staticClasses, useClasses } from \"./TableCell.styles\";\n\nexport { staticClasses as tableCellClasses };\n\nexport type HvTableCellClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTableCellProps\n extends Omit<TdHTMLAttributes<HTMLTableCellElement>, \"align\"> {\n /** The component used for the root node. Either a string to use a HTML element or a component. Defaults to td. */\n component?: React.ElementType;\n /** Content to be rendered */\n children?: React.ReactNode;\n /** Inline styles to be applied to the root element. */\n style?: CSSProperties;\n /** Set the text-align on the table cell content. */\n align?: HvTableCellAlign;\n /** Sets the cell's variant. */\n variant?: HvTableCellVariant | \"listcheckbox\" | \"listactions\";\n /** Specify the cell's type. The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components. */\n type?: HvTableCellType;\n /** Whether or not the cell is part of a sorted column. */\n sorted?: boolean;\n /** The cell is part of a sticky column. */\n stickyColumn?: boolean;\n /** The cell is part of the last sticky to the left column. */\n stickyColumnMostLeft?: boolean;\n /** The cell is part of the first sticky to the right column. */\n stickyColumnLeastRight?: boolean;\n /** The cell is part of the first column in the group. */\n groupColumnMostLeft?: boolean;\n /** The cell is part of the last column in the group. */\n groupColumnMostRight?: boolean;\n /** Whether or not the cell is resizable */\n resizable?: boolean;\n /** Whether or not the cell is being resized */\n resizing?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTableCellClasses;\n}\n\nconst defaultComponent = \"td\";\n\ninterface StyledTableCellProps {\n $variantList: boolean;\n $variantListHead: boolean;\n $stickyColumn: boolean;\n $stickyColumnMostLeft: boolean;\n $stickyColumnLeastRight: boolean;\n $groupColumnMostLeft: boolean;\n $groupColumnMostRight: boolean;\n $resizable: boolean;\n $resizing: boolean;\n $align: string;\n $variant: string;\n $type: string;\n $sortedColor: string;\n}\n\nconst StyledTableCell = (c: any) =>\n styled(\n c,\n transientOptions\n )(({ $stickyColumn, $type, $sortedColor }: StyledTableCellProps) => ({\n ...($type === \"body\" && {\n [`&.${staticClasses.sorted}`]: {\n backgroundColor: $sortedColor,\n },\n }),\n ...($stickyColumn && {\n [`&.${staticClasses.sorted}`]: {\n backgroundImage: `linear-gradient(to right, ${$sortedColor}, ${$sortedColor})`,\n },\n }),\n }));\n\nconst getSortedColor = (color?: string, alpha?: string) => {\n return checkValidHexColorValue(color) && alpha\n ? hexToRgbA(color, parseFloat(alpha))\n : color;\n};\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nexport const HvTableCell = forwardRef<HTMLElement, HvTableCellProps>(\n (props, externalRef) => {\n const {\n children,\n component,\n className,\n style,\n classes: classesProp,\n align = \"inherit\",\n variant = \"default\",\n type: typeProp,\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n sorted = false,\n resizable = false,\n resizing = false,\n ...others\n } = props;\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme, selectedMode } = useTheme();\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const [sortedColorValue, setSortedColorValue] = useState<\n string | undefined\n >();\n const [sortedColorAlpha, setSortedColorAlpha] = useState<\n string | undefined\n >();\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component =\n component || tableContext?.components?.Td || defaultComponent;\n\n const TableCell = useMemo(() => StyledTableCell(Component), [Component]);\n\n const [sortedColor, setSortedColor] = useState(\n getSortedColor(sortedColorValue, sortedColorAlpha)\n );\n\n useEffect(() => {\n setSortedColorValue(getVarValue(theme.table.rowSortedColor));\n setSortedColorAlpha(getVarValue(theme.table.rowSortedColorAlpha));\n\n setSortedColor(getSortedColor(sortedColorValue, sortedColorAlpha));\n }, [\n activeTheme?.colors?.modes[selectedMode],\n sortedColorValue,\n sortedColorAlpha,\n ]);\n\n return (\n <TableCell\n ref={externalRef}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={cx(className, classes.root, classes[type], {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes.variantList]: tableContext.variant === \"listrow\",\n [classes.variantListHead]:\n tableContext.variant === \"listrow\" && type !== \"body\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n [classes.sorted]: sorted,\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n })}\n $type={type}\n $stickyColumn={stickyColumn}\n $sortedColor={sortedColor}\n {...others}\n >\n {children}\n </TableCell>\n );\n }\n);\n"],"names":["defaultComponent","StyledTableCell","c","process","env","NODE_ENV","_extends","target","transientOptions","label","$stickyColumn","$type","$sortedColor","staticClasses","sorted","backgroundColor","backgroundImage","getSortedColor","color","alpha","checkValidHexColorValue","hexToRgbA","parseFloat","HvTableCell","forwardRef","props","externalRef","children","component","className","style","classes","classesProp","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","resizable","resizing","others","cx","useClasses","activeTheme","selectedMode","useTheme","tableContext","useContext","TableContext","tableSectionContext","TableSectionContext","sortedColorValue","setSortedColorValue","useState","sortedColorAlpha","setSortedColorAlpha","Component","components","Td","TableCell","useMemo","sortedColor","setSortedColor","useEffect","getVarValue","theme","table","rowSortedColor","rowSortedColorAlpha","colors","modes","ref","role","root","capitalize","variantList","variantListHead"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAMA,mBAAmB;AAkBzB,MAAMC,kBAAkBA,CAACC,MAErBA,iCAAAA,QAAAA,GAACC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACDC,iBAAgB,gBAAA,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,iBAAAA,gBAAgB,CAClB,EAAE,CAAC;AAAA,EAAEE;AAAAA,EAAeC;AAAAA,EAAOC;AAAmC,OAAO;AAAA,EACnE,GAAID,UAAU,UAAU;AAAA,IACtB,CAAE,KAAIE,+BAAcC,QAAQ,GAAG;AAAA,MAC7BC,iBAAiBH;AAAAA,IACnB;AAAA,EACF;AAAA,EACA,GAAIF,iBAAiB;AAAA,IACnB,CAAE,KAAIG,+BAAcC,QAAQ,GAAG;AAAA,MAC7BE,iBAAkB,6BAA4BJ,iBAAiBA;AAAAA,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IAAMjB;AAAAA,EAAAA,CAGD;AAEf,CACF;;;"}
|
|
1
|
+
{"version":3,"file":"TableCell.cjs","sources":["../../../../../src/components/Table/TableCell/TableCell.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport capitalize from \"lodash/capitalize\";\nimport {\n CSSProperties,\n forwardRef,\n TdHTMLAttributes,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\nimport {\n checkValidHexColorValue,\n ExtractNames,\n hexToRgbA,\n getVarValue,\n} from \"@core/utils\";\nimport { useTheme } from \"@core/hooks\";\nimport {\n HvTableCellAlign,\n HvTableCellType,\n HvTableCellVariant,\n} from \"../Table\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport { staticClasses, useClasses } from \"./TableCell.styles\";\n\nexport { staticClasses as tableCellClasses };\n\nexport type HvTableCellClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTableCellProps\n extends Omit<TdHTMLAttributes<HTMLTableCellElement>, \"align\"> {\n /** The component used for the root node. Either a string to use a HTML element or a component. Defaults to td. */\n component?: React.ElementType;\n /** Content to be rendered */\n children?: React.ReactNode;\n /** Inline styles to be applied to the root element. */\n style?: CSSProperties;\n /** Set the text-align on the table cell content. */\n align?: HvTableCellAlign;\n /** Sets the cell's variant. */\n variant?: HvTableCellVariant | \"listcheckbox\" | \"listactions\";\n /** Specify the cell's type. The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components. */\n type?: HvTableCellType;\n /** Whether or not the cell is part of a sorted column. */\n sorted?: boolean;\n /** The cell is part of a sticky column. */\n stickyColumn?: boolean;\n /** The cell is part of the last sticky to the left column. */\n stickyColumnMostLeft?: boolean;\n /** The cell is part of the first sticky to the right column. */\n stickyColumnLeastRight?: boolean;\n /** The cell is part of the first column in the group. */\n groupColumnMostLeft?: boolean;\n /** The cell is part of the last column in the group. */\n groupColumnMostRight?: boolean;\n /** Whether or not the cell is resizable */\n resizable?: boolean;\n /** Whether or not the cell is being resized */\n resizing?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTableCellClasses;\n}\n\nconst defaultComponent = \"td\";\n\ninterface StyledTableCellProps {\n $variantList: boolean;\n $variantListHead: boolean;\n $stickyColumn: boolean;\n $stickyColumnMostLeft: boolean;\n $stickyColumnLeastRight: boolean;\n $groupColumnMostLeft: boolean;\n $groupColumnMostRight: boolean;\n $resizable: boolean;\n $resizing: boolean;\n $align: string;\n $variant: string;\n $type: string;\n $sortedColor: string;\n}\n\nconst StyledTableCell = (c: any) =>\n styled(\n c,\n transientOptions\n )(({ $stickyColumn, $type, $sortedColor }: StyledTableCellProps) => ({\n ...($type === \"body\" && {\n [`&.${staticClasses.sorted}`]: {\n backgroundColor: $sortedColor,\n },\n }),\n ...($stickyColumn && {\n [`&.${staticClasses.sorted}`]: {\n backgroundImage: `linear-gradient(to right, ${$sortedColor}, ${$sortedColor})`,\n },\n }),\n }));\n\nconst getSortedColor = (color?: string, alpha?: string) => {\n return checkValidHexColorValue(color) && alpha\n ? hexToRgbA(color, parseFloat(alpha))\n : color;\n};\n\n/**\n * `HvTableCell` acts as a `td` element and inherits styles from its context\n */\nexport const HvTableCell = forwardRef<HTMLElement, HvTableCellProps>(\n (props, externalRef) => {\n const {\n children,\n component,\n className,\n style,\n classes: classesProp,\n align = \"inherit\",\n variant = \"default\",\n type: typeProp,\n stickyColumn = false,\n stickyColumnMostLeft = false,\n stickyColumnLeastRight = false,\n groupColumnMostLeft = false,\n groupColumnMostRight = false,\n sorted = false,\n resizable = false,\n resizing = false,\n ...others\n } = props;\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme, rootId } = useTheme();\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const [sortedColorValue, setSortedColorValue] = useState<\n string | undefined\n >();\n const [sortedColorAlpha, setSortedColorAlpha] = useState<\n string | undefined\n >();\n\n const type = typeProp || tableSectionContext?.type || \"body\";\n\n const Component =\n component || tableContext?.components?.Td || defaultComponent;\n\n const TableCell = useMemo(() => StyledTableCell(Component), [Component]);\n\n const [sortedColor, setSortedColor] = useState(\n getSortedColor(sortedColorValue, sortedColorAlpha)\n );\n\n useEffect(() => {\n setSortedColorValue(getVarValue(theme.table.rowSortedColor, rootId));\n setSortedColorAlpha(getVarValue(theme.table.rowSortedColorAlpha, rootId));\n\n setSortedColor(getSortedColor(sortedColorValue, sortedColorAlpha));\n }, [\n activeTheme?.colors.modes.selectedMode,\n sortedColorValue,\n sortedColorAlpha,\n rootId,\n ]);\n\n return (\n <TableCell\n ref={externalRef}\n role={Component === defaultComponent ? null : \"cell\"}\n style={style}\n className={cx(className, classes.root, classes[type], {\n [classes[`align${capitalize(align)}`]]: align !== \"inherit\",\n [classes.variantList]: tableContext.variant === \"listrow\",\n [classes.variantListHead]:\n tableContext.variant === \"listrow\" && type !== \"body\",\n [classes[`variant${capitalize(variant)}`]]: variant !== \"default\",\n [classes.sorted]: sorted,\n [classes.stickyColumn]: stickyColumn,\n [classes.stickyColumnMostLeft]: stickyColumnMostLeft,\n [classes.stickyColumnLeastRight]: stickyColumnLeastRight,\n [classes.groupColumnMostLeft]: groupColumnMostLeft,\n [classes.groupColumnMostRight]: groupColumnMostRight,\n [classes.resizable]: resizable,\n [classes.resizing]: resizing,\n })}\n $type={type}\n $stickyColumn={stickyColumn}\n $sortedColor={sortedColor}\n {...others}\n >\n {children}\n </TableCell>\n );\n }\n);\n"],"names":["defaultComponent","StyledTableCell","c","process","env","NODE_ENV","_extends","target","transientOptions","label","$stickyColumn","$type","$sortedColor","staticClasses","sorted","backgroundColor","backgroundImage","getSortedColor","color","alpha","checkValidHexColorValue","hexToRgbA","parseFloat","HvTableCell","forwardRef","props","externalRef","children","component","className","style","classes","classesProp","align","variant","type","typeProp","stickyColumn","stickyColumnMostLeft","stickyColumnLeastRight","groupColumnMostLeft","groupColumnMostRight","resizable","resizing","others","cx","useClasses","activeTheme","rootId","useTheme","tableContext","useContext","TableContext","tableSectionContext","TableSectionContext","sortedColorValue","setSortedColorValue","useState","sortedColorAlpha","setSortedColorAlpha","Component","components","Td","TableCell","useMemo","sortedColor","setSortedColor","useEffect","getVarValue","theme","table","rowSortedColor","rowSortedColorAlpha","colors","modes","selectedMode","ref","role","root","capitalize","variantList","variantListHead"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAMA,mBAAmB;AAkBzB,MAAMC,kBAAkBA,CAACC,MAErBA,iCAAAA,QAAAA,GAACC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACDC,iBAAgB,gBAAA,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,iBAAAA,gBAAgB,CAClB,EAAE,CAAC;AAAA,EAAEE;AAAAA,EAAeC;AAAAA,EAAOC;AAAmC,OAAO;AAAA,EACnE,GAAID,UAAU,UAAU;AAAA,IACtB,CAAE,KAAIE,+BAAcC,QAAQ,GAAG;AAAA,MAC7BC,iBAAiBH;AAAAA,IACnB;AAAA,EACF;AAAA,EACA,GAAIF,iBAAiB;AAAA,IACnB,CAAE,KAAIG,+BAAcC,QAAQ,GAAG;AAAA,MAC7BE,iBAAkB,6BAA4BJ,iBAAiBA;AAAAA,IACjE;AAAA,EACF;AACF,IAAET,QAAAC,IAAAC,aAAC,eAAA,KAAA,yhSAAA;AAEL,MAAMY,iBAAiBA,CAACC,OAAgBC,UAAmB;AAClDC,SAAAA,wBAAAA,QAAwBF,KAAK,KAAKC,QACrCE,UAAAA,QAAUH,OAAOI,WAAWH,KAAK,CAAC,IAClCD;AACN;AAKO,MAAMK,cAAcC,MAAAA,WACzB,CAACC,OAAOC,gBAAgB;;AAChB,QAAA;AAAA,IACJC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC,SAASC;AAAAA,IACTC,Q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AAA,IACLmD,MAAMjB,cAAc5D,mBAAmB,OAAO;AAAA,IAC9C8B;AAAAA,IACAD,WAAWgB,GAAGhB,WAAWE,QAAQ+C,MAAM/C,QAAQI,IAAI,GAAG;AAAA,MACpD,CAACJ,QAAS,QAAOgD,oBAAAA,QAAW9C,KAAK,GAAG,CAAC,GAAGA,UAAU;AAAA,MAClD,CAACF,QAAQiD,WAAW,GAAG9B,aAAahB,YAAY;AAAA,MAChD,CAACH,QAAQkD,eAAe,GACtB/B,aAAahB,YAAY,aAAaC,SAAS;AAAA,MACjD,CAACJ,QAAS,UAASgD,oBAAAA,QAAW7C,OAAO,GAAG,CAAC,GAAGA,YAAY;AAAA,MACxD,CAACH,QAAQjB,MAAM,GAAGA;AAAAA,MAClB,CAACiB,QAAQM,YAAY,GAAGA;AAAAA,MACxB,CAACN,QAAQO,oBAAoB,GAAGA;AAAAA,MAChC,CAACP,QAAQQ,sBAAsB,GAAGA;AAAAA,MAClC,CAACR,QAAQS,mBAAmB,GAAGA;AAAAA,MAC/B,CAACT,QAAQU,oBAAoB,GAAGA;AAAAA,MAChC,CAACV,QAAQW,SAAS,GAAGA;AAAAA,MACrB,CAACX,QAAQY,QAAQ,GAAGA;AAAAA,IAAAA,CACrB;AAAA,IACDhC,OAAOwB;AAAAA,IACPzB,eAAe2B;AAAAA,IACfzB,cAAcqD;AAAAA,IAAY,GACtBrB;AAAAA,IAAMjB;AAAAA,EAAAA,CAGD;AAEf,CACF;;;"}
|
|
@@ -53,7 +53,7 @@ const StyledTableRow = (c) => /* @__PURE__ */ _styled__default.default(c, proces
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
56
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm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pcGVkQ29sb3JFdmVufVxuICAgICAgICAkc3RyaXBlZENvbG9yT2RkPXtzdHJpcGVkQ29sb3JPZGR9XG4gICAgICAgIHsuLi5vdGhlcnN9XG4gICAgICAvPlxuICAgICk7XG4gIH1cbik7XG4iXX0= */");
|
|
57
57
|
const getStripedColor = (color, opacity = 0.6) => {
|
|
58
58
|
return checkValidHexColorValue.default(color) ? hexToRgbA.default(color, opacity) : color;
|
|
59
59
|
};
|
|
@@ -75,7 +75,8 @@ const HvTableRow = React.forwardRef((props, externalRef) => {
|
|
|
75
75
|
} = TableRow_styles.useClasses(classesProp);
|
|
76
76
|
const {
|
|
77
77
|
activeTheme,
|
|
78
|
-
selectedMode
|
|
78
|
+
selectedMode,
|
|
79
|
+
rootId
|
|
79
80
|
} = useTheme.useTheme();
|
|
80
81
|
const tableContext = React.useContext(TableContext.default);
|
|
81
82
|
const tableSectionContext = React.useContext(TableSectionContext.default);
|
|
@@ -88,11 +89,11 @@ const HvTableRow = React.forwardRef((props, externalRef) => {
|
|
|
88
89
|
const [stripedColorEven, setStripedColorEven] = React.useState(getStripedColor(even));
|
|
89
90
|
const [stripedColorOdd, setStripedColorOdd] = React.useState(getStripedColor(odd));
|
|
90
91
|
React.useEffect(() => {
|
|
91
|
-
setEven(theme.getVarValue(uikitStyles.theme.table.rowStripedBackgroundColorEven));
|
|
92
|
-
setOdd(theme.getVarValue(uikitStyles.theme.table.rowStripedBackgroundColorOdd));
|
|
92
|
+
setEven(theme.getVarValue(uikitStyles.theme.table.rowStripedBackgroundColorEven, rootId));
|
|
93
|
+
setOdd(theme.getVarValue(uikitStyles.theme.table.rowStripedBackgroundColorOdd, rootId));
|
|
93
94
|
setStripedColorEven(getStripedColor(even));
|
|
94
95
|
setStripedColorOdd(getStripedColor(odd));
|
|
95
|
-
}, [(_b = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _b.modes[selectedMode], even, odd]);
|
|
96
|
+
}, [(_b = activeTheme == null ? void 0 : activeTheme.colors) == null ? void 0 : _b.modes[selectedMode], even, odd, rootId]);
|
|
96
97
|
return /* @__PURE__ */ jsxRuntime.jsx(TableRow, {
|
|
97
98
|
ref: externalRef,
|
|
98
99
|
className: cx(tableSectionContext.filterClassName, className, classes.root, classes == null ? void 0 : classes[type], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.cjs","sources":["../../../../../src/components/Table/TableRow/TableRow.tsx"],"sourcesContent":["import { forwardRef, useContext, useEffect, useMemo, useState } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport {\n ExtractNames,\n checkValidHexColorValue,\n
|
|
1
|
+
{"version":3,"file":"TableRow.cjs","sources":["../../../../../src/components/Table/TableRow/TableRow.tsx"],"sourcesContent":["import { forwardRef, useContext, useEffect, useMemo, useState } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport {\n ExtractNames,\n checkValidHexColorValue,\n hexToRgbA,\n getVarValue,\n} from \"@core/utils\";\nimport { transientOptions } from \"@core/utils/transientOptions\";\nimport { HvBaseProps } from \"@core/types\";\nimport { useTheme } from \"@core/hooks\";\nimport TableContext from \"../TableContext\";\nimport TableSectionContext from \"../TableSectionContext\";\nimport { staticClasses, useClasses } from \"./TableRow.styles\";\n\nexport { staticClasses as tableRowClasses };\n\nexport type HvTableRowClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvTableRowProps\n extends HvBaseProps<HTMLTableRowElement, \"children\"> {\n /** Content to be rendered */\n children: React.ReactNode;\n /** The component used for the root node. Either a string to use a HTML element or a component. Defaults to tbody. */\n component?: React.ElementType;\n /** Whether the table row will shade on hover. */\n hover?: boolean;\n /** Whether the table row will have the selected shading. */\n selected?: boolean;\n /** Whether the table row is expanded. */\n expanded?: boolean;\n /** Whether the table row background is striped. */\n striped?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvTableRowClasses;\n}\n\nconst defaultComponent = \"tr\";\n\nconst StyledTableRow = (c: any) =>\n styled(\n c,\n transientOptions\n )(\n ({\n $striped,\n $stripedColorEven,\n $stripedColorOdd,\n }: {\n $striped: boolean;\n $stripedColorEven: string;\n $stripedColorOdd: string;\n }) => ({\n ...($striped && {\n \"&:nth-of-type(even)\": {\n backgroundColor: $stripedColorEven,\n \"&:hover\": {\n backgroundColor: theme.table.rowHoverColor,\n },\n },\n \"&:nth-of-type(odd)\": {\n backgroundColor: $stripedColorOdd,\n \"&:hover\": {\n backgroundColor: theme.table.rowHoverColor,\n },\n },\n }),\n })\n );\n\nconst getStripedColor = (color?: string, opacity: number = 0.6) => {\n return checkValidHexColorValue(color) ? hexToRgbA(color, opacity) : color;\n};\n\n/**\n * `HvTableRow` acts as a `tr` element and inherits styles from its context\n */\nexport const HvTableRow = forwardRef<HTMLElement, HvTableRowProps>(\n (props, externalRef) => {\n const {\n classes: classesProp,\n className,\n component,\n hover = false,\n selected = false,\n expanded = false,\n striped = false,\n ...others\n } = props;\n const { classes, cx } = useClasses(classesProp);\n const { activeTheme, selectedMode, rootId } = useTheme();\n const tableContext = useContext(TableContext);\n const tableSectionContext = useContext(TableSectionContext);\n\n const [even, setEven] = useState<string | undefined>();\n const [odd, setOdd] = useState<string | undefined>();\n\n const type = tableSectionContext?.type || \"body\";\n\n const isList = tableContext.variant === \"listrow\";\n\n const Component =\n component || tableContext?.components?.Tr || defaultComponent;\n\n const TableRow = useMemo(() => StyledTableRow(Component), [Component]);\n\n const [stripedColorEven, setStripedColorEven] = useState(\n getStripedColor(even)\n );\n const [stripedColorOdd, setStripedColorOdd] = useState(\n getStripedColor(odd)\n );\n\n useEffect(() => {\n setEven(getVarValue(theme.table.rowStripedBackgroundColorEven, rootId));\n setOdd(getVarValue(theme.table.rowStripedBackgroundColorOdd, rootId));\n\n setStripedColorEven(getStripedColor(even));\n setStripedColorOdd(getStripedColor(odd));\n }, [activeTheme?.colors?.modes[selectedMode], even, odd, rootId]);\n\n return (\n <TableRow\n ref={externalRef}\n className={cx(\n tableSectionContext.filterClassName,\n className,\n classes.root,\n classes?.[type],\n {\n [classes.hover]: hover,\n [classes.selected]: selected,\n [classes.expanded]: expanded,\n [classes.striped]: striped,\n [classes.variantList]: isList && type === \"body\",\n [classes.variantListHead]: isList && type === \"head\",\n }\n )}\n role={Component === defaultComponent ? null : \"row\"}\n $striped={striped}\n $stripedColorEven={stripedColorEven}\n $stripedColorOdd={stripedColorOdd}\n {...others}\n />\n );\n }\n);\n"],"names":["defaultComponent","StyledTableRow","c","process","env","NODE_ENV","_extends","target","transientOptions","label","$striped","$stripedColorEven","$stripedColorOdd","backgroundColor","theme","table","rowHoverColor","getStripedColor","color","opacity","checkValidHexColorValue","hexToRgbA","HvTableRow","forwardRef","props","externalRef","classes","classesProp","className","component","hover","selected","expanded","striped","others","cx","useClasses","activeTheme","selectedMode","rootId","useTheme","tableContext","useContext","TableContext","tableSectionContext","TableSectionContext","even","setEven","useState","odd","setOdd","type","isList","variant","Component","components","Tr","TableRow","useMemo","stripedColorEven","setStripedColorEven","stripedColorOdd","setStripedColorOdd","useEffect","getVarValue","rowStripedBackgroundColorEven","rowStripedBackgroundColorOdd","colors","modes","ref","filterClassName","root","variantList","variantListHead","role"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAMA,mBAAmB;AAEzB,MAAMC,iBAAiBA,CAACC,MAEpBA,iCAAAA,QAAAA,GAACC,QAAAC,IAAAC,4BAAAC,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,GACDC,iBAAgB,gBAAA,IAAAF,SAAA,IAAA;AAAA,EAAAC,QAAA;AAAA,EAAAE,OAAA;AAAA,GAAhBD,iBAAAA,gBAAgB,CAClB,EACE,CAAC;AAAA,EACCE;AAAAA,EACAC;AAAAA,EACAC;AAKF,OAAO;AAAA,EACL,GAAIF,YAAY;AAAA,IACd,uBAAuB;AAAA,MACrBG,iBAAiBF;AAAAA,MACjB,WAAW;AAAA,QACTE,iBAAiBC,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,IAAI,CACtB;AACA,QAAM,CAACe,iBAAiBC,kBAAkB,IAAId,MAC5C/B,SAAAA,gBAAgBgC,GAAG,CACrB;AAEAc,QAAAA,UAAU,MAAM;AACdhB,YAAQiB,MAAYlD,YAAAA,YAAAA,MAAMC,MAAMkD,+BAA+B1B,MAAM,CAAC;AACtEW,WAAOc,MAAYlD,YAAAA,YAAAA,MAAMC,MAAMmD,8BAA8B3B,MAAM,CAAC;AAEhDtB,wBAAAA,gBAAgB6B,IAAI,CAAC;AACtB7B,uBAAAA,gBAAgBgC,GAAG,CAAC;AAAA,EAAA,GACtC,EAACZ,gDAAa8B,WAAb9B,mBAAqB+B,MAAM9B,eAAeQ,MAAMG,KAAKV,MAAM,CAAC;AAEhE,wCACGkB,UAAQ;AAAA,IACPY,KAAK5C;AAAAA,IACLG,WAAWO,GACTS,oBAAoB0B,iBACpB1C,WACAF,QAAQ6C,MACR7C,mCAAUyB,OACV;AAAA,MACE,CAACzB,QAAQI,KAAK,GAAGA;AAAAA,MACjB,CAACJ,QAAQK,QAAQ,GAAGA;AAAAA,MACpB,CAACL,QAAQM,QAAQ,GAAGA;AAAAA,MACpB,CAACN,QAAQO,OAAO,GAAGA;AAAAA,MACnB,CAACP,QAAQ8C,WAAW,GAAGpB,UAAUD,SAAS;AAAA,MAC1C,CAACzB,QAAQ+C,eAAe,GAAGrB,UAAUD,SAAS;AAAA,IAAA,CAElD;AAAA,IACAuB,MAAMpB,cAActD,mBAAmB,OAAO;AAAA,IAC9CU,UAAUuB;AAAAA,IACVtB,mBAAmBgD;AAAAA,IACnB/C,kBAAkBiD;AAAAA,IAAgB,GAC9B3B;AAAAA,EAAAA,CACL;AAEL,CACF;;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -61,11 +61,11 @@ const Media_styles = require("./components/Card/Media/Media.styles.cjs");
|
|
|
61
61
|
const Media = require("./components/Card/Media/Media.cjs");
|
|
62
62
|
const containerClasses = require("./components/Container/containerClasses.cjs");
|
|
63
63
|
const Container = require("./components/Container/Container.cjs");
|
|
64
|
-
const
|
|
64
|
+
const Title_styles = require("./components/Dialog/Title/Title.styles.cjs");
|
|
65
65
|
const Title = require("./components/Dialog/Title/Title.cjs");
|
|
66
|
-
const
|
|
66
|
+
const Content_styles$1 = require("./components/Dialog/Content/Content.styles.cjs");
|
|
67
67
|
const Content$1 = require("./components/Dialog/Content/Content.cjs");
|
|
68
|
-
const
|
|
68
|
+
const Actions_styles = require("./components/Dialog/Actions/Actions.styles.cjs");
|
|
69
69
|
const Actions = require("./components/Dialog/Actions/Actions.cjs");
|
|
70
70
|
const Dialog_styles = require("./components/Dialog/Dialog.styles.cjs");
|
|
71
71
|
const Dialog = require("./components/Dialog/Dialog.cjs");
|
|
@@ -79,7 +79,7 @@ const gridClasses = require("./components/Grid/gridClasses.cjs");
|
|
|
79
79
|
const Grid = require("./components/Grid/Grid.cjs");
|
|
80
80
|
const headerClasses = require("./components/Header/headerClasses.cjs");
|
|
81
81
|
const Header$1 = require("./components/Header/Header.cjs");
|
|
82
|
-
const actionsClasses
|
|
82
|
+
const actionsClasses = require("./components/Header/Actions/actionsClasses.cjs");
|
|
83
83
|
const Actions$1 = require("./components/Header/Actions/Actions.cjs");
|
|
84
84
|
const brandClasses = require("./components/Header/Brand/brandClasses.cjs");
|
|
85
85
|
const Brand = require("./components/Header/Brand/Brand.cjs");
|
|
@@ -220,7 +220,7 @@ const VerticalNavigation = require("./components/VerticalNavigation/VerticalNavi
|
|
|
220
220
|
const headerClasses$1 = require("./components/VerticalNavigation/Header/headerClasses.cjs");
|
|
221
221
|
const Header$2 = require("./components/VerticalNavigation/Header/Header.cjs");
|
|
222
222
|
const actionClasses$1 = require("./components/VerticalNavigation/Actions/actionClasses.cjs");
|
|
223
|
-
const actionsClasses$
|
|
223
|
+
const actionsClasses$1 = require("./components/VerticalNavigation/Actions/actionsClasses.cjs");
|
|
224
224
|
const Actions$2 = require("./components/VerticalNavigation/Actions/Actions.cjs");
|
|
225
225
|
const Action$1 = require("./components/VerticalNavigation/Actions/Action.cjs");
|
|
226
226
|
const navigationClasses$1 = require("./components/VerticalNavigation/Navigation/navigationClasses.cjs");
|
|
@@ -375,11 +375,11 @@ exports.cardMediaClasses = Media_styles.staticClasses;
|
|
|
375
375
|
exports.HvCardMedia = Media.HvCardMedia;
|
|
376
376
|
exports.containerClasses = containerClasses.default;
|
|
377
377
|
exports.HvContainer = Container.HvContainer;
|
|
378
|
-
exports.dialogTitleClasses =
|
|
378
|
+
exports.dialogTitleClasses = Title_styles.staticClasses;
|
|
379
379
|
exports.HvDialogTitle = Title.HvDialogTitle;
|
|
380
|
-
exports.dialogContentClasses =
|
|
380
|
+
exports.dialogContentClasses = Content_styles$1.staticClasses;
|
|
381
381
|
exports.HvDialogContent = Content$1.HvDialogContent;
|
|
382
|
-
exports.dialogActionClasses =
|
|
382
|
+
exports.dialogActionClasses = Actions_styles.staticClasses;
|
|
383
383
|
exports.HvDialogActions = Actions.HvDialogActions;
|
|
384
384
|
exports.dialogClasses = Dialog_styles.staticClasses;
|
|
385
385
|
exports.HvDialog = Dialog.HvDialog;
|
|
@@ -393,7 +393,7 @@ exports.gridClasses = gridClasses.default;
|
|
|
393
393
|
exports.HvGrid = Grid.HvGrid;
|
|
394
394
|
exports.headerClasses = headerClasses.default;
|
|
395
395
|
exports.HvHeader = Header$1.HvHeader;
|
|
396
|
-
exports.headerActionsClasses = actionsClasses
|
|
396
|
+
exports.headerActionsClasses = actionsClasses.default;
|
|
397
397
|
exports.HvHeaderActions = Actions$1.HvHeaderActions;
|
|
398
398
|
exports.headerBrandClasses = brandClasses.default;
|
|
399
399
|
exports.HvHeaderBrand = Brand.HvHeaderBrand;
|
|
@@ -570,7 +570,7 @@ exports.HvVerticalNavigation = VerticalNavigation.HvVerticalNavigation;
|
|
|
570
570
|
exports.verticalNavigationHeaderClasses = headerClasses$1.default;
|
|
571
571
|
exports.HvVerticalNavigationHeader = Header$2.HvVerticalNavigationHeader;
|
|
572
572
|
exports.actionClasses = actionClasses$1.default;
|
|
573
|
-
exports.actionsClasses = actionsClasses$
|
|
573
|
+
exports.actionsClasses = actionsClasses$1.default;
|
|
574
574
|
exports.HvVerticalNavigationActions = Actions$2.HvVerticalNavigationActions;
|
|
575
575
|
exports.HvVerticalNavigationAction = Action$1.HvVerticalNavigationAction;
|
|
576
576
|
exports.verticalNavigationTreeClasses = navigationClasses$1.default;
|
package/dist/cjs/utils/theme.cjs
CHANGED
|
@@ -91,13 +91,12 @@ const processThemes = (themesList) => {
|
|
|
91
91
|
}
|
|
92
92
|
return [uikitStyles.themes.ds5];
|
|
93
93
|
};
|
|
94
|
-
const getVarValue = (cssVar) => {
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return computedValue;
|
|
94
|
+
const getVarValue = (cssVar, rootElementId) => {
|
|
95
|
+
const root = document.getElementById(rootElementId || "hv-root");
|
|
96
|
+
if (root) {
|
|
97
|
+
const computedValue = getComputedStyle(root).getPropertyValue(cssVar.replace("var(", "").replace(")", "")).trim();
|
|
98
|
+
return computedValue;
|
|
99
|
+
}
|
|
101
100
|
};
|
|
102
101
|
exports.createTheme = createTheme;
|
|
103
102
|
exports.getVarValue = getVarValue;
|
|
@@ -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\
|
|
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,SAAs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,eAAAA,gBAAgBjB,OAAO4B,MAAMC,IAAI;AAAA,MAC1C;AAAA,IAAA,CACD;AAAA,EACH;AAGOZ,SAAAA;AACT;AAOae,MAAAA,gBAAgBA,CAC3BC,eACmC;AACnC,MAAIA,cAAclB,MAAMC,QAAQiB,UAAU,KAAKA,WAAWC,SAAS,GAAG;AACpE,UAAMC,OAAuC,CAAA;AAE7CF,eAAW/C,QAASkD,CAAQ,QAAA;AACpBC,YAAAA,IAAYF,KAAKG,UACpBC,CAAMA,MAAAA,EAAEhB,KAAKI,KAAWS,MAAAA,IAAIb,KAAKI,KACpC,CAAA;AAEA,UAAIU,MAAM,IAAI;AACPG,aAAAA,OAAOH,GAAG,CAAC;AAChBF,aAAKM,KAAKL,GAAG;AAAA,MAAA,OACR;AACLD,aAAKM,KAAKL,GAAG;AAAA,MACf;AAAA,IAAA,CACD;AAGMD,WAAAA;AAAAA,EACT;AAEO,SAAA,CAACT,YAAAA,OAAOgB,GAAG;AACpB;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
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
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
|
-
|
|
12
|
+
const {
|
|
13
|
+
classes,
|
|
14
|
+
cx
|
|
15
|
+
} = useClasses(classesProp);
|
|
16
|
+
return /* @__PURE__ */ jsx(MuiDialogActions, {
|
|
13
17
|
className,
|
|
14
18
|
classes: {
|
|
15
|
-
root:
|
|
16
|
-
|
|
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 {
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
21
|
+
spacing: {
|
|
40
22
|
"& > :not(:first-of-type)": {
|
|
41
23
|
marginLeft: theme.space.xs
|
|
42
24
|
}
|
|
43
25
|
}
|
|
44
|
-
})
|
|
26
|
+
});
|
|
45
27
|
export {
|
|
46
|
-
|
|
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
|
|
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 {
|
|
4
|
-
import
|
|
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
|
-
|
|
12
|
+
const {
|
|
13
|
+
classes,
|
|
14
|
+
cx
|
|
15
|
+
} = useClasses(classesProp);
|
|
16
|
+
return /* @__PURE__ */ jsx(HvTypography, {
|
|
13
17
|
component: MuiDialogContent,
|
|
14
|
-
className:
|
|
15
|
-
|
|
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
|
|
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;"}
|