grommet 2.48.0 → 2.50.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 (157) hide show
  1. package/components/AccordionPanel/AccordionPanel.js +3 -6
  2. package/components/Anchor/StyledAnchor.js +1 -1
  3. package/components/Box/StyledBox.js +1 -1
  4. package/components/Button/BusyAnimation.js +5 -1
  5. package/components/Button/Button.js +3 -1
  6. package/components/Calendar/Calendar.js +7 -10
  7. package/components/Cards/Cards.js +3 -4
  8. package/components/Chart/Chart.js +11 -9
  9. package/components/Chart/calcs.js +21 -13
  10. package/components/CheckBox/CheckBox.js +1 -1
  11. package/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
  12. package/components/Data/Data.js +5 -1
  13. package/components/Data/DataForm.js +6 -4
  14. package/components/Data/stories/Infinite.stories.js +10 -15
  15. package/components/Data/stories/OnSelect.stories.js +10 -15
  16. package/components/Data/stories/SpaceX.stories.js +10 -15
  17. package/components/Data/stories/StarWars.stories.js +6 -8
  18. package/components/DataChart/DataChart.js +14 -12
  19. package/components/DataChart/Detail.js +2 -2
  20. package/components/DataChart/Legend.js +8 -9
  21. package/components/DataChart/utils.js +15 -8
  22. package/components/DataFilter/DataFilter.js +10 -9
  23. package/components/DataFilters/DataFilters.js +9 -10
  24. package/components/DataSearch/DataSearch.js +5 -4
  25. package/components/DataSort/DataSort.js +4 -3
  26. package/components/DataSummary/DataSummary.js +6 -6
  27. package/components/DataTable/ExpanderCell.js +6 -3
  28. package/components/DataTable/Footer.js +6 -3
  29. package/components/DataTable/Header.js +6 -3
  30. package/components/DataTable/Resizer.js +22 -8
  31. package/components/DataTable/Searcher.js +5 -7
  32. package/components/DataTable/stories/ResizePinned.stories.js +321 -0
  33. package/components/DataTable/stories/SpaceX.stories.js +15 -16
  34. package/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
  35. package/components/DataTable/stories/rowDetails.stories.js +6 -8
  36. package/components/DataTableColumns/DataTableColumns.js +24 -22
  37. package/components/DateInput/DateInput.js +7 -6
  38. package/components/Distribution/Distribution.js +8 -5
  39. package/components/FileInput/FileInput.js +41 -36
  40. package/components/Footer/Footer.js +5 -1
  41. package/components/Header/Header.js +2 -2
  42. package/components/Layer/Layer.js +10 -5
  43. package/components/Layer/StyledLayer.js +2 -2
  44. package/components/List/List.js +5 -4
  45. package/components/MaskedInput/MaskedInput.js +6 -1
  46. package/components/Menu/Menu.js +13 -1
  47. package/components/Meter/Bar.js +38 -17
  48. package/components/Meter/Circle.js +31 -46
  49. package/components/Meter/stories/Circle.stories.js +6 -8
  50. package/components/Meter/utils.js +15 -1
  51. package/components/Nav/Nav.js +5 -1
  52. package/components/Notification/Notification.js +6 -8
  53. package/components/Pagination/Pagination.js +5 -10
  54. package/components/Pagination/PaginationStep.js +2 -1
  55. package/components/Paragraph/ParagraphSkeleton.js +2 -1
  56. package/components/RadioButton/RadioButton.js +1 -1
  57. package/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
  58. package/components/RangeSelector/RangeSelector.js +2 -6
  59. package/components/Select/SelectContainer.js +2 -1
  60. package/components/SelectMultiple/SelectMultipleContainer.js +8 -4
  61. package/components/SelectMultiple/SelectMultipleValue.js +5 -7
  62. package/components/SelectMultiple/SelectionSummary.js +7 -8
  63. package/components/Sidebar/Sidebar.js +6 -3
  64. package/components/Spinner/Spinner.js +7 -4
  65. package/components/StarRating/StarRating.js +8 -5
  66. package/components/Tab/Tab.js +2 -1
  67. package/components/Table/StyledTable.js +2 -2
  68. package/components/Tabs/Tabs.js +8 -12
  69. package/components/Tag/StyledTag.js +9 -1
  70. package/components/TextInput/CopyButton.js +3 -2
  71. package/components/TextInput/TextInput.js +5 -0
  72. package/components/ThumbsRating/ThumbsRating.js +15 -10
  73. package/components/Toolbar/Toolbar.js +15 -11
  74. package/components/Video/Video.js +3 -5
  75. package/es6/components/AccordionPanel/AccordionPanel.js +3 -6
  76. package/es6/components/Anchor/StyledAnchor.js +2 -2
  77. package/es6/components/Box/StyledBox.js +1 -1
  78. package/es6/components/Button/BusyAnimation.js +5 -1
  79. package/es6/components/Button/Button.js +3 -1
  80. package/es6/components/Calendar/Calendar.js +7 -10
  81. package/es6/components/Cards/Cards.js +3 -4
  82. package/es6/components/Chart/Chart.js +11 -9
  83. package/es6/components/Chart/calcs.js +21 -13
  84. package/es6/components/CheckBox/CheckBox.js +1 -1
  85. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
  86. package/es6/components/Data/Data.js +5 -1
  87. package/es6/components/Data/DataForm.js +6 -4
  88. package/es6/components/Data/stories/Infinite.stories.js +10 -15
  89. package/es6/components/Data/stories/OnSelect.stories.js +10 -15
  90. package/es6/components/Data/stories/SpaceX.stories.js +10 -15
  91. package/es6/components/Data/stories/StarWars.stories.js +6 -8
  92. package/es6/components/DataChart/DataChart.js +14 -12
  93. package/es6/components/DataChart/Detail.js +2 -2
  94. package/es6/components/DataChart/Legend.js +8 -9
  95. package/es6/components/DataChart/utils.js +15 -8
  96. package/es6/components/DataFilter/DataFilter.js +10 -9
  97. package/es6/components/DataFilters/DataFilters.js +9 -10
  98. package/es6/components/DataSearch/DataSearch.js +5 -4
  99. package/es6/components/DataSort/DataSort.js +4 -3
  100. package/es6/components/DataSummary/DataSummary.js +6 -6
  101. package/es6/components/DataTable/ExpanderCell.js +4 -1
  102. package/es6/components/DataTable/Footer.js +4 -1
  103. package/es6/components/DataTable/Header.js +6 -3
  104. package/es6/components/DataTable/Resizer.js +22 -8
  105. package/es6/components/DataTable/Searcher.js +5 -7
  106. package/es6/components/DataTable/stories/ResizePinned.stories.js +316 -0
  107. package/es6/components/DataTable/stories/SpaceX.stories.js +15 -16
  108. package/es6/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
  109. package/es6/components/DataTable/stories/rowDetails.stories.js +6 -8
  110. package/es6/components/DataTableColumns/DataTableColumns.js +23 -21
  111. package/es6/components/DateInput/DateInput.js +6 -5
  112. package/es6/components/Distribution/Distribution.js +8 -5
  113. package/es6/components/FileInput/FileInput.js +42 -37
  114. package/es6/components/Footer/Footer.js +5 -1
  115. package/es6/components/Header/Header.js +2 -2
  116. package/es6/components/Layer/Layer.js +10 -5
  117. package/es6/components/Layer/StyledLayer.js +3 -3
  118. package/es6/components/List/List.js +5 -4
  119. package/es6/components/MaskedInput/MaskedInput.js +6 -1
  120. package/es6/components/Menu/Menu.js +13 -1
  121. package/es6/components/Meter/Bar.js +39 -18
  122. package/es6/components/Meter/Circle.js +33 -48
  123. package/es6/components/Meter/stories/Circle.stories.js +7 -9
  124. package/es6/components/Meter/utils.js +14 -0
  125. package/es6/components/Nav/Nav.js +5 -1
  126. package/es6/components/Notification/Notification.js +6 -8
  127. package/es6/components/Pagination/Pagination.js +5 -10
  128. package/es6/components/Pagination/PaginationStep.js +2 -1
  129. package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
  130. package/es6/components/RadioButton/RadioButton.js +1 -1
  131. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
  132. package/es6/components/RangeSelector/RangeSelector.js +2 -6
  133. package/es6/components/Select/SelectContainer.js +2 -1
  134. package/es6/components/SelectMultiple/SelectMultipleContainer.js +8 -4
  135. package/es6/components/SelectMultiple/SelectMultipleValue.js +5 -7
  136. package/es6/components/SelectMultiple/SelectionSummary.js +7 -8
  137. package/es6/components/Sidebar/Sidebar.js +6 -3
  138. package/es6/components/Spinner/Spinner.js +6 -3
  139. package/es6/components/StarRating/StarRating.js +8 -5
  140. package/es6/components/Tab/Tab.js +2 -1
  141. package/es6/components/Table/StyledTable.js +2 -2
  142. package/es6/components/Tabs/Tabs.js +8 -12
  143. package/es6/components/Tag/StyledTag.js +10 -2
  144. package/es6/components/TextInput/CopyButton.js +3 -2
  145. package/es6/components/TextInput/TextInput.js +5 -0
  146. package/es6/components/ThumbsRating/ThumbsRating.js +15 -10
  147. package/es6/components/Toolbar/Toolbar.js +15 -11
  148. package/es6/components/Video/Video.js +3 -5
  149. package/es6/themes/base.d.ts +284 -4
  150. package/es6/themes/base.js +369 -21
  151. package/es6/utils/graphics.js +123 -0
  152. package/grommet.min.js +1 -1
  153. package/grommet.min.js.map +1 -1
  154. package/package.json +46 -46
  155. package/themes/base.d.ts +284 -4
  156. package/themes/base.js +369 -21
  157. package/utils/graphics.js +124 -1
@@ -145,11 +145,12 @@ var Tab = /*#__PURE__*/forwardRef(function (_ref, ref) {
145
145
  var second = reverse ? normalizedIcon : normalizedTitle;
146
146
  var withIconStyles;
147
147
  if (first && second) {
148
+ var _theme$tab;
148
149
  withIconStyles = {
149
150
  direction: 'row',
150
151
  align: 'center',
151
152
  justify: 'center',
152
- gap: 'small'
153
+ gap: (_theme$tab = theme.tab) == null ? void 0 : _theme$tab.gap
153
154
  };
154
155
  }
155
156
  return /*#__PURE__*/React.createElement(Button, _extends({
@@ -41,8 +41,8 @@ var StyledTableCell = styled.td.withConfig(styledComponentsConfig).withConfig({
41
41
  var StyledTableDataCaption = styled.caption.withConfig(styledComponentsConfig).withConfig({
42
42
  displayName: "StyledTable__StyledTableDataCaption",
43
43
  componentId: "sc-1m3u5g-1"
44
- })(["margin-bottom:", ";"], function (props) {
45
- return props.theme.global.edgeSize.xxsmall;
44
+ })(["", ""], function (props) {
45
+ return edgeStyle('margin', props.theme.table.caption.margin, false, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);
46
46
  });
47
47
  var StyledTableRow = styled.tr.withConfig(styledComponentsConfig).withConfig({
48
48
  displayName: "StyledTable__StyledTableRow",
@@ -16,7 +16,7 @@ import { TabsPropTypes } from './propTypes';
16
16
  import { useAnalytics } from '../../contexts/AnalyticsContext/AnalyticsContext';
17
17
  import { useThemeValue } from '../../utils/useThemeValue';
18
18
  var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
- var _theme$tabs$header;
19
+ var _theme$tabs$header, _theme$tabs$header2, _theme$tabs$header3, _theme$tabs$header4;
20
20
  var alignControls = _ref.alignControls,
21
21
  children = _ref.children,
22
22
  flex = _ref.flex,
@@ -56,6 +56,8 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
56
56
  setFocusIndex = _useState7[1];
57
57
  var headerRef = useRef();
58
58
  var size = useContext(ResponsiveContext);
59
+ var PreviousIcon = ((_theme$tabs$header = theme.tabs.header) == null || (_theme$tabs$header = _theme$tabs$header.previousButton) == null ? void 0 : _theme$tabs$header.icon) || Previous;
60
+ var NextIcon = ((_theme$tabs$header2 = theme.tabs.header) == null || (_theme$tabs$header2 = _theme$tabs$header2.nextButton) == null ? void 0 : _theme$tabs$header2.icon) || Next;
59
61
  var sendAnalytics = useAnalytics();
60
62
  if (activeIndex !== propsActiveIndex && propsActiveIndex !== undefined) {
61
63
  setActiveIndex(propsActiveIndex);
@@ -270,7 +272,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
270
272
  }, passThemeFlag, rest, {
271
273
  background: theme.tabs.background
272
274
  }), /*#__PURE__*/React.createElement(Box, _extends({
273
- alignSelf: alignControls || ((_theme$tabs$header = theme.tabs.header) == null ? void 0 : _theme$tabs$header.alignSelf),
275
+ alignSelf: alignControls || ((_theme$tabs$header3 = theme.tabs.header) == null ? void 0 : _theme$tabs$header3.alignSelf),
274
276
  flex: false,
275
277
  direction: overflow ? 'row' : 'column'
276
278
  }, tabsHeaderStyles), overflow && /*#__PURE__*/React.createElement(Button, {
@@ -283,11 +285,8 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
283
285
  return moveByArrowKey('previous');
284
286
  }
285
287
  }, /*#__PURE__*/React.createElement(Box, {
286
- pad: {
287
- vertical: 'xsmall',
288
- horizontal: 'small'
289
- }
290
- }, /*#__PURE__*/React.createElement(Previous, {
288
+ pad: theme.tabs.header.previousButton.pad
289
+ }, /*#__PURE__*/React.createElement(PreviousIcon, {
291
290
  color: disableLeftArrow ? theme.button.disabled.color : theme.global.colors.text
292
291
  }))), /*#__PURE__*/React.createElement(StyledTabsHeader, _extends({
293
292
  role: "tablist",
@@ -311,11 +310,8 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
311
310
  return moveByArrowKey('next');
312
311
  }
313
312
  }, /*#__PURE__*/React.createElement(Box, {
314
- pad: {
315
- vertical: 'xsmall',
316
- horizontal: 'small'
317
- }
318
- }, /*#__PURE__*/React.createElement(Next, {
313
+ pad: (_theme$tabs$header4 = theme.tabs.header) == null || (_theme$tabs$header4 = _theme$tabs$header4.nextButton) == null ? void 0 : _theme$tabs$header4.pad
314
+ }, /*#__PURE__*/React.createElement(NextIcon, {
319
315
  color: disableRightArrow ? theme.button.disabled.color : theme.global.colors.text
320
316
  })))), /*#__PURE__*/React.createElement(StyledTabPanel, _extends({
321
317
  flex: flex,
@@ -1,13 +1,21 @@
1
1
  import styled from 'styled-components';
2
- import { borderStyle, roundStyle } from '../../utils';
2
+ import { backgroundStyle, borderStyle, roundStyle } from '../../utils';
3
3
  import { Button } from '../Button';
4
4
  export var StyledTagButton = styled(Button).withConfig({
5
5
  displayName: "StyledTag__StyledTagButton",
6
6
  componentId: "sc-cb9fl2-0"
7
- })(["", " ", ""], function (props) {
7
+ })(["", " ", " ", " &:hover{", " ", "}"], function (props) {
8
+ return props.background && backgroundStyle(props.background, props.theme);
9
+ }, function (props) {
8
10
  return props.border && borderStyle(props.border, true, props.theme);
9
11
  }, function (props) {
10
12
  return props.round && roundStyle(props.round, true, props.theme);
13
+ }, function (props) {
14
+ var _props$theme;
15
+ return props.background && props.onClick && ((_props$theme = props.theme) == null || (_props$theme = _props$theme.tag) == null || (_props$theme = _props$theme.hover) == null ? void 0 : _props$theme.background) && backgroundStyle(props.theme.tag.hover.background, props.theme);
16
+ }, function (props) {
17
+ var _props$theme2;
18
+ return props.border && props.onClick && ((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.tag) == null || (_props$theme2 = _props$theme2.hover) == null ? void 0 : _props$theme2.border) && borderStyle(props.theme.tag.hover.border, true, props.theme);
11
19
  });
12
20
  export var StyledRemoveButton = styled(Button).withConfig({
13
21
  displayName: "StyledTag__StyledRemoveButton",
@@ -18,7 +18,7 @@ var StyledButton = styled(Button).withConfig({
18
18
  return !props.theme.button["default"] ? edgeStyle('padding', props.pad, false, undefined, props.theme) : '';
19
19
  });
20
20
  export var CopyButton = function CopyButton(_ref) {
21
- var _theme$global$input$p, _theme$global$input$p2, _theme$global$input$p3;
21
+ var _theme$textInput, _theme$global$input$p, _theme$global$input$p2, _theme$global$input$p3;
22
22
  var disabled = _ref.disabled,
23
23
  onClickCopy = _ref.onClickCopy,
24
24
  onBlurCopy = _ref.onBlurCopy,
@@ -28,6 +28,7 @@ export var CopyButton = function CopyButton(_ref) {
28
28
  var _useThemeValue = useThemeValue(),
29
29
  theme = _useThemeValue.theme,
30
30
  passThemeFlag = _useThemeValue.passThemeFlag;
31
+ var CopyIcon = ((_theme$textInput = theme.textInput) == null || (_theme$textInput = _theme$textInput.icons) == null ? void 0 : _theme$textInput.copy) || Copy;
31
32
  return /*#__PURE__*/React.createElement(Tip, {
32
33
  dropProps: {
33
34
  align: {
@@ -38,7 +39,7 @@ export var CopyButton = function CopyButton(_ref) {
38
39
  }, /*#__PURE__*/React.createElement(StyledButton, _extends({
39
40
  disabled: disabled,
40
41
  onClick: onClickCopy,
41
- icon: /*#__PURE__*/React.createElement(Copy, null),
42
+ icon: /*#__PURE__*/React.createElement(CopyIcon, null),
42
43
  pad: {
43
44
  horizontal: (_theme$global$input$p = theme.global.input.padding) == null ? void 0 : _theme$global$input$p.horizontal,
44
45
  left: (_theme$global$input$p2 = theme.global.input.padding) == null ? void 0 : _theme$global$input$p2.left,
@@ -310,6 +310,11 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
310
310
  // must be an element rendered by suggestions.label
311
311
  child = renderedLabel;else if (!theme.button.option)
312
312
  // don't have theme support, need to layout here
313
+ /*
314
+ Not adding a theme object now because this code path
315
+ is not used in the HPE theme, but we may add theme
316
+ support here in the future.
317
+ */
313
318
  child = /*#__PURE__*/React.createElement(Box, {
314
319
  align: "start",
315
320
  pad: "small"
@@ -17,33 +17,38 @@ var StyledThumbsRatingBox = styled(Box).withConfig({
17
17
  return props.focus && focusStyle();
18
18
  });
19
19
  var ThumbsRating = function ThumbsRating(_ref) {
20
+ var _theme$thumbsRating, _theme$thumbsRating2, _theme$thumbsRating3, _theme$thumbsRating4;
20
21
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
21
22
  var _useThemeValue = useThemeValue(),
22
23
  theme = _useThemeValue.theme;
23
24
  var usingKeyboard = useKeyboard();
25
+ var LikeIcon = ((_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.icons) == null ? void 0 : _theme$thumbsRating.like) || Like;
26
+ var LikeSelectedIcon = ((_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.icons) == null ? void 0 : _theme$thumbsRating2.likeSelected) || LikeFill;
27
+ var DislikeIcon = ((_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.icons) == null ? void 0 : _theme$thumbsRating3.dislike) || Dislike;
28
+ var DislikeSelectedIcon = ((_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.icons) == null ? void 0 : _theme$thumbsRating4.dislikeSelected) || DislikeFill;
24
29
  return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({
25
30
  direction: "row",
26
31
  options: ['like', 'dislike']
27
32
  }, rest), function (option, _ref2) {
28
- var _theme$thumbsRating3, _theme$thumbsRating4;
33
+ var _theme$thumbsRating7, _theme$thumbsRating8;
29
34
  var checked = _ref2.checked,
30
35
  focus = _ref2.focus;
31
36
  if (option === 'like') {
32
- var _theme$thumbsRating, _theme$thumbsRating2;
37
+ var _theme$thumbsRating5, _theme$thumbsRating6;
33
38
  return /*#__PURE__*/React.createElement(StyledThumbsRatingBox, {
34
39
  focus: focus && usingKeyboard
35
- }, checked ? /*#__PURE__*/React.createElement(LikeFill, {
36
- color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color
37
- }) : /*#__PURE__*/React.createElement(Like, {
38
- color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color
40
+ }, checked ? /*#__PURE__*/React.createElement(LikeSelectedIcon, {
41
+ color: (_theme$thumbsRating5 = theme.thumbsRating) == null || (_theme$thumbsRating5 = _theme$thumbsRating5.like) == null ? void 0 : _theme$thumbsRating5.color
42
+ }) : /*#__PURE__*/React.createElement(LikeIcon, {
43
+ color: (_theme$thumbsRating6 = theme.thumbsRating) == null || (_theme$thumbsRating6 = _theme$thumbsRating6.like) == null ? void 0 : _theme$thumbsRating6.color
39
44
  }));
40
45
  }
41
46
  return /*#__PURE__*/React.createElement(StyledThumbsRatingBox, {
42
47
  focus: focus && usingKeyboard
43
- }, checked ? /*#__PURE__*/React.createElement(DislikeFill, {
44
- color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color
45
- }) : /*#__PURE__*/React.createElement(Dislike, {
46
- color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color
48
+ }, checked ? /*#__PURE__*/React.createElement(DislikeSelectedIcon, {
49
+ color: (_theme$thumbsRating7 = theme.thumbsRating) == null || (_theme$thumbsRating7 = _theme$thumbsRating7.dislike) == null ? void 0 : _theme$thumbsRating7.color
50
+ }) : /*#__PURE__*/React.createElement(DislikeIcon, {
51
+ color: (_theme$thumbsRating8 = theme.thumbsRating) == null || (_theme$thumbsRating8 = _theme$thumbsRating8.dislike) == null ? void 0 : _theme$thumbsRating8.color
47
52
  }));
48
53
  });
49
54
  };
@@ -6,21 +6,25 @@ import { Box } from '../Box';
6
6
  import { ResponsiveContext } from '../../contexts/ResponsiveContext';
7
7
  import { ToolbarPropTypes } from './propTypes';
8
8
  import { isSmall } from '../../utils/responsive';
9
- var defaultLayoutProps = {
10
- direction: 'row',
11
- align: 'start',
12
- gap: 'small'
13
- };
14
- var smallLayoutProps = {
15
- direction: 'row',
16
- wrap: true,
17
- align: 'start',
18
- gap: 'small'
19
- };
9
+ import { useThemeValue } from '../../utils/useThemeValue';
20
10
  export var Toolbar = function Toolbar(_ref) {
11
+ var _theme$toolbar, _theme$toolbar2;
21
12
  var children = _ref.children,
22
13
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
23
14
  var size = useContext(ResponsiveContext);
15
+ var _useThemeValue = useThemeValue(),
16
+ theme = _useThemeValue.theme;
17
+ var defaultLayoutProps = {
18
+ direction: 'row',
19
+ align: 'start',
20
+ gap: (_theme$toolbar = theme.toolbar) == null ? void 0 : _theme$toolbar.gap
21
+ };
22
+ var smallLayoutProps = {
23
+ direction: 'row',
24
+ wrap: true,
25
+ align: 'start',
26
+ gap: (_theme$toolbar2 = theme.toolbar) == null || (_theme$toolbar2 = _theme$toolbar2.small) == null ? void 0 : _theme$toolbar2.gap
27
+ };
24
28
  var layoutProps = isSmall(size) ? smallLayoutProps : defaultLayoutProps;
25
29
  return /*#__PURE__*/React.createElement(Box, _extends({
26
30
  flex: false,
@@ -277,7 +277,7 @@ var Video = /*#__PURE__*/forwardRef(function (_ref, ref) {
277
277
  }, [videoRef]);
278
278
  var controlsElement;
279
279
  if (controls != null && controls.position) {
280
- var _controls$items;
280
+ var _controls$items, _theme$video, _theme$video2;
281
281
  var over = controls.position === 'over';
282
282
  var background = over ? theme.video.controls && theme.video.controls.background || {
283
283
  color: 'background-back',
@@ -458,7 +458,7 @@ var Video = /*#__PURE__*/forwardRef(function (_ref, ref) {
458
458
  }),
459
459
  background: over ? theme.video.scrubber && theme.video.scrubber.track && theme.video.scrubber.track.color || 'dark-3' : undefined,
460
460
  size: "full",
461
- thickness: "small",
461
+ thickness: (_theme$video = theme.video) == null || (_theme$video = _theme$video.scrubber) == null ? void 0 : _theme$video.thickness,
462
462
  values: [{
463
463
  value: percentagePlayed || 0
464
464
  }]
@@ -480,9 +480,7 @@ var Video = /*#__PURE__*/forwardRef(function (_ref, ref) {
480
480
  return setInteracting(true);
481
481
  }
482
482
  }, passThemeFlag)))), /*#__PURE__*/React.createElement(Box, {
483
- pad: {
484
- horizontal: 'small'
485
- }
483
+ pad: theme == null || (_theme$video2 = theme.video) == null || (_theme$video2 = _theme$video2.time) == null || (_theme$video2 = _theme$video2.container) == null ? void 0 : _theme$video2.pad
486
484
  }, /*#__PURE__*/React.createElement(Text, {
487
485
  margin: "none"
488
486
  }, formattedTime))), /*#__PURE__*/React.createElement(Menu, {