grommet 2.29.1 → 2.31.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/Anchor/Anchor.js +12 -5
- package/components/Anchor/StyledAnchor.js +6 -3
- package/components/Button/Badge.js +42 -43
- package/components/Button/Button.js +21 -14
- package/components/Button/StyledButton.js +4 -2
- package/components/Button/StyledButtonKind.js +25 -9
- package/components/Button/index.d.ts +2 -0
- package/components/Button/propTypes.js +1 -0
- package/components/Calendar/Calendar.js +14 -6
- package/components/CheckBox/index.d.ts +1 -1
- package/components/Data/DataForm.js +97 -26
- package/components/Data/stories/Cards.js +1 -1
- package/components/Data/stories/Complex.js +84 -0
- package/components/Data/stories/Controlled.js +1 -1
- package/components/Data/stories/DataTable.js +11 -4
- package/components/Data/stories/Infinite.js +1 -1
- package/components/Data/stories/Inline.js +7 -2
- package/components/Data/stories/List.js +1 -1
- package/components/Data/stories/Simple.js +1 -1
- package/components/Data/stories/SpaceX.js +1 -1
- package/components/Data/stories/StarWars.js +18 -24
- package/components/Data/stories/Views.js +1 -1
- package/components/DataFilter/DataFilter.js +32 -42
- package/components/DataFilter/stories/Simple.js +7 -4
- package/components/DataFilters/DataFilters.js +76 -32
- package/components/DataFilters/index.d.ts +1 -0
- package/components/DataFilters/propTypes.js +2 -1
- package/components/DataFilters/stories/Drop.js +7 -4
- package/components/DataFilters/stories/Inline.js +24 -6
- package/components/DataFilters/stories/Layer.js +46 -0
- package/components/DataFilters/stories/Simple.js +7 -4
- package/components/DataSearch/DataSearch.js +57 -9
- package/components/DataSearch/index.d.ts +10 -1
- package/components/DataSearch/propTypes.js +6 -1
- package/components/DataSearch/stories/Drop.js +42 -0
- package/components/DataSearch/stories/Responsive.js +42 -0
- package/components/DataSearch/stories/Simple.js +5 -2
- package/components/DataSort/DataSort.js +61 -12
- package/components/DataSort/index.d.ts +4 -8
- package/components/DataSort/propTypes.js +9 -2
- package/components/DataSort/stories/Drop.js +41 -0
- package/components/DataSort/stories/Simple.js +9 -5
- package/components/DataSummary/stories/Simple.js +7 -4
- package/components/DataTable/GroupedBody.js +1 -0
- package/components/DataTable/StyledDataTable.js +2 -2
- package/components/DataTableColumns/DataTableColumns.js +2 -1
- package/components/DataTableColumns/stories/Simple.js +9 -5
- package/components/DataView/DataView.js +22 -7
- package/components/DataView/stories/Simple.js +8 -5
- package/components/DateInput/DateInput.js +2 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Drop/DropContainer.js +32 -79
- package/components/Drop/stories/Overflow.js +1 -0
- package/components/DropButton/DropButton.js +1 -1
- package/components/Form/stories/Controlled.js +11 -2
- package/components/Form/stories/ControlledInput.js +13 -2
- package/components/Form/stories/ControlledInputLazy.js +13 -2
- package/components/Form/stories/ControlledLazy.js +13 -2
- package/components/Form/stories/FieldWithChildren.js +13 -2
- package/components/Form/stories/FieldWithComponentProp.js +17 -1
- package/components/Form/stories/Uncontrolled.js +15 -2
- package/components/Form/stories/ValidateOnChange.js +6 -0
- package/components/Form/stories/ValidateOnMount.js +4 -0
- package/components/Form/stories/typescript/TypedForm.tsx +25 -3
- package/components/Layer/LayerContainer.js +1 -1
- package/components/Layer/StyledLayer.js +3 -1
- package/components/MaskedInput/MaskedInput.js +3 -2
- package/components/MaskedInput/StyledMaskedInput.js +2 -1
- package/components/Notification/Notification.js +7 -3
- package/components/PageHeader/PageHeader.js +6 -4
- package/components/Pagination/Pagination.js +8 -0
- package/components/Pagination/StyledPageControl.js +3 -1
- package/components/Paragraph/Paragraph.js +18 -6
- package/components/Paragraph/stories/All.js +5 -1
- package/components/SelectMultiple/SelectMultiple.js +11 -10
- package/components/SelectMultiple/SelectMultipleContainer.js +16 -13
- package/components/SelectMultiple/stories/Help.js +49 -0
- package/components/Tabs/Tabs.js +2 -1
- package/components/Text/Text.js +9 -1
- package/components/Text/TextContext.js +8 -0
- package/components/TextInput/StyledTextInput.js +5 -2
- package/components/TextInput/TextInput.js +7 -4
- package/components/TextInput/index.d.ts +3 -1
- package/components/TextInput/propTypes.js +3 -1
- package/components/Toolbar/stories/Simple.js +1 -1
- package/components/WorldMap/WorldMap.js +17 -14
- package/es6/components/Anchor/Anchor.js +13 -6
- package/es6/components/Anchor/StyledAnchor.js +6 -3
- package/es6/components/Button/Badge.js +43 -44
- package/es6/components/Button/Button.js +22 -15
- package/es6/components/Button/StyledButton.js +5 -3
- package/es6/components/Button/StyledButtonKind.js +26 -10
- package/es6/components/Button/index.d.ts +2 -0
- package/es6/components/Button/propTypes.js +2 -1
- package/es6/components/Calendar/Calendar.js +14 -6
- package/es6/components/CheckBox/index.d.ts +1 -1
- package/es6/components/Data/DataForm.js +97 -26
- package/es6/components/Data/stories/Cards.js +1 -1
- package/es6/components/Data/stories/Complex.js +78 -0
- package/es6/components/Data/stories/Controlled.js +1 -1
- package/es6/components/Data/stories/DataTable.js +12 -5
- package/es6/components/Data/stories/Infinite.js +1 -1
- package/es6/components/Data/stories/Inline.js +7 -2
- package/es6/components/Data/stories/List.js +1 -1
- package/es6/components/Data/stories/Simple.js +1 -1
- package/es6/components/Data/stories/SpaceX.js +1 -1
- package/es6/components/Data/stories/StarWars.js +18 -24
- package/es6/components/Data/stories/Views.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +32 -42
- package/es6/components/DataFilter/stories/Simple.js +8 -5
- package/es6/components/DataFilters/DataFilters.js +76 -32
- package/es6/components/DataFilters/index.d.ts +1 -0
- package/es6/components/DataFilters/propTypes.js +2 -1
- package/es6/components/DataFilters/stories/Drop.js +8 -5
- package/es6/components/DataFilters/stories/Inline.js +25 -7
- package/es6/components/DataFilters/stories/Layer.js +40 -0
- package/es6/components/DataFilters/stories/Simple.js +8 -5
- package/es6/components/DataSearch/DataSearch.js +58 -10
- package/es6/components/DataSearch/index.d.ts +10 -1
- package/es6/components/DataSearch/propTypes.js +5 -1
- package/es6/components/DataSearch/stories/Drop.js +36 -0
- package/es6/components/DataSearch/stories/Responsive.js +36 -0
- package/es6/components/DataSearch/stories/Simple.js +6 -3
- package/es6/components/DataSort/DataSort.js +62 -13
- package/es6/components/DataSort/index.d.ts +4 -8
- package/es6/components/DataSort/propTypes.js +8 -2
- package/es6/components/DataSort/stories/Drop.js +35 -0
- package/es6/components/DataSort/stories/Simple.js +10 -6
- package/es6/components/DataSummary/stories/Simple.js +8 -5
- package/es6/components/DataTable/GroupedBody.js +1 -0
- package/es6/components/DataTable/StyledDataTable.js +2 -2
- package/es6/components/DataTableColumns/DataTableColumns.js +2 -1
- package/es6/components/DataTableColumns/stories/Simple.js +10 -6
- package/es6/components/DataView/DataView.js +22 -7
- package/es6/components/DataView/stories/Simple.js +9 -6
- package/es6/components/DateInput/DateInput.js +2 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Drop/DropContainer.js +34 -81
- package/es6/components/Drop/stories/Overflow.js +1 -0
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/Form/stories/Controlled.js +11 -2
- package/es6/components/Form/stories/ControlledInput.js +13 -2
- package/es6/components/Form/stories/ControlledInputLazy.js +13 -2
- package/es6/components/Form/stories/ControlledLazy.js +13 -2
- package/es6/components/Form/stories/FieldWithChildren.js +13 -2
- package/es6/components/Form/stories/FieldWithComponentProp.js +17 -1
- package/es6/components/Form/stories/Uncontrolled.js +15 -2
- package/es6/components/Form/stories/ValidateOnChange.js +6 -0
- package/es6/components/Form/stories/ValidateOnMount.js +4 -0
- package/es6/components/Form/stories/typescript/TypedForm.tsx +25 -3
- package/es6/components/Layer/LayerContainer.js +1 -1
- package/es6/components/Layer/StyledLayer.js +3 -1
- package/es6/components/MaskedInput/MaskedInput.js +4 -3
- package/es6/components/MaskedInput/StyledMaskedInput.js +2 -1
- package/es6/components/Notification/Notification.js +7 -3
- package/es6/components/PageHeader/PageHeader.js +6 -4
- package/es6/components/Pagination/Pagination.js +8 -0
- package/es6/components/Pagination/StyledPageControl.js +3 -1
- package/es6/components/Paragraph/Paragraph.js +19 -7
- package/es6/components/Paragraph/stories/All.js +5 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +11 -10
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +16 -13
- package/es6/components/SelectMultiple/stories/Help.js +42 -0
- package/es6/components/Tabs/Tabs.js +2 -1
- package/es6/components/Text/Text.js +10 -2
- package/es6/components/Text/TextContext.js +2 -0
- package/es6/components/TextInput/StyledTextInput.js +6 -3
- package/es6/components/TextInput/TextInput.js +8 -5
- package/es6/components/TextInput/index.d.ts +3 -1
- package/es6/components/TextInput/propTypes.js +3 -1
- package/es6/components/Toolbar/stories/Simple.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +17 -14
- package/es6/languages/default.json +7 -2
- package/es6/themes/base.d.ts +34 -0
- package/es6/themes/base.js +37 -1
- package/es6/utils/DOM.js +1 -1
- package/es6/utils/background.js +9 -1
- package/es6/utils/colors.js +2 -2
- package/es6/utils/general-prop-types.js +1 -1
- package/es6/utils/icon.js +7 -0
- package/es6/utils/index.d.ts +7 -1
- package/es6/utils/index.js +1 -0
- package/es6/utils/styles.js +10 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +7 -2
- package/package.json +41 -39
- package/themes/base.d.ts +34 -0
- package/themes/base.js +37 -1
- package/utils/DOM.js +1 -1
- package/utils/background.js +8 -0
- package/utils/colors.js +3 -1
- package/utils/general-prop-types.js +1 -1
- package/utils/icon.js +12 -0
- package/utils/index.d.ts +7 -1
- package/utils/index.js +6 -0
- package/utils/styles.js +12 -1
|
@@ -1,47 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["drop", "options"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
import React, { useContext, useMemo, useState } from 'react';
|
|
5
|
+
import { Descend } from 'grommet-icons/icons/Descend';
|
|
2
6
|
import { DataContext } from '../../contexts/DataContext';
|
|
3
|
-
import {
|
|
7
|
+
import { Box } from '../Box';
|
|
4
8
|
import { DataForm } from '../Data/DataForm';
|
|
9
|
+
import { DropButton } from '../DropButton';
|
|
5
10
|
import { FormContext } from '../Form/FormContext';
|
|
6
11
|
import { FormField } from '../FormField';
|
|
12
|
+
import { RadioButtonGroup } from '../RadioButtonGroup';
|
|
7
13
|
import { Select } from '../Select';
|
|
8
14
|
import { MessageContext } from '../../contexts/MessageContext';
|
|
9
15
|
import { DataSortPropTypes } from './propTypes';
|
|
10
|
-
|
|
16
|
+
var dropProps = {
|
|
17
|
+
align: {
|
|
18
|
+
top: 'bottom',
|
|
19
|
+
left: 'left'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var Content = function Content(_ref) {
|
|
11
23
|
var optionsArg = _ref.options;
|
|
12
24
|
var _useContext = useContext(DataContext),
|
|
13
25
|
data = _useContext.data,
|
|
14
26
|
dataId = _useContext.id,
|
|
15
27
|
messages = _useContext.messages,
|
|
16
28
|
properties = _useContext.properties;
|
|
17
|
-
var _useContext2 = useContext(
|
|
18
|
-
|
|
19
|
-
var _useContext3 = useContext(MessageContext),
|
|
20
|
-
format = _useContext3.format;
|
|
29
|
+
var _useContext2 = useContext(MessageContext),
|
|
30
|
+
format = _useContext2.format;
|
|
21
31
|
var options = useMemo(function () {
|
|
22
32
|
return optionsArg || properties && Object.keys(properties).sort() || Object.keys(data[0]).sort();
|
|
23
33
|
}, [data, optionsArg, properties]);
|
|
24
34
|
var directionOptions = [{
|
|
25
35
|
label: format({
|
|
26
36
|
id: 'dataSort.ascending',
|
|
27
|
-
messages: messages == null ? void 0 : messages.
|
|
37
|
+
messages: messages == null ? void 0 : messages.dataSort
|
|
28
38
|
}),
|
|
29
39
|
value: 'asc'
|
|
30
40
|
}, {
|
|
31
41
|
label: format({
|
|
32
42
|
id: 'dataSort.descending',
|
|
33
|
-
messages: messages == null ? void 0 : messages.
|
|
43
|
+
messages: messages == null ? void 0 : messages.dataSort
|
|
34
44
|
}),
|
|
35
45
|
value: 'desc'
|
|
36
46
|
}];
|
|
37
47
|
var sortPropertyId = dataId + "--sort-property";
|
|
38
48
|
var sortDirectionId = dataId + "--sort-direction";
|
|
39
|
-
|
|
49
|
+
return [/*#__PURE__*/React.createElement(FormField, {
|
|
40
50
|
key: "by",
|
|
41
51
|
htmlFor: sortPropertyId,
|
|
42
52
|
label: format({
|
|
43
53
|
id: 'dataSort.by',
|
|
44
|
-
messages: messages == null ? void 0 : messages.
|
|
54
|
+
messages: messages == null ? void 0 : messages.dataSort
|
|
45
55
|
})
|
|
46
56
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
47
57
|
id: sortPropertyId,
|
|
@@ -52,16 +62,55 @@ export var DataSort = function DataSort(_ref) {
|
|
|
52
62
|
htmlFor: sortDirectionId,
|
|
53
63
|
label: format({
|
|
54
64
|
id: 'dataSort.direction',
|
|
55
|
-
messages: messages == null ? void 0 : messages.
|
|
65
|
+
messages: messages == null ? void 0 : messages.dataSort
|
|
56
66
|
})
|
|
57
67
|
}, /*#__PURE__*/React.createElement(RadioButtonGroup, {
|
|
58
68
|
id: sortDirectionId,
|
|
59
69
|
name: "_sort.direction",
|
|
60
70
|
options: directionOptions
|
|
61
71
|
}))];
|
|
72
|
+
};
|
|
73
|
+
export var DataSort = function DataSort(_ref2) {
|
|
74
|
+
var drop = _ref2.drop,
|
|
75
|
+
options = _ref2.options,
|
|
76
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
77
|
+
var _useContext3 = useContext(DataContext),
|
|
78
|
+
dataId = _useContext3.id,
|
|
79
|
+
messages = _useContext3.messages;
|
|
80
|
+
var _useContext4 = useContext(FormContext),
|
|
81
|
+
noForm = _useContext4.noForm;
|
|
82
|
+
var _useContext5 = useContext(MessageContext),
|
|
83
|
+
format = _useContext5.format;
|
|
84
|
+
var _useState = useState(),
|
|
85
|
+
showContent = _useState[0],
|
|
86
|
+
setShowContent = _useState[1];
|
|
87
|
+
var content = /*#__PURE__*/React.createElement(Content, {
|
|
88
|
+
options: options
|
|
89
|
+
});
|
|
62
90
|
if (noForm) content = /*#__PURE__*/React.createElement(DataForm, {
|
|
63
91
|
footer: false
|
|
64
92
|
}, content);
|
|
65
|
-
return content;
|
|
93
|
+
if (!drop) return content;
|
|
94
|
+
var control = /*#__PURE__*/React.createElement(DropButton, _extends({
|
|
95
|
+
id: dataId + "--sort-control",
|
|
96
|
+
"aria-label": format({
|
|
97
|
+
id: 'dataSort.open',
|
|
98
|
+
messages: messages == null ? void 0 : messages.dataSort
|
|
99
|
+
}),
|
|
100
|
+
kind: "toolbar",
|
|
101
|
+
icon: /*#__PURE__*/React.createElement(Descend, null),
|
|
102
|
+
dropProps: dropProps,
|
|
103
|
+
dropContent: /*#__PURE__*/React.createElement(Box, {
|
|
104
|
+
pad: "small"
|
|
105
|
+
}, content),
|
|
106
|
+
open: showContent,
|
|
107
|
+
onOpen: function onOpen() {
|
|
108
|
+
return setShowContent(undefined);
|
|
109
|
+
},
|
|
110
|
+
onClose: function onClose() {
|
|
111
|
+
return setShowContent(undefined);
|
|
112
|
+
}
|
|
113
|
+
}, rest));
|
|
114
|
+
return control;
|
|
66
115
|
};
|
|
67
116
|
DataSort.propTypes = DataSortPropTypes;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BoxProps } from '../Box/index';
|
|
3
2
|
|
|
4
|
-
export interface DataSortProps {
|
|
3
|
+
export interface DataSortProps {
|
|
4
|
+
drop?: boolean;
|
|
5
|
+
}
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface DataSortExtendedProps
|
|
9
|
-
extends BoxProps,
|
|
10
|
-
DataSortProps,
|
|
11
|
-
divProps {}
|
|
7
|
+
export interface DataSortExtendedProps extends DataSortProps {}
|
|
12
8
|
|
|
13
9
|
declare const DataSort: React.FC<DataSortExtendedProps>;
|
|
14
10
|
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
var PropType = {};
|
|
3
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4
|
+
PropType = {
|
|
5
|
+
drop: PropTypes.bool
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export var DataSortPropTypes = PropType;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Data, DataTable, Notification, Toolbar } from 'grommet';
|
|
3
|
+
import { DataSort } from '../DataSort';
|
|
4
|
+
import { columns, DATA } from '../../DataTable/stories/data';
|
|
5
|
+
export var Drop = function Drop() {
|
|
6
|
+
return (
|
|
7
|
+
/*#__PURE__*/
|
|
8
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
9
|
+
// <Grommet theme={...}>
|
|
10
|
+
React.createElement(Box, {
|
|
11
|
+
align: "center",
|
|
12
|
+
justify: "start",
|
|
13
|
+
pad: "large",
|
|
14
|
+
gap: "medium"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
16
|
+
status: "info",
|
|
17
|
+
message: "Data is in 'beta'. The API surface is subject to change."
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Data, {
|
|
19
|
+
data: DATA,
|
|
20
|
+
updateOn: "change"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Toolbar, null, /*#__PURE__*/React.createElement(DataSort, {
|
|
22
|
+
drop: true
|
|
23
|
+
})), /*#__PURE__*/React.createElement(DataTable, {
|
|
24
|
+
columns: columns
|
|
25
|
+
})))
|
|
26
|
+
// </Grommet>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
Drop.args = {
|
|
31
|
+
full: true
|
|
32
|
+
};
|
|
33
|
+
export default {
|
|
34
|
+
title: 'Data/DataSort/Drop'
|
|
35
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Data, DataTable,
|
|
2
|
+
import { Box, Data, DataTable, Notification } from 'grommet';
|
|
3
3
|
import { DataSort } from '../DataSort';
|
|
4
4
|
import { columns, DATA } from '../../DataTable/stories/data';
|
|
5
5
|
export var Simple = function Simple() {
|
|
@@ -7,11 +7,15 @@ export var Simple = function Simple() {
|
|
|
7
7
|
/*#__PURE__*/
|
|
8
8
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
9
9
|
// <Grommet theme={...}>
|
|
10
|
-
React.createElement(
|
|
10
|
+
React.createElement(Box, {
|
|
11
|
+
align: "center",
|
|
12
|
+
justify: "start",
|
|
11
13
|
pad: "large",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
gap: "medium"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
16
|
+
status: "info",
|
|
17
|
+
message: "Data is in 'beta'. The API surface is subject to change."
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Data, {
|
|
15
19
|
data: DATA,
|
|
16
20
|
updateOn: "change"
|
|
17
21
|
}, /*#__PURE__*/React.createElement(DataSort, null), /*#__PURE__*/React.createElement(DataTable, {
|
|
@@ -25,5 +29,5 @@ Simple.args = {
|
|
|
25
29
|
full: true
|
|
26
30
|
};
|
|
27
31
|
export default {
|
|
28
|
-
title: '
|
|
32
|
+
title: 'Data/DataSort/Simple'
|
|
29
33
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Data, DataTable } from 'grommet';
|
|
2
|
+
import { Box, Data, DataTable, Notification } from 'grommet';
|
|
3
3
|
import { DataSummary } from '../DataSummary';
|
|
4
4
|
import { columns, DATA } from '../../DataTable/stories/data';
|
|
5
5
|
export var Simple = function Simple() {
|
|
@@ -8,11 +8,14 @@ export var Simple = function Simple() {
|
|
|
8
8
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
9
9
|
// <Grommet theme={...}>
|
|
10
10
|
React.createElement(Box, {
|
|
11
|
-
fill: true,
|
|
12
11
|
align: "center",
|
|
13
12
|
justify: "start",
|
|
14
|
-
pad: "large"
|
|
15
|
-
|
|
13
|
+
pad: "large",
|
|
14
|
+
gap: "medium"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
16
|
+
status: "info",
|
|
17
|
+
message: "Data is in 'beta'. The API surface is subject to change."
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Data, {
|
|
16
19
|
data: DATA
|
|
17
20
|
}, /*#__PURE__*/React.createElement(DataSummary, null), /*#__PURE__*/React.createElement(DataTable, {
|
|
18
21
|
columns: columns
|
|
@@ -25,5 +28,5 @@ Simple.args = {
|
|
|
25
28
|
full: true
|
|
26
29
|
};
|
|
27
30
|
export default {
|
|
28
|
-
title: '
|
|
31
|
+
title: 'Data/DataSummary/Simple'
|
|
29
32
|
};
|
|
@@ -13,7 +13,7 @@ import { TableFooter } from '../TableFooter';
|
|
|
13
13
|
var StyledDataTable = styled(Table).withConfig({
|
|
14
14
|
displayName: "StyledDataTable",
|
|
15
15
|
componentId: "sc-xrlyjm-0"
|
|
16
|
-
})(["position:relative;border-spacing:0;border-collapse:separate;
|
|
16
|
+
})(["position:relative;border-spacing:0;border-collapse:separate;", " ", " ", ";"], genericStyles, function (props) {
|
|
17
17
|
return props.fillProp && fillStyle(props.fillProp);
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.theme.dataTable && props.theme.dataTable.body && props.theme.dataTable.body.extend;
|
|
@@ -53,7 +53,7 @@ var StyledDataTableBody = styled(TableBody).withConfig({
|
|
|
53
53
|
displayName: "StyledDataTable__StyledDataTableBody",
|
|
54
54
|
componentId: "sc-xrlyjm-3"
|
|
55
55
|
})(["", " &:focus{", "}&:focus:not(:focus-visible){", "}"], function (props) {
|
|
56
|
-
return props.size && "\n display: block;\n width: 100%;\n max-height: " + props.theme.global.size[props.size] + ";\n overflow: auto;\n ";
|
|
56
|
+
return props.size && "\n display: block;\n width: 100%;\n max-height: " + (props.theme.global.size[props.size] || props.size) + ";\n overflow: auto;\n ";
|
|
57
57
|
}, focusStyle({
|
|
58
58
|
skipSvgChildren: true,
|
|
59
59
|
forceOutline: true
|
|
@@ -192,7 +192,8 @@ export var DataTableColumns = function DataTableColumns(_ref5) {
|
|
|
192
192
|
options: options
|
|
193
193
|
});
|
|
194
194
|
if (noForm) content = /*#__PURE__*/React.createElement(DataForm, {
|
|
195
|
-
footer: false
|
|
195
|
+
footer: false,
|
|
196
|
+
updateOn: "change"
|
|
196
197
|
}, content);
|
|
197
198
|
if (!drop) return content;
|
|
198
199
|
var control = /*#__PURE__*/React.createElement(DropButton, _extends({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Data, DataTable,
|
|
2
|
+
import { Box, Data, DataTable, Notification, Toolbar } from 'grommet';
|
|
3
3
|
import { DataTableColumns } from '../DataTableColumns';
|
|
4
4
|
import { columns, DATA } from '../../DataTable/stories/data';
|
|
5
5
|
|
|
@@ -17,11 +17,15 @@ export var Simple = function Simple() {
|
|
|
17
17
|
/*#__PURE__*/
|
|
18
18
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
19
19
|
// <Grommet theme={...}>
|
|
20
|
-
React.createElement(
|
|
20
|
+
React.createElement(Box, {
|
|
21
|
+
align: "center",
|
|
22
|
+
justify: "start",
|
|
21
23
|
pad: "large",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
gap: "medium"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
26
|
+
status: "info",
|
|
27
|
+
message: "Data is in 'beta'. The API surface is subject to change."
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Data, {
|
|
25
29
|
data: DATA,
|
|
26
30
|
updateOn: "change"
|
|
27
31
|
}, /*#__PURE__*/React.createElement(Toolbar, null, /*#__PURE__*/React.createElement(DataTableColumns, {
|
|
@@ -38,5 +42,5 @@ Simple.args = {
|
|
|
38
42
|
full: true
|
|
39
43
|
};
|
|
40
44
|
export default {
|
|
41
|
-
title: '
|
|
45
|
+
title: 'Data/DataTableColumns/Simple'
|
|
42
46
|
};
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["id"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
3
4
|
import React, { useContext, useEffect } from 'react';
|
|
4
5
|
import { DataForm } from '../Data/DataForm';
|
|
5
6
|
import { DataContext } from '../../contexts/DataContext';
|
|
6
7
|
import { FormContext } from '../Form/FormContext';
|
|
8
|
+
import { FormField } from '../FormField';
|
|
7
9
|
import { RadioButtonGroup } from '../RadioButtonGroup';
|
|
8
10
|
import { Select } from '../Select';
|
|
11
|
+
import { MessageContext } from '../../contexts/MessageContext';
|
|
9
12
|
import { DataViewPropTypes } from './propTypes';
|
|
10
13
|
export var DataView = function DataView(_ref) {
|
|
11
|
-
var
|
|
14
|
+
var idProp = _ref.id,
|
|
15
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
16
|
var _useContext = useContext(DataContext),
|
|
13
17
|
dataId = _useContext.id,
|
|
18
|
+
messages = _useContext.messages,
|
|
14
19
|
view = _useContext.view,
|
|
15
20
|
views = _useContext.views,
|
|
16
21
|
addToolbarKey = _useContext.addToolbarKey;
|
|
17
22
|
var _useContext2 = useContext(FormContext),
|
|
18
23
|
noForm = _useContext2.noForm;
|
|
24
|
+
var _useContext3 = useContext(MessageContext),
|
|
25
|
+
format = _useContext3.format;
|
|
26
|
+
var id = idProp || dataId + "--view";
|
|
19
27
|
useEffect(function () {
|
|
20
28
|
if (noForm) addToolbarKey('_view');
|
|
21
29
|
}, [addToolbarKey, noForm]);
|
|
@@ -23,7 +31,6 @@ export var DataView = function DataView(_ref) {
|
|
|
23
31
|
var names = views.map(function (v) {
|
|
24
32
|
return v.name;
|
|
25
33
|
});
|
|
26
|
-
var id = dataId + "-view";
|
|
27
34
|
var content;
|
|
28
35
|
if (!noForm && names.length < 7) {
|
|
29
36
|
content = /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({
|
|
@@ -37,14 +44,22 @@ export var DataView = function DataView(_ref) {
|
|
|
37
44
|
id: id,
|
|
38
45
|
name: "_view",
|
|
39
46
|
showSelectedInline: true,
|
|
40
|
-
placeholder: noForm ? 'Select view
|
|
47
|
+
placeholder: noForm ? 'Select view' : undefined,
|
|
41
48
|
options: names,
|
|
42
49
|
value: view == null ? void 0 : view.name
|
|
43
50
|
}, rest));
|
|
44
51
|
}
|
|
45
|
-
if (noForm)
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
if (noForm)
|
|
53
|
+
// likely in Toolbar
|
|
54
|
+
content = /*#__PURE__*/React.createElement(DataForm, {
|
|
55
|
+
footer: false,
|
|
56
|
+
updateOn: "change"
|
|
57
|
+
}, content);else content = /*#__PURE__*/React.createElement(FormField, {
|
|
58
|
+
htmlFor: id,
|
|
59
|
+
label: format({
|
|
60
|
+
id: 'dataView.label',
|
|
61
|
+
messages: messages == null ? void 0 : messages.dataView
|
|
62
|
+
})
|
|
48
63
|
}, content);
|
|
49
64
|
return content;
|
|
50
65
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Data } from 'grommet';
|
|
2
|
+
import { Box, Data, DataTable, Notification } from 'grommet';
|
|
3
3
|
import { DataView } from '../DataView';
|
|
4
4
|
import { DATA } from '../../DataTable/stories/data';
|
|
5
5
|
export var Simple = function Simple() {
|
|
@@ -8,11 +8,14 @@ export var Simple = function Simple() {
|
|
|
8
8
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
9
9
|
// <Grommet theme={...}>
|
|
10
10
|
React.createElement(Box, {
|
|
11
|
-
fill: true,
|
|
12
11
|
align: "center",
|
|
13
12
|
justify: "start",
|
|
14
|
-
pad: "large"
|
|
15
|
-
|
|
13
|
+
pad: "large",
|
|
14
|
+
gap: "medium"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
16
|
+
status: "info",
|
|
17
|
+
message: "Data is in 'beta'. The API surface is subject to change."
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Data, {
|
|
16
19
|
data: DATA,
|
|
17
20
|
views: [{
|
|
18
21
|
name: 'latest',
|
|
@@ -29,7 +32,7 @@ export var Simple = function Simple() {
|
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
}]
|
|
32
|
-
}, /*#__PURE__*/React.createElement(DataView, null)))
|
|
35
|
+
}, /*#__PURE__*/React.createElement(DataView, null), /*#__PURE__*/React.createElement(DataTable, null)))
|
|
33
36
|
// </Grommet>
|
|
34
37
|
);
|
|
35
38
|
};
|
|
@@ -38,5 +41,5 @@ Simple.args = {
|
|
|
38
41
|
full: true
|
|
39
42
|
};
|
|
40
43
|
export default {
|
|
41
|
-
title: '
|
|
44
|
+
title: 'Data/DataView/Simple'
|
|
42
45
|
};
|
|
@@ -34,6 +34,7 @@ var getReference = function getReference(value) {
|
|
|
34
34
|
return adjustedDate;
|
|
35
35
|
};
|
|
36
36
|
var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
37
|
+
var _theme$icon, _theme$dateInput$icon;
|
|
37
38
|
var buttonProps = _ref.buttonProps,
|
|
38
39
|
calendarProps = _ref.calendarProps,
|
|
39
40
|
defaultValue = _ref.defaultValue,
|
|
@@ -58,7 +59,7 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
58
59
|
var announce = useContext(AnnounceContext);
|
|
59
60
|
var _useContext = useContext(MessageContext),
|
|
60
61
|
formatMessage = _useContext.format;
|
|
61
|
-
var iconSize = theme.
|
|
62
|
+
var iconSize = ((_theme$icon = theme.icon) == null ? void 0 : _theme$icon.matchSize) && rest.size || ((_theme$dateInput$icon = theme.dateInput.icon) == null ? void 0 : _theme$dateInput$icon.size) || 'medium';
|
|
62
63
|
var _useContext2 = useContext(FormContext),
|
|
63
64
|
useFormInput = _useContext2.useFormInput;
|
|
64
65
|
var ref = useForwardedRef(refArg);
|
|
@@ -48,7 +48,7 @@ var Distribution = function Distribution(_ref2) {
|
|
|
48
48
|
var subTotal = 0;
|
|
49
49
|
var subIndex;
|
|
50
50
|
values.some(function (v, index) {
|
|
51
|
-
subTotal += Object.prototype.hasOwnProperty.call(v, 'value')
|
|
51
|
+
subTotal += Object.prototype.hasOwnProperty.call(v, 'value') && v.value || 0;
|
|
52
52
|
if (subTotal >= total * 0.4) {
|
|
53
53
|
subIndex = index + 1;
|
|
54
54
|
return true;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "align", "background", "onAlign", "children", "dropTarget", "elevation", "onClickOutside", "onEsc", "onKeyDown", "overflow", "plain", "responsive", "restrictFocus", "stretch", "trapFocus"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
import React, { forwardRef, useContext, useEffect, useMemo
|
|
4
|
+
import React, { forwardRef, useContext, useEffect, useMemo } from 'react';
|
|
5
5
|
import { ThemeContext } from 'styled-components';
|
|
6
6
|
import { ContainerTargetContext } from '../../contexts/ContainerTargetContext';
|
|
7
7
|
import { FocusedContainer } from '../FocusedContainer';
|
|
8
|
-
import { backgroundIsDark, findScrollParents, parseMetricToNum, PortalContext } from '../../utils';
|
|
8
|
+
import { backgroundIsDark, findScrollParents, parseMetricToNum, PortalContext, useForwardedRef } from '../../utils';
|
|
9
9
|
import { defaultProps } from '../../default-props';
|
|
10
10
|
import { Box } from '../Box';
|
|
11
11
|
import { Keyboard } from '../Keyboard';
|
|
@@ -39,7 +39,8 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
39
39
|
_ref$overflow = _ref.overflow,
|
|
40
40
|
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
41
41
|
plain = _ref.plain,
|
|
42
|
-
responsive = _ref.responsive,
|
|
42
|
+
_ref$responsive = _ref.responsive,
|
|
43
|
+
responsive = _ref$responsive === void 0 ? true : _ref$responsive,
|
|
43
44
|
restrictFocus = _ref.restrictFocus,
|
|
44
45
|
_ref$stretch = _ref.stretch,
|
|
45
46
|
stretch = _ref$stretch === void 0 ? 'width' : _ref$stretch,
|
|
@@ -54,7 +55,7 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
54
55
|
var nextPortalContext = useMemo(function () {
|
|
55
56
|
return [].concat(portalContext, [portalId]);
|
|
56
57
|
}, [portalContext, portalId]);
|
|
57
|
-
var dropRef =
|
|
58
|
+
var dropRef = useForwardedRef(ref);
|
|
58
59
|
useEffect(function () {
|
|
59
60
|
var onClickDocument = function onClickDocument(event) {
|
|
60
61
|
// determine which portal id the target is in, if any
|
|
@@ -80,7 +81,7 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
80
81
|
}, [onClickOutside, containerTarget, portalContext]);
|
|
81
82
|
useEffect(function () {
|
|
82
83
|
var notifyAlign = function notifyAlign() {
|
|
83
|
-
var styleCurrent =
|
|
84
|
+
var styleCurrent = dropRef.current.style;
|
|
84
85
|
var alignControl = styleCurrent.top !== '' ? 'top' : 'bottom';
|
|
85
86
|
onAlign(alignControl);
|
|
86
87
|
};
|
|
@@ -91,8 +92,8 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
92
|
var place = function place(preserveHeight) {
|
|
92
93
|
var windowWidth = window.innerWidth;
|
|
93
94
|
var windowHeight = window.innerHeight;
|
|
94
|
-
var target = dropTarget;
|
|
95
|
-
var container =
|
|
95
|
+
var target = (dropTarget == null ? void 0 : dropTarget.current) || dropTarget;
|
|
96
|
+
var container = dropRef.current;
|
|
96
97
|
if (container && target) {
|
|
97
98
|
// clear prior styling
|
|
98
99
|
container.style.left = '';
|
|
@@ -138,80 +139,32 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
138
139
|
var top;
|
|
139
140
|
var bottom;
|
|
140
141
|
var maxHeight = containerRect.height;
|
|
141
|
-
if (align.top) {
|
|
142
|
-
if (align.top === 'top') {
|
|
143
|
-
top = targetRect.top;
|
|
144
|
-
} else {
|
|
145
|
-
top = targetRect.bottom;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Calculate visible area underneath the control w.r.t window height
|
|
149
|
-
var percentVisibleAreaBelow = 100 - targetRect.bottom / windowHeight * 100;
|
|
150
142
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
maxHeight = windowHeight - top;
|
|
174
|
-
}
|
|
175
|
-
} else if (align.bottom) {
|
|
176
|
-
if (align.bottom === 'bottom') {
|
|
177
|
-
bottom = targetRect.bottom;
|
|
178
|
-
} else {
|
|
179
|
-
bottom = targetRect.top;
|
|
180
|
-
}
|
|
143
|
+
/* If responsive is true and the Drop doesn't have enough room
|
|
144
|
+
to be fully visible and there is more room in the other
|
|
145
|
+
direction, change the Drop to display above/below. If there is
|
|
146
|
+
less room in the other direction leave the Drop in its current
|
|
147
|
+
position. */
|
|
148
|
+
if (responsive && (align.top === 'top' && targetRect.top < 0 || align.bottom === 'top' && targetRect.top - containerRect.height <= 0 && targetRect.bottom + containerRect.height < windowHeight)) {
|
|
149
|
+
top = targetRect.bottom;
|
|
150
|
+
maxHeight = top;
|
|
151
|
+
} else if (responsive && (align.bottom === 'bottom' && targetRect.bottom > windowHeight || align.top === 'bottom' && targetRect.bottom + containerRect.height >= windowHeight && targetRect.top - containerRect.height > 0)) {
|
|
152
|
+
bottom = targetRect.top;
|
|
153
|
+
maxHeight = bottom;
|
|
154
|
+
} else if (align.top === 'top') {
|
|
155
|
+
top = targetRect.top;
|
|
156
|
+
maxHeight = windowHeight - top;
|
|
157
|
+
} else if (align.top === 'bottom') {
|
|
158
|
+
top = targetRect.bottom;
|
|
159
|
+
maxHeight = windowHeight - top;
|
|
160
|
+
} else if (align.bottom === 'top') {
|
|
161
|
+
bottom = targetRect.top;
|
|
162
|
+
maxHeight = bottom;
|
|
163
|
+
} else if (align.bottom === 'bottom') {
|
|
164
|
+
bottom = targetRect.bottom;
|
|
181
165
|
maxHeight = bottom;
|
|
182
|
-
container.style.maxHeight = maxHeight + "px";
|
|
183
166
|
} else {
|
|
184
|
-
// center
|
|
185
167
|
top = targetRect.top + targetRect.height / 2 - containerRect.height / 2;
|
|
186
|
-
maxHeight = windowHeight - top;
|
|
187
|
-
}
|
|
188
|
-
// if we can't fit it all, or we're rather close,
|
|
189
|
-
// see if there's more room the other direction
|
|
190
|
-
if (responsive && (containerRect.height > maxHeight || maxHeight < windowHeight / 10)) {
|
|
191
|
-
// We need more room than we have.
|
|
192
|
-
if (align.top && top > windowHeight / 2) {
|
|
193
|
-
// We put it below, but there's more room above, put it above
|
|
194
|
-
top = '';
|
|
195
|
-
if (align.top === 'bottom') {
|
|
196
|
-
// top = Math.max(targetRect.top - containerRect.height, 0);
|
|
197
|
-
// maxHeight = targetRect.top - top;
|
|
198
|
-
bottom = targetRect.top;
|
|
199
|
-
} else {
|
|
200
|
-
// top = Math.max(targetRect.bottom - containerRect.height, 0);
|
|
201
|
-
// maxHeight = targetRect.bottom - top;
|
|
202
|
-
bottom = targetRect.bottom;
|
|
203
|
-
}
|
|
204
|
-
maxHeight = bottom;
|
|
205
|
-
} else if (align.bottom && maxHeight < windowHeight / 2) {
|
|
206
|
-
// We put it above but there's more room below, put it below
|
|
207
|
-
bottom = '';
|
|
208
|
-
if (align.bottom === 'bottom') {
|
|
209
|
-
top = targetRect.top;
|
|
210
|
-
} else {
|
|
211
|
-
top = targetRect.bottom;
|
|
212
|
-
}
|
|
213
|
-
maxHeight = windowHeight - top;
|
|
214
|
-
}
|
|
215
168
|
}
|
|
216
169
|
container.style.left = left + "px";
|
|
217
170
|
if (stretch) {
|
|
@@ -262,15 +215,15 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
262
215
|
removeScrollListeners();
|
|
263
216
|
window.removeEventListener('resize', onResize);
|
|
264
217
|
};
|
|
265
|
-
}, [align, containerTarget, onAlign, dropTarget, portalContext, portalId,
|
|
218
|
+
}, [align, containerTarget, onAlign, dropTarget, portalContext, portalId, responsive, restrictFocus, stretch, theme.drop, dropRef]);
|
|
266
219
|
useEffect(function () {
|
|
267
220
|
if (restrictFocus) {
|
|
268
|
-
|
|
221
|
+
dropRef.current.focus();
|
|
269
222
|
}
|
|
270
|
-
}, [
|
|
223
|
+
}, [dropRef, restrictFocus]);
|
|
271
224
|
var content = /*#__PURE__*/React.createElement(StyledDrop, _extends({
|
|
272
225
|
"aria-label": a11yTitle || ariaLabel,
|
|
273
|
-
ref:
|
|
226
|
+
ref: dropRef,
|
|
274
227
|
as: Box,
|
|
275
228
|
background: background,
|
|
276
229
|
plain: plain,
|