@hh.ru/magritte-ui-table 3.3.0 → 4.0.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/StickyTableHeader.d.ts +2 -2
- package/StickyTableHeader.js +6 -10
- package/StickyTableHeader.js.map +1 -1
- package/Table.js +7 -11
- package/Table.js.map +1 -1
- package/TableBody.js +2 -2
- package/TableCell.js +2 -2
- package/TableHeader.js +7 -11
- package/TableHeader.js.map +1 -1
- package/TableRow.js +2 -2
- package/VirtualizedList/VirtualizedList.js +1 -1
- package/VirtualizedList/VirtualizedListWrapper.js +1 -1
- package/VirtualizedList/VirtualizedPanel.js +1 -1
- package/VirtualizedList/index.js +1 -1
- package/cell-Du4OaUIH.js +5 -0
- package/cell-Du4OaUIH.js.map +1 -0
- package/index.css +504 -525
- package/index.js +3 -3
- package/package.json +5 -5
- package/table-BwmsWxpv.js +5 -0
- package/table-BwmsWxpv.js.map +1 -0
- package/types.d.ts +3 -4
- package/virtualized-list-DYyCJjH2.js +5 -0
- package/virtualized-list-DYyCJjH2.js.map +1 -0
- package/cell-fV8YWoGv.js +0 -5
- package/cell-fV8YWoGv.js.map +0 -1
- package/table-DYvdA1T2.js +0 -5
- package/table-DYvdA1T2.js.map +0 -1
- package/virtualized-list-CyAQWlSA.js +0 -5
- package/virtualized-list-CyAQWlSA.js.map +0 -1
package/StickyTableHeader.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC, PropsWithChildren, RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenBaseStaticSpace } from '@hh.ru/magritte-design-tokens/types';
|
|
3
3
|
interface StickyTableHeaderProps extends PropsWithChildren {
|
|
4
4
|
root: HTMLDivElement;
|
|
5
5
|
headerRef: RefObject<HTMLTableSectionElement>;
|
|
6
6
|
divider?: boolean;
|
|
7
|
-
density:
|
|
7
|
+
density: TokenBaseStaticSpace;
|
|
8
8
|
}
|
|
9
9
|
export declare const StickyTableHeader: FC<StickyTableHeaderProps>;
|
|
10
10
|
export {};
|
package/StickyTableHeader.js
CHANGED
|
@@ -4,15 +4,9 @@ import { useRef, useContext, useCallback, useLayoutEffect } from 'react';
|
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { TableContext } from './context.js';
|
|
7
|
-
import { c as cellStyles } from './cell-
|
|
8
|
-
import { s as styles } from './table-
|
|
7
|
+
import { c as cellStyles } from './cell-Du4OaUIH.js';
|
|
8
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
9
9
|
|
|
10
|
-
const DENSITY_TO_CSS = {
|
|
11
|
-
'extra-small': styles.densityExtraSmall,
|
|
12
|
-
small: styles.densitySmall,
|
|
13
|
-
medium: styles.densityMedium,
|
|
14
|
-
large: styles.densityLarge,
|
|
15
|
-
};
|
|
16
10
|
const StickyTableHeader = ({ root, divider, density, headerRef, children }) => {
|
|
17
11
|
const ref = useRef(null);
|
|
18
12
|
const { fontLoaded: renderPortal, subscribeResizeHandler, unsubscribeResizeHandler } = useContext(TableContext);
|
|
@@ -40,9 +34,11 @@ const StickyTableHeader = ({ root, divider, density, headerRef, children }) => {
|
|
|
40
34
|
return void 0;
|
|
41
35
|
}, [root, renderPortal, calcWidth, subscribeResizeHandler, unsubscribeResizeHandler]);
|
|
42
36
|
return (jsx(Fragment, { children: renderPortal &&
|
|
43
|
-
createPortal(jsx("table", { ref: ref, className: classnames(styles.table, cellStyles.duplicateTable), children: jsx("thead", { className: classnames(styles.header,
|
|
37
|
+
createPortal(jsx("table", { ref: ref, className: classnames(styles.table, cellStyles.duplicateTable), children: jsx("thead", { className: classnames(styles.header, {
|
|
44
38
|
[styles.withDivider]: !!divider,
|
|
45
|
-
}),
|
|
39
|
+
}), style: {
|
|
40
|
+
'--magritte-table-row-gap': `${density}px 0`,
|
|
41
|
+
}, "data-qa": "table-sticky-header", children: children }) }), root) }));
|
|
46
42
|
};
|
|
47
43
|
|
|
48
44
|
export { StickyTableHeader };
|
package/StickyTableHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyTableHeader.js","sources":["src/StickyTableHeader.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"StickyTableHeader.js","sources":["src/StickyTableHeader.tsx"],"sourcesContent":["import {\n CSSProperties,\n FC,\n PropsWithChildren,\n RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport classnames from 'classnames';\n\nimport { TokenBaseStaticSpace } from '@hh.ru/magritte-design-tokens/types';\nimport { TableContext } from '@hh.ru/magritte-ui-table/context';\n\nimport cellStyles from './cell.less';\nimport styles from './table.less';\n\ninterface StickyTableHeaderProps extends PropsWithChildren {\n root: HTMLDivElement;\n headerRef: RefObject<HTMLTableSectionElement>;\n divider?: boolean;\n density: TokenBaseStaticSpace;\n}\n\nexport const StickyTableHeader: FC<StickyTableHeaderProps> = ({ root, divider, density, headerRef, children }) => {\n const ref = useRef<HTMLTableElement>(null);\n const { fontLoaded: renderPortal, subscribeResizeHandler, unsubscribeResizeHandler } = useContext(TableContext);\n\n const calcWidth = useCallback(() => {\n if (ref.current && root && headerRef.current) {\n const columnsHeader =\n headerRef.current.querySelectorAll<HTMLTableCellElement>('[data-magritte-table-cell]');\n const widths: number[] = [];\n [...columnsHeader].forEach((column, index) => {\n widths[index] = column.getBoundingClientRect().width;\n });\n const columns = ref.current.querySelectorAll<HTMLElement>('[data-magritte-table-cell]');\n [...columns].forEach((column, index) => {\n column.style.setProperty('width', `${widths[index]}px`);\n column.style.setProperty('max-width', `${widths[index]}px`);\n });\n root.style.setProperty('margin-bottom', `-${headerRef.current.getBoundingClientRect().height}px`);\n }\n }, [headerRef, root]);\n\n useLayoutEffect(() => {\n if (root && renderPortal) {\n calcWidth();\n subscribeResizeHandler?.(calcWidth, 1);\n\n return () => unsubscribeResizeHandler?.(calcWidth);\n }\n\n return void 0;\n }, [root, renderPortal, calcWidth, subscribeResizeHandler, unsubscribeResizeHandler]);\n\n return (\n <>\n {renderPortal &&\n createPortal(\n <table ref={ref} className={classnames(styles.table, cellStyles.duplicateTable)}>\n <thead\n className={classnames(styles.header, {\n [styles.withDivider]: !!divider,\n })}\n style={\n {\n '--magritte-table-row-gap': `${density}px 0`,\n } as CSSProperties\n }\n data-qa=\"table-sticky-header\"\n >\n {children}\n </thead>\n </table>,\n root\n )}\n </>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;;;AA0Ba,MAAA,iBAAiB,GAA+B,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAI;AAC7G,IAAA,MAAM,GAAG,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;AAC3C,IAAA,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAEhH,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,MAAK;QAC/B,IAAI,GAAG,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,EAAE;YAC1C,MAAM,aAAa,GACf,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAuB,4BAA4B,CAAC,CAAC;YAC3F,MAAM,MAAM,GAAa,EAAE,CAAC;YAC5B,CAAC,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,KAAI;gBACzC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;AACzD,aAAC,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAc,4BAA4B,CAAC,CAAC;YACxF,CAAC,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,KAAI;AACnC,gBAAA,MAAM,CAAC,KAA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9B,EAEd,SAAA,EAAA,qBAAqB,EAE5B,QAAA,EAAA,QAAQ,EACL,CAAA,EAAA,CACJ,EACR,IAAI,CACP,EACN,CAAA,EACL;AACN;;;;"}
|
package/Table.js
CHANGED
|
@@ -10,17 +10,11 @@ import { VirtualizedListWrapper } from './VirtualizedList/VirtualizedListWrapper
|
|
|
10
10
|
import { VirtualizedPanel } from './VirtualizedList/VirtualizedPanel.js';
|
|
11
11
|
import { TableContext } from './context.js';
|
|
12
12
|
import { useTableResize } from './useTableResize.js';
|
|
13
|
-
import { c as cellStyles } from './cell-
|
|
14
|
-
import { s as styles } from './table-
|
|
13
|
+
import { c as cellStyles } from './cell-Du4OaUIH.js';
|
|
14
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
15
15
|
import './VirtualizedList/context.js';
|
|
16
|
-
import './virtualized-list-
|
|
16
|
+
import './virtualized-list-DYyCJjH2.js';
|
|
17
17
|
|
|
18
|
-
const DENSITY_TO_CSS = {
|
|
19
|
-
'extra-small': styles.densityExtraSmall,
|
|
20
|
-
small: styles.densitySmall,
|
|
21
|
-
medium: styles.densityMedium,
|
|
22
|
-
large: styles.densityLarge,
|
|
23
|
-
};
|
|
24
18
|
const measureElement = (element) => {
|
|
25
19
|
let rowHeight = element?.getBoundingClientRect().height;
|
|
26
20
|
const siblingElement = element.nextElementSibling;
|
|
@@ -29,7 +23,7 @@ const measureElement = (element) => {
|
|
|
29
23
|
}
|
|
30
24
|
return rowHeight;
|
|
31
25
|
};
|
|
32
|
-
const Table = ({ density =
|
|
26
|
+
const Table = ({ density = 16, topPanel: _topPanel, bottomPanel: _bottomPanel, fixedSize, stickyBottom, stickyHeader, divider, dividerTop, dividerBottom, tinted, style = 'primary', styleHighlighted, tintedStyle = 'secondary', tintedStyleHighlighted, topStyle, bottomStyle, padding, paddingLeft: _paddingLeft, paddingRight: _paddingRight, cellsGap, onScrollHorizontal, virtualized = true, 'data-qa': dataQa = 'table-wrapper', children, }) => {
|
|
33
27
|
const wrapperRef = useRef(null);
|
|
34
28
|
const contentRef = useRef(null);
|
|
35
29
|
const tableRef = useRef(null);
|
|
@@ -157,7 +151,7 @@ const Table = ({ density = 'small', topPanel: _topPanel, bottomPanel: _bottomPan
|
|
|
157
151
|
const bottomPanel = (jsxs(Fragment, { children: [(!_bottomPanel || !stickyBottom) && (jsxs(VirtualizedPanel, { stickyBottom: true, children: [jsx("div", { className: styles.scrollContainer, onScroll: handleScrollContainerScroll, ref: scrollContainerRefCallback, children: jsx("div", { className: styles.scrollContent, ref: scrollContentRefCallback }) }), hasHorizontalScroll && (jsx(Scrollbar, { className: styles.horizontalScrollbar, ...horizontalScrollbarProps }))] })), _bottomPanel && (jsxs(VirtualizedPanel, { stickyBottom: stickyBottom, style: bottomColor, children: [stickyBottom && (jsxs(Fragment, { children: [jsx("div", { className: styles.scrollContainer, onScroll: handleScrollContainerScroll, ref: scrollContainerRefCallback, children: jsx("div", { className: styles.scrollContent, ref: scrollContentRefCallback }) }), hasHorizontalScroll && (jsx(Scrollbar, { className: styles.horizontalScrollbar, ...horizontalScrollbarProps }))] })), jsx("div", { className: classnames(styles.bottomPanel, {
|
|
158
152
|
[styles.withDivider]: bottomWithDivider,
|
|
159
153
|
}), "data-qa": "table-bottom-panel", style: { paddingLeft, paddingRight }, children: _bottomPanel })] }))] }));
|
|
160
|
-
return (jsx("div", { className: classnames(styles.wrapper,
|
|
154
|
+
return (jsx("div", { className: classnames(styles.wrapper, {
|
|
161
155
|
[styles[`style-${style}`]]: style,
|
|
162
156
|
[styles[`style-highlighted-${highlightedColor}`]]: highlightedColor,
|
|
163
157
|
[styles[`tinted-style-${tintedStyle}`]]: tinted && tintedStyle,
|
|
@@ -165,6 +159,8 @@ const Table = ({ density = 'small', topPanel: _topPanel, bottomPanel: _bottomPan
|
|
|
165
159
|
}), "data-qa": dataQa, style: {
|
|
166
160
|
'--magritte-table-padding-left': `${paddingLeft ?? 0}px`,
|
|
167
161
|
'--magritte-table-padding-right': `${paddingRight ?? 0}px`,
|
|
162
|
+
'--magritte-table-row-gap': `${density}px 0`,
|
|
163
|
+
'--magritte-table-row-panel-gap': `0 0 ${density}px`,
|
|
168
164
|
...(cellsGap ? { '--magritte-table-cell-padding': `${cellsGap / 2}px` } : {}),
|
|
169
165
|
}, children: jsx(VirtualizedListWrapper, { fixedSize: fixedSize, virtualized: virtualized, topPanel: topPanel, bottomPanel: bottomPanel, ref: wrapperRef, measureElement: measureElement, children: jsx(TableContext.Provider, { value: value, children: jsx("div", { ref: contentRef, className: classnames(styles.container), onScroll: handleScrollContent, "data-qa": 'table-container', children: jsx("table", { className: classnames(styles.table, {
|
|
170
166
|
[styles.divider]: !!divider,
|
package/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["src/Table.tsx"],"sourcesContent":["import { FC, RefCallback, useCallback, useLayoutEffect, useMemo, useRef, useState, CSSProperties } from 'react';\nimport classnames from 'classnames';\n\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useWhenFontLoaded } from '@hh.ru/magritte-common-use-when-font-loaded';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { VirtualizedListWrapper } from '@hh.ru/magritte-ui-table/VirtualizedList/VirtualizedListWrapper';\nimport { VirtualizedPanel } from '@hh.ru/magritte-ui-table/VirtualizedList/VirtualizedPanel';\nimport { TableContext } from '@hh.ru/magritte-ui-table/context';\nimport { TableProps } from '@hh.ru/magritte-ui-table/types';\nimport { useTableResize } from '@hh.ru/magritte-ui-table/useTableResize';\n\nimport cellStyles from './cell.less';\nimport styles from './table.less';\n\nconst DENSITY_TO_CSS = {\n 'extra-small': styles.densityExtraSmall,\n small: styles.densitySmall,\n medium: styles.densityMedium,\n large: styles.densityLarge,\n};\n\nconst measureElement = (element: Element) => {\n let rowHeight = element?.getBoundingClientRect().height;\n const siblingElement = element.nextElementSibling;\n if (siblingElement && siblingElement.hasAttribute('data-magritte-table-row-panel')) {\n rowHeight += siblingElement.getBoundingClientRect().height;\n }\n return rowHeight;\n};\n\nexport const Table: FC<TableProps> = ({\n density = 'small',\n topPanel: _topPanel,\n bottomPanel: _bottomPanel,\n fixedSize,\n stickyBottom,\n stickyHeader,\n divider,\n dividerTop,\n dividerBottom,\n tinted,\n style = 'primary',\n styleHighlighted,\n tintedStyle = 'secondary',\n tintedStyleHighlighted,\n topStyle,\n bottomStyle,\n padding,\n paddingLeft: _paddingLeft,\n paddingRight: _paddingRight,\n cellsGap,\n onScrollHorizontal,\n virtualized = true,\n 'data-qa': dataQa = 'table-wrapper',\n children,\n}) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const tableRef = useRef<HTMLTableElement>(null);\n const headerRef = useRef<HTMLDivElement | null>(null);\n const scrollbarContainerRef = useRef<HTMLDivElement | null>(null);\n const scrollbarRef = useRef<HTMLDivElement | null>(null);\n const [headerNode, setHeaderNode] = useState<HTMLDivElement | null>(null);\n const topWithDivider = dividerTop ?? !!divider;\n const bottomWithDivider = dividerBottom ?? !!divider;\n const paddingLeft = _paddingLeft ?? padding;\n const paddingRight = _paddingRight ?? padding;\n const highlightedColor = styleHighlighted || style;\n const tintedHighlightedColor = tintedStyleHighlighted || tintedStyle;\n const topColor = topStyle || style;\n const bottomColor = bottomStyle || style;\n const [fontLoaded, setFontLoaded] = useState(false);\n const { isMobile } = useBreakpoint();\n useWhenFontLoaded(() => setFontLoaded(true));\n const { subscribeResizeHandler, unsubscribeResizeHandler } = useTableResize({\n tableRef,\n wrapperRef,\n fontLoaded,\n });\n\n const value = useMemo(\n () => ({\n headerNode,\n stickyHeader,\n paddingLeft,\n paddingRight,\n fixedSize,\n fontLoaded,\n virtualized,\n divider: !!divider,\n subscribeResizeHandler,\n unsubscribeResizeHandler,\n }),\n [\n headerNode,\n stickyHeader,\n paddingLeft,\n paddingRight,\n fixedSize,\n fontLoaded,\n divider,\n virtualized,\n subscribeResizeHandler,\n unsubscribeResizeHandler,\n ]\n );\n\n const setScrollStyles = useCallback(() => {\n if (wrapperRef.current && contentRef.current) {\n wrapperRef.current.classList.toggle(cellStyles.hasScrollLeft, contentRef.current.scrollLeft > 0);\n wrapperRef.current.classList.toggle(\n cellStyles.hasScrollRight,\n Math.round(contentRef.current.scrollLeft) + contentRef.current.offsetWidth + (paddingRight ?? 0) <\n contentRef.current.scrollWidth\n );\n }\n }, [paddingRight]);\n\n const setFakeScrollbar = useCallback(() => {\n if (scrollbarRef.current && tableRef.current && contentRef.current && scrollbarContainerRef.current) {\n if (contentRef.current.scrollWidth > contentRef.current.offsetWidth) {\n scrollbarRef.current.style.setProperty('width', `${tableRef.current.getBoundingClientRect().width}px`);\n scrollbarContainerRef.current.style.setProperty('display', 'block');\n } else {\n scrollbarRef.current.style.setProperty('width', 'auto');\n scrollbarContainerRef.current.style.setProperty('display', 'none');\n }\n }\n }, []);\n\n const calcDividersAndScrollbar = useCallback(() => {\n setScrollStyles();\n setFakeScrollbar();\n }, [setScrollStyles, setFakeScrollbar]);\n\n const handleScrollContent = useCallback(() => {\n if (headerRef.current) {\n headerRef.current.scrollLeft = contentRef.current?.scrollLeft || 0;\n }\n if (scrollbarContainerRef.current) {\n scrollbarContainerRef.current.scrollLeft = contentRef.current?.scrollLeft || 0;\n }\n setScrollStyles();\n onScrollHorizontal?.();\n }, [setScrollStyles, onScrollHorizontal]);\n\n const handleHeaderScroll = useCallback(() => {\n if (contentRef.current) {\n contentRef.current.scrollLeft = headerRef.current?.scrollLeft || 0;\n }\n if (scrollbarContainerRef.current) {\n scrollbarContainerRef.current.scrollLeft = headerRef.current?.scrollLeft || 0;\n }\n }, []);\n\n const handleScrollContainerScroll = useCallback(() => {\n if (contentRef.current) {\n contentRef.current.scrollLeft = scrollbarContainerRef.current?.scrollLeft || 0;\n }\n\n if (headerRef.current) {\n headerRef.current.scrollLeft = scrollbarContainerRef.current?.scrollLeft || 0;\n }\n }, []);\n\n const headerRefCallback: RefCallback<HTMLDivElement> = useCallback((node) => {\n if (node) {\n setHeaderNode(node);\n headerRef.current = node;\n } else {\n headerRef.current = null;\n }\n }, []);\n\n useLayoutEffect(() => {\n if (!isMobile) {\n calcDividersAndScrollbar();\n subscribeResizeHandler?.(calcDividersAndScrollbar);\n\n return () => unsubscribeResizeHandler?.(calcDividersAndScrollbar);\n }\n return void 0;\n }, [calcDividersAndScrollbar, isMobile, subscribeResizeHandler, unsubscribeResizeHandler]);\n\n const { hasHorizontalScroll, horizontalScrollbarProps, ...hScrollbar } = useScrollbar({\n axis: 'horizontal',\n offsetRight: fixedSize ? 8 : undefined,\n });\n const scrollContainerRefCallback = useMultipleRefs(scrollbarContainerRef, hScrollbar.scrollContainerRef);\n const scrollContentRefCallback = useMultipleRefs(scrollbarRef, hScrollbar.contentWrapperRef);\n\n if (isMobile) {\n return null;\n }\n\n const topPanel =\n _topPanel || stickyHeader ? (\n <VirtualizedPanel stickyTop={stickyHeader} style={topColor}>\n {_topPanel && (\n <div\n className={classnames(styles.topPanel, {\n [styles.withDivider]: topWithDivider,\n })}\n data-qa=\"table-top-panel\"\n style={{ paddingLeft, paddingRight }}\n >\n {_topPanel}\n </div>\n )}\n {stickyHeader && (\n <div\n ref={headerRefCallback}\n onScroll={handleHeaderScroll}\n data-qa=\"table-sticky-header-root\"\n className={classnames(styles.headerContainer)}\n />\n )}\n </VirtualizedPanel>\n ) : null;\n\n const bottomPanel = (\n <>\n {(!_bottomPanel || !stickyBottom) && (\n <VirtualizedPanel stickyBottom>\n <div\n className={styles.scrollContainer}\n onScroll={handleScrollContainerScroll}\n ref={scrollContainerRefCallback}\n >\n <div className={styles.scrollContent} ref={scrollContentRefCallback}></div>\n </div>\n {hasHorizontalScroll && (\n <Scrollbar className={styles.horizontalScrollbar} {...horizontalScrollbarProps} />\n )}\n </VirtualizedPanel>\n )}\n {_bottomPanel && (\n <VirtualizedPanel stickyBottom={stickyBottom} style={bottomColor}>\n {stickyBottom && (\n <>\n <div\n className={styles.scrollContainer}\n onScroll={handleScrollContainerScroll}\n ref={scrollContainerRefCallback}\n >\n <div className={styles.scrollContent} ref={scrollContentRefCallback}></div>\n </div>\n {hasHorizontalScroll && (\n <Scrollbar className={styles.horizontalScrollbar} {...horizontalScrollbarProps} />\n )}\n </>\n )}\n <div\n className={classnames(styles.bottomPanel, {\n [styles.withDivider]: bottomWithDivider,\n })}\n data-qa=\"table-bottom-panel\"\n style={{ paddingLeft, paddingRight }}\n >\n {_bottomPanel}\n </div>\n </VirtualizedPanel>\n )}\n </>\n );\n return (\n <div\n className={classnames(styles.wrapper, DENSITY_TO_CSS[density], {\n [styles[`style-${style}`]]: style,\n [styles[`style-highlighted-${highlightedColor}`]]: highlightedColor,\n [styles[`tinted-style-${tintedStyle}`]]: tinted && tintedStyle,\n [styles[`tinted-style-highlighted-${tintedHighlightedColor}`]]: tinted && tintedHighlightedColor,\n })}\n data-qa={dataQa}\n style={\n {\n '--magritte-table-padding-left': `${paddingLeft ?? 0}px`,\n '--magritte-table-padding-right': `${paddingRight ?? 0}px`,\n ...(cellsGap ? { '--magritte-table-cell-padding': `${cellsGap / 2}px` } : {}),\n } as CSSProperties\n }\n >\n <VirtualizedListWrapper\n fixedSize={fixedSize}\n virtualized={virtualized}\n topPanel={topPanel}\n bottomPanel={bottomPanel}\n ref={wrapperRef}\n measureElement={measureElement}\n >\n <TableContext.Provider value={value}>\n <div\n ref={contentRef}\n className={classnames(styles.container)}\n onScroll={handleScrollContent}\n data-qa={'table-container'}\n >\n <table\n className={classnames(styles.table, {\n [styles.divider]: !!divider,\n })}\n data-qa=\"table\"\n ref={tableRef}\n >\n {children}\n </table>\n </div>\n </TableContext.Provider>\n </VirtualizedListWrapper>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,cAAc,GAAG;IACnB,aAAa,EAAE,MAAM,CAAC,iBAAiB;IACvC,KAAK,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
+
{"version":3,"file":"Table.js","sources":["src/Table.tsx"],"sourcesContent":["import { FC, RefCallback, useCallback, useLayoutEffect, useMemo, useRef, useState, CSSProperties } from 'react';\nimport classnames from 'classnames';\n\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { useWhenFontLoaded } from '@hh.ru/magritte-common-use-when-font-loaded';\nimport { useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';\nimport { Scrollbar, useScrollbar } from '@hh.ru/magritte-ui-scrollbar';\nimport { VirtualizedListWrapper } from '@hh.ru/magritte-ui-table/VirtualizedList/VirtualizedListWrapper';\nimport { VirtualizedPanel } from '@hh.ru/magritte-ui-table/VirtualizedList/VirtualizedPanel';\nimport { TableContext } from '@hh.ru/magritte-ui-table/context';\nimport { TableProps } from '@hh.ru/magritte-ui-table/types';\nimport { useTableResize } from '@hh.ru/magritte-ui-table/useTableResize';\n\nimport cellStyles from './cell.less';\nimport styles from './table.less';\n\nconst measureElement = (element: Element) => {\n let rowHeight = element?.getBoundingClientRect().height;\n const siblingElement = element.nextElementSibling;\n if (siblingElement && siblingElement.hasAttribute('data-magritte-table-row-panel')) {\n rowHeight += siblingElement.getBoundingClientRect().height;\n }\n return rowHeight;\n};\n\nexport const Table: FC<TableProps> = ({\n density = 16,\n topPanel: _topPanel,\n bottomPanel: _bottomPanel,\n fixedSize,\n stickyBottom,\n stickyHeader,\n divider,\n dividerTop,\n dividerBottom,\n tinted,\n style = 'primary',\n styleHighlighted,\n tintedStyle = 'secondary',\n tintedStyleHighlighted,\n topStyle,\n bottomStyle,\n padding,\n paddingLeft: _paddingLeft,\n paddingRight: _paddingRight,\n cellsGap,\n onScrollHorizontal,\n virtualized = true,\n 'data-qa': dataQa = 'table-wrapper',\n children,\n}) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const tableRef = useRef<HTMLTableElement>(null);\n const headerRef = useRef<HTMLDivElement | null>(null);\n const scrollbarContainerRef = useRef<HTMLDivElement | null>(null);\n const scrollbarRef = useRef<HTMLDivElement | null>(null);\n const [headerNode, setHeaderNode] = useState<HTMLDivElement | null>(null);\n const topWithDivider = dividerTop ?? !!divider;\n const bottomWithDivider = dividerBottom ?? !!divider;\n const paddingLeft = _paddingLeft ?? padding;\n const paddingRight = _paddingRight ?? padding;\n const highlightedColor = styleHighlighted || style;\n const tintedHighlightedColor = tintedStyleHighlighted || tintedStyle;\n const topColor = topStyle || style;\n const bottomColor = bottomStyle || style;\n const [fontLoaded, setFontLoaded] = useState(false);\n const { isMobile } = useBreakpoint();\n useWhenFontLoaded(() => setFontLoaded(true));\n const { subscribeResizeHandler, unsubscribeResizeHandler } = useTableResize({\n tableRef,\n wrapperRef,\n fontLoaded,\n });\n\n const value = useMemo(\n () => ({\n headerNode,\n stickyHeader,\n paddingLeft,\n paddingRight,\n fixedSize,\n fontLoaded,\n virtualized,\n divider: !!divider,\n subscribeResizeHandler,\n unsubscribeResizeHandler,\n }),\n [\n headerNode,\n stickyHeader,\n paddingLeft,\n paddingRight,\n fixedSize,\n fontLoaded,\n divider,\n virtualized,\n subscribeResizeHandler,\n unsubscribeResizeHandler,\n ]\n );\n\n const setScrollStyles = useCallback(() => {\n if (wrapperRef.current && contentRef.current) {\n wrapperRef.current.classList.toggle(cellStyles.hasScrollLeft, contentRef.current.scrollLeft > 0);\n wrapperRef.current.classList.toggle(\n cellStyles.hasScrollRight,\n Math.round(contentRef.current.scrollLeft) + contentRef.current.offsetWidth + (paddingRight ?? 0) <\n contentRef.current.scrollWidth\n );\n }\n }, [paddingRight]);\n\n const setFakeScrollbar = useCallback(() => {\n if (scrollbarRef.current && tableRef.current && contentRef.current && scrollbarContainerRef.current) {\n if (contentRef.current.scrollWidth > contentRef.current.offsetWidth) {\n scrollbarRef.current.style.setProperty('width', `${tableRef.current.getBoundingClientRect().width}px`);\n scrollbarContainerRef.current.style.setProperty('display', 'block');\n } else {\n scrollbarRef.current.style.setProperty('width', 'auto');\n scrollbarContainerRef.current.style.setProperty('display', 'none');\n }\n }\n }, []);\n\n const calcDividersAndScrollbar = useCallback(() => {\n setScrollStyles();\n setFakeScrollbar();\n }, [setScrollStyles, setFakeScrollbar]);\n\n const handleScrollContent = useCallback(() => {\n if (headerRef.current) {\n headerRef.current.scrollLeft = contentRef.current?.scrollLeft || 0;\n }\n if (scrollbarContainerRef.current) {\n scrollbarContainerRef.current.scrollLeft = contentRef.current?.scrollLeft || 0;\n }\n setScrollStyles();\n onScrollHorizontal?.();\n }, [setScrollStyles, onScrollHorizontal]);\n\n const handleHeaderScroll = useCallback(() => {\n if (contentRef.current) {\n contentRef.current.scrollLeft = headerRef.current?.scrollLeft || 0;\n }\n if (scrollbarContainerRef.current) {\n scrollbarContainerRef.current.scrollLeft = headerRef.current?.scrollLeft || 0;\n }\n }, []);\n\n const handleScrollContainerScroll = useCallback(() => {\n if (contentRef.current) {\n contentRef.current.scrollLeft = scrollbarContainerRef.current?.scrollLeft || 0;\n }\n\n if (headerRef.current) {\n headerRef.current.scrollLeft = scrollbarContainerRef.current?.scrollLeft || 0;\n }\n }, []);\n\n const headerRefCallback: RefCallback<HTMLDivElement> = useCallback((node) => {\n if (node) {\n setHeaderNode(node);\n headerRef.current = node;\n } else {\n headerRef.current = null;\n }\n }, []);\n\n useLayoutEffect(() => {\n if (!isMobile) {\n calcDividersAndScrollbar();\n subscribeResizeHandler?.(calcDividersAndScrollbar);\n\n return () => unsubscribeResizeHandler?.(calcDividersAndScrollbar);\n }\n return void 0;\n }, [calcDividersAndScrollbar, isMobile, subscribeResizeHandler, unsubscribeResizeHandler]);\n\n const { hasHorizontalScroll, horizontalScrollbarProps, ...hScrollbar } = useScrollbar({\n axis: 'horizontal',\n offsetRight: fixedSize ? 8 : undefined,\n });\n const scrollContainerRefCallback = useMultipleRefs(scrollbarContainerRef, hScrollbar.scrollContainerRef);\n const scrollContentRefCallback = useMultipleRefs(scrollbarRef, hScrollbar.contentWrapperRef);\n\n if (isMobile) {\n return null;\n }\n\n const topPanel =\n _topPanel || stickyHeader ? (\n <VirtualizedPanel stickyTop={stickyHeader} style={topColor}>\n {_topPanel && (\n <div\n className={classnames(styles.topPanel, {\n [styles.withDivider]: topWithDivider,\n })}\n data-qa=\"table-top-panel\"\n style={{ paddingLeft, paddingRight }}\n >\n {_topPanel}\n </div>\n )}\n {stickyHeader && (\n <div\n ref={headerRefCallback}\n onScroll={handleHeaderScroll}\n data-qa=\"table-sticky-header-root\"\n className={classnames(styles.headerContainer)}\n />\n )}\n </VirtualizedPanel>\n ) : null;\n\n const bottomPanel = (\n <>\n {(!_bottomPanel || !stickyBottom) && (\n <VirtualizedPanel stickyBottom>\n <div\n className={styles.scrollContainer}\n onScroll={handleScrollContainerScroll}\n ref={scrollContainerRefCallback}\n >\n <div className={styles.scrollContent} ref={scrollContentRefCallback}></div>\n </div>\n {hasHorizontalScroll && (\n <Scrollbar className={styles.horizontalScrollbar} {...horizontalScrollbarProps} />\n )}\n </VirtualizedPanel>\n )}\n {_bottomPanel && (\n <VirtualizedPanel stickyBottom={stickyBottom} style={bottomColor}>\n {stickyBottom && (\n <>\n <div\n className={styles.scrollContainer}\n onScroll={handleScrollContainerScroll}\n ref={scrollContainerRefCallback}\n >\n <div className={styles.scrollContent} ref={scrollContentRefCallback}></div>\n </div>\n {hasHorizontalScroll && (\n <Scrollbar className={styles.horizontalScrollbar} {...horizontalScrollbarProps} />\n )}\n </>\n )}\n <div\n className={classnames(styles.bottomPanel, {\n [styles.withDivider]: bottomWithDivider,\n })}\n data-qa=\"table-bottom-panel\"\n style={{ paddingLeft, paddingRight }}\n >\n {_bottomPanel}\n </div>\n </VirtualizedPanel>\n )}\n </>\n );\n return (\n <div\n className={classnames(styles.wrapper, {\n [styles[`style-${style}`]]: style,\n [styles[`style-highlighted-${highlightedColor}`]]: highlightedColor,\n [styles[`tinted-style-${tintedStyle}`]]: tinted && tintedStyle,\n [styles[`tinted-style-highlighted-${tintedHighlightedColor}`]]: tinted && tintedHighlightedColor,\n })}\n data-qa={dataQa}\n style={\n {\n '--magritte-table-padding-left': `${paddingLeft ?? 0}px`,\n '--magritte-table-padding-right': `${paddingRight ?? 0}px`,\n '--magritte-table-row-gap': `${density}px 0`,\n '--magritte-table-row-panel-gap': `0 0 ${density}px`,\n ...(cellsGap ? { '--magritte-table-cell-padding': `${cellsGap / 2}px` } : {}),\n } as CSSProperties\n }\n >\n <VirtualizedListWrapper\n fixedSize={fixedSize}\n virtualized={virtualized}\n topPanel={topPanel}\n bottomPanel={bottomPanel}\n ref={wrapperRef}\n measureElement={measureElement}\n >\n <TableContext.Provider value={value}>\n <div\n ref={contentRef}\n className={classnames(styles.container)}\n onScroll={handleScrollContent}\n data-qa={'table-container'}\n >\n <table\n className={classnames(styles.table, {\n [styles.divider]: !!divider,\n })}\n data-qa=\"table\"\n ref={tableRef}\n >\n {children}\n </table>\n </div>\n </TableContext.Provider>\n </VirtualizedListWrapper>\n </div>\n );\n};\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,cAAc,GAAG,CAAC,OAAgB,KAAI;IACxC,IAAI,SAAS,GAAG,OAAO,EAAE,qBAAqB,EAAE,CAAC,MAAM,CAAC;AACxD,IAAA,MAAM,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAClD,IAAI,cAAc,IAAI,cAAc,CAAC,YAAY,CAAC,+BAA+B,CAAC,EAAE;AAChF,QAAA,SAAS,IAAI,cAAc,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;KAC9D;AACD,IAAA,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEK,MAAM,KAAK,GAAmB,CAAC,EAClC,OAAO,GAAG,EAAE,EACZ,QAAQ,EAAE,SAAS,EACnB,WAAW,EAAE,YAAY,EACzB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,UAAU,EACV,aAAa,EACb,MAAM,EACN,KAAK,GAAG,SAAS,EACjB,gBAAgB,EAChB,WAAW,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A,QAAA,EAE9BA,GAAC,CAAA,YAAY,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,KAAK,EAAA,QAAA,EAC/BA,GACI,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EACvC,QAAQ,EAAE,mBAAmB,EACpB,SAAA,EAAA,iBAAiB,EAE1B,QAAA,EAAAA,GAAA,CAAA,OAAA,EAAA,EACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE;AAChC,4BAAA,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;AAC9B,yBAAA,CAAC,EACM,SAAA,EAAA,OAAO,EACf,GAAG,EAAE,QAAQ,EAAA,QAAA,EAEZ,QAAQ,EAAA,CACL,EACN,CAAA,EAAA,CACc,EACH,CAAA,EAAA,CACvB,EACR;AACN;;;;"}
|
package/TableBody.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { VirtualizedList } from './VirtualizedList/VirtualizedList.js';
|
|
4
|
-
import { s as styles } from './table-
|
|
4
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import './VirtualizedList/context.js';
|
|
8
8
|
import './VirtualizedList/useVirtualizedList.js';
|
|
9
9
|
import '@tanstack/react-virtual';
|
|
10
|
-
import './virtualized-list-
|
|
10
|
+
import './virtualized-list-DYyCJjH2.js';
|
|
11
11
|
|
|
12
12
|
const TableBody = ({ 'data-qa': dataQa = 'table-body', children, }) => {
|
|
13
13
|
return (jsx(VirtualizedList, { className: styles.body, "data-qa": dataQa, Element: 'tbody', ElementItem: 'tr', children: children }));
|
package/TableCell.js
CHANGED
|
@@ -5,8 +5,8 @@ import classnames from 'classnames';
|
|
|
5
5
|
import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
|
|
6
6
|
import { useLayoutContext } from '@hh.ru/magritte-ui-grid/layoutContext';
|
|
7
7
|
import { TableContext } from './context.js';
|
|
8
|
-
import { c as cellStyles } from './cell-
|
|
9
|
-
import { s as styles } from './table-
|
|
8
|
+
import { c as cellStyles } from './cell-Du4OaUIH.js';
|
|
9
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
10
10
|
|
|
11
11
|
const TableCellComponent = ({ Element = 'td', m, l, xl, xxl, width, children, stickyLeft, stickyRight, align, verticalAlign, 'data-qa': dataQa = 'table-cell', ...rest }, ref) => {
|
|
12
12
|
const cellRef = useRef(null);
|
package/TableHeader.js
CHANGED
|
@@ -4,23 +4,19 @@ import { useRef, useContext } from 'react';
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { StickyTableHeader } from './StickyTableHeader.js';
|
|
6
6
|
import { TableContext } from './context.js';
|
|
7
|
-
import { s as styles } from './table-
|
|
7
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
8
8
|
import 'react-dom';
|
|
9
|
-
import './cell-
|
|
9
|
+
import './cell-Du4OaUIH.js';
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
'extra-small': styles.densityExtraSmall,
|
|
13
|
-
small: styles.densitySmall,
|
|
14
|
-
medium: styles.densityMedium,
|
|
15
|
-
large: styles.densityLarge,
|
|
16
|
-
};
|
|
17
|
-
const TableHeader = ({ divider, density = 'small', 'data-qa': dataQa = 'table-header', children, }) => {
|
|
11
|
+
const TableHeader = ({ divider, density = 16, 'data-qa': dataQa = 'table-header', children, }) => {
|
|
18
12
|
const theadRef = useRef(null);
|
|
19
13
|
const tableContext = useContext(TableContext);
|
|
20
14
|
const withDivider = divider ?? tableContext.divider;
|
|
21
|
-
return (jsxs(Fragment, { children: [jsx("thead", { ref: theadRef, className: classnames(styles.header,
|
|
15
|
+
return (jsxs(Fragment, { children: [jsx("thead", { ref: theadRef, className: classnames(styles.header, {
|
|
22
16
|
[styles.withDivider]: !!withDivider,
|
|
23
|
-
}), "data-qa": dataQa,
|
|
17
|
+
}), "data-qa": dataQa, style: {
|
|
18
|
+
'--magritte-table-row-gap': `${density}px 0`,
|
|
19
|
+
}, children: children }), tableContext.stickyHeader && tableContext.headerNode && (jsx(StickyTableHeader, { root: tableContext.headerNode, headerRef: theadRef, divider: withDivider, density: density, children: children }))] }));
|
|
24
20
|
};
|
|
25
21
|
|
|
26
22
|
export { TableHeader };
|
package/TableHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.js","sources":["src/TableHeader.tsx"],"sourcesContent":["import { FC, useContext, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { StickyTableHeader } from '@hh.ru/magritte-ui-table/StickyTableHeader';\nimport { TableContext } from '@hh.ru/magritte-ui-table/context';\nimport { TableHeaderProps } from '@hh.ru/magritte-ui-table/types';\n\nimport styles from './table.less';\n\
|
|
1
|
+
{"version":3,"file":"TableHeader.js","sources":["src/TableHeader.tsx"],"sourcesContent":["import { CSSProperties, FC, useContext, useRef } from 'react';\nimport classnames from 'classnames';\n\nimport { StickyTableHeader } from '@hh.ru/magritte-ui-table/StickyTableHeader';\nimport { TableContext } from '@hh.ru/magritte-ui-table/context';\nimport { TableHeaderProps } from '@hh.ru/magritte-ui-table/types';\n\nimport styles from './table.less';\n\nexport const TableHeader: FC<TableHeaderProps> = ({\n divider,\n density = 16,\n 'data-qa': dataQa = 'table-header',\n children,\n}) => {\n const theadRef = useRef<HTMLTableSectionElement>(null);\n const tableContext = useContext(TableContext);\n const withDivider = divider ?? tableContext.divider;\n\n return (\n <>\n <thead\n ref={theadRef}\n className={classnames(styles.header, {\n [styles.withDivider]: !!withDivider,\n })}\n data-qa={dataQa}\n style={\n {\n '--magritte-table-row-gap': `${density}px 0`,\n } as CSSProperties\n }\n >\n {children}\n </thead>\n {tableContext.stickyHeader && tableContext.headerNode && (\n <StickyTableHeader\n root={tableContext.headerNode}\n headerRef={theadRef}\n divider={withDivider}\n density={density}\n >\n {children}\n </StickyTableHeader>\n )}\n </>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;MASa,WAAW,GAAyB,CAAC,EAC9C,OAAO,EACP,OAAO,GAAG,EAAE,EACZ,SAAS,EAAE,MAAM,GAAG,cAAc,EAClC,QAAQ,GACX,KAAI;AACD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;AACvD,IAAA,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAC9C,IAAA,MAAM,WAAW,GAAG,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC;AAEpD,IAAA,QACIA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GACI,CAAA,OAAA,EAAA,EAAA,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,oBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW;AACtC,iBAAA,CAAC,EACO,SAAA,EAAA,MAAM,EACf,KAAK,EACD;oBACI,0BAA0B,EAAE,CAAG,EAAA,OAAO,CAAM,IAAA,CAAA;AAC9B,iBAAA,EAAA,QAAA,EAGrB,QAAQ,EACL,CAAA,EACP,YAAY,CAAC,YAAY,IAAI,YAAY,CAAC,UAAU,KACjDA,GAAA,CAAC,iBAAiB,EACd,EAAA,IAAI,EAAE,YAAY,CAAC,UAAU,EAC7B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAEf,QAAA,EAAA,QAAQ,GACO,CACvB,CAAA,EAAA,CACF,EACL;AACN;;;;"}
|
package/TableRow.js
CHANGED
|
@@ -4,8 +4,8 @@ import { forwardRef, useContext, useRef, useEffect } from 'react';
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
|
|
6
6
|
import { TableContext } from './context.js';
|
|
7
|
-
import { c as cellStyles } from './cell-
|
|
8
|
-
import { s as styles } from './table-
|
|
7
|
+
import { c as cellStyles } from './cell-Du4OaUIH.js';
|
|
8
|
+
import { s as styles } from './table-BwmsWxpv.js';
|
|
9
9
|
|
|
10
10
|
const TableRowComponent = ({ style, styleHighlighted, action, showAction, animated, onClick, panel, showPanel, children, measure, align, verticalAlign = 'top', 'data-qa': dataQa = 'table-row', ...rest }, ref) => {
|
|
11
11
|
const { paddingLeft, paddingRight } = useContext(TableContext);
|
|
@@ -4,7 +4,7 @@ import { forwardRef, useContext, Children, isValidElement, useRef, cloneElement
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { VirtualizedListContext } from './context.js';
|
|
6
6
|
import { useVirtualizedList } from './useVirtualizedList.js';
|
|
7
|
-
import { s as styles } from '../virtualized-list-
|
|
7
|
+
import { s as styles } from '../virtualized-list-DYyCJjH2.js';
|
|
8
8
|
import '@tanstack/react-virtual';
|
|
9
9
|
|
|
10
10
|
const ActivatedVirtualizedList = ({ ElementItem = 'div', Element = 'div', className, children, ...rest }) => {
|
|
@@ -5,7 +5,7 @@ import classnames from 'classnames';
|
|
|
5
5
|
import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
|
|
6
6
|
import { useScrollbar, Scrollbar } from '@hh.ru/magritte-ui-scrollbar';
|
|
7
7
|
import { VirtualizedListContext, DEFAULT_ITEM_HEIGHT } from './context.js';
|
|
8
|
-
import { s as styles } from '../virtualized-list-
|
|
8
|
+
import { s as styles } from '../virtualized-list-DYyCJjH2.js';
|
|
9
9
|
|
|
10
10
|
const VirtualizedListWrapperComponent = ({ fixedSize, topPanel, bottomPanel, virtualized = true, measureElement, estimateSize = DEFAULT_ITEM_HEIGHT, children, }, ref) => {
|
|
11
11
|
const { hasVerticalScroll, verticalScrollbarProps, ...vScrollbar } = useScrollbar({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './../index.css';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { s as styles } from '../virtualized-list-
|
|
4
|
+
import { s as styles } from '../virtualized-list-DYyCJjH2.js';
|
|
5
5
|
|
|
6
6
|
const VirtualizedPanel = ({ stickyTop, stickyBottom, style = 'primary', children }) => {
|
|
7
7
|
return (jsx("div", { className: classnames(styles.panelContainer, styles.topPanel, {
|
package/VirtualizedList/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import 'classnames';
|
|
|
8
8
|
import '@hh.ru/magritte-common-use-multiple-refs';
|
|
9
9
|
import '@hh.ru/magritte-ui-scrollbar';
|
|
10
10
|
import './context.js';
|
|
11
|
-
import '../virtualized-list-
|
|
11
|
+
import '../virtualized-list-DYyCJjH2.js';
|
|
12
12
|
import './useVirtualizedList.js';
|
|
13
13
|
import '@tanstack/react-virtual';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/cell-Du4OaUIH.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var cellStyles = {"cell":"magritte-cell___9SN-h_4-0-1","space-cell":"magritte-space-cell___FEzuM_4-0-1","spaceCell":"magritte-space-cell___FEzuM_4-0-1","pinned":"magritte-pinned___45ssa_4-0-1","control":"magritte-control___zooF6_4-0-1","sticky":"magritte-sticky___-VZrW_4-0-1","duplicate-table":"magritte-duplicate-table___5UfjM_4-0-1","duplicateTable":"magritte-duplicate-table___5UfjM_4-0-1","cell_m-1":"magritte-cell_m-1___hXvsr_4-0-1","cellM1":"magritte-cell_m-1___hXvsr_4-0-1","cell_m-2":"magritte-cell_m-2___ACrWd_4-0-1","cellM2":"magritte-cell_m-2___ACrWd_4-0-1","cell_m-3":"magritte-cell_m-3___gYLFS_4-0-1","cellM3":"magritte-cell_m-3___gYLFS_4-0-1","cell_m-4":"magritte-cell_m-4___abIIK_4-0-1","cellM4":"magritte-cell_m-4___abIIK_4-0-1","cell_m-5":"magritte-cell_m-5___KnqH6_4-0-1","cellM5":"magritte-cell_m-5___KnqH6_4-0-1","cell_m-6":"magritte-cell_m-6___o95mb_4-0-1","cellM6":"magritte-cell_m-6___o95mb_4-0-1","cell_m-7":"magritte-cell_m-7___DEaIG_4-0-1","cellM7":"magritte-cell_m-7___DEaIG_4-0-1","cell_m-8":"magritte-cell_m-8___TGFI7_4-0-1","cellM8":"magritte-cell_m-8___TGFI7_4-0-1","cell_m-9":"magritte-cell_m-9___yiGBE_4-0-1","cellM9":"magritte-cell_m-9___yiGBE_4-0-1","cell_m-10":"magritte-cell_m-10___tU-P9_4-0-1","cellM10":"magritte-cell_m-10___tU-P9_4-0-1","cell_m-11":"magritte-cell_m-11___Wls8v_4-0-1","cellM11":"magritte-cell_m-11___Wls8v_4-0-1","cell_m-12":"magritte-cell_m-12___QtJUR_4-0-1","cellM12":"magritte-cell_m-12___QtJUR_4-0-1","with-sidebar-from-m":"magritte-with-sidebar-from-m___-CXQh_4-0-1","withSidebarFromM":"magritte-with-sidebar-from-m___-CXQh_4-0-1","cell_l-1":"magritte-cell_l-1___08WTv_4-0-1","cellL1":"magritte-cell_l-1___08WTv_4-0-1","cell_l-2":"magritte-cell_l-2___3Egzi_4-0-1","cellL2":"magritte-cell_l-2___3Egzi_4-0-1","cell_l-3":"magritte-cell_l-3___8CURS_4-0-1","cellL3":"magritte-cell_l-3___8CURS_4-0-1","cell_l-4":"magritte-cell_l-4___4bGq1_4-0-1","cellL4":"magritte-cell_l-4___4bGq1_4-0-1","cell_l-5":"magritte-cell_l-5___2LvKm_4-0-1","cellL5":"magritte-cell_l-5___2LvKm_4-0-1","cell_l-6":"magritte-cell_l-6___ICN-G_4-0-1","cellL6":"magritte-cell_l-6___ICN-G_4-0-1","cell_l-7":"magritte-cell_l-7___1IyZf_4-0-1","cellL7":"magritte-cell_l-7___1IyZf_4-0-1","cell_l-8":"magritte-cell_l-8___KYB-a_4-0-1","cellL8":"magritte-cell_l-8___KYB-a_4-0-1","cell_l-9":"magritte-cell_l-9___CeTym_4-0-1","cellL9":"magritte-cell_l-9___CeTym_4-0-1","cell_l-10":"magritte-cell_l-10___acKEl_4-0-1","cellL10":"magritte-cell_l-10___acKEl_4-0-1","cell_l-11":"magritte-cell_l-11___VKWNT_4-0-1","cellL11":"magritte-cell_l-11___VKWNT_4-0-1","cell_l-12":"magritte-cell_l-12___SHHVR_4-0-1","cellL12":"magritte-cell_l-12___SHHVR_4-0-1","with-sidebar-from-l":"magritte-with-sidebar-from-l___9PLNP_4-0-1","withSidebarFromL":"magritte-with-sidebar-from-l___9PLNP_4-0-1","cell_xl-1":"magritte-cell_xl-1___d-7Mu_4-0-1","cellXl1":"magritte-cell_xl-1___d-7Mu_4-0-1","cell_xl-2":"magritte-cell_xl-2___0v1mr_4-0-1","cellXl2":"magritte-cell_xl-2___0v1mr_4-0-1","cell_xl-3":"magritte-cell_xl-3___dGaO8_4-0-1","cellXl3":"magritte-cell_xl-3___dGaO8_4-0-1","cell_xl-4":"magritte-cell_xl-4___XyiBZ_4-0-1","cellXl4":"magritte-cell_xl-4___XyiBZ_4-0-1","cell_xl-5":"magritte-cell_xl-5___Wzntx_4-0-1","cellXl5":"magritte-cell_xl-5___Wzntx_4-0-1","cell_xl-6":"magritte-cell_xl-6___cppOO_4-0-1","cellXl6":"magritte-cell_xl-6___cppOO_4-0-1","cell_xl-7":"magritte-cell_xl-7___z-rPX_4-0-1","cellXl7":"magritte-cell_xl-7___z-rPX_4-0-1","cell_xl-8":"magritte-cell_xl-8___uYKvC_4-0-1","cellXl8":"magritte-cell_xl-8___uYKvC_4-0-1","cell_xl-9":"magritte-cell_xl-9___Re651_4-0-1","cellXl9":"magritte-cell_xl-9___Re651_4-0-1","cell_xl-10":"magritte-cell_xl-10___-RKb4_4-0-1","cellXl10":"magritte-cell_xl-10___-RKb4_4-0-1","cell_xl-11":"magritte-cell_xl-11___Lmnus_4-0-1","cellXl11":"magritte-cell_xl-11___Lmnus_4-0-1","cell_xl-12":"magritte-cell_xl-12___14HGy_4-0-1","cellXl12":"magritte-cell_xl-12___14HGy_4-0-1","with-sidebar-from-xl":"magritte-with-sidebar-from-xl___mHiwg_4-0-1","withSidebarFromXl":"magritte-with-sidebar-from-xl___mHiwg_4-0-1","cell_xxl-1":"magritte-cell_xxl-1___Jhugp_4-0-1","cellXxl1":"magritte-cell_xxl-1___Jhugp_4-0-1","cell_xxl-2":"magritte-cell_xxl-2___TEKj-_4-0-1","cellXxl2":"magritte-cell_xxl-2___TEKj-_4-0-1","cell_xxl-3":"magritte-cell_xxl-3___V-OWy_4-0-1","cellXxl3":"magritte-cell_xxl-3___V-OWy_4-0-1","cell_xxl-4":"magritte-cell_xxl-4___NDlag_4-0-1","cellXxl4":"magritte-cell_xxl-4___NDlag_4-0-1","cell_xxl-5":"magritte-cell_xxl-5___4caIu_4-0-1","cellXxl5":"magritte-cell_xxl-5___4caIu_4-0-1","cell_xxl-6":"magritte-cell_xxl-6___al5Oz_4-0-1","cellXxl6":"magritte-cell_xxl-6___al5Oz_4-0-1","cell_xxl-7":"magritte-cell_xxl-7___40epc_4-0-1","cellXxl7":"magritte-cell_xxl-7___40epc_4-0-1","cell_xxl-8":"magritte-cell_xxl-8___7jbSF_4-0-1","cellXxl8":"magritte-cell_xxl-8___7jbSF_4-0-1","cell_xxl-9":"magritte-cell_xxl-9___cANRv_4-0-1","cellXxl9":"magritte-cell_xxl-9___cANRv_4-0-1","cell_xxl-10":"magritte-cell_xxl-10___Wxan9_4-0-1","cellXxl10":"magritte-cell_xxl-10___Wxan9_4-0-1","cell_xxl-11":"magritte-cell_xxl-11___tPewy_4-0-1","cellXxl11":"magritte-cell_xxl-11___tPewy_4-0-1","cell_xxl-12":"magritte-cell_xxl-12___AviUH_4-0-1","cellXxl12":"magritte-cell_xxl-12___AviUH_4-0-1","with-sidebar-from-xxl":"magritte-with-sidebar-from-xxl___EMLcq_4-0-1","withSidebarFromXxl":"magritte-with-sidebar-from-xxl___EMLcq_4-0-1","has-scroll-left":"magritte-has-scroll-left___dEeNV_4-0-1","hasScrollLeft":"magritte-has-scroll-left___dEeNV_4-0-1","sticky-left":"magritte-sticky-left___r-bgc_4-0-1","stickyLeft":"magritte-sticky-left___r-bgc_4-0-1","has-scroll-right":"magritte-has-scroll-right___-eu5N_4-0-1","hasScrollRight":"magritte-has-scroll-right___-eu5N_4-0-1","sticky-right":"magritte-sticky-right___-ocur_4-0-1","stickyRight":"magritte-sticky-right___-ocur_4-0-1"};
|
|
3
|
+
|
|
4
|
+
export { cellStyles as c };
|
|
5
|
+
//# sourceMappingURL=cell-Du4OaUIH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-Du4OaUIH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|