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
|
@@ -50,7 +50,7 @@ var NotificationAnchor = styled(Anchor).withConfig({
|
|
|
50
50
|
componentId: "sc-1yq09yz-0"
|
|
51
51
|
})(["white-space:nowrap;"]);
|
|
52
52
|
var Notification = function Notification(_ref) {
|
|
53
|
-
var _theme$notification, _theme$notification2, _theme$notification2$, _theme$notification2$2, _theme$notification3, _theme$notification3$, _theme$notification4, _theme$notification4$, _theme$notification4$2
|
|
53
|
+
var _theme$notification, _theme$notification2, _theme$notification2$, _theme$notification2$2, _theme$notification3, _theme$notification3$, _theme$notification4, _theme$notification4$, _theme$notification4$2, _theme$notification5, _theme$notification5$;
|
|
54
54
|
var actionsProp = _ref.actions,
|
|
55
55
|
messageProp = _ref.message,
|
|
56
56
|
onClose = _ref.onClose,
|
|
@@ -133,6 +133,7 @@ var Notification = function Notification(_ref) {
|
|
|
133
133
|
right: 'xsmall'
|
|
134
134
|
}
|
|
135
135
|
}, message), actions) : message;
|
|
136
|
+
var iconDimension = ((_theme$notification5 = theme.notification) == null ? void 0 : (_theme$notification5$ = _theme$notification5.message) == null ? void 0 : _theme$notification5$.size) || 'medium';
|
|
136
137
|
var content = /*#__PURE__*/React.createElement(Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {
|
|
137
138
|
background: background
|
|
138
139
|
// let internal box control pad
|
|
@@ -146,7 +147,8 @@ var Notification = function Notification(_ref) {
|
|
|
146
147
|
pad: textPad,
|
|
147
148
|
flex: true
|
|
148
149
|
}, /*#__PURE__*/React.createElement(Box, theme.notification.iconContainer, icon || /*#__PURE__*/React.createElement(StatusIcon, {
|
|
149
|
-
color: color
|
|
150
|
+
color: color,
|
|
151
|
+
height: iconDimension
|
|
150
152
|
})), /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(TextWrapper, null, title && /*#__PURE__*/React.createElement(Text, theme.notification.title, title), message && title && direction === 'row' && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), message))), onClose &&
|
|
151
153
|
/*#__PURE__*/
|
|
152
154
|
// theme.notification.container and textContainer may both have pad,
|
|
@@ -155,7 +157,9 @@ var Notification = function Notification(_ref) {
|
|
|
155
157
|
pad: closeButtonPad
|
|
156
158
|
}, /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(Button, {
|
|
157
159
|
icon: /*#__PURE__*/React.createElement(CloseIcon, {
|
|
158
|
-
color: closeIconColor
|
|
160
|
+
color: closeIconColor,
|
|
161
|
+
height: iconDimension,
|
|
162
|
+
width: iconDimension
|
|
159
163
|
}),
|
|
160
164
|
onClick: close,
|
|
161
165
|
hoverIndicator: true,
|
|
@@ -9,9 +9,11 @@ import { Heading } from '../Heading';
|
|
|
9
9
|
import { Grid } from '../Grid';
|
|
10
10
|
import { Paragraph } from '../Paragraph';
|
|
11
11
|
import { ResponsiveContext } from '../../contexts/ResponsiveContext';
|
|
12
|
-
var sizeStyle = function sizeStyle(size, feature, theme) {
|
|
13
|
-
var _ref, _theme$pageHeader$siz;
|
|
14
|
-
var style = _extends({}, theme.pageHeader[feature], (_ref = size && ((_theme$pageHeader$siz = theme.pageHeader.size[size]) == null ? void 0 : _theme$pageHeader$siz[feature])) != null ? _ref : theme.pageHeader[feature])
|
|
12
|
+
var sizeStyle = function sizeStyle(size, feature, theme, breakpoint) {
|
|
13
|
+
var _ref, _theme$pageHeader$siz, _theme$global$breakpo, _theme$global$breakpo2;
|
|
14
|
+
var style = _extends({}, theme.pageHeader[feature], (_ref = size && ((_theme$pageHeader$siz = theme.pageHeader.size[size]) == null ? void 0 : _theme$pageHeader$siz[feature])) != null ? _ref : theme.pageHeader[feature], (!size || size === 'medium') && feature === 'subtitle' && ((_theme$global$breakpo = theme.global.breakpoints[breakpoint]) == null ? void 0 : _theme$global$breakpo.value) <= ((_theme$global$breakpo2 = theme.global.breakpoints.small) == null ? void 0 : _theme$global$breakpo2.value) && {
|
|
15
|
+
size: 'medium'
|
|
16
|
+
});
|
|
15
17
|
return style;
|
|
16
18
|
};
|
|
17
19
|
var PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
@@ -53,7 +55,7 @@ var PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
53
55
|
gridArea: "title"
|
|
54
56
|
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, sizeStyle(size, 'title', theme), title) : title), /*#__PURE__*/React.createElement(Box, {
|
|
55
57
|
gridArea: "subtitle"
|
|
56
|
-
}, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, sizeStyle(size, 'subtitle', theme), subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({
|
|
58
|
+
}, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, sizeStyle(size, 'subtitle', theme, breakpoint), subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({
|
|
57
59
|
gridArea: "actions"
|
|
58
60
|
}, actionsProps), actions)));
|
|
59
61
|
});
|
|
@@ -53,6 +53,14 @@ var Pagination = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
53
53
|
useEffect(function () {
|
|
54
54
|
return setActivePage(page);
|
|
55
55
|
}, [page]);
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
// if we are getting the step or page from outside the view,
|
|
58
|
+
// update the Data's view in case it needs to filter.
|
|
59
|
+
if (onView && ((view == null ? void 0 : view.step) !== step || (view == null ? void 0 : view.page) !== page)) onView(_extends({}, view, {
|
|
60
|
+
page: page,
|
|
61
|
+
step: step
|
|
62
|
+
}));
|
|
63
|
+
}, [onView, page, step, view]);
|
|
56
64
|
|
|
57
65
|
/* Define page indices to display */
|
|
58
66
|
var beginPages = getPageIndices(1, Math.min(numberEdgePages, totalPages));
|
|
@@ -6,7 +6,9 @@ var sizeStyle = function sizeStyle(props) {
|
|
|
6
6
|
return style ? {
|
|
7
7
|
content: {
|
|
8
8
|
fontSize: style.font && style.font.size,
|
|
9
|
-
|
|
9
|
+
// fix for safari, apply line-height 0 on next/previous
|
|
10
|
+
// icon-only buttons
|
|
11
|
+
lineHeight: style.font && props.hasLabel ? style.font.height : 0
|
|
10
12
|
},
|
|
11
13
|
container: {
|
|
12
14
|
height: style.height,
|
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
var _excluded = ["color", "fill"];
|
|
1
|
+
var _excluded = ["children", "color", "fill", "size"];
|
|
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 } from 'react';
|
|
4
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
5
5
|
import { StyledParagraph } from './StyledParagraph';
|
|
6
6
|
import { ParagraphPropTypes } from './propTypes';
|
|
7
7
|
import { useSkeleton } from '../Skeleton';
|
|
8
8
|
import { ParagraphSkeleton } from './ParagraphSkeleton';
|
|
9
|
+
import { TextContext } from '../Text/TextContext';
|
|
9
10
|
var Paragraph = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
|
-
var
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
color = _ref.color,
|
|
11
13
|
fill = _ref.fill,
|
|
14
|
+
size = _ref.size,
|
|
12
15
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
16
|
var skeleton = useSkeleton();
|
|
17
|
+
var textContextValue = useMemo(function () {
|
|
18
|
+
return {
|
|
19
|
+
size: size
|
|
20
|
+
};
|
|
21
|
+
}, [size]);
|
|
14
22
|
if (skeleton) {
|
|
15
23
|
return /*#__PURE__*/React.createElement(ParagraphSkeleton, _extends({
|
|
16
24
|
ref: ref,
|
|
17
|
-
fill: fill
|
|
18
|
-
|
|
25
|
+
fill: fill,
|
|
26
|
+
size: size
|
|
27
|
+
}, rest), children);
|
|
19
28
|
}
|
|
20
29
|
return /*#__PURE__*/React.createElement(StyledParagraph, _extends({
|
|
21
30
|
ref: ref,
|
|
22
31
|
colorProp: color,
|
|
23
|
-
fillProp: fill
|
|
24
|
-
|
|
32
|
+
fillProp: fill,
|
|
33
|
+
size: size
|
|
34
|
+
}, rest), children !== undefined ? /*#__PURE__*/React.createElement(TextContext.Provider, {
|
|
35
|
+
value: textContextValue
|
|
36
|
+
}, children) : undefined);
|
|
25
37
|
});
|
|
26
38
|
Paragraph.displayName = 'Paragraph';
|
|
27
39
|
Paragraph.prototype = ParagraphPropTypes;
|
|
@@ -12,7 +12,11 @@ export var All = function All() {
|
|
|
12
12
|
color: "status-critical"
|
|
13
13
|
}, "This is an error message."), /*#__PURE__*/React.createElement(Paragraph, {
|
|
14
14
|
fill: true
|
|
15
|
-
}, "This is a full-width paragraph, using the \"fill\" property:", ' ', paragraphFiller)
|
|
15
|
+
}, "This is a full-width paragraph, using the \"fill\" property:", ' ', paragraphFiller), /*#__PURE__*/React.createElement(Paragraph, {
|
|
16
|
+
dangerouslySetInnerHTML: {
|
|
17
|
+
__html: 'This is a dangerouslySetInnerHTML!'
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
16
20
|
};
|
|
17
21
|
export default {
|
|
18
22
|
title: 'Type/Paragraph/All'
|
|
@@ -270,6 +270,16 @@ var SelectMultiple = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
270
270
|
return undefined;
|
|
271
271
|
}, [labelKey, messages, format, optionIndexesInValue, allOptions, selectValue]);
|
|
272
272
|
var iconColor = getIconColor(theme);
|
|
273
|
+
var displaySelectIcon = SelectIcon && /*#__PURE__*/React.createElement(Box, {
|
|
274
|
+
alignSelf: "center",
|
|
275
|
+
margin: theme.select.icons.margin,
|
|
276
|
+
width: {
|
|
277
|
+
min: 'auto'
|
|
278
|
+
}
|
|
279
|
+
}, /*#__PURE__*/isValidElement(SelectIcon) ? SelectIcon : /*#__PURE__*/React.createElement(SelectIcon, {
|
|
280
|
+
color: iconColor,
|
|
281
|
+
size: size
|
|
282
|
+
}));
|
|
273
283
|
var dropContent = /*#__PURE__*/React.createElement(SelectMultipleContainer, {
|
|
274
284
|
allOptions: allOptions,
|
|
275
285
|
disabled: disabled,
|
|
@@ -277,6 +287,7 @@ var SelectMultiple = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
277
287
|
dropHeight: dropHeight,
|
|
278
288
|
emptySearchMessage: emptySearchMessage,
|
|
279
289
|
help: help,
|
|
290
|
+
icon: displaySelectIcon,
|
|
280
291
|
id: id,
|
|
281
292
|
labelKey: labelKey,
|
|
282
293
|
limit: limit,
|
|
@@ -319,16 +330,6 @@ var SelectMultiple = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
319
330
|
dropContent: dropContent,
|
|
320
331
|
theme: theme
|
|
321
332
|
};
|
|
322
|
-
var displaySelectIcon = SelectIcon && /*#__PURE__*/React.createElement(Box, {
|
|
323
|
-
alignSelf: "center",
|
|
324
|
-
margin: theme.select.icons.margin,
|
|
325
|
-
width: {
|
|
326
|
-
min: 'auto'
|
|
327
|
-
}
|
|
328
|
-
}, /*#__PURE__*/isValidElement(SelectIcon) ? SelectIcon : /*#__PURE__*/React.createElement(SelectIcon, {
|
|
329
|
-
color: iconColor,
|
|
330
|
-
size: size
|
|
331
|
-
}));
|
|
332
333
|
return /*#__PURE__*/React.createElement(Keyboard, {
|
|
333
334
|
onDown: onRequestOpen,
|
|
334
335
|
onUp: onRequestOpen
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
import React, { forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { ThemeContext } from 'styled-components';
|
|
4
|
-
import { FormUp } from 'grommet-icons/icons/FormUp';
|
|
5
4
|
import { setFocusWithoutScroll } from '../../utils';
|
|
6
5
|
import { defaultProps } from '../../default-props';
|
|
7
6
|
import { Box } from '../Box';
|
|
@@ -26,6 +25,7 @@ var SelectMultipleContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
26
25
|
_ref$emptySearchMessa = _ref.emptySearchMessage,
|
|
27
26
|
emptySearchMessage = _ref$emptySearchMessa === void 0 ? 'No matches found' : _ref$emptySearchMessa,
|
|
28
27
|
help = _ref.help,
|
|
28
|
+
icon = _ref.icon,
|
|
29
29
|
id = _ref.id,
|
|
30
30
|
labelKey = _ref.labelKey,
|
|
31
31
|
limit = _ref.limit,
|
|
@@ -258,21 +258,26 @@ var SelectMultipleContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
258
258
|
value: value,
|
|
259
259
|
valueKey: valueKey
|
|
260
260
|
});
|
|
261
|
+
var helpContent;
|
|
262
|
+
if (help) {
|
|
263
|
+
if (typeof help === 'string') helpContent = /*#__PURE__*/React.createElement(Box, {
|
|
264
|
+
flex: false,
|
|
265
|
+
pad: "xsmall"
|
|
266
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
267
|
+
size: "small"
|
|
268
|
+
}, help));else helpContent = /*#__PURE__*/React.createElement(Box, {
|
|
269
|
+
flex: false
|
|
270
|
+
}, help);
|
|
271
|
+
}
|
|
261
272
|
if (showSelectedInline) summaryContent = /*#__PURE__*/React.createElement(Box, {
|
|
262
273
|
direction: "row",
|
|
263
274
|
justify: "between",
|
|
264
275
|
flex: false
|
|
265
|
-
}, summaryContent, /*#__PURE__*/React.createElement(Button, {
|
|
276
|
+
}, summaryContent, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Button, {
|
|
277
|
+
fill: "vertical",
|
|
266
278
|
onClick: onClose,
|
|
267
279
|
a11yTitle: "Close Select"
|
|
268
|
-
},
|
|
269
|
-
fill: true,
|
|
270
|
-
alignSelf: "start",
|
|
271
|
-
pad: {
|
|
272
|
-
right: 'small',
|
|
273
|
-
top: 'small'
|
|
274
|
-
}
|
|
275
|
-
}, /*#__PURE__*/React.createElement(FormUp, null))));
|
|
280
|
+
}, icon)));
|
|
276
281
|
return /*#__PURE__*/React.createElement(Keyboard, {
|
|
277
282
|
onEnter: onSelectOption,
|
|
278
283
|
onSpace: onSelectOption,
|
|
@@ -307,9 +312,7 @@ var SelectMultipleContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
307
312
|
setActiveIndex(-1);
|
|
308
313
|
onSearch(nextSearch);
|
|
309
314
|
}
|
|
310
|
-
}))), /*#__PURE__*/React.createElement(
|
|
311
|
-
flex: false
|
|
312
|
-
}, help), /*#__PURE__*/React.createElement(OptionsContainer, {
|
|
315
|
+
}))), helpContent, /*#__PURE__*/React.createElement(OptionsContainer, {
|
|
313
316
|
role: "listbox",
|
|
314
317
|
tabIndex: "0",
|
|
315
318
|
ref: optionsRef,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box } from 'grommet';
|
|
3
|
+
import { SelectMultiple } from '../SelectMultiple';
|
|
4
|
+
var options = ['Apple', 'Orange', 'Banana', 'Grape', 'Melon', 'Strawberry', 'Kiwi', 'Mango', 'Raspberry', 'Rhubarb'];
|
|
5
|
+
export var Help = function Help() {
|
|
6
|
+
var _useState = useState([]),
|
|
7
|
+
valueMultiple = _useState[0],
|
|
8
|
+
setValueMultiple = _useState[1];
|
|
9
|
+
return (
|
|
10
|
+
/*#__PURE__*/
|
|
11
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
12
|
+
// <Grommet theme={...}>
|
|
13
|
+
React.createElement(Box, {
|
|
14
|
+
fill: true,
|
|
15
|
+
align: "center",
|
|
16
|
+
pad: "large",
|
|
17
|
+
gap: "large"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(SelectMultiple, {
|
|
19
|
+
value: valueMultiple,
|
|
20
|
+
placeholder: "Select",
|
|
21
|
+
options: options,
|
|
22
|
+
help: "something helpful",
|
|
23
|
+
onChange: function onChange(_ref) {
|
|
24
|
+
var value = _ref.value;
|
|
25
|
+
return setValueMultiple(value);
|
|
26
|
+
}
|
|
27
|
+
}))
|
|
28
|
+
// </Grommet>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
Help.parameters = {
|
|
33
|
+
chromatic: {
|
|
34
|
+
disable: true
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
Help.args = {
|
|
38
|
+
full: true
|
|
39
|
+
};
|
|
40
|
+
export default {
|
|
41
|
+
title: 'Input/SelectMultiple/Help'
|
|
42
|
+
};
|
|
@@ -17,6 +17,7 @@ import { MessageContext } from '../../contexts/MessageContext';
|
|
|
17
17
|
import { TabsPropTypes } from './propTypes';
|
|
18
18
|
import { useAnalytics } from '../../contexts/AnalyticsContext/AnalyticsContext';
|
|
19
19
|
var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
20
|
+
var _theme$tabs$header;
|
|
20
21
|
var alignControls = _ref.alignControls,
|
|
21
22
|
children = _ref.children,
|
|
22
23
|
flex = _ref.flex,
|
|
@@ -268,6 +269,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
268
269
|
}, rest, {
|
|
269
270
|
background: theme.tabs.background
|
|
270
271
|
}), /*#__PURE__*/React.createElement(Box, _extends({
|
|
272
|
+
alignSelf: alignControls || ((_theme$tabs$header = theme.tabs.header) == null ? void 0 : _theme$tabs$header.alignSelf),
|
|
271
273
|
role: "tablist",
|
|
272
274
|
flex: false,
|
|
273
275
|
direction: overflow ? 'row' : 'column'
|
|
@@ -292,7 +294,6 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
292
294
|
as: Box,
|
|
293
295
|
direction: "row",
|
|
294
296
|
justify: overflow ? 'start' : justify,
|
|
295
|
-
alignSelf: alignControls,
|
|
296
297
|
flex: !!overflow,
|
|
297
298
|
wrap: false,
|
|
298
299
|
overflow: overflow ? 'hidden' : 'visible',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children", "color", "tag", "as", "tip", "a11yTitle", "truncate", "size", "skeleton"];
|
|
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, useState } from 'react';
|
|
4
|
+
import React, { forwardRef, useMemo, useState } from 'react';
|
|
5
5
|
import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
|
|
6
6
|
import { StyledText } from './StyledText';
|
|
7
7
|
import { Tip } from '../Tip';
|
|
@@ -9,6 +9,7 @@ import { useForwardedRef } from '../../utils';
|
|
|
9
9
|
import { TextPropTypes } from './propTypes';
|
|
10
10
|
import { useSkeleton } from '../Skeleton';
|
|
11
11
|
import { TextSkeleton } from './TextSkeleton';
|
|
12
|
+
import { TextContext } from './TextContext';
|
|
12
13
|
var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
13
14
|
var children = _ref.children,
|
|
14
15
|
color = _ref.color,
|
|
@@ -25,6 +26,11 @@ var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25
26
|
var _useState = useState(false),
|
|
26
27
|
textTruncated = _useState[0],
|
|
27
28
|
setTextTruncated = _useState[1];
|
|
29
|
+
var textContextValue = useMemo(function () {
|
|
30
|
+
return {
|
|
31
|
+
size: size
|
|
32
|
+
};
|
|
33
|
+
}, [size]);
|
|
28
34
|
var skeleton = useSkeleton();
|
|
29
35
|
useLayoutEffect(function () {
|
|
30
36
|
var updateTip = function updateTip() {
|
|
@@ -54,7 +60,9 @@ var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
54
60
|
size: size
|
|
55
61
|
}, rest, {
|
|
56
62
|
ref: textRef
|
|
57
|
-
}), children
|
|
63
|
+
}), children !== undefined ? /*#__PURE__*/React.createElement(TextContext.Provider, {
|
|
64
|
+
value: textContextValue
|
|
65
|
+
}, children) : undefined);
|
|
58
66
|
if (tipProp || textTruncated) {
|
|
59
67
|
// place the text content in a tip if truncate === 'tip'
|
|
60
68
|
// and the text has been truncated
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { disabledStyle, getInputPadBySide, inputStyle, parseMetricToNum, plainInputStyle, textAlignStyle } from '../../utils';
|
|
2
|
+
import { disabledStyle, getInputPadBySide, inputStyle, parseMetricToNum, plainInputStyle, textAlignStyle, widthStyle } from '../../utils';
|
|
3
3
|
import { defaultProps } from '../../default-props';
|
|
4
|
+
import { inputPadForIcon } from '../../utils/styles';
|
|
4
5
|
var getPlainStyle = function getPlainStyle(plain) {
|
|
5
6
|
if (plain === 'full') {
|
|
6
7
|
return css(["", " padding:0;"], plainInputStyle);
|
|
@@ -10,14 +11,16 @@ var getPlainStyle = function getPlainStyle(plain) {
|
|
|
10
11
|
var StyledTextInput = styled.input.withConfig({
|
|
11
12
|
displayName: "StyledTextInput",
|
|
12
13
|
componentId: "sc-1x30a0s-0"
|
|
13
|
-
})(["", " ", " ", " ", " ", " ", ";"], inputStyle, function (props) {
|
|
14
|
+
})(["", " ", " ", " ", " ", " ", " ", ";"], inputStyle, function (props) {
|
|
14
15
|
return getPlainStyle(props.plain);
|
|
15
16
|
}, function (props) {
|
|
16
|
-
return props.icon &&
|
|
17
|
+
return props.icon && inputPadForIcon;
|
|
17
18
|
}, function (props) {
|
|
18
19
|
return props.disabled && disabledStyle(props.theme.textInput.disabled && props.theme.textInput.disabled.opacity);
|
|
19
20
|
}, function (props) {
|
|
20
21
|
return props.textAlign && textAlignStyle;
|
|
22
|
+
}, function (props) {
|
|
23
|
+
return props.widthProp && widthStyle(props.widthProp, props.theme);
|
|
21
24
|
}, function (props) {
|
|
22
25
|
return props.theme.textInput && props.theme.textInput.extend;
|
|
23
26
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["a11yTitle", "defaultSuggestion", "defaultValue", "dropAlign", "dropHeight", "dropTarget", "dropProps", "focusIndicator", "icon", "id", "messages", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onSuggestionSelect", "onSuggestionsClose", "onSuggestionsOpen", "placeholder", "plain", "readOnly", "reverse", "suggestions", "textAlign", "value"];
|
|
1
|
+
var _excluded = ["a11yTitle", "defaultSuggestion", "defaultValue", "dropAlign", "dropHeight", "dropTarget", "dropProps", "focusIndicator", "icon", "id", "messages", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onSuggestionSelect", "onSuggestionsClose", "onSuggestionsOpen", "placeholder", "plain", "readOnly", "reverse", "suggestions", "textAlign", "value", "width"];
|
|
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
4
|
import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -11,7 +11,7 @@ import { InfiniteScroll } from '../InfiniteScroll';
|
|
|
11
11
|
import { Keyboard } from '../Keyboard';
|
|
12
12
|
import { FormContext } from '../Form/FormContext';
|
|
13
13
|
import { AnnounceContext } from '../../contexts';
|
|
14
|
-
import { isNodeAfterScroll, isNodeBeforeScroll, sizeStyle, useForwardedRef } from '../../utils';
|
|
14
|
+
import { isNodeAfterScroll, isNodeBeforeScroll, sizeStyle, useForwardedRef, useSizedIcon } from '../../utils';
|
|
15
15
|
import { StyledTextInput, StyledTextInputContainer, StyledPlaceholder, StyledIcon, StyledSuggestions } from './StyledTextInput';
|
|
16
16
|
import { MessageContext } from '../../contexts/MessageContext';
|
|
17
17
|
import { TextInputPropTypes } from './propTypes';
|
|
@@ -71,6 +71,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
71
71
|
suggestions = _ref.suggestions,
|
|
72
72
|
textAlign = _ref.textAlign,
|
|
73
73
|
valueProp = _ref.value,
|
|
74
|
+
widthProp = _ref.width,
|
|
74
75
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
75
76
|
var theme = useContext(ThemeContext) || defaultProps.theme;
|
|
76
77
|
var _useContext = useContext(MessageContext),
|
|
@@ -344,12 +345,13 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
344
345
|
// otherwise we only listen to onDown on the input element itself,
|
|
345
346
|
// primarily for tests.
|
|
346
347
|
|
|
348
|
+
var textInputIcon = useSizedIcon(icon, rest.size, theme);
|
|
347
349
|
return /*#__PURE__*/React.createElement(StyledTextInputContainer, {
|
|
348
350
|
plain: plain
|
|
349
|
-
}, showStyledPlaceholder && /*#__PURE__*/React.createElement(StyledPlaceholder, null, placeholder),
|
|
351
|
+
}, showStyledPlaceholder && /*#__PURE__*/React.createElement(StyledPlaceholder, null, placeholder), textInputIcon && /*#__PURE__*/React.createElement(StyledIcon, {
|
|
350
352
|
reverse: reverse,
|
|
351
353
|
theme: theme
|
|
352
|
-
},
|
|
354
|
+
}, textInputIcon), /*#__PURE__*/React.createElement(Keyboard, _extends({
|
|
353
355
|
target: focus ? 'document' : undefined
|
|
354
356
|
}, keyboardProps), /*#__PURE__*/React.createElement(StyledTextInput, _extends({
|
|
355
357
|
"aria-label": a11yTitle,
|
|
@@ -363,7 +365,8 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
363
365
|
reverse: reverse,
|
|
364
366
|
focus: focus,
|
|
365
367
|
focusIndicator: focusIndicator,
|
|
366
|
-
textAlign: textAlign
|
|
368
|
+
textAlign: textAlign,
|
|
369
|
+
widthProp: widthProp
|
|
367
370
|
}, rest, extraProps, comboboxProps, {
|
|
368
371
|
defaultValue: renderLabel(defaultValue),
|
|
369
372
|
value: renderLabel(value),
|
|
@@ -4,13 +4,14 @@ import {
|
|
|
4
4
|
Omit,
|
|
5
5
|
PlaceHolderType,
|
|
6
6
|
TextAlignType,
|
|
7
|
+
WidthType,
|
|
7
8
|
} from '../../utils';
|
|
8
9
|
import { DropType } from '../Drop';
|
|
9
10
|
|
|
10
11
|
export interface TextInputProps
|
|
11
12
|
extends Omit<
|
|
12
13
|
JSX.IntrinsicElements['input'],
|
|
13
|
-
'onSelect' | 'size' | 'placeholder'
|
|
14
|
+
'onSelect' | 'size' | 'placeholder' | 'width'
|
|
14
15
|
> {
|
|
15
16
|
a11yTitle?: A11yTitleType;
|
|
16
17
|
dropAlign?: {
|
|
@@ -50,6 +51,7 @@ export interface TextInputProps
|
|
|
50
51
|
suggestions?: ({ label?: React.ReactNode; value?: any } | string)[];
|
|
51
52
|
textAlign?: TextAlignType;
|
|
52
53
|
value?: string | number;
|
|
54
|
+
width?: WidthType;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
declare const TextInput: React.FC<TextInputProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { widthPropType } from '../../utils/general-prop-types';
|
|
2
3
|
var PropType = {};
|
|
3
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
4
5
|
PropType = {
|
|
@@ -38,7 +39,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
38
39
|
value: PropTypes.any // this is intentional any
|
|
39
40
|
}), PropTypes.string])),
|
|
40
41
|
textAlign: PropTypes.oneOf(['start', 'center', 'end']),
|
|
41
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
42
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
43
|
+
width: widthPropType
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
46
|
export var TextInputPropTypes = PropType;
|
|
@@ -217,6 +217,11 @@ var WorldMap = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
217
217
|
var _React$useState2 = React.useState([]),
|
|
218
218
|
places = _React$useState2[0],
|
|
219
219
|
setPlaces = _React$useState2[1];
|
|
220
|
+
|
|
221
|
+
// targets are used for the Drops associated with places content
|
|
222
|
+
var _React$useState3 = React.useState([]),
|
|
223
|
+
targets = _React$useState3[0],
|
|
224
|
+
setTargets = _React$useState3[1];
|
|
220
225
|
React.useEffect(function () {
|
|
221
226
|
if (placesProp) {
|
|
222
227
|
setPlaces(placesProp.map(function (_ref6) {
|
|
@@ -229,25 +234,23 @@ var WorldMap = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
229
234
|
}, place);
|
|
230
235
|
}));
|
|
231
236
|
} else setPlaces([]);
|
|
237
|
+
return function () {
|
|
238
|
+
setTargets([]);
|
|
239
|
+
};
|
|
232
240
|
}, [placesProp, world]);
|
|
233
|
-
var _React$useState3 = React.useState(),
|
|
234
|
-
over = _React$useState3[0],
|
|
235
|
-
setOver = _React$useState3[1];
|
|
236
241
|
var _React$useState4 = React.useState(),
|
|
237
|
-
|
|
238
|
-
|
|
242
|
+
over = _React$useState4[0],
|
|
243
|
+
setOver = _React$useState4[1];
|
|
239
244
|
var _React$useState5 = React.useState(),
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
activeCoords = _React$useState5[0],
|
|
246
|
+
setActiveCoords = _React$useState5[1];
|
|
242
247
|
var _React$useState6 = React.useState(),
|
|
243
|
-
|
|
244
|
-
|
|
248
|
+
activeContinent = _React$useState6[0],
|
|
249
|
+
setActiveContinent = _React$useState6[1];
|
|
250
|
+
var _React$useState7 = React.useState(),
|
|
251
|
+
activePlace = _React$useState7[0],
|
|
252
|
+
setActivePlace = _React$useState7[1];
|
|
245
253
|
var containerRef = React.useRef();
|
|
246
|
-
|
|
247
|
-
// targets are used for the Drops associated with places content
|
|
248
|
-
var _React$useState7 = React.useState([]),
|
|
249
|
-
targets = _React$useState7[0],
|
|
250
|
-
setTargets = _React$useState7[1];
|
|
251
254
|
var placeRef = React.useCallback(function (node, index) {
|
|
252
255
|
setTargets(function (prevTargets) {
|
|
253
256
|
if (!prevTargets[index]) {
|
|
@@ -25,13 +25,15 @@
|
|
|
25
25
|
"submit": "Apply filters"
|
|
26
26
|
},
|
|
27
27
|
"dataSearch": {
|
|
28
|
-
"label": "Search
|
|
28
|
+
"label": "Search",
|
|
29
|
+
"open": "Open search"
|
|
29
30
|
},
|
|
30
31
|
"dataSort": {
|
|
31
32
|
"ascending": "Ascending",
|
|
32
33
|
"by": "Sort by",
|
|
33
34
|
"descending": "Descending",
|
|
34
|
-
"direction": "Sort direction"
|
|
35
|
+
"direction": "Sort direction",
|
|
36
|
+
"open": "Open sort"
|
|
35
37
|
},
|
|
36
38
|
"dataSummary": {
|
|
37
39
|
"filtered": "{filteredTotal} results of {total} items",
|
|
@@ -43,6 +45,9 @@
|
|
|
43
45
|
"order": "Order columns",
|
|
44
46
|
"select": "Select columns"
|
|
45
47
|
},
|
|
48
|
+
"dataView": {
|
|
49
|
+
"label": "View"
|
|
50
|
+
},
|
|
46
51
|
"fileInput": {
|
|
47
52
|
"browse": "browse",
|
|
48
53
|
"dropPrompt": "Drop file here or",
|