baseui 10.3.0 → 10.7.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 (213) hide show
  1. package/app-nav-bar/user-menu.js +1 -0
  2. package/app-nav-bar/user-menu.js.flow +1 -0
  3. package/button/styled-components.js +1 -1
  4. package/button/styled-components.js.flow +4 -1
  5. package/card/styled-components.js +0 -1
  6. package/card/styled-components.js.flow +0 -1
  7. package/combobox/combobox.js +5 -1
  8. package/combobox/combobox.js.flow +4 -0
  9. package/combobox/index.d.ts +6 -3
  10. package/data-table/column-datetime.js +2 -0
  11. package/data-table/column-datetime.js.flow +2 -0
  12. package/data-table/data-table.js +13 -3
  13. package/data-table/data-table.js.flow +20 -4
  14. package/data-table/types.js.flow +2 -1
  15. package/datepicker/calendar-header.js +255 -109
  16. package/datepicker/calendar-header.js.flow +282 -145
  17. package/datepicker/calendar.js +6 -1
  18. package/datepicker/calendar.js.flow +5 -1
  19. package/datepicker/constants.js +9 -2
  20. package/datepicker/constants.js.flow +7 -0
  21. package/datepicker/datepicker.js +135 -73
  22. package/datepicker/datepicker.js.flow +161 -62
  23. package/datepicker/day.js +2 -0
  24. package/datepicker/day.js.flow +2 -0
  25. package/datepicker/index.d.ts +8 -0
  26. package/datepicker/month.js +4 -0
  27. package/datepicker/month.js.flow +3 -0
  28. package/datepicker/styled-components.js +116 -56
  29. package/datepicker/styled-components.js.flow +101 -36
  30. package/datepicker/types.js.flow +18 -1
  31. package/datepicker/utils/calendar-header-helpers.js +51 -0
  32. package/datepicker/utils/calendar-header-helpers.js.flow +53 -0
  33. package/datepicker/utils/date-helpers.js +1 -1
  34. package/datepicker/utils/date-helpers.js.flow +1 -1
  35. package/datepicker/week.js +1 -0
  36. package/datepicker/week.js.flow +1 -0
  37. package/dnd-list/index.js.flow +2 -1
  38. package/dnd-list/list.js +1 -2
  39. package/dnd-list/list.js.flow +1 -1
  40. package/dnd-list/styled-components.js +1 -1
  41. package/dnd-list/styled-components.js.flow +1 -0
  42. package/drawer/close-icon.js +3 -2
  43. package/drawer/close-icon.js.flow +2 -2
  44. package/drawer/drawer.js +5 -2
  45. package/drawer/drawer.js.flow +2 -2
  46. package/es/app-nav-bar/user-menu.js +1 -0
  47. package/es/button/styled-components.js +1 -1
  48. package/es/card/styled-components.js +0 -1
  49. package/es/combobox/combobox.js +5 -1
  50. package/es/data-table/column-datetime.js +2 -0
  51. package/es/data-table/data-table.js +13 -3
  52. package/es/datepicker/calendar-header.js +204 -93
  53. package/es/datepicker/calendar.js +7 -2
  54. package/es/datepicker/constants.js +6 -1
  55. package/es/datepicker/datepicker.js +70 -42
  56. package/es/datepicker/day.js +2 -0
  57. package/es/datepicker/month.js +3 -0
  58. package/es/datepicker/styled-components.js +98 -37
  59. package/es/datepicker/types.js +1 -1
  60. package/es/datepicker/utils/calendar-header-helpers.js +34 -0
  61. package/es/datepicker/utils/date-helpers.js +1 -1
  62. package/es/datepicker/week.js +1 -0
  63. package/es/dnd-list/index.js +2 -1
  64. package/es/dnd-list/list.js +1 -2
  65. package/es/dnd-list/styled-components.js +1 -0
  66. package/es/drawer/close-icon.js +3 -2
  67. package/es/drawer/drawer.js +5 -2
  68. package/es/helper/helper.js +1 -0
  69. package/es/layer/layer.js +8 -0
  70. package/es/list/list-heading.js +17 -6
  71. package/es/map-marker/constants.js +69 -0
  72. package/es/map-marker/fixed-marker.js +98 -0
  73. package/es/map-marker/floating-marker.js +65 -0
  74. package/es/map-marker/index.js +9 -0
  75. package/es/map-marker/pin-head.js +108 -0
  76. package/es/map-marker/styled-components.js +156 -0
  77. package/es/map-marker/types.js +8 -0
  78. package/es/menu/maybe-child-menu.js +1 -0
  79. package/es/popover/popover.js +6 -5
  80. package/es/popover/stateful-container.js +8 -2
  81. package/es/rating/emoticon-rating.js +3 -1
  82. package/es/rating/star-rating.js +3 -1
  83. package/es/select/select-component.js +20 -5
  84. package/es/select/styled-components.js +34 -4
  85. package/es/snackbar/snackbar-context.js +16 -4
  86. package/es/spinner/styled-components.js +1 -1
  87. package/es/table-semantic/styled-components.js +6 -4
  88. package/es/table-semantic/table-builder.js +3 -0
  89. package/es/themes/dark-theme/color-component-tokens.js +1 -1
  90. package/es/themes/light-theme/color-component-tokens.js +9 -9
  91. package/es/themes/shared/lighting.js +5 -1
  92. package/es/timepicker/timepicker.js +16 -11
  93. package/es/tooltip/styled-components.js +8 -0
  94. package/es/tooltip/tooltip.js +1 -0
  95. package/esm/app-nav-bar/user-menu.js +1 -0
  96. package/esm/button/styled-components.js +1 -1
  97. package/esm/card/styled-components.js +0 -1
  98. package/esm/combobox/combobox.js +5 -1
  99. package/esm/data-table/column-datetime.js +2 -0
  100. package/esm/data-table/data-table.js +13 -3
  101. package/esm/datepicker/calendar-header.js +255 -110
  102. package/esm/datepicker/calendar.js +7 -2
  103. package/esm/datepicker/constants.js +6 -1
  104. package/esm/datepicker/datepicker.js +136 -74
  105. package/esm/datepicker/day.js +2 -0
  106. package/esm/datepicker/month.js +3 -0
  107. package/esm/datepicker/styled-components.js +112 -55
  108. package/esm/datepicker/types.js +1 -1
  109. package/esm/datepicker/utils/calendar-header-helpers.js +45 -0
  110. package/esm/datepicker/utils/date-helpers.js +1 -1
  111. package/esm/datepicker/week.js +1 -0
  112. package/esm/dnd-list/index.js +2 -1
  113. package/esm/dnd-list/list.js +1 -2
  114. package/esm/dnd-list/styled-components.js +1 -1
  115. package/esm/drawer/close-icon.js +3 -2
  116. package/esm/drawer/drawer.js +5 -2
  117. package/esm/helper/helper.js +1 -0
  118. package/esm/layer/layer.js +8 -0
  119. package/esm/list/list-heading.js +17 -6
  120. package/esm/map-marker/constants.js +62 -0
  121. package/esm/map-marker/fixed-marker.js +137 -0
  122. package/esm/map-marker/floating-marker.js +94 -0
  123. package/esm/map-marker/index.js +9 -0
  124. package/esm/map-marker/pin-head.js +144 -0
  125. package/esm/map-marker/styled-components.js +168 -0
  126. package/esm/map-marker/types.js +8 -0
  127. package/esm/menu/maybe-child-menu.js +1 -0
  128. package/esm/popover/popover.js +6 -5
  129. package/esm/popover/stateful-container.js +8 -2
  130. package/esm/rating/emoticon-rating.js +2 -2
  131. package/esm/rating/star-rating.js +2 -2
  132. package/esm/select/select-component.js +19 -5
  133. package/esm/select/styled-components.js +28 -4
  134. package/esm/snackbar/snackbar-context.js +16 -4
  135. package/esm/spinner/styled-components.js +1 -1
  136. package/esm/table-semantic/styled-components.js +6 -4
  137. package/esm/table-semantic/table-builder.js +3 -0
  138. package/esm/themes/dark-theme/color-component-tokens.js +1 -1
  139. package/esm/themes/light-theme/color-component-tokens.js +9 -9
  140. package/esm/themes/shared/lighting.js +5 -1
  141. package/esm/timepicker/timepicker.js +17 -11
  142. package/esm/tooltip/styled-components.js +8 -0
  143. package/esm/tooltip/tooltip.js +1 -0
  144. package/helper/helper.js +1 -0
  145. package/helper/helper.js.flow +1 -0
  146. package/layer/layer.js +8 -0
  147. package/layer/layer.js.flow +9 -0
  148. package/link/index.d.ts +1 -0
  149. package/list/index.d.ts +36 -0
  150. package/list/list-heading.js +24 -7
  151. package/list/list-heading.js.flow +17 -8
  152. package/map-marker/constants.js +82 -0
  153. package/map-marker/constants.js.flow +74 -0
  154. package/map-marker/fixed-marker.js +152 -0
  155. package/map-marker/fixed-marker.js.flow +137 -0
  156. package/map-marker/floating-marker.js +109 -0
  157. package/map-marker/floating-marker.js.flow +102 -0
  158. package/map-marker/index.d.ts +105 -0
  159. package/map-marker/index.js +55 -0
  160. package/map-marker/index.js.flow +23 -0
  161. package/map-marker/package.json +4 -0
  162. package/map-marker/pin-head.js +159 -0
  163. package/map-marker/pin-head.js.flow +155 -0
  164. package/map-marker/styled-components.js +184 -0
  165. package/map-marker/styled-components.js.flow +177 -0
  166. package/map-marker/types.js +11 -0
  167. package/map-marker/types.js.flow +114 -0
  168. package/menu/index.d.ts +7 -0
  169. package/menu/maybe-child-menu.js +1 -0
  170. package/menu/maybe-child-menu.js.flow +1 -0
  171. package/menu/types.js.flow +12 -0
  172. package/modal/index.d.ts +1 -1
  173. package/modal/types.js.flow +4 -1
  174. package/package.json +5 -3
  175. package/popover/index.d.ts +2 -1
  176. package/popover/popover.js +6 -5
  177. package/popover/popover.js.flow +11 -4
  178. package/popover/stateful-container.js +8 -2
  179. package/popover/stateful-container.js.flow +5 -0
  180. package/popover/types.js.flow +6 -1
  181. package/rating/emoticon-rating.js +2 -2
  182. package/rating/emoticon-rating.js.flow +4 -1
  183. package/rating/star-rating.js +2 -2
  184. package/rating/star-rating.js.flow +4 -1
  185. package/select/select-component.js +19 -5
  186. package/select/select-component.js.flow +19 -5
  187. package/select/styled-components.js +28 -4
  188. package/select/styled-components.js.flow +30 -2
  189. package/select/types.js.flow +9 -0
  190. package/snackbar/index.d.ts +21 -16
  191. package/snackbar/snackbar-context.js +15 -4
  192. package/snackbar/snackbar-context.js.flow +15 -3
  193. package/spinner/styled-components.js +1 -1
  194. package/spinner/styled-components.js.flow +1 -1
  195. package/table-semantic/styled-components.js +6 -4
  196. package/table-semantic/styled-components.js.flow +6 -4
  197. package/table-semantic/table-builder.js +3 -0
  198. package/table-semantic/table-builder.js.flow +3 -0
  199. package/themes/dark-theme/color-component-tokens.js +1 -1
  200. package/themes/dark-theme/color-component-tokens.js.flow +1 -1
  201. package/themes/light-theme/color-component-tokens.js +9 -9
  202. package/themes/light-theme/color-component-tokens.js.flow +9 -9
  203. package/themes/shared/lighting.js +5 -1
  204. package/themes/shared/lighting.js.flow +4 -0
  205. package/themes/types.js.flow +4 -0
  206. package/timepicker/index.d.ts +1 -0
  207. package/timepicker/timepicker.js +17 -11
  208. package/timepicker/timepicker.js.flow +31 -12
  209. package/timepicker/types.js.flow +10 -0
  210. package/tooltip/styled-components.js +8 -0
  211. package/tooltip/styled-components.js.flow +8 -0
  212. package/tooltip/tooltip.js +1 -0
  213. package/tooltip/tooltip.js.flow +6 -1
@@ -105,7 +105,7 @@ class Select extends React.Component {
105
105
  isPseudoFocused: false
106
106
  });
107
107
 
108
- _defineProperty(this, "isMounted", false);
108
+ _defineProperty(this, "isItMounted", false);
109
109
 
110
110
  _defineProperty(this, "handleTouchOutside", event => {
111
111
  if (containsNode(this.dropdown.current, event.target)) return;
@@ -238,7 +238,7 @@ class Select extends React.Component {
238
238
  this.props.onBlur(event);
239
239
  }
240
240
 
241
- if (this.isMounted) {
241
+ if (this.isItMounted) {
242
242
  this.setState({
243
243
  isFocused: false,
244
244
  isOpen: false,
@@ -565,7 +565,16 @@ class Select extends React.Component {
565
565
  this.focus();
566
566
  }
567
567
 
568
- this.isMounted = true;
568
+ this.isItMounted = true;
569
+
570
+ if (this.props.methodsRef) {
571
+ const {
572
+ methodsRef
573
+ } = this.props;
574
+ methodsRef.current = {
575
+ setDropdownOpen: this.handleDropdownOpen.bind(this)
576
+ };
577
+ }
569
578
  }
570
579
 
571
580
  componentDidUpdate(prevProps, prevState) {
@@ -592,12 +601,18 @@ class Select extends React.Component {
592
601
  document.removeEventListener('click', this.handleClickOutside);
593
602
  }
594
603
 
595
- this.isMounted = false;
604
+ this.isItMounted = false;
596
605
  }
597
606
 
598
607
  focus() {
599
608
  if (!this.input) return;
600
609
  this.input.focus();
610
+ }
611
+
612
+ handleDropdownOpen(nextOpenState) {
613
+ this.setState({
614
+ isOpen: nextOpenState
615
+ });
601
616
  } // Handle touch outside on mobile to dismiss menu, ensures that the
602
617
  // touch target is not within the anchor DOM node.
603
618
 
@@ -782,7 +797,6 @@ class Select extends React.Component {
782
797
  const [ClearIcon, clearIconProps] = getOverrides(overrides.ClearIcon, DeleteAlt);
783
798
  const ariaLabel = this.props.multi ? 'Clear all' : 'Clear value';
784
799
  return /*#__PURE__*/React.createElement(ClearIcon, _extends({
785
- size: 16,
786
800
  title: ariaLabel,
787
801
  "aria-label": ariaLabel,
788
802
  onClick: this.clearValue,
@@ -956,6 +970,7 @@ class Select extends React.Component {
956
970
  if (!ref) return;
957
971
  this.anchor = ref.anchorRef;
958
972
  },
973
+ autoFocus: false,
959
974
  focusLock: false,
960
975
  mountNode: this.props.mountNode,
961
976
  onEsc: () => this.closeMenu(),
@@ -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
@@ -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
@@ -15,6 +15,10 @@ const lighting = {
15
15
  overlay300: 'inset 0 0 0 1000px hsla(0, 0%, 0%, 0.12)',
16
16
  overlay400: 'inset 0 0 0 1000px hsla(0, 0%, 0%, 0.16)',
17
17
  overlay500: 'inset 0 0 0 1000px hsla(0, 0%, 0%, 0.2)',
18
- overlay600: 'inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)'
18
+ overlay600: 'inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)',
19
+ shallowAbove: '0px -4px 16px rgba(0, 0, 0, 0.12)',
20
+ shallowBelow: '0px 4px 16px rgba(0, 0, 0, 0.12)',
21
+ deepAbove: '0px -16px 48px rgba(0, 0, 0, 0.22)',
22
+ deepBelow: '0px 16px 48px rgba(0, 0, 0, 0.22)'
19
23
  };
20
24
  export default lighting;
@@ -152,24 +152,28 @@ class TimePicker extends React.Component {
152
152
  _defineProperty(this, "getTimeWindowInSeconds", step => {
153
153
  let {
154
154
  minTime: min,
155
- maxTime: max
155
+ maxTime: max,
156
+ ignoreMinMaxDateComponent
156
157
  } = this.props;
157
- let midnight = this.setTime(this.props.value, 0, 0, 0);
158
+ const dayStart = this.setTime(this.props.value, 0, 0, 0);
159
+ const dayEnd = this.setTime(this.props.value, 24, 0, 0);
158
160
 
159
- if (!min) {
160
- min = midnight;
161
+ if (!min || this.props.adapter.isBefore(min, dayStart) && !ignoreMinMaxDateComponent) {
162
+ min = dayStart;
163
+ } else {
164
+ min = this.setTime(this.props.value, this.props.adapter.getHours(min), this.props.adapter.getMinutes(min), this.props.adapter.getSeconds(min));
161
165
  }
162
166
 
163
- if (!max) {
164
- max = this.setTime(this.props.value, 24, 0, 0);
167
+ if (!max || this.props.adapter.isAfter(max, dayEnd) && !ignoreMinMaxDateComponent) {
168
+ max = dayEnd;
165
169
  } else {
166
- // maxTime (if provided) should be inclusive, so add an extra step here
167
- max = this.props.adapter.setSeconds(this.props.adapter.date(max), this.props.adapter.getSeconds(max) + step);
170
+ max = this.setTime(this.props.value, this.props.adapter.getHours(max), this.props.adapter.getMinutes(max), // maxTime (if provided) should be inclusive, so add an extra second here
171
+ this.props.adapter.getSeconds(max) + 1);
168
172
  }
169
173
 
170
174
  const minDate = this.props.adapter.toJsDate(min);
171
175
  const maxDate = this.props.adapter.toJsDate(max);
172
- const midnightDate = this.props.adapter.toJsDate(midnight);
176
+ const midnightDate = this.props.adapter.toJsDate(dayStart);
173
177
  return {
174
178
  start: (minDate - midnightDate) / 1000,
175
179
  end: (maxDate - midnightDate) / 1000
@@ -248,7 +252,7 @@ class TimePicker extends React.Component {
248
252
  steps: steps,
249
253
  value: this.props.nullable ? undefined : {
250
254
  id: closestStep,
251
- label: this.secondsToLabel(closestStep, undefined)
255
+ label: this.secondsToLabel(closestStep, this.props.format)
252
256
  }
253
257
  });
254
258
 
@@ -337,7 +341,8 @@ _defineProperty(TimePicker, "defaultProps", {
337
341
  format: '12',
338
342
  step: 900,
339
343
  creatable: false,
340
- adapter: dateFnsAdapter
344
+ adapter: dateFnsAdapter,
345
+ ignoreMinMaxDateComponent: false
341
346
  });
342
347
 
343
348
  export default TimePicker;
@@ -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,
@@ -24,6 +24,7 @@ class Tooltip extends React.Component {
24
24
  Inner: StyledInner
25
25
  }, this.props.overrides);
26
26
  return /*#__PURE__*/React.createElement(Popover, _extends({
27
+ autoFocus: false,
27
28
  "data-baseweb": "tooltip"
28
29
  }, this.props, {
29
30
  overrides: overrides
@@ -132,6 +132,7 @@ export default function UserMenuComponent(props) {
132
132
  }
133
133
  }, userMenuProps));
134
134
  },
135
+ autoFocus: false,
135
136
  dismissOnEsc: true,
136
137
  dismissOnClickOutside: true,
137
138
  onOpen: function onOpen() {
@@ -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,
@@ -90,7 +90,6 @@ export var Title = styled('h1', function (_ref7) {
90
90
  var $theme = _ref7.$theme;
91
91
  return _objectSpread(_objectSpread({}, $theme.typography.HeadingSmall), {}, {
92
92
  color: $theme.colors.contentPrimary,
93
- fontWeight: 500,
94
93
  marginLeft: 0,
95
94
  marginTop: 0,
96
95
  marginRight: 0,
@@ -292,7 +292,11 @@ function Combobox(props) {
292
292
  return /*#__PURE__*/React.createElement(Root // eslint-disable-next-line flowtype/no-weak-types
293
293
  , _extends({
294
294
  ref: rootRef
295
- }, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover, _extends({
295
+ }, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover // React-focus-lock used in Popover used to skip non-tabbable elements (`tabIndex=-1`) elements for focus, we had ListBox with tabIndex to disable focus on
296
+ // the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
297
+ // Select Component does the same thing
298
+ , _extends({
299
+ autoFocus: false,
296
300
  isOpen: isOpen,
297
301
  overrides: popoverOverrides,
298
302
  placement: PLACEMENT.bottomLeft,
@@ -55,6 +55,7 @@ import { COLUMNS, DATETIME_OPERATIONS } from './constants.js';
55
55
  import FilterShell from './filter-shell.js';
56
56
  import { LocaleContext } from '../locale/index.js';
57
57
  var DATE_FORMAT = 'MM-dd-yyyy';
58
+ var MASK = '99-99-9999 - 99-99-9999';
58
59
  var TIME_FORMAT = 'HH:mm ss:SS';
59
60
  var FORMAT_STRING = "".concat(DATE_FORMAT, " ").concat(TIME_FORMAT);
60
61
 
@@ -430,6 +431,7 @@ function DatetimeFilter(props) {
430
431
  }
431
432
  },
432
433
  formatString: DATE_FORMAT,
434
+ mask: MASK,
433
435
  placeholder: "MM-DD-YYYY - MM-DD-YYYY",
434
436
  minDate: datesSorted[0],
435
437
  maxDate: datesSorted[datesSorted.length - 1],
@@ -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
  }