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.
- package/components/AccordionPanel/AccordionPanel.js +3 -6
- package/components/Anchor/StyledAnchor.js +1 -1
- package/components/Box/StyledBox.js +1 -1
- package/components/Button/BusyAnimation.js +5 -1
- package/components/Button/Button.js +3 -1
- package/components/Calendar/Calendar.js +7 -10
- package/components/Cards/Cards.js +3 -4
- package/components/Chart/Chart.js +11 -9
- package/components/Chart/calcs.js +21 -13
- package/components/CheckBox/CheckBox.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
- package/components/Data/Data.js +5 -1
- package/components/Data/DataForm.js +6 -4
- package/components/Data/stories/Infinite.stories.js +10 -15
- package/components/Data/stories/OnSelect.stories.js +10 -15
- package/components/Data/stories/SpaceX.stories.js +10 -15
- package/components/Data/stories/StarWars.stories.js +6 -8
- package/components/DataChart/DataChart.js +14 -12
- package/components/DataChart/Detail.js +2 -2
- package/components/DataChart/Legend.js +8 -9
- package/components/DataChart/utils.js +15 -8
- package/components/DataFilter/DataFilter.js +10 -9
- package/components/DataFilters/DataFilters.js +9 -10
- package/components/DataSearch/DataSearch.js +5 -4
- package/components/DataSort/DataSort.js +4 -3
- package/components/DataSummary/DataSummary.js +6 -6
- package/components/DataTable/ExpanderCell.js +6 -3
- package/components/DataTable/Footer.js +6 -3
- package/components/DataTable/Header.js +6 -3
- package/components/DataTable/Resizer.js +22 -8
- package/components/DataTable/Searcher.js +5 -7
- package/components/DataTable/stories/ResizePinned.stories.js +321 -0
- package/components/DataTable/stories/SpaceX.stories.js +15 -16
- package/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
- package/components/DataTable/stories/rowDetails.stories.js +6 -8
- package/components/DataTableColumns/DataTableColumns.js +24 -22
- package/components/DateInput/DateInput.js +7 -6
- package/components/Distribution/Distribution.js +8 -5
- package/components/FileInput/FileInput.js +41 -36
- package/components/Footer/Footer.js +5 -1
- package/components/Header/Header.js +2 -2
- package/components/Layer/Layer.js +10 -5
- package/components/Layer/StyledLayer.js +2 -2
- package/components/List/List.js +5 -4
- package/components/MaskedInput/MaskedInput.js +6 -1
- package/components/Menu/Menu.js +13 -1
- package/components/Meter/Bar.js +38 -17
- package/components/Meter/Circle.js +31 -46
- package/components/Meter/stories/Circle.stories.js +6 -8
- package/components/Meter/utils.js +15 -1
- package/components/Nav/Nav.js +5 -1
- package/components/Notification/Notification.js +6 -8
- package/components/Pagination/Pagination.js +5 -10
- package/components/Pagination/PaginationStep.js +2 -1
- package/components/Paragraph/ParagraphSkeleton.js +2 -1
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
- package/components/RangeSelector/RangeSelector.js +2 -6
- package/components/Select/SelectContainer.js +2 -1
- package/components/SelectMultiple/SelectMultipleContainer.js +8 -4
- package/components/SelectMultiple/SelectMultipleValue.js +5 -7
- package/components/SelectMultiple/SelectionSummary.js +7 -8
- package/components/Sidebar/Sidebar.js +6 -3
- package/components/Spinner/Spinner.js +7 -4
- package/components/StarRating/StarRating.js +8 -5
- package/components/Tab/Tab.js +2 -1
- package/components/Table/StyledTable.js +2 -2
- package/components/Tabs/Tabs.js +8 -12
- package/components/Tag/StyledTag.js +9 -1
- package/components/TextInput/CopyButton.js +3 -2
- package/components/TextInput/TextInput.js +5 -0
- package/components/ThumbsRating/ThumbsRating.js +15 -10
- package/components/Toolbar/Toolbar.js +15 -11
- package/components/Video/Video.js +3 -5
- package/es6/components/AccordionPanel/AccordionPanel.js +3 -6
- package/es6/components/Anchor/StyledAnchor.js +2 -2
- package/es6/components/Box/StyledBox.js +1 -1
- package/es6/components/Button/BusyAnimation.js +5 -1
- package/es6/components/Button/Button.js +3 -1
- package/es6/components/Calendar/Calendar.js +7 -10
- package/es6/components/Cards/Cards.js +3 -4
- package/es6/components/Chart/Chart.js +11 -9
- package/es6/components/Chart/calcs.js +21 -13
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
- package/es6/components/Data/Data.js +5 -1
- package/es6/components/Data/DataForm.js +6 -4
- package/es6/components/Data/stories/Infinite.stories.js +10 -15
- package/es6/components/Data/stories/OnSelect.stories.js +10 -15
- package/es6/components/Data/stories/SpaceX.stories.js +10 -15
- package/es6/components/Data/stories/StarWars.stories.js +6 -8
- package/es6/components/DataChart/DataChart.js +14 -12
- package/es6/components/DataChart/Detail.js +2 -2
- package/es6/components/DataChart/Legend.js +8 -9
- package/es6/components/DataChart/utils.js +15 -8
- package/es6/components/DataFilter/DataFilter.js +10 -9
- package/es6/components/DataFilters/DataFilters.js +9 -10
- package/es6/components/DataSearch/DataSearch.js +5 -4
- package/es6/components/DataSort/DataSort.js +4 -3
- package/es6/components/DataSummary/DataSummary.js +6 -6
- package/es6/components/DataTable/ExpanderCell.js +4 -1
- package/es6/components/DataTable/Footer.js +4 -1
- package/es6/components/DataTable/Header.js +6 -3
- package/es6/components/DataTable/Resizer.js +22 -8
- package/es6/components/DataTable/Searcher.js +5 -7
- package/es6/components/DataTable/stories/ResizePinned.stories.js +316 -0
- package/es6/components/DataTable/stories/SpaceX.stories.js +15 -16
- package/es6/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
- package/es6/components/DataTable/stories/rowDetails.stories.js +6 -8
- package/es6/components/DataTableColumns/DataTableColumns.js +23 -21
- package/es6/components/DateInput/DateInput.js +6 -5
- package/es6/components/Distribution/Distribution.js +8 -5
- package/es6/components/FileInput/FileInput.js +42 -37
- package/es6/components/Footer/Footer.js +5 -1
- package/es6/components/Header/Header.js +2 -2
- package/es6/components/Layer/Layer.js +10 -5
- package/es6/components/Layer/StyledLayer.js +3 -3
- package/es6/components/List/List.js +5 -4
- package/es6/components/MaskedInput/MaskedInput.js +6 -1
- package/es6/components/Menu/Menu.js +13 -1
- package/es6/components/Meter/Bar.js +39 -18
- package/es6/components/Meter/Circle.js +33 -48
- package/es6/components/Meter/stories/Circle.stories.js +7 -9
- package/es6/components/Meter/utils.js +14 -0
- package/es6/components/Nav/Nav.js +5 -1
- package/es6/components/Notification/Notification.js +6 -8
- package/es6/components/Pagination/Pagination.js +5 -10
- package/es6/components/Pagination/PaginationStep.js +2 -1
- package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
- package/es6/components/RangeSelector/RangeSelector.js +2 -6
- package/es6/components/Select/SelectContainer.js +2 -1
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +8 -4
- package/es6/components/SelectMultiple/SelectMultipleValue.js +5 -7
- package/es6/components/SelectMultiple/SelectionSummary.js +7 -8
- package/es6/components/Sidebar/Sidebar.js +6 -3
- package/es6/components/Spinner/Spinner.js +6 -3
- package/es6/components/StarRating/StarRating.js +8 -5
- package/es6/components/Tab/Tab.js +2 -1
- package/es6/components/Table/StyledTable.js +2 -2
- package/es6/components/Tabs/Tabs.js +8 -12
- package/es6/components/Tag/StyledTag.js +10 -2
- package/es6/components/TextInput/CopyButton.js +3 -2
- package/es6/components/TextInput/TextInput.js +5 -0
- package/es6/components/ThumbsRating/ThumbsRating.js +15 -10
- package/es6/components/Toolbar/Toolbar.js +15 -11
- package/es6/components/Video/Video.js +3 -5
- package/es6/themes/base.d.ts +284 -4
- package/es6/themes/base.js +369 -21
- package/es6/utils/graphics.js +123 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +46 -46
- package/themes/base.d.ts +284 -4
- package/themes/base.js +369 -21
- 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:
|
|
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
|
-
})(["
|
|
45
|
-
return props.theme.global.edgeSize.
|
|
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$
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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$
|
|
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$
|
|
37
|
+
var _theme$thumbsRating5, _theme$thumbsRating6;
|
|
33
38
|
return /*#__PURE__*/React.createElement(StyledThumbsRatingBox, {
|
|
34
39
|
focus: focus && usingKeyboard
|
|
35
|
-
}, checked ? /*#__PURE__*/React.createElement(
|
|
36
|
-
color: (_theme$
|
|
37
|
-
}) : /*#__PURE__*/React.createElement(
|
|
38
|
-
color: (_theme$
|
|
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(
|
|
44
|
-
color: (_theme$
|
|
45
|
-
}) : /*#__PURE__*/React.createElement(
|
|
46
|
-
color: (_theme$
|
|
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
|
-
|
|
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:
|
|
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, {
|