@pingux/astro 2.28.0-alpha.1 → 2.28.0-alpha.11
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/lib/cjs/components/AccordionGroup/AccordionGroup.mdx +2 -0
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +41 -12
- package/lib/cjs/components/AccordionItem/AccordionItem.js +2 -2
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +1 -0
- package/lib/cjs/components/PanelHeader/PanelHeader.stories.js +32 -1
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +1 -0
- package/lib/cjs/recipes/ConditionFilter.stories.js +15 -1
- package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +4 -2
- package/lib/cjs/utils/designUtils/figmaLinks.js +8 -0
- package/lib/components/AccordionGroup/AccordionGroup.mdx +2 -0
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +38 -10
- package/lib/components/AccordionItem/AccordionItem.js +2 -2
- package/lib/components/ComboBox/ComboBoxInput.js +1 -0
- package/lib/components/PanelHeader/PanelHeader.stories.js +31 -0
- package/lib/components/SelectFieldBase/SelectFieldBase.js +1 -0
- package/lib/recipes/ConditionFilter.stories.js +15 -1
- package/lib/recipes/TrialExperienceStatusBar.stories.js +4 -2
- package/lib/utils/designUtils/figmaLinks.js +8 -0
- package/package.json +1 -1
@@ -13,6 +13,8 @@ Accordions should be used:
|
|
13
13
|
|
14
14
|
Accordions should not have focusable items as children.
|
15
15
|
|
16
|
+
AccordianItem labels should not include interactive elements.
|
17
|
+
|
16
18
|
It is built on React Aria [useAccordion](https://reactspectrum.blob.core.windows.net/reactspectrum/d77b35e970e5549f66b47a83f07423f5c93b7297/docs/react-aria/useAccordion.html).
|
17
19
|
|
18
20
|
### Required components
|
@@ -8,7 +8,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
8
8
|
_Object$defineProperty(exports, "__esModule", {
|
9
9
|
value: true
|
10
10
|
});
|
11
|
-
exports["default"] = exports.UncontrolledExpanded = exports.Multiple = exports.
|
11
|
+
exports["default"] = exports.UncontrolledExpanded = exports.Multiple = exports.LabelWithBadge = exports.DisabledState = exports.DifferentLevels = exports.Default = exports.CustomPresentation = exports.ControlledExpanded = void 0;
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
@@ -41,16 +41,16 @@ var itemArray = [{
|
|
41
41
|
}];
|
42
42
|
var itemArrayDisabled = [{
|
43
43
|
key: 't1',
|
44
|
-
label: 'Disabled
|
44
|
+
label: 'Accordion Disabled',
|
45
45
|
children: (0, _react2.jsx)(_index.Text, null, "Hi")
|
46
46
|
}, {
|
47
47
|
key: 't2',
|
48
|
-
label: 'Accordion',
|
49
|
-
children:
|
48
|
+
label: 'Accordion Active',
|
49
|
+
children: (0, _react2.jsx)(_index.Text, null, "Hi")
|
50
50
|
}, {
|
51
51
|
key: 't3',
|
52
|
-
label: 'Disabled
|
53
|
-
children:
|
52
|
+
label: 'Accordion Disabled',
|
53
|
+
children: (0, _react2.jsx)(_index.Text, null, "Hi")
|
54
54
|
}];
|
55
55
|
var _default = {
|
56
56
|
title: 'Components/AccordionGroup',
|
@@ -214,13 +214,13 @@ var UncontrolledExpanded = function UncontrolledExpanded() {
|
|
214
214
|
);
|
215
215
|
};
|
216
216
|
exports.UncontrolledExpanded = UncontrolledExpanded;
|
217
|
-
var
|
217
|
+
var DisabledState = function DisabledState() {
|
218
218
|
return (
|
219
219
|
/*
|
220
220
|
itemArrayDisabled = [
|
221
|
-
{ key: 't1', label: 'Disabled
|
222
|
-
{ key: 't2', label: 'Accordion', children:
|
223
|
-
{ key: 't3', label: 'Disabled
|
221
|
+
{ key: 't1', label: 'Accordion Disabled', children: <Text>Hi</Text> },
|
222
|
+
{ key: 't2', label: 'Accordion Active', children: <Text>Hi</Text> },
|
223
|
+
{ key: 't3', label: 'Accordion Disabled', children: <Text>Hi</Text> },
|
224
224
|
];
|
225
225
|
*/
|
226
226
|
(0, _react2.jsx)(_index.AccordionGroup, {
|
@@ -236,7 +236,13 @@ var DisabledItems = function DisabledItems() {
|
|
236
236
|
})
|
237
237
|
);
|
238
238
|
};
|
239
|
-
exports.
|
239
|
+
exports.DisabledState = DisabledState;
|
240
|
+
DisabledState.parameters = {
|
241
|
+
design: {
|
242
|
+
type: 'figma',
|
243
|
+
url: _figmaLinks.FIGMA_LINKS.accordionGroup.disabledState
|
244
|
+
}
|
245
|
+
};
|
240
246
|
var CustomPresentation = function CustomPresentation() {
|
241
247
|
return (
|
242
248
|
/*
|
@@ -274,4 +280,27 @@ CustomPresentation.parameters = {
|
|
274
280
|
story: 'In addition to customizing the theme, prop objects can be passed to certain elements. This allows for simple customization in a pinch. See the source code below for an example.'
|
275
281
|
}
|
276
282
|
}
|
277
|
-
};
|
283
|
+
};
|
284
|
+
var LabelWithBadge = function LabelWithBadge(args) {
|
285
|
+
return (0, _react2.jsx)(_index.AccordionGroup, (0, _extends2["default"])({}, args, {
|
286
|
+
labelHeadingTag: "h4"
|
287
|
+
}), (0, _react2.jsx)(_reactStately.Item, {
|
288
|
+
key: "accordionKey",
|
289
|
+
textValue: "accordionKey",
|
290
|
+
label: (0, _react2.jsx)(_index.Box, {
|
291
|
+
isRow: true,
|
292
|
+
alignItems: "center"
|
293
|
+
}, "Accordion Label", (0, _react2.jsx)(_index.Box, {
|
294
|
+
isRow: true,
|
295
|
+
gap: "5px",
|
296
|
+
ml: "5px"
|
297
|
+
}, (0, _react2.jsx)(_index.Badge, {
|
298
|
+
label: "Label",
|
299
|
+
sx: {
|
300
|
+
height: '21px'
|
301
|
+
}
|
302
|
+
}))),
|
303
|
+
"data-id": "accordionItem"
|
304
|
+
}, (0, _react2.jsx)(_index.Text, null, "Render me!")));
|
305
|
+
};
|
306
|
+
exports.LabelWithBadge = LabelWithBadge;
|
@@ -82,7 +82,7 @@ var AccordionItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
82
82
|
isPressed: isPressed
|
83
83
|
}),
|
84
84
|
buttonClasses = _useStatusClasses2.classNames;
|
85
|
-
var ariaLabel = props['aria-label']
|
85
|
+
var ariaLabel = props['aria-label'];
|
86
86
|
var isValidHeadingTag = (0, _includes["default"])(validHeadingTags).call(validHeadingTags, labelHeadingTag === null || labelHeadingTag === void 0 ? void 0 : labelHeadingTag.toLowerCase());
|
87
87
|
var validLabelHeadingTag = isValidHeadingTag ? labelHeadingTag === null || labelHeadingTag === void 0 ? void 0 : labelHeadingTag.toLowerCase() : 'span';
|
88
88
|
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -126,7 +126,7 @@ AccordionItem.propTypes = {
|
|
126
126
|
key: _propTypes["default"].string,
|
127
127
|
rendered: _propTypes["default"].node,
|
128
128
|
props: _propTypes["default"].shape({
|
129
|
-
label: _propTypes["default"].
|
129
|
+
label: _propTypes["default"].node,
|
130
130
|
children: _propTypes["default"].node,
|
131
131
|
textValue: _propTypes["default"].string,
|
132
132
|
containerProps: _propTypes["default"].shape({}),
|
@@ -12,6 +12,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon"));
|
13
13
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
14
14
|
var _index = require("../../index");
|
15
|
+
var _figmaLinks = require("../../utils/designUtils/figmaLinks.js");
|
15
16
|
var _images = require("../../utils/devUtils/constants/images");
|
16
17
|
var _listViewItemAttributes = require("../ListViewItem/listViewItemAttributes");
|
17
18
|
var _PanelHeader = _interopRequireDefault(require("./PanelHeader.mdx"));
|
@@ -42,6 +43,12 @@ var Default = function Default(_ref) {
|
|
42
43
|
}));
|
43
44
|
};
|
44
45
|
exports.Default = Default;
|
46
|
+
Default.parameters = {
|
47
|
+
design: {
|
48
|
+
type: 'figma',
|
49
|
+
url: _figmaLinks.FIGMA_LINKS.panelHeader["default"]
|
50
|
+
}
|
51
|
+
};
|
45
52
|
var WithSubtext = function WithSubtext(_ref2) {
|
46
53
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref2), _ref2));
|
47
54
|
return (0, _react2.jsx)(_index.PanelHeader, (0, _extends2["default"])({}, args, {
|
@@ -53,6 +60,12 @@ var WithSubtext = function WithSubtext(_ref2) {
|
|
53
60
|
}));
|
54
61
|
};
|
55
62
|
exports.WithSubtext = WithSubtext;
|
63
|
+
WithSubtext.parameters = {
|
64
|
+
design: {
|
65
|
+
type: 'figma',
|
66
|
+
url: _figmaLinks.FIGMA_LINKS.panelHeader.withSubtext
|
67
|
+
}
|
68
|
+
};
|
56
69
|
var WithControls = function WithControls(_ref3) {
|
57
70
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref3), _ref3));
|
58
71
|
return (0, _react2.jsx)(_index.PanelHeader, (0, _extends2["default"])({}, args, {
|
@@ -70,6 +83,12 @@ var WithControls = function WithControls(_ref3) {
|
|
70
83
|
}, "Delete user")), (0, _react2.jsx)(_index.PanelHeaderCloseButton, null));
|
71
84
|
};
|
72
85
|
exports.WithControls = WithControls;
|
86
|
+
WithControls.parameters = {
|
87
|
+
design: {
|
88
|
+
type: 'figma',
|
89
|
+
url: _figmaLinks.FIGMA_LINKS.panelHeader.withControls
|
90
|
+
}
|
91
|
+
};
|
73
92
|
var WithImage = function WithImage() {
|
74
93
|
return (0, _react2.jsx)(_index.PanelHeader, {
|
75
94
|
data: {
|
@@ -83,6 +102,12 @@ var WithImage = function WithImage() {
|
|
83
102
|
});
|
84
103
|
};
|
85
104
|
exports.WithImage = WithImage;
|
105
|
+
WithImage.parameters = {
|
106
|
+
design: {
|
107
|
+
type: 'figma',
|
108
|
+
url: _figmaLinks.FIGMA_LINKS.panelHeader.withImage
|
109
|
+
}
|
110
|
+
};
|
86
111
|
var WithExtraLongText = function WithExtraLongText(_ref4) {
|
87
112
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref4), _ref4));
|
88
113
|
return (0, _react2.jsx)(_index.PanelHeader, (0, _extends2["default"])({}, args, {
|
@@ -99,4 +124,10 @@ var WithExtraLongText = function WithExtraLongText(_ref4) {
|
|
99
124
|
key: "delete"
|
100
125
|
}, "Delete user")), (0, _react2.jsx)(_index.PanelHeaderCloseButton, null));
|
101
126
|
};
|
102
|
-
exports.WithExtraLongText = WithExtraLongText;
|
127
|
+
exports.WithExtraLongText = WithExtraLongText;
|
128
|
+
WithExtraLongText.parameters = {
|
129
|
+
design: {
|
130
|
+
type: 'figma',
|
131
|
+
url: _figmaLinks.FIGMA_LINKS.panelHeader.withExtraLongText
|
132
|
+
}
|
133
|
+
};
|
@@ -24,7 +24,21 @@ var _react2 = require("@emotion/react");
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
25
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
26
26
|
var _default = {
|
27
|
-
title: 'Recipes/Condition Filter'
|
27
|
+
title: 'Recipes/Condition Filter',
|
28
|
+
parameters: {
|
29
|
+
a11y: {
|
30
|
+
config: {
|
31
|
+
/** The "color-contrast" test ends with an "incomplete" status
|
32
|
+
* since pseudo-element applies to the same container as selected values.
|
33
|
+
* A workaround to disable "color-contrast" incomplete tests.
|
34
|
+
*/
|
35
|
+
rules: [{
|
36
|
+
id: 'color-contrast',
|
37
|
+
enabled: false
|
38
|
+
}]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
28
42
|
};
|
29
43
|
exports["default"] = _default;
|
30
44
|
var borderBox = {
|
@@ -14,6 +14,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/hel
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
16
16
|
var _CheckCircleIcon = _interopRequireDefault(require("@pingux/mdi-react/CheckCircleIcon"));
|
17
|
+
var _uuid = require("uuid");
|
17
18
|
var _index = require("../index");
|
18
19
|
var _figmaLinks = require("../utils/designUtils/figmaLinks.js");
|
19
20
|
var _react2 = require("@emotion/react");
|
@@ -67,13 +68,14 @@ var EarthCircleIcon = function EarthCircleIcon() {
|
|
67
68
|
}));
|
68
69
|
};
|
69
70
|
var RadioButtonIcon = function RadioButtonIcon(props) {
|
71
|
+
var id = (0, _uuid.v4)();
|
70
72
|
return (0, _react2.jsx)("svg", (0, _extends2["default"])({
|
71
73
|
viewBox: "0 0 22 22",
|
72
74
|
fill: "none",
|
73
75
|
xmlns: "http://www.w3.org/2000/svg",
|
74
|
-
"aria-labelledby": "radio-button-icon-title"
|
76
|
+
"aria-labelledby": "radio-button-icon-title-".concat(id)
|
75
77
|
}, props), (0, _react2.jsx)("title", {
|
76
|
-
id: "radio-button-icon-title"
|
78
|
+
id: "radio-button-icon-title-".concat(id)
|
77
79
|
}, "Radio Button Icon"), (0, _react2.jsx)("path", {
|
78
80
|
d: "M11 18.3333C9.05508 18.3333 7.18982 17.5607 5.81455 16.1854C4.43928 14.8102 3.66667 12.9449 3.66667 11C3.66667 9.05507 4.43928 7.18981 5.81455 5.81455C7.18982 4.43928 9.05508 3.66666 11 3.66666C12.9449 3.66666 14.8102 4.43928 16.1854 5.81455C17.5607 7.18981 18.3333 9.05507 18.3333 11C18.3333 12.9449 17.5607 14.8102 16.1854 16.1854C14.8102 17.5607 12.9449 18.3333 11 18.3333ZM11 1.83333C9.79621 1.83333 8.60422 2.07043 7.49207 2.5311C6.37992 2.99177 5.36939 3.66698 4.51819 4.51818C2.7991 6.23727 1.83333 8.56884 1.83333 11C1.83333 13.4311 2.7991 15.7627 4.51819 17.4818C5.36939 18.333 6.37992 19.0082 7.49207 19.4689C8.60422 19.9296 9.79621 20.1667 11 20.1667C13.4311 20.1667 15.7627 19.2009 17.4818 17.4818C19.2009 15.7627 20.1667 13.4311 20.1667 11C20.1667 9.79621 19.9296 8.60421 19.4689 7.49206C19.0082 6.37991 18.333 5.36939 17.4818 4.51818C16.6306 3.66698 15.6201 2.99177 14.5079 2.5311C13.3958 2.07043 12.2038 1.83333 11 1.83333Z",
|
79
81
|
fill: "#B3BEE8"
|
@@ -8,6 +8,7 @@ exports.FIGMA_LINKS = void 0;
|
|
8
8
|
var FIGMA_LINKS = {
|
9
9
|
accordionGroup: {
|
10
10
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=446-1808&t=8Wwd3tIBh3GEjCJB-0',
|
11
|
+
disabledState: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43917%3A31554&mode=dev',
|
11
12
|
differentLevels: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=446%3A1949&mode=dev'
|
12
13
|
},
|
13
14
|
attributeMappings: {
|
@@ -103,6 +104,13 @@ var FIGMA_LINKS = {
|
|
103
104
|
OnewayToBidirectionalArrow: {
|
104
105
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=43504-1214&mode=design&t=R4kdj0liRHxsqbV5-0'
|
105
106
|
},
|
107
|
+
panelHeader: {
|
108
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44688%3A39612&mode=dev',
|
109
|
+
withSubtext: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39651&mode=dev',
|
110
|
+
withControls: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39662&mode=dev',
|
111
|
+
withImage: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39682&mode=dev',
|
112
|
+
withExtraLongText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39713&mode=dev'
|
113
|
+
},
|
106
114
|
popoverMenu: {
|
107
115
|
"default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=0%3A3073&t=We3h7LaaFJQnxdSy-1'
|
108
116
|
},
|
@@ -13,6 +13,8 @@ Accordions should be used:
|
|
13
13
|
|
14
14
|
Accordions should not have focusable items as children.
|
15
15
|
|
16
|
+
AccordianItem labels should not include interactive elements.
|
17
|
+
|
16
18
|
It is built on React Aria [useAccordion](https://reactspectrum.blob.core.windows.net/reactspectrum/d77b35e970e5549f66b47a83f07423f5c93b7297/docs/react-aria/useAccordion.html).
|
17
19
|
|
18
20
|
### Required components
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
4
4
|
import { Item } from 'react-stately';
|
5
5
|
import { withDesign } from 'storybook-addon-designs';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
|
-
import { AccordionGroup, Button, Text, TextField } from '../../index';
|
7
|
+
import { AccordionGroup, Badge, Box, Button, Text, TextField } from '../../index';
|
8
8
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.js';
|
9
9
|
import { validHeadingTags } from '../AccordionItem/AccordionItem';
|
10
10
|
import AccordionReadme from './AccordionGroup.mdx';
|
@@ -28,16 +28,16 @@ var itemArray = [{
|
|
28
28
|
}];
|
29
29
|
var itemArrayDisabled = [{
|
30
30
|
key: 't1',
|
31
|
-
label: 'Disabled
|
31
|
+
label: 'Accordion Disabled',
|
32
32
|
children: ___EmotionJSX(Text, null, "Hi")
|
33
33
|
}, {
|
34
34
|
key: 't2',
|
35
|
-
label: 'Accordion',
|
36
|
-
children:
|
35
|
+
label: 'Accordion Active',
|
36
|
+
children: ___EmotionJSX(Text, null, "Hi")
|
37
37
|
}, {
|
38
38
|
key: 't3',
|
39
|
-
label: 'Disabled
|
40
|
-
children:
|
39
|
+
label: 'Accordion Disabled',
|
40
|
+
children: ___EmotionJSX(Text, null, "Hi")
|
41
41
|
}];
|
42
42
|
export default {
|
43
43
|
title: 'Components/AccordionGroup',
|
@@ -195,13 +195,13 @@ export var UncontrolledExpanded = function UncontrolledExpanded() {
|
|
195
195
|
})
|
196
196
|
);
|
197
197
|
};
|
198
|
-
export var
|
198
|
+
export var DisabledState = function DisabledState() {
|
199
199
|
return (
|
200
200
|
/*
|
201
201
|
itemArrayDisabled = [
|
202
|
-
{ key: 't1', label: 'Disabled
|
203
|
-
{ key: 't2', label: 'Accordion', children:
|
204
|
-
{ key: 't3', label: 'Disabled
|
202
|
+
{ key: 't1', label: 'Accordion Disabled', children: <Text>Hi</Text> },
|
203
|
+
{ key: 't2', label: 'Accordion Active', children: <Text>Hi</Text> },
|
204
|
+
{ key: 't3', label: 'Accordion Disabled', children: <Text>Hi</Text> },
|
205
205
|
];
|
206
206
|
*/
|
207
207
|
___EmotionJSX(AccordionGroup, {
|
@@ -217,6 +217,12 @@ export var DisabledItems = function DisabledItems() {
|
|
217
217
|
})
|
218
218
|
);
|
219
219
|
};
|
220
|
+
DisabledState.parameters = {
|
221
|
+
design: {
|
222
|
+
type: 'figma',
|
223
|
+
url: FIGMA_LINKS.accordionGroup.disabledState
|
224
|
+
}
|
225
|
+
};
|
220
226
|
export var CustomPresentation = function CustomPresentation() {
|
221
227
|
return (
|
222
228
|
/*
|
@@ -253,4 +259,26 @@ CustomPresentation.parameters = {
|
|
253
259
|
story: 'In addition to customizing the theme, prop objects can be passed to certain elements. This allows for simple customization in a pinch. See the source code below for an example.'
|
254
260
|
}
|
255
261
|
}
|
262
|
+
};
|
263
|
+
export var LabelWithBadge = function LabelWithBadge(args) {
|
264
|
+
return ___EmotionJSX(AccordionGroup, _extends({}, args, {
|
265
|
+
labelHeadingTag: "h4"
|
266
|
+
}), ___EmotionJSX(Item, {
|
267
|
+
key: "accordionKey",
|
268
|
+
textValue: "accordionKey",
|
269
|
+
label: ___EmotionJSX(Box, {
|
270
|
+
isRow: true,
|
271
|
+
alignItems: "center"
|
272
|
+
}, "Accordion Label", ___EmotionJSX(Box, {
|
273
|
+
isRow: true,
|
274
|
+
gap: "5px",
|
275
|
+
ml: "5px"
|
276
|
+
}, ___EmotionJSX(Badge, {
|
277
|
+
label: "Label",
|
278
|
+
sx: {
|
279
|
+
height: '21px'
|
280
|
+
}
|
281
|
+
}))),
|
282
|
+
"data-id": "accordionItem"
|
283
|
+
}, ___EmotionJSX(Text, null, "Render me!")));
|
256
284
|
};
|
@@ -68,7 +68,7 @@ var AccordionItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
68
68
|
isPressed: isPressed
|
69
69
|
}),
|
70
70
|
buttonClasses = _useStatusClasses2.classNames;
|
71
|
-
var ariaLabel = props['aria-label']
|
71
|
+
var ariaLabel = props['aria-label'];
|
72
72
|
var isValidHeadingTag = _includesInstanceProperty(validHeadingTags).call(validHeadingTags, labelHeadingTag === null || labelHeadingTag === void 0 ? void 0 : labelHeadingTag.toLowerCase());
|
73
73
|
var validLabelHeadingTag = isValidHeadingTag ? labelHeadingTag === null || labelHeadingTag === void 0 ? void 0 : labelHeadingTag.toLowerCase() : 'span';
|
74
74
|
return ___EmotionJSX(Box, _extends({
|
@@ -112,7 +112,7 @@ AccordionItem.propTypes = {
|
|
112
112
|
key: PropTypes.string,
|
113
113
|
rendered: PropTypes.node,
|
114
114
|
props: PropTypes.shape({
|
115
|
-
label: PropTypes.
|
115
|
+
label: PropTypes.node,
|
116
116
|
children: PropTypes.node,
|
117
117
|
textValue: PropTypes.string,
|
118
118
|
containerProps: PropTypes.shape({}),
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
4
4
|
import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
6
|
import { Item, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField } from '../../index';
|
7
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks.js';
|
7
8
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
8
9
|
import { SharedItemArgTypes } from '../ListViewItem/listViewItemAttributes';
|
9
10
|
import PanelHeaderReadMe from './PanelHeader.mdx';
|
@@ -32,6 +33,12 @@ export var Default = function Default(_ref) {
|
|
32
33
|
}
|
33
34
|
}));
|
34
35
|
};
|
36
|
+
Default.parameters = {
|
37
|
+
design: {
|
38
|
+
type: 'figma',
|
39
|
+
url: FIGMA_LINKS.panelHeader["default"]
|
40
|
+
}
|
41
|
+
};
|
35
42
|
export var WithSubtext = function WithSubtext(_ref2) {
|
36
43
|
var args = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
37
44
|
return ___EmotionJSX(PanelHeader, _extends({}, args, {
|
@@ -42,6 +49,12 @@ export var WithSubtext = function WithSubtext(_ref2) {
|
|
42
49
|
}
|
43
50
|
}));
|
44
51
|
};
|
52
|
+
WithSubtext.parameters = {
|
53
|
+
design: {
|
54
|
+
type: 'figma',
|
55
|
+
url: FIGMA_LINKS.panelHeader.withSubtext
|
56
|
+
}
|
57
|
+
};
|
45
58
|
export var WithControls = function WithControls(_ref3) {
|
46
59
|
var args = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
|
47
60
|
return ___EmotionJSX(PanelHeader, _extends({}, args, {
|
@@ -58,6 +71,12 @@ export var WithControls = function WithControls(_ref3) {
|
|
58
71
|
key: "delete"
|
59
72
|
}, "Delete user")), ___EmotionJSX(PanelHeaderCloseButton, null));
|
60
73
|
};
|
74
|
+
WithControls.parameters = {
|
75
|
+
design: {
|
76
|
+
type: 'figma',
|
77
|
+
url: FIGMA_LINKS.panelHeader.withControls
|
78
|
+
}
|
79
|
+
};
|
61
80
|
export var WithImage = function WithImage() {
|
62
81
|
return ___EmotionJSX(PanelHeader, {
|
63
82
|
data: {
|
@@ -70,6 +89,12 @@ export var WithImage = function WithImage() {
|
|
70
89
|
}
|
71
90
|
});
|
72
91
|
};
|
92
|
+
WithImage.parameters = {
|
93
|
+
design: {
|
94
|
+
type: 'figma',
|
95
|
+
url: FIGMA_LINKS.panelHeader.withImage
|
96
|
+
}
|
97
|
+
};
|
73
98
|
export var WithExtraLongText = function WithExtraLongText(_ref4) {
|
74
99
|
var args = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
|
75
100
|
return ___EmotionJSX(PanelHeader, _extends({}, args, {
|
@@ -85,4 +110,10 @@ export var WithExtraLongText = function WithExtraLongText(_ref4) {
|
|
85
110
|
}, "Disable user"), ___EmotionJSX(Item, {
|
86
111
|
key: "delete"
|
87
112
|
}, "Delete user")), ___EmotionJSX(PanelHeaderCloseButton, null));
|
113
|
+
};
|
114
|
+
WithExtraLongText.parameters = {
|
115
|
+
design: {
|
116
|
+
type: 'figma',
|
117
|
+
url: FIGMA_LINKS.panelHeader.withExtraLongText
|
118
|
+
}
|
88
119
|
};
|
@@ -17,7 +17,21 @@ import { Badge, Box, Bracket, Button, Icon, IconButton, Item, RockerButton, Rock
|
|
17
17
|
import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.js';
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
19
19
|
export default {
|
20
|
-
title: 'Recipes/Condition Filter'
|
20
|
+
title: 'Recipes/Condition Filter',
|
21
|
+
parameters: {
|
22
|
+
a11y: {
|
23
|
+
config: {
|
24
|
+
/** The "color-contrast" test ends with an "incomplete" status
|
25
|
+
* since pseudo-element applies to the same container as selected values.
|
26
|
+
* A workaround to disable "color-contrast" incomplete tests.
|
27
|
+
*/
|
28
|
+
rules: [{
|
29
|
+
id: 'color-contrast',
|
30
|
+
enabled: false
|
31
|
+
}]
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
21
35
|
};
|
22
36
|
var borderBox = {
|
23
37
|
borderColor: 'neutral.80',
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
3
3
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
4
4
|
import React, { useState } from 'react';
|
5
5
|
import CheckCircleIcon from '@pingux/mdi-react/CheckCircleIcon';
|
6
|
+
import { v4 as uuid } from 'uuid';
|
6
7
|
import { Box, Icon, IconButton, Link, Separator, Text } from '../index';
|
7
8
|
import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.js';
|
8
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -53,13 +54,14 @@ var EarthCircleIcon = function EarthCircleIcon() {
|
|
53
54
|
}));
|
54
55
|
};
|
55
56
|
var RadioButtonIcon = function RadioButtonIcon(props) {
|
57
|
+
var id = uuid();
|
56
58
|
return ___EmotionJSX("svg", _extends({
|
57
59
|
viewBox: "0 0 22 22",
|
58
60
|
fill: "none",
|
59
61
|
xmlns: "http://www.w3.org/2000/svg",
|
60
|
-
"aria-labelledby": "radio-button-icon-title"
|
62
|
+
"aria-labelledby": "radio-button-icon-title-".concat(id)
|
61
63
|
}, props), ___EmotionJSX("title", {
|
62
|
-
id: "radio-button-icon-title"
|
64
|
+
id: "radio-button-icon-title-".concat(id)
|
63
65
|
}, "Radio Button Icon"), ___EmotionJSX("path", {
|
64
66
|
d: "M11 18.3333C9.05508 18.3333 7.18982 17.5607 5.81455 16.1854C4.43928 14.8102 3.66667 12.9449 3.66667 11C3.66667 9.05507 4.43928 7.18981 5.81455 5.81455C7.18982 4.43928 9.05508 3.66666 11 3.66666C12.9449 3.66666 14.8102 4.43928 16.1854 5.81455C17.5607 7.18981 18.3333 9.05507 18.3333 11C18.3333 12.9449 17.5607 14.8102 16.1854 16.1854C14.8102 17.5607 12.9449 18.3333 11 18.3333ZM11 1.83333C9.79621 1.83333 8.60422 2.07043 7.49207 2.5311C6.37992 2.99177 5.36939 3.66698 4.51819 4.51818C2.7991 6.23727 1.83333 8.56884 1.83333 11C1.83333 13.4311 2.7991 15.7627 4.51819 17.4818C5.36939 18.333 6.37992 19.0082 7.49207 19.4689C8.60422 19.9296 9.79621 20.1667 11 20.1667C13.4311 20.1667 15.7627 19.2009 17.4818 17.4818C19.2009 15.7627 20.1667 13.4311 20.1667 11C20.1667 9.79621 19.9296 8.60421 19.4689 7.49206C19.0082 6.37991 18.333 5.36939 17.4818 4.51818C16.6306 3.66698 15.6201 2.99177 14.5079 2.5311C13.3958 2.07043 12.2038 1.83333 11 1.83333Z",
|
65
67
|
fill: "#B3BEE8"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export var FIGMA_LINKS = {
|
2
2
|
accordionGroup: {
|
3
3
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=446-1808&t=8Wwd3tIBh3GEjCJB-0',
|
4
|
+
disabledState: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43917%3A31554&mode=dev',
|
4
5
|
differentLevels: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=446%3A1949&mode=dev'
|
5
6
|
},
|
6
7
|
attributeMappings: {
|
@@ -96,6 +97,13 @@ export var FIGMA_LINKS = {
|
|
96
97
|
OnewayToBidirectionalArrow: {
|
97
98
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=43504-1214&mode=design&t=R4kdj0liRHxsqbV5-0'
|
98
99
|
},
|
100
|
+
panelHeader: {
|
101
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44688%3A39612&mode=dev',
|
102
|
+
withSubtext: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39651&mode=dev',
|
103
|
+
withControls: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39662&mode=dev',
|
104
|
+
withImage: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39682&mode=dev',
|
105
|
+
withExtraLongText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39713&mode=dev'
|
106
|
+
},
|
99
107
|
popoverMenu: {
|
100
108
|
"default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=0%3A3073&t=We3h7LaaFJQnxdSy-1'
|
101
109
|
},
|