@automattic/vip-design-system 0.9.3 → 0.9.6
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/.github/workflows/nodejs.yaml +1 -1
- package/build/system/Avatar/Avatar.stories.js +23 -8
- package/build/system/Badge/Badge.stories.js +25 -8
- package/build/system/BlankState/BlankState.stories.js +27 -11
- package/build/system/Box/Box.stories.js +25 -8
- package/build/system/Button/Button.stories.js +36 -23
- package/build/system/Card/Card.stories.js +25 -8
- package/build/system/Code/Code.stories.js +25 -8
- package/build/system/ConfirmationDialog/ConfirmationDialog.stories.js +45 -22
- package/build/system/Dialog/Dialog.stories.js +71 -31
- package/build/system/Flex/Flex.stories.js +25 -8
- package/build/system/Form/AsyncSearchSelect.js +38 -0
- package/build/system/Form/Input.stories.js +23 -8
- package/build/system/Form/SearchSelect.js +47 -11
- package/build/system/Form/Select.js +21 -2
- package/build/system/Form/Select.stories.js +108 -78
- package/build/system/Form/Select.test.js +52 -0
- package/build/system/Grid/Grid.stories.js +25 -8
- package/build/system/Heading/Heading.stories.js +43 -20
- package/build/system/Link/Link.stories.js +26 -10
- package/build/system/Notice/Notice.stories.js +47 -81
- package/build/system/Notification/Notification.stories.js +23 -8
- package/build/system/OptionRow/OptionRow.stories.js +36 -20
- package/build/system/Progress/Progress.stories.js +23 -8
- package/build/system/Spinner/Spinner.stories.js +23 -8
- package/build/system/Table/Table.stories.js +64 -42
- package/build/system/Tabs/Tabs.stories.js +32 -10
- package/build/system/Text/Text.stories.js +25 -8
- package/build/system/Timeline/Timeline.js +70 -0
- package/build/system/Timeline/Timeline.stories.js +44 -21
- package/build/system/Timeline/index.js +2 -66
- package/build/system/Tooltip/Tooltip.stories.js +41 -19
- package/build/system/Wizard/Wizard.stories.js +65 -37
- package/build/system/theme/index.js +1 -1
- package/package.json +3 -2
- package/src/system/Form/AsyncSearchSelect.js +29 -0
- package/src/system/Form/SearchSelect.js +43 -3
- package/src/system/Form/Select.js +15 -2
- package/src/system/Form/Select.stories.js +30 -0
- package/src/system/Form/Select.test.js +37 -0
- package/src/system/Timeline/Timeline.js +46 -0
- package/src/system/Timeline/Timeline.stories.js +34 -0
- package/src/system/Timeline/index.js +2 -41
- package/src/system/theme/index.js +1 -1
- package/build/system/UsageChart/UsageChart.stories.js +0 -20
|
@@ -14,8 +14,9 @@ var _ = require("..");
|
|
|
14
14
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
15
15
|
|
|
16
16
|
var _excluded = ["label", "isSelected"],
|
|
17
|
-
_excluded2 = ["
|
|
18
|
-
_excluded3 = ["
|
|
17
|
+
_excluded2 = ["innerProps", "isFocused", "isDisabled", "clearValue", "cx", "getStyles", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectProps", "setValue", "selectOption", "theme"],
|
|
18
|
+
_excluded3 = ["ref"],
|
|
19
|
+
_excluded4 = ["innerProps"];
|
|
19
20
|
|
|
20
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
22
|
|
|
@@ -27,6 +28,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
27
28
|
|
|
28
29
|
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; }
|
|
29
30
|
|
|
31
|
+
// Option component
|
|
30
32
|
var Option = function Option(_ref) {
|
|
31
33
|
var label = _ref.label,
|
|
32
34
|
isSelected = _ref.isSelected,
|
|
@@ -65,9 +67,26 @@ exports.Option = Option;
|
|
|
65
67
|
Option.propTypes = {
|
|
66
68
|
label: _propTypes["default"].string,
|
|
67
69
|
isSelected: _propTypes["default"].bool
|
|
68
|
-
};
|
|
70
|
+
}; // DropdownIndicator component
|
|
71
|
+
|
|
72
|
+
var DropdownIndicator = function DropdownIndicator(_ref2) {
|
|
73
|
+
var innerProps = _ref2.innerProps,
|
|
74
|
+
isFocused = _ref2.isFocused,
|
|
75
|
+
isDisabled = _ref2.isDisabled,
|
|
76
|
+
clearValue = _ref2.clearValue,
|
|
77
|
+
cx = _ref2.cx,
|
|
78
|
+
getStyles = _ref2.getStyles,
|
|
79
|
+
getValue = _ref2.getValue,
|
|
80
|
+
hasValue = _ref2.hasValue,
|
|
81
|
+
isMulti = _ref2.isMulti,
|
|
82
|
+
isRtl = _ref2.isRtl,
|
|
83
|
+
options = _ref2.options,
|
|
84
|
+
selectProps = _ref2.selectProps,
|
|
85
|
+
setValue = _ref2.setValue,
|
|
86
|
+
selectOption = _ref2.selectOption,
|
|
87
|
+
theme = _ref2.theme,
|
|
88
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
69
89
|
|
|
70
|
-
var DropdownIndicator = function DropdownIndicator(props) {
|
|
71
90
|
return (0, _jsxRuntime.jsx)(_md.MdExpandMore, _extends({}, props, {
|
|
72
91
|
sx: {
|
|
73
92
|
color: 'text',
|
|
@@ -77,12 +96,29 @@ var DropdownIndicator = function DropdownIndicator(props) {
|
|
|
77
96
|
};
|
|
78
97
|
|
|
79
98
|
exports.DropdownIndicator = DropdownIndicator;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
99
|
+
DropdownIndicator.propTypes = {
|
|
100
|
+
innerProps: _propTypes["default"].object,
|
|
101
|
+
isFocused: _propTypes["default"].bool,
|
|
102
|
+
isDisabled: _propTypes["default"].bool,
|
|
103
|
+
clearValue: _propTypes["default"].func,
|
|
104
|
+
cx: _propTypes["default"].func,
|
|
105
|
+
getStyles: _propTypes["default"].func,
|
|
106
|
+
getValue: _propTypes["default"].func,
|
|
107
|
+
hasValue: _propTypes["default"].bool,
|
|
108
|
+
isMulti: _propTypes["default"].bool,
|
|
109
|
+
isRtl: _propTypes["default"].bool,
|
|
110
|
+
options: _propTypes["default"].array,
|
|
111
|
+
selectProps: _propTypes["default"].object,
|
|
112
|
+
setValue: _propTypes["default"].func,
|
|
113
|
+
selectOption: _propTypes["default"].func,
|
|
114
|
+
theme: _propTypes["default"].object
|
|
115
|
+
}; // ClearIndicator component
|
|
116
|
+
|
|
117
|
+
var ClearIndicator = function ClearIndicator(_ref3) {
|
|
118
|
+
var _ref3$innerProps = _ref3.innerProps,
|
|
119
|
+
ref = _ref3$innerProps.ref,
|
|
120
|
+
restInnerProps = _objectWithoutPropertiesLoose(_ref3$innerProps, _excluded3),
|
|
121
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded4);
|
|
86
122
|
|
|
87
123
|
return (0, _jsxRuntime.jsx)(_md.MdClose, _extends({
|
|
88
124
|
ref: ref
|
|
@@ -96,7 +132,7 @@ var ClearIndicator = function ClearIndicator(_ref2) {
|
|
|
96
132
|
|
|
97
133
|
ClearIndicator.propTypes = {
|
|
98
134
|
innerProps: _propTypes["default"].object
|
|
99
|
-
};
|
|
135
|
+
}; // Parent SearchSelect component
|
|
100
136
|
|
|
101
137
|
var SearchSelect = function SearchSelect(props) {
|
|
102
138
|
return (0, _jsxRuntime.jsx)(_reactSelect["default"], _extends({}, props, {
|
|
@@ -11,9 +11,11 @@ var _SearchSelect = require("./SearchSelect");
|
|
|
11
11
|
|
|
12
12
|
var _InlineSelect = require("./InlineSelect");
|
|
13
13
|
|
|
14
|
+
var _AsyncSearchSelect = require("./AsyncSearchSelect");
|
|
15
|
+
|
|
14
16
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
15
17
|
|
|
16
|
-
var _excluded = ["isMulti", "isInline", "options", "label", "isSearch", "usePortal"];
|
|
18
|
+
var _excluded = ["isMulti", "isInline", "isAsync", "options", "label", "isSearch", "usePortal"];
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
@@ -25,12 +27,15 @@ var Select = function Select(_ref) {
|
|
|
25
27
|
var _ref$isMulti = _ref.isMulti,
|
|
26
28
|
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
27
29
|
isInline = _ref.isInline,
|
|
30
|
+
isAsync = _ref.isAsync,
|
|
28
31
|
options = _ref.options,
|
|
29
32
|
label = _ref.label,
|
|
30
33
|
isSearch = _ref.isSearch,
|
|
31
34
|
usePortal = _ref.usePortal,
|
|
32
35
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
33
36
|
|
|
37
|
+
var Component;
|
|
38
|
+
|
|
34
39
|
var selectRef = _react["default"].useRef();
|
|
35
40
|
|
|
36
41
|
var portalProps = {};
|
|
@@ -48,7 +53,20 @@ var Select = function Select(_ref) {
|
|
|
48
53
|
};
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
switch (true) {
|
|
57
|
+
case isInline:
|
|
58
|
+
Component = _InlineSelect.InlineSelect;
|
|
59
|
+
break;
|
|
60
|
+
|
|
61
|
+
case isAsync:
|
|
62
|
+
Component = _AsyncSearchSelect.AsyncSearchSelect;
|
|
63
|
+
break;
|
|
64
|
+
|
|
65
|
+
default:
|
|
66
|
+
Component = _SearchSelect.SearchSelect;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
52
70
|
return (0, _jsxRuntime.jsx)("div", {
|
|
53
71
|
ref: selectRef,
|
|
54
72
|
children: (0, _jsxRuntime.jsx)(Component, _extends({
|
|
@@ -63,6 +81,7 @@ exports.Select = Select;
|
|
|
63
81
|
Select.propTypes = {
|
|
64
82
|
isInline: _propTypes["default"].bool,
|
|
65
83
|
isMulti: _propTypes["default"].bool,
|
|
84
|
+
isAsync: _propTypes["default"].bool,
|
|
66
85
|
isSearch: _propTypes["default"].bool,
|
|
67
86
|
label: _propTypes["default"].string,
|
|
68
87
|
options: _propTypes["default"].array,
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.DropdownMenu = exports.Inline = exports.Single = exports.Multi = exports["default"] = void 0;
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
var _ = require("..");
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
10
11
|
|
|
11
|
-
function
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* External dependencies
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
* Internal dependencies
|
|
19
22
|
*/
|
|
20
|
-
|
|
21
|
-
import { Box, Dialog, DialogMenu, DialogMenuItem, DialogDivider, Select, Button } from '..';
|
|
22
|
-
export default {
|
|
23
|
+
var _default = {
|
|
23
24
|
title: 'Select',
|
|
24
|
-
component: Dialog
|
|
25
|
+
component: _.Dialog
|
|
25
26
|
};
|
|
27
|
+
exports["default"] = _default;
|
|
26
28
|
var options = [{
|
|
27
29
|
value: 'chocolate',
|
|
28
30
|
label: 'Chocolate'
|
|
@@ -33,88 +35,116 @@ var options = [{
|
|
|
33
35
|
value: 'vanilla',
|
|
34
36
|
label: 'Vanilla'
|
|
35
37
|
}];
|
|
36
|
-
var DropdownContent =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
var DropdownContent = (0, _jsxRuntime.jsxs)("div", {
|
|
39
|
+
children: [(0, _jsxRuntime.jsxs)(_.DialogMenu, {
|
|
40
|
+
children: [(0, _jsxRuntime.jsx)(_.DialogMenuItem, {
|
|
41
|
+
children: "Profile"
|
|
42
|
+
}), (0, _jsxRuntime.jsx)(_.DialogMenuItem, {
|
|
43
|
+
children: "Account"
|
|
44
|
+
}), (0, _jsxRuntime.jsx)(_.DialogMenuItem, {
|
|
45
|
+
children: "Dark Mode"
|
|
46
|
+
})]
|
|
47
|
+
}), (0, _jsxRuntime.jsx)(_.DialogDivider, {}), (0, _jsxRuntime.jsx)(_.DialogMenu, {
|
|
48
|
+
children: (0, _jsxRuntime.jsx)(_.DialogMenuItem, {
|
|
49
|
+
children: "Logout"
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
53
|
+
var DropdownTrigger = (0, _jsxRuntime.jsx)(_.Button, {
|
|
54
|
+
variant: "secondary",
|
|
55
|
+
children: "Trigger Dropdown"
|
|
56
|
+
});
|
|
45
57
|
|
|
46
|
-
|
|
58
|
+
var Multi = function Multi() {
|
|
59
|
+
var _useState = (0, _react.useState)([]),
|
|
60
|
+
value = _useState[0],
|
|
61
|
+
setValue = _useState[1];
|
|
62
|
+
|
|
63
|
+
return (0, _jsxRuntime.jsx)(_.Box, {
|
|
47
64
|
sx: {
|
|
48
65
|
mr: 2,
|
|
49
66
|
width: 400
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
},
|
|
68
|
+
children: (0, _jsxRuntime.jsx)(_.Select, {
|
|
69
|
+
label: "Type",
|
|
70
|
+
value: value,
|
|
71
|
+
isMulti: true,
|
|
72
|
+
placeholder: "Select domains...",
|
|
73
|
+
options: options,
|
|
74
|
+
onChange: function onChange(newValue) {
|
|
75
|
+
return setValue(newValue);
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
});
|
|
61
79
|
};
|
|
62
|
-
export var Single = function Single() {
|
|
63
|
-
var _useState3 = useState([]),
|
|
64
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
-
value = _useState4[0],
|
|
66
|
-
setValue = _useState4[1];
|
|
67
80
|
|
|
68
|
-
|
|
81
|
+
exports.Multi = Multi;
|
|
82
|
+
|
|
83
|
+
var Single = function Single() {
|
|
84
|
+
var _useState2 = (0, _react.useState)([]),
|
|
85
|
+
value = _useState2[0],
|
|
86
|
+
setValue = _useState2[1];
|
|
87
|
+
|
|
88
|
+
return (0, _jsxRuntime.jsx)(_.Box, {
|
|
69
89
|
sx: {
|
|
70
90
|
mr: 2,
|
|
71
91
|
width: 200
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
},
|
|
93
|
+
children: (0, _jsxRuntime.jsx)(_.Select, {
|
|
94
|
+
label: "User",
|
|
95
|
+
value: value,
|
|
96
|
+
placeholder: "Select a domain...",
|
|
97
|
+
options: options,
|
|
98
|
+
onChange: function onChange(newValue) {
|
|
99
|
+
return setValue(newValue);
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
});
|
|
82
103
|
};
|
|
83
|
-
export var Inline = function Inline() {
|
|
84
|
-
var _useState5 = useState([]),
|
|
85
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
86
|
-
value = _useState6[0],
|
|
87
|
-
setValue = _useState6[1];
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
exports.Single = Single;
|
|
106
|
+
|
|
107
|
+
var Inline = function Inline() {
|
|
108
|
+
var _useState3 = (0, _react.useState)([]),
|
|
109
|
+
value = _useState3[0],
|
|
110
|
+
setValue = _useState3[1];
|
|
111
|
+
|
|
112
|
+
return (0, _jsxRuntime.jsx)(_.Box, {
|
|
90
113
|
sx: {
|
|
91
114
|
mr: 2,
|
|
92
115
|
width: 200
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
},
|
|
117
|
+
children: (0, _jsxRuntime.jsx)(_.Select, {
|
|
118
|
+
label: "User",
|
|
119
|
+
value: value,
|
|
120
|
+
isInline: true,
|
|
121
|
+
isMulti: true,
|
|
122
|
+
noneLabel: "Everyone",
|
|
123
|
+
placeholder: "Filter by user...",
|
|
124
|
+
options: options,
|
|
125
|
+
onChange: function onChange(newValue) {
|
|
126
|
+
return setValue(newValue);
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
});
|
|
106
130
|
};
|
|
107
|
-
|
|
108
|
-
|
|
131
|
+
|
|
132
|
+
exports.Inline = Inline;
|
|
133
|
+
|
|
134
|
+
var DropdownMenu = function DropdownMenu() {
|
|
135
|
+
return (0, _jsxRuntime.jsx)(_.Box, {
|
|
109
136
|
sx: {
|
|
110
137
|
mr: 2,
|
|
111
138
|
width: 200
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
139
|
+
},
|
|
140
|
+
children: (0, _jsxRuntime.jsx)(_.Dialog, {
|
|
141
|
+
trigger: DropdownTrigger,
|
|
142
|
+
content: DropdownContent,
|
|
143
|
+
sx: {
|
|
144
|
+
width: 200
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
exports.DropdownMenu = DropdownMenu;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = require("@testing-library/react");
|
|
4
|
+
|
|
5
|
+
var _jestAxe = require("jest-axe");
|
|
6
|
+
|
|
7
|
+
var _Select = require("./Select");
|
|
8
|
+
|
|
9
|
+
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
10
|
+
|
|
11
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
12
|
+
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
+
|
|
15
|
+
describe('<Select />', function () {
|
|
16
|
+
it('renders the Select component with the specified placeholder', function () {
|
|
17
|
+
(0, _react.render)((0, _jsxRuntime.jsx)(_Select.Select, {
|
|
18
|
+
inputId: 'search-select',
|
|
19
|
+
placeholder: 'Search...'
|
|
20
|
+
})); // Can't use `getByPlaceholderText` here since it's not actually being rendered as a placeholder element
|
|
21
|
+
|
|
22
|
+
var placeholder = _react.screen.getByText('Search...');
|
|
23
|
+
|
|
24
|
+
expect(placeholder).toBeInTheDocument();
|
|
25
|
+
});
|
|
26
|
+
it('renders the Select component with accessibility props', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
27
|
+
var _render, container;
|
|
28
|
+
|
|
29
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
|
+
while (1) {
|
|
31
|
+
switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
_render = (0, _react.render)((0, _jsxRuntime.jsx)(_Select.Select, {
|
|
34
|
+
inputId: 'search-select',
|
|
35
|
+
"aria-label": 'Search or select from the dropdown list'
|
|
36
|
+
})), container = _render.container;
|
|
37
|
+
_context.t0 = expect;
|
|
38
|
+
_context.next = 4;
|
|
39
|
+
return (0, _jestAxe.axe)(container);
|
|
40
|
+
|
|
41
|
+
case 4:
|
|
42
|
+
_context.t1 = _context.sent;
|
|
43
|
+
(0, _context.t0)(_context.t1).toHaveNoViolations();
|
|
44
|
+
|
|
45
|
+
case 6:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, _callee);
|
|
51
|
+
})));
|
|
52
|
+
});
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Default = exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _ = require("..");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
1
14
|
/**
|
|
2
15
|
* External dependencies
|
|
3
16
|
*/
|
|
4
|
-
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* Internal dependencies
|
|
7
20
|
*/
|
|
8
|
-
|
|
9
|
-
import { Grid } from '..';
|
|
10
|
-
export default {
|
|
21
|
+
var _default = {
|
|
11
22
|
title: 'Grid',
|
|
12
|
-
component: Grid
|
|
23
|
+
component: _.Grid
|
|
13
24
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
exports["default"] = _default;
|
|
26
|
+
|
|
27
|
+
var Default = function Default() {
|
|
28
|
+
return (0, _jsxRuntime.jsx)(_.Grid, {
|
|
29
|
+
children: "Hello"
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.Default = Default;
|
|
@@ -1,28 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Default = exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _ = require("..");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
1
14
|
/**
|
|
2
15
|
* External dependencies
|
|
3
16
|
*/
|
|
4
|
-
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* Internal dependencies
|
|
7
20
|
*/
|
|
8
|
-
|
|
9
|
-
import { Box, Heading } from '..';
|
|
10
|
-
export default {
|
|
21
|
+
var _default = {
|
|
11
22
|
title: 'Heading',
|
|
12
|
-
component: Heading
|
|
23
|
+
component: _.Heading
|
|
13
24
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
exports["default"] = _default;
|
|
26
|
+
|
|
27
|
+
var Default = function Default() {
|
|
28
|
+
return (0, _jsxRuntime.jsxs)(_.Box, {
|
|
29
|
+
children: [(0, _jsxRuntime.jsx)(_.Heading, {
|
|
30
|
+
variant: "h1",
|
|
31
|
+
children: "Your Applications"
|
|
32
|
+
}), (0, _jsxRuntime.jsx)(_.Heading, {
|
|
33
|
+
variant: "h2",
|
|
34
|
+
children: "Heading Two"
|
|
35
|
+
}), (0, _jsxRuntime.jsx)(_.Heading, {
|
|
36
|
+
variant: "h3",
|
|
37
|
+
children: "Heading Three"
|
|
38
|
+
}), (0, _jsxRuntime.jsx)(_.Heading, {
|
|
39
|
+
variant: "h4",
|
|
40
|
+
children: "Heading Four"
|
|
41
|
+
}), (0, _jsxRuntime.jsx)(_.Heading, {
|
|
42
|
+
variant: "h5",
|
|
43
|
+
children: "Heading Five"
|
|
44
|
+
}), (0, _jsxRuntime.jsx)(_.Heading, {
|
|
45
|
+
variant: "caps",
|
|
46
|
+
children: "Heading Caps"
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.Default = Default;
|
|
@@ -1,19 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.Default = exports["default"] = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _ = require("..");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
1
14
|
/**
|
|
2
15
|
* External dependencies
|
|
3
16
|
*/
|
|
4
|
-
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* Internal dependencies
|
|
7
20
|
*/
|
|
8
|
-
|
|
9
|
-
import { Link } from '..';
|
|
10
|
-
export default {
|
|
21
|
+
var _default = {
|
|
11
22
|
title: 'Link',
|
|
12
|
-
component: Link
|
|
23
|
+
component: _.Link
|
|
13
24
|
};
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
exports["default"] = _default;
|
|
26
|
+
|
|
27
|
+
var Default = function Default() {
|
|
28
|
+
return (0, _jsxRuntime.jsx)(_.Link, {
|
|
16
29
|
as: "a",
|
|
17
|
-
href: "#!"
|
|
18
|
-
|
|
19
|
-
};
|
|
30
|
+
href: "#!",
|
|
31
|
+
children: "Hello"
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.Default = Default;
|