baseui 10.2.1 → 10.6.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 (142) hide show
  1. package/button/styled-components.js +1 -1
  2. package/button/styled-components.js.flow +4 -1
  3. package/data-table/data-table.js +13 -3
  4. package/data-table/data-table.js.flow +20 -4
  5. package/data-table/types.js.flow +2 -1
  6. package/datepicker/calendar-header.js +227 -95
  7. package/datepicker/calendar-header.js.flow +270 -139
  8. package/datepicker/constants.js +4 -2
  9. package/datepicker/constants.js.flow +2 -0
  10. package/datepicker/day.js +1 -0
  11. package/datepicker/day.js.flow +1 -0
  12. package/datepicker/index.d.ts +1 -0
  13. package/datepicker/types.js.flow +1 -0
  14. package/datepicker/utils/calendar-header-helpers.js +51 -0
  15. package/datepicker/utils/calendar-header-helpers.js.flow +53 -0
  16. package/dnd-list/index.js.flow +2 -1
  17. package/drawer/close-icon.js +3 -2
  18. package/drawer/close-icon.js.flow +2 -2
  19. package/drawer/drawer.js +5 -2
  20. package/drawer/drawer.js.flow +2 -2
  21. package/es/button/styled-components.js +1 -1
  22. package/es/data-table/data-table.js +13 -3
  23. package/es/datepicker/calendar-header.js +184 -84
  24. package/es/datepicker/constants.js +2 -1
  25. package/es/datepicker/day.js +1 -0
  26. package/es/datepicker/utils/calendar-header-helpers.js +34 -0
  27. package/es/dnd-list/index.js +2 -1
  28. package/es/drawer/close-icon.js +3 -2
  29. package/es/drawer/drawer.js +5 -2
  30. package/es/list/list-heading.js +17 -6
  31. package/es/map-marker/constants.js +69 -0
  32. package/es/map-marker/fixed-marker.js +98 -0
  33. package/es/map-marker/floating-marker.js +65 -0
  34. package/es/map-marker/index.js +9 -0
  35. package/es/map-marker/pin-head.js +108 -0
  36. package/es/map-marker/styled-components.js +156 -0
  37. package/es/map-marker/types.js +8 -0
  38. package/es/popover/stateful-container.js +4 -0
  39. package/es/rating/emoticon-rating.js +3 -1
  40. package/es/rating/star-rating.js +3 -1
  41. package/es/select/select-component.js +20 -6
  42. package/es/select/styled-components.js +34 -4
  43. package/es/snackbar/snackbar-context.js +16 -4
  44. package/es/spinner/styled-components.js +1 -1
  45. package/es/table-semantic/styled-components.js +6 -4
  46. package/es/table-semantic/table-builder.js +3 -0
  47. package/es/themes/dark-theme/color-component-tokens.js +1 -1
  48. package/es/themes/dark-theme/color-semantic-tokens.js +8 -7
  49. package/es/themes/light-theme/color-component-tokens.js +9 -9
  50. package/es/themes/light-theme/color-semantic-tokens.js +3 -2
  51. package/es/tokens/colors.js +2 -2
  52. package/es/tooltip/styled-components.js +8 -0
  53. package/esm/button/styled-components.js +1 -1
  54. package/esm/data-table/data-table.js +13 -3
  55. package/esm/datepicker/calendar-header.js +226 -95
  56. package/esm/datepicker/constants.js +2 -1
  57. package/esm/datepicker/day.js +1 -0
  58. package/esm/datepicker/utils/calendar-header-helpers.js +45 -0
  59. package/esm/dnd-list/index.js +2 -1
  60. package/esm/drawer/close-icon.js +3 -2
  61. package/esm/drawer/drawer.js +5 -2
  62. package/esm/list/list-heading.js +17 -6
  63. package/esm/map-marker/constants.js +62 -0
  64. package/esm/map-marker/fixed-marker.js +137 -0
  65. package/esm/map-marker/floating-marker.js +94 -0
  66. package/esm/map-marker/index.js +9 -0
  67. package/esm/map-marker/pin-head.js +144 -0
  68. package/esm/map-marker/styled-components.js +168 -0
  69. package/esm/map-marker/types.js +8 -0
  70. package/esm/popover/stateful-container.js +4 -0
  71. package/esm/rating/emoticon-rating.js +2 -2
  72. package/esm/rating/star-rating.js +2 -2
  73. package/esm/select/select-component.js +19 -6
  74. package/esm/select/styled-components.js +28 -4
  75. package/esm/snackbar/snackbar-context.js +16 -4
  76. package/esm/spinner/styled-components.js +1 -1
  77. package/esm/table-semantic/styled-components.js +6 -4
  78. package/esm/table-semantic/table-builder.js +3 -0
  79. package/esm/themes/dark-theme/color-component-tokens.js +1 -1
  80. package/esm/themes/dark-theme/color-semantic-tokens.js +8 -7
  81. package/esm/themes/light-theme/color-component-tokens.js +9 -9
  82. package/esm/themes/light-theme/color-semantic-tokens.js +3 -2
  83. package/esm/tokens/colors.js +2 -2
  84. package/esm/tooltip/styled-components.js +8 -0
  85. package/index.d.ts +1 -0
  86. package/link/index.d.ts +1 -0
  87. package/list/index.d.ts +36 -0
  88. package/list/list-heading.js +24 -7
  89. package/list/list-heading.js.flow +17 -8
  90. package/map-marker/constants.js +82 -0
  91. package/map-marker/constants.js.flow +74 -0
  92. package/map-marker/fixed-marker.js +152 -0
  93. package/map-marker/fixed-marker.js.flow +137 -0
  94. package/map-marker/floating-marker.js +109 -0
  95. package/map-marker/floating-marker.js.flow +102 -0
  96. package/map-marker/index.d.ts +104 -0
  97. package/map-marker/index.js +55 -0
  98. package/map-marker/index.js.flow +23 -0
  99. package/map-marker/package.json +4 -0
  100. package/map-marker/pin-head.js +159 -0
  101. package/map-marker/pin-head.js.flow +155 -0
  102. package/map-marker/styled-components.js +184 -0
  103. package/map-marker/styled-components.js.flow +177 -0
  104. package/map-marker/types.js +11 -0
  105. package/map-marker/types.js.flow +114 -0
  106. package/menu/index.d.ts +7 -0
  107. package/menu/types.js.flow +12 -0
  108. package/package.json +3 -2
  109. package/popover/stateful-container.js +4 -0
  110. package/popover/stateful-container.js.flow +3 -0
  111. package/rating/emoticon-rating.js +2 -2
  112. package/rating/emoticon-rating.js.flow +4 -1
  113. package/rating/star-rating.js +2 -2
  114. package/rating/star-rating.js.flow +4 -1
  115. package/select/select-component.js +19 -6
  116. package/select/select-component.js.flow +19 -6
  117. package/select/styled-components.js +28 -4
  118. package/select/styled-components.js.flow +30 -2
  119. package/select/types.js.flow +9 -0
  120. package/snackbar/snackbar-context.js +15 -4
  121. package/snackbar/snackbar-context.js.flow +15 -3
  122. package/spinner/styled-components.js +1 -1
  123. package/spinner/styled-components.js.flow +1 -1
  124. package/table-semantic/index.d.ts +1 -0
  125. package/table-semantic/styled-components.js +6 -4
  126. package/table-semantic/styled-components.js.flow +6 -4
  127. package/table-semantic/table-builder.js +3 -0
  128. package/table-semantic/table-builder.js.flow +3 -0
  129. package/theme.ts +2 -0
  130. package/themes/dark-theme/color-component-tokens.js +1 -1
  131. package/themes/dark-theme/color-component-tokens.js.flow +1 -1
  132. package/themes/dark-theme/color-semantic-tokens.js +8 -7
  133. package/themes/dark-theme/color-semantic-tokens.js.flow +7 -6
  134. package/themes/light-theme/color-component-tokens.js +9 -9
  135. package/themes/light-theme/color-component-tokens.js.flow +9 -9
  136. package/themes/light-theme/color-semantic-tokens.js +3 -2
  137. package/themes/light-theme/color-semantic-tokens.js.flow +2 -1
  138. package/themes/types.js.flow +1 -0
  139. package/tokens/colors.js +2 -2
  140. package/tokens/colors.js.flow +2 -2
  141. package/tooltip/styled-components.js +8 -0
  142. package/tooltip/styled-components.js.flow +8 -0
@@ -375,31 +375,61 @@ function getSvgStyles({
375
375
  export const StyledSelectArrow = styled('svg', props => {
376
376
  const {
377
377
  $theme,
378
- $disabled
378
+ $disabled,
379
+ $size
379
380
  } = props;
380
381
  const {
381
382
  colors
382
383
  } = $theme;
384
+ const sizes = {
385
+ [SIZE.mini]: 16,
386
+ [SIZE.compact]: 16,
387
+ [SIZE.default]: 20,
388
+ [SIZE.large]: 24
389
+ };
390
+ let size = sizes[SIZE.default];
391
+
392
+ if ($size) {
393
+ size = sizes[$size];
394
+ }
395
+
383
396
  return { ...getSvgStyles({
384
397
  $theme
385
398
  }),
386
399
  color: $disabled ? colors.inputTextDisabled : colors.contentPrimary,
387
- cursor: $disabled ? 'not-allowed' : 'pointer'
400
+ cursor: $disabled ? 'not-allowed' : 'pointer',
401
+ height: `${size}px`,
402
+ width: `${size}px`
388
403
  };
389
404
  });
390
405
  StyledSelectArrow.displayName = "StyledSelectArrow";
391
406
  export const StyledClearIcon = styled('svg', props => {
392
407
  const {
393
- $theme
408
+ $theme,
409
+ $size
394
410
  } = props;
395
411
  const {
396
412
  colors
397
413
  } = $theme;
414
+ const sizes = {
415
+ [SIZE.mini]: 15,
416
+ [SIZE.compact]: 15,
417
+ [SIZE.default]: 18,
418
+ [SIZE.large]: 22
419
+ };
420
+ let size = sizes[SIZE.default];
421
+
422
+ if ($size) {
423
+ size = sizes[$size];
424
+ }
425
+
398
426
  return { ...getSvgStyles({
399
427
  $theme
400
428
  }),
401
429
  color: colors.contentPrimary,
402
- cursor: 'pointer'
430
+ cursor: 'pointer',
431
+ height: `${size}px`,
432
+ width: `${size}px`
403
433
  };
404
434
  });
405
435
  StyledClearIcon.displayName = "StyledClearIcon";
@@ -31,6 +31,15 @@ export function useSnackbar() {
31
31
  dequeue: context.dequeue
32
32
  };
33
33
  }
34
+
35
+ function usePrevious(value) {
36
+ const ref = React.useRef();
37
+ React.useEffect(() => {
38
+ ref.current = value;
39
+ });
40
+ return ref.current;
41
+ }
42
+
34
43
  export default function SnackbarProvider({
35
44
  children,
36
45
  overrides = {},
@@ -46,10 +55,6 @@ export default function SnackbarProvider({
46
55
 
47
56
  function enqueue(elementProps, duration = defaultDuration) {
48
57
  setSnackbars(prev => {
49
- if (prev.length === 0) {
50
- enter(duration);
51
- }
52
-
53
58
  return [...prev, {
54
59
  elementProps,
55
60
  duration
@@ -57,6 +62,13 @@ export default function SnackbarProvider({
57
62
  });
58
63
  }
59
64
 
65
+ const prevSnackbars = usePrevious(snackbars) || [];
66
+ React.useEffect(() => {
67
+ if (prevSnackbars.length === 0 && snackbars.length >= 1) {
68
+ enter(snackbars[0].duration);
69
+ }
70
+ }, [snackbars, prevSnackbars]);
71
+
60
72
  function dequeue() {
61
73
  setContainerHeight(0);
62
74
  setSnackbars(prev => {
@@ -44,7 +44,7 @@ export const StyledActivePath = styled('path', props => ({
44
44
  })); // TODO(v11): Replace Spinner with SpinnerNext
45
45
 
46
46
  StyledActivePath.displayName = "StyledActivePath";
47
- export const StyledSpinnerNext = styled('div', ({
47
+ export const StyledSpinnerNext = styled('i', ({
48
48
  $theme,
49
49
  $size = SIZE.medium
50
50
  }) => {
@@ -67,7 +67,8 @@ StyledTableHeadRow.displayName = "StyledTableHeadRow";
67
67
  export const StyledTableHeadCell = styled('th', ({
68
68
  $theme,
69
69
  $size,
70
- $divider
70
+ $divider,
71
+ $isNumeric
71
72
  }) => {
72
73
  const borderDir = $theme.direction === 'rtl' ? 'Left' : 'Right';
73
74
  const borderVertical = $divider === DIVIDER.grid || $divider === DIVIDER.vertical;
@@ -81,7 +82,7 @@ export const StyledTableHeadCell = styled('th', ({
81
82
  paddingLeft: padding,
82
83
  backgroundColor: $theme.colors.tableHeadBackgroundColor,
83
84
  color: $theme.colors.contentPrimary,
84
- textAlign: $theme.direction === 'rtl' ? 'right' : 'left',
85
+ textAlign: $theme.direction === 'rtl' || $isNumeric ? 'right' : 'left',
85
86
  verticalAlign: 'top',
86
87
  whiteSpace: 'nowrap',
87
88
  zIndex: 1,
@@ -170,7 +171,8 @@ export const StyledTableBodyCell = styled('td', ({
170
171
  $size,
171
172
  $divider,
172
173
  $isNumeric,
173
- $isLastRow
174
+ $isLastRow,
175
+ $isSortable
174
176
  }) => {
175
177
  const borderDir = $theme.direction === 'rtl' ? 'Left' : 'Right';
176
178
  const borderVertical = $divider === DIVIDER.vertical || $divider === DIVIDER.grid;
@@ -178,7 +180,7 @@ export const StyledTableBodyCell = styled('td', ({
178
180
  const padding = sizeToCellPadding($theme, $size);
179
181
  return { ...$theme.typography.font200,
180
182
  paddingTop: padding,
181
- paddingRight: padding,
183
+ paddingRight: !$isSortable ? padding : $theme.sizing.scale1000,
182
184
  paddingBottom: padding,
183
185
  paddingLeft: padding,
184
186
  color: $theme.colors.contentPrimary,
@@ -79,6 +79,7 @@ export default class TableBuilder extends React.Component {
79
79
  $col: col,
80
80
  $colIndex: colIndex,
81
81
  $divider: divider,
82
+ $isNumeric: col.numeric,
82
83
  $size: size
83
84
  }, tableHeadCellProps, colTableHeadCellProps), col.header);
84
85
  }
@@ -117,6 +118,7 @@ export default class TableBuilder extends React.Component {
117
118
  $col: col,
118
119
  $colIndex: colIndex,
119
120
  $divider: divider,
121
+ $isNumeric: col.numeric,
120
122
  role: "button",
121
123
  tabIndex: "0",
122
124
  "aria-label": `${col.tableHeadAriaLabel || col.header}, ${sortLabel}`,
@@ -143,6 +145,7 @@ export default class TableBuilder extends React.Component {
143
145
  $rowIndex: rowIndex,
144
146
  $isNumeric: col.numeric,
145
147
  $isLastRow: rowIndex === lastRowindex,
148
+ $isSortable: col.sortable,
146
149
  $size: size
147
150
  }, tableBodyCellProps, colTableBodyCellProps), col.children(row, rowIndex));
148
151
  }
@@ -91,7 +91,7 @@ export default ((themePrimitives = colorTokens) => ({
91
91
  linkActive: themePrimitives.primary300,
92
92
  // List
93
93
  listHeaderFill: themePrimitives.mono600,
94
- listBodyFill: themePrimitives.mono700,
94
+ listBodyFill: themePrimitives.mono800,
95
95
  listIconFill: themePrimitives.mono100,
96
96
  listBorder: themePrimitives.mono500,
97
97
  // ProgressSteps
@@ -17,12 +17,12 @@ foundation = colorTokens) => {
17
17
  backgroundInversePrimary: foundation.primaryA,
18
18
  backgroundInverseSecondary: colors.gray300,
19
19
  // Content
20
- contentPrimary: foundation.primaryA,
21
- contentSecondary: colors.gray400,
22
- contentTertiary: colors.gray500,
23
- contentInversePrimary: foundation.primaryB,
24
- contentInverseSecondary: colors.gray600,
25
- contentInverseTertiary: colors.gray500,
20
+ contentPrimary: colors.white,
21
+ contentSecondary: colors.gray300,
22
+ contentTertiary: colors.gray400,
23
+ contentInversePrimary: colors.black,
24
+ contentInverseSecondary: colors.gray700,
25
+ contentInverseTertiary: colors.gray600,
26
26
  // Border
27
27
  borderOpaque: colors.gray700,
28
28
  borderTransparent: hexToRgba(foundation.primaryA, '0.08'),
@@ -69,7 +69,8 @@ foundation = colorTokens) => {
69
69
  rewardsTier1: colors.blue400,
70
70
  rewardsTier2: colors.yellow400,
71
71
  rewardsTier3: colors.platinum400,
72
- rewardsTier4: colors.gray200
72
+ rewardsTier4: colors.gray200,
73
+ membership: colors.yellow600
73
74
  };
74
75
  return { ...core,
75
76
  ...coreExtensions
@@ -20,32 +20,32 @@ export default ((themePrimitives = colorTokens) => ({
20
20
  buttonPrimaryActive: themePrimitives.primary600,
21
21
  buttonPrimarySelectedFill: themePrimitives.primary600,
22
22
  buttonPrimarySelectedText: themePrimitives.white,
23
- buttonPrimarySpinnerForeground: themePrimitives.primary50,
24
- buttonPrimarySpinnerBackground: themePrimitives.primary500,
23
+ buttonPrimarySpinnerForeground: themePrimitives.accent,
24
+ buttonPrimarySpinnerBackground: themePrimitives.primaryB,
25
25
  buttonSecondaryFill: themePrimitives.primary100,
26
26
  buttonSecondaryText: themePrimitives.primary,
27
27
  buttonSecondaryHover: themePrimitives.primary200,
28
28
  buttonSecondaryActive: themePrimitives.primary300,
29
29
  buttonSecondarySelectedFill: themePrimitives.primary300,
30
30
  buttonSecondarySelectedText: themePrimitives.primary,
31
- buttonSecondarySpinnerForeground: themePrimitives.primary700,
32
- buttonSecondarySpinnerBackground: themePrimitives.primary300,
31
+ buttonSecondarySpinnerForeground: themePrimitives.accent,
32
+ buttonSecondarySpinnerBackground: themePrimitives.primaryB,
33
33
  buttonTertiaryFill: 'transparent',
34
34
  buttonTertiaryText: themePrimitives.primary,
35
35
  buttonTertiaryHover: themePrimitives.primary50,
36
36
  buttonTertiaryActive: themePrimitives.primary100,
37
37
  buttonTertiarySelectedFill: themePrimitives.primary100,
38
38
  buttonTertiarySelectedText: themePrimitives.primary,
39
- buttonTertiarySpinnerForeground: themePrimitives.primary700,
40
- buttonTertiarySpinnerBackground: themePrimitives.primary300,
39
+ buttonTertiarySpinnerForeground: themePrimitives.accent,
40
+ buttonTertiarySpinnerBackground: themePrimitives.primary100,
41
41
  buttonMinimalFill: 'transparent',
42
42
  buttonMinimalText: themePrimitives.primary,
43
43
  buttonMinimalHover: themePrimitives.primary50,
44
44
  buttonMinimalActive: themePrimitives.primary100,
45
45
  buttonMinimalSelectedFill: themePrimitives.primary100,
46
46
  buttonMinimalSelectedText: themePrimitives.primary,
47
- buttonMinimalSpinnerForeground: themePrimitives.primary700,
48
- buttonMinimalSpinnerBackground: themePrimitives.primary300,
47
+ buttonMinimalSpinnerForeground: themePrimitives.accent,
48
+ buttonMinimalSpinnerBackground: themePrimitives.primary100,
49
49
  buttonDisabledFill: themePrimitives.mono200,
50
50
  buttonDisabledText: themePrimitives.mono600,
51
51
  buttonDisabledSpinnerForeground: themePrimitives.mono600,
@@ -91,7 +91,7 @@ export default ((themePrimitives = colorTokens) => ({
91
91
  linkActive: themePrimitives.primary500,
92
92
  // List
93
93
  listHeaderFill: themePrimitives.white,
94
- listBodyFill: themePrimitives.mono200,
94
+ listBodyFill: themePrimitives.white,
95
95
  listIconFill: themePrimitives.mono500,
96
96
  listBorder: themePrimitives.mono500,
97
97
  // ProgressSteps
@@ -52,7 +52,7 @@ foundation = colorTokens) => {
52
52
  contentOnColor: colors.white,
53
53
  contentOnColorInverse: colors.black,
54
54
  contentNegative: foundation.negative,
55
- contentWarning: colors.yellow700,
55
+ contentWarning: colors.yellow600,
56
56
  contentPositive: colors.green400,
57
57
  // Border
58
58
  borderStateDisabled: colors.gray50,
@@ -69,7 +69,8 @@ foundation = colorTokens) => {
69
69
  rewardsTier1: colors.blue400,
70
70
  rewardsTier2: colors.yellow400,
71
71
  rewardsTier3: colors.platinum400,
72
- rewardsTier4: colors.black
72
+ rewardsTier4: colors.black,
73
+ membership: colors.yellow600
73
74
  };
74
75
  return { ...core,
75
76
  ...coreExtensions
@@ -11,7 +11,7 @@ const colors = {
11
11
  gray200: '#E2E2E2',
12
12
  gray300: '#CBCBCB',
13
13
  gray400: '#AFAFAF',
14
- gray500: '#757575',
14
+ gray500: '#6B6B6B',
15
15
  gray600: '#545454',
16
16
  gray700: '#333333',
17
17
  gray800: '#1F1F1F',
@@ -48,7 +48,7 @@ const colors = {
48
48
  yellow300: '#FFCF70',
49
49
  yellow400: '#FFC043',
50
50
  yellow500: '#BC8B2C',
51
- yellow600: '#997328',
51
+ yellow600: '#996F00',
52
52
  yellow700: '#674D1B',
53
53
  green50: '#E6F2ED',
54
54
  green100: '#ADDEC9',
@@ -21,6 +21,10 @@ import { getEndPosition } from '../popover/utils.js';
21
21
  */
22
22
  export const Body = styled('div', props => ({ ...getBodyStyles(props),
23
23
  backgroundColor: props.$theme.colors.tooltipBackground,
24
+ borderTopLeftRadius: props.$theme.borders.radius300,
25
+ borderTopRightRadius: props.$theme.borders.radius300,
26
+ borderBottomRightRadius: props.$theme.borders.radius300,
27
+ borderBottomLeftRadius: props.$theme.borders.radius300,
24
28
  boxShadow: props.$theme.lighting.shadow400,
25
29
  color: props.$theme.colors.tooltipText,
26
30
  // Reset transition property to opacity only, and static transform
@@ -30,6 +34,10 @@ export const Body = styled('div', props => ({ ...getBodyStyles(props),
30
34
  Body.displayName = "Body";
31
35
  export const Inner = styled('div', props => ({ ...getInnerStyles(props),
32
36
  backgroundColor: props.$theme.colors.tooltipBackground,
37
+ borderTopLeftRadius: props.$theme.borders.radius300,
38
+ borderTopRightRadius: props.$theme.borders.radius300,
39
+ borderBottomRightRadius: props.$theme.borders.radius300,
40
+ borderBottomLeftRadius: props.$theme.borders.radius300,
33
41
  paddingTop: props.$theme.sizing.scale300,
34
42
  paddingBottom: props.$theme.sizing.scale300,
35
43
  paddingLeft: props.$theme.sizing.scale600,
@@ -45,7 +45,7 @@ export var BaseButton = styled('button', function (_ref) {
45
45
  cursor: 'pointer',
46
46
  ':disabled': {
47
47
  cursor: 'not-allowed',
48
- backgroundColor: $theme.colors.buttonDisabledFill,
48
+ backgroundColor: $kind === KIND.minimal || $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
49
49
  color: $theme.colors.buttonDisabledText
50
50
  },
51
51
  marginLeft: 0,
@@ -426,11 +426,12 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
426
426
  viewState = EMPTY;
427
427
  }
428
428
 
429
+ var highlightedRow = ctx.rows[ctx.rowHighlightIndex - 1];
429
430
  return /*#__PURE__*/React.createElement("div", {
430
431
  ref: ref,
431
432
  "data-baseweb": "data-table",
432
433
  style: props.style
433
- }, /*#__PURE__*/React.createElement(Headers, null), viewState === LOADING && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.loadingMessage), viewState === EMPTY && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.emptyMessage), viewState === RENDERING && props.children, ctx.rowActions && Boolean(ctx.rowActions.length) && ctx.rowHighlightIndex > 0 && Boolean(ctx.rows[ctx.rowHighlightIndex - 1]) && !ctx.isScrollingX && /*#__PURE__*/React.createElement("div", {
434
+ }, /*#__PURE__*/React.createElement(Headers, null), viewState === LOADING && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.loadingMessage), viewState === EMPTY && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.emptyMessage), viewState === RENDERING && props.children, ctx.rowActions && Boolean(ctx.rowActions.length) && ctx.rowHighlightIndex > 0 && Boolean(highlightedRow) && !ctx.isScrollingX && /*#__PURE__*/React.createElement("div", {
434
435
  style: {
435
436
  alignItems: 'center',
436
437
  backgroundColor: theme.colors.backgroundTertiary,
@@ -444,7 +445,12 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
444
445
  left: theme.direction === 'rtl' ? 0 : 'initial',
445
446
  top: (ctx.rowHighlightIndex - 1) * ctx.rowHeight + HEADER_ROW_HEIGHT
446
447
  }
447
- }, ctx.rowActions.map(function (rowAction) {
448
+ }, (typeof ctx.rowActions === 'function' ? ctx.rowActions(highlightedRow) : ctx.rowActions).map(function (rowAction) {
449
+ if (rowAction.renderButton) {
450
+ var RowActionButton = rowAction.renderButton;
451
+ return /*#__PURE__*/React.createElement(RowActionButton, null);
452
+ }
453
+
448
454
  var RowActionIcon = rowAction.renderIcon;
449
455
  return /*#__PURE__*/React.createElement(Button, {
450
456
  alt: rowAction.label,
@@ -461,7 +467,11 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
461
467
  overrides: {
462
468
  BaseButton: {
463
469
  style: {
464
- marginLeft: theme.sizing.scale300
470
+ marginLeft: theme.sizing.scale300,
471
+ paddingTop: theme.sizing.scale100,
472
+ paddingRight: theme.sizing.scale100,
473
+ paddingBottom: theme.sizing.scale100,
474
+ paddingLeft: theme.sizing.scale100
465
475
  }
466
476
  }
467
477
  }