@hitachivantara/uikit-react-core 5.24.1 → 5.24.3
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/BulkActions/BulkActions.cjs +0 -4
- package/dist/cjs/components/BulkActions/BulkActions.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.cjs +2 -2
- package/dist/cjs/components/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/Card/Card.styles.cjs +1 -1
- package/dist/cjs/components/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.styles.cjs +0 -4
- package/dist/cjs/components/CheckBoxGroup/CheckBoxGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs +1 -1
- package/dist/cjs/components/DropDownMenu/DropDownMenu.styles.cjs.map +1 -1
- package/dist/cjs/components/FilterGroup/RightPanel/RightPanel.styles.cjs +0 -4
- package/dist/cjs/components/FilterGroup/RightPanel/RightPanel.styles.cjs.map +1 -1
- package/dist/cjs/components/Footer/Footer.cjs +2 -2
- package/dist/cjs/components/Footer/Footer.cjs.map +1 -1
- package/dist/cjs/components/GlobalActions/GlobalActions.cjs +38 -17
- package/dist/cjs/components/GlobalActions/GlobalActions.cjs.map +1 -1
- package/dist/cjs/components/GlobalActions/GlobalActions.styles.cjs +42 -89
- package/dist/cjs/components/GlobalActions/GlobalActions.styles.cjs.map +1 -1
- package/dist/cjs/components/List/List.styles.cjs +13 -28
- package/dist/cjs/components/List/List.styles.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListContainer.cjs +8 -4
- package/dist/cjs/components/ListContainer/ListContainer.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListContainer.styles.cjs +12 -0
- package/dist/cjs/components/ListContainer/ListContainer.styles.cjs.map +1 -0
- package/dist/cjs/components/ListContainer/ListContext/ListContext.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs +43 -31
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs +47 -75
- package/dist/cjs/components/ListContainer/ListItem/ListItem.styles.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.cjs +18 -13
- package/dist/cjs/components/Loading/Loading.cjs.map +1 -1
- package/dist/cjs/components/Loading/Loading.styles.cjs +44 -96
- package/dist/cjs/components/Loading/Loading.styles.cjs.map +1 -1
- package/dist/cjs/components/RadioGroup/RadioGroup.styles.cjs +0 -4
- package/dist/cjs/components/RadioGroup/RadioGroup.styles.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Horizontal/ScrollToHorizontal.cjs.map +1 -1
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs +2 -2
- package/dist/cjs/components/ScrollTo/Vertical/ScrollToVertical.cjs.map +1 -1
- package/dist/cjs/components/SelectionList/SelectionList.cjs +25 -15
- package/dist/cjs/components/SelectionList/SelectionList.cjs.map +1 -1
- package/dist/cjs/components/SelectionList/SelectionList.styles.cjs +41 -119
- package/dist/cjs/components/SelectionList/SelectionList.styles.cjs.map +1 -1
- package/dist/cjs/components/Stack/Stack.cjs +8 -7
- package/dist/cjs/components/Stack/Stack.cjs.map +1 -1
- package/dist/cjs/components/Stack/Stack.styles.cjs +18 -37
- package/dist/cjs/components/Stack/Stack.styles.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.cjs +12 -8
- package/dist/cjs/components/Tab/Tab.cjs.map +1 -1
- package/dist/cjs/components/Tab/Tab.styles.cjs +53 -57
- package/dist/cjs/components/Tab/Tab.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/Table.styles.cjs +6 -7
- package/dist/cjs/components/Table/Table.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/TableRow/TableRow.styles.cjs +6 -22
- package/dist/cjs/components/Table/TableRow/TableRow.styles.cjs.map +1 -1
- package/dist/cjs/components/Table/hooks/useSticky.cjs +5 -1
- package/dist/cjs/components/Table/hooks/useSticky.cjs.map +1 -1
- package/dist/cjs/components/Table/utils/utils.cjs +15 -42
- package/dist/cjs/components/Table/utils/utils.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs +11 -8
- package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.styles.cjs +16 -20
- package/dist/cjs/components/Tabs/Tabs.styles.cjs.map +1 -1
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs +4 -4
- package/dist/cjs/components/TagsInput/TagsInput.styles.cjs.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.cjs +32 -21
- package/dist/cjs/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.styles.cjs +45 -142
- package/dist/cjs/components/TextArea/TextArea.styles.cjs.map +1 -1
- package/dist/cjs/components/Typography/Typography.cjs +2 -2
- package/dist/cjs/components/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs +3 -3
- package/dist/cjs/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.styles.cjs +4 -11
- package/dist/cjs/components/VerticalNavigation/TreeView/TreeViewItem.styles.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/descendants.cjs +1 -9
- package/dist/cjs/components/VerticalNavigation/TreeView/descendants.cjs.map +1 -1
- package/dist/cjs/index.cjs +18 -18
- package/dist/esm/components/BulkActions/BulkActions.js +0 -4
- package/dist/esm/components/BulkActions/BulkActions.js.map +1 -1
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/Card.styles.js +1 -1
- package/dist/esm/components/Card/Card.styles.js.map +1 -1
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.styles.js +0 -4
- package/dist/esm/components/CheckBoxGroup/CheckBoxGroup.styles.js.map +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js +1 -1
- package/dist/esm/components/DropDownMenu/DropDownMenu.styles.js.map +1 -1
- package/dist/esm/components/FilterGroup/RightPanel/RightPanel.styles.js +0 -4
- package/dist/esm/components/FilterGroup/RightPanel/RightPanel.styles.js.map +1 -1
- package/dist/esm/components/Footer/Footer.js +2 -2
- package/dist/esm/components/Footer/Footer.js.map +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.js +44 -22
- package/dist/esm/components/GlobalActions/GlobalActions.js.map +1 -1
- package/dist/esm/components/GlobalActions/GlobalActions.styles.js +42 -87
- package/dist/esm/components/GlobalActions/GlobalActions.styles.js.map +1 -1
- package/dist/esm/components/List/List.styles.js +13 -28
- package/dist/esm/components/List/List.styles.js.map +1 -1
- package/dist/esm/components/ListContainer/ListContainer.js +10 -5
- package/dist/esm/components/ListContainer/ListContainer.js.map +1 -1
- package/dist/esm/components/ListContainer/ListContainer.styles.js +12 -0
- package/dist/esm/components/ListContainer/ListContainer.styles.js.map +1 -0
- package/dist/esm/components/ListContainer/ListContext/ListContext.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.js +46 -33
- package/dist/esm/components/ListContainer/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js +47 -73
- package/dist/esm/components/ListContainer/ListItem/ListItem.styles.js.map +1 -1
- package/dist/esm/components/Loading/Loading.js +21 -15
- package/dist/esm/components/Loading/Loading.js.map +1 -1
- package/dist/esm/components/Loading/Loading.styles.js +44 -94
- package/dist/esm/components/Loading/Loading.styles.js.map +1 -1
- package/dist/esm/components/RadioGroup/RadioGroup.styles.js +0 -4
- package/dist/esm/components/RadioGroup/RadioGroup.styles.js.map +1 -1
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js +2 -2
- package/dist/esm/components/ScrollTo/Horizontal/ScrollToHorizontal.js.map +1 -1
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js +2 -2
- package/dist/esm/components/ScrollTo/Vertical/ScrollToVertical.js.map +1 -1
- package/dist/esm/components/SelectionList/SelectionList.js +28 -17
- package/dist/esm/components/SelectionList/SelectionList.js.map +1 -1
- package/dist/esm/components/SelectionList/SelectionList.styles.js +41 -117
- package/dist/esm/components/SelectionList/SelectionList.styles.js.map +1 -1
- package/dist/esm/components/Stack/Stack.js +11 -9
- package/dist/esm/components/Stack/Stack.js.map +1 -1
- package/dist/esm/components/Stack/Stack.styles.js +18 -35
- package/dist/esm/components/Stack/Stack.styles.js.map +1 -1
- package/dist/esm/components/Tab/Tab.js +15 -10
- package/dist/esm/components/Tab/Tab.js.map +1 -1
- package/dist/esm/components/Tab/Tab.styles.js +53 -55
- package/dist/esm/components/Tab/Tab.styles.js.map +1 -1
- package/dist/esm/components/Table/Table.styles.js +6 -7
- package/dist/esm/components/Table/Table.styles.js.map +1 -1
- package/dist/esm/components/Table/TableRow/TableRow.styles.js +6 -22
- package/dist/esm/components/Table/TableRow/TableRow.styles.js.map +1 -1
- package/dist/esm/components/Table/hooks/useSticky.js +5 -1
- package/dist/esm/components/Table/hooks/useSticky.js.map +1 -1
- package/dist/esm/components/Table/utils/utils.js +15 -42
- package/dist/esm/components/Table/utils/utils.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +14 -10
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.styles.js +16 -18
- package/dist/esm/components/Tabs/Tabs.styles.js.map +1 -1
- package/dist/esm/components/TagsInput/TagsInput.styles.js +6 -6
- package/dist/esm/components/TextArea/TextArea.js +35 -23
- package/dist/esm/components/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/TextArea/TextArea.styles.js +45 -140
- package/dist/esm/components/TextArea/TextArea.styles.js.map +1 -1
- package/dist/esm/components/Typography/Typography.js +2 -2
- package/dist/esm/components/Typography/Typography.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js +3 -3
- package/dist/esm/components/VerticalNavigation/NavigationSlider/NavigationSlider.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.styles.js +4 -11
- package/dist/esm/components/VerticalNavigation/TreeView/TreeViewItem.styles.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/descendants.js +1 -9
- package/dist/esm/components/VerticalNavigation/TreeView/descendants.js.map +1 -1
- package/dist/esm/index.js +236 -236
- package/dist/types/index.d.ts +452 -385
- package/package.json +3 -3
- package/dist/cjs/components/GlobalActions/globalActionsClasses.cjs +0 -8
- package/dist/cjs/components/GlobalActions/globalActionsClasses.cjs.map +0 -1
- package/dist/cjs/components/ListContainer/ListItem/listItemClasses.cjs +0 -8
- package/dist/cjs/components/ListContainer/ListItem/listItemClasses.cjs.map +0 -1
- package/dist/cjs/components/ListContainer/listContainerClasses.cjs +0 -8
- package/dist/cjs/components/ListContainer/listContainerClasses.cjs.map +0 -1
- package/dist/cjs/components/Loading/loadingClasses.cjs +0 -8
- package/dist/cjs/components/Loading/loadingClasses.cjs.map +0 -1
- package/dist/cjs/components/SelectionList/selectionListClasses.cjs +0 -8
- package/dist/cjs/components/SelectionList/selectionListClasses.cjs.map +0 -1
- package/dist/cjs/components/Stack/stackClasses.cjs +0 -8
- package/dist/cjs/components/Stack/stackClasses.cjs.map +0 -1
- package/dist/cjs/components/Tab/tabClasses.cjs +0 -8
- package/dist/cjs/components/Tab/tabClasses.cjs.map +0 -1
- package/dist/cjs/components/Tabs/tabsClasses.cjs +0 -8
- package/dist/cjs/components/Tabs/tabsClasses.cjs.map +0 -1
- package/dist/cjs/components/TextArea/textAreaClasses.cjs +0 -8
- package/dist/cjs/components/TextArea/textAreaClasses.cjs.map +0 -1
- package/dist/esm/components/GlobalActions/globalActionsClasses.js +0 -8
- package/dist/esm/components/GlobalActions/globalActionsClasses.js.map +0 -1
- package/dist/esm/components/ListContainer/ListItem/listItemClasses.js +0 -8
- package/dist/esm/components/ListContainer/ListItem/listItemClasses.js.map +0 -1
- package/dist/esm/components/ListContainer/listContainerClasses.js +0 -8
- package/dist/esm/components/ListContainer/listContainerClasses.js.map +0 -1
- package/dist/esm/components/Loading/loadingClasses.js +0 -8
- package/dist/esm/components/Loading/loadingClasses.js.map +0 -1
- package/dist/esm/components/SelectionList/selectionListClasses.js +0 -8
- package/dist/esm/components/SelectionList/selectionListClasses.js.map +0 -1
- package/dist/esm/components/Stack/stackClasses.js +0 -8
- package/dist/esm/components/Stack/stackClasses.js.map +0 -1
- package/dist/esm/components/Tab/tabClasses.js +0 -8
- package/dist/esm/components/Tab/tabClasses.js.map +0 -1
- package/dist/esm/components/Tabs/tabsClasses.js +0 -8
- package/dist/esm/components/Tabs/tabsClasses.js.map +0 -1
- package/dist/esm/components/TextArea/textAreaClasses.js +0 -8
- package/dist/esm/components/TextArea/textAreaClasses.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sources":["../../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import React, { useMemo, useRef, useCallback } from \"react\";\n\nimport { useTheme } from \"@mui/material/styles\";\nimport MuiDivider, {\n DividerProps as MuiDividerProps,\n} from \"@mui/material/Divider\";\n\nimport
|
|
1
|
+
{"version":3,"file":"Stack.js","sources":["../../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import React, { useMemo, useRef, useCallback } from \"react\";\n\nimport { useTheme } from \"@mui/material/styles\";\nimport MuiDivider, {\n DividerProps as MuiDividerProps,\n} from \"@mui/material/Divider\";\n\nimport isString from \"lodash/isString\";\nimport isBoolean from \"lodash/isBoolean\";\n\nimport { useWidth } from \"@core/hooks/useWidth\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { HvFocus } from \"@core/components/Focus\";\nimport { HvBreakpoints } from \"@core/types/tokens\";\nimport { ExtractNames } from \"@core/utils/classes\";\n\nimport { useClasses, staticClasses } from \"./Stack.styles\";\n\nexport { staticClasses as stackClasses };\n\nexport type HvStackClasses = ExtractNames<typeof useClasses>;\n\nexport type HvStackDirection = \"column\" | \"row\" | Partial<HvStackBreakpoints>;\nexport interface HvStackBreakpoints extends Record<HvBreakpoints, string> {}\n\nexport interface HvStackProps extends HvBaseProps {\n /** The direction of the stack. Can be either a string or an object that states the direction for each breakpoint. */\n direction?: HvStackDirection;\n /** The spacing between elements of the stack. */\n spacing?: HvBreakpoints;\n /** The divider component to be used between the stack elements.\n * - If `true` the Material-UI Divider component will be used.\n * - If a React node is passed then the custom divider will be used.\n */\n divider?: boolean | React.ReactNode;\n /** The properties to pass on to the Material-UI component. */\n dividerProps?: MuiDividerProps;\n /** Sets whether or not there should be arrow navigation between the stack elements. */\n withNavigation?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvStackClasses;\n}\n\n/**\n * @returns {string} - Returns a direction for the stack: column or row. If the\n * `direction` property is a string and a valid direction then we\n * use it. If it's an object with multiple directions by breakpoint\n * we use the appropriate one or search for the nearest breakpoint\n * smaller than the current one to use.\n */\nconst getDirection = (direction, width, breakpoints) => {\n if (isString(direction)) return direction;\n\n for (let i = breakpoints.indexOf(width); i >= 0; i -= 1) {\n if (direction[breakpoints[i]] !== undefined) {\n return direction[breakpoints[i]];\n }\n }\n return \"column\";\n};\n\n/**\n * A Stack component allows the organization of its children in a vertical or horizontal layout.\n *\n * It also allows the specification of the spacing between the stack elements and the addition of a divider between the elements.\n */\nexport const HvStack = (props: HvStackProps) => {\n const {\n classes: classesProp,\n className,\n children,\n direction = \"column\",\n spacing = \"sm\",\n divider = false,\n withNavigation = false,\n dividerProps = {},\n ...others\n } = useDefaultProps(\"HvStack\", props);\n const { classes, cx } = useClasses(classesProp);\n\n const width = useWidth();\n const containerRef = useRef(null);\n const { breakpoints } = useTheme();\n\n const processedDirection = useMemo(\n () => getDirection(direction, width, breakpoints.keys),\n [direction, width, breakpoints]\n );\n\n /**\n * @returns {node} - The divider component to use. If the property `divider` is\n * set to `true` then the Material-UI divider is used, otherwise\n * we use the custom divider the user passed.\n */\n const getDividerComponent = useCallback(() => {\n if (isBoolean(divider) && divider) {\n return (\n <MuiDivider\n orientation={\n processedDirection === \"column\" ? \"horizontal\" : \"vertical\"\n }\n flexItem={processedDirection === \"row\"}\n role=\"separator\"\n {...dividerProps}\n />\n );\n }\n return divider;\n }, [divider, dividerProps, processedDirection]);\n\n return (\n <div\n ref={containerRef}\n className={cx(\n classes.root,\n classes[processedDirection],\n classes[spacing],\n className\n )}\n {...others}\n >\n {React.Children.map(children, (child, i) => {\n return (\n <>\n {divider && i !== 0 && getDividerComponent()}\n {withNavigation ? (\n <HvFocus\n rootRef={containerRef}\n focusDisabled={false}\n strategy=\"grid\"\n navigationJump={\n processedDirection === \"column\"\n ? 1\n : React.Children.count(children) || 0\n }\n filterClass=\"child\"\n >\n <div className=\"child\">{child}</div>\n </HvFocus>\n ) : (\n child\n )}\n </>\n );\n })}\n </div>\n );\n};\n"],"names":["getDirection","direction","width","breakpoints","isString","i","indexOf","undefined","HvStack","props","classes","classesProp","className","children","spacing","divider","withNavigation","dividerProps","others","useDefaultProps","cx","useClasses","useWidth","containerRef","useRef","useTheme","processedDirection","useMemo","keys","getDividerComponent","useCallback","isBoolean","MuiDivider","orientation","flexItem","role","ref","root","React","Children","map","child","_Fragment","_jsx","HvFocus","rootRef","focusDisabled","strategy","navigationJump","count","filterClass"],"mappings":";;;;;;;;;;;AAmDA,MAAMA,eAAeA,CAACC,WAAWC,OAAOC,gBAAgB;AACtD,MAAIC,SAASH,SAAS;AAAUA,WAAAA;AAEvBI,WAAAA,IAAIF,YAAYG,QAAQJ,KAAK,GAAGG,KAAK,GAAGA,KAAK,GAAG;AACvD,QAAIJ,UAAUE,YAAYE,CAAC,CAAC,MAAME,QAAW;AACpCN,aAAAA,UAAUE,YAAYE,CAAC,CAAC;AAAA,I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AA,UACTuB,eAAe;AAAA,UACfC,UAAS;AAAA,UACTC,gBACEtB,uBAAuB,WACnB,IACAY,eAAMC,SAASU,MAAMpC,QAAQ,KAAK;AAAA,UAExCqC,aAAY;AAAA,UAAOrC,8BAEnB,OAAA;AAAA,YAAKD,WAAU;AAAA,YAAOC,UAAE4B;AAAAA,UAAAA,CAAW;AAAA,QAC5B,CAAA,IAETA,KACD;AAAA,MAAA,CACD;AAAA,IAAA,CAEL;AAAA,EAAA,CACE;AAET;"}
|
|
@@ -1,53 +1,36 @@
|
|
|
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
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
return _extends.apply(this, arguments);
|
|
17
|
-
}
|
|
18
|
-
const StyledRoot = /* @__PURE__ */ _styled("div", process.env.NODE_ENV === "production" ? _extends({}, {
|
|
19
|
-
target: "evwozt80"
|
|
20
|
-
}, transientOptions) : _extends({}, {
|
|
21
|
-
target: "evwozt80",
|
|
22
|
-
label: "StyledRoot"
|
|
23
|
-
}, transientOptions))(({
|
|
24
|
-
$direction,
|
|
25
|
-
$breakpoint
|
|
26
|
-
}) => ({
|
|
27
|
-
display: "flex",
|
|
28
|
-
...$direction === "column" && {
|
|
2
|
+
import { createClasses } from "../../utils/classes.js";
|
|
3
|
+
const {
|
|
4
|
+
staticClasses,
|
|
5
|
+
useClasses
|
|
6
|
+
} = createClasses("HvStack", {
|
|
7
|
+
root: {
|
|
8
|
+
display: "flex"
|
|
9
|
+
},
|
|
10
|
+
column: {
|
|
29
11
|
flexDirection: "column"
|
|
30
12
|
},
|
|
31
|
-
|
|
13
|
+
row: {
|
|
32
14
|
flexDirection: "row"
|
|
33
15
|
},
|
|
34
|
-
|
|
16
|
+
xs: {
|
|
35
17
|
gap: theme.space.xs
|
|
36
18
|
},
|
|
37
|
-
|
|
19
|
+
sm: {
|
|
38
20
|
gap: theme.space.sm
|
|
39
21
|
},
|
|
40
|
-
|
|
22
|
+
md: {
|
|
41
23
|
gap: theme.spacing(4)
|
|
42
24
|
},
|
|
43
|
-
|
|
25
|
+
lg: {
|
|
44
26
|
gap: theme.spacing(6)
|
|
45
27
|
},
|
|
46
|
-
|
|
28
|
+
xl: {
|
|
47
29
|
gap: theme.spacing(11)
|
|
48
30
|
}
|
|
49
|
-
})
|
|
31
|
+
});
|
|
50
32
|
export {
|
|
51
|
-
|
|
33
|
+
staticClasses,
|
|
34
|
+
useClasses
|
|
52
35
|
};
|
|
53
36
|
//# sourceMappingURL=Stack.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.styles.js","sources":["../../../../src/components/Stack/Stack.styles.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Stack.styles.js","sources":["../../../../src/components/Stack/Stack.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvStack\", {\n root: {\n display: \"flex\",\n },\n column: {\n flexDirection: \"column\",\n },\n row: {\n flexDirection: \"row\",\n },\n xs: {\n gap: theme.space.xs,\n },\n sm: {\n gap: theme.space.sm,\n },\n md: {\n gap: theme.spacing(4),\n },\n lg: {\n gap: theme.spacing(6),\n },\n xl: {\n gap: theme.spacing(11),\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","display","column","flexDirection","row","xs","gap","theme","space","sm","md","spacing","lg","xl"],"mappings":";;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,WAAW;AAAA,EACpEC,MAAM;AAAA,IACJC,SAAS;AAAA,EACX;AAAA,EACAC,QAAQ;AAAA,IACNC,eAAe;AAAA,EACjB;AAAA,EACAC,KAAK;AAAA,IACHD,eAAe;AAAA,EACjB;AAAA,EACAE,IAAI;AAAA,IACFC,KAAKC,MAAMC,MAAMH;AAAAA,EACnB;AAAA,EACAI,IAAI;AAAA,IACFH,KAAKC,MAAMC,MAAMC;AAAAA,EACnB;AAAA,EACAC,IAAI;AAAA,IACFJ,KAAKC,MAAMI,QAAQ,CAAC;AAAA,EACtB;AAAA,EACAC,IAAI;AAAA,IACFN,KAAKC,MAAMI,QAAQ,CAAC;AAAA,EACtB;AAAA,EACAE,IAAI;AAAA,IACFP,KAAKC,MAAMI,QAAQ,EAAE;AAAA,EACvB;AACF,CAAC;"}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
+
import { Tab } from "@mui/material";
|
|
1
2
|
import { useDefaultProps } from "../../hooks/useDefaultProps.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import tabClasses from "./tabClasses.js";
|
|
3
|
+
import { useClasses } from "./Tab.styles.js";
|
|
4
|
+
import { staticClasses } from "./Tab.styles.js";
|
|
5
5
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
const HvTab = (props) => {
|
|
7
7
|
const {
|
|
8
|
-
classes,
|
|
8
|
+
classes: classesProp,
|
|
9
9
|
iconPosition = "top",
|
|
10
10
|
disabled = false,
|
|
11
11
|
...others
|
|
12
12
|
} = useDefaultProps("HvTab", props);
|
|
13
|
-
|
|
13
|
+
const {
|
|
14
|
+
classes,
|
|
15
|
+
cx
|
|
16
|
+
} = useClasses(classesProp);
|
|
17
|
+
return /* @__PURE__ */ jsx(Tab, {
|
|
14
18
|
classes: {
|
|
15
|
-
root:
|
|
16
|
-
selected:
|
|
17
|
-
disabled:
|
|
19
|
+
root: classes.root,
|
|
20
|
+
selected: classes.selected,
|
|
21
|
+
disabled: classes.disabled
|
|
18
22
|
},
|
|
19
23
|
disableRipple: true,
|
|
20
24
|
disableTouchRipple: true,
|
|
21
|
-
focusVisibleClassName:
|
|
25
|
+
focusVisibleClassName: cx("HvIsFocusVisible", classes.focusVisible),
|
|
22
26
|
disabled,
|
|
23
27
|
iconPosition,
|
|
24
28
|
...others
|
|
25
29
|
});
|
|
26
30
|
};
|
|
27
31
|
export {
|
|
28
|
-
HvTab
|
|
32
|
+
HvTab,
|
|
33
|
+
staticClasses as tabClasses
|
|
29
34
|
};
|
|
30
35
|
//# sourceMappingURL=Tab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { TabProps as MuiTabProps } from \"@mui/material\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\
|
|
1
|
+
{"version":3,"file":"Tab.js","sources":["../../../../src/components/Tab/Tab.tsx"],"sourcesContent":["import { Tab, TabProps as MuiTabProps } from \"@mui/material\";\nimport { useDefaultProps } from \"@core/hooks/useDefaultProps\";\nimport { HvBaseProps } from \"@core/types/generic\";\nimport { ExtractNames } from \"@core/utils/classes\";\nimport { staticClasses, useClasses } from \"./Tab.styles\";\n\nexport { staticClasses as tabClasses };\n\nexport type HvTabClasses = ExtractNames<typeof useClasses>;\n\n// Mui Tab props: https://mui.com/material-ui/api/tab/#props\nexport interface HvTabProps\n extends Omit<MuiTabProps, \"children\">,\n HvBaseProps<HTMLDivElement, \"children\"> {\n /** If `true`, the tab will be disabled. */\n disabled?: boolean;\n /** The icon element. */\n icon?: React.ReactElement | string;\n /** The label element. */\n label?: React.ReactNode;\n /** The position of the icon relative to the label. */\n iconPosition?: \"bottom\" | \"end\" | \"start\" | \"top\";\n /** A Jss Object used to override or extend the component styles. */\n classes?: HvTabClasses;\n}\n\nexport const HvTab = (props: HvTabProps) => {\n const {\n classes: classesProp,\n iconPosition = \"top\",\n disabled = false,\n ...others\n } = useDefaultProps(\"HvTab\", props);\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <Tab\n classes={{\n root: classes.root,\n selected: classes.selected,\n disabled: classes.disabled,\n }}\n disableRipple\n disableTouchRipple\n // expose the global class HvIsFocusVisible as a marker\n // not to be styled directly, only as helper in specific css queries\n focusVisibleClassName={cx(\"HvIsFocusVisible\", classes.focusVisible)}\n disabled={disabled}\n iconPosition={iconPosition}\n {...others}\n />\n );\n};\n"],"names":["HvTab","props","classes","classesProp","iconPosition","disabled","others","useDefaultProps","cx","useClasses","Tab","root","selected","disableRipple","disableTouchRipple","focusVisibleClassName","focusVisible"],"mappings":";;;;;AA0BaA,MAAAA,QAAQA,CAACC,UAAsB;AACpC,QAAA;AAAA,IACJC,SAASC;AAAAA,IACTC,eAAe;AAAA,IACfC,WAAW;AAAA,IACX,GAAGC;AAAAA,EAAAA,IACDC,gBAAgB,SAASN,KAAK;AAC5B,QAAA;AAAA,IAAEC;AAAAA,IAASM;AAAAA,EAAAA,IAAOC,WAAWN,WAAW;AAE9C,6BACGO,KAAG;AAAA,IACFR,SAAS;AAAA,MACPS,MAAMT,QAAQS;AAAAA,MACdC,UAAUV,QAAQU;AAAAA,MAClBP,UAAUH,QAAQG;AAAAA,IACpB;AAAA,IACAQ,eAAa;AAAA,IACbC,oBAAkB;AAAA,IAGlBC,uBAAuBP,GAAG,oBAAoBN,QAAQc,YAAY;AAAA,IAClEX;AAAAA,IACAD;AAAAA,IAA2B,GACvBE;AAAAA,EAAAA,CACL;AAEL;"}
|
|
@@ -1,66 +1,64 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createClasses } from "../../utils/classes.js";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
import { Tab } from "@mui/material";
|
|
4
3
|
import { outlineStyles } from "../../utils/focusUtils.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
const {
|
|
5
|
+
staticClasses,
|
|
6
|
+
useClasses
|
|
7
|
+
} = createClasses("HvTab", {
|
|
8
|
+
root: {
|
|
9
|
+
marginTop: "3px",
|
|
10
|
+
padding: theme.tab.padding,
|
|
11
|
+
minWidth: 70,
|
|
12
|
+
minHeight: 32,
|
|
13
|
+
textTransform: "none",
|
|
14
|
+
fontFamily: theme.fontFamily.body,
|
|
15
|
+
...theme.typography.body,
|
|
16
|
+
"&:hover": {
|
|
17
|
+
backgroundColor: theme.tab.hoverBackgroundColor,
|
|
18
|
+
borderRadius: theme.tab.hoverBackgroundBorderRadius,
|
|
19
|
+
"&::after": {
|
|
20
|
+
height: "1px",
|
|
21
|
+
backgroundColor: theme.tab.hoverUnderlineBackgroundColor
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"&$selected": {
|
|
25
|
+
color: theme.typography.label.color,
|
|
26
|
+
fontWeight: theme.typography.label.fontWeight,
|
|
27
|
+
lineHeight: theme.typography.label.lineHeight,
|
|
28
|
+
letterSpacing: theme.typography.label.letterSpacing
|
|
29
|
+
},
|
|
30
|
+
"&$disabled": {
|
|
31
|
+
color: theme.colors.secondary_60,
|
|
32
|
+
cursor: "not-allowed",
|
|
33
|
+
pointerEvents: "all",
|
|
34
|
+
opacity: 1,
|
|
35
|
+
"&:hover": {
|
|
36
|
+
background: "none"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
opacity: 1,
|
|
32
40
|
"&::after": {
|
|
41
|
+
position: "absolute",
|
|
42
|
+
left: 0,
|
|
43
|
+
top: "calc(100% - 1px)",
|
|
33
44
|
height: "1px",
|
|
34
|
-
|
|
45
|
+
width: "100%",
|
|
46
|
+
backgroundColor: theme.colors.atmo4,
|
|
47
|
+
content: "''"
|
|
48
|
+
},
|
|
49
|
+
// Override Mui styling: https://mui.com/material-ui/api/tab/#css
|
|
50
|
+
"& .MuiTab-iconWrapper": {
|
|
51
|
+
margin: 0
|
|
35
52
|
}
|
|
36
53
|
},
|
|
37
|
-
|
|
54
|
+
focusVisible: {
|
|
38
55
|
...outlineStyles
|
|
39
56
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Override Mui styling: https://mui.com/material-ui/api/tab/#css
|
|
44
|
-
"&.Mui-selected": {
|
|
45
|
-
color: theme.colors.secondary,
|
|
46
|
-
letterSpacing: theme.typography.label.letterSpacing,
|
|
47
|
-
lineHeight: theme.typography.label.lineHeight,
|
|
48
|
-
fontWeight: theme.typography.label.fontWeight
|
|
49
|
-
},
|
|
50
|
-
"&.Mui-disabled": {
|
|
51
|
-
color: theme.colors.secondary_60,
|
|
52
|
-
cursor: "not-allowed",
|
|
53
|
-
pointerEvents: "all",
|
|
54
|
-
opacity: 1,
|
|
55
|
-
"&:hover": {
|
|
56
|
-
background: "none"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"& .MuiTab-iconWrapper": {
|
|
60
|
-
margin: 0
|
|
61
|
-
}
|
|
62
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2h2LXVpa2l0LXJlYWN0L2h2LXVpa2l0LXJlYWN0L3BhY2thZ2VzL2NvcmUvc3JjL2NvbXBvbmVudHMvVGFiL1RhYi5zdHlsZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVV5QiIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay9odi11aWtpdC1yZWFjdC9odi11aWtpdC1yZWFjdC9wYWNrYWdlcy9jb3JlL3NyYy9jb21wb25lbnRzL1RhYi9UYWIuc3R5bGVzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7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cIjoge1xuICAgIG1hcmdpbjogMCxcbiAgfSxcbn0pO1xuIl19 */");
|
|
57
|
+
selected: {},
|
|
58
|
+
disabled: {}
|
|
59
|
+
});
|
|
63
60
|
export {
|
|
64
|
-
|
|
61
|
+
staticClasses,
|
|
62
|
+
useClasses
|
|
65
63
|
};
|
|
66
64
|
//# sourceMappingURL=Tab.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.styles.js","sources":["../../../../src/components/Tab/Tab.styles.tsx"],"sourcesContent":["import { CSSProperties } from \"react\";\
|
|
1
|
+
{"version":3,"file":"Tab.styles.js","sources":["../../../../src/components/Tab/Tab.styles.tsx"],"sourcesContent":["import { CSSProperties } from \"react\";\nimport { createClasses } from \"@core/utils/classes\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\nimport { outlineStyles } from \"@core/utils/focusUtils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTab\", {\n root: {\n marginTop: \"3px\",\n padding: theme.tab.padding,\n minWidth: 70,\n minHeight: 32,\n textTransform: \"none\",\n fontFamily: theme.fontFamily.body,\n ...(theme.typography.body as CSSProperties),\n \"&:hover\": {\n backgroundColor: theme.tab.hoverBackgroundColor,\n borderRadius: theme.tab.hoverBackgroundBorderRadius,\n \"&::after\": {\n height: \"1px\",\n backgroundColor: theme.tab.hoverUnderlineBackgroundColor,\n },\n },\n \"&$selected\": {\n color: theme.typography.label.color,\n fontWeight: theme.typography.label.fontWeight,\n lineHeight: theme.typography.label.lineHeight,\n letterSpacing: theme.typography.label.letterSpacing,\n },\n \"&$disabled\": {\n color: theme.colors.secondary_60,\n cursor: \"not-allowed\",\n pointerEvents: \"all\",\n opacity: 1,\n \"&:hover\": {\n background: \"none\",\n },\n },\n opacity: 1,\n \"&::after\": {\n position: \"absolute\",\n left: 0,\n top: \"calc(100% - 1px)\",\n height: \"1px\",\n width: \"100%\",\n backgroundColor: theme.colors.atmo4,\n content: \"''\",\n },\n // Override Mui styling: https://mui.com/material-ui/api/tab/#css\n \"& .MuiTab-iconWrapper\": {\n margin: 0,\n },\n },\n focusVisible: {\n ...outlineStyles,\n },\n selected: {},\n disabled: {},\n});\n"],"names":["staticClasses","useClasses","createClasses","root","marginTop","padding","theme","tab","minWidth","minHeight","textTransform","fontFamily","body","typography","backgroundColor","hoverBackgroundColor","borderRadius","hoverBackgroundBorderRadius","height","hoverUnderlineBackgroundColor","color","label","fontWeight","lineHeight","letterSpacing","colors","secondary_60","cursor","pointerEvents","opacity","background","position","left","top","width","atmo4","content","margin","focusVisible","outlineStyles","selected","disabled"],"mappings":";;;AAKa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,SAAS;AAAA,EAClEC,MAAM;AAAA,IACJC,WAAW;AAAA,IACXC,SAASC,MAAMC,IAAIF;AAAAA,IACnBG,UAAU;AAAA,IACVC,WAAW;AAAA,IACXC,eAAe;AAAA,IACfC,YAAYL,MAAMK,WAAWC;AAAAA,IAC7B,GAAIN,MAAMO,WAAWD;AAAAA,IACrB,WAAW;AAAA,MACTE,iBAAiBR,MAAMC,IAAIQ;AAAAA,MAC3BC,cAAcV,MAAMC,IAAIU;AAAAA,MACxB,YAAY;AAAA,QACVC,QAAQ;AAAA,QACRJ,iBAAiBR,MAAMC,IAAIY;AAAAA,MAC7B;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZC,OAAOd,MAAMO,WAAWQ,MAAMD;AAAAA,MAC9BE,YAAYhB,MAAMO,WAAWQ,MAAMC;AAAAA,MACnCC,YAAYjB,MAAMO,WAAWQ,MAAME;AAAAA,MACnCC,eAAelB,MAAMO,WAAWQ,MAAMG;AAAAA,IACxC;AAAA,IACA,cAAc;AAAA,MACZJ,OAAOd,MAAMmB,OAAOC;AAAAA,MACpBC,QAAQ;AAAA,MACRC,eAAe;AAAA,MACfC,SAAS;AAAA,MACT,WAAW;AAAA,QACTC,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACAD,SAAS;AAAA,IACT,YAAY;AAAA,MACVE,UAAU;AAAA,MACVC,MAAM;AAAA,MACNC,KAAK;AAAA,MACLf,QAAQ;AAAA,MACRgB,OAAO;AAAA,MACPpB,iBAAiBR,MAAMmB,OAAOU;AAAAA,MAC9BC,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,yBAAyB;AAAA,MACvBC,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACAC,cAAc;AAAA,IACZ,GAAGC;AAAAA,EACL;AAAA,EACAC,UAAU,CAAC;AAAA,EACXC,UAAU,CAAC;AACb,CAAC;"}
|
|
@@ -8,9 +8,7 @@ const {
|
|
|
8
8
|
position: "relative",
|
|
9
9
|
width: "100%",
|
|
10
10
|
...theme.typography.body,
|
|
11
|
-
|
|
12
|
-
borderSpacing: 0
|
|
13
|
-
},
|
|
11
|
+
borderSpacing: 0,
|
|
14
12
|
"& caption": {
|
|
15
13
|
...theme.typography.body,
|
|
16
14
|
padding: theme.space.xs,
|
|
@@ -20,12 +18,13 @@ const {
|
|
|
20
18
|
},
|
|
21
19
|
stickyHeader: {},
|
|
22
20
|
stickyColumns: {
|
|
23
|
-
backgroundColor: theme.colors.atmo2
|
|
21
|
+
backgroundColor: theme.colors.atmo2,
|
|
22
|
+
"&": {
|
|
23
|
+
borderSpacing: 0
|
|
24
|
+
}
|
|
24
25
|
},
|
|
25
26
|
listRow: {
|
|
26
|
-
|
|
27
|
-
borderSpacing: `0 ${theme.space.xs}`
|
|
28
|
-
}
|
|
27
|
+
borderSpacing: `0 ${theme.space.xs}`
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.styles.js","sources":["../../../../src/components/Table/Table.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTable\", {\n root: {\n position: \"relative\",\n width: \"100%\",\n\n ...theme.typography.body,\n\n
|
|
1
|
+
{"version":3,"file":"Table.styles.js","sources":["../../../../src/components/Table/Table.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTable\", {\n root: {\n position: \"relative\",\n width: \"100%\",\n\n ...theme.typography.body,\n\n borderSpacing: 0,\n\n \"& caption\": {\n ...theme.typography.body,\n padding: theme.space.xs,\n textAlign: \"left\",\n captionSide: \"bottom\",\n },\n },\n stickyHeader: {},\n stickyColumns: {\n backgroundColor: theme.colors.atmo2,\n \"&\": {\n borderSpacing: 0,\n },\n },\n listRow: {\n borderSpacing: `0 ${theme.space.xs}`,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","position","width","theme","typography","body","borderSpacing","padding","space","xs","textAlign","captionSide","stickyHeader","stickyColumns","backgroundColor","colors","atmo2","listRow"],"mappings":";;AAIa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,WAAW;AAAA,EACpEC,MAAM;AAAA,IACJC,UAAU;AAAA,IACVC,OAAO;AAAA,IAEP,GAAGC,MAAMC,WAAWC;AAAAA,IAEpBC,eAAe;AAAA,IAEf,aAAa;AAAA,MACX,GAAGH,MAAMC,WAAWC;AAAAA,MACpBE,SAASJ,MAAMK,MAAMC;AAAAA,MACrBC,WAAW;AAAA,MACXC,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACAC,cAAc,CAAC;AAAA,EACfC,eAAe;AAAA,IACbC,iBAAiBX,MAAMY,OAAOC;AAAAA,IAC9B,KAAK;AAAA,MACHV,eAAe;AAAA,IACjB;AAAA,EACF;AAAA,EACAW,SAAS;AAAA,IACPX,eAAgB,KAAIH,MAAMK,MAAMC;AAAAA,EAClC;AACF,CAAC;"}
|
|
@@ -10,21 +10,10 @@ const {
|
|
|
10
10
|
color: "inherit",
|
|
11
11
|
backgroundColor: theme.table.rowBackgroundColor,
|
|
12
12
|
verticalAlign: "middle",
|
|
13
|
-
outline: 0
|
|
14
|
-
minHeight: 32,
|
|
15
|
-
"tr&": {
|
|
16
|
-
height: 32
|
|
17
|
-
}
|
|
13
|
+
outline: 0
|
|
18
14
|
},
|
|
19
15
|
/** Styles applied to the component root when inside a `HvTableHead`. */
|
|
20
|
-
head: {
|
|
21
|
-
"&:first-of-type": {
|
|
22
|
-
height: 52
|
|
23
|
-
},
|
|
24
|
-
"tr&:first-of-type": {
|
|
25
|
-
height: 52
|
|
26
|
-
}
|
|
27
|
-
},
|
|
16
|
+
head: {},
|
|
28
17
|
/** Styles applied to the component root when inside a `HvTableBody`. */
|
|
29
18
|
body: {},
|
|
30
19
|
/** Styles applied to the component root when inside a `HvTableFooter`. */
|
|
@@ -51,9 +40,11 @@ const {
|
|
|
51
40
|
},
|
|
52
41
|
/** Styles applied to the component root when its table variant is list. */
|
|
53
42
|
variantList: {
|
|
43
|
+
// only applied on custom `display`
|
|
44
|
+
marginBottom: theme.space.xs,
|
|
45
|
+
borderRadius: theme.table.rowListBorderRadius,
|
|
54
46
|
...getBorderStyles("row", theme.table.rowListBorderColor, theme.table.rowListBorderRadius),
|
|
55
47
|
backgroundColor: theme.colors.atmo1,
|
|
56
|
-
height: 52,
|
|
57
48
|
"&$selected": {
|
|
58
49
|
...getBorderStyles("row", theme.colors.secondary, theme.table.rowListBorderRadius),
|
|
59
50
|
"&:hover": {
|
|
@@ -69,14 +60,7 @@ const {
|
|
|
69
60
|
},
|
|
70
61
|
/** Styles applied to the component root when its table variant is list. */
|
|
71
62
|
variantListHead: {
|
|
72
|
-
backgroundColor: theme.table.rowListBackgroundColor
|
|
73
|
-
height: 16,
|
|
74
|
-
"&:first-of-type": {
|
|
75
|
-
height: 16
|
|
76
|
-
},
|
|
77
|
-
"tr&:first-of-type": {
|
|
78
|
-
height: 16
|
|
79
|
-
}
|
|
63
|
+
backgroundColor: theme.table.rowListBackgroundColor
|
|
80
64
|
}
|
|
81
65
|
});
|
|
82
66
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.styles.js","sources":["../../../../../src/components/Table/TableRow/TableRow.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nimport { getBorderStyles } from \"../utils/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTableRow\", {\n /** Styles applied to the component root class. */\n root: {\n color: \"inherit\",\n backgroundColor: theme.table.rowBackgroundColor,\n verticalAlign: \"middle\",\n outline: 0,\n
|
|
1
|
+
{"version":3,"file":"TableRow.styles.js","sources":["../../../../../src/components/Table/TableRow/TableRow.styles.tsx"],"sourcesContent":["import { theme } from \"@hitachivantara/uikit-styles\";\n\nimport { createClasses } from \"@core/utils/classes\";\n\nimport { getBorderStyles } from \"../utils/utils\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvTableRow\", {\n /** Styles applied to the component root class. */\n root: {\n color: \"inherit\",\n backgroundColor: theme.table.rowBackgroundColor,\n verticalAlign: \"middle\",\n outline: 0,\n },\n /** Styles applied to the component root when inside a `HvTableHead`. */\n head: {},\n /** Styles applied to the component root when inside a `HvTableBody`. */\n body: {},\n /** Styles applied to the component root when inside a `HvTableFooter`. */\n footer: {},\n /** Styles applied to the component root when selected. */\n selected: {\n backgroundColor: theme.table.selectedRowBackgroundColor,\n },\n /** Styles applied to the component root when expanded. */\n expanded: {\n backgroundColor: theme.colors.atmo1,\n \"& > *[role=cell]\": {\n borderBottom: \"none\",\n },\n },\n /** Styles applied to the component root when striped. */\n striped: {},\n /** Styles applied to the component root on hover. */\n hover: {\n transition: \"background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms\",\n \"&:hover\": {\n backgroundColor: theme.table.rowHoverColor,\n },\n },\n /** Styles applied to the component root when its table variant is list. */\n variantList: {\n // only applied on custom `display`\n marginBottom: theme.space.xs,\n borderRadius: theme.table.rowListBorderRadius,\n\n ...getBorderStyles(\n \"row\",\n theme.table.rowListBorderColor,\n theme.table.rowListBorderRadius\n ),\n backgroundColor: theme.colors.atmo1,\n \"&$selected\": {\n ...getBorderStyles(\n \"row\",\n theme.colors.secondary,\n theme.table.rowListBorderRadius\n ),\n\n \"&:hover\": {\n ...getBorderStyles(\n \"row\",\n theme.table.rowHoverBorderColor,\n theme.table.rowListBorderRadius\n ),\n },\n },\n\n \"&:hover\": {\n ...getBorderStyles(\n \"row\",\n theme.table.rowHoverBorderColor,\n theme.table.rowListBorderRadius\n ),\n },\n \"&.HvIsFocused\": {\n borderRadius: theme.table.rowListBorderRadius,\n },\n },\n /** Styles applied to the component root when its table variant is list. */\n variantListHead: {\n backgroundColor: theme.table.rowListBackgroundColor,\n },\n});\n"],"names":["staticClasses","useClasses","createClasses","root","color","backgroundColor","theme","table","rowBackgroundColor","verticalAlign","outline","head","body","footer","selected","selectedRowBackgroundColor","expanded","colors","atmo1","borderBottom","striped","hover","transition","rowHoverColor","variantList","marginBottom","space","xs","borderRadius","rowListBorderRadius","getBorderStyles","rowListBorderColor","secondary","rowHoverBorderColor","variantListHead","rowListBackgroundColor"],"mappings":";;;AAMa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAAc,cAAc;AAAA;AAAA,EAEvEC,MAAM;AAAA,IACJC,OAAO;AAAA,IACPC,iBAAiBC,MAAMC,MAAMC;AAAAA,IAC7BC,eAAe;AAAA,IACfC,SAAS;AAAA,EACX;AAAA;AAAA,EAEAC,MAAM,CAAC;AAAA;AAAA,EAEPC,MAAM,CAAC;AAAA;AAAA,EAEPC,QAAQ,CAAC;AAAA;AAAA,EAETC,UAAU;AAAA,IACRT,iBAAiBC,MAAMC,MAAMQ;AAAAA,EAC/B;AAAA;AAAA,EAEAC,UAAU;AAAA,IACRX,iBAAiBC,MAAMW,OAAOC;AAAAA,IAC9B,oBAAoB;AAAA,MAClBC,cAAc;AAAA,IAChB;AAAA,EACF;AAAA;AAAA,EAEAC,SAAS,CAAC;AAAA;AAAA,EAEVC,OAAO;AAAA,IACLC,YAAY;AAAA,IACZ,WAAW;AAAA,MACTjB,iBAAiBC,MAAMC,MAAMgB;AAAAA,IAC/B;AAAA,EACF;AAAA;AAAA,EAEAC,aAAa;AAAA;AAAA,IAEXC,cAAcnB,MAAMoB,MAAMC;AAAAA,IAC1BC,cAActB,MAAMC,MAAMsB;AAAAA,IAE1B,GAAGC,gBACD,OACAxB,MAAMC,MAAMwB,oBACZzB,MAAMC,MAAMsB,mBACd;AAAA,IACAxB,iBAAiBC,MAAMW,OAAOC;AAAAA,IAC9B,cAAc;AAAA,MACZ,GAAGY,gBACD,OACAxB,MAAMW,OAAOe,WACb1B,MAAMC,MAAMsB,mBACd;AAAA,MAEA,WAAW;AAAA,QACT,GAAGC,gBACD,OACAxB,MAAMC,MAAM0B,qBACZ3B,MAAMC,MAAMsB,mBACd;AAAA,MACF;AAAA,IACF;AAAA,IAEA,WAAW;AAAA,MACT,GAAGC,gBACD,OACAxB,MAAMC,MAAM0B,qBACZ3B,MAAMC,MAAMsB,mBACd;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACfD,cAActB,MAAMC,MAAMsB;AAAAA,IAC5B;AAAA,EACF;AAAA;AAAA,EAEAK,iBAAiB;AAAA,IACf7B,iBAAiBC,MAAMC,MAAM4B;AAAAA,EAC/B;AACF,CAAC;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useGetLatest, makePropGetter } from "react-table";
|
|
2
|
+
import { theme } from "@hitachivantara/uikit-styles";
|
|
2
3
|
const isSticky = (value) => /left|right/i.test(value);
|
|
3
4
|
const getStickyValue = ({
|
|
4
5
|
sticky,
|
|
@@ -117,7 +118,10 @@ const getCellProps = (header, isHeaderCell) => {
|
|
|
117
118
|
alignItems: isHeaderCell ? "start" : "center",
|
|
118
119
|
justifyContent: header.align,
|
|
119
120
|
width: `${header.totalWidth}px`,
|
|
120
|
-
minWidth: `${header.totalMinWidth}px
|
|
121
|
+
minWidth: `${header.totalMinWidth}px`,
|
|
122
|
+
...isHeaderCell && {
|
|
123
|
+
backgroundColor: theme.colors.atmo2
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
};
|
|
123
127
|
if (header.sticky != null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSticky.js","sources":["../../../../../src/components/Table/hooks/useSticky.ts"],"sourcesContent":["import {\n makePropGetter,\n useGetLatest,\n Hooks,\n PropGetter,\n TableCommonProps,\n} from \"react-table\";\nimport { CSSProperties } from \"react\";\n\n// #region ##### TYPES #####\n\nexport interface UseHvTableStickyTableHeadProps extends TableCommonProps {\n stickyHeader?: boolean;\n}\n\nexport type HvTableHeadPropGetter<D extends object> = PropGetter<\n D,\n UseHvTableStickyTableHeadProps\n>;\n\nexport type UseHvTableStickyTableOptions = {\n stickyHeader?: boolean;\n stickyColumns?: boolean;\n};\n\nexport interface UseHvTableStickyHooks<D extends object> {\n getTableHeadProps: Array<HvTableHeadPropGetter<D>>;\n}\n\nexport interface UseHvTableStickyTableInstance<D extends object> {\n getTableHeadProps: (\n propGetter?: HvTableHeadPropGetter<D>\n ) => UseHvTableStickyTableHeadProps;\n\n totalRight?: number;\n hasStickyColumns?: boolean;\n}\n\n// props target: <table>\nexport interface UseHvTableStickyTableProps {\n stickyHeader?: boolean;\n stickyColumns?: boolean;\n}\n\n// props target: <table><thead><tr><th>\nexport interface UseHvTableStickyColumnProps {\n stickyColumn?: boolean;\n stickyColumnMostLeft?: boolean;\n stickyColumnLeastRight?: boolean;\n}\n\n// props target: <table><tbody><tr><td>\nexport interface UseHvTableStickyCellProps {\n stickyColumn?: boolean;\n stickyColumnMostLeft?: boolean;\n stickyColumnLeastRight?: boolean;\n}\n\nexport type UseHvTableSticky = (<D extends object = Record<string, unknown>>(\n hooks: Hooks<D>\n) => void) & { pluginName: string };\n\n// #endregion ##### TYPES #####\n\nconst isSticky = (value) => /left|right/i.test(value);\n\nconst getStickyValue = ({ sticky, parent }) => {\n if (isSticky(sticky)) {\n return sticky;\n }\n\n if (parent != null) {\n // check if parent is sticky\n sticky = getStickyValue(parent);\n if (isSticky(sticky)) {\n return sticky;\n }\n\n const { columns } = parent;\n // check if any column in the same group is sticky\n if (columns?.length > 0) {\n sticky = columns?.find((col) => col.sticky != null)?.sticky;\n if (isSticky(sticky)) {\n return sticky;\n }\n }\n }\n\n return undefined;\n};\n\nconst updateColumnAndParent = (column, props) => {\n Object.assign(column, props);\n\n if (column.parent != null) {\n updateColumnAndParent(column.parent, props);\n }\n};\n\nconst visibleColumnsHook = (columns, { instance }) => {\n const toTheLeft: any[] = [];\n const toTheRight: any[] = [];\n const others: any[] = [];\n\n columns.forEach((column) => {\n const sticky = getStickyValue(column)?.toLowerCase();\n\n updateColumnAndParent(column, { sticky });\n\n if (sticky === \"left\") {\n toTheLeft.push(column);\n } else if (sticky === \"right\") {\n toTheRight.push(column);\n } else {\n others.push(column);\n }\n });\n\n if (others.length > 0) {\n const [firstNotSticky] = others;\n updateColumnAndParent(firstNotSticky, { isFirstNotSticky: true });\n\n const lastNotSticky = others[others.length - 1];\n updateColumnAndParent(lastNotSticky, { isLastNotSticky: true });\n }\n\n const hasLeftSticky = toTheLeft.length > 0;\n if (hasLeftSticky) {\n const lastLeftSticky = toTheLeft[toTheLeft.length - 1];\n\n updateColumnAndParent(lastLeftSticky, { isLastLeftSticky: true });\n }\n\n const hasRightSticky = toTheRight.length > 0;\n if (hasRightSticky) {\n const [firstRightSticky] = toTheRight;\n\n updateColumnAndParent(firstRightSticky, { isFirstRightSticky: true });\n }\n\n instance.hasStickyColumns = hasLeftSticky || hasRightSticky;\n\n return [...toTheLeft, ...others, ...toTheRight];\n};\n\nconst calculateHeaderWidthsToTheRight = (headers, right = 0) => {\n if (!headers?.length) {\n return;\n }\n\n for (let i = headers.length - 1; i !== -1; i -= 1) {\n const header = headers[i];\n\n header.totalRight = right;\n\n const { headers: subHeaders } = header;\n if (subHeaders?.length > 0) {\n calculateHeaderWidthsToTheRight(subHeaders, right);\n }\n\n if (header.isVisible) {\n right += header.totalWidth;\n }\n }\n};\n\nconst useInstanceHook = (instance) => {\n calculateHeaderWidthsToTheRight(instance.headers);\n\n const getInstance = useGetLatest(instance);\n instance.getTableHeadProps = makePropGetter(\n instance.getHooks().getTableHeadProps,\n {\n instance: getInstance(),\n }\n );\n};\n\nconst getRowProps = () => ({\n style: {\n display: \"flex\",\n flex: \"1 0 auto\",\n },\n});\n\nconst getCellProps = (header, isHeaderCell) => {\n const props: UseHvTableStickyCellProps & { style: CSSProperties } = {\n style: {\n display: \"inline-flex\",\n flex: `${header.totalWidth} ${header.totalMinWidth} auto`,\n alignItems: isHeaderCell ? \"start\" : \"center\",\n justifyContent: header.align,\n\n width: `${header.totalWidth}px`,\n minWidth: `${header.totalMinWidth}px`,\n },\n };\n\n if (header.sticky != null) {\n props.stickyColumn = true;\n\n const margin =\n header.sticky === \"left\" ? header.totalLeft : header.totalRight;\n\n props.style[header.sticky] = `${margin}px`;\n\n if (header.isLastLeftSticky) {\n props.stickyColumnMostLeft = true;\n }\n\n if (header.isFirstRightSticky) {\n props.stickyColumnLeastRight = true;\n }\n } else {\n if (header.isFirstNotSticky) {\n props.style.borderLeft = 0;\n }\n\n if (header.isLastNotSticky) {\n props.style.borderRight = 0;\n }\n }\n\n return props;\n};\n\n/*\n * STICKY POSITION MANAGEMENT\n * <thead>: sticky if stickyHeader: true\n * <tr>: never sticky\n * <th>: sticky only if that particular column is sticky (left or right)\n */\n\n/*\n * We need to hide the last non sticky column right border, to avoid issues with double borders.\n *\n * This could be done with css, using the `:has()` selector:\n * - \".not-sticky:has(+ .first-right-sticky)\": { border-right: 0 }\n *\n * Until the `:has()` selector is supported by modern browsers,\n * that at the moment is just a proposal https://developer.mozilla.org/en-US/docs/Web/CSS/:has,\n * we need to override the last not sticky column \"borderRight\" here.\n */\n\n// props target: <table>\nconst getTablePropsHook = (props, { instance }) => {\n const nextProps: UseHvTableStickyTableProps = {\n stickyHeader: instance.stickyHeader,\n stickyColumns: instance.hasStickyColumns,\n };\n\n return [props, nextProps];\n};\n\n// props target: <table><thead>\nexport const getTableHeadPropsHook = (props, { instance }) => {\n const nextProps = {\n stickyHeader: instance.stickyHeader,\n };\n\n return [props, nextProps];\n};\n\n// props target: <table><thead><tr>\nexport const getHeaderGroupPropsHook = (props, { instance }) => {\n const nextProps = instance.hasStickyColumns ? getRowProps() : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><thead><tr><th>\nconst getHeaderPropsHook = (props, { instance, column }) => {\n const nextProps = instance.hasStickyColumns ? getCellProps(column, true) : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><tbody><tr>\nconst getRowPropsHook = (props, { instance }) => {\n const nextProps = instance.hasStickyColumns ? getRowProps() : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><tbody><tr><td>\nconst getCellPropsHook = (props, { instance, cell }) => {\n const nextProps: UseHvTableStickyCellProps = instance.hasStickyColumns\n ? getCellProps(cell.column, false)\n : {};\n\n return [props, nextProps];\n};\n\nconst useSticky: UseHvTableSticky = (hooks) => {\n hooks.visibleColumns.push(visibleColumnsHook);\n hooks.useInstance.push(useInstanceHook);\n\n // props target: <table>\n hooks.getTableProps.push(getTablePropsHook);\n // props target: <table><thead>\n hooks.getTableHeadProps = [getTableHeadPropsHook];\n // props target: <table><thead><tr>\n hooks.getHeaderGroupProps.push(getHeaderGroupPropsHook);\n // props target: <table><thead><tr><th>\n hooks.getHeaderProps.push(getHeaderPropsHook);\n // props target: <table><tbody><tr>\n hooks.getRowProps.push(getRowPropsHook);\n // props target: <table><tbody><tr><td>\n hooks.getCellProps.push(getCellPropsHook);\n};\n\nuseSticky.pluginName = \"useHvTableSticky\";\n\nexport default useSticky;\n"],"names":["isSticky","value","test","getStickyValue","sticky","parent","columns","length","find","col","undefined","updateColumnAndParent","column","props","assign","visibleColumnsHook","instance","toTheLeft","toTheRight","others","forEach","toLowerCase","push","firstNotSticky","isFirstNotSticky","lastNotSticky","isLastNotSticky","hasLeftSticky","lastLeftSticky","isLastLeftSticky","hasRightSticky","firstRightSticky","isFirstRightSticky","hasStickyColumns","calculateHeaderWidthsToTheRight","headers","right","i","header","totalRight","subHeaders","isVisible","totalWidth","useInstanceHook","getInstance","useGetLatest","getTableHeadProps","makePropGetter","getHooks","getRowProps","style","display","flex","getCellProps","isHeaderCell","totalMinWidth","alignItems","justifyContent","align","width","minWidth","stickyColumn","margin","totalLeft","stickyColumnMostLeft","stickyColumnLeastRight","borderLeft","borderRight","getTablePropsHook","nextProps","stickyHeader","stickyColumns","getTableHeadPropsHook","getHeaderGroupPropsHook","getHeaderPropsHook","getRowPropsHook","getCellPropsHook","cell","useSticky","hooks","visibleColumns","useInstance","getTableProps","getHeaderGroupProps","getHeaderProps","pluginName"],"mappings":";AAgEA,MAAMA,WAAYC,CAAAA,UAAU,cAAcC,KAAKD,KAAK;AAEpD,MAAME,iBAAiBA,CAAC;AAAA,EAAEC;AAAAA,EAAQC;AAAO,MAAM;;AACzCL,MAAAA,SAASI,MAAM,GAAG;AACbA,WAAAA;AAAAA,EACT;AAEA,MAAIC,UAAU,MAAM;AAElBD,aAASD,eAAeE,MAAM;AAC1BL,QAAAA,SAASI,MAAM,GAAG;AACbA,aAAAA;AAAAA,IACT;AAEM,UAAA;AAAA,MAAEE;AAAAA,IAAYD,IAAAA;AAEhBC,SAAAA,mCAASC,UAAS,GAAG;AACvBH,gBAASE,wCAASE,KAAMC,CAAAA,QAAQA,IAAIL,UAAU,UAArCE,mBAA4CF;AACjDJ,UAAAA,SAASI,MAAM,GAAG;AACbA,eAAAA;AAAAA,MACT;AAAA,IACF;AAAA,EACF;AAEOM,SAAAA;AACT;AAEA,MAAMC,wBAAwBA,CAACC,QAAQC,UAAU;AACxCC,SAAAA,OAAOF,QAAQC,KAAK;AAEvBD,MAAAA,OAAOP,UAAU,MAAM;AACHO,0BAAAA,OAAOP,QAAQQ,KAAK;AAAA,EAC5C;AACF;AAEA,MAAME,qBAAqBA,CAACT,SAAS;AAAA,EAAEU;AA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AU6D;AAAK,MAAM;AAChDR,QAAAA,YAAuCrD,SAASiB,mBAClDoB,aAAawB,KAAKjE,QAAQ,KAAK,IAC/B;AAEG,SAAA,CAACC,OAAOwD,SAAS;AAC1B;AAEA,MAAMS,YAA+BC,CAAU,UAAA;AACvCC,QAAAA,eAAe1D,KAAKP,kBAAkB;AACtCkE,QAAAA,YAAY3D,KAAKqB,eAAe;AAGhCuC,QAAAA,cAAc5D,KAAK8C,iBAAiB;AAEpCtB,QAAAA,oBAAoB,CAAC0B,qBAAqB;AAE1CW,QAAAA,oBAAoB7D,KAAKmD,uBAAuB;AAEhDW,QAAAA,eAAe9D,KAAKoD,kBAAkB;AAEtCzB,QAAAA,YAAY3B,KAAKqD,eAAe;AAEhCtB,QAAAA,aAAa/B,KAAKsD,gBAAgB;AAC1C;AAEAE,UAAUO,aAAa;AAEvB,MAAA,cAAeP;"}
|
|
1
|
+
{"version":3,"file":"useSticky.js","sources":["../../../../../src/components/Table/hooks/useSticky.ts"],"sourcesContent":["import {\n makePropGetter,\n useGetLatest,\n Hooks,\n PropGetter,\n TableCommonProps,\n} from \"react-table\";\nimport { CSSProperties } from \"react\";\nimport { theme } from \"@hitachivantara/uikit-styles\";\n\n// #region ##### TYPES #####\n\nexport interface UseHvTableStickyTableHeadProps extends TableCommonProps {\n stickyHeader?: boolean;\n}\n\nexport type HvTableHeadPropGetter<D extends object> = PropGetter<\n D,\n UseHvTableStickyTableHeadProps\n>;\n\nexport type UseHvTableStickyTableOptions = {\n stickyHeader?: boolean;\n stickyColumns?: boolean;\n};\n\nexport interface UseHvTableStickyHooks<D extends object> {\n getTableHeadProps: Array<HvTableHeadPropGetter<D>>;\n}\n\nexport interface UseHvTableStickyTableInstance<D extends object> {\n getTableHeadProps: (\n propGetter?: HvTableHeadPropGetter<D>\n ) => UseHvTableStickyTableHeadProps;\n\n totalRight?: number;\n hasStickyColumns?: boolean;\n}\n\n// props target: <table>\nexport interface UseHvTableStickyTableProps {\n stickyHeader?: boolean;\n stickyColumns?: boolean;\n}\n\n// props target: <table><thead><tr><th>\nexport interface UseHvTableStickyColumnProps {\n stickyColumn?: boolean;\n stickyColumnMostLeft?: boolean;\n stickyColumnLeastRight?: boolean;\n}\n\n// props target: <table><tbody><tr><td>\nexport interface UseHvTableStickyCellProps {\n stickyColumn?: boolean;\n stickyColumnMostLeft?: boolean;\n stickyColumnLeastRight?: boolean;\n}\n\nexport type UseHvTableSticky = (<D extends object = Record<string, unknown>>(\n hooks: Hooks<D>\n) => void) & { pluginName: string };\n\n// #endregion ##### TYPES #####\n\nconst isSticky = (value) => /left|right/i.test(value);\n\nconst getStickyValue = ({ sticky, parent }) => {\n if (isSticky(sticky)) {\n return sticky;\n }\n\n if (parent != null) {\n // check if parent is sticky\n sticky = getStickyValue(parent);\n if (isSticky(sticky)) {\n return sticky;\n }\n\n const { columns } = parent;\n // check if any column in the same group is sticky\n if (columns?.length > 0) {\n sticky = columns?.find((col) => col.sticky != null)?.sticky;\n if (isSticky(sticky)) {\n return sticky;\n }\n }\n }\n\n return undefined;\n};\n\nconst updateColumnAndParent = (column, props) => {\n Object.assign(column, props);\n\n if (column.parent != null) {\n updateColumnAndParent(column.parent, props);\n }\n};\n\nconst visibleColumnsHook = (columns, { instance }) => {\n const toTheLeft: any[] = [];\n const toTheRight: any[] = [];\n const others: any[] = [];\n\n columns.forEach((column) => {\n const sticky = getStickyValue(column)?.toLowerCase();\n\n updateColumnAndParent(column, { sticky });\n\n if (sticky === \"left\") {\n toTheLeft.push(column);\n } else if (sticky === \"right\") {\n toTheRight.push(column);\n } else {\n others.push(column);\n }\n });\n\n if (others.length > 0) {\n const [firstNotSticky] = others;\n updateColumnAndParent(firstNotSticky, { isFirstNotSticky: true });\n\n const lastNotSticky = others[others.length - 1];\n updateColumnAndParent(lastNotSticky, { isLastNotSticky: true });\n }\n\n const hasLeftSticky = toTheLeft.length > 0;\n if (hasLeftSticky) {\n const lastLeftSticky = toTheLeft[toTheLeft.length - 1];\n\n updateColumnAndParent(lastLeftSticky, { isLastLeftSticky: true });\n }\n\n const hasRightSticky = toTheRight.length > 0;\n if (hasRightSticky) {\n const [firstRightSticky] = toTheRight;\n\n updateColumnAndParent(firstRightSticky, { isFirstRightSticky: true });\n }\n\n instance.hasStickyColumns = hasLeftSticky || hasRightSticky;\n\n return [...toTheLeft, ...others, ...toTheRight];\n};\n\nconst calculateHeaderWidthsToTheRight = (headers, right = 0) => {\n if (!headers?.length) {\n return;\n }\n\n for (let i = headers.length - 1; i !== -1; i -= 1) {\n const header = headers[i];\n\n header.totalRight = right;\n\n const { headers: subHeaders } = header;\n if (subHeaders?.length > 0) {\n calculateHeaderWidthsToTheRight(subHeaders, right);\n }\n\n if (header.isVisible) {\n right += header.totalWidth;\n }\n }\n};\n\nconst useInstanceHook = (instance) => {\n calculateHeaderWidthsToTheRight(instance.headers);\n\n const getInstance = useGetLatest(instance);\n instance.getTableHeadProps = makePropGetter(\n instance.getHooks().getTableHeadProps,\n {\n instance: getInstance(),\n }\n );\n};\n\nconst getRowProps = () => ({\n style: {\n display: \"flex\",\n flex: \"1 0 auto\",\n },\n});\n\nconst getCellProps = (header, isHeaderCell: boolean) => {\n const props: UseHvTableStickyCellProps & { style: CSSProperties } = {\n style: {\n display: \"inline-flex\",\n flex: `${header.totalWidth} ${header.totalMinWidth} auto`,\n alignItems: isHeaderCell ? \"start\" : \"center\",\n justifyContent: header.align,\n\n width: `${header.totalWidth}px`,\n minWidth: `${header.totalMinWidth}px`,\n ...(isHeaderCell && { backgroundColor: theme.colors.atmo2 }),\n },\n };\n\n if (header.sticky != null) {\n props.stickyColumn = true;\n\n const margin =\n header.sticky === \"left\" ? header.totalLeft : header.totalRight;\n\n props.style[header.sticky] = `${margin}px`;\n\n if (header.isLastLeftSticky) {\n props.stickyColumnMostLeft = true;\n }\n\n if (header.isFirstRightSticky) {\n props.stickyColumnLeastRight = true;\n }\n } else {\n if (header.isFirstNotSticky) {\n props.style.borderLeft = 0;\n }\n\n if (header.isLastNotSticky) {\n props.style.borderRight = 0;\n }\n }\n\n return props;\n};\n\n/*\n * STICKY POSITION MANAGEMENT\n * <thead>: sticky if stickyHeader: true\n * <tr>: never sticky\n * <th>: sticky only if that particular column is sticky (left or right)\n */\n\n/*\n * We need to hide the last non sticky column right border, to avoid issues with double borders.\n *\n * This could be done with css, using the `:has()` selector:\n * - \".not-sticky:has(+ .first-right-sticky)\": { border-right: 0 }\n *\n * Until the `:has()` selector is supported by modern browsers,\n * that at the moment is just a proposal https://developer.mozilla.org/en-US/docs/Web/CSS/:has,\n * we need to override the last not sticky column \"borderRight\" here.\n */\n\n// props target: <table>\nconst getTablePropsHook = (props, { instance }) => {\n const nextProps: UseHvTableStickyTableProps = {\n stickyHeader: instance.stickyHeader,\n stickyColumns: instance.hasStickyColumns,\n };\n\n return [props, nextProps];\n};\n\n// props target: <table><thead>\nexport const getTableHeadPropsHook = (props, { instance }) => {\n const nextProps = {\n stickyHeader: instance.stickyHeader,\n };\n\n return [props, nextProps];\n};\n\n// props target: <table><thead><tr>\nexport const getHeaderGroupPropsHook = (props, { instance }) => {\n const nextProps = instance.hasStickyColumns ? getRowProps() : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><thead><tr><th>\nconst getHeaderPropsHook = (props, { instance, column }) => {\n const nextProps = instance.hasStickyColumns ? getCellProps(column, true) : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><tbody><tr>\nconst getRowPropsHook = (props, { instance }) => {\n const nextProps = instance.hasStickyColumns ? getRowProps() : {};\n\n return [props, nextProps];\n};\n\n// props target: <table><tbody><tr><td>\nconst getCellPropsHook = (props, { instance, cell }) => {\n const nextProps: UseHvTableStickyCellProps = instance.hasStickyColumns\n ? getCellProps(cell.column, false)\n : {};\n\n return [props, nextProps];\n};\n\nconst useSticky: UseHvTableSticky = (hooks) => {\n hooks.visibleColumns.push(visibleColumnsHook);\n hooks.useInstance.push(useInstanceHook);\n\n // props target: <table>\n hooks.getTableProps.push(getTablePropsHook);\n // props target: <table><thead>\n hooks.getTableHeadProps = [getTableHeadPropsHook];\n // props target: <table><thead><tr>\n hooks.getHeaderGroupProps.push(getHeaderGroupPropsHook);\n // props target: <table><thead><tr><th>\n hooks.getHeaderProps.push(getHeaderPropsHook);\n // props target: <table><tbody><tr>\n hooks.getRowProps.push(getRowPropsHook);\n // props target: <table><tbody><tr><td>\n hooks.getCellProps.push(getCellPropsHook);\n};\n\nuseSticky.pluginName = \"useHvTableSticky\";\n\nexport default useSticky;\n"],"names":["isSticky","value","test","getStickyValue","sticky","parent","columns","length","find","col","undefined","updateColumnAndParent","column","props","assign","visibleColumnsHook","instance","toTheLeft","toTheRight","others","forEach","toLowerCase","push","firstNotSticky","isFirstNotSticky","lastNotSticky","isLastNotSticky","hasLeftSticky","lastLeftSticky","isLastLeftSticky","hasRightSticky","firstRightSticky","isFirstRightSticky","hasStickyColumns","calculateHeaderWidthsToTheRight","headers","right","i","header","totalRight","subHeaders","isVisible","totalWidth","useInstanceHook","getInstance","useGetLatest","getTableHeadProps","makePropGetter","getHooks","getRowProps","style","display","flex","getCellProps","isHeaderCell","totalMinWidth","alignItems","justifyContent","align","width","minWidth","backgroundColor","theme","colors","atmo2","stickyColumn","margin","totalLeft","stickyColumnMostLeft","stickyColumnLeastRight","borderLeft","borderRight","getTablePropsHook","nextProps","stickyHeader","stickyColumns","getTableHeadPropsHook","getHeaderGroupPropsHook","getHeaderPropsHook","getRowPropsHook","getCellPropsHook","cell","useSticky","hooks","visibleColumns","useInstance","getTableProps","getHeaderGroupProps","getHeaderProps","pluginName"],"mappings":";;AAiEA,MAAMA,WAAYC,CAAAA,UAAU,cAAcC,KAAKD,KAAK;AAEpD,MAAME,iBAAiBA,CAAC;AAAA,EAAEC;AAAAA,EAAQC;AAAO,MAAM;;AACzCL,MAAAA,SAASI,MAAM,GAAG;AACbA,WAAAA;AAAAA,EACT;AAEA,MAAIC,UAAU,MAAM;AAElBD,aAASD,eAAeE,MAAM;AAC1BL,QAAAA,SAASI,MAAM,GAAG;AACb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