@pingux/astro 2.165.0 → 2.165.1-alpha.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/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +107 -21
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +7 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +7 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +3 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +21 -0
- package/lib/cjs/styles/themes/next-gen/variants/accordionGrid.d.ts +22 -0
- package/lib/cjs/styles/themes/next-gen/variants/accordionGrid.js +31 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +21 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +2 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +107 -21
- package/lib/components/AccordionGridItem/AccordionGridItem.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +7 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +3 -1
- package/lib/styles/themes/next-gen/variants/accordionGrid.js +24 -0
- package/lib/styles/themes/next-gen/variants/variants.js +2 -0
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -14,22 +14,22 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
14
14
|
_Object$defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
exports["default"] = exports.Default = exports.Controlled = exports.AccordionWithInputs = void 0;
|
|
17
|
+
exports["default"] = exports.OnyxDefault = exports.Default = exports.Controlled = exports.AccordionWithInputs = void 0;
|
|
18
18
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
19
19
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
21
21
|
var _react = _interopRequireWildcard(require("react"));
|
|
22
22
|
var _reactStately = require("react-stately");
|
|
23
23
|
var _CreateIcon = _interopRequireDefault(require("@pingux/mdi-react/CreateIcon"));
|
|
24
|
+
var _DotsHorizontalIcon = _interopRequireDefault(require("@pingux/mdi-react/DotsHorizontalIcon"));
|
|
24
25
|
var _MoreVertIcon = _interopRequireDefault(require("@pingux/mdi-react/MoreVertIcon"));
|
|
25
26
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
|
26
|
-
var _hooks = require("../../hooks");
|
|
27
27
|
var _index = require("../../index");
|
|
28
28
|
var _AccordionGridGroup = _interopRequireDefault(require("./AccordionGridGroup.mdx"));
|
|
29
29
|
var _react2 = require("@emotion/react");
|
|
30
30
|
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
31
31
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
32
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
33
|
var data = [{
|
|
34
34
|
name: 'Client Application Developer',
|
|
35
35
|
key: 'Client',
|
|
@@ -61,6 +61,37 @@ var data = [{
|
|
|
61
61
|
populations: []
|
|
62
62
|
}]
|
|
63
63
|
}];
|
|
64
|
+
var onyxData = [{
|
|
65
|
+
name: 'Client Application Developer',
|
|
66
|
+
key: 'Client',
|
|
67
|
+
organizations: [{
|
|
68
|
+
name: 'Montana (Environment)',
|
|
69
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
70
|
+
}, {
|
|
71
|
+
name: 'Boston (Environment)',
|
|
72
|
+
populations: []
|
|
73
|
+
}]
|
|
74
|
+
}, {
|
|
75
|
+
name: 'Environment Admin',
|
|
76
|
+
key: 'Environment',
|
|
77
|
+
organizations: [{
|
|
78
|
+
name: 'Montana (Environment)',
|
|
79
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
80
|
+
}, {
|
|
81
|
+
name: 'Montana (Environment)',
|
|
82
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
83
|
+
}]
|
|
84
|
+
}, {
|
|
85
|
+
name: 'Organization Admin',
|
|
86
|
+
key: 'Organization',
|
|
87
|
+
organizations: [{
|
|
88
|
+
name: 'Montana (Environment)',
|
|
89
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
90
|
+
}, {
|
|
91
|
+
name: 'Boston (Environment)',
|
|
92
|
+
populations: []
|
|
93
|
+
}]
|
|
94
|
+
}];
|
|
64
95
|
var _default = exports["default"] = {
|
|
65
96
|
title: 'Components/AccordionGridGroup',
|
|
66
97
|
component: _index.AccordionGridGroup,
|
|
@@ -183,7 +214,7 @@ var Header = function Header(props) {
|
|
|
183
214
|
name: 'Create Icon'
|
|
184
215
|
}
|
|
185
216
|
})), (0, _react2.jsx)(_index.IconButton, {
|
|
186
|
-
"aria-label": "
|
|
217
|
+
"aria-label": "horizontal-lines-icon",
|
|
187
218
|
sx: {
|
|
188
219
|
mr: '4px'
|
|
189
220
|
}
|
|
@@ -191,7 +222,7 @@ var Header = function Header(props) {
|
|
|
191
222
|
icon: _MoreVertIcon["default"],
|
|
192
223
|
size: "sm",
|
|
193
224
|
title: {
|
|
194
|
-
name: '
|
|
225
|
+
name: 'Horizontal Lines Icon'
|
|
195
226
|
}
|
|
196
227
|
})))));
|
|
197
228
|
};
|
|
@@ -212,7 +243,8 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
212
243
|
}, (0, _react2.jsx)(_index.Text, {
|
|
213
244
|
as: "h5",
|
|
214
245
|
variant: "h5",
|
|
215
|
-
alignSelf: "center"
|
|
246
|
+
alignSelf: "center",
|
|
247
|
+
color: "font.base"
|
|
216
248
|
}, item.name)), (0, _react2.jsx)(_index.Box, {
|
|
217
249
|
isRow: true,
|
|
218
250
|
alignSelf: "center",
|
|
@@ -249,7 +281,8 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
249
281
|
}
|
|
250
282
|
}, (0, _react2.jsx)(_index.Icon, {
|
|
251
283
|
icon: _CreateIcon["default"],
|
|
252
|
-
size: "
|
|
284
|
+
size: "md",
|
|
285
|
+
color: "font.base",
|
|
253
286
|
title: {
|
|
254
287
|
name: 'Create Icon'
|
|
255
288
|
}
|
|
@@ -259,8 +292,9 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
259
292
|
mr: '4px'
|
|
260
293
|
}
|
|
261
294
|
}, (0, _react2.jsx)(_index.Icon, {
|
|
262
|
-
icon:
|
|
263
|
-
size: "
|
|
295
|
+
icon: _DotsHorizontalIcon["default"],
|
|
296
|
+
size: "md",
|
|
297
|
+
color: "font.base",
|
|
264
298
|
title: {
|
|
265
299
|
name: 'Vertical Lines Icon'
|
|
266
300
|
}
|
|
@@ -321,10 +355,39 @@ var Body = function Body(props) {
|
|
|
321
355
|
}));
|
|
322
356
|
})));
|
|
323
357
|
};
|
|
358
|
+
var BodyOnyx = function BodyOnyx(props) {
|
|
359
|
+
var _context3;
|
|
360
|
+
var item = props.item;
|
|
361
|
+
return (0, _react2.jsx)(_index.Card, null, (0, _react2.jsx)(_index.Box, {
|
|
362
|
+
gap: "md"
|
|
363
|
+
}, (0, _map["default"])(_context3 = item.organizations).call(_context3, function (org) {
|
|
364
|
+
var _context4;
|
|
365
|
+
return (0, _react2.jsx)(_index.Box, {
|
|
366
|
+
key: "box".concat(org.name)
|
|
367
|
+
}, (0, _react2.jsx)(_index.Text, {
|
|
368
|
+
color: "font.base",
|
|
369
|
+
sx: {
|
|
370
|
+
textOverflow: 'ellipsis',
|
|
371
|
+
whiteSpace: 'nowrap',
|
|
372
|
+
overflow: 'hidden'
|
|
373
|
+
},
|
|
374
|
+
key: "text".concat(org.name)
|
|
375
|
+
}, org.name), (0, _map["default"])(_context4 = org.populations).call(_context4, function (pop) {
|
|
376
|
+
return (0, _react2.jsx)(_index.Text, {
|
|
377
|
+
color: "font.base",
|
|
378
|
+
key: pop,
|
|
379
|
+
sx: {
|
|
380
|
+
marginLeft: 'md',
|
|
381
|
+
mt: '10px',
|
|
382
|
+
textOverflow: 'ellipsis',
|
|
383
|
+
whiteSpace: 'nowrap',
|
|
384
|
+
overflow: 'hidden'
|
|
385
|
+
}
|
|
386
|
+
}, pop);
|
|
387
|
+
}));
|
|
388
|
+
})));
|
|
389
|
+
};
|
|
324
390
|
var Default = exports.Default = function Default() {
|
|
325
|
-
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
|
326
|
-
themeState = _useGetTheme.themeState;
|
|
327
|
-
var isOnyx = themeState.isOnyx;
|
|
328
391
|
return (
|
|
329
392
|
// See story source for info about the data used
|
|
330
393
|
(0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Text, {
|
|
@@ -343,9 +406,7 @@ var Default = exports.Default = function Default() {
|
|
|
343
406
|
return (0, _react2.jsx)(_reactStately.Item, {
|
|
344
407
|
key: item.key,
|
|
345
408
|
textValue: item.name
|
|
346
|
-
},
|
|
347
|
-
item: item
|
|
348
|
-
}) : (0, _react2.jsx)(Header, {
|
|
409
|
+
}, (0, _react2.jsx)(Header, {
|
|
349
410
|
item: item
|
|
350
411
|
}), (0, _react2.jsx)(Body, {
|
|
351
412
|
item: item
|
|
@@ -360,14 +421,41 @@ var Default = exports.Default = function Default() {
|
|
|
360
421
|
}))
|
|
361
422
|
);
|
|
362
423
|
};
|
|
424
|
+
var OnyxDefault = exports.OnyxDefault = function OnyxDefault() {
|
|
425
|
+
return (
|
|
426
|
+
// See story source for info about the data used
|
|
427
|
+
(0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Separator, {
|
|
428
|
+
color: "border.base",
|
|
429
|
+
sx: {
|
|
430
|
+
mb: 0
|
|
431
|
+
}
|
|
432
|
+
}), (0, _react2.jsx)(_index.AccordionGridGroup, {
|
|
433
|
+
items: onyxData,
|
|
434
|
+
defaultSelectedKeys: ['Environment']
|
|
435
|
+
}, function (item) {
|
|
436
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
|
437
|
+
key: item.key,
|
|
438
|
+
textValue: item.name
|
|
439
|
+
}, (0, _react2.jsx)(HeaderOnyx, {
|
|
440
|
+
item: item
|
|
441
|
+
}), (0, _react2.jsx)(BodyOnyx, {
|
|
442
|
+
item: item
|
|
443
|
+
}), (0, _react2.jsx)(_index.Box, {
|
|
444
|
+
role: "cell"
|
|
445
|
+
}, item.key !== 'Organization' ? (0, _react2.jsx)(_index.Separator, {
|
|
446
|
+
color: "border.base",
|
|
447
|
+
sx: {
|
|
448
|
+
m: 0
|
|
449
|
+
}
|
|
450
|
+
}) : null));
|
|
451
|
+
}))
|
|
452
|
+
);
|
|
453
|
+
};
|
|
363
454
|
var Controlled = exports.Controlled = function Controlled() {
|
|
364
455
|
var _useState = (0, _react.useState)(['Client']),
|
|
365
456
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
366
457
|
selectedKeys = _useState2[0],
|
|
367
458
|
setSelectedKeys = _useState2[1];
|
|
368
|
-
var _useGetTheme2 = (0, _hooks.useGetTheme)(),
|
|
369
|
-
themeState = _useGetTheme2.themeState;
|
|
370
|
-
var isOnyx = themeState.isOnyx;
|
|
371
459
|
return (
|
|
372
460
|
// See story source for info about the data used
|
|
373
461
|
(0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Text, {
|
|
@@ -387,9 +475,7 @@ var Controlled = exports.Controlled = function Controlled() {
|
|
|
387
475
|
return (0, _react2.jsx)(_reactStately.Item, {
|
|
388
476
|
key: item.key,
|
|
389
477
|
textValue: item.name
|
|
390
|
-
},
|
|
391
|
-
item: item
|
|
392
|
-
}) : (0, _react2.jsx)(Header, {
|
|
478
|
+
}, (0, _react2.jsx)(Header, {
|
|
393
479
|
item: item
|
|
394
480
|
}), (0, _react2.jsx)(Body, {
|
|
395
481
|
item: item
|
|
@@ -75,7 +75,7 @@ var AccordionGridItem = function AccordionGridItem(props) {
|
|
|
75
75
|
}
|
|
76
76
|
return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
|
|
77
77
|
as: "div",
|
|
78
|
-
|
|
78
|
+
tabIndex: "0"
|
|
79
79
|
}, (0, _reactAria.mergeProps)(rowProps, others), {
|
|
80
80
|
"aria-selected": isSelected,
|
|
81
81
|
"aria-expanded": isSelected,
|
|
@@ -8,8 +8,10 @@ export declare const componentSpecificNextGenBlacklist: {
|
|
|
8
8
|
DataTable: string[];
|
|
9
9
|
Text: string[];
|
|
10
10
|
Tabs: string[];
|
|
11
|
+
AccordionGridGroup: string[];
|
|
11
12
|
};
|
|
12
13
|
export declare const astroBlacklistStory: {
|
|
14
|
+
AccordionGridGroup: string[];
|
|
13
15
|
DataTable: string[];
|
|
14
16
|
NavBar: string[];
|
|
15
17
|
SearchField: string[];
|
|
@@ -14,9 +14,11 @@ var componentSpecificNextGenBlacklist = exports.componentSpecificNextGenBlacklis
|
|
|
14
14
|
OverlayPanel: ['Expandable'],
|
|
15
15
|
DataTable: ['Default'],
|
|
16
16
|
Text: ['Default'],
|
|
17
|
-
Tabs: ['Vertical Orientation']
|
|
17
|
+
Tabs: ['Vertical Orientation'],
|
|
18
|
+
AccordionGridGroup: ['Default', 'Accordion With Inputs', 'Controlled']
|
|
18
19
|
};
|
|
19
20
|
var astroBlacklistStory = exports.astroBlacklistStory = {
|
|
21
|
+
AccordionGridGroup: ['Onyx Default'],
|
|
20
22
|
DataTable: ['Onyx Default'],
|
|
21
23
|
NavBar: ['Onyx Default'],
|
|
22
24
|
SearchField: ['Onyx With Filter'],
|
|
@@ -4651,6 +4651,27 @@ declare const _default: {
|
|
|
4651
4651
|
p: string;
|
|
4652
4652
|
};
|
|
4653
4653
|
};
|
|
4654
|
+
accordionGrid: {
|
|
4655
|
+
header: {
|
|
4656
|
+
px: string;
|
|
4657
|
+
py: string;
|
|
4658
|
+
minHeight: string;
|
|
4659
|
+
border: string;
|
|
4660
|
+
'&.is-hovered': {
|
|
4661
|
+
backgroundColor: string;
|
|
4662
|
+
};
|
|
4663
|
+
'&.is-focused': {
|
|
4664
|
+
outline: string;
|
|
4665
|
+
outlineColor: string;
|
|
4666
|
+
outlineOffset: string;
|
|
4667
|
+
};
|
|
4668
|
+
};
|
|
4669
|
+
body: {
|
|
4670
|
+
p: string;
|
|
4671
|
+
pt: number;
|
|
4672
|
+
};
|
|
4673
|
+
item: {};
|
|
4674
|
+
};
|
|
4654
4675
|
attachment: {
|
|
4655
4676
|
container: {
|
|
4656
4677
|
backgroundColor: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
header: {
|
|
3
|
+
px: string;
|
|
4
|
+
py: string;
|
|
5
|
+
minHeight: string;
|
|
6
|
+
border: string;
|
|
7
|
+
'&.is-hovered': {
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
};
|
|
10
|
+
'&.is-focused': {
|
|
11
|
+
outline: string;
|
|
12
|
+
outlineColor: string;
|
|
13
|
+
outlineOffset: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
body: {
|
|
17
|
+
p: string;
|
|
18
|
+
pt: number;
|
|
19
|
+
};
|
|
20
|
+
item: {};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var header = {
|
|
9
|
+
px: 'lg',
|
|
10
|
+
py: 'md',
|
|
11
|
+
minHeight: '75px',
|
|
12
|
+
border: 'none',
|
|
13
|
+
'&.is-hovered': {
|
|
14
|
+
backgroundColor: 'gray-100'
|
|
15
|
+
},
|
|
16
|
+
'&.is-focused': {
|
|
17
|
+
outline: '2px solid',
|
|
18
|
+
outlineColor: 'focus',
|
|
19
|
+
outlineOffset: '0'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var body = {
|
|
23
|
+
p: 'lg',
|
|
24
|
+
pt: 0
|
|
25
|
+
};
|
|
26
|
+
var item = {};
|
|
27
|
+
var _default = exports["default"] = {
|
|
28
|
+
header: header,
|
|
29
|
+
body: body,
|
|
30
|
+
item: item
|
|
31
|
+
};
|
|
@@ -46,6 +46,27 @@ declare const _default: {
|
|
|
46
46
|
p: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
accordionGrid: {
|
|
50
|
+
header: {
|
|
51
|
+
px: string;
|
|
52
|
+
py: string;
|
|
53
|
+
minHeight: string;
|
|
54
|
+
border: string;
|
|
55
|
+
'&.is-hovered': {
|
|
56
|
+
backgroundColor: string;
|
|
57
|
+
};
|
|
58
|
+
'&.is-focused': {
|
|
59
|
+
outline: string;
|
|
60
|
+
outlineColor: string;
|
|
61
|
+
outlineOffset: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
body: {
|
|
65
|
+
p: string;
|
|
66
|
+
pt: number;
|
|
67
|
+
};
|
|
68
|
+
item: {};
|
|
69
|
+
};
|
|
49
70
|
attachment: {
|
|
50
71
|
container: {
|
|
51
72
|
backgroundColor: string;
|
|
@@ -20,6 +20,7 @@ var _Attachment = _interopRequireDefault(require("../../../../components/AICompo
|
|
|
20
20
|
var _Skeleton = _interopRequireDefault(require("../../../../components/Skeleton/Skeleton.styles"));
|
|
21
21
|
var _codeView = _interopRequireDefault(require("../codeView/codeView"));
|
|
22
22
|
var _accordion = _interopRequireDefault(require("./accordion"));
|
|
23
|
+
var _accordionGrid = _interopRequireDefault(require("./accordionGrid"));
|
|
23
24
|
var _avatar = require("./avatar");
|
|
24
25
|
var _box = require("./box");
|
|
25
26
|
var _button = _interopRequireWildcard(require("./button"));
|
|
@@ -425,6 +426,7 @@ var statusIcon = {
|
|
|
425
426
|
};
|
|
426
427
|
var _default = exports["default"] = {
|
|
427
428
|
accordion: _accordion["default"],
|
|
429
|
+
accordionGrid: _accordionGrid["default"],
|
|
428
430
|
attachment: _Attachment["default"],
|
|
429
431
|
avatar: _avatar.avatar,
|
|
430
432
|
breadcrumb: breadcrumb,
|
|
@@ -10,14 +10,14 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
|
10
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
11
11
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
12
12
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
import React, { useState } from 'react';
|
|
15
15
|
import { Item } from 'react-stately';
|
|
16
16
|
import CreateIcon from '@pingux/mdi-react/CreateIcon';
|
|
17
|
+
import DotsHorizontalIcon from '@pingux/mdi-react/DotsHorizontalIcon';
|
|
17
18
|
import MoreVertIcon from '@pingux/mdi-react/MoreVertIcon';
|
|
18
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
19
|
-
import {
|
|
20
|
-
import { AccordionGridGroup, Badge, Box, Icon, IconButton, Link, Separator, Text, TextField } from '../../index';
|
|
20
|
+
import { AccordionGridGroup, Badge, Box, Card, Icon, IconButton, Link, Separator, Text, TextField } from '../../index';
|
|
21
21
|
import AccordionGridReadme from './AccordionGridGroup.mdx';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
var data = [{
|
|
@@ -51,6 +51,37 @@ var data = [{
|
|
|
51
51
|
populations: []
|
|
52
52
|
}]
|
|
53
53
|
}];
|
|
54
|
+
var onyxData = [{
|
|
55
|
+
name: 'Client Application Developer',
|
|
56
|
+
key: 'Client',
|
|
57
|
+
organizations: [{
|
|
58
|
+
name: 'Montana (Environment)',
|
|
59
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
60
|
+
}, {
|
|
61
|
+
name: 'Boston (Environment)',
|
|
62
|
+
populations: []
|
|
63
|
+
}]
|
|
64
|
+
}, {
|
|
65
|
+
name: 'Environment Admin',
|
|
66
|
+
key: 'Environment',
|
|
67
|
+
organizations: [{
|
|
68
|
+
name: 'Montana (Environment)',
|
|
69
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
70
|
+
}, {
|
|
71
|
+
name: 'Montana (Environment)',
|
|
72
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
73
|
+
}]
|
|
74
|
+
}, {
|
|
75
|
+
name: 'Organization Admin',
|
|
76
|
+
key: 'Organization',
|
|
77
|
+
organizations: [{
|
|
78
|
+
name: 'Montana (Environment)',
|
|
79
|
+
populations: ['Administrators (Population)', 'Other Population (Population)']
|
|
80
|
+
}, {
|
|
81
|
+
name: 'Boston (Environment)',
|
|
82
|
+
populations: []
|
|
83
|
+
}]
|
|
84
|
+
}];
|
|
54
85
|
export default {
|
|
55
86
|
title: 'Components/AccordionGridGroup',
|
|
56
87
|
component: AccordionGridGroup,
|
|
@@ -173,7 +204,7 @@ var Header = function Header(props) {
|
|
|
173
204
|
name: 'Create Icon'
|
|
174
205
|
}
|
|
175
206
|
})), ___EmotionJSX(IconButton, {
|
|
176
|
-
"aria-label": "
|
|
207
|
+
"aria-label": "horizontal-lines-icon",
|
|
177
208
|
sx: {
|
|
178
209
|
mr: '4px'
|
|
179
210
|
}
|
|
@@ -181,7 +212,7 @@ var Header = function Header(props) {
|
|
|
181
212
|
icon: MoreVertIcon,
|
|
182
213
|
size: "sm",
|
|
183
214
|
title: {
|
|
184
|
-
name: '
|
|
215
|
+
name: 'Horizontal Lines Icon'
|
|
185
216
|
}
|
|
186
217
|
})))));
|
|
187
218
|
};
|
|
@@ -202,7 +233,8 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
202
233
|
}, ___EmotionJSX(Text, {
|
|
203
234
|
as: "h5",
|
|
204
235
|
variant: "h5",
|
|
205
|
-
alignSelf: "center"
|
|
236
|
+
alignSelf: "center",
|
|
237
|
+
color: "font.base"
|
|
206
238
|
}, item.name)), ___EmotionJSX(Box, {
|
|
207
239
|
isRow: true,
|
|
208
240
|
alignSelf: "center",
|
|
@@ -239,7 +271,8 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
239
271
|
}
|
|
240
272
|
}, ___EmotionJSX(Icon, {
|
|
241
273
|
icon: CreateIcon,
|
|
242
|
-
size: "
|
|
274
|
+
size: "md",
|
|
275
|
+
color: "font.base",
|
|
243
276
|
title: {
|
|
244
277
|
name: 'Create Icon'
|
|
245
278
|
}
|
|
@@ -249,8 +282,9 @@ var HeaderOnyx = function HeaderOnyx(props) {
|
|
|
249
282
|
mr: '4px'
|
|
250
283
|
}
|
|
251
284
|
}, ___EmotionJSX(Icon, {
|
|
252
|
-
icon:
|
|
253
|
-
size: "
|
|
285
|
+
icon: DotsHorizontalIcon,
|
|
286
|
+
size: "md",
|
|
287
|
+
color: "font.base",
|
|
254
288
|
title: {
|
|
255
289
|
name: 'Vertical Lines Icon'
|
|
256
290
|
}
|
|
@@ -311,10 +345,39 @@ var Body = function Body(props) {
|
|
|
311
345
|
}));
|
|
312
346
|
})));
|
|
313
347
|
};
|
|
348
|
+
var BodyOnyx = function BodyOnyx(props) {
|
|
349
|
+
var _context3;
|
|
350
|
+
var item = props.item;
|
|
351
|
+
return ___EmotionJSX(Card, null, ___EmotionJSX(Box, {
|
|
352
|
+
gap: "md"
|
|
353
|
+
}, _mapInstanceProperty(_context3 = item.organizations).call(_context3, function (org) {
|
|
354
|
+
var _context4;
|
|
355
|
+
return ___EmotionJSX(Box, {
|
|
356
|
+
key: "box".concat(org.name)
|
|
357
|
+
}, ___EmotionJSX(Text, {
|
|
358
|
+
color: "font.base",
|
|
359
|
+
sx: {
|
|
360
|
+
textOverflow: 'ellipsis',
|
|
361
|
+
whiteSpace: 'nowrap',
|
|
362
|
+
overflow: 'hidden'
|
|
363
|
+
},
|
|
364
|
+
key: "text".concat(org.name)
|
|
365
|
+
}, org.name), _mapInstanceProperty(_context4 = org.populations).call(_context4, function (pop) {
|
|
366
|
+
return ___EmotionJSX(Text, {
|
|
367
|
+
color: "font.base",
|
|
368
|
+
key: pop,
|
|
369
|
+
sx: {
|
|
370
|
+
marginLeft: 'md',
|
|
371
|
+
mt: '10px',
|
|
372
|
+
textOverflow: 'ellipsis',
|
|
373
|
+
whiteSpace: 'nowrap',
|
|
374
|
+
overflow: 'hidden'
|
|
375
|
+
}
|
|
376
|
+
}, pop);
|
|
377
|
+
}));
|
|
378
|
+
})));
|
|
379
|
+
};
|
|
314
380
|
export var Default = function Default() {
|
|
315
|
-
var _useGetTheme = useGetTheme(),
|
|
316
|
-
themeState = _useGetTheme.themeState;
|
|
317
|
-
var isOnyx = themeState.isOnyx;
|
|
318
381
|
return (
|
|
319
382
|
// See story source for info about the data used
|
|
320
383
|
___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
|
@@ -333,9 +396,7 @@ export var Default = function Default() {
|
|
|
333
396
|
return ___EmotionJSX(Item, {
|
|
334
397
|
key: item.key,
|
|
335
398
|
textValue: item.name
|
|
336
|
-
},
|
|
337
|
-
item: item
|
|
338
|
-
}) : ___EmotionJSX(Header, {
|
|
399
|
+
}, ___EmotionJSX(Header, {
|
|
339
400
|
item: item
|
|
340
401
|
}), ___EmotionJSX(Body, {
|
|
341
402
|
item: item
|
|
@@ -350,14 +411,41 @@ export var Default = function Default() {
|
|
|
350
411
|
}))
|
|
351
412
|
);
|
|
352
413
|
};
|
|
414
|
+
export var OnyxDefault = function OnyxDefault() {
|
|
415
|
+
return (
|
|
416
|
+
// See story source for info about the data used
|
|
417
|
+
___EmotionJSX(React.Fragment, null, ___EmotionJSX(Separator, {
|
|
418
|
+
color: "border.base",
|
|
419
|
+
sx: {
|
|
420
|
+
mb: 0
|
|
421
|
+
}
|
|
422
|
+
}), ___EmotionJSX(AccordionGridGroup, {
|
|
423
|
+
items: onyxData,
|
|
424
|
+
defaultSelectedKeys: ['Environment']
|
|
425
|
+
}, function (item) {
|
|
426
|
+
return ___EmotionJSX(Item, {
|
|
427
|
+
key: item.key,
|
|
428
|
+
textValue: item.name
|
|
429
|
+
}, ___EmotionJSX(HeaderOnyx, {
|
|
430
|
+
item: item
|
|
431
|
+
}), ___EmotionJSX(BodyOnyx, {
|
|
432
|
+
item: item
|
|
433
|
+
}), ___EmotionJSX(Box, {
|
|
434
|
+
role: "cell"
|
|
435
|
+
}, item.key !== 'Organization' ? ___EmotionJSX(Separator, {
|
|
436
|
+
color: "border.base",
|
|
437
|
+
sx: {
|
|
438
|
+
m: 0
|
|
439
|
+
}
|
|
440
|
+
}) : null));
|
|
441
|
+
}))
|
|
442
|
+
);
|
|
443
|
+
};
|
|
353
444
|
export var Controlled = function Controlled() {
|
|
354
445
|
var _useState = useState(['Client']),
|
|
355
446
|
_useState2 = _slicedToArray(_useState, 2),
|
|
356
447
|
selectedKeys = _useState2[0],
|
|
357
448
|
setSelectedKeys = _useState2[1];
|
|
358
|
-
var _useGetTheme2 = useGetTheme(),
|
|
359
|
-
themeState = _useGetTheme2.themeState;
|
|
360
|
-
var isOnyx = themeState.isOnyx;
|
|
361
449
|
return (
|
|
362
450
|
// See story source for info about the data used
|
|
363
451
|
___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
|
@@ -377,9 +465,7 @@ export var Controlled = function Controlled() {
|
|
|
377
465
|
return ___EmotionJSX(Item, {
|
|
378
466
|
key: item.key,
|
|
379
467
|
textValue: item.name
|
|
380
|
-
},
|
|
381
|
-
item: item
|
|
382
|
-
}) : ___EmotionJSX(Header, {
|
|
468
|
+
}, ___EmotionJSX(Header, {
|
|
383
469
|
item: item
|
|
384
470
|
}), ___EmotionJSX(Body, {
|
|
385
471
|
item: item
|
|
@@ -7,9 +7,11 @@ export var componentSpecificNextGenBlacklist = {
|
|
|
7
7
|
OverlayPanel: ['Expandable'],
|
|
8
8
|
DataTable: ['Default'],
|
|
9
9
|
Text: ['Default'],
|
|
10
|
-
Tabs: ['Vertical Orientation']
|
|
10
|
+
Tabs: ['Vertical Orientation'],
|
|
11
|
+
AccordionGridGroup: ['Default', 'Accordion With Inputs', 'Controlled']
|
|
11
12
|
};
|
|
12
13
|
export var astroBlacklistStory = {
|
|
14
|
+
AccordionGridGroup: ['Onyx Default'],
|
|
13
15
|
DataTable: ['Onyx Default'],
|
|
14
16
|
NavBar: ['Onyx Default'],
|
|
15
17
|
SearchField: ['Onyx With Filter'],
|