@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
@@ -7,10 +7,11 @@ import ChevronRightIcon from '@pingux/mdi-react/ChevronRightIcon';
|
|
7
7
|
import PencilIcon from '@pingux/mdi-react/PencilIcon';
|
8
8
|
import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
9
9
|
import { useOverlayPanelState } from '../hooks';
|
10
|
-
import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar,
|
10
|
+
import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar, EditButton, Icon, Image, ImageUploadField, Item, NoticeIcon, OverlayPanel, OverlayProvider, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SelectField, Tab, Tabs, Text, TextField } from '../index';
|
11
11
|
import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.ts';
|
12
12
|
import UserImage from '../utils/devUtils/assets/UserImage.png';
|
13
13
|
import statuses from '../utils/devUtils/constants/statuses';
|
14
|
+
import { colorBlockButtons, editData, personalData } from './items';
|
14
15
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
16
|
export default {
|
16
17
|
title: 'Recipes/Panel Content',
|
@@ -22,76 +23,6 @@ export default {
|
|
22
23
|
}
|
23
24
|
}
|
24
25
|
};
|
25
|
-
var colorBlockButtons = [{
|
26
|
-
text: 'Groups',
|
27
|
-
subtext: '21',
|
28
|
-
isConfigured: true
|
29
|
-
}, {
|
30
|
-
text: 'Population',
|
31
|
-
subtext: 'Denver',
|
32
|
-
isConfigured: true
|
33
|
-
}, {
|
34
|
-
text: 'MFA',
|
35
|
-
subtext: 'Enabled',
|
36
|
-
isConfigured: true
|
37
|
-
}, {
|
38
|
-
text: 'Roles',
|
39
|
-
subtext: '0'
|
40
|
-
}];
|
41
|
-
var data = {
|
42
|
-
contactInfo: {
|
43
|
-
label: 'Contact Info',
|
44
|
-
key: 'contactInfoKey',
|
45
|
-
fields: [{
|
46
|
-
label: 'Email',
|
47
|
-
value: 'ednepomuceno@pingidentity.com',
|
48
|
-
isVerified: true
|
49
|
-
}, {
|
50
|
-
label: 'Primary',
|
51
|
-
value: '+1 767-777-3333'
|
52
|
-
}, {
|
53
|
-
label: 'Address',
|
54
|
-
value: '1234 W California St, Denver CO 80101'
|
55
|
-
}]
|
56
|
-
},
|
57
|
-
personalInfo: {
|
58
|
-
label: 'Personal Info',
|
59
|
-
key: 'personalInfoKey',
|
60
|
-
image: UserImage,
|
61
|
-
fields: [{
|
62
|
-
label: 'Given Name',
|
63
|
-
value: 'Ed'
|
64
|
-
}, {
|
65
|
-
label: 'Famile Name',
|
66
|
-
value: 'Nepomuceno'
|
67
|
-
}]
|
68
|
-
},
|
69
|
-
companyInfo: {
|
70
|
-
label: 'Company Info',
|
71
|
-
key: 'companyInfoKey',
|
72
|
-
fields: [{
|
73
|
-
label: 'Tile',
|
74
|
-
value: 'Interaction Designer'
|
75
|
-
}]
|
76
|
-
},
|
77
|
-
customAttributes: {
|
78
|
-
label: 'Custom Attributes',
|
79
|
-
key: 'customAttributesKey',
|
80
|
-
fields: [{
|
81
|
-
label: 'T-Shirt Size',
|
82
|
-
value: 'Large'
|
83
|
-
}, {
|
84
|
-
label: 'Example Multi-Value Attribute',
|
85
|
-
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
86
|
-
}]
|
87
|
-
},
|
88
|
-
jsonAttributes: {
|
89
|
-
label: 'JSON Attributes',
|
90
|
-
key: 'jsonAttributesKey',
|
91
|
-
badges: ['Address', 'Contact', 'Another Json'],
|
92
|
-
fields: []
|
93
|
-
}
|
94
|
-
};
|
95
26
|
var OverlayWrapper = function OverlayWrapper(_ref) {
|
96
27
|
var _context, _context2, _context3;
|
97
28
|
var children = _ref.children,
|
@@ -101,7 +32,7 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
|
|
101
32
|
}),
|
102
33
|
state = _useOverlayPanelState.state;
|
103
34
|
var triggerRef = useRef();
|
104
|
-
var personalInfo =
|
35
|
+
var personalInfo = personalData.personalInfo;
|
105
36
|
var fields = personalInfo.fields;
|
106
37
|
var renderBreadcrumbs = ___EmotionJSX(Breadcrumbs, {
|
107
38
|
icon: ChevronRightIcon
|
@@ -166,31 +97,31 @@ export var DisplayPanel = function DisplayPanel() {
|
|
166
97
|
isRow: true,
|
167
98
|
justifyContent: "space-between"
|
168
99
|
}, ___EmotionJSX(AccordionGroup, {
|
169
|
-
defaultExpandedKeys: _mapInstanceProperty(_context4 = _Object$keys(
|
170
|
-
return
|
100
|
+
defaultExpandedKeys: _mapInstanceProperty(_context4 = _Object$keys(personalData)).call(_context4, function (item) {
|
101
|
+
return personalData[item].key;
|
171
102
|
}),
|
172
103
|
labelHeadingTag: "h2"
|
173
|
-
}, _mapInstanceProperty(_context5 = _Object$keys(
|
104
|
+
}, _mapInstanceProperty(_context5 = _Object$keys(personalData)).call(_context5, function (item) {
|
174
105
|
var _context6;
|
175
106
|
return ___EmotionJSX(Item, {
|
176
|
-
"data-id":
|
177
|
-
key:
|
178
|
-
label:
|
179
|
-
textValue:
|
180
|
-
},
|
107
|
+
"data-id": personalData[item].label,
|
108
|
+
key: personalData[item].key,
|
109
|
+
label: personalData[item].label,
|
110
|
+
textValue: personalData[item].label
|
111
|
+
}, personalData[item].image ? ___EmotionJSX(Box, {
|
181
112
|
isRow: true,
|
182
113
|
gap: "md"
|
183
114
|
}, ___EmotionJSX(Image, {
|
184
115
|
src: UserImage,
|
185
116
|
alt: "user"
|
186
117
|
}), ___EmotionJSX(LabelValuePairs, {
|
187
|
-
fields:
|
118
|
+
fields: personalData[item].fields
|
188
119
|
})) : ___EmotionJSX(LabelValuePairs, {
|
189
|
-
fields:
|
190
|
-
}),
|
120
|
+
fields: personalData[item].fields
|
121
|
+
}), personalData[item].badges && ___EmotionJSX(Box, {
|
191
122
|
isRow: true,
|
192
123
|
gap: "sm"
|
193
|
-
}, _mapInstanceProperty(_context6 =
|
124
|
+
}, _mapInstanceProperty(_context6 = personalData[item].badges).call(_context6, function (badge) {
|
194
125
|
return ___EmotionJSX(Badge, {
|
195
126
|
label: badge,
|
196
127
|
variant: "defaultBadge",
|
@@ -276,7 +207,7 @@ export var ColorBlockButton = function ColorBlockButton(_ref2) {
|
|
276
207
|
};
|
277
208
|
export var LabelValuePairs = function LabelValuePairs(_ref3) {
|
278
209
|
var _ref3$fields = _ref3.fields,
|
279
|
-
fields = _ref3$fields === void 0 ?
|
210
|
+
fields = _ref3$fields === void 0 ? personalData.contactInfo.fields : _ref3$fields;
|
280
211
|
return ___EmotionJSX(Box, {
|
281
212
|
gap: "md",
|
282
213
|
maxWidth: "675px"
|
@@ -306,79 +237,6 @@ export var LabelValuePairs = function LabelValuePairs(_ref3) {
|
|
306
237
|
}, "Verified"))));
|
307
238
|
}));
|
308
239
|
};
|
309
|
-
var editData = {
|
310
|
-
personalInfo: {
|
311
|
-
label: 'Personal Info',
|
312
|
-
key: 'personalInfoKey',
|
313
|
-
image: UserImage,
|
314
|
-
fields: [{
|
315
|
-
label: 'Prefix',
|
316
|
-
value: ''
|
317
|
-
}, {
|
318
|
-
label: 'Given Name',
|
319
|
-
value: 'Ed'
|
320
|
-
}, {
|
321
|
-
label: 'Middle Name',
|
322
|
-
value: ''
|
323
|
-
}, {
|
324
|
-
label: 'Family Name',
|
325
|
-
value: 'Nepomuceno'
|
326
|
-
}, {
|
327
|
-
label: 'Suffix',
|
328
|
-
value: ''
|
329
|
-
}, {
|
330
|
-
label: 'Formatted',
|
331
|
-
value: ''
|
332
|
-
}, {
|
333
|
-
label: 'Nickname',
|
334
|
-
value: ''
|
335
|
-
}]
|
336
|
-
},
|
337
|
-
contactInfo: {
|
338
|
-
label: 'Contact Info',
|
339
|
-
key: 'contactInfoKey',
|
340
|
-
fields: [{
|
341
|
-
label: 'Email',
|
342
|
-
value: 'ednepomuceno@pingidentity.com',
|
343
|
-
slot: ___EmotionJSX(CheckboxField, {
|
344
|
-
mt: "xs",
|
345
|
-
label: "Require Email to be Verified"
|
346
|
-
})
|
347
|
-
}, {
|
348
|
-
label: 'Phone Number',
|
349
|
-
value: '123-456-7890'
|
350
|
-
}, {
|
351
|
-
label: 'Street Address',
|
352
|
-
value: '123 Example St'
|
353
|
-
}, {
|
354
|
-
label: 'Country Code',
|
355
|
-
value: ''
|
356
|
-
}, {
|
357
|
-
label: 'Loality',
|
358
|
-
value: ''
|
359
|
-
}, {
|
360
|
-
label: 'Region',
|
361
|
-
value: ''
|
362
|
-
}, {
|
363
|
-
label: 'Zip Code',
|
364
|
-
value: '12345'
|
365
|
-
}]
|
366
|
-
},
|
367
|
-
companyInfo: {
|
368
|
-
label: 'Company Info',
|
369
|
-
key: 'companyInfoKey',
|
370
|
-
fields: [{
|
371
|
-
label: 'Account ID',
|
372
|
-
value: ''
|
373
|
-
}, {
|
374
|
-
label: 'Type',
|
375
|
-
value: ''
|
376
|
-
}, {
|
377
|
-
label: 'Title',
|
378
|
-
value: ''
|
379
|
-
}]
|
380
|
-
}
|
381
|
-
};
|
382
240
|
export var EditPanel = function EditPanel() {
|
383
241
|
var _context7, _context8, _context9;
|
384
242
|
return ___EmotionJSX(OverlayWrapper, {
|
package/lib/recipes/items.js
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
2
3
|
import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
|
4
|
+
import { CheckboxField } from '../index';
|
5
|
+
import UserImage from '../utils/devUtils/assets/UserImage.png';
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
3
7
|
export var items = [{
|
4
8
|
email: 'dburkitt5@columbia.edu',
|
5
9
|
firstName: 'Nicola',
|
@@ -65,4 +69,147 @@ export var items = [{
|
|
65
69
|
firstName: 'Andromache',
|
66
70
|
lastName: 'Idel',
|
67
71
|
icon: AccountIcon
|
68
|
-
}];
|
72
|
+
}];
|
73
|
+
export var personalData = {
|
74
|
+
contactInfo: {
|
75
|
+
label: 'Contact Info',
|
76
|
+
key: 'contactInfoKey',
|
77
|
+
fields: [{
|
78
|
+
label: 'Email',
|
79
|
+
value: 'ednepomuceno@pingidentity.com',
|
80
|
+
isVerified: true
|
81
|
+
}, {
|
82
|
+
label: 'Primary',
|
83
|
+
value: '+1 767-777-3333'
|
84
|
+
}, {
|
85
|
+
label: 'Address',
|
86
|
+
value: '1234 W California St, Denver CO 80101'
|
87
|
+
}]
|
88
|
+
},
|
89
|
+
personalInfo: {
|
90
|
+
label: 'Personal Info',
|
91
|
+
key: 'personalInfoKey',
|
92
|
+
image: UserImage,
|
93
|
+
fields: [{
|
94
|
+
label: 'Given Name',
|
95
|
+
value: 'Ed'
|
96
|
+
}, {
|
97
|
+
label: 'Famile Name',
|
98
|
+
value: 'Nepomuceno'
|
99
|
+
}]
|
100
|
+
},
|
101
|
+
companyInfo: {
|
102
|
+
label: 'Company Info',
|
103
|
+
key: 'companyInfoKey',
|
104
|
+
fields: [{
|
105
|
+
label: 'Tile',
|
106
|
+
value: 'Interaction Designer'
|
107
|
+
}]
|
108
|
+
},
|
109
|
+
customAttributes: {
|
110
|
+
label: 'Custom Attributes',
|
111
|
+
key: 'customAttributesKey',
|
112
|
+
fields: [{
|
113
|
+
label: 'T-Shirt Size',
|
114
|
+
value: 'Large'
|
115
|
+
}, {
|
116
|
+
label: 'Example Multi-Value Attribute',
|
117
|
+
value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
|
118
|
+
}]
|
119
|
+
},
|
120
|
+
jsonAttributes: {
|
121
|
+
label: 'JSON Attributes',
|
122
|
+
key: 'jsonAttributesKey',
|
123
|
+
badges: ['Address', 'Contact', 'Another Json'],
|
124
|
+
fields: []
|
125
|
+
}
|
126
|
+
};
|
127
|
+
export var colorBlockButtons = [{
|
128
|
+
text: 'Groups',
|
129
|
+
subtext: '21',
|
130
|
+
isConfigured: true
|
131
|
+
}, {
|
132
|
+
text: 'Population',
|
133
|
+
subtext: 'Denver',
|
134
|
+
isConfigured: true
|
135
|
+
}, {
|
136
|
+
text: 'MFA',
|
137
|
+
subtext: 'Enabled',
|
138
|
+
isConfigured: true
|
139
|
+
}, {
|
140
|
+
text: 'Roles',
|
141
|
+
subtext: '0'
|
142
|
+
}];
|
143
|
+
export var editData = {
|
144
|
+
personalInfo: {
|
145
|
+
label: 'Personal Info',
|
146
|
+
key: 'personalInfoKey',
|
147
|
+
image: UserImage,
|
148
|
+
fields: [{
|
149
|
+
label: 'Prefix',
|
150
|
+
value: ''
|
151
|
+
}, {
|
152
|
+
label: 'Given Name',
|
153
|
+
value: 'Ed'
|
154
|
+
}, {
|
155
|
+
label: 'Middle Name',
|
156
|
+
value: ''
|
157
|
+
}, {
|
158
|
+
label: 'Family Name',
|
159
|
+
value: 'Nepomuceno'
|
160
|
+
}, {
|
161
|
+
label: 'Suffix',
|
162
|
+
value: ''
|
163
|
+
}, {
|
164
|
+
label: 'Formatted',
|
165
|
+
value: ''
|
166
|
+
}, {
|
167
|
+
label: 'Nickname',
|
168
|
+
value: ''
|
169
|
+
}]
|
170
|
+
},
|
171
|
+
contactInfo: {
|
172
|
+
label: 'Contact Info',
|
173
|
+
key: 'contactInfoKey',
|
174
|
+
fields: [{
|
175
|
+
label: 'Email',
|
176
|
+
value: 'ednepomuceno@pingidentity.com',
|
177
|
+
slot: ___EmotionJSX(CheckboxField, {
|
178
|
+
mt: "xs",
|
179
|
+
label: "Require Email to be Verified"
|
180
|
+
})
|
181
|
+
}, {
|
182
|
+
label: 'Phone Number',
|
183
|
+
value: '123-456-7890'
|
184
|
+
}, {
|
185
|
+
label: 'Street Address',
|
186
|
+
value: '123 Example St'
|
187
|
+
}, {
|
188
|
+
label: 'Country Code',
|
189
|
+
value: ''
|
190
|
+
}, {
|
191
|
+
label: 'Loality',
|
192
|
+
value: ''
|
193
|
+
}, {
|
194
|
+
label: 'Region',
|
195
|
+
value: ''
|
196
|
+
}, {
|
197
|
+
label: 'Zip Code',
|
198
|
+
value: '12345'
|
199
|
+
}]
|
200
|
+
},
|
201
|
+
companyInfo: {
|
202
|
+
label: 'Company Info',
|
203
|
+
key: 'companyInfoKey',
|
204
|
+
fields: [{
|
205
|
+
label: 'Account ID',
|
206
|
+
value: ''
|
207
|
+
}, {
|
208
|
+
label: 'Type',
|
209
|
+
value: ''
|
210
|
+
}, {
|
211
|
+
label: 'Title',
|
212
|
+
value: ''
|
213
|
+
}]
|
214
|
+
}
|
215
|
+
};
|