@zendeskgarden/react-tables 9.0.0-next.8 → 9.0.0

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.
Files changed (45) hide show
  1. package/dist/esm/elements/Body.js +1 -1
  2. package/dist/esm/elements/Caption.js +1 -1
  3. package/dist/esm/elements/Cell.js +8 -2
  4. package/dist/esm/elements/GroupRow.js +2 -2
  5. package/dist/esm/elements/Head.js +11 -4
  6. package/dist/esm/elements/HeaderCell.js +8 -2
  7. package/dist/esm/elements/HeaderRow.js +2 -2
  8. package/dist/esm/elements/OverflowButton.js +10 -28
  9. package/dist/esm/elements/Row.js +14 -6
  10. package/dist/esm/elements/SortableCell.js +14 -6
  11. package/dist/esm/elements/Table.js +9 -4
  12. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/sort-fill.svg.js +1 -1
  13. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/sort-stroke.svg.js +1 -1
  14. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-vertical-stroke.svg.js +25 -0
  15. package/dist/esm/styled/StyledBaseRow.js +43 -0
  16. package/dist/esm/styled/StyledBody.js +2 -5
  17. package/dist/esm/styled/StyledCaption.js +2 -5
  18. package/dist/esm/styled/StyledCell.js +5 -8
  19. package/dist/esm/styled/StyledGroupRow.js +20 -7
  20. package/dist/esm/styled/StyledHead.js +19 -9
  21. package/dist/esm/styled/StyledHeaderCell.js +5 -8
  22. package/dist/esm/styled/StyledHeaderRow.js +20 -10
  23. package/dist/esm/styled/StyledHiddenCell.js +2 -5
  24. package/dist/esm/styled/StyledOverflowButton.js +7 -35
  25. package/dist/esm/styled/StyledRow.js +71 -30
  26. package/dist/esm/styled/StyledSortableButton.js +62 -51
  27. package/dist/esm/styled/StyledTable.js +6 -6
  28. package/dist/esm/styled/style-utils.js +2 -2
  29. package/dist/index.cjs.js +390 -303
  30. package/dist/typings/elements/OverflowButton.d.ts +2 -10
  31. package/dist/typings/elements/Table.d.ts +1 -1
  32. package/dist/typings/styled/StyledBaseRow.d.ts +11 -0
  33. package/dist/typings/styled/StyledCell.d.ts +5 -2
  34. package/dist/typings/styled/StyledGroupRow.d.ts +7 -3
  35. package/dist/typings/styled/StyledHead.d.ts +1 -1
  36. package/dist/typings/styled/StyledHeaderRow.d.ts +7 -3
  37. package/dist/typings/styled/StyledOverflowButton.d.ts +6 -9
  38. package/dist/typings/styled/StyledRow.d.ts +10 -8
  39. package/dist/typings/styled/StyledSortableButton.d.ts +5 -4
  40. package/dist/typings/styled/StyledTable.d.ts +4 -6
  41. package/dist/typings/styled/index.d.ts +1 -1
  42. package/dist/typings/styled/style-utils.d.ts +1 -1
  43. package/package.json +8 -8
  44. package/LICENSE.md +0 -176
  45. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/overflow-stroke.svg.js +0 -36
@@ -6,18 +6,15 @@
6
6
  */
7
7
  import styled from 'styled-components';
8
8
  import { hideVisually } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'tables.hidden_cell';
12
12
  const StyledHiddenCell = styled.div.attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.0.0-next.8'
14
+ 'data-garden-version': '9.0.0'
15
15
  }).withConfig({
16
16
  displayName: "StyledHiddenCell",
17
17
  componentId: "sc-1x454xw-0"
18
18
  })(["", " ", ";"], hideVisually(), props => retrieveComponentStyles(COMPONENT_ID, props));
19
- StyledHiddenCell.defaultProps = {
20
- theme: DEFAULT_THEME
21
- };
22
19
 
23
20
  export { StyledHiddenCell };
@@ -4,48 +4,20 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import styled, { css } from 'styled-components';
7
+ import styled from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles } from '@zendeskgarden/react-theming';
9
+ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
10
10
  import { getRowHeight } from './style-utils.js';
11
+ import { IconButton } from '@zendeskgarden/react-buttons';
11
12
 
12
13
  const COMPONENT_ID = 'tables.overflow_button';
13
14
  const OVERFLOW_BUTTON_SIZE = '2em';
14
- const colorStyles = props => {
15
- const hoverBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.08);
16
- const hoverForegroundColor = getColorV8('neutralHue', 700, props.theme);
17
- const activeBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.2);
18
- const activeForegroundColor = getColorV8('neutralHue', 800, props.theme);
19
- let foregroundColor;
20
- if (props.isHovered) {
21
- foregroundColor = hoverForegroundColor;
22
- } else if (props.isActive) {
23
- foregroundColor = activeForegroundColor;
24
- } else {
25
- foregroundColor = getColorV8('neutralHue', 600, props.theme);
26
- }
27
- return css(["color:", ";&:hover{background-color:", ";color:", ";}", " &:active{background-color:", ";color:", ";}"], foregroundColor, hoverBackgroundColor, hoverForegroundColor, focusStyles({
28
- theme: props.theme,
29
- inset: true
30
- }), activeBackgroundColor, activeForegroundColor);
31
- };
32
- const StyledOverflowButton = styled.button.attrs({
15
+ const StyledOverflowButton = styled(IconButton).attrs({
33
16
  'data-garden-id': COMPONENT_ID,
34
- 'data-garden-version': '9.0.0-next.8',
35
- type: 'button'
17
+ 'data-garden-version': '9.0.0'
36
18
  }).withConfig({
37
19
  displayName: "StyledOverflowButton",
38
20
  componentId: "sc-1eba2ml-0"
39
- })(["display:block;transition:background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out;z-index:", ";margin-top:calc(", " - 1em);border:none;border-radius:50%;background-color:transparent;cursor:pointer;padding:0;width:100%;height:", ";text-decoration:none;font-size:inherit;", " ", ";"], props => props.isActive ? '1' : '0', props => math(`${getRowHeight(props)} / 2`), OVERFLOW_BUTTON_SIZE, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
40
- StyledOverflowButton.defaultProps = {
41
- theme: DEFAULT_THEME
42
- };
43
- const StyledOverflowButtonIconWrapper = styled.div.withConfig({
44
- displayName: "StyledOverflowButton__StyledOverflowButtonIconWrapper",
45
- componentId: "sc-1eba2ml-1"
46
- })(["display:flex;align-items:center;justify-content:center;transform:rotate(90deg);transition:background-color 0.1s ease-in-out;width:", ";height:", ";"], OVERFLOW_BUTTON_SIZE, OVERFLOW_BUTTON_SIZE);
47
- StyledOverflowButtonIconWrapper.defaultProps = {
48
- theme: DEFAULT_THEME
49
- };
21
+ })(["margin-top:calc(", " - 1em);width:100%;min-width:unset;height:", ";font-size:inherit;", ";"], props => math(`${getRowHeight(props)} / 2`), OVERFLOW_BUTTON_SIZE, props => retrieveComponentStyles(COMPONENT_ID, props));
50
22
 
51
- export { StyledOverflowButton, StyledOverflowButtonIconWrapper };
23
+ export { StyledOverflowButton };
@@ -5,32 +5,74 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { getColorV8, DEFAULT_THEME, retrieveComponentStyles } from '@zendeskgarden/react-theming';
8
+ import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
9
9
  import { StyledCell } from './StyledCell.js';
10
+ import { StyledBaseRow } from './StyledBaseRow.js';
10
11
  import { StyledOverflowButton } from './StyledOverflowButton.js';
11
12
  import { getRowHeight } from './style-utils.js';
12
13
 
13
14
  const COMPONENT_ID = 'tables.row';
14
- const StyledBaseRow = styled.tr.withConfig({
15
- displayName: "StyledRow__StyledBaseRow",
16
- componentId: "sc-ek66ow-0"
17
- })(["display:table-row;transition:background-color 0.1s ease-in-out;border-bottom:", ";background-color:", ";vertical-align:top;box-sizing:border-box;"], props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 200, props.theme)}`, props => props.isStriped && getColorV8('neutralHue', 100, props.theme));
18
- StyledBaseRow.defaultProps = {
19
- theme: DEFAULT_THEME
20
- };
21
- const colorStyles = props => {
22
- const boxShadow = `inset ${props.theme.rtl ? '-' : ''}${props.theme.shadowWidths.md} 0 0 0 ${getColorV8('primaryHue', 600, props.theme)}`;
23
- const hoveredBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.08);
24
- const hoveredBorderColor = getColorV8('primaryHue', 200, props.theme);
25
- const selectedBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.2);
26
- const selectedBorderColor = getColorV8('primaryHue', 300, props.theme);
27
- const hoveredSelectedBackgroundColor = getColorV8('primaryHue', 600, props.theme, 0.28);
15
+ const colorStyles = _ref => {
16
+ let {
17
+ theme,
18
+ $isFocused,
19
+ $isSelected,
20
+ $isHovered,
21
+ $isReadOnly
22
+ } = _ref;
23
+ const hoveredBackgroundColor = getColor({
24
+ variable: 'background.primaryEmphasis',
25
+ transparency: theme.opacity[100],
26
+ dark: {
27
+ offset: -100
28
+ },
29
+ theme
30
+ });
31
+ const hoveredBorderColor = getColor({
32
+ variable: 'border.primaryEmphasis',
33
+ transparency: theme.opacity[200],
34
+ dark: {
35
+ offset: -100
36
+ },
37
+ theme
38
+ });
39
+ const selectedBackgroundColor = getColor({
40
+ variable: 'background.primaryEmphasis',
41
+ transparency: theme.opacity[200],
42
+ dark: {
43
+ offset: -100
44
+ },
45
+ theme
46
+ });
47
+ const selectedBorderColor = getColor({
48
+ variable: 'border.primaryEmphasis',
49
+ light: {
50
+ offset: -400
51
+ },
52
+ dark: {
53
+ offset: 300
54
+ },
55
+ theme
56
+ });
57
+ const hoveredSelectedBackgroundColor = getColor({
58
+ variable: 'background.primaryEmphasis',
59
+ transparency: theme.opacity[300],
60
+ dark: {
61
+ offset: -100
62
+ },
63
+ theme
64
+ });
65
+ const boxShadowColor = getColor({
66
+ variable: 'border.primaryEmphasis',
67
+ theme
68
+ });
69
+ const boxShadow = `inset ${theme.rtl ? '-' : ''}${theme.shadowWidths.md} 0 0 0 ${boxShadowColor}`;
28
70
  let backgroundColor = undefined;
29
71
  let borderColor = undefined;
30
72
  let hoverBorderBottomColor = undefined;
31
73
  let hoverBackgroundColor = undefined;
32
- if (props.isSelected) {
33
- if (props.isHovered) {
74
+ if ($isSelected) {
75
+ if ($isHovered) {
34
76
  backgroundColor = hoveredSelectedBackgroundColor;
35
77
  } else {
36
78
  backgroundColor = selectedBackgroundColor;
@@ -38,25 +80,24 @@ const colorStyles = props => {
38
80
  borderColor = selectedBorderColor;
39
81
  hoverBorderBottomColor = selectedBorderColor;
40
82
  hoverBackgroundColor = hoveredSelectedBackgroundColor;
41
- } else if (props.isHovered) {
83
+ } else if ($isHovered) {
42
84
  backgroundColor = hoveredBackgroundColor;
43
85
  borderColor = hoveredBorderColor;
44
- } else if (!props.isReadOnly) {
86
+ } else if (!$isReadOnly) {
45
87
  hoverBorderBottomColor = hoveredBorderColor;
46
88
  hoverBackgroundColor = hoveredBackgroundColor;
47
89
  }
48
- return css(["border-bottom-color:", ";background-color:", ";&:hover{border-bottom-color:", ";background-color:", ";", "{opacity:1;}}&:focus{outline:none;}", ":first-of-type{box-shadow:", ";&:focus{box-shadow:", ";}}"], borderColor, backgroundColor, hoverBorderBottomColor, hoverBackgroundColor, StyledOverflowButton, StyledCell, props.isFocused && boxShadow, boxShadow);
90
+ return css(["border-bottom-color:", ";background-color:", ";&:hover{border-bottom-color:", ";background-color:", ";", "{opacity:1;}}&:focus{outline:none;}", ":first-of-type{box-shadow:", ";&:focus{box-shadow:", ";}}"], borderColor, backgroundColor, hoverBorderBottomColor, hoverBackgroundColor, StyledOverflowButton, StyledCell, $isFocused && boxShadow, boxShadow);
91
+ };
92
+ const sizeStyles = props => {
93
+ return css(["height:", ";"], getRowHeight(props));
49
94
  };
50
- const StyledRow = styled(StyledBaseRow).attrs(props => ({
95
+ const StyledRow = styled(StyledBaseRow).attrs({
51
96
  'data-garden-id': COMPONENT_ID,
52
- 'data-garden-version': '9.0.0-next.8',
53
- tabIndex: props.isReadOnly ? undefined : -1
54
- })).withConfig({
97
+ 'data-garden-version': '9.0.0'
98
+ }).withConfig({
55
99
  displayName: "StyledRow",
56
- componentId: "sc-ek66ow-1"
57
- })(["height:", ";", " ", ";"], getRowHeight, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
58
- StyledRow.defaultProps = {
59
- theme: DEFAULT_THEME
60
- };
100
+ componentId: "sc-ek66ow-0"
101
+ })(["", " ", " ", ";"], sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
61
102
 
62
- export { StyledBaseRow, StyledRow };
103
+ export { StyledRow };
@@ -4,78 +4,89 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import styled from 'styled-components';
7
+ import styled, { css } from 'styled-components';
8
8
  import { math } from 'polished';
9
- import { DEFAULT_THEME, getColorV8, SELECTOR_FOCUS_VISIBLE, focusStyles, retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
+ import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, getColor, focusStyles } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'tables.sortable';
12
12
  const StyledBaseIconWrapper = styled.div.withConfig({
13
13
  displayName: "StyledSortableButton__StyledBaseIconWrapper",
14
14
  componentId: "sc-2s1dli-0"
15
15
  })(["display:flex;position:absolute;top:0;", ":0;align-items:center;justify-content:center;opacity:0;width:", ";height:100%;color:inherit;fill:inherit;"], props => props.theme.rtl ? 'left' : 'right', props => props.theme.iconSizes.sm);
16
- StyledBaseIconWrapper.defaultProps = {
17
- theme: DEFAULT_THEME
18
- };
19
16
  const StyledSortableStrokeIconWrapper = styled(StyledBaseIconWrapper).withConfig({
20
17
  displayName: "StyledSortableButton__StyledSortableStrokeIconWrapper",
21
18
  componentId: "sc-2s1dli-1"
22
19
  })([""]);
23
- StyledSortableStrokeIconWrapper.defaultProps = {
24
- theme: DEFAULT_THEME
25
- };
26
20
  const StyledSortableFillIconWrapper = styled(StyledBaseIconWrapper).withConfig({
27
21
  displayName: "StyledSortableButton__StyledSortableFillIconWrapper",
28
22
  componentId: "sc-2s1dli-2"
29
23
  })([""]);
30
- StyledSortableFillIconWrapper.defaultProps = {
31
- theme: DEFAULT_THEME
24
+ const colorStyles = _ref => {
25
+ let {
26
+ theme,
27
+ $sort
28
+ } = _ref;
29
+ const fgInactive = getColor({
30
+ variable: 'foreground.subtle',
31
+ transparency: theme.opacity[200],
32
+ theme
33
+ });
34
+ const fgActive = getColor({
35
+ variable: 'foreground.subtle',
36
+ theme
37
+ });
38
+ const fgPrimaryActive = getColor({
39
+ variable: 'foreground.primary',
40
+ theme
41
+ });
42
+ const fgPrimaryInactive = getColor({
43
+ variable: 'foreground.primary',
44
+ theme,
45
+ dark: {
46
+ offset: -100
47
+ },
48
+ transparency: theme.opacity[200]
49
+ });
50
+ let color = fgActive;
51
+ let fill = fgActive;
52
+ if ($sort === 'asc') {
53
+ color = fgActive;
54
+ fill = fgInactive;
55
+ } else if ($sort === 'desc') {
56
+ color = fgInactive;
57
+ fill = fgActive;
58
+ }
59
+ return css(["", "{color:", ";fill:", ";}", "{color:", ";fill:", ";}&:hover,", "{color:", ";", ";", " ", "}", ""], StyledSortableStrokeIconWrapper, fgActive, fgActive, StyledSortableFillIconWrapper, color, fill, SELECTOR_FOCUS_VISIBLE, fgPrimaryActive, $sort === undefined && `
60
+ ${StyledSortableFillIconWrapper} {
61
+ opacity: 1;
62
+ color: ${fgPrimaryActive};
63
+ fill: ${fgPrimaryActive};
64
+ }
65
+
66
+ ${StyledSortableStrokeIconWrapper} {
67
+ opacity: 0;
68
+ }
69
+ `, $sort === 'asc' && `
70
+ ${StyledSortableFillIconWrapper} {
71
+ color: ${fgPrimaryActive};
72
+ fill: ${fgPrimaryInactive};
73
+ }
74
+ `, $sort === 'desc' && `
75
+ ${StyledSortableFillIconWrapper} {
76
+ color: ${fgPrimaryInactive};
77
+ fill: ${fgPrimaryActive};
78
+ }
79
+ `, focusStyles({
80
+ theme
81
+ }));
32
82
  };
33
83
  const StyledSortableButton = styled.button.attrs({
34
84
  'data-garden-id': COMPONENT_ID,
35
- 'data-garden-version': '9.0.0-next.8',
85
+ 'data-garden-version': '9.0.0',
36
86
  type: 'button'
37
87
  }).withConfig({
38
88
  displayName: "StyledSortableButton",
39
89
  componentId: "sc-2s1dli-3"
40
- })(["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:", ";color:", ";fill:", ";}&:hover,", "{text-decoration:none;color:", ";", ";", " ", "}", " ", ";"], 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, props => {
41
- if (props.sort === 'asc') {
42
- return getColorV8('neutralHue', 600, props.theme);
43
- } else if (props.sort === 'desc') {
44
- return getColorV8('neutralHue', 400, props.theme);
45
- }
46
- return undefined;
47
- }, props => {
48
- if (props.sort === 'asc') {
49
- return getColorV8('neutralHue', 400, props.theme);
50
- } else if (props.sort === 'desc') {
51
- return getColorV8('neutralHue', 600, props.theme);
52
- }
53
- return undefined;
54
- }, SELECTOR_FOCUS_VISIBLE, props => getColorV8('primaryHue', 600, props.theme), props => props.sort === undefined && `
55
- ${StyledSortableFillIconWrapper} {
56
- opacity: 1;
57
- color: ${getColorV8('primaryHue', 600, props.theme)};
58
- fill: ${getColorV8('primaryHue', 600, props.theme)};
59
- }
60
-
61
- ${StyledSortableStrokeIconWrapper} {
62
- opacity: 0;
63
- }
64
- `, props => props.sort === 'asc' && `
65
- ${StyledSortableFillIconWrapper} {
66
- color: ${getColorV8('primaryHue', 600, props.theme)};
67
- fill: ${getColorV8('primaryHue', 600, props.theme, 0.25)};
68
- }
69
- `, props => props.sort === 'desc' && `
70
- ${StyledSortableFillIconWrapper} {
71
- color: ${getColorV8('primaryHue', 600, props.theme, 0.25)};
72
- fill: ${getColorV8('primaryHue', 600, props.theme)};
73
- }
74
- `, props => focusStyles({
75
- theme: props.theme
76
- }), props => retrieveComponentStyles(COMPONENT_ID, props));
77
- StyledSortableButton.defaultProps = {
78
- theme: DEFAULT_THEME
79
- };
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, props => retrieveComponentStyles(COMPONENT_ID, props));
80
91
 
81
92
  export { StyledSortableButton, StyledSortableFillIconWrapper, StyledSortableStrokeIconWrapper };
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled from 'styled-components';
8
- import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
8
+ import { getColor, retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const COMPONENT_ID = 'tables.table';
11
11
  const getLineHeight = props => {
@@ -13,13 +13,13 @@ const getLineHeight = props => {
13
13
  };
14
14
  const StyledTable = styled.table.attrs({
15
15
  'data-garden-id': COMPONENT_ID,
16
- 'data-garden-version': '9.0.0-next.8'
16
+ 'data-garden-version': '9.0.0'
17
17
  }).withConfig({
18
18
  displayName: "StyledTable",
19
19
  componentId: "sc-gje7na-0"
20
- })(["display:table;border:none;width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;line-height:", ";color:", ";font-size:", ";direction:", ";", ";"], props => getLineHeight(props), props => getColorV8('foreground', 600 , props.theme), props => props.theme.fontSizes.md, props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(COMPONENT_ID, props));
21
- StyledTable.defaultProps = {
22
- theme: DEFAULT_THEME
23
- };
20
+ })(["display:table;border:none;width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;line-height:", ";color:", ";font-size:", ";direction:", ";", ";"], props => getLineHeight(props), props => getColor({
21
+ variable: 'foreground.default',
22
+ theme: props.theme
23
+ }), props => props.theme.fontSizes.md, props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(COMPONENT_ID, props));
24
24
 
25
25
  export { StyledTable, getLineHeight };
@@ -5,9 +5,9 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  const getRowHeight = props => {
8
- if (props.size === 'large') {
8
+ if (props.$size === 'large') {
9
9
  return `${props.theme.space.base * 16}px`;
10
- } else if (props.size === 'small') {
10
+ } else if (props.$size === 'small') {
11
11
  return `${props.theme.space.base * 8}px`;
12
12
  }
13
13
  return `${props.theme.space.base * 10}px`;