grommet 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.js +7 -2
- package/components/Box/stories/Background.js +1 -1
- package/components/Button/stories/CustomThemed/Typescript.tsx +1 -1
- package/components/Button/stories/Kind.js +6 -10
- package/components/Calendar/Calendar.js +15 -8
- package/components/Calendar/StyledCalendar.js +6 -5
- package/components/Calendar/index.d.ts +1 -0
- package/components/Calendar/propTypes.js +1 -0
- package/components/Calendar/stories/DaylightSavings.js +1 -1
- package/components/Calendar/stories/HeaderLevel.js +36 -0
- package/components/Calendar/stories/ShowAdjacentDays.js +3 -2
- package/components/Card/stories/CustomThemed/Clickable.js +2 -2
- package/components/Card/stories/CustomThemed/Stacked.js +2 -2
- package/components/Card/stories/CustomThemed/Themed.js +4 -4
- package/components/Cards/stories/Children.js +2 -2
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/DataChart/Detail.js +55 -25
- package/components/DataChart/Legend.js +1 -0
- package/components/DataTable/Body.js +16 -2
- package/components/DataTable/stories/CustomThemed/Fill.js +1 -0
- package/components/Drop/stories/CustomThemed/Lazy.js +4 -4
- package/components/Drop/stories/CustomThemed/Themed.js +1 -1
- package/components/Form/stories/AggregateValidation.js +5 -2
- package/components/Form/stories/ArrayOfFormFields.js +19 -6
- package/components/Form/stories/Controlled.js +8 -1
- package/components/Form/stories/ControlledInput.js +8 -1
- package/components/Form/stories/ControlledInputLazy.js +5 -1
- package/components/Form/stories/ControlledLazy.js +5 -1
- package/components/Form/stories/CustomThemed/Custom.js +17 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +36 -36
- package/components/Form/stories/CustomThemed/RequiredLabel.js +3 -0
- package/components/Form/stories/CustomThemed/Themed.js +2 -2
- package/components/Form/stories/DynamicFields.js +9 -2
- package/components/Form/stories/FieldWithChildren.js +6 -1
- package/components/Form/stories/TriggerValidationUsingFormField.js +18 -6
- package/components/Form/stories/Uncontrolled.js +6 -1
- package/components/Form/stories/ValidateOnBlur.js +10 -3
- package/components/Form/stories/ValidateOnChange.js +11 -5
- package/components/Form/stories/ValidateOnMount.js +11 -4
- package/components/Form/stories/typescript/TypedForm.tsx +39 -45
- package/components/FormField/stories/CustomThemed/Custom.tsx +1 -1
- package/components/Grid/stories/AreasPropAlternative.js +4 -1
- package/components/Grommet/index.d.ts +4 -0
- package/components/Grommet/propTypes.js +4 -0
- package/components/Layer/LayerContainer.js +3 -14
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Notification/stories/CustomThemed/ThemedNotification.tsx +2 -1
- package/components/PageHeader/stories/Level.js +2 -2
- package/components/PageHeader/stories/Size.js +3 -2
- package/components/Skeleton/stories/CustomThemed/Custom.js +2 -0
- package/components/Skeleton/stories/GridContainer.js +1 -1
- package/components/Skeleton/stories/Group.js +1 -1
- package/components/Skeleton/stories/Individual.js +1 -2
- package/components/Skeleton/stories/Simple.js +1 -0
- package/components/SkipLinks/stories/CustomThemed/Themed.js +1 -1
- package/components/StarRating/StarRating.js +17 -3
- package/components/Tabs/Tabs.js +1 -1
- package/components/Tabs/stories/CustomThemed/Custom.js +3 -3
- package/components/TextArea/stories/CustomThemed/Themed.js +1 -0
- package/components/TextInput/stories/Simple.js +1 -6
- package/components/ThumbsRating/ThumbsRating.js +20 -5
- package/es6/all/stories/AllComponents.js +7 -2
- package/es6/components/Box/stories/Background.js +1 -1
- package/es6/components/Button/stories/CustomThemed/Typescript.tsx +1 -1
- package/es6/components/Button/stories/Kind.js +6 -10
- package/es6/components/Calendar/Calendar.js +15 -8
- package/es6/components/Calendar/StyledCalendar.js +6 -5
- package/es6/components/Calendar/index.d.ts +1 -0
- package/es6/components/Calendar/propTypes.js +1 -0
- package/es6/components/Calendar/stories/DaylightSavings.js +2 -2
- package/es6/components/Calendar/stories/HeaderLevel.js +30 -0
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +3 -2
- package/es6/components/Card/stories/CustomThemed/Clickable.js +3 -3
- package/es6/components/Card/stories/CustomThemed/Stacked.js +3 -3
- package/es6/components/Card/stories/CustomThemed/Themed.js +5 -5
- package/es6/components/Cards/stories/Children.js +3 -3
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/DataChart/Detail.js +55 -25
- package/es6/components/DataChart/Legend.js +1 -0
- package/es6/components/DataTable/Body.js +18 -4
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -0
- package/es6/components/Drop/stories/CustomThemed/Lazy.js +4 -4
- package/es6/components/Drop/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Form/stories/AggregateValidation.js +5 -2
- package/es6/components/Form/stories/ArrayOfFormFields.js +20 -7
- package/es6/components/Form/stories/Controlled.js +8 -1
- package/es6/components/Form/stories/ControlledInput.js +8 -1
- package/es6/components/Form/stories/ControlledInputLazy.js +5 -1
- package/es6/components/Form/stories/ControlledLazy.js +5 -1
- package/es6/components/Form/stories/CustomThemed/Custom.js +17 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +36 -36
- package/es6/components/Form/stories/CustomThemed/RequiredLabel.js +3 -0
- package/es6/components/Form/stories/CustomThemed/Themed.js +2 -2
- package/es6/components/Form/stories/DynamicFields.js +9 -2
- package/es6/components/Form/stories/FieldWithChildren.js +6 -1
- package/es6/components/Form/stories/TriggerValidationUsingFormField.js +19 -7
- package/es6/components/Form/stories/Uncontrolled.js +6 -1
- package/es6/components/Form/stories/ValidateOnBlur.js +10 -3
- package/es6/components/Form/stories/ValidateOnChange.js +12 -6
- package/es6/components/Form/stories/ValidateOnMount.js +11 -4
- package/es6/components/Form/stories/typescript/TypedForm.tsx +39 -45
- package/es6/components/FormField/stories/CustomThemed/Custom.tsx +1 -1
- package/es6/components/Grid/stories/AreasPropAlternative.js +4 -1
- package/es6/components/Grommet/index.d.ts +4 -0
- package/es6/components/Grommet/propTypes.js +4 -0
- package/es6/components/Layer/LayerContainer.js +4 -15
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Notification/stories/CustomThemed/ThemedNotification.tsx +2 -1
- package/es6/components/PageHeader/stories/Level.js +3 -3
- package/es6/components/PageHeader/stories/Size.js +3 -2
- package/es6/components/Skeleton/stories/CustomThemed/Custom.js +2 -0
- package/es6/components/Skeleton/stories/GridContainer.js +2 -2
- package/es6/components/Skeleton/stories/Group.js +2 -2
- package/es6/components/Skeleton/stories/Individual.js +2 -3
- package/es6/components/Skeleton/stories/Simple.js +1 -0
- package/es6/components/SkipLinks/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/StarRating/StarRating.js +16 -3
- package/es6/components/Tabs/Tabs.js +1 -1
- package/es6/components/Tabs/stories/CustomThemed/Custom.js +3 -3
- package/es6/components/TextArea/stories/CustomThemed/Themed.js +1 -0
- package/es6/components/TextInput/stories/Simple.js +2 -7
- package/es6/components/ThumbsRating/ThumbsRating.js +20 -5
- package/es6/languages/default.json +4 -0
- package/es6/themes/base.d.ts +3 -0
- package/es6/themes/base.js +8 -5
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +4 -0
- package/package.json +8 -8
- package/themes/base.d.ts +3 -0
- package/themes/base.js +8 -5
- package/tools/release-stable.js +1 -1
- package/components/Form/stories/FieldWithComponentProp.js +0 -138
- package/es6/components/Form/stories/FieldWithComponentProp.js +0 -133
|
@@ -27,12 +27,7 @@ var Simple = exports.Simple = function Simple() {
|
|
|
27
27
|
value: value,
|
|
28
28
|
onChange: onChange,
|
|
29
29
|
"aria-label": "Input Text"
|
|
30
|
-
}))
|
|
31
|
-
label: "label"
|
|
32
|
-
// contentProps={{
|
|
33
|
-
// border: false,
|
|
34
|
-
// }}
|
|
35
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, null))))
|
|
30
|
+
})))
|
|
36
31
|
// </Grommet>
|
|
37
32
|
);
|
|
38
33
|
};
|
|
@@ -3,38 +3,53 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.ThumbsRating = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
6
7
|
var _Like = require("grommet-icons/icons/Like");
|
|
7
8
|
var _LikeFill = require("grommet-icons/icons/LikeFill");
|
|
8
9
|
var _Dislike = require("grommet-icons/icons/Dislike");
|
|
9
10
|
var _DislikeFill = require("grommet-icons/icons/DislikeFill");
|
|
11
|
+
var _Box = require("../Box");
|
|
10
12
|
var _RadioButtonGroup = require("../RadioButtonGroup");
|
|
11
13
|
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
14
|
+
var _utils = require("../../utils");
|
|
12
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
16
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
14
17
|
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); }
|
|
18
|
+
var StyledThumbsRatingBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
19
|
+
displayName: "ThumbsRating__StyledThumbsRatingBox",
|
|
20
|
+
componentId: "sc-1xsgzvn-0"
|
|
21
|
+
})(["", ";"], function (props) {
|
|
22
|
+
return props.focus && (0, _utils.focusStyle)();
|
|
23
|
+
});
|
|
15
24
|
var ThumbsRating = exports.ThumbsRating = function ThumbsRating(_ref) {
|
|
16
25
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
17
26
|
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
18
27
|
theme = _useThemeValue.theme;
|
|
28
|
+
var usingKeyboard = (0, _utils.useKeyboard)();
|
|
19
29
|
return /*#__PURE__*/_react["default"].createElement(_RadioButtonGroup.RadioButtonGroup, _extends({
|
|
20
30
|
direction: "row",
|
|
21
31
|
options: ['like', 'dislike']
|
|
22
32
|
}, rest), function (option, _ref2) {
|
|
23
33
|
var _theme$thumbsRating3, _theme$thumbsRating4;
|
|
24
|
-
var checked = _ref2.checked
|
|
34
|
+
var checked = _ref2.checked,
|
|
35
|
+
focus = _ref2.focus;
|
|
25
36
|
if (option === 'like') {
|
|
26
37
|
var _theme$thumbsRating, _theme$thumbsRating2;
|
|
27
|
-
return
|
|
38
|
+
return /*#__PURE__*/_react["default"].createElement(StyledThumbsRatingBox, {
|
|
39
|
+
focus: focus && usingKeyboard
|
|
40
|
+
}, checked ? /*#__PURE__*/_react["default"].createElement(_LikeFill.LikeFill, {
|
|
28
41
|
color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color
|
|
29
42
|
}) : /*#__PURE__*/_react["default"].createElement(_Like.Like, {
|
|
30
43
|
color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color
|
|
31
|
-
});
|
|
44
|
+
}));
|
|
32
45
|
}
|
|
33
|
-
return
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement(StyledThumbsRatingBox, {
|
|
47
|
+
focus: focus && usingKeyboard
|
|
48
|
+
}, checked ? /*#__PURE__*/_react["default"].createElement(_DislikeFill.DislikeFill, {
|
|
34
49
|
color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color
|
|
35
50
|
}) : /*#__PURE__*/_react["default"].createElement(_Dislike.Dislike, {
|
|
36
51
|
color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color
|
|
37
|
-
});
|
|
52
|
+
}));
|
|
38
53
|
});
|
|
39
54
|
};
|
|
40
55
|
ThumbsRating.displayName = 'ThumbsRating';
|
|
@@ -138,6 +138,7 @@ var Components = function Components() {
|
|
|
138
138
|
}), /*#__PURE__*/React.createElement(TextArea, {
|
|
139
139
|
placeholder: "TextArea"
|
|
140
140
|
}), /*#__PURE__*/React.createElement(RangeInput, {
|
|
141
|
+
"aria-label": "Range input with value of 24",
|
|
141
142
|
value: 24,
|
|
142
143
|
onChange: function onChange() {}
|
|
143
144
|
}), /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -171,7 +172,8 @@ var Components = function Components() {
|
|
|
171
172
|
key: "time",
|
|
172
173
|
gap: "medium"
|
|
173
174
|
}, /*#__PURE__*/React.createElement(Calendar, {
|
|
174
|
-
size: "small"
|
|
175
|
+
size: "small",
|
|
176
|
+
level: 2
|
|
175
177
|
}), /*#__PURE__*/React.createElement(Clock, {
|
|
176
178
|
type: "digital",
|
|
177
179
|
className: "chromatic-ignore"
|
|
@@ -268,7 +270,10 @@ var Components = function Components() {
|
|
|
268
270
|
sortable: true
|
|
269
271
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
270
272
|
key: "accordion"
|
|
271
|
-
}, /*#__PURE__*/React.createElement(Accordion,
|
|
273
|
+
}, /*#__PURE__*/React.createElement(Accordion, {
|
|
274
|
+
level: 2,
|
|
275
|
+
size: "small"
|
|
276
|
+
}, /*#__PURE__*/React.createElement(AccordionPanel, {
|
|
272
277
|
label: "Accordion Panel 1"
|
|
273
278
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
274
279
|
pad: "small"
|
|
@@ -52,7 +52,7 @@ export var BackgroundBox = function BackgroundBox() {
|
|
|
52
52
|
pad: "small"
|
|
53
53
|
}, "low opacity on light background")), /*#__PURE__*/React.createElement(Box, {
|
|
54
54
|
background: {
|
|
55
|
-
color: 'background',
|
|
55
|
+
color: 'background-front',
|
|
56
56
|
dark: true
|
|
57
57
|
},
|
|
58
58
|
pad: "medium"
|
|
@@ -2,6 +2,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { User } from "grommet-icons/es6/icons/User";
|
|
4
4
|
import { Box, Button, Heading, Text } from 'grommet';
|
|
5
|
+
import { useThemeValue } from '../../../utils/useThemeValue';
|
|
5
6
|
var darks = [false, true];
|
|
6
7
|
var kinds = [{
|
|
7
8
|
name: 'default',
|
|
@@ -21,12 +22,6 @@ var states = [{}, {
|
|
|
21
22
|
active: true
|
|
22
23
|
}, {
|
|
23
24
|
disabled: true
|
|
24
|
-
}, {
|
|
25
|
-
color: 'teal'
|
|
26
|
-
}, {
|
|
27
|
-
color: '#9999ff'
|
|
28
|
-
}, {
|
|
29
|
-
color: '#333399'
|
|
30
25
|
}, {
|
|
31
26
|
hoverIndicator: 'teal'
|
|
32
27
|
}];
|
|
@@ -41,11 +36,11 @@ var contents = [{
|
|
|
41
36
|
plain: true,
|
|
42
37
|
children: /*#__PURE__*/React.createElement(Box, {
|
|
43
38
|
pad: "xsmall"
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Text,
|
|
45
|
-
color: "orange"
|
|
46
|
-
}, "label"))
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Text, null, "label"))
|
|
47
40
|
}];
|
|
48
41
|
export var Kind = function Kind() {
|
|
42
|
+
var _useThemeValue = useThemeValue(),
|
|
43
|
+
theme = _useThemeValue.theme;
|
|
49
44
|
return /*#__PURE__*/React.createElement(Box, {
|
|
50
45
|
pad: "large",
|
|
51
46
|
gap: "large"
|
|
@@ -67,13 +62,14 @@ export var Kind = function Kind() {
|
|
|
67
62
|
direction: "row",
|
|
68
63
|
align: "center"
|
|
69
64
|
}, darks.map(function (dark) {
|
|
65
|
+
var backgroundFallback = dark ? 'black' : 'white';
|
|
70
66
|
return /*#__PURE__*/React.createElement(Box, {
|
|
71
67
|
key: dark,
|
|
72
68
|
direction: dark ? 'row-reverse' : 'row',
|
|
73
69
|
align: "center",
|
|
74
70
|
gap: "small",
|
|
75
71
|
background: {
|
|
76
|
-
color: 'background',
|
|
72
|
+
color: theme.global.colors.background ? 'background' : backgroundFallback,
|
|
77
73
|
dark: dark
|
|
78
74
|
},
|
|
79
75
|
pad: "small"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["activeDate", "animate", "bounds", "children", "date", "dates", "daysOfWeek", "disabled", "initialFocus", "fill", "firstDayOfWeek", "header", "locale", "messages", "onReference", "onSelect", "range", "reference", "showAdjacentDays", "size", "timestamp"];
|
|
1
|
+
var _excluded = ["activeDate", "animate", "bounds", "children", "date", "dates", "daysOfWeek", "disabled", "initialFocus", "fill", "firstDayOfWeek", "header", "level", "locale", "messages", "onReference", "onSelect", "range", "reference", "showAdjacentDays", "size", "timestamp"];
|
|
2
2
|
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; }
|
|
3
3
|
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); }
|
|
4
4
|
import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -238,6 +238,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
238
238
|
_ref4$firstDayOfWeek = _ref4.firstDayOfWeek,
|
|
239
239
|
firstDayOfWeek = _ref4$firstDayOfWeek === void 0 ? 0 : _ref4$firstDayOfWeek,
|
|
240
240
|
header = _ref4.header,
|
|
241
|
+
level = _ref4.level,
|
|
241
242
|
_ref4$locale = _ref4.locale,
|
|
242
243
|
locale = _ref4$locale === void 0 ? 'en-US' : _ref4$locale,
|
|
243
244
|
messages = _ref4.messages,
|
|
@@ -529,6 +530,17 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
529
530
|
month: 'long',
|
|
530
531
|
year: 'numeric'
|
|
531
532
|
});
|
|
533
|
+
|
|
534
|
+
// theme.calendar.heading.level should be removed in v3 of grommet
|
|
535
|
+
// theme.calendar[size].title should be used instead
|
|
536
|
+
var headingLevel;
|
|
537
|
+
if (level !== undefined) {
|
|
538
|
+
headingLevel = level;
|
|
539
|
+
} else if (size === 'small') {
|
|
540
|
+
headingLevel = theme.calendar.heading && theme.calendar.heading.level || 4;
|
|
541
|
+
} else {
|
|
542
|
+
headingLevel = (theme.calendar.heading && theme.calendar.heading.level || 4) - 1;
|
|
543
|
+
}
|
|
532
544
|
return /*#__PURE__*/React.createElement(Box, {
|
|
533
545
|
direction: "row",
|
|
534
546
|
justify: "between",
|
|
@@ -538,12 +550,8 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
538
550
|
pad: {
|
|
539
551
|
horizontal: headingPadMap[size] || 'small'
|
|
540
552
|
}
|
|
541
|
-
}, (_theme$calendar$size = theme.calendar[size]) != null && _theme$calendar$size.title ? /*#__PURE__*/React.createElement(Text, theme.calendar[size].title, monthAndYear) :
|
|
542
|
-
|
|
543
|
-
// theme.calendar.heading.level should be removed in v3 of grommet
|
|
544
|
-
// theme.calendar[size].title should be used instead
|
|
545
|
-
React.createElement(Heading, {
|
|
546
|
-
level: size === 'small' ? theme.calendar.heading && theme.calendar.heading.level || 4 : (theme.calendar.heading && theme.calendar.heading.level || 4) - 1,
|
|
553
|
+
}, (_theme$calendar$size = theme.calendar[size]) != null && _theme$calendar$size.title ? /*#__PURE__*/React.createElement(Text, theme.calendar[size].title, monthAndYear) : /*#__PURE__*/React.createElement(Heading, {
|
|
554
|
+
level: headingLevel,
|
|
547
555
|
size: size,
|
|
548
556
|
margin: "none",
|
|
549
557
|
overflowWrap: "normal"
|
|
@@ -599,7 +607,6 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
599
607
|
sizeProp: size,
|
|
600
608
|
fillContainer: fill
|
|
601
609
|
}, /*#__PURE__*/React.createElement(StyledDay, {
|
|
602
|
-
otherMonth: true,
|
|
603
610
|
sizeProp: size,
|
|
604
611
|
fillContainer: fill
|
|
605
612
|
}, day.toLocaleDateString(locale, {
|
|
@@ -151,18 +151,19 @@ var dayFontStyle = function dayFontStyle(props) {
|
|
|
151
151
|
var StyledDay = styled.div.withConfig(styledComponentsConfig).withConfig({
|
|
152
152
|
displayName: "StyledCalendar__StyledDay",
|
|
153
153
|
componentId: "sc-1y4xhmp-5"
|
|
154
|
-
})(["display:flex;justify-content:center;align-items:center;", "
|
|
154
|
+
})(["display:flex;justify-content:center;align-items:center;color:", ";", " ", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
155
|
+
var _props$theme$calendar24;
|
|
156
|
+
return normalizeColor(props.otherMonth ? ((_props$theme$calendar24 = props.theme.calendar) == null || (_props$theme$calendar24 = _props$theme$calendar24.day) == null || (_props$theme$calendar24 = _props$theme$calendar24.adjacent) == null ? void 0 : _props$theme$calendar24.color) || 'text-xweak' : 'text-strong', props.theme);
|
|
157
|
+
}, function (props) {
|
|
155
158
|
return daySizeStyle(props);
|
|
156
159
|
}, function (props) {
|
|
157
160
|
return dayStyle(props);
|
|
158
|
-
}, function (props) {
|
|
159
|
-
return props.otherMonth && 'opacity: 0.5;';
|
|
160
161
|
}, function (props) {
|
|
161
162
|
return dayFontStyle(props);
|
|
162
163
|
}, function (props) {
|
|
163
|
-
var _props$theme$
|
|
164
|
+
var _props$theme$calendar25, _props$theme$calendar26;
|
|
164
165
|
// fallback to medium if no size-specific styles
|
|
165
|
-
var round = ((_props$theme$
|
|
166
|
+
var round = ((_props$theme$calendar25 = props.theme.calendar) == null || (_props$theme$calendar25 = _props$theme$calendar25[props.sizeProp]) == null || (_props$theme$calendar25 = _props$theme$calendar25.day) == null ? void 0 : _props$theme$calendar25.round) || ((_props$theme$calendar26 = props.theme.calendar) == null || (_props$theme$calendar26 = _props$theme$calendar26.medium) == null || (_props$theme$calendar26 = _props$theme$calendar26.day) == null ? void 0 : _props$theme$calendar26.round);
|
|
166
167
|
return round && roundStyle(round, props.responsive, props.theme);
|
|
167
168
|
}, function (props) {
|
|
168
169
|
return props.active && activeStyle;
|
|
@@ -39,6 +39,7 @@ export interface CalendarProps {
|
|
|
39
39
|
fill?: boolean;
|
|
40
40
|
firstDayOfWeek?: 0 | 1;
|
|
41
41
|
header?: (args: CalendarHeaderProps) => React.ReactNode;
|
|
42
|
+
level?: '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;
|
|
42
43
|
locale?: string;
|
|
43
44
|
messages?: {
|
|
44
45
|
previous?: string;
|
|
@@ -15,6 +15,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
15
15
|
fill: PropTypes.bool,
|
|
16
16
|
firstDayOfWeek: PropTypes.oneOf([0, 1]),
|
|
17
17
|
header: PropTypes.func,
|
|
18
|
+
level: PropTypes.oneOf([1, 2, 3, 4, 5, 6, '1', '2', '3', '4', '5', '6']),
|
|
18
19
|
locale: PropTypes.string,
|
|
19
20
|
messages: PropTypes.shape({
|
|
20
21
|
previous: PropTypes.string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Calendar, Text } from 'grommet';
|
|
2
|
+
import { Box, Calendar, Main, Text } from 'grommet';
|
|
3
3
|
|
|
4
4
|
// DSTCalendar has dates specifically chosen to identify issues with
|
|
5
5
|
// crossing the daylight savings time boundary (from California).
|
|
@@ -8,7 +8,7 @@ export var DSTCalendar = function DSTCalendar() {
|
|
|
8
8
|
/*#__PURE__*/
|
|
9
9
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
10
10
|
// <Grommet theme={...}>
|
|
11
|
-
React.createElement(
|
|
11
|
+
React.createElement(Main, {
|
|
12
12
|
align: "center",
|
|
13
13
|
pad: "large",
|
|
14
14
|
direction: "row",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box, Calendar } from 'grommet';
|
|
3
|
+
export var HeaderLevel = function HeaderLevel() {
|
|
4
|
+
var _useState = useState(),
|
|
5
|
+
date = _useState[0],
|
|
6
|
+
setDate = _useState[1];
|
|
7
|
+
var onSelect = function onSelect(nextDate) {
|
|
8
|
+
setDate(nextDate !== date ? nextDate : undefined);
|
|
9
|
+
};
|
|
10
|
+
return (
|
|
11
|
+
/*#__PURE__*/
|
|
12
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
13
|
+
// <Grommet theme={...}>
|
|
14
|
+
React.createElement(Box, null, /*#__PURE__*/React.createElement(Box, {
|
|
15
|
+
align: "center",
|
|
16
|
+
pad: "large"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Calendar, {
|
|
18
|
+
date: date,
|
|
19
|
+
daysOfWeek: true,
|
|
20
|
+
onSelect: onSelect,
|
|
21
|
+
level: 2,
|
|
22
|
+
bounds: ['2020-09-08', '2025-12-13']
|
|
23
|
+
})))
|
|
24
|
+
// </Grommet>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
HeaderLevel.storyName = 'Heading level';
|
|
28
|
+
export default {
|
|
29
|
+
title: 'Visualizations/Calendar/Heading level'
|
|
30
|
+
};
|
|
@@ -3,6 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Calendar, Grid, Text } from 'grommet';
|
|
5
5
|
import { Box } from '../../Box';
|
|
6
|
+
import { Main } from '../../Main';
|
|
6
7
|
var Container = function Container(_ref) {
|
|
7
8
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
8
9
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
@@ -23,7 +24,7 @@ export var ShowAdjacent = function ShowAdjacent() {
|
|
|
23
24
|
/*#__PURE__*/
|
|
24
25
|
// Uncomment <Grommet> lines when using outside of storybook
|
|
25
26
|
// <Grommet theme={...}>
|
|
26
|
-
React.createElement(Grid, {
|
|
27
|
+
React.createElement(Main, null, /*#__PURE__*/React.createElement(Grid, {
|
|
27
28
|
columns: {
|
|
28
29
|
count: 'fit',
|
|
29
30
|
size: ['small', 'auto']
|
|
@@ -52,7 +53,7 @@ export var ShowAdjacent = function ShowAdjacent() {
|
|
|
52
53
|
size: "small",
|
|
53
54
|
bounds: ['2018-09-08', '2020-12-13'],
|
|
54
55
|
showAdjacentDays: "trim"
|
|
55
|
-
})))
|
|
56
|
+
}))))
|
|
56
57
|
// </Grommet>
|
|
57
58
|
);
|
|
58
59
|
};
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { Bluetooth as Memory } from "grommet-icons/es6/icons/Bluetooth";
|
|
6
6
|
import { Storage } from "grommet-icons/es6/icons/Storage";
|
|
7
7
|
import { Trigger } from "grommet-icons/es6/icons/Trigger";
|
|
8
|
-
import { Box, Card, CardBody, CardFooter, Chart, Grid, Grommet, Text } from 'grommet';
|
|
8
|
+
import { Box, Card, CardBody, CardFooter, Chart, Grid, Grommet, Text, Main } from 'grommet';
|
|
9
9
|
var theme = {
|
|
10
10
|
themeMode: 'dark',
|
|
11
11
|
global: {
|
|
@@ -127,7 +127,7 @@ export var Clickable = function Clickable() {
|
|
|
127
127
|
return /*#__PURE__*/React.createElement(Grommet, {
|
|
128
128
|
theme: theme,
|
|
129
129
|
full: true
|
|
130
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
130
|
+
}, /*#__PURE__*/React.createElement(Main, null, /*#__PURE__*/React.createElement(Box, {
|
|
131
131
|
pad: "large",
|
|
132
132
|
height: "100%"
|
|
133
133
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
@@ -159,7 +159,7 @@ export var Clickable = function Clickable() {
|
|
|
159
159
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
160
160
|
size: "xsmall"
|
|
161
161
|
}, value.message)));
|
|
162
|
-
}))));
|
|
162
|
+
})))));
|
|
163
163
|
};
|
|
164
164
|
Clickable.parameters = {
|
|
165
165
|
chromatic: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Avatar, Box, Card, Heading, CardBody, CardHeader, Grid, Grommet, Text, Image, Stack } from 'grommet';
|
|
2
|
+
import { Avatar, Box, Card, Heading, CardBody, CardHeader, Grid, Grommet, Main, Text, Image, Stack } from 'grommet';
|
|
3
3
|
var theme = {
|
|
4
4
|
global: {
|
|
5
5
|
font: {
|
|
@@ -37,7 +37,7 @@ export var Stacked = function Stacked() {
|
|
|
37
37
|
var avatarSrc = '//s.gravatar.com/avatar/b7fb138d53ba0f573212ccce38a7c43b?s=80';
|
|
38
38
|
return /*#__PURE__*/React.createElement(Grommet, {
|
|
39
39
|
theme: theme
|
|
40
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Main, null, /*#__PURE__*/React.createElement(Box, {
|
|
41
41
|
pad: "large"
|
|
42
42
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
43
43
|
gap: "large",
|
|
@@ -77,7 +77,7 @@ export var Stacked = function Stacked() {
|
|
|
77
77
|
}, item.location), /*#__PURE__*/React.createElement(Text, {
|
|
78
78
|
size: "small"
|
|
79
79
|
}, item.state)))));
|
|
80
|
-
}))));
|
|
80
|
+
})))));
|
|
81
81
|
};
|
|
82
82
|
export default {
|
|
83
83
|
title: 'Layout/Card/Custom Themed/Stacked'
|
|
@@ -8,7 +8,7 @@ import { ShieldSecurity } from "grommet-icons/es6/icons/ShieldSecurity";
|
|
|
8
8
|
import { Tasks } from "grommet-icons/es6/icons/Tasks";
|
|
9
9
|
import { User } from "grommet-icons/es6/icons/User";
|
|
10
10
|
import { Wifi } from "grommet-icons/es6/icons/Wifi";
|
|
11
|
-
import { Box, Card, CardBody, CardFooter, Grid, Grommet, Text } from 'grommet';
|
|
11
|
+
import { Box, Card, CardBody, CardFooter, Grid, Grommet, Main, Text } from 'grommet';
|
|
12
12
|
var data = [{
|
|
13
13
|
color: 'blue',
|
|
14
14
|
icon: /*#__PURE__*/React.createElement(Wifi, {
|
|
@@ -67,8 +67,8 @@ var theme = {
|
|
|
67
67
|
blue: '#00C8FF',
|
|
68
68
|
green: '#17EBA0',
|
|
69
69
|
teal: '#82FFF2',
|
|
70
|
-
purple: '#
|
|
71
|
-
red: '#
|
|
70
|
+
purple: '#e8c3f7',
|
|
71
|
+
red: '#f5afab',
|
|
72
72
|
orange: '#FFBC44',
|
|
73
73
|
yellow: '#FFEB59'
|
|
74
74
|
}
|
|
@@ -103,7 +103,7 @@ export var Themed = function Themed() {
|
|
|
103
103
|
return /*#__PURE__*/React.createElement(Grommet, {
|
|
104
104
|
theme: theme,
|
|
105
105
|
full: true
|
|
106
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
106
|
+
}, /*#__PURE__*/React.createElement(Main, null, /*#__PURE__*/React.createElement(Box, {
|
|
107
107
|
pad: "large"
|
|
108
108
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
109
109
|
gap: "medium",
|
|
@@ -132,7 +132,7 @@ export var Themed = function Themed() {
|
|
|
132
132
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
133
133
|
size: "xsmall"
|
|
134
134
|
}, value.message)));
|
|
135
|
-
}))));
|
|
135
|
+
})))));
|
|
136
136
|
};
|
|
137
137
|
export default {
|
|
138
138
|
title: 'Layout/Card/Custom Themed/Themed'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Card, CardBody, CardFooter, Grid, Heading } from 'grommet';
|
|
2
|
+
import { Card, CardBody, CardFooter, Grid, Heading, Main } from 'grommet';
|
|
3
3
|
import { Cards } from '../Cards';
|
|
4
4
|
var data = [{
|
|
5
5
|
city: 'Boise',
|
|
@@ -18,7 +18,7 @@ var data = [{
|
|
|
18
18
|
state: 'California'
|
|
19
19
|
}];
|
|
20
20
|
export var Children = function Children() {
|
|
21
|
-
return /*#__PURE__*/React.createElement(Grid, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Main, null, /*#__PURE__*/React.createElement(Grid, {
|
|
22
22
|
pad: "large",
|
|
23
23
|
columns: [['medium', 'large']],
|
|
24
24
|
justifyContent: "center"
|
|
@@ -35,7 +35,7 @@ export var Children = function Children() {
|
|
|
35
35
|
size: "small",
|
|
36
36
|
margin: "none"
|
|
37
37
|
}, datum.city)), /*#__PURE__*/React.createElement(CardFooter, null, datum.state));
|
|
38
|
-
}));
|
|
38
|
+
})));
|
|
39
39
|
};
|
|
40
40
|
export default {
|
|
41
41
|
title: 'Visualizations/Cards/Children'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
import React, { Fragment, useCallback, useContext,
|
|
2
|
+
import React, { Fragment, useCallback, useContext, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { AnnounceContext } from '../../contexts';
|
|
4
|
+
import { AnnounceContext } from '../../contexts/AnnounceContext';
|
|
5
|
+
import { MessageContext } from '../../contexts/MessageContext';
|
|
5
6
|
import { Box } from '../Box';
|
|
6
7
|
import { Drop } from '../Drop';
|
|
7
8
|
import { Grid } from '../Grid';
|
|
@@ -25,6 +26,8 @@ var Detail = function Detail(_ref) {
|
|
|
25
26
|
renderValue = _ref.renderValue,
|
|
26
27
|
thickness = _ref.thickness;
|
|
27
28
|
var announce = useContext(AnnounceContext);
|
|
29
|
+
var _useContext = useContext(MessageContext),
|
|
30
|
+
format = _useContext.format;
|
|
28
31
|
var _useThemeValue = useThemeValue(),
|
|
29
32
|
theme = _useThemeValue.theme;
|
|
30
33
|
var _useState = useState(),
|
|
@@ -73,30 +76,48 @@ var Detail = function Detail(_ref) {
|
|
|
73
76
|
};
|
|
74
77
|
return res;
|
|
75
78
|
}, [data.length, detailIndex, horizontalProp]);
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
var _data$
|
|
79
|
+
var getContent = useCallback(function (index) {
|
|
80
|
+
if (index !== undefined) {
|
|
81
|
+
return series.filter(function (_ref2) {
|
|
82
|
+
var _data$index;
|
|
80
83
|
var property = _ref2.property;
|
|
81
|
-
return (!activeProperty || activeProperty === property) && (data == null || (_data$
|
|
84
|
+
return (!activeProperty || activeProperty === property) && (data == null || (_data$index = data[index]) == null ? void 0 : _data$index[property]) !== undefined || axis && axis.x && axis.x.property === property;
|
|
82
85
|
}).map(function (serie) {
|
|
83
|
-
var axisValue = horizontalProp ? data[
|
|
84
|
-
return (serie.label || serie.property) + " " + renderValue(serie, axisValue);
|
|
86
|
+
var axisValue = horizontalProp ? data[index][serie.property] : index;
|
|
87
|
+
return (serie.label || serie.property) + " " + renderValue(serie, axisValue) + ".";
|
|
85
88
|
}).join(' ');
|
|
86
|
-
announce(content);
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
return undefined;
|
|
91
|
+
}, [activeProperty, axis, data, horizontalProp, renderValue, series]);
|
|
89
92
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Keyboard, {
|
|
90
|
-
onLeft: function onLeft() {
|
|
91
|
-
|
|
93
|
+
onLeft: function onLeft(event) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
if (detailIndex === undefined) {
|
|
96
|
+
setDetailIndex(data.length - 1);
|
|
97
|
+
announce(getContent(data.length - 1), 'assertive');
|
|
98
|
+
} else if (detailIndex > 0) {
|
|
99
|
+
setDetailIndex(detailIndex - 1);
|
|
100
|
+
announce(getContent(detailIndex - 1), 'assertive');
|
|
101
|
+
}
|
|
92
102
|
},
|
|
93
|
-
onRight: function onRight() {
|
|
94
|
-
|
|
103
|
+
onRight: function onRight(event) {
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
if (detailIndex === undefined) {
|
|
106
|
+
setDetailIndex(0);
|
|
107
|
+
announce(getContent(0), 'assertive');
|
|
108
|
+
} else if (detailIndex < data.length - 1) {
|
|
109
|
+
setDetailIndex(detailIndex + 1);
|
|
110
|
+
announce(getContent(detailIndex + 1), 'assertive');
|
|
111
|
+
}
|
|
95
112
|
}
|
|
96
113
|
}, /*#__PURE__*/React.createElement(DetailControl, _extends({
|
|
97
114
|
key: "band",
|
|
98
|
-
tabIndex: 0,
|
|
99
115
|
fill: true,
|
|
116
|
+
role: "list",
|
|
117
|
+
tabIndex: 0,
|
|
118
|
+
"aria-label": format({
|
|
119
|
+
id: 'dataChart.detailTitle'
|
|
120
|
+
}),
|
|
100
121
|
justify: "between",
|
|
101
122
|
responsive: false
|
|
102
123
|
}, horizontalProp ? {
|
|
@@ -105,7 +126,11 @@ var Detail = function Detail(_ref) {
|
|
|
105
126
|
direction: 'row',
|
|
106
127
|
pad: pad
|
|
107
128
|
}, {
|
|
108
|
-
onFocus: function onFocus() {
|
|
129
|
+
onFocus: function onFocus() {
|
|
130
|
+
announce(format({
|
|
131
|
+
id: 'dataChart.detailFocus'
|
|
132
|
+
}));
|
|
133
|
+
},
|
|
109
134
|
onBlur: function onBlur() {
|
|
110
135
|
return setDetailIndex(undefined);
|
|
111
136
|
}
|
|
@@ -117,6 +142,7 @@ var Detail = function Detail(_ref) {
|
|
|
117
142
|
// eslint-disable-next-line react/no-array-index-key
|
|
118
143
|
, _extends({
|
|
119
144
|
key: i,
|
|
145
|
+
role: "listitem",
|
|
120
146
|
responsive: false
|
|
121
147
|
}, horizontalProp ? {
|
|
122
148
|
justify: 'center',
|
|
@@ -128,15 +154,18 @@ var Detail = function Detail(_ref) {
|
|
|
128
154
|
onMouseOver: function onMouseOver(event) {
|
|
129
155
|
activeIndex.current = event.currentTarget;
|
|
130
156
|
setDetailIndex(i);
|
|
157
|
+
announce(getContent(i), 'assertive');
|
|
131
158
|
},
|
|
132
159
|
onMouseLeave: onMouseLeave,
|
|
133
160
|
onFocus: function onFocus() {},
|
|
134
161
|
onBlur: function onBlur() {}
|
|
135
|
-
}), /*#__PURE__*/React.createElement(Box
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
162
|
+
}), /*#__PURE__*/React.createElement(Box, _extends({
|
|
163
|
+
role: "img",
|
|
164
|
+
"aria-label": getContent(i)
|
|
165
|
+
// for horizontal, ref will be placed on child box so
|
|
166
|
+
// drop is restricted to drop dimensions as opposed
|
|
167
|
+
// to filling the chart width
|
|
168
|
+
}, horizontalProp ? {
|
|
140
169
|
fill: 'horizontal'
|
|
141
170
|
} : {
|
|
142
171
|
ref: ref,
|
|
@@ -152,7 +181,8 @@ var Detail = function Detail(_ref) {
|
|
|
152
181
|
target: detailRefs[detailIndex],
|
|
153
182
|
align: dropAlign,
|
|
154
183
|
plain: true,
|
|
155
|
-
onMouseLeave: onMouseLeave
|
|
184
|
+
onMouseLeave: onMouseLeave,
|
|
185
|
+
trapFocus: false
|
|
156
186
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
157
187
|
pad: "small",
|
|
158
188
|
background: {
|
|
@@ -163,9 +193,9 @@ var Detail = function Detail(_ref) {
|
|
|
163
193
|
gap: "xsmall",
|
|
164
194
|
align: "center"
|
|
165
195
|
}, series.filter(function (_ref3) {
|
|
166
|
-
var _data$
|
|
196
|
+
var _data$detailIndex;
|
|
167
197
|
var property = _ref3.property;
|
|
168
|
-
return (!activeProperty || activeProperty === property) && (data == null || (_data$
|
|
198
|
+
return (!activeProperty || activeProperty === property) && (data == null || (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;
|
|
169
199
|
}).map(function (serie) {
|
|
170
200
|
var propertyStyle = seriesStyles[serie.property];
|
|
171
201
|
var axisValue = horizontalProp ? data[detailIndex][serie.property] : detailIndex;
|
|
@@ -57,6 +57,7 @@ var Legend = function Legend(_ref) {
|
|
|
57
57
|
content = /*#__PURE__*/React.createElement(Button, {
|
|
58
58
|
key: property,
|
|
59
59
|
active: isActive,
|
|
60
|
+
"aria-pressed": isActive ? 'true' : 'false',
|
|
60
61
|
onClick: function onClick() {
|
|
61
62
|
return setActiveProperty(isActive ? undefined : property);
|
|
62
63
|
},
|