grommet 2.41.0 → 2.43.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/Colors.js +6 -6
- package/components/Accordion/stories/CustomThemed/Rich.tsx +1 -1
- package/components/AccordionPanel/AccordionPanel.js +1 -7
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +1 -6
- package/components/Box/index.d.ts +1 -0
- package/components/Box/propTypes.js +1 -0
- package/components/Box/stories/Background.js +4 -10
- package/components/Button/Button.js +1 -0
- package/components/Button/StyledButton.js +3 -2
- package/components/Calendar/Calendar.js +96 -59
- package/components/Calendar/StyledCalendar.js +89 -7
- package/components/Calendar/utils.js +16 -2
- package/components/Card/stories/Simple.js +2 -2
- package/components/Carousel/Carousel.js +1 -1
- package/components/Chart/Chart.js +3 -3
- package/components/CheckBox/CheckBox.js +3 -2
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Data/stories/Cards.js +3 -2
- package/components/Data/stories/Infinite.js +2 -2
- package/components/Data/stories/OnSelect.js +2 -2
- package/components/Data/stories/Properties.js +3 -2
- package/components/Data/stories/SpaceX.js +2 -2
- package/components/Data/stories/StarWars.js +1 -1
- package/components/DataFilter/DataFilter.js +1 -1
- package/components/DataSort/DataSort.js +46 -14
- package/components/DataSort/stories/Simple.js +10 -1
- package/components/DataTable/Body.js +14 -8
- package/components/DataTable/GroupedBody.js +3 -3
- package/components/DataTable/buildState.js +5 -1
- package/components/DataTable/stories/SpaceX.js +2 -2
- package/components/DataTable/stories/SpaceXUngrouped.js +1 -1
- package/components/FileInput/index.d.ts +2 -3
- package/components/FormField/FormField.js +9 -2
- package/components/FormField/stories/ThresholdValidation.js +5 -1
- package/components/Grommet/index.d.ts +19 -1
- package/components/Grommet/propTypes.js +18 -0
- package/components/Grommet/stories/Theme.js +1 -1
- package/components/Grommet/stories/Vars.js +2 -2
- package/components/Layer/Layer.js +1 -1
- package/components/Layer/index.d.ts +2 -0
- package/components/List/List.js +43 -13
- package/components/List/stories/RenderedList.js +1 -1
- package/components/Meter/Circle.js +2 -2
- package/components/Meter/Meter.js +36 -17
- package/components/Meter/index.d.ts +18 -0
- package/components/Meter/propTypes.js +18 -0
- package/components/Notification/Notification.js +18 -6
- package/components/Notification/index.d.ts +1 -0
- package/components/Notification/propTypes.js +1 -0
- package/components/Pagination/Pagination.js +4 -2
- package/components/Pagination/stories/CustomThemed/Custom.tsx +8 -2
- package/components/Pagination/stories/NumberEdgePages.js +2 -0
- package/components/Pagination/stories/NumberMiddlePages.js +2 -0
- package/components/Pagination/stories/Simple.js +4 -2
- package/components/Pagination/stories/Size.js +3 -0
- package/components/Pagination/stories/Steps.js +3 -0
- package/components/RadioButton/RadioButton.js +14 -3
- package/components/RadioButton/stories/Children.js +16 -3
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/Children.js +13 -1
- package/components/Select/Select.js +7 -3
- package/components/Select/SelectContainer.js +41 -34
- package/components/Select/index.d.ts +1 -1
- package/components/Select/utils.js +13 -2
- package/components/SelectMultiple/SelectMultiple.js +10 -0
- package/components/SelectMultiple/SelectMultipleContainer.js +28 -2
- package/components/SelectMultiple/SelectMultipleValue.js +14 -1
- package/components/SkipLinks/index.d.ts +1 -0
- package/components/SkipLinks/propTypes.js +1 -0
- package/components/Tab/Tab.js +1 -1
- package/components/Tabs/stories/Scrollable.js +2 -1
- package/components/Tag/Tag.js +11 -7
- package/components/TextInput/TextInput.js +7 -2
- package/components/ToggleGroup/StyledToggleGroup.js +12 -5
- package/components/ToggleGroup/ToggleGroup.js +21 -10
- package/components/WorldMap/WorldMap.js +1 -1
- package/es6/all/stories/Colors.js +6 -6
- package/es6/components/Accordion/stories/CustomThemed/Rich.tsx +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +2 -9
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +1 -6
- package/es6/components/Box/index.d.ts +1 -0
- package/es6/components/Box/propTypes.js +1 -0
- package/es6/components/Box/stories/Background.js +4 -10
- package/es6/components/Button/Button.js +1 -0
- package/es6/components/Button/StyledButton.js +4 -3
- package/es6/components/Calendar/Calendar.js +95 -59
- package/es6/components/Calendar/StyledCalendar.js +90 -8
- package/es6/components/Calendar/utils.js +15 -1
- package/es6/components/Card/stories/Simple.js +3 -3
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Chart/Chart.js +3 -3
- package/es6/components/CheckBox/CheckBox.js +3 -2
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Data/stories/Cards.js +4 -3
- package/es6/components/Data/stories/Infinite.js +2 -2
- package/es6/components/Data/stories/OnSelect.js +2 -2
- package/es6/components/Data/stories/Properties.js +4 -3
- package/es6/components/Data/stories/SpaceX.js +2 -2
- package/es6/components/Data/stories/StarWars.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +1 -1
- package/es6/components/DataSort/DataSort.js +46 -14
- package/es6/components/DataSort/stories/Simple.js +10 -1
- package/es6/components/DataTable/Body.js +14 -8
- package/es6/components/DataTable/GroupedBody.js +3 -3
- package/es6/components/DataTable/buildState.js +5 -1
- package/es6/components/DataTable/stories/SpaceX.js +2 -2
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +1 -1
- package/es6/components/FileInput/index.d.ts +2 -3
- package/es6/components/FormField/FormField.js +10 -3
- package/es6/components/FormField/stories/ThresholdValidation.js +5 -1
- package/es6/components/Grommet/index.d.ts +19 -1
- package/es6/components/Grommet/propTypes.js +18 -0
- package/es6/components/Grommet/stories/Theme.js +1 -1
- package/es6/components/Grommet/stories/Vars.js +2 -2
- package/es6/components/Layer/Layer.js +1 -1
- package/es6/components/Layer/index.d.ts +2 -0
- package/es6/components/List/List.js +43 -13
- package/es6/components/List/stories/RenderedList.js +1 -1
- package/es6/components/Meter/Circle.js +2 -2
- package/es6/components/Meter/Meter.js +37 -18
- package/es6/components/Meter/index.d.ts +18 -0
- package/es6/components/Meter/propTypes.js +18 -0
- package/es6/components/Notification/Notification.js +18 -6
- package/es6/components/Notification/index.d.ts +1 -0
- package/es6/components/Notification/propTypes.js +1 -0
- package/es6/components/Pagination/Pagination.js +4 -2
- package/es6/components/Pagination/stories/CustomThemed/Custom.tsx +8 -2
- package/es6/components/Pagination/stories/NumberEdgePages.js +2 -0
- package/es6/components/Pagination/stories/NumberMiddlePages.js +2 -0
- package/es6/components/Pagination/stories/Simple.js +4 -2
- package/es6/components/Pagination/stories/Size.js +3 -0
- package/es6/components/Pagination/stories/Steps.js +3 -0
- package/es6/components/RadioButton/RadioButton.js +15 -4
- package/es6/components/RadioButton/stories/Children.js +16 -3
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Children.js +12 -1
- package/es6/components/Select/Select.js +8 -4
- package/es6/components/Select/SelectContainer.js +41 -34
- package/es6/components/Select/index.d.ts +1 -1
- package/es6/components/Select/utils.js +15 -3
- package/es6/components/SelectMultiple/SelectMultiple.js +10 -0
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +28 -2
- package/es6/components/SelectMultiple/SelectMultipleValue.js +14 -1
- package/es6/components/SkipLinks/index.d.ts +1 -0
- package/es6/components/SkipLinks/propTypes.js +1 -0
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Tabs/stories/Scrollable.js +2 -1
- package/es6/components/Tag/Tag.js +11 -7
- package/es6/components/TextInput/TextInput.js +7 -2
- package/es6/components/ToggleGroup/StyledToggleGroup.js +12 -5
- package/es6/components/ToggleGroup/ToggleGroup.js +22 -11
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/languages/default.json +18 -0
- package/es6/themes/base.d.ts +204 -6
- package/es6/themes/base.js +165 -1
- package/es6/utils/background.js +1 -1
- package/es6/utils/index.js +2 -1
- package/es6/utils/styles.js +8 -0
- package/es6/utils/useId.js +17 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +18 -0
- package/package.json +36 -36
- package/themes/base.d.ts +204 -6
- package/themes/base.js +165 -1
- package/utils/background.js +1 -1
- package/utils/index.js +6 -0
- package/utils/styles.js +9 -1
- package/utils/useId.js +22 -0
- package/components/CheckBox/stories/InsideButton.js +0 -38
- package/es6/components/CheckBox/stories/InsideButton.js +0 -32
|
@@ -120,6 +120,24 @@ export interface GrommetProps {
|
|
|
120
120
|
openMenu?: string;
|
|
121
121
|
closeMenu?: string;
|
|
122
122
|
};
|
|
123
|
+
meter?: {
|
|
124
|
+
bar?: {
|
|
125
|
+
singular?: string;
|
|
126
|
+
plural?: string;
|
|
127
|
+
};
|
|
128
|
+
circle?: {
|
|
129
|
+
singular?: string;
|
|
130
|
+
plural?: string;
|
|
131
|
+
};
|
|
132
|
+
pie?: {
|
|
133
|
+
singular?: string;
|
|
134
|
+
plural?: string;
|
|
135
|
+
};
|
|
136
|
+
semicircle?: {
|
|
137
|
+
singular?: string;
|
|
138
|
+
plural?: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
123
141
|
rangeSelector?: {
|
|
124
142
|
lower?: string;
|
|
125
143
|
upper?: string;
|
|
@@ -171,7 +189,7 @@ export interface GrommetProps {
|
|
|
171
189
|
volumeUp?: string;
|
|
172
190
|
};
|
|
173
191
|
};
|
|
174
|
-
format
|
|
192
|
+
format?: (...args: any[]) => void;
|
|
175
193
|
};
|
|
176
194
|
onAnalytics?: (data: any) => void;
|
|
177
195
|
plain?: boolean;
|
|
@@ -127,6 +127,24 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
127
127
|
openMenu: _propTypes["default"].string,
|
|
128
128
|
closeMenu: _propTypes["default"].string
|
|
129
129
|
}),
|
|
130
|
+
meter: _propTypes["default"].shape({
|
|
131
|
+
bar: _propTypes["default"].shape({
|
|
132
|
+
singular: _propTypes["default"].string,
|
|
133
|
+
plural: _propTypes["default"].string
|
|
134
|
+
}),
|
|
135
|
+
circle: _propTypes["default"].shape({
|
|
136
|
+
singular: _propTypes["default"].string,
|
|
137
|
+
plural: _propTypes["default"].string
|
|
138
|
+
}),
|
|
139
|
+
pie: _propTypes["default"].shape({
|
|
140
|
+
singular: _propTypes["default"].string,
|
|
141
|
+
plural: _propTypes["default"].string
|
|
142
|
+
}),
|
|
143
|
+
semicirlce: _propTypes["default"].shape({
|
|
144
|
+
singular: _propTypes["default"].string,
|
|
145
|
+
plural: _propTypes["default"].string
|
|
146
|
+
})
|
|
147
|
+
}),
|
|
130
148
|
rangeSelector: _propTypes["default"].shape({
|
|
131
149
|
lower: _propTypes["default"].string,
|
|
132
150
|
upper: _propTypes["default"].string
|
|
@@ -11,11 +11,11 @@ var Vars = exports.Vars = function Vars() {
|
|
|
11
11
|
cssVars: true
|
|
12
12
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
13
13
|
pad: "medium",
|
|
14
|
-
background: "var(--
|
|
14
|
+
background: "var(--light-6)",
|
|
15
15
|
gap: "medium"
|
|
16
16
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, "Checkout Grommet variables, you can find them in the StyledGrommet DOM."), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
17
17
|
"with": true
|
|
18
|
-
}, "For example, the background color in this Box is using var(--
|
|
18
|
+
}, "For example, the background color in this Box is using var(--light-6)")));
|
|
19
19
|
};
|
|
20
20
|
var _default = exports["default"] = {
|
|
21
21
|
title: 'Utilities/Grommet/Vars'
|
|
@@ -74,7 +74,7 @@ var Layer = exports.Layer = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
}, [animate, animation, containerTarget, layerContainer, originalFocusedElement]);
|
|
77
|
-
return layerContainer ? /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
77
|
+
return layerContainer ? /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react["default"].createElement(_LayerContainer.LayerContainer, _extends({
|
|
78
78
|
ref: ref
|
|
79
79
|
}, props)), layerContainer) : null;
|
|
80
80
|
});
|
package/components/List/List.js
CHANGED
|
@@ -215,7 +215,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
|
|
|
215
215
|
var draggingRef = (0, _react.useRef)();
|
|
216
216
|
var sendAnalytics = (0, _AnalyticsContext.useAnalytics)();
|
|
217
217
|
var ariaProps = {
|
|
218
|
-
role: onClickItem
|
|
218
|
+
role: onClickItem ? 'listbox' : 'list'
|
|
219
219
|
};
|
|
220
220
|
if (active >= 0) {
|
|
221
221
|
var activeId;
|
|
@@ -265,22 +265,52 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
|
|
|
265
265
|
return /*#__PURE__*/_react["default"].createElement(Container, containterProps, /*#__PURE__*/_react["default"].createElement(_Keyboard.Keyboard, {
|
|
266
266
|
onEnter: onSelectOption,
|
|
267
267
|
onSpace: function onSpace(event) {
|
|
268
|
-
|
|
268
|
+
if (onClickItem || onOrder) {
|
|
269
|
+
event.preventDefault();
|
|
270
|
+
}
|
|
269
271
|
onSelectOption(event);
|
|
270
272
|
},
|
|
271
273
|
onUp: function onUp(event) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
if (onClickItem || onOrder) {
|
|
275
|
+
event.preventDefault();
|
|
276
|
+
if (active) {
|
|
277
|
+
var min = onOrder ? 1 : 0;
|
|
278
|
+
var activeElementIndex = Math.max(active - 1, min);
|
|
279
|
+
updateActive(activeElementIndex);
|
|
280
|
+
|
|
281
|
+
// Ensure the active item is in view
|
|
282
|
+
// setTimeout for activeElement to be updated
|
|
283
|
+
setTimeout(function () {
|
|
284
|
+
var _listRef$current;
|
|
285
|
+
// eslint-disable max-len
|
|
286
|
+
(_listRef$current = listRef.current) == null || (_listRef$current = _listRef$current.children[activeElementIndex]) == null || _listRef$current.scrollIntoView({
|
|
287
|
+
behavior: 'smooth',
|
|
288
|
+
block: 'nearest'
|
|
289
|
+
});
|
|
290
|
+
}, 0);
|
|
291
|
+
}
|
|
276
292
|
}
|
|
277
293
|
},
|
|
278
294
|
onDown: function onDown(event) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
295
|
+
if (onClickItem || onOrder) {
|
|
296
|
+
event.preventDefault();
|
|
297
|
+
if (orderableData && orderableData.length) {
|
|
298
|
+
var min = onOrder ? 1 : 0;
|
|
299
|
+
var max = onOrder ? orderableData.length * 2 - 2 : data.length - 1;
|
|
300
|
+
var activeElementIndex = active >= min ? Math.min(active + 1, max) : min;
|
|
301
|
+
updateActive(activeElementIndex);
|
|
302
|
+
|
|
303
|
+
// Ensure the active item is in view
|
|
304
|
+
// setTimeout for activeElement to be updated
|
|
305
|
+
setTimeout(function () {
|
|
306
|
+
var _listRef$current2;
|
|
307
|
+
// eslint-disable max-len
|
|
308
|
+
(_listRef$current2 = listRef.current) == null || (_listRef$current2 = _listRef$current2.children[activeElementIndex]) == null || _listRef$current2.scrollIntoView({
|
|
309
|
+
behavior: 'smooth',
|
|
310
|
+
block: 'nearest'
|
|
311
|
+
});
|
|
312
|
+
}, 0);
|
|
313
|
+
}
|
|
284
314
|
}
|
|
285
315
|
},
|
|
286
316
|
onKeyDown: onKeyDown
|
|
@@ -322,7 +352,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
|
|
|
322
352
|
var isPinned;
|
|
323
353
|
if (Array.isArray(pinned) && pinned.length > 0 || Array.isArray(pinned == null ? void 0 : pinned.items) && (pinned == null || (_pinned$items2 = pinned.items) == null ? void 0 : _pinned$items2.length) > 0) {
|
|
324
354
|
if (typeof item === 'object' && !itemKey) {
|
|
325
|
-
console.error(
|
|
355
|
+
console.error(// eslint-disable-next-line max-len
|
|
326
356
|
"Warning: Missing prop itemKey. Prop pin requires itemKey to be specified when data is of type 'object'.");
|
|
327
357
|
}
|
|
328
358
|
isPinned = Array.isArray(pinned) ? pinned == null ? void 0 : pinned.includes(key) : pinned.items.some(function (pinnedItem) {
|
|
@@ -374,7 +404,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
|
|
|
374
404
|
var isDisabled;
|
|
375
405
|
if (disabledItems) {
|
|
376
406
|
if (typeof item === 'object' && !itemKey) {
|
|
377
|
-
console.error(
|
|
407
|
+
console.error(// eslint-disable-next-line max-len
|
|
378
408
|
"Warning: Missing prop itemKey. Prop disabled requires itemKey to be specified when data is of type 'object'.");
|
|
379
409
|
}
|
|
380
410
|
isDisabled = disabledItems == null ? void 0 : disabledItems.includes(key);
|
|
@@ -30,7 +30,7 @@ var RenderedList = exports.RenderedList = function RenderedList() {
|
|
|
30
30
|
return /*#__PURE__*/_react["default"].createElement(_grommet.Text, {
|
|
31
31
|
key: item.location,
|
|
32
32
|
size: "small",
|
|
33
|
-
color: "dark-
|
|
33
|
+
color: "dark-2"
|
|
34
34
|
}, item.location);
|
|
35
35
|
},
|
|
36
36
|
itemKey: function itemKey(item) {
|
|
@@ -75,7 +75,7 @@ var Circle = exports.Circle = /*#__PURE__*/(0, _react.forwardRef)(function (prop
|
|
|
75
75
|
var stroke = (0, _utils2.strokeProps)(someHighlight && !highlight ? background : colorName, theme);
|
|
76
76
|
if (round) {
|
|
77
77
|
var d1 = (0, _utils.arcCommands)(centerX, centerY, radius, startAngle, endAngle);
|
|
78
|
-
paths.unshift(
|
|
78
|
+
paths.unshift(/*#__PURE__*/_react["default"].createElement("path", _extends({
|
|
79
79
|
key: key,
|
|
80
80
|
d: d1,
|
|
81
81
|
fill: "none"
|
|
@@ -104,7 +104,7 @@ var Circle = exports.Circle = /*#__PURE__*/(0, _react.forwardRef)(function (prop
|
|
|
104
104
|
pathCaps.unshift(pathCap);
|
|
105
105
|
} else {
|
|
106
106
|
var d = (0, _utils.arcCommands)(centerX, centerY, radius, startAngle, endAngle);
|
|
107
|
-
paths.push(
|
|
107
|
+
paths.push(/*#__PURE__*/_react["default"].createElement("path", _extends({
|
|
108
108
|
key: key,
|
|
109
109
|
d: d,
|
|
110
110
|
fill: "none"
|
|
@@ -7,23 +7,16 @@ var _Bar = require("./Bar");
|
|
|
7
7
|
var _Circle = require("./Circle");
|
|
8
8
|
var _propTypes = require("./propTypes");
|
|
9
9
|
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
10
|
-
var
|
|
10
|
+
var _MessageContext = require("../../contexts/MessageContext");
|
|
11
|
+
var _excluded = ["aria-label", "background", "color", "direction", "max", "messages", "size", "thickness", "type", "reverse", "value", "values"];
|
|
11
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
14
|
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); }
|
|
14
15
|
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; }
|
|
15
|
-
var deriveMax = function deriveMax(values) {
|
|
16
|
-
var max = 100;
|
|
17
|
-
if (values && values.length > 1) {
|
|
18
|
-
max = 0;
|
|
19
|
-
values.forEach(function (v) {
|
|
20
|
-
max += v.value;
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return max;
|
|
24
|
-
};
|
|
25
16
|
var Meter = exports.Meter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
26
|
-
var
|
|
17
|
+
var _messages$meter;
|
|
18
|
+
var ariaLabel = _ref['aria-label'],
|
|
19
|
+
_ref$background = _ref.background,
|
|
27
20
|
background = _ref$background === void 0 ? {
|
|
28
21
|
color: 'light-2',
|
|
29
22
|
opacity: 'medium'
|
|
@@ -31,6 +24,8 @@ var Meter = exports.Meter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
31
24
|
color = _ref.color,
|
|
32
25
|
_ref$direction = _ref.direction,
|
|
33
26
|
direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,
|
|
27
|
+
maxProp = _ref.max,
|
|
28
|
+
messages = _ref.messages,
|
|
34
29
|
_ref$size = _ref.size,
|
|
35
30
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
36
31
|
_ref$thickness = _ref.thickness,
|
|
@@ -43,6 +38,8 @@ var Meter = exports.Meter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
43
38
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
44
39
|
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
45
40
|
theme = _useThemeValue.theme;
|
|
41
|
+
var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
42
|
+
format = _useContext.format;
|
|
46
43
|
|
|
47
44
|
// normalize values to an array of objects
|
|
48
45
|
var values = (0, _react.useMemo)(function () {
|
|
@@ -54,14 +51,35 @@ var Meter = exports.Meter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
54
51
|
return [];
|
|
55
52
|
}, [color, value, valuesProp]);
|
|
56
53
|
var reverse = direction === 'horizontal' && (theme.dir === 'rtl' || reverseProp) && !(theme.dir === 'rtl' && reverseProp);
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
var max = (0, _react.useMemo)(function () {
|
|
55
|
+
var maxValue = 100;
|
|
56
|
+
if ((values == null ? void 0 : values.length) > 1) {
|
|
57
|
+
maxValue = values.reduce(function (total, currentValue) {
|
|
58
|
+
return total + currentValue.value;
|
|
59
|
+
}, 0);
|
|
60
|
+
}
|
|
61
|
+
return maxProp || maxValue || 100;
|
|
62
|
+
}, [maxProp, values]);
|
|
63
|
+
var messageId = (values == null ? void 0 : values.length) === 1 ? 'singular' : 'plural';
|
|
64
|
+
var meterType = type || 'bar';
|
|
65
|
+
var meterAriaLabel = ariaLabel || format({
|
|
66
|
+
id: "meter." + meterType + "." + messageId,
|
|
67
|
+
messages: messages == null || (_messages$meter = messages.meter) == null ? void 0 : _messages$meter[meterType],
|
|
68
|
+
values: {
|
|
69
|
+
meterValue: value || values.map(function (item) {
|
|
70
|
+
var _item$value;
|
|
71
|
+
return (_item$value = item.value) != null ? _item$value : 0;
|
|
72
|
+
}).join(', ') || 0,
|
|
73
|
+
type: type,
|
|
74
|
+
max: max
|
|
75
|
+
}
|
|
76
|
+
});
|
|
60
77
|
var content;
|
|
61
78
|
if (type === 'bar') {
|
|
62
79
|
content = /*#__PURE__*/_react["default"].createElement(_Bar.Bar, _extends({
|
|
63
80
|
ref: ref,
|
|
64
|
-
|
|
81
|
+
"aria-label": meterAriaLabel,
|
|
82
|
+
max: max,
|
|
65
83
|
values: values,
|
|
66
84
|
size: size,
|
|
67
85
|
thickness: thickness,
|
|
@@ -71,8 +89,9 @@ var Meter = exports.Meter = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
71
89
|
}, rest));
|
|
72
90
|
} else if (type === 'circle' || type === 'pie' || type === 'semicircle') {
|
|
73
91
|
content = /*#__PURE__*/_react["default"].createElement(_Circle.Circle, _extends({
|
|
92
|
+
"aria-label": meterAriaLabel,
|
|
74
93
|
ref: ref,
|
|
75
|
-
max:
|
|
94
|
+
max: max,
|
|
76
95
|
values: values,
|
|
77
96
|
size: size,
|
|
78
97
|
thickness: thickness,
|
|
@@ -16,6 +16,24 @@ export interface MeterProps {
|
|
|
16
16
|
gridArea?: GridAreaType;
|
|
17
17
|
margin?: MarginType;
|
|
18
18
|
max?: number;
|
|
19
|
+
messages?: {
|
|
20
|
+
bar?: {
|
|
21
|
+
singular?: string;
|
|
22
|
+
plural?: string;
|
|
23
|
+
};
|
|
24
|
+
circle?: {
|
|
25
|
+
singular?: string;
|
|
26
|
+
plural?: string;
|
|
27
|
+
};
|
|
28
|
+
pie?: {
|
|
29
|
+
singular?: string;
|
|
30
|
+
plural?: string;
|
|
31
|
+
};
|
|
32
|
+
semicircle?: {
|
|
33
|
+
singular?: string;
|
|
34
|
+
plural?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
19
37
|
reverse?: boolean;
|
|
20
38
|
round?: boolean;
|
|
21
39
|
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full' | string;
|
|
@@ -15,6 +15,24 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
15
15
|
})]),
|
|
16
16
|
color: _propTypes["default"].string,
|
|
17
17
|
max: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
|
|
18
|
+
messages: _propTypes["default"].shape({
|
|
19
|
+
bar: _propTypes["default"].shape({
|
|
20
|
+
singular: _propTypes["default"].string,
|
|
21
|
+
plural: _propTypes["default"].string
|
|
22
|
+
}),
|
|
23
|
+
circle: _propTypes["default"].shape({
|
|
24
|
+
singular: _propTypes["default"].string,
|
|
25
|
+
plural: _propTypes["default"].string
|
|
26
|
+
}),
|
|
27
|
+
pie: _propTypes["default"].shape({
|
|
28
|
+
singular: _propTypes["default"].string,
|
|
29
|
+
plural: _propTypes["default"].string
|
|
30
|
+
}),
|
|
31
|
+
semicirlce: _propTypes["default"].shape({
|
|
32
|
+
singular: _propTypes["default"].string,
|
|
33
|
+
plural: _propTypes["default"].string
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
18
36
|
reverse: _propTypes["default"].bool,
|
|
19
37
|
round: _propTypes["default"].bool,
|
|
20
38
|
size: _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), _propTypes["default"].string]),
|
|
@@ -52,12 +52,18 @@ var adaptThemeStyle = function adaptThemeStyle(value, theme) {
|
|
|
52
52
|
}
|
|
53
53
|
return [textStyle, closeButtonStyle];
|
|
54
54
|
};
|
|
55
|
+
var getTextColor = function getTextColor(part, status, kind, theme) {
|
|
56
|
+
var _theme$notification, _theme$notification2, _theme$notification3, _theme$notification4, _theme$notification5;
|
|
57
|
+
var color;
|
|
58
|
+
if ((_theme$notification = theme.notification) != null && (_theme$notification = _theme$notification[status]) != null && (_theme$notification = _theme$notification[kind]) != null && (_theme$notification = _theme$notification[part]) != null && _theme$notification.color) color = (_theme$notification2 = theme.notification) == null || (_theme$notification2 = _theme$notification2[status]) == null || (_theme$notification2 = _theme$notification2[kind]) == null || (_theme$notification2 = _theme$notification2[part]) == null ? void 0 : _theme$notification2.color;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3 = _theme$notification3[status]) != null && (_theme$notification3 = _theme$notification3[part]) != null && _theme$notification3.color) color = (_theme$notification4 = theme.notification) == null || (_theme$notification4 = _theme$notification4[status]) == null || (_theme$notification4 = _theme$notification4[part]) == null ? void 0 : _theme$notification4.color;else color = (_theme$notification5 = theme.notification) == null || (_theme$notification5 = _theme$notification5[part]) == null ? void 0 : _theme$notification5.color;
|
|
59
|
+
return color;
|
|
60
|
+
};
|
|
55
61
|
var NotificationAnchor = (0, _styledComponents["default"])(_Anchor.Anchor).withConfig({
|
|
56
62
|
displayName: "Notification__NotificationAnchor",
|
|
57
63
|
componentId: "sc-1yq09yz-0"
|
|
58
64
|
})(["white-space:nowrap;"]);
|
|
59
65
|
var Notification = exports.Notification = function Notification(_ref) {
|
|
60
|
-
var _theme$
|
|
66
|
+
var _theme$notification6, _theme$notification7, _theme$notification8, _theme$notification9, _theme$notification10;
|
|
61
67
|
var actionsProp = _ref.actions,
|
|
62
68
|
messageProp = _ref.message,
|
|
63
69
|
onClose = _ref.onClose,
|
|
@@ -94,7 +100,7 @@ var Notification = exports.Notification = function Notification(_ref) {
|
|
|
94
100
|
return undefined;
|
|
95
101
|
}, [autoClose, close, theme.notification.toast.time, theme.notification.time, time]);
|
|
96
102
|
var CloseIcon = theme.notification.close.icon;
|
|
97
|
-
var _ref2 = ((_theme$
|
|
103
|
+
var _ref2 = ((_theme$notification6 = theme.notification) == null ? void 0 : _theme$notification6[status]) || theme.notification.unknown,
|
|
98
104
|
StatusIcon = _ref2.icon,
|
|
99
105
|
color = _ref2.color;
|
|
100
106
|
var closeIconColor = theme.notification.close.color;
|
|
@@ -106,7 +112,7 @@ var Notification = exports.Notification = function Notification(_ref) {
|
|
|
106
112
|
var direction;
|
|
107
113
|
if (kind && theme.notification[kind].direction) direction = theme.notification[kind].direction;else direction = theme.notification.direction;
|
|
108
114
|
var background;
|
|
109
|
-
if (kind && (_theme$
|
|
115
|
+
if (kind && (_theme$notification7 = theme.notification) != null && (_theme$notification7 = _theme$notification7[status]) != null && (_theme$notification7 = _theme$notification7[kind]) != null && _theme$notification7.background) background = theme.notification[status][kind].background;else if ((_theme$notification8 = theme.notification) != null && (_theme$notification8 = _theme$notification8[status]) != null && _theme$notification8.background) background = theme.notification[status].background;else background = ((_theme$notification9 = theme.notification) == null || (_theme$notification9 = _theme$notification9[kind]) == null || (_theme$notification9 = _theme$notification9.container) == null ? void 0 : _theme$notification9.background) || theme.notification.container.background;
|
|
110
116
|
var TextWrapper = direction === 'row' ? _Text.Text : _react.Fragment;
|
|
111
117
|
|
|
112
118
|
// notification is built with two child boxes that contain:
|
|
@@ -125,6 +131,8 @@ var Notification = exports.Notification = function Notification(_ref) {
|
|
|
125
131
|
} else textPad = pad;
|
|
126
132
|
var actions;
|
|
127
133
|
var message = messageProp;
|
|
134
|
+
var messageColor = getTextColor('message', status, kind, theme);
|
|
135
|
+
var titleColor = getTextColor('title', status, kind, theme);
|
|
128
136
|
if (actionsProp) actions = actionsProp.map(function (action) {
|
|
129
137
|
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
|
|
130
138
|
key: action.label
|
|
@@ -138,12 +146,14 @@ var Notification = exports.Notification = function Notification(_ref) {
|
|
|
138
146
|
}, action, theme.notification.actions)), ' ');
|
|
139
147
|
});
|
|
140
148
|
var Message = direction !== 'row' ? _Paragraph.Paragraph : _Text.Text;
|
|
141
|
-
if (message || actions) message = typeof message === 'string' ? /*#__PURE__*/_react["default"].createElement(Message, theme.notification.message,
|
|
149
|
+
if (message || actions) message = typeof message === 'string' ? /*#__PURE__*/_react["default"].createElement(Message, _extends({}, theme.notification.message, {
|
|
150
|
+
color: messageColor
|
|
151
|
+
}), /*#__PURE__*/_react["default"].createElement(_Text.Text, {
|
|
142
152
|
margin: {
|
|
143
153
|
right: 'xsmall'
|
|
144
154
|
}
|
|
145
155
|
}, message), actions) : message;
|
|
146
|
-
var iconDimension = ((_theme$
|
|
156
|
+
var iconDimension = ((_theme$notification10 = theme.notification) == null || (_theme$notification10 = _theme$notification10.message) == null ? void 0 : _theme$notification10.size) || 'medium';
|
|
147
157
|
var content = /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {
|
|
148
158
|
background: background
|
|
149
159
|
// let internal box control pad
|
|
@@ -159,7 +169,9 @@ var Notification = exports.Notification = function Notification(_ref) {
|
|
|
159
169
|
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, theme.notification.iconContainer, icon || /*#__PURE__*/_react["default"].createElement(StatusIcon, {
|
|
160
170
|
color: color,
|
|
161
171
|
height: iconDimension
|
|
162
|
-
})), /*#__PURE__*/_react["default"].createElement(_Box.Box, theme.notification.textContainer, /*#__PURE__*/_react["default"].createElement(TextWrapper, null, title && /*#__PURE__*/_react["default"].createElement(_Text.Text, theme.notification.title,
|
|
172
|
+
})), /*#__PURE__*/_react["default"].createElement(_Box.Box, theme.notification.textContainer, /*#__PURE__*/_react["default"].createElement(TextWrapper, null, title && /*#__PURE__*/_react["default"].createElement(_Text.Text, _extends({}, theme.notification.title, {
|
|
173
|
+
color: titleColor
|
|
174
|
+
}), title), message && title && direction === 'row' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "\xA0"), message))), onClose &&
|
|
163
175
|
/*#__PURE__*/
|
|
164
176
|
// theme.notification.container and textContainer may both have pad,
|
|
165
177
|
// account for both
|
|
@@ -8,6 +8,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
|
|
|
8
8
|
var PropType = {};
|
|
9
9
|
if (process.env.NODE_ENV !== 'production') {
|
|
10
10
|
PropType = {
|
|
11
|
+
id: _propTypes["default"].string,
|
|
11
12
|
actions: _propTypes["default"].arrayOf(_propTypes["default"].shape(_propTypes2.AnchorPropTypes)),
|
|
12
13
|
global: _propTypes["default"].bool,
|
|
13
14
|
title: _propTypes["default"].string,
|
|
@@ -89,7 +89,7 @@ var Pagination = exports.Pagination = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
|
89
89
|
var numberMiddlePages;
|
|
90
90
|
if (numberMiddlePagesProp < 1) {
|
|
91
91
|
numberMiddlePages = 1;
|
|
92
|
-
console.warn(
|
|
92
|
+
console.warn(// eslint-disable-next-line max-len
|
|
93
93
|
"Property \"numberMiddlePages\" should not be < 1. One middle page button will be shown. Set \"numberMiddlePages\" >= 1 to remove this warning.");
|
|
94
94
|
} else numberMiddlePages = numberMiddlePagesProp;
|
|
95
95
|
var startingMiddlePages;
|
|
@@ -188,7 +188,9 @@ var Pagination = exports.Pagination = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
|
188
188
|
ref: ref
|
|
189
189
|
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
190
190
|
as: "ul"
|
|
191
|
-
}, theme.pagination.controls
|
|
191
|
+
}, theme.pagination.controls, {
|
|
192
|
+
cssGap: true
|
|
193
|
+
}), controls.map(function (control, index) {
|
|
192
194
|
return (
|
|
193
195
|
/*#__PURE__*/
|
|
194
196
|
/* Using index as key (as opposed to a unique id) seems to
|
|
@@ -52,7 +52,10 @@ export const Custom = () => (
|
|
|
52
52
|
<Text margin={{ bottom: 'small' }}>
|
|
53
53
|
Custom Theme via theme.pagination.button
|
|
54
54
|
</Text>
|
|
55
|
-
<Pagination
|
|
55
|
+
<Pagination
|
|
56
|
+
aria-label="Pagination with custom button theme"
|
|
57
|
+
numberItems={237}
|
|
58
|
+
/>
|
|
56
59
|
</Box>
|
|
57
60
|
<Box
|
|
58
61
|
align="start"
|
|
@@ -62,7 +65,10 @@ export const Custom = () => (
|
|
|
62
65
|
<Text margin={{ bottom: 'small' }}>
|
|
63
66
|
Custom Theme via theme.pagination.button
|
|
64
67
|
</Text>
|
|
65
|
-
<Pagination
|
|
68
|
+
<Pagination
|
|
69
|
+
aria-label="Pagination with custom button theme and black background"
|
|
70
|
+
numberItems={237}
|
|
71
|
+
/>
|
|
66
72
|
</Box>
|
|
67
73
|
</Box>
|
|
68
74
|
</Grommet>
|
|
@@ -14,10 +14,12 @@ var NumberEdgePages = exports.NumberEdgePages = function NumberEdgePages() {
|
|
|
14
14
|
pad: "small",
|
|
15
15
|
gap: "medium"
|
|
16
16
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "numberEdgePages = 2 (number of pages on start/end)"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
17
|
+
"aria-label": "Pagination with 2 pages at the start and end",
|
|
17
18
|
numberItems: 237,
|
|
18
19
|
page: 10,
|
|
19
20
|
numberEdgePages: 2
|
|
20
21
|
})), /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "numberEdgePages = 0"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
22
|
+
"aria-label": "Pagination with no pages at the start and end",
|
|
21
23
|
numberItems: 237,
|
|
22
24
|
page: 10,
|
|
23
25
|
numberEdgePages: 0
|
|
@@ -14,10 +14,12 @@ var NumberMiddlePages = exports.NumberMiddlePages = function NumberMiddlePages()
|
|
|
14
14
|
pad: "small",
|
|
15
15
|
gap: "medium"
|
|
16
16
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "numberMiddlePages = 4 (number of pages in the middle)"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
17
|
+
"aria-label": "Pagination with 4 pages in the middle",
|
|
17
18
|
numberItems: 237,
|
|
18
19
|
page: 10,
|
|
19
20
|
numberMiddlePages: 4
|
|
20
21
|
})), /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "numberMiddlePages = 5 (number of pages in the middle)"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
22
|
+
"aria-label": "Pagination with 5 pages in the middle",
|
|
21
23
|
numberItems: 237,
|
|
22
24
|
page: 10,
|
|
23
25
|
numberMiddlePages: 5
|
|
@@ -15,13 +15,15 @@ var Simple = exports.Simple = function Simple() {
|
|
|
15
15
|
pad: "small",
|
|
16
16
|
gap: "medium"
|
|
17
17
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Default"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
18
|
+
"aria-label": "Pagination with default settings",
|
|
18
19
|
numberItems: 237
|
|
19
20
|
})), /*#__PURE__*/_react["default"].createElement(_grommet.Box, null, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Box Props"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
20
21
|
numberItems: 1237,
|
|
21
22
|
page: 24,
|
|
22
|
-
background: "
|
|
23
|
+
background: "dark-1",
|
|
23
24
|
pad: "medium",
|
|
24
|
-
margin: "small"
|
|
25
|
+
margin: "small",
|
|
26
|
+
"aria-label": "Pagination with custom background and spacing"
|
|
25
27
|
})))
|
|
26
28
|
// </Grommet>
|
|
27
29
|
);
|
|
@@ -15,12 +15,15 @@ var Size = exports.Size = function Size() {
|
|
|
15
15
|
pad: "small",
|
|
16
16
|
gap: "medium"
|
|
17
17
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Small"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
18
|
+
"aria-label": "Pagination with small size",
|
|
18
19
|
numberItems: 237,
|
|
19
20
|
size: "small"
|
|
20
21
|
}), /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Medium (Default)"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
22
|
+
"aria-label": "Pagination with medium size",
|
|
21
23
|
numberItems: 237,
|
|
22
24
|
size: "medium"
|
|
23
25
|
}), /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Large"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
26
|
+
"aria-label": "Pagination with large size",
|
|
24
27
|
numberItems: 237,
|
|
25
28
|
size: "large"
|
|
26
29
|
}))
|
|
@@ -17,17 +17,20 @@ var Steps = exports.Steps = function Steps() {
|
|
|
17
17
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
18
18
|
fill: "horizontal"
|
|
19
19
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Pagination with stepOptions"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
20
|
+
"aria-label": "Pagination with step options to change items per page",
|
|
20
21
|
numberItems: 237,
|
|
21
22
|
stepOptions: true
|
|
22
23
|
})), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
23
24
|
fill: "horizontal"
|
|
24
25
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Pagination with stepOptions and summary"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
26
|
+
"aria-label": "Pagination with step options and summary of items per page",
|
|
25
27
|
numberItems: 237,
|
|
26
28
|
stepOptions: true,
|
|
27
29
|
summary: true
|
|
28
30
|
})), /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
29
31
|
fill: "horizontal"
|
|
30
32
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Pagination with custom step sizes"), /*#__PURE__*/_react["default"].createElement(_grommet.Pagination, {
|
|
33
|
+
"aria-label": "Pagination with custom step sizes and summary",
|
|
31
34
|
numberItems: 237,
|
|
32
35
|
stepOptions: [10, 20, 30, 1000],
|
|
33
36
|
summary: true
|