@zendeskgarden/react-tables 9.12.2 → 9.12.4
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/esm/elements/Cell.js +7 -8
- package/dist/esm/elements/Head.js +7 -10
- package/dist/esm/elements/HeaderCell.js +7 -8
- package/dist/esm/elements/Row.js +9 -10
- package/dist/esm/elements/SortableCell.js +7 -8
- package/dist/esm/elements/Table.js +5 -6
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/sort-stroke.svg.js +4 -4
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-vertical-stroke.svg.js +4 -4
- package/dist/esm/styled/StyledBaseRow.js +8 -10
- package/dist/esm/styled/StyledBody.js +3 -3
- package/dist/esm/styled/StyledCaption.js +3 -3
- package/dist/esm/styled/StyledCell.js +5 -5
- package/dist/esm/styled/StyledGroupRow.js +8 -9
- package/dist/esm/styled/StyledHead.js +7 -8
- package/dist/esm/styled/StyledHeaderCell.js +5 -5
- package/dist/esm/styled/StyledHeaderRow.js +8 -9
- package/dist/esm/styled/StyledHiddenCell.js +3 -3
- package/dist/esm/styled/StyledOverflowButton.js +3 -3
- package/dist/esm/styled/StyledRow.js +8 -9
- package/dist/esm/styled/StyledSortableButton.js +8 -9
- package/dist/esm/styled/StyledTable.js +3 -3
- package/dist/index.cjs.js +81 -96
- package/package.json +6 -6
|
@@ -20,14 +20,13 @@ import '../styled/StyledOverflowButton.js';
|
|
|
20
20
|
import '../styled/StyledRow.js';
|
|
21
21
|
import { useTableContext } from '../utils/useTableContext.js';
|
|
22
22
|
|
|
23
|
-
const Cell = React__default.forwardRef((
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
23
|
+
const Cell = React__default.forwardRef(({
|
|
24
|
+
hidden,
|
|
25
|
+
isMinimum,
|
|
26
|
+
isTruncated,
|
|
27
|
+
hasOverflow,
|
|
28
|
+
...props
|
|
29
|
+
}, ref) => {
|
|
31
30
|
const {
|
|
32
31
|
size
|
|
33
32
|
} = useTableContext();
|
|
@@ -18,16 +18,13 @@ import '../styled/StyledSortableButton.js';
|
|
|
18
18
|
import '../styled/StyledOverflowButton.js';
|
|
19
19
|
import '../styled/StyledRow.js';
|
|
20
20
|
|
|
21
|
-
const Head = forwardRef((
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
$isSticky: isSticky
|
|
29
|
-
}, props));
|
|
30
|
-
});
|
|
21
|
+
const Head = forwardRef(({
|
|
22
|
+
isSticky,
|
|
23
|
+
...props
|
|
24
|
+
}, ref) => React__default.createElement(StyledHead, Object.assign({
|
|
25
|
+
ref: ref,
|
|
26
|
+
$isSticky: isSticky
|
|
27
|
+
}, props)));
|
|
31
28
|
Head.displayName = 'Table.Head';
|
|
32
29
|
|
|
33
30
|
export { Head };
|
|
@@ -20,14 +20,13 @@ import '../styled/StyledRow.js';
|
|
|
20
20
|
import { useTableContext } from '../utils/useTableContext.js';
|
|
21
21
|
import { Cell } from './Cell.js';
|
|
22
22
|
|
|
23
|
-
const HeaderCell = forwardRef((
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
23
|
+
const HeaderCell = forwardRef(({
|
|
24
|
+
hidden,
|
|
25
|
+
isMinimum,
|
|
26
|
+
isTruncated,
|
|
27
|
+
hasOverflow,
|
|
28
|
+
...props
|
|
29
|
+
}, ref) => {
|
|
31
30
|
const {
|
|
32
31
|
size
|
|
33
32
|
} = useTableContext();
|
package/dist/esm/elements/Row.js
CHANGED
|
@@ -21,16 +21,15 @@ import '../styled/StyledOverflowButton.js';
|
|
|
21
21
|
import { StyledRow } from '../styled/StyledRow.js';
|
|
22
22
|
import { useTableContext } from '../utils/useTableContext.js';
|
|
23
23
|
|
|
24
|
-
const Row = forwardRef((
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref;
|
|
24
|
+
const Row = forwardRef(({
|
|
25
|
+
onFocus,
|
|
26
|
+
onBlur,
|
|
27
|
+
isSelected,
|
|
28
|
+
isStriped,
|
|
29
|
+
isHovered,
|
|
30
|
+
isFocused: focused,
|
|
31
|
+
...otherProps
|
|
32
|
+
}, ref) => {
|
|
34
33
|
const [isFocused, setIsFocused] = useState(false);
|
|
35
34
|
const {
|
|
36
35
|
size,
|
|
@@ -22,14 +22,13 @@ import { StyledSortableButton, StyledSortableStrokeIconWrapper, StyledSortableFi
|
|
|
22
22
|
import '../styled/StyledOverflowButton.js';
|
|
23
23
|
import '../styled/StyledRow.js';
|
|
24
24
|
|
|
25
|
-
const SortableCell = forwardRef((
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
25
|
+
const SortableCell = forwardRef(({
|
|
26
|
+
sort,
|
|
27
|
+
cellProps = {},
|
|
28
|
+
width,
|
|
29
|
+
children,
|
|
30
|
+
...sortableButtonProps
|
|
31
|
+
}, ref) => {
|
|
33
32
|
const {
|
|
34
33
|
isMinimum,
|
|
35
34
|
isTruncated,
|
|
@@ -31,12 +31,11 @@ import { OverflowButton } from './OverflowButton.js';
|
|
|
31
31
|
import { Row } from './Row.js';
|
|
32
32
|
import { SortableCell } from './SortableCell.js';
|
|
33
33
|
|
|
34
|
-
const TableComponent = React__default.forwardRef((
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} = _ref;
|
|
34
|
+
const TableComponent = React__default.forwardRef(({
|
|
35
|
+
isReadOnly,
|
|
36
|
+
size = 'medium',
|
|
37
|
+
...props
|
|
38
|
+
}, ref) => {
|
|
40
39
|
const tableContextValue = useMemo(() => ({
|
|
41
40
|
size: size,
|
|
42
41
|
isReadOnly: isReadOnly
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
|
|
9
|
-
var _path;
|
|
10
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
|
+
var _path$1;
|
|
10
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
11
11
|
var SvgSortStroke = function SvgSortStroke(props) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 12,
|
|
15
15
|
height: 12,
|
|
16
16
|
focusable: "false",
|
|
17
17
|
viewBox: "0 0 12 12",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
20
20
|
fill: "none",
|
|
21
21
|
stroke: "currentColor",
|
|
22
22
|
strokeLinecap: "round",
|
package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-vertical-stroke.svg.js
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
|
|
9
|
-
var _path;
|
|
10
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
|
+
var _path$2;
|
|
10
|
+
function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
|
|
11
11
|
var SvgOverflowVerticalStroke = function SvgOverflowVerticalStroke(props) {
|
|
12
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: 16,
|
|
15
15
|
height: 16,
|
|
16
16
|
focusable: "false",
|
|
17
17
|
viewBox: "0 0 16 16",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
20
20
|
fill: "currentColor",
|
|
21
21
|
d: "M9.5 2.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zm0 5.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zm0 5.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"
|
|
22
22
|
})));
|
|
@@ -7,17 +7,15 @@
|
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const sizeStyles =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
10
|
+
const sizeStyles$4 = ({
|
|
11
|
+
theme
|
|
12
|
+
}) => {
|
|
14
13
|
return css(["border-bottom:", ";vertical-align:top;box-sizing:border-box;"], theme.borders.sm);
|
|
15
14
|
};
|
|
16
|
-
const colorStyles =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref2;
|
|
15
|
+
const colorStyles$5 = ({
|
|
16
|
+
theme,
|
|
17
|
+
$isStriped
|
|
18
|
+
}) => {
|
|
21
19
|
const borderColor = getColor({
|
|
22
20
|
variable: 'border.subtle',
|
|
23
21
|
theme
|
|
@@ -38,6 +36,6 @@ const colorStyles = _ref2 => {
|
|
|
38
36
|
const StyledBaseRow = styled.tr.withConfig({
|
|
39
37
|
displayName: "StyledBaseRow",
|
|
40
38
|
componentId: "sc-1t4zqg4-0"
|
|
41
|
-
})(["display:table-row;transition:background-color 0.1s ease-in-out;", " ", ""], sizeStyles, colorStyles);
|
|
39
|
+
})(["display:table-row;transition:background-color 0.1s ease-in-out;", " ", ""], sizeStyles$4, colorStyles$5);
|
|
42
40
|
|
|
43
41
|
export { StyledBaseRow };
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'tables.body';
|
|
10
|
+
const COMPONENT_ID$b = 'tables.body';
|
|
11
11
|
const StyledBody = styled.tbody.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledBody",
|
|
16
16
|
componentId: "sc-14ud6y-0"
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'tables.caption';
|
|
10
|
+
const COMPONENT_ID$a = 'tables.caption';
|
|
11
11
|
const StyledCaption = styled.caption.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledCaption",
|
|
16
16
|
componentId: "sc-113y327-0"
|
|
@@ -10,8 +10,8 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
import { getLineHeight } from './StyledTable.js';
|
|
11
11
|
import { getRowHeight } from './style-utils.js';
|
|
12
12
|
|
|
13
|
-
const COMPONENT_ID = 'tables.cell';
|
|
14
|
-
const truncatedStyling = css(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
13
|
+
const COMPONENT_ID$6 = 'tables.cell';
|
|
14
|
+
const truncatedStyling$1 = css(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
15
15
|
const sizeStyling = props => {
|
|
16
16
|
let boxSizing = 'border-box';
|
|
17
17
|
let padding;
|
|
@@ -34,11 +34,11 @@ const sizeStyling = props => {
|
|
|
34
34
|
return css(["box-sizing:", ";padding:", ";width:", ";height:", ";"], boxSizing, padding, width, height);
|
|
35
35
|
};
|
|
36
36
|
const StyledCell = styled.td.attrs({
|
|
37
|
-
'data-garden-id': COMPONENT_ID,
|
|
38
|
-
'data-garden-version': '9.12.
|
|
37
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
38
|
+
'data-garden-version': '9.12.4'
|
|
39
39
|
}).withConfig({
|
|
40
40
|
displayName: "StyledCell",
|
|
41
41
|
componentId: "sc-8hpncx-0"
|
|
42
|
-
})(["display:table-cell;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out;", ";", ";", ";"], props => sizeStyling(props), props => props.$isTruncated && truncatedStyling, componentStyles);
|
|
42
|
+
})(["display:table-cell;transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out;", ";", ";", ";"], props => sizeStyling(props), props => props.$isTruncated && truncatedStyling$1, componentStyles);
|
|
43
43
|
|
|
44
44
|
export { StyledCell };
|
|
@@ -11,11 +11,10 @@ import { StyledBaseRow } from './StyledBaseRow.js';
|
|
|
11
11
|
import { StyledCell } from './StyledCell.js';
|
|
12
12
|
import { getLineHeight } from './StyledTable.js';
|
|
13
13
|
|
|
14
|
-
const COMPONENT_ID = 'tables.group_row';
|
|
15
|
-
const colorStyles =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
14
|
+
const COMPONENT_ID$2 = 'tables.group_row';
|
|
15
|
+
const colorStyles$1 = ({
|
|
16
|
+
theme
|
|
17
|
+
}) => {
|
|
19
18
|
return css(["background-color:", ";"], getColor({
|
|
20
19
|
variable: 'background.subtle',
|
|
21
20
|
transparency: theme.opacity[100],
|
|
@@ -28,17 +27,17 @@ const colorStyles = _ref => {
|
|
|
28
27
|
theme
|
|
29
28
|
}));
|
|
30
29
|
};
|
|
31
|
-
const sizeStyles = props => {
|
|
30
|
+
const sizeStyles$1 = props => {
|
|
32
31
|
const height = `${props.theme.space.base * 8}px`;
|
|
33
32
|
const lineHeight = getLineHeight(props);
|
|
34
33
|
return css(["height:", ";line-height:", ";font-size:", ";", "{padding:", " ", "px;}"], height, lineHeight, props.theme.fontSizes.sm, StyledCell, math(`(${height} - ${lineHeight}) / 2`), props.theme.space.base * 3);
|
|
35
34
|
};
|
|
36
35
|
const StyledGroupRow = styled(StyledBaseRow).attrs({
|
|
37
|
-
'data-garden-id': COMPONENT_ID,
|
|
38
|
-
'data-garden-version': '9.12.
|
|
36
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
37
|
+
'data-garden-version': '9.12.4'
|
|
39
38
|
}).withConfig({
|
|
40
39
|
displayName: "StyledGroupRow",
|
|
41
40
|
componentId: "sc-mpd0r8-0"
|
|
42
|
-
})(["", " ", " ", ";"], sizeStyles, colorStyles, componentStyles);
|
|
41
|
+
})(["", " ", " ", ";"], sizeStyles$1, colorStyles$1, componentStyles);
|
|
43
42
|
|
|
44
43
|
export { StyledGroupRow };
|
|
@@ -9,11 +9,10 @@ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
|
9
9
|
import { StyledHeaderRow } from './StyledHeaderRow.js';
|
|
10
10
|
import { StyledHeaderCell } from './StyledHeaderCell.js';
|
|
11
11
|
|
|
12
|
-
const COMPONENT_ID = 'tables.head';
|
|
13
|
-
const colorStyles =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} = _ref;
|
|
12
|
+
const COMPONENT_ID$3 = 'tables.head';
|
|
13
|
+
const colorStyles$2 = ({
|
|
14
|
+
theme
|
|
15
|
+
}) => {
|
|
17
16
|
const borderColor = getColor({
|
|
18
17
|
variable: 'border.default',
|
|
19
18
|
theme
|
|
@@ -28,11 +27,11 @@ const stickyStyles = () => {
|
|
|
28
27
|
return css(["position:sticky;top:0;z-index:1;"]);
|
|
29
28
|
};
|
|
30
29
|
const StyledHead = styled.thead.attrs({
|
|
31
|
-
'data-garden-id': COMPONENT_ID,
|
|
32
|
-
'data-garden-version': '9.12.
|
|
30
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
31
|
+
'data-garden-version': '9.12.4'
|
|
33
32
|
}).withConfig({
|
|
34
33
|
displayName: "StyledHead",
|
|
35
34
|
componentId: "sc-spf23a-0"
|
|
36
|
-
})(["", " ", " ", ";"], props => props.$isSticky && stickyStyles(), colorStyles, componentStyles);
|
|
35
|
+
})(["", " ", " ", ";"], props => props.$isSticky && stickyStyles(), colorStyles$2, componentStyles);
|
|
37
36
|
|
|
38
37
|
export { StyledHead };
|
|
@@ -12,9 +12,9 @@ import { StyledSortableButton } from './StyledSortableButton.js';
|
|
|
12
12
|
import { getLineHeight } from './StyledTable.js';
|
|
13
13
|
import { getRowHeight } from './style-utils.js';
|
|
14
14
|
|
|
15
|
-
const COMPONENT_ID = 'tables.header_cell';
|
|
15
|
+
const COMPONENT_ID$4 = 'tables.header_cell';
|
|
16
16
|
const truncatedStyling = css(["", "{max-width:100%;overflow:hidden;text-overflow:ellipsis;}"], StyledSortableButton);
|
|
17
|
-
const sizeStyles = props => {
|
|
17
|
+
const sizeStyles$2 = props => {
|
|
18
18
|
let paddingVertical = undefined;
|
|
19
19
|
if (!props.$hasOverflow) {
|
|
20
20
|
paddingVertical = math(`(${getRowHeight(props)} - ${getLineHeight(props)}) / 2`);
|
|
@@ -23,8 +23,8 @@ const sizeStyles = props => {
|
|
|
23
23
|
};
|
|
24
24
|
const StyledHeaderCell = styled(StyledCell).attrs({
|
|
25
25
|
as: 'th',
|
|
26
|
-
'data-garden-id': COMPONENT_ID,
|
|
27
|
-
'data-garden-version': '9.12.
|
|
26
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
27
|
+
'data-garden-version': '9.12.4'
|
|
28
28
|
}).withConfig({
|
|
29
29
|
displayName: "StyledHeaderCell",
|
|
30
30
|
componentId: "sc-fzagoe-0"
|
|
@@ -36,6 +36,6 @@ const StyledHeaderCell = styled(StyledCell).attrs({
|
|
|
36
36
|
return 'left';
|
|
37
37
|
}
|
|
38
38
|
return undefined;
|
|
39
|
-
}, props => sizeStyles(props), props => props.$isTruncated && truncatedStyling, componentStyles);
|
|
39
|
+
}, props => sizeStyles$2(props), props => props.$isTruncated && truncatedStyling, componentStyles);
|
|
40
40
|
|
|
41
41
|
export { StyledHeaderCell };
|
|
@@ -10,7 +10,7 @@ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
import { StyledBaseRow } from './StyledBaseRow.js';
|
|
11
11
|
import { StyledOverflowButton } from './StyledOverflowButton.js';
|
|
12
12
|
|
|
13
|
-
const COMPONENT_ID = 'tables.header_row';
|
|
13
|
+
const COMPONENT_ID$8 = 'tables.header_row';
|
|
14
14
|
const getHeaderRowHeight = props => {
|
|
15
15
|
if (props.$size === 'large') {
|
|
16
16
|
return `${props.theme.space.base * 18}px`;
|
|
@@ -19,25 +19,24 @@ const getHeaderRowHeight = props => {
|
|
|
19
19
|
}
|
|
20
20
|
return `${props.theme.space.base * 12}px`;
|
|
21
21
|
};
|
|
22
|
-
const colorStyles =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
22
|
+
const colorStyles$4 = ({
|
|
23
|
+
theme
|
|
24
|
+
}) => {
|
|
26
25
|
return css(["border-bottom-color:", ";"], getColor({
|
|
27
26
|
variable: 'border.default',
|
|
28
27
|
theme
|
|
29
28
|
}));
|
|
30
29
|
};
|
|
31
|
-
const sizeStyles = props => {
|
|
30
|
+
const sizeStyles$3 = props => {
|
|
32
31
|
const rowHeight = getHeaderRowHeight(props);
|
|
33
32
|
return css(["height:", ";vertical-align:bottom;", "{margin-top:0;margin-bottom:calc(", " - 1em);}"], rowHeight, StyledOverflowButton, math(`${rowHeight} / 2`));
|
|
34
33
|
};
|
|
35
34
|
const StyledHeaderRow = styled(StyledBaseRow).attrs({
|
|
36
|
-
'data-garden-id': COMPONENT_ID,
|
|
37
|
-
'data-garden-version': '9.12.
|
|
35
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
36
|
+
'data-garden-version': '9.12.4'
|
|
38
37
|
}).withConfig({
|
|
39
38
|
displayName: "StyledHeaderRow",
|
|
40
39
|
componentId: "sc-16ogvdx-0"
|
|
41
|
-
})(["font-weight:", ";", " ", " ", "{opacity:1;}", ";"], props => props.theme.fontWeights.semibold, sizeStyles, colorStyles, StyledOverflowButton, componentStyles);
|
|
40
|
+
})(["font-weight:", ";", " ", " ", "{opacity:1;}", ";"], props => props.theme.fontWeights.semibold, sizeStyles$3, colorStyles$4, StyledOverflowButton, componentStyles);
|
|
42
41
|
|
|
43
42
|
export { StyledHeaderRow };
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { hideVisually } from 'polished';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'tables.hidden_cell';
|
|
11
|
+
const COMPONENT_ID$1 = 'tables.hidden_cell';
|
|
12
12
|
const StyledHiddenCell = styled.div.attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
14
|
+
'data-garden-version': '9.12.4'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledHiddenCell",
|
|
17
17
|
componentId: "sc-1x454xw-0"
|
|
@@ -10,11 +10,11 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
import { getRowHeight } from './style-utils.js';
|
|
11
11
|
import { IconButton } from '@zendeskgarden/react-buttons';
|
|
12
12
|
|
|
13
|
-
const COMPONENT_ID = 'tables.overflow_button';
|
|
13
|
+
const COMPONENT_ID$9 = 'tables.overflow_button';
|
|
14
14
|
const OVERFLOW_BUTTON_SIZE = '2em';
|
|
15
15
|
const StyledOverflowButton = styled(IconButton).attrs({
|
|
16
|
-
'data-garden-id': COMPONENT_ID,
|
|
17
|
-
'data-garden-version': '9.12.
|
|
16
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
17
|
+
'data-garden-version': '9.12.4'
|
|
18
18
|
}).withConfig({
|
|
19
19
|
displayName: "StyledOverflowButton",
|
|
20
20
|
componentId: "sc-1eba2ml-0"
|
|
@@ -12,14 +12,13 @@ import { StyledOverflowButton } from './StyledOverflowButton.js';
|
|
|
12
12
|
import { getRowHeight } from './style-utils.js';
|
|
13
13
|
|
|
14
14
|
const COMPONENT_ID = 'tables.row';
|
|
15
|
-
const colorStyles =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
15
|
+
const colorStyles = ({
|
|
16
|
+
theme,
|
|
17
|
+
$isFocused,
|
|
18
|
+
$isSelected,
|
|
19
|
+
$isHovered,
|
|
20
|
+
$isReadOnly
|
|
21
|
+
}) => {
|
|
23
22
|
const hoveredBackgroundColor = getColor({
|
|
24
23
|
variable: 'background.primaryEmphasis',
|
|
25
24
|
transparency: theme.opacity[100],
|
|
@@ -94,7 +93,7 @@ const sizeStyles = props => {
|
|
|
94
93
|
};
|
|
95
94
|
const StyledRow = styled(StyledBaseRow).attrs({
|
|
96
95
|
'data-garden-id': COMPONENT_ID,
|
|
97
|
-
'data-garden-version': '9.12.
|
|
96
|
+
'data-garden-version': '9.12.4'
|
|
98
97
|
}).withConfig({
|
|
99
98
|
displayName: "StyledRow",
|
|
100
99
|
componentId: "sc-ek66ow-0"
|
|
@@ -8,7 +8,7 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { math } from 'polished';
|
|
9
9
|
import { SELECTOR_FOCUS_VISIBLE, componentStyles, getColor, focusStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'tables.sortable';
|
|
11
|
+
const COMPONENT_ID$5 = 'tables.sortable';
|
|
12
12
|
const StyledBaseIconWrapper = styled.div.withConfig({
|
|
13
13
|
displayName: "StyledSortableButton__StyledBaseIconWrapper",
|
|
14
14
|
componentId: "sc-2s1dli-0"
|
|
@@ -21,11 +21,10 @@ const StyledSortableFillIconWrapper = styled(StyledBaseIconWrapper).withConfig({
|
|
|
21
21
|
displayName: "StyledSortableButton__StyledSortableFillIconWrapper",
|
|
22
22
|
componentId: "sc-2s1dli-2"
|
|
23
23
|
})([""]);
|
|
24
|
-
const colorStyles =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
24
|
+
const colorStyles$3 = ({
|
|
25
|
+
theme,
|
|
26
|
+
$sort
|
|
27
|
+
}) => {
|
|
29
28
|
const fgInactive = getColor({
|
|
30
29
|
variable: 'foreground.subtle',
|
|
31
30
|
transparency: theme.opacity[200],
|
|
@@ -81,12 +80,12 @@ const colorStyles = _ref => {
|
|
|
81
80
|
}));
|
|
82
81
|
};
|
|
83
82
|
const StyledSortableButton = styled.button.attrs({
|
|
84
|
-
'data-garden-id': COMPONENT_ID,
|
|
85
|
-
'data-garden-version': '9.12.
|
|
83
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
84
|
+
'data-garden-version': '9.12.4',
|
|
86
85
|
type: 'button'
|
|
87
86
|
}).withConfig({
|
|
88
87
|
displayName: "StyledSortableButton",
|
|
89
88
|
componentId: "sc-2s1dli-3"
|
|
90
|
-
})(["position:relative;transition:box-shadow 0.1s ease-in-out;border:none;border-radius:", ";background-color:transparent;cursor:pointer;padding:0;padding-", ":", ";width:", ";text-decoration:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:", ";", "{opacity:", ";}", "{opacity:", ";}&:hover,", "{text-decoration:none;}", " ", ";"], props => props.theme.borderRadii.sm, props => props.theme.rtl ? 'left' : 'right', props => math(`${props.theme.space.base} + ${props.theme.iconSizes.sm}`), props => props.width, props => props.theme.fontWeights.semibold, StyledSortableStrokeIconWrapper, props => props.$sort === undefined && 1, StyledSortableFillIconWrapper, props => props.$sort !== undefined && 1, SELECTOR_FOCUS_VISIBLE, colorStyles, componentStyles);
|
|
89
|
+
})(["position:relative;transition:box-shadow 0.1s ease-in-out;border:none;border-radius:", ";background-color:transparent;cursor:pointer;padding:0;padding-", ":", ";width:", ";text-decoration:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:", ";", "{opacity:", ";}", "{opacity:", ";}&:hover,", "{text-decoration:none;}", " ", ";"], props => props.theme.borderRadii.sm, props => props.theme.rtl ? 'left' : 'right', props => math(`${props.theme.space.base} + ${props.theme.iconSizes.sm}`), props => props.width, props => props.theme.fontWeights.semibold, StyledSortableStrokeIconWrapper, props => props.$sort === undefined && 1, StyledSortableFillIconWrapper, props => props.$sort !== undefined && 1, SELECTOR_FOCUS_VISIBLE, colorStyles$3, componentStyles);
|
|
91
90
|
|
|
92
91
|
export { StyledSortableButton, StyledSortableFillIconWrapper, StyledSortableStrokeIconWrapper };
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { getColor, componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'tables.table';
|
|
10
|
+
const COMPONENT_ID$7 = 'tables.table';
|
|
11
11
|
const getLineHeight = props => {
|
|
12
12
|
return `${props.theme.space.base * 5}px`;
|
|
13
13
|
};
|
|
14
14
|
const StyledTable = styled.table.attrs({
|
|
15
|
-
'data-garden-id': COMPONENT_ID,
|
|
16
|
-
'data-garden-version': '9.12.
|
|
15
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
16
|
+
'data-garden-version': '9.12.4'
|
|
17
17
|
}).withConfig({
|
|
18
18
|
displayName: "StyledTable",
|
|
19
19
|
componentId: "sc-gje7na-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
|
41
41
|
const COMPONENT_ID$b = 'tables.body';
|
|
42
42
|
const StyledBody = styled__default.default.tbody.attrs({
|
|
43
43
|
'data-garden-id': COMPONENT_ID$b,
|
|
44
|
-
'data-garden-version': '9.12.
|
|
44
|
+
'data-garden-version': '9.12.4'
|
|
45
45
|
}).withConfig({
|
|
46
46
|
displayName: "StyledBody",
|
|
47
47
|
componentId: "sc-14ud6y-0"
|
|
@@ -50,23 +50,21 @@ const StyledBody = styled__default.default.tbody.attrs({
|
|
|
50
50
|
const COMPONENT_ID$a = 'tables.caption';
|
|
51
51
|
const StyledCaption = styled__default.default.caption.attrs({
|
|
52
52
|
'data-garden-id': COMPONENT_ID$a,
|
|
53
|
-
'data-garden-version': '9.12.
|
|
53
|
+
'data-garden-version': '9.12.4'
|
|
54
54
|
}).withConfig({
|
|
55
55
|
displayName: "StyledCaption",
|
|
56
56
|
componentId: "sc-113y327-0"
|
|
57
57
|
})(["display:table-caption;text-align:", ";", ";"], props => props.theme.rtl ? 'right' : 'left', reactTheming.componentStyles);
|
|
58
58
|
|
|
59
|
-
const sizeStyles$4 =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} = _ref;
|
|
59
|
+
const sizeStyles$4 = ({
|
|
60
|
+
theme
|
|
61
|
+
}) => {
|
|
63
62
|
return styled.css(["border-bottom:", ";vertical-align:top;box-sizing:border-box;"], theme.borders.sm);
|
|
64
63
|
};
|
|
65
|
-
const colorStyles$5 =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} = _ref2;
|
|
64
|
+
const colorStyles$5 = ({
|
|
65
|
+
theme,
|
|
66
|
+
$isStriped
|
|
67
|
+
}) => {
|
|
70
68
|
const borderColor = reactTheming.getColor({
|
|
71
69
|
variable: 'border.subtle',
|
|
72
70
|
theme
|
|
@@ -102,7 +100,7 @@ const COMPONENT_ID$9 = 'tables.overflow_button';
|
|
|
102
100
|
const OVERFLOW_BUTTON_SIZE = '2em';
|
|
103
101
|
const StyledOverflowButton = styled__default.default(reactButtons.IconButton).attrs({
|
|
104
102
|
'data-garden-id': COMPONENT_ID$9,
|
|
105
|
-
'data-garden-version': '9.12.
|
|
103
|
+
'data-garden-version': '9.12.4'
|
|
106
104
|
}).withConfig({
|
|
107
105
|
displayName: "StyledOverflowButton",
|
|
108
106
|
componentId: "sc-1eba2ml-0"
|
|
@@ -117,10 +115,9 @@ const getHeaderRowHeight = props => {
|
|
|
117
115
|
}
|
|
118
116
|
return `${props.theme.space.base * 12}px`;
|
|
119
117
|
};
|
|
120
|
-
const colorStyles$4 =
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} = _ref;
|
|
118
|
+
const colorStyles$4 = ({
|
|
119
|
+
theme
|
|
120
|
+
}) => {
|
|
124
121
|
return styled.css(["border-bottom-color:", ";"], reactTheming.getColor({
|
|
125
122
|
variable: 'border.default',
|
|
126
123
|
theme
|
|
@@ -132,7 +129,7 @@ const sizeStyles$3 = props => {
|
|
|
132
129
|
};
|
|
133
130
|
const StyledHeaderRow = styled__default.default(StyledBaseRow).attrs({
|
|
134
131
|
'data-garden-id': COMPONENT_ID$8,
|
|
135
|
-
'data-garden-version': '9.12.
|
|
132
|
+
'data-garden-version': '9.12.4'
|
|
136
133
|
}).withConfig({
|
|
137
134
|
displayName: "StyledHeaderRow",
|
|
138
135
|
componentId: "sc-16ogvdx-0"
|
|
@@ -144,7 +141,7 @@ const getLineHeight = props => {
|
|
|
144
141
|
};
|
|
145
142
|
const StyledTable = styled__default.default.table.attrs({
|
|
146
143
|
'data-garden-id': COMPONENT_ID$7,
|
|
147
|
-
'data-garden-version': '9.12.
|
|
144
|
+
'data-garden-version': '9.12.4'
|
|
148
145
|
}).withConfig({
|
|
149
146
|
displayName: "StyledTable",
|
|
150
147
|
componentId: "sc-gje7na-0"
|
|
@@ -178,7 +175,7 @@ const sizeStyling = props => {
|
|
|
178
175
|
};
|
|
179
176
|
const StyledCell = styled__default.default.td.attrs({
|
|
180
177
|
'data-garden-id': COMPONENT_ID$6,
|
|
181
|
-
'data-garden-version': '9.12.
|
|
178
|
+
'data-garden-version': '9.12.4'
|
|
182
179
|
}).withConfig({
|
|
183
180
|
displayName: "StyledCell",
|
|
184
181
|
componentId: "sc-8hpncx-0"
|
|
@@ -197,11 +194,10 @@ const StyledSortableFillIconWrapper = styled__default.default(StyledBaseIconWrap
|
|
|
197
194
|
displayName: "StyledSortableButton__StyledSortableFillIconWrapper",
|
|
198
195
|
componentId: "sc-2s1dli-2"
|
|
199
196
|
})([""]);
|
|
200
|
-
const colorStyles$3 =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
} = _ref;
|
|
197
|
+
const colorStyles$3 = ({
|
|
198
|
+
theme,
|
|
199
|
+
$sort
|
|
200
|
+
}) => {
|
|
205
201
|
const fgInactive = reactTheming.getColor({
|
|
206
202
|
variable: 'foreground.subtle',
|
|
207
203
|
transparency: theme.opacity[200],
|
|
@@ -258,7 +254,7 @@ const colorStyles$3 = _ref => {
|
|
|
258
254
|
};
|
|
259
255
|
const StyledSortableButton = styled__default.default.button.attrs({
|
|
260
256
|
'data-garden-id': COMPONENT_ID$5,
|
|
261
|
-
'data-garden-version': '9.12.
|
|
257
|
+
'data-garden-version': '9.12.4',
|
|
262
258
|
type: 'button'
|
|
263
259
|
}).withConfig({
|
|
264
260
|
displayName: "StyledSortableButton",
|
|
@@ -277,7 +273,7 @@ const sizeStyles$2 = props => {
|
|
|
277
273
|
const StyledHeaderCell = styled__default.default(StyledCell).attrs({
|
|
278
274
|
as: 'th',
|
|
279
275
|
'data-garden-id': COMPONENT_ID$4,
|
|
280
|
-
'data-garden-version': '9.12.
|
|
276
|
+
'data-garden-version': '9.12.4'
|
|
281
277
|
}).withConfig({
|
|
282
278
|
displayName: "StyledHeaderCell",
|
|
283
279
|
componentId: "sc-fzagoe-0"
|
|
@@ -292,10 +288,9 @@ const StyledHeaderCell = styled__default.default(StyledCell).attrs({
|
|
|
292
288
|
}, props => sizeStyles$2(props), props => props.$isTruncated && truncatedStyling, reactTheming.componentStyles);
|
|
293
289
|
|
|
294
290
|
const COMPONENT_ID$3 = 'tables.head';
|
|
295
|
-
const colorStyles$2 =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
} = _ref;
|
|
291
|
+
const colorStyles$2 = ({
|
|
292
|
+
theme
|
|
293
|
+
}) => {
|
|
299
294
|
const borderColor = reactTheming.getColor({
|
|
300
295
|
variable: 'border.default',
|
|
301
296
|
theme
|
|
@@ -311,17 +306,16 @@ const stickyStyles = () => {
|
|
|
311
306
|
};
|
|
312
307
|
const StyledHead = styled__default.default.thead.attrs({
|
|
313
308
|
'data-garden-id': COMPONENT_ID$3,
|
|
314
|
-
'data-garden-version': '9.12.
|
|
309
|
+
'data-garden-version': '9.12.4'
|
|
315
310
|
}).withConfig({
|
|
316
311
|
displayName: "StyledHead",
|
|
317
312
|
componentId: "sc-spf23a-0"
|
|
318
313
|
})(["", " ", " ", ";"], props => props.$isSticky && stickyStyles(), colorStyles$2, reactTheming.componentStyles);
|
|
319
314
|
|
|
320
315
|
const COMPONENT_ID$2 = 'tables.group_row';
|
|
321
|
-
const colorStyles$1 =
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
} = _ref;
|
|
316
|
+
const colorStyles$1 = ({
|
|
317
|
+
theme
|
|
318
|
+
}) => {
|
|
325
319
|
return styled.css(["background-color:", ";"], reactTheming.getColor({
|
|
326
320
|
variable: 'background.subtle',
|
|
327
321
|
transparency: theme.opacity[100],
|
|
@@ -341,7 +335,7 @@ const sizeStyles$1 = props => {
|
|
|
341
335
|
};
|
|
342
336
|
const StyledGroupRow = styled__default.default(StyledBaseRow).attrs({
|
|
343
337
|
'data-garden-id': COMPONENT_ID$2,
|
|
344
|
-
'data-garden-version': '9.12.
|
|
338
|
+
'data-garden-version': '9.12.4'
|
|
345
339
|
}).withConfig({
|
|
346
340
|
displayName: "StyledGroupRow",
|
|
347
341
|
componentId: "sc-mpd0r8-0"
|
|
@@ -350,21 +344,20 @@ const StyledGroupRow = styled__default.default(StyledBaseRow).attrs({
|
|
|
350
344
|
const COMPONENT_ID$1 = 'tables.hidden_cell';
|
|
351
345
|
const StyledHiddenCell = styled__default.default.div.attrs({
|
|
352
346
|
'data-garden-id': COMPONENT_ID$1,
|
|
353
|
-
'data-garden-version': '9.12.
|
|
347
|
+
'data-garden-version': '9.12.4'
|
|
354
348
|
}).withConfig({
|
|
355
349
|
displayName: "StyledHiddenCell",
|
|
356
350
|
componentId: "sc-1x454xw-0"
|
|
357
351
|
})(["", " ", ";"], polished.hideVisually(), reactTheming.componentStyles);
|
|
358
352
|
|
|
359
353
|
const COMPONENT_ID = 'tables.row';
|
|
360
|
-
const colorStyles =
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
} = _ref;
|
|
354
|
+
const colorStyles = ({
|
|
355
|
+
theme,
|
|
356
|
+
$isFocused,
|
|
357
|
+
$isSelected,
|
|
358
|
+
$isHovered,
|
|
359
|
+
$isReadOnly
|
|
360
|
+
}) => {
|
|
368
361
|
const hoveredBackgroundColor = reactTheming.getColor({
|
|
369
362
|
variable: 'background.primaryEmphasis',
|
|
370
363
|
transparency: theme.opacity[100],
|
|
@@ -439,7 +432,7 @@ const sizeStyles = props => {
|
|
|
439
432
|
};
|
|
440
433
|
const StyledRow = styled__default.default(StyledBaseRow).attrs({
|
|
441
434
|
'data-garden-id': COMPONENT_ID,
|
|
442
|
-
'data-garden-version': '9.12.
|
|
435
|
+
'data-garden-version': '9.12.4'
|
|
443
436
|
}).withConfig({
|
|
444
437
|
displayName: "StyledRow",
|
|
445
438
|
componentId: "sc-ek66ow-0"
|
|
@@ -463,14 +456,13 @@ const useTableContext = () => {
|
|
|
463
456
|
return React.useContext(TableContext);
|
|
464
457
|
};
|
|
465
458
|
|
|
466
|
-
const Cell = React__namespace.default.forwardRef((
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
} = _ref;
|
|
459
|
+
const Cell = React__namespace.default.forwardRef(({
|
|
460
|
+
hidden,
|
|
461
|
+
isMinimum,
|
|
462
|
+
isTruncated,
|
|
463
|
+
hasOverflow,
|
|
464
|
+
...props
|
|
465
|
+
}, ref) => {
|
|
474
466
|
const {
|
|
475
467
|
size
|
|
476
468
|
} = useTableContext();
|
|
@@ -501,26 +493,22 @@ const GroupRow = React.forwardRef((props, ref) => {
|
|
|
501
493
|
});
|
|
502
494
|
GroupRow.displayName = 'Table.GroupRow';
|
|
503
495
|
|
|
504
|
-
const Head = React.forwardRef((
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
$isSticky: isSticky
|
|
512
|
-
}, props));
|
|
513
|
-
});
|
|
496
|
+
const Head = React.forwardRef(({
|
|
497
|
+
isSticky,
|
|
498
|
+
...props
|
|
499
|
+
}, ref) => React__namespace.default.createElement(StyledHead, Object.assign({
|
|
500
|
+
ref: ref,
|
|
501
|
+
$isSticky: isSticky
|
|
502
|
+
}, props)));
|
|
514
503
|
Head.displayName = 'Table.Head';
|
|
515
504
|
|
|
516
|
-
const HeaderCell = React.forwardRef((
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
} = _ref;
|
|
505
|
+
const HeaderCell = React.forwardRef(({
|
|
506
|
+
hidden,
|
|
507
|
+
isMinimum,
|
|
508
|
+
isTruncated,
|
|
509
|
+
hasOverflow,
|
|
510
|
+
...props
|
|
511
|
+
}, ref) => {
|
|
524
512
|
const {
|
|
525
513
|
size
|
|
526
514
|
} = useTableContext();
|
|
@@ -576,16 +564,15 @@ const OverflowButton = React.forwardRef((props, ref) => {
|
|
|
576
564
|
});
|
|
577
565
|
OverflowButton.displayName = 'Table.OverflowButton';
|
|
578
566
|
|
|
579
|
-
const Row = React.forwardRef((
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
} = _ref;
|
|
567
|
+
const Row = React.forwardRef(({
|
|
568
|
+
onFocus,
|
|
569
|
+
onBlur,
|
|
570
|
+
isSelected,
|
|
571
|
+
isStriped,
|
|
572
|
+
isHovered,
|
|
573
|
+
isFocused: focused,
|
|
574
|
+
...otherProps
|
|
575
|
+
}, ref) => {
|
|
589
576
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
590
577
|
const {
|
|
591
578
|
size,
|
|
@@ -667,14 +654,13 @@ var SvgSortFill = function SvgSortFill(props) {
|
|
|
667
654
|
const SIZE = ['small', 'medium', 'large'];
|
|
668
655
|
const SORT = ['asc', 'desc'];
|
|
669
656
|
|
|
670
|
-
const SortableCell = React.forwardRef((
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
} = _ref;
|
|
657
|
+
const SortableCell = React.forwardRef(({
|
|
658
|
+
sort,
|
|
659
|
+
cellProps = {},
|
|
660
|
+
width,
|
|
661
|
+
children,
|
|
662
|
+
...sortableButtonProps
|
|
663
|
+
}, ref) => {
|
|
678
664
|
const {
|
|
679
665
|
isMinimum,
|
|
680
666
|
isTruncated,
|
|
@@ -706,12 +692,11 @@ SortableCell.propTypes = {
|
|
|
706
692
|
width: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number])
|
|
707
693
|
};
|
|
708
694
|
|
|
709
|
-
const TableComponent = React__namespace.default.forwardRef((
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
} = _ref;
|
|
695
|
+
const TableComponent = React__namespace.default.forwardRef(({
|
|
696
|
+
isReadOnly,
|
|
697
|
+
size = 'medium',
|
|
698
|
+
...props
|
|
699
|
+
}, ref) => {
|
|
715
700
|
const tableContextValue = React.useMemo(() => ({
|
|
716
701
|
size: size,
|
|
717
702
|
isReadOnly: isReadOnly
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tables",
|
|
3
|
-
"version": "9.12.
|
|
3
|
+
"version": "9.12.4",
|
|
4
4
|
"description": "Components relating to tables in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zendeskgarden/container-utilities": "^2.0.
|
|
25
|
-
"@zendeskgarden/react-buttons": "^9.12.
|
|
24
|
+
"@zendeskgarden/container-utilities": "^2.0.4",
|
|
25
|
+
"@zendeskgarden/react-buttons": "^9.12.4",
|
|
26
26
|
"dom-helpers": "^5.1.0",
|
|
27
27
|
"polished": "^4.3.1",
|
|
28
28
|
"prop-types": "^15.5.7"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"styled-components": "^5.3.1 || ^6.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@zendeskgarden/react-theming": "^9.12.
|
|
38
|
-
"@zendeskgarden/svg-icons": "7.
|
|
37
|
+
"@zendeskgarden/react-theming": "^9.12.4",
|
|
38
|
+
"@zendeskgarden/svg-icons": "7.6.0"
|
|
39
39
|
},
|
|
40
40
|
"keywords": [
|
|
41
41
|
"components",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "e79e9687e6bcbd097c059add2938cdae59a5173b"
|
|
51
51
|
}
|