@pingux/astro 2.54.0 → 2.55.0-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/recipes/ListAndPanel.stories.js +315 -115
- package/lib/cjs/recipes/PanelContent.stories.js +26 -168
- package/lib/cjs/recipes/items.js +152 -2
- package/lib/recipes/ListAndPanel.stories.js +315 -115
- package/lib/recipes/PanelContent.stories.js +16 -158
- package/lib/recipes/items.js +148 -1
- package/package.json +1 -1
@@ -22,6 +22,7 @@ var _index = require("../index");
|
|
22
22
|
var _figmaLinks = require("../utils/designUtils/figmaLinks.ts");
|
23
23
|
var _UserImage = _interopRequireDefault(require("../utils/devUtils/assets/UserImage.png"));
|
24
24
|
var _statuses = _interopRequireDefault(require("../utils/devUtils/constants/statuses"));
|
25
|
+
var _items = require("./items");
|
25
26
|
var _react2 = require("@emotion/react");
|
26
27
|
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); }
|
27
28
|
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; }
|
@@ -36,76 +37,6 @@ var _default = {
|
|
36
37
|
}
|
37
38
|
};
|
38
39
|
exports["default"] = _default;
|
39
|
-
var colorBlockButtons = [{
|
40
|
-
text: 'Groups',
|
41
|
-
subtext: '21',
|
42
|
-
isConfigured: true
|
43
|
-
}, {
|
44
|
-
text: 'Population',
|
45
|
-
subtext: 'Denver',
|
46
|
-
isConfigured: true
|
47
|
-
}, {
|
48
|
-
text: 'MFA',
|
49
|
-
subtext: 'Enabled',
|
50
|
-
isConfigured: true
|
51
|
-
}, {
|
52
|
-
text: 'Roles',
|
53
|
-
subtext: '0'
|
54
|
-
}];
|
55
|
-
var data = {
|
56
|
-
contactInfo: {
|
57
|
-
label: 'Contact Info',
|
58
|
-
key: 'contactInfoKey',
|
59
|
-
fields: [{
|
60
|
-
label: 'Email',
|
61
|
-
value: 'ednepomuceno@pingidentity.com',
|
62
|
-
isVerified: true
|
63
|
-
}, {
|
64
|
-
label: 'Primary',
|
65
|
-
value: '+1 767-777-3333'
|
66
|
-
}, {
|
67
|
-
label: 'Address',
|
68
|
-
value: '1234 W California St, Denver CO 80101'
|
69
|
-
}]
|
70
|
-
},
|
71
|
-
personalInfo: {
|
72
|
-
label: 'Personal Info',
|
73
|
-
key: 'personalInfoKey',
|
74
|
-
image: _UserImage["default"],
|
75
|
-
fields: [{
|
76
|
-
label: 'Given Name',
|
77
|
-
value: 'Ed'
|
78
|
-
}, {
|
79
|
-
label: 'Famile Name',
|
80
|
-
value: 'Nepomuceno'
|
81
|
-
}]
|
82
|
-
},
|
83
|
-
companyInfo: {
|
84
|
-
label: 'Company Info',
|
85
|
-
key: 'companyInfoKey',
|
86
|
-
fields: [{
|
87
|
-
label: 'Tile',
|
88
|
-
value: 'Interaction Designer'
|
89
|
-
}]
|
90
|
-
},
|
91
|
-
customAttributes: {
|
92
|
-
label: 'Custom Attributes',
|
93
|
-
key: 'customAttributesKey',
|
94
|
-
fields: [{
|
95
|
-
label: 'T-Shirt Size',
|
96
|
-
value: 'Large'
|
97
|
-
}, {
|
98
|
-
label: 'Example Multi-Value Attribute',
|
99
|
-
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
100
|
-
}]
|
101
|
-
},
|
102
|
-
jsonAttributes: {
|
103
|
-
label: 'JSON Attributes',
|
104
|
-
key: 'jsonAttributesKey',
|
105
|
-
badges: ['Address', 'Contact', 'Another Json'],
|
106
|
-
fields: []
|
107
|
-
}
|
108
|
-
};
|
109
40
|
var OverlayWrapper = function OverlayWrapper(_ref) {
|
110
41
|
var _context, _context2, _context3;
|
111
42
|
var children = _ref.children,
|
@@ -115,7 +46,7 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
|
|
115
46
|
}),
|
116
47
|
state = _useOverlayPanelState.state;
|
117
48
|
var triggerRef = (0, _react.useRef)();
|
118
|
-
var personalInfo =
|
49
|
+
var personalInfo = _items.personalData.personalInfo;
|
119
50
|
var fields = personalInfo.fields;
|
120
51
|
var renderBreadcrumbs = (0, _react2.jsx)(_index.Breadcrumbs, {
|
121
52
|
icon: _ChevronRightIcon["default"]
|
@@ -171,7 +102,7 @@ var DisplayPanel = function DisplayPanel() {
|
|
171
102
|
isRow: true,
|
172
103
|
gap: "md",
|
173
104
|
mb: "20px"
|
174
|
-
}, (0, _map["default"])(colorBlockButtons).call(colorBlockButtons, function (tileData) {
|
105
|
+
}, (0, _map["default"])(_items.colorBlockButtons).call(_items.colorBlockButtons, function (tileData) {
|
175
106
|
return (0, _react2.jsx)(ColorBlockButton, {
|
176
107
|
buttonData: tileData,
|
177
108
|
key: "".concat(tileData.text, "-key")
|
@@ -180,31 +111,31 @@ var DisplayPanel = function DisplayPanel() {
|
|
180
111
|
isRow: true,
|
181
112
|
justifyContent: "space-between"
|
182
113
|
}, (0, _react2.jsx)(_index.AccordionGroup, {
|
183
|
-
defaultExpandedKeys: (0, _map["default"])(_context4 = (0, _keys["default"])(
|
184
|
-
return
|
114
|
+
defaultExpandedKeys: (0, _map["default"])(_context4 = (0, _keys["default"])(_items.personalData)).call(_context4, function (item) {
|
115
|
+
return _items.personalData[item].key;
|
185
116
|
}),
|
186
117
|
labelHeadingTag: "h2"
|
187
|
-
}, (0, _map["default"])(_context5 = (0, _keys["default"])(
|
118
|
+
}, (0, _map["default"])(_context5 = (0, _keys["default"])(_items.personalData)).call(_context5, function (item) {
|
188
119
|
var _context6;
|
189
120
|
return (0, _react2.jsx)(_index.Item, {
|
190
|
-
"data-id":
|
191
|
-
key:
|
192
|
-
label:
|
193
|
-
textValue:
|
194
|
-
},
|
121
|
+
"data-id": _items.personalData[item].label,
|
122
|
+
key: _items.personalData[item].key,
|
123
|
+
label: _items.personalData[item].label,
|
124
|
+
textValue: _items.personalData[item].label
|
125
|
+
}, _items.personalData[item].image ? (0, _react2.jsx)(_index.Box, {
|
195
126
|
isRow: true,
|
196
127
|
gap: "md"
|
197
128
|
}, (0, _react2.jsx)(_index.Image, {
|
198
129
|
src: _UserImage["default"],
|
199
130
|
alt: "user"
|
200
131
|
}), (0, _react2.jsx)(LabelValuePairs, {
|
201
|
-
fields:
|
132
|
+
fields: _items.personalData[item].fields
|
202
133
|
})) : (0, _react2.jsx)(LabelValuePairs, {
|
203
|
-
fields:
|
204
|
-
}),
|
134
|
+
fields: _items.personalData[item].fields
|
135
|
+
}), _items.personalData[item].badges && (0, _react2.jsx)(_index.Box, {
|
205
136
|
isRow: true,
|
206
137
|
gap: "sm"
|
207
|
-
}, (0, _map["default"])(_context6 =
|
138
|
+
}, (0, _map["default"])(_context6 = _items.personalData[item].badges).call(_context6, function (badge) {
|
208
139
|
return (0, _react2.jsx)(_index.Badge, {
|
209
140
|
label: badge,
|
210
141
|
variant: "defaultBadge",
|
@@ -274,7 +205,7 @@ DisplayPanel.parameters = {
|
|
274
205
|
};
|
275
206
|
var ColorBlockButton = function ColorBlockButton(_ref2) {
|
276
207
|
var _ref2$buttonData = _ref2.buttonData,
|
277
|
-
buttonData = _ref2$buttonData === void 0 ? colorBlockButtons[0] : _ref2$buttonData;
|
208
|
+
buttonData = _ref2$buttonData === void 0 ? _items.colorBlockButtons[0] : _ref2$buttonData;
|
278
209
|
return (0, _react2.jsx)(_index.Button, {
|
279
210
|
variant: "colorBlock",
|
280
211
|
className: buttonData.isConfigured ? 'is-configured' : ''
|
@@ -292,7 +223,7 @@ var ColorBlockButton = function ColorBlockButton(_ref2) {
|
|
292
223
|
exports.ColorBlockButton = ColorBlockButton;
|
293
224
|
var LabelValuePairs = function LabelValuePairs(_ref3) {
|
294
225
|
var _ref3$fields = _ref3.fields,
|
295
|
-
fields = _ref3$fields === void 0 ?
|
226
|
+
fields = _ref3$fields === void 0 ? _items.personalData.contactInfo.fields : _ref3$fields;
|
296
227
|
return (0, _react2.jsx)(_index.Box, {
|
297
228
|
gap: "md",
|
298
229
|
maxWidth: "675px"
|
@@ -323,79 +254,6 @@ var LabelValuePairs = function LabelValuePairs(_ref3) {
|
|
323
254
|
}));
|
324
255
|
};
|
325
256
|
exports.LabelValuePairs = LabelValuePairs;
|
326
|
-
var editData = {
|
327
|
-
personalInfo: {
|
328
|
-
label: 'Personal Info',
|
329
|
-
key: 'personalInfoKey',
|
330
|
-
image: _UserImage["default"],
|
331
|
-
fields: [{
|
332
|
-
label: 'Prefix',
|
333
|
-
value: ''
|
334
|
-
}, {
|
335
|
-
label: 'Given Name',
|
336
|
-
value: 'Ed'
|
337
|
-
}, {
|
338
|
-
label: 'Middle Name',
|
339
|
-
value: ''
|
340
|
-
}, {
|
341
|
-
label: 'Family Name',
|
342
|
-
value: 'Nepomuceno'
|
343
|
-
}, {
|
344
|
-
label: 'Suffix',
|
345
|
-
value: ''
|
346
|
-
}, {
|
347
|
-
label: 'Formatted',
|
348
|
-
value: ''
|
349
|
-
}, {
|
350
|
-
label: 'Nickname',
|
351
|
-
value: ''
|
352
|
-
}]
|
353
|
-
},
|
354
|
-
contactInfo: {
|
355
|
-
label: 'Contact Info',
|
356
|
-
key: 'contactInfoKey',
|
357
|
-
fields: [{
|
358
|
-
label: 'Email',
|
359
|
-
value: 'ednepomuceno@pingidentity.com',
|
360
|
-
slot: (0, _react2.jsx)(_index.CheckboxField, {
|
361
|
-
mt: "xs",
|
362
|
-
label: "Require Email to be Verified"
|
363
|
-
})
|
364
|
-
}, {
|
365
|
-
label: 'Phone Number',
|
366
|
-
value: '123-456-7890'
|
367
|
-
}, {
|
368
|
-
label: 'Street Address',
|
369
|
-
value: '123 Example St'
|
370
|
-
}, {
|
371
|
-
label: 'Country Code',
|
372
|
-
value: ''
|
373
|
-
}, {
|
374
|
-
label: 'Loality',
|
375
|
-
value: ''
|
376
|
-
}, {
|
377
|
-
label: 'Region',
|
378
|
-
value: ''
|
379
|
-
}, {
|
380
|
-
label: 'Zip Code',
|
381
|
-
value: '12345'
|
382
|
-
}]
|
383
|
-
},
|
384
|
-
companyInfo: {
|
385
|
-
label: 'Company Info',
|
386
|
-
key: 'companyInfoKey',
|
387
|
-
fields: [{
|
388
|
-
label: 'Account ID',
|
389
|
-
value: ''
|
390
|
-
}, {
|
391
|
-
label: 'Type',
|
392
|
-
value: ''
|
393
|
-
}, {
|
394
|
-
label: 'Title',
|
395
|
-
value: ''
|
396
|
-
}]
|
397
|
-
}
|
398
|
-
};
|
399
257
|
var EditPanel = function EditPanel() {
|
400
258
|
var _context7, _context8, _context9;
|
401
259
|
return (0, _react2.jsx)(OverlayWrapper, {
|
@@ -418,26 +276,26 @@ var EditPanel = function EditPanel() {
|
|
418
276
|
}, (0, _react2.jsx)(_index.Item, {
|
419
277
|
key: "population"
|
420
278
|
}, "Denver"))), (0, _react2.jsx)(_index.AccordionGroup, {
|
421
|
-
defaultExpandedKeys: (0, _concat["default"])(_context7 = []).call(_context7, (0, _map["default"])(_context8 = (0, _keys["default"])(editData)).call(_context8, function (item) {
|
422
|
-
return editData[item].key;
|
279
|
+
defaultExpandedKeys: (0, _concat["default"])(_context7 = []).call(_context7, (0, _map["default"])(_context8 = (0, _keys["default"])(_items.editData)).call(_context8, function (item) {
|
280
|
+
return _items.editData[item].key;
|
423
281
|
}), ['preferencesKey', 'customAttributesKey', 'jsonAttributesKey']),
|
424
282
|
labelHeadingTag: "h2"
|
425
|
-
}, (0, _map["default"])(_context9 = (0, _keys["default"])(editData)).call(_context9, function (item) {
|
283
|
+
}, (0, _map["default"])(_context9 = (0, _keys["default"])(_items.editData)).call(_context9, function (item) {
|
426
284
|
var _context10;
|
427
285
|
return (0, _react2.jsx)(_index.Item, {
|
428
|
-
"data-id": editData[item].label,
|
429
|
-
key: editData[item].key,
|
430
|
-
label: editData[item].label,
|
431
|
-
textValue: editData[item].label
|
286
|
+
"data-id": _items.editData[item].label,
|
287
|
+
key: _items.editData[item].key,
|
288
|
+
label: _items.editData[item].label,
|
289
|
+
textValue: _items.editData[item].label
|
432
290
|
}, (0, _react2.jsx)(_index.Box, {
|
433
291
|
gap: "md",
|
434
292
|
width: "500px"
|
435
|
-
}, editData[item].image && (0, _react2.jsx)(_index.ImageUploadField, {
|
293
|
+
}, _items.editData[item].image && (0, _react2.jsx)(_index.ImageUploadField, {
|
436
294
|
label: "Photo",
|
437
295
|
previewHeight: 40,
|
438
296
|
previewWidth: 40,
|
439
297
|
previewImage: _UserImage["default"]
|
440
|
-
}), (0, _map["default"])(_context10 = editData[item].fields).call(_context10, function (_ref5) {
|
298
|
+
}), (0, _map["default"])(_context10 = _items.editData[item].fields).call(_context10, function (_ref5) {
|
441
299
|
var label = _ref5.label,
|
442
300
|
value = _ref5.value,
|
443
301
|
slot = _ref5.slot;
|
package/lib/cjs/recipes/items.js
CHANGED
@@ -5,9 +5,13 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
5
5
|
_Object$defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
|
-
exports.items = void 0;
|
8
|
+
exports.personalData = exports.items = exports.editData = exports.colorBlockButtons = void 0;
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
9
10
|
var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon"));
|
10
11
|
var _FormSelectIcon = _interopRequireDefault(require("@pingux/mdi-react/FormSelectIcon"));
|
12
|
+
var _index = require("../index");
|
13
|
+
var _UserImage = _interopRequireDefault(require("../utils/devUtils/assets/UserImage.png"));
|
14
|
+
var _react2 = require("@emotion/react");
|
11
15
|
var items = [{
|
12
16
|
email: 'dburkitt5@columbia.edu',
|
13
17
|
firstName: 'Nicola',
|
@@ -74,4 +78,150 @@ var items = [{
|
|
74
78
|
lastName: 'Idel',
|
75
79
|
icon: _AccountIcon["default"]
|
76
80
|
}];
|
77
|
-
exports.items = items;
|
81
|
+
exports.items = items;
|
82
|
+
var personalData = {
|
83
|
+
contactInfo: {
|
84
|
+
label: 'Contact Info',
|
85
|
+
key: 'contactInfoKey',
|
86
|
+
fields: [{
|
87
|
+
label: 'Email',
|
88
|
+
value: 'ednepomuceno@pingidentity.com',
|
89
|
+
isVerified: true
|
90
|
+
}, {
|
91
|
+
label: 'Primary',
|
92
|
+
value: '+1 767-777-3333'
|
93
|
+
}, {
|
94
|
+
label: 'Address',
|
95
|
+
value: '1234 W California St, Denver CO 80101'
|
96
|
+
}]
|
97
|
+
},
|
98
|
+
personalInfo: {
|
99
|
+
label: 'Personal Info',
|
100
|
+
key: 'personalInfoKey',
|
101
|
+
image: _UserImage["default"],
|
102
|
+
fields: [{
|
103
|
+
label: 'Given Name',
|
104
|
+
value: 'Ed'
|
105
|
+
}, {
|
106
|
+
label: 'Famile Name',
|
107
|
+
value: 'Nepomuceno'
|
108
|
+
}]
|
109
|
+
},
|
110
|
+
companyInfo: {
|
111
|
+
label: 'Company Info',
|
112
|
+
key: 'companyInfoKey',
|
113
|
+
fields: [{
|
114
|
+
label: 'Tile',
|
115
|
+
value: 'Interaction Designer'
|
116
|
+
}]
|
117
|
+
},
|
118
|
+
customAttributes: {
|
119
|
+
label: 'Custom Attributes',
|
120
|
+
key: 'customAttributesKey',
|
121
|
+
fields: [{
|
122
|
+
label: 'T-Shirt Size',
|
123
|
+
value: 'Large'
|
124
|
+
}, {
|
125
|
+
label: 'Example Multi-Value Attribute',
|
126
|
+
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
127
|
+
}]
|
128
|
+
},
|
129
|
+
jsonAttributes: {
|
130
|
+
label: 'JSON Attributes',
|
131
|
+
key: 'jsonAttributesKey',
|
132
|
+
badges: ['Address', 'Contact', 'Another Json'],
|
133
|
+
fields: []
|
134
|
+
}
|
135
|
+
};
|
136
|
+
exports.personalData = personalData;
|
137
|
+
var colorBlockButtons = [{
|
138
|
+
text: 'Groups',
|
139
|
+
subtext: '21',
|
140
|
+
isConfigured: true
|
141
|
+
}, {
|
142
|
+
text: 'Population',
|
143
|
+
subtext: 'Denver',
|
144
|
+
isConfigured: true
|
145
|
+
}, {
|
146
|
+
text: 'MFA',
|
147
|
+
subtext: 'Enabled',
|
148
|
+
isConfigured: true
|
149
|
+
}, {
|
150
|
+
text: 'Roles',
|
151
|
+
subtext: '0'
|
152
|
+
}];
|
153
|
+
exports.colorBlockButtons = colorBlockButtons;
|
154
|
+
var editData = {
|
155
|
+
personalInfo: {
|
156
|
+
label: 'Personal Info',
|
157
|
+
key: 'personalInfoKey',
|
158
|
+
image: _UserImage["default"],
|
159
|
+
fields: [{
|
160
|
+
label: 'Prefix',
|
161
|
+
value: ''
|
162
|
+
}, {
|
163
|
+
label: 'Given Name',
|
164
|
+
value: 'Ed'
|
165
|
+
}, {
|
166
|
+
label: 'Middle Name',
|
167
|
+
value: ''
|
168
|
+
}, {
|
169
|
+
label: 'Family Name',
|
170
|
+
value: 'Nepomuceno'
|
171
|
+
}, {
|
172
|
+
label: 'Suffix',
|
173
|
+
value: ''
|
174
|
+
}, {
|
175
|
+
label: 'Formatted',
|
176
|
+
value: ''
|
177
|
+
}, {
|
178
|
+
label: 'Nickname',
|
179
|
+
value: ''
|
180
|
+
}]
|
181
|
+
},
|
182
|
+
contactInfo: {
|
183
|
+
label: 'Contact Info',
|
184
|
+
key: 'contactInfoKey',
|
185
|
+
fields: [{
|
186
|
+
label: 'Email',
|
187
|
+
value: 'ednepomuceno@pingidentity.com',
|
188
|
+
slot: (0, _react2.jsx)(_index.CheckboxField, {
|
189
|
+
mt: "xs",
|
190
|
+
label: "Require Email to be Verified"
|
191
|
+
})
|
192
|
+
}, {
|
193
|
+
label: 'Phone Number',
|
194
|
+
value: '123-456-7890'
|
195
|
+
}, {
|
196
|
+
label: 'Street Address',
|
197
|
+
value: '123 Example St'
|
198
|
+
}, {
|
199
|
+
label: 'Country Code',
|
200
|
+
value: ''
|
201
|
+
}, {
|
202
|
+
label: 'Loality',
|
203
|
+
value: ''
|
204
|
+
}, {
|
205
|
+
label: 'Region',
|
206
|
+
value: ''
|
207
|
+
}, {
|
208
|
+
label: 'Zip Code',
|
209
|
+
value: '12345'
|
210
|
+
}]
|
211
|
+
},
|
212
|
+
companyInfo: {
|
213
|
+
label: 'Company Info',
|
214
|
+
key: 'companyInfoKey',
|
215
|
+
fields: [{
|
216
|
+
label: 'Account ID',
|
217
|
+
value: ''
|
218
|
+
}, {
|
219
|
+
label: 'Type',
|
220
|
+
value: ''
|
221
|
+
}, {
|
222
|
+
label: 'Title',
|
223
|
+
value: ''
|
224
|
+
}]
|
225
|
+
}
|
226
|
+
};
|
227
|
+
exports.editData = editData;
|