grommet 2.39.0 → 2.40.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/all/stories/AllComponents.js +1 -1
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/components/Accordion/stories/Simple.js +1 -1
- package/components/AccordionPanel/AccordionPanel.js +1 -1
- package/components/Anchor/Anchor.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +3 -3
- package/components/Button/Button.js +1 -1
- package/components/Calendar/Calendar.js +15 -15
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/Cards/Cards.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/CheckBox/CheckBox.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +1 -1
- package/components/Data/DataForm.js +5 -5
- package/components/Data/filter.js +6 -6
- package/components/Data/index.d.ts +1 -3
- package/components/Data/propTypes.js +2 -1
- package/components/Data/stories/ComposedToolbar.js +2 -1
- package/components/Data/stories/Inline.js +1 -1
- package/components/Data/stories/Views.js +3 -0
- package/components/DataChart/DataChart.js +1 -1
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +1 -1
- package/components/DataFilter/DataFilter.js +4 -4
- package/components/DataFilters/DataFilters.js +1 -1
- package/components/DataSearch/DataSearch.js +1 -1
- package/components/DataSort/DataSort.js +1 -1
- package/components/DataSummary/DataSummary.js +1 -1
- package/components/DataTable/Body.js +1 -1
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +1 -1
- package/components/DataTable/buildState.js +10 -10
- package/components/DataTableColumns/DataTableColumns.js +1 -1
- package/components/DataTableColumns/stories/DefaultValue.js +49 -0
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/components/DataView/DataView.js +1 -1
- package/components/DateInput/DateInput.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +5 -5
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/FileInput/FileInput.js +1 -1
- package/components/FocusedContainer.js +1 -1
- package/components/Form/Form.js +7 -7
- package/components/FormField/FormField.js +1 -1
- package/components/Grid/Grid.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/LayerContainer.js +1 -1
- package/components/List/List.js +5 -3
- package/components/List/index.d.ts +1 -0
- package/components/List/propTypes.js +1 -0
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +1 -1
- package/components/Menu/Menu.js +1 -1
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +1 -1
- package/components/Meter/Meter.js +1 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +1 -1
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/PaginationStep.js +1 -1
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/components/RoutedButton/RoutedButton.js +1 -1
- package/components/Select/DefaultSelectTextInput.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/SelectContainer.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Select/utils.js +10 -10
- package/components/SelectMultiple/SelectMultiple.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +1 -1
- package/components/Skeleton/stories/GridContainer.js +1 -1
- package/components/Skeleton/stories/Individual.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/StarRating/StarRating.js +1 -1
- package/components/Tab/Tab.js +1 -1
- package/components/Table/Table.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/Tabs/Tabs.js +1 -1
- package/components/Tag/Tag.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/TextSkeleton.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/Tip/Tip.js +5 -0
- package/components/Tip/index.d.ts +1 -0
- package/components/Tip/propTypes.js +2 -1
- package/components/ToggleGroup/ToggleGroup.js +1 -1
- package/components/Toolbar/Toolbar.js +1 -1
- package/components/Video/StyledVideo.js +1 -1
- package/components/Video/Video.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +1 -1
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
- package/es6/components/Anchor/Anchor.js +1 -1
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +3 -3
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Calendar/Calendar.js +16 -15
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Cards/Cards.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +5 -5
- package/es6/components/Data/filter.js +6 -6
- package/es6/components/Data/index.d.ts +1 -3
- package/es6/components/Data/propTypes.js +2 -1
- package/es6/components/Data/stories/ComposedToolbar.js +2 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/Data/stories/Views.js +3 -0
- package/es6/components/DataChart/DataChart.js +1 -1
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +4 -4
- package/es6/components/DataFilters/DataFilters.js +1 -1
- package/es6/components/DataSearch/DataSearch.js +1 -1
- package/es6/components/DataSort/DataSort.js +1 -1
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +1 -1
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +1 -1
- package/es6/components/DataTable/buildState.js +11 -10
- package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
- package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +6 -6
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/FileInput/FileInput.js +1 -1
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +7 -7
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +1 -1
- package/es6/components/List/List.js +5 -3
- package/es6/components/List/index.d.ts +1 -0
- package/es6/components/List/propTypes.js +1 -0
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +1 -1
- package/es6/components/Menu/Menu.js +1 -1
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +1 -1
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +1 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/PaginationStep.js +1 -1
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/es6/components/RoutedButton/RoutedButton.js +1 -1
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +1 -1
- package/es6/components/Select/SelectContainer.js +1 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/Select/utils.js +11 -10
- package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/stories/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Individual.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/StarRating/StarRating.js +1 -1
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Table/Table.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/Tabs/Tabs.js +1 -1
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/TextSkeleton.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/Tip/Tip.js +6 -1
- package/es6/components/Tip/index.d.ts +1 -0
- package/es6/components/Tip/propTypes.js +2 -1
- package/es6/components/ToggleGroup/ToggleGroup.js +1 -1
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/StyledVideo.js +1 -1
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/utils/DOM.js +7 -5
- package/es6/utils/background.js +4 -4
- package/es6/utils/colors.js +3 -2
- package/es6/utils/mixins.js +3 -2
- package/es6/utils/object.js +3 -2
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/styles.js +1 -1
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +33 -34
- package/utils/DOM.js +4 -4
- package/utils/background.js +4 -4
- package/utils/colors.js +2 -2
- package/utils/mixins.js +2 -2
- package/utils/object.js +2 -2
- package/utils/pagination.js +1 -1
- package/utils/styles.js +1 -1
|
@@ -13,7 +13,7 @@ var fitStyle = css(["flex:1 1;min-height:0;object-fit:", ";"], function (props)
|
|
|
13
13
|
var StyledVideo = styled.video.withConfig(styledComponentsConfig).attrs(withTheme).withConfig({
|
|
14
14
|
displayName: "StyledVideo",
|
|
15
15
|
componentId: "sc-w4v8h9-0"
|
|
16
|
-
})(["max-width:100%;z-index:1;", "::cue{background:", ";}", ";"], function (props) {
|
|
16
|
+
})(["max-width:100%;z-index:1;", " ::cue{background:", ";}", ";"], function (props) {
|
|
17
17
|
return props.fit && fitStyle;
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.theme.video.captions.background;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["alignSelf", "autoPlay", "children", "controls", "gridArea", "loop", "margin", "messages", "mute", "onDurationChange", "onEnded", "onPause", "onPlay", "onTimeUpdate", "onVolumeChange", "skipInterval"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
|
|
6
6
|
import { AnnounceContext } from '../../contexts/AnnounceContext';
|
|
@@ -3,7 +3,7 @@ var _excluded = ["fill", "color", "continents", "hoverColor", "onSelectPlace", "
|
|
|
3
3
|
_excluded3 = ["color", "onClick", "onHover"],
|
|
4
4
|
_excluded4 = ["color", "coords", "content", "dropProps", "key", "name", "onClick", "onHover"];
|
|
5
5
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
6
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
6
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
7
7
|
import React, { forwardRef } from 'react';
|
|
8
8
|
import { Drop } from '../Drop';
|
|
9
9
|
import { normalizeColor, parseMetricToNum } from '../../utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children", "areas"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { deepMerge } from 'grommet/utils';
|
|
6
6
|
import { grommet } from 'grommet/themes';
|
package/es6/utils/DOM.js
CHANGED
|
@@ -167,13 +167,14 @@ export var makeNodeUnfocusable = function makeNodeUnfocusable(node) {
|
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
|
|
170
|
+
var _findVisibleParent = function findVisibleParent(element) {
|
|
171
171
|
if (element) {
|
|
172
172
|
// Get the closest ancestor element that is positioned.
|
|
173
|
-
return element.offsetParent ? element :
|
|
173
|
+
return element.offsetParent ? element : _findVisibleParent(element.parentElement) || element;
|
|
174
174
|
}
|
|
175
175
|
return undefined;
|
|
176
176
|
};
|
|
177
|
+
export { _findVisibleParent as findVisibleParent };
|
|
177
178
|
export var isNodeAfterScroll = function isNodeAfterScroll(node, target) {
|
|
178
179
|
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
179
180
|
bottom = _node$getBoundingClie.bottom;
|
|
@@ -196,7 +197,8 @@ export var isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {
|
|
|
196
197
|
targetTop = _ref2.top;
|
|
197
198
|
return top <= targetTop;
|
|
198
199
|
};
|
|
199
|
-
|
|
200
|
-
if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return
|
|
200
|
+
var _findButtonParent = function findButtonParent(element) {
|
|
201
|
+
if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return _findButtonParent(element.parentElement);
|
|
201
202
|
return element;
|
|
202
|
-
};
|
|
203
|
+
};
|
|
204
|
+
export { _findButtonParent as findButtonParent };
|
package/es6/utils/background.js
CHANGED
|
@@ -34,7 +34,7 @@ var normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg,
|
|
|
34
34
|
((_theme$global$backgro2 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro2[background]) || background, theme, backgroundArg.dark);
|
|
35
35
|
return result;
|
|
36
36
|
};
|
|
37
|
-
var
|
|
37
|
+
var _normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {
|
|
38
38
|
var result;
|
|
39
39
|
if (background.image) {
|
|
40
40
|
var _theme$global$backgro3, _theme$global$backgro4;
|
|
@@ -42,12 +42,12 @@ var normalizeBackgroundImage = function normalizeBackgroundImage(background, the
|
|
|
42
42
|
} else {
|
|
43
43
|
var _theme$global$backgro5;
|
|
44
44
|
var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);
|
|
45
|
-
result = typeof normalized === 'object' ?
|
|
45
|
+
result = typeof normalized === 'object' ? _normalizeBackgroundImage(normalized, theme) : normalized;
|
|
46
46
|
}
|
|
47
47
|
return result;
|
|
48
48
|
};
|
|
49
49
|
var rotateBackground = function rotateBackground(background, theme) {
|
|
50
|
-
var backgroundImage =
|
|
50
|
+
var backgroundImage = _normalizeBackgroundImage(background, theme);
|
|
51
51
|
var result = backgroundImage;
|
|
52
52
|
if (backgroundImage.lastIndexOf('linear-gradient', 0) === 0) {
|
|
53
53
|
var regex = /\d{1,}deg\b,/gm; // Contains rotation specified in degrees. Only targets 'deg' string with a trailing comma. Do not match 'deg' string for hsl, etc..
|
|
@@ -151,7 +151,7 @@ export var backgroundStyle = function backgroundStyle(backgroundArg, theme, text
|
|
|
151
151
|
var _backgroundAndTextCol = backgroundAndTextColors(background, textColorArg, theme),
|
|
152
152
|
backgroundColor = _backgroundAndTextCol[0],
|
|
153
153
|
textColor = _backgroundAndTextCol[1];
|
|
154
|
-
var backgroundImage = background.rotate ? rotateBackground(background, theme) :
|
|
154
|
+
var backgroundImage = background.rotate ? rotateBackground(background, theme) : _normalizeBackgroundImage(background, theme);
|
|
155
155
|
var backgroundClipStyle = '';
|
|
156
156
|
if (background.clip) {
|
|
157
157
|
backgroundClipStyle = background.clip === 'text' ? "-webkit-text-fill-color: transparent; \n -webkit-background-clip: text; \n background-clip: text;" : "background-clip: " + background.clip + ";";
|
package/es6/utils/colors.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Returns the specific color that should be used according to the theme.
|
|
2
2
|
// If 'dark' is supplied, it takes precedence over 'theme.dark'.
|
|
3
3
|
// Can return undefined.
|
|
4
|
-
|
|
4
|
+
var _normalizeColor = function normalizeColor(color, theme, dark) {
|
|
5
5
|
var colorSpec = theme.global && theme.global.colors[color] !== undefined ? theme.global.colors[color] : color;
|
|
6
6
|
// If the color has a light or dark object, use that
|
|
7
7
|
var result = colorSpec;
|
|
@@ -14,10 +14,11 @@ export var normalizeColor = function normalizeColor(color, theme, dark) {
|
|
|
14
14
|
}
|
|
15
15
|
// allow one level of indirection in color names
|
|
16
16
|
if (result && theme.global && theme.global.colors[result] !== undefined) {
|
|
17
|
-
result =
|
|
17
|
+
result = _normalizeColor(result, theme, dark);
|
|
18
18
|
}
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
|
+
export { _normalizeColor as normalizeColor };
|
|
21
22
|
var parseHexToRGB = function parseHexToRGB(color) {
|
|
22
23
|
return color.length < 7 // 7 is what's needed for '#RRGGBB'
|
|
23
24
|
? color.match(/[A-Za-z0-9]{1}/g).map(function (v) {
|
package/es6/utils/mixins.js
CHANGED
|
@@ -19,18 +19,19 @@ export var fontSize = function fontSize(size, lineHeight) {
|
|
|
19
19
|
export var breakpointStyle = function breakpointStyle(breakpoint, content) {
|
|
20
20
|
return css(["@media only screen ", "{", ";}"], breakpoint.value && "and (max-width: " + breakpoint.value + "px)", content);
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
var _findAllByType = function findAllByType(component, type) {
|
|
23
23
|
var matches = [];
|
|
24
24
|
if (component.type === type) {
|
|
25
25
|
matches.push(component);
|
|
26
26
|
}
|
|
27
27
|
if (component.children) {
|
|
28
28
|
component.children.forEach(function (child) {
|
|
29
|
-
matches = matches.concat(
|
|
29
|
+
matches = matches.concat(_findAllByType(child, type));
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
return matches;
|
|
33
33
|
};
|
|
34
|
+
export { _findAllByType as findAllByType };
|
|
34
35
|
export var getAvailableAtBadge = function getAvailableAtBadge(availableAt, componentType) {
|
|
35
36
|
return [{
|
|
36
37
|
url: "https://storybook.grommet.io/?selectedKind=" + componentType + "-" + availableAt + "&full=0&stories=1&panelRight=0",
|
package/es6/utils/object.js
CHANGED
|
@@ -8,7 +8,7 @@ export var deepFreeze = function deepFreeze(obj) {
|
|
|
8
8
|
});
|
|
9
9
|
return Object.freeze(obj);
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
var _deepMerge = function deepMerge(target) {
|
|
12
12
|
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
13
13
|
sources[_key - 1] = arguments[_key];
|
|
14
14
|
}
|
|
@@ -24,7 +24,7 @@ export var deepMerge = function deepMerge(target) {
|
|
|
24
24
|
if (!output[key]) {
|
|
25
25
|
output[key] = _extends({}, source[key]);
|
|
26
26
|
} else {
|
|
27
|
-
output[key] =
|
|
27
|
+
output[key] = _deepMerge(output[key], source[key]);
|
|
28
28
|
}
|
|
29
29
|
} else {
|
|
30
30
|
output[key] = source[key];
|
|
@@ -34,6 +34,7 @@ export var deepMerge = function deepMerge(target) {
|
|
|
34
34
|
});
|
|
35
35
|
return output;
|
|
36
36
|
};
|
|
37
|
+
export { _deepMerge as deepMerge };
|
|
37
38
|
export var removeUndefined = function removeUndefined(obj) {
|
|
38
39
|
var result = {};
|
|
39
40
|
Object.keys(obj).forEach(function (key) {
|
package/es6/utils/pagination.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["data", "page", "step"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import { useMemo, useState } from 'react';
|
|
5
5
|
export var normalizeShow = function normalizeShow(showProp, step) {
|
|
6
6
|
var page;
|
package/es6/utils/styles.js
CHANGED
|
@@ -225,7 +225,7 @@ var inputSizeStyle = function inputSizeStyle(props) {
|
|
|
225
225
|
}
|
|
226
226
|
return css(["font-size:", ";line-height:", ";"], data.size, data.height);
|
|
227
227
|
};
|
|
228
|
-
export var inputStyle = css(["box-sizing:border-box;", " font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;", " ", " ", " margin:0;", " &:focus{", ";}", " ", "::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}", ""], function (props) {
|
|
228
|
+
export var inputStyle = css(["box-sizing:border-box;", " font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;", " ", " ", " margin:0;", " &:focus{", ";}", " ", " ::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}", ""], function (props) {
|
|
229
229
|
var _props$theme$text$pro;
|
|
230
230
|
return "font-size: " + (props.theme.global.input.font.size ? ((_props$theme$text$pro = props.theme.text[props.theme.global.input.font.size]) == null ? void 0 : _props$theme$text$pro.size) || props.theme.global.input.font.size : 'inherit') + ";";
|
|
231
231
|
}, function (props) {
|