@pingux/astro 2.30.1-alpha.0 → 2.31.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/components/Badge/Badge.styles.js +21 -12
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/recipes/PanelContent.stories.js +496 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +4 -0
- package/lib/cjs/utils/devUtils/assets/UserImage.png +0 -0
- package/lib/components/Badge/Badge.styles.js +21 -12
- package/lib/index.js +1 -0
- package/lib/recipes/PanelContent.stories.js +477 -0
- package/lib/utils/designUtils/figmaLinks.js +4 -0
- package/lib/utils/devUtils/assets/UserImage.png +0 -0
- package/package.json +1 -1
@@ -42,6 +42,14 @@ var baseBadge = {
|
|
42
42
|
}
|
43
43
|
};
|
44
44
|
exports.baseBadge = baseBadge;
|
45
|
+
var defaultBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
46
|
+
backgroundColor: 'white !important',
|
47
|
+
outline: '1px solid',
|
48
|
+
outlineColor: 'neutral.80',
|
49
|
+
'& span': {
|
50
|
+
color: 'text.primary'
|
51
|
+
}
|
52
|
+
});
|
45
53
|
var multivaluesBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
46
54
|
alignSelf: 'center',
|
47
55
|
cursor: 'default',
|
@@ -188,24 +196,25 @@ var activeStatusBadge = _objectSpread(_objectSpread({}, statusBadge), {}, {
|
|
188
196
|
backgroundColor: '#F7F8FD !important'
|
189
197
|
});
|
190
198
|
var _default = {
|
199
|
+
activeStatusBadge: activeStatusBadge,
|
200
|
+
badgeDeleteButton: badgeDeleteButton,
|
191
201
|
baseBadge: baseBadge,
|
202
|
+
convenienceDefault: convenienceDefault,
|
203
|
+
countBadge: countBadge,
|
204
|
+
countNeutral: countNeutral,
|
205
|
+
criticalStatusBadge: criticalStatusBadge,
|
206
|
+
defaultBadge: defaultBadge,
|
207
|
+
deleteButton: deleteButton,
|
192
208
|
environmentBadge: environmentBadge,
|
209
|
+
errorCalloutBadge: errorCalloutBadge,
|
210
|
+
healthyStatusBadge: healthyStatusBadge,
|
211
|
+
infoCalloutBadge: infoCalloutBadge,
|
193
212
|
itemBadgeWithSlot: itemBadgeWithSlot,
|
194
213
|
multivaluesBadge: multivaluesBadge,
|
195
214
|
readOnlyBadge: readOnlyBadge,
|
196
215
|
selectedItemBadge: selectedItemBadge,
|
197
|
-
deleteButton: deleteButton,
|
198
|
-
countBadge: countBadge,
|
199
|
-
countNeutral: countNeutral,
|
200
|
-
badgeDeleteButton: badgeDeleteButton,
|
201
|
-
convenienceDefault: convenienceDefault,
|
202
|
-
errorCalloutBadge: errorCalloutBadge,
|
203
|
-
warningCalloutBadge: warningCalloutBadge,
|
204
216
|
successCalloutBadge: successCalloutBadge,
|
205
|
-
|
206
|
-
|
207
|
-
warningStatusBadge: warningStatusBadge,
|
208
|
-
healthyStatusBadge: healthyStatusBadge,
|
209
|
-
activeStatusBadge: activeStatusBadge
|
217
|
+
warningCalloutBadge: warningCalloutBadge,
|
218
|
+
warningStatusBadge: warningStatusBadge
|
210
219
|
};
|
211
220
|
exports["default"] = _default;
|
package/lib/cjs/index.d.ts
CHANGED
@@ -65,6 +65,7 @@ export { default as HelpHint } from './components/HelpHint';
|
|
65
65
|
export * from './components/HelpHint';
|
66
66
|
export { default as Icon } from './components/Icon';
|
67
67
|
export * from './components/Icon';
|
68
|
+
export { NoticeIcon } from './components/Icon/NoticeIcon';
|
68
69
|
export { default as IconBadge } from './components/IconBadge';
|
69
70
|
export * from './components/IconBadge';
|
70
71
|
export { default as IconButton } from './components/IconButton';
|
package/lib/cjs/index.js
CHANGED
@@ -54,6 +54,7 @@ var _exportNames = {
|
|
54
54
|
FileInputField: true,
|
55
55
|
HelpHint: true,
|
56
56
|
Icon: true,
|
57
|
+
NoticeIcon: true,
|
57
58
|
IconBadge: true,
|
58
59
|
IconButton: true,
|
59
60
|
IconButtonToggle: true,
|
@@ -550,6 +551,12 @@ _Object$defineProperty(exports, "NavBarSection", {
|
|
550
551
|
return _NavBarSection["default"];
|
551
552
|
}
|
552
553
|
});
|
554
|
+
_Object$defineProperty(exports, "NoticeIcon", {
|
555
|
+
enumerable: true,
|
556
|
+
get: function get() {
|
557
|
+
return _NoticeIcon.NoticeIcon;
|
558
|
+
}
|
559
|
+
});
|
553
560
|
_Object$defineProperty(exports, "NumberField", {
|
554
561
|
enumerable: true,
|
555
562
|
get: function get() {
|
@@ -1147,6 +1154,7 @@ _forEachInstanceProperty(_context25 = _Object$keys(_Icon)).call(_context25, func
|
|
1147
1154
|
}
|
1148
1155
|
});
|
1149
1156
|
});
|
1157
|
+
var _NoticeIcon = require("./components/Icon/NoticeIcon");
|
1150
1158
|
var _IconBadge = _interopRequireWildcard(require("./components/IconBadge"));
|
1151
1159
|
_forEachInstanceProperty(_context26 = _Object$keys(_IconBadge)).call(_context26, function (key) {
|
1152
1160
|
if (key === "default" || key === "__esModule") return;
|
@@ -0,0 +1,496 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
8
|
+
_Object$defineProperty(exports, "__esModule", {
|
9
|
+
value: true
|
10
|
+
});
|
11
|
+
exports["default"] = exports.LabelValuePairs = exports.EditPanel = exports.DisplayPanel = exports.ColorBlockButton = exports.AddAttributeButton = void 0;
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
13
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
14
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
15
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
var _reactStately = require("react-stately");
|
18
|
+
var _PencilIcon = _interopRequireDefault(require("@pingux/mdi-react/PencilIcon"));
|
19
|
+
var _PlusIcon = _interopRequireDefault(require("@pingux/mdi-react/PlusIcon"));
|
20
|
+
var _hooks = require("../hooks");
|
21
|
+
var _index = require("../index");
|
22
|
+
var _figmaLinks = require("../utils/designUtils/figmaLinks.js");
|
23
|
+
var _UserImage = _interopRequireDefault(require("../utils/devUtils/assets/UserImage.png"));
|
24
|
+
var _statuses = _interopRequireDefault(require("../utils/devUtils/constants/statuses"));
|
25
|
+
var _react2 = require("@emotion/react");
|
26
|
+
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
|
+
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; }
|
28
|
+
var _default = {
|
29
|
+
title: 'Experimental/PanelContent',
|
30
|
+
parameters: {
|
31
|
+
docs: {
|
32
|
+
source: {
|
33
|
+
type: 'code'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
};
|
38
|
+
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
|
+
var OverlayWrapper = function OverlayWrapper(_ref) {
|
110
|
+
var children = _ref.children;
|
111
|
+
var _useOverlayPanelState = (0, _hooks.useOverlayPanelState)({
|
112
|
+
isDefaultOpen: true
|
113
|
+
}),
|
114
|
+
state = _useOverlayPanelState.state;
|
115
|
+
var triggerRef = (0, _react.useRef)();
|
116
|
+
return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
117
|
+
ref: triggerRef,
|
118
|
+
onPress: state.open
|
119
|
+
}, "Open Panel"), (0, _react2.jsx)(_index.OverlayPanel, {
|
120
|
+
isOpen: state.isOpen,
|
121
|
+
isTransitioning: state.isTransitioning,
|
122
|
+
size: "large",
|
123
|
+
p: "0"
|
124
|
+
}, (0, _react2.jsx)(_index.PanelHeader, {
|
125
|
+
data: {
|
126
|
+
image: {
|
127
|
+
src: _UserImage["default"],
|
128
|
+
alt: 'user image'
|
129
|
+
},
|
130
|
+
text: data.personalInfo.fields[0].value,
|
131
|
+
subtext: data.personalInfo.fields[1].value
|
132
|
+
}
|
133
|
+
}, (0, _react2.jsx)(_index.PanelHeaderSwitchField, null), (0, _react2.jsx)(_index.PanelHeaderMenu, null), (0, _react2.jsx)(_index.PanelHeaderCloseButton, {
|
134
|
+
onPress: state.close
|
135
|
+
})), children));
|
136
|
+
};
|
137
|
+
var DisplayPanel = function DisplayPanel() {
|
138
|
+
var _context, _context2;
|
139
|
+
var renderProfileTab = (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Box, {
|
140
|
+
isRow: true,
|
141
|
+
gap: "md",
|
142
|
+
mb: "20px"
|
143
|
+
}, (0, _map["default"])(colorBlockButtons).call(colorBlockButtons, function (tileData) {
|
144
|
+
return (0, _react2.jsx)(ColorBlockButton, {
|
145
|
+
buttonData: tileData,
|
146
|
+
key: "".concat(tileData.text, "-key")
|
147
|
+
});
|
148
|
+
})), (0, _react2.jsx)(_index.Box, {
|
149
|
+
isRow: true,
|
150
|
+
justifyContent: "space-between"
|
151
|
+
}, (0, _react2.jsx)(_index.AccordionGroup, {
|
152
|
+
defaultExpandedKeys: (0, _map["default"])(_context = (0, _keys["default"])(data)).call(_context, function (item) {
|
153
|
+
return data[item].key;
|
154
|
+
}),
|
155
|
+
labelHeadingTag: "h2"
|
156
|
+
}, (0, _map["default"])(_context2 = (0, _keys["default"])(data)).call(_context2, function (item) {
|
157
|
+
var _context3;
|
158
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
159
|
+
"data-id": data[item].label,
|
160
|
+
key: data[item].key,
|
161
|
+
label: data[item].label,
|
162
|
+
textValue: data[item].label
|
163
|
+
}, data[item].image ? (0, _react2.jsx)(_index.Box, {
|
164
|
+
isRow: true,
|
165
|
+
gap: "md"
|
166
|
+
}, (0, _react2.jsx)(_index.Image, {
|
167
|
+
src: _UserImage["default"],
|
168
|
+
alt: "user"
|
169
|
+
}), (0, _react2.jsx)(LabelValuePairs, {
|
170
|
+
fields: data[item].fields
|
171
|
+
})) : (0, _react2.jsx)(LabelValuePairs, {
|
172
|
+
fields: data[item].fields
|
173
|
+
}), data[item].badges && (0, _react2.jsx)(_index.Box, {
|
174
|
+
isRow: true,
|
175
|
+
gap: "sm"
|
176
|
+
}, (0, _map["default"])(_context3 = data[item].badges).call(_context3, function (badge) {
|
177
|
+
return (0, _react2.jsx)(_index.Badge, {
|
178
|
+
label: badge,
|
179
|
+
variant: "defaultBadge",
|
180
|
+
key: "".concat(badge, "-key")
|
181
|
+
});
|
182
|
+
})));
|
183
|
+
})), (0, _react2.jsx)(_index.EditButton, {
|
184
|
+
size: "lg"
|
185
|
+
})));
|
186
|
+
var tabs = [{
|
187
|
+
name: 'Profile',
|
188
|
+
children: renderProfileTab
|
189
|
+
}, {
|
190
|
+
name: 'Groups',
|
191
|
+
children: 'Groups'
|
192
|
+
}, {
|
193
|
+
name: 'Roles',
|
194
|
+
children: 'Roles'
|
195
|
+
}, {
|
196
|
+
name: 'Services',
|
197
|
+
list: [{
|
198
|
+
key: 'service1',
|
199
|
+
name: 'Service 1',
|
200
|
+
children: 'Service 1',
|
201
|
+
role: 'listitem'
|
202
|
+
}, {
|
203
|
+
key: 'service2',
|
204
|
+
name: 'Service 2',
|
205
|
+
children: 'Service 2',
|
206
|
+
role: 'listitem'
|
207
|
+
}]
|
208
|
+
}, {
|
209
|
+
name: 'API',
|
210
|
+
children: 'API'
|
211
|
+
}];
|
212
|
+
return (0, _react2.jsx)(OverlayWrapper, null, (0, _react2.jsx)(_index.Box, {
|
213
|
+
p: "lg",
|
214
|
+
pt: "xs"
|
215
|
+
}, (0, _react2.jsx)(_index.Tabs, {
|
216
|
+
items: tabs,
|
217
|
+
mode: "list",
|
218
|
+
tabListProps: {
|
219
|
+
justifyContent: 'center',
|
220
|
+
mb: 'lg'
|
221
|
+
}
|
222
|
+
}, function (item) {
|
223
|
+
return (0, _react2.jsx)(_index.Tab, (0, _extends2["default"])({
|
224
|
+
key: item.name,
|
225
|
+
title: item.name
|
226
|
+
}, item), item.children);
|
227
|
+
})));
|
228
|
+
};
|
229
|
+
exports.DisplayPanel = DisplayPanel;
|
230
|
+
DisplayPanel.parameters = {
|
231
|
+
design: {
|
232
|
+
type: 'figma',
|
233
|
+
url: _figmaLinks.FIGMA_LINKS.panelContent.displayPanel
|
234
|
+
},
|
235
|
+
a11y: {
|
236
|
+
config: {
|
237
|
+
rules: [{
|
238
|
+
id: 'color-contrast',
|
239
|
+
enabled: false
|
240
|
+
}]
|
241
|
+
}
|
242
|
+
}
|
243
|
+
};
|
244
|
+
var ColorBlockButton = function ColorBlockButton(_ref2) {
|
245
|
+
var _ref2$buttonData = _ref2.buttonData,
|
246
|
+
buttonData = _ref2$buttonData === void 0 ? colorBlockButtons[0] : _ref2$buttonData;
|
247
|
+
return (0, _react2.jsx)(_index.Button, {
|
248
|
+
variant: "colorBlock",
|
249
|
+
className: buttonData.isConfigured ? 'is-configured' : ''
|
250
|
+
}, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
251
|
+
variant: "buttonTitle"
|
252
|
+
}, buttonData.text), (0, _react2.jsx)(_index.Text, {
|
253
|
+
variant: "buttonSubtitle"
|
254
|
+
}, buttonData.subtext)), (0, _react2.jsx)(_index.Icon, {
|
255
|
+
icon: _PencilIcon["default"],
|
256
|
+
title: {
|
257
|
+
name: 'Create Icon'
|
258
|
+
}
|
259
|
+
}));
|
260
|
+
};
|
261
|
+
exports.ColorBlockButton = ColorBlockButton;
|
262
|
+
var LabelValuePairs = function LabelValuePairs(_ref3) {
|
263
|
+
var _ref3$fields = _ref3.fields,
|
264
|
+
fields = _ref3$fields === void 0 ? data.contactInfo.fields : _ref3$fields;
|
265
|
+
return (0, _react2.jsx)(_index.Box, {
|
266
|
+
gap: "md",
|
267
|
+
maxWidth: "675px"
|
268
|
+
}, (0, _map["default"])(fields).call(fields, function (_ref4) {
|
269
|
+
var label = _ref4.label,
|
270
|
+
value = _ref4.value,
|
271
|
+
isVerified = _ref4.isVerified;
|
272
|
+
return (0, _react2.jsx)(_index.Box, {
|
273
|
+
gap: "xs",
|
274
|
+
key: "".concat(label, "-key")
|
275
|
+
}, (0, _react2.jsx)(_index.Text, {
|
276
|
+
variant: "h4"
|
277
|
+
}, label), (0, _react2.jsx)(_index.Box, {
|
278
|
+
isRow: true,
|
279
|
+
gap: "md"
|
280
|
+
}, (0, _react2.jsx)(_index.Text, null, value), isVerified && (0, _react2.jsx)(_index.Box, {
|
281
|
+
isRow: true,
|
282
|
+
gap: "xs"
|
283
|
+
}, (0, _react2.jsx)(_index.NoticeIcon, {
|
284
|
+
color: "success.dark",
|
285
|
+
status: _statuses["default"].SUCCESS,
|
286
|
+
"aria-label": "".concat(_statuses["default"].SUCCESS, "-icon"),
|
287
|
+
size: "xs"
|
288
|
+
}), (0, _react2.jsx)(_index.Text, {
|
289
|
+
variant: "listSubtitle",
|
290
|
+
color: "success.dark"
|
291
|
+
}, "Verified"))));
|
292
|
+
}));
|
293
|
+
};
|
294
|
+
exports.LabelValuePairs = LabelValuePairs;
|
295
|
+
var editData = {
|
296
|
+
personalInfo: {
|
297
|
+
label: 'Personal Info',
|
298
|
+
key: 'personalInfoKey',
|
299
|
+
image: _UserImage["default"],
|
300
|
+
fields: [{
|
301
|
+
label: 'Prefix',
|
302
|
+
value: ''
|
303
|
+
}, {
|
304
|
+
label: 'Given Name',
|
305
|
+
value: 'Ed'
|
306
|
+
}, {
|
307
|
+
label: 'Middle Name',
|
308
|
+
value: ''
|
309
|
+
}, {
|
310
|
+
label: 'Family Name',
|
311
|
+
value: 'Nepomuceno'
|
312
|
+
}, {
|
313
|
+
label: 'Suffix',
|
314
|
+
value: ''
|
315
|
+
}, {
|
316
|
+
label: 'Formatted',
|
317
|
+
value: ''
|
318
|
+
}, {
|
319
|
+
label: 'Nickname',
|
320
|
+
value: ''
|
321
|
+
}]
|
322
|
+
},
|
323
|
+
contactInfo: {
|
324
|
+
label: 'Contact Info',
|
325
|
+
key: 'contactInfoKey',
|
326
|
+
fields: [{
|
327
|
+
label: 'Email',
|
328
|
+
value: 'ednepomuceno@pingidentity.com',
|
329
|
+
slot: (0, _react2.jsx)(_index.CheckboxField, {
|
330
|
+
mt: "xs",
|
331
|
+
label: "Require Email to be Verified"
|
332
|
+
})
|
333
|
+
}, {
|
334
|
+
label: 'Phone Number',
|
335
|
+
value: '123-456-7890'
|
336
|
+
}, {
|
337
|
+
label: 'Street Address',
|
338
|
+
value: '123 Example St'
|
339
|
+
}, {
|
340
|
+
label: 'Country Code',
|
341
|
+
value: ''
|
342
|
+
}, {
|
343
|
+
label: 'Loality',
|
344
|
+
value: ''
|
345
|
+
}, {
|
346
|
+
label: 'Region',
|
347
|
+
value: ''
|
348
|
+
}, {
|
349
|
+
label: 'Zip Code',
|
350
|
+
value: '12345'
|
351
|
+
}]
|
352
|
+
},
|
353
|
+
companyInfo: {
|
354
|
+
label: 'Company Info',
|
355
|
+
key: 'companyInfoKey',
|
356
|
+
fields: [{
|
357
|
+
label: 'Account ID',
|
358
|
+
value: ''
|
359
|
+
}, {
|
360
|
+
label: 'Type',
|
361
|
+
value: ''
|
362
|
+
}, {
|
363
|
+
label: 'Title',
|
364
|
+
value: ''
|
365
|
+
}]
|
366
|
+
}
|
367
|
+
};
|
368
|
+
var EditPanel = function EditPanel() {
|
369
|
+
var _context4, _context5, _context6;
|
370
|
+
return (0, _react2.jsx)(OverlayWrapper, null, (0, _react2.jsx)(_index.Box, {
|
371
|
+
p: "lg",
|
372
|
+
pb: "0"
|
373
|
+
}, (0, _react2.jsx)(_index.Box, {
|
374
|
+
gap: "md",
|
375
|
+
mb: "20px",
|
376
|
+
width: "500px"
|
377
|
+
}, (0, _react2.jsx)(_index.TextField, {
|
378
|
+
defaultValue: "ednepomuceno",
|
379
|
+
isRequired: true,
|
380
|
+
label: "Username"
|
381
|
+
}), (0, _react2.jsx)(_index.SelectField, {
|
382
|
+
label: "Population",
|
383
|
+
isRequired: true,
|
384
|
+
defaultSelectedKey: "population"
|
385
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
386
|
+
key: "population"
|
387
|
+
}, "Denver"))), (0, _react2.jsx)(_index.AccordionGroup, {
|
388
|
+
defaultExpandedKeys: (0, _concat["default"])(_context4 = []).call(_context4, (0, _map["default"])(_context5 = (0, _keys["default"])(editData)).call(_context5, function (item) {
|
389
|
+
return editData[item].key;
|
390
|
+
}), ['preferencesKey', 'customAttributesKey', 'jsonAttributesKey']),
|
391
|
+
labelHeadingTag: "h2"
|
392
|
+
}, (0, _map["default"])(_context6 = (0, _keys["default"])(editData)).call(_context6, function (item) {
|
393
|
+
var _context7;
|
394
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
395
|
+
"data-id": editData[item].label,
|
396
|
+
key: editData[item].key,
|
397
|
+
label: editData[item].label,
|
398
|
+
textValue: editData[item].label
|
399
|
+
}, (0, _react2.jsx)(_index.Box, {
|
400
|
+
gap: "md",
|
401
|
+
width: "500px"
|
402
|
+
}, editData[item].image && (0, _react2.jsx)(_index.ImageUploadField, {
|
403
|
+
label: "Photo",
|
404
|
+
previewHeight: 40,
|
405
|
+
previewWidth: 40,
|
406
|
+
previewImage: _UserImage["default"]
|
407
|
+
}), (0, _map["default"])(_context7 = editData[item].fields).call(_context7, function (_ref5) {
|
408
|
+
var label = _ref5.label,
|
409
|
+
value = _ref5.value,
|
410
|
+
slot = _ref5.slot;
|
411
|
+
return (0, _react2.jsx)(_index.Box, {
|
412
|
+
key: "".concat(label, "-key")
|
413
|
+
}, (0, _react2.jsx)(_index.TextField, {
|
414
|
+
label: label,
|
415
|
+
defaultValue: value
|
416
|
+
}), slot);
|
417
|
+
})));
|
418
|
+
}), (0, _react2.jsx)(_reactStately.Item, {
|
419
|
+
"data-id": "preferences",
|
420
|
+
key: "preferencesKey",
|
421
|
+
label: "Preferences",
|
422
|
+
textValue: "Preferences"
|
423
|
+
}, (0, _react2.jsx)(_index.Box, {
|
424
|
+
gap: "md",
|
425
|
+
width: "500px"
|
426
|
+
}, (0, _react2.jsx)(_index.SelectField, {
|
427
|
+
label: "Preferred Language",
|
428
|
+
defaultSelectedKey: "language"
|
429
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
430
|
+
key: "language"
|
431
|
+
}, "Select a Language")), (0, _react2.jsx)(_index.SelectField, {
|
432
|
+
label: "Locale",
|
433
|
+
defaultSelectedKey: "language"
|
434
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
435
|
+
key: "language"
|
436
|
+
}, "Select a locale")), (0, _react2.jsx)(_index.SelectField, {
|
437
|
+
label: "Timezone",
|
438
|
+
defaultSelectedKey: "language"
|
439
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
440
|
+
key: "language"
|
441
|
+
}, "Select a timezone")))), (0, _react2.jsx)(_reactStately.Item, {
|
442
|
+
"data-id": "customAttributes",
|
443
|
+
key: "customAttributesKey",
|
444
|
+
label: "Custom Attributes",
|
445
|
+
textValue: "Custom Attributes"
|
446
|
+
}, (0, _react2.jsx)(AddAttributeButton, null), (0, _react2.jsx)(_index.Text, {
|
447
|
+
fontWeight: "-1",
|
448
|
+
fontSize: "md",
|
449
|
+
textAlign: "center"
|
450
|
+
}, "Click + Add to select a custom attribute")), (0, _react2.jsx)(_reactStately.Item, {
|
451
|
+
"data-id": "jsonAttributes",
|
452
|
+
key: "jsonAttributesKey",
|
453
|
+
label: "JSON Attributes",
|
454
|
+
textValue: "JSON Attributes"
|
455
|
+
}, (0, _react2.jsx)(AddAttributeButton, null), (0, _react2.jsx)(_index.Text, {
|
456
|
+
fontWeight: "-1",
|
457
|
+
fontSize: "md",
|
458
|
+
textAlign: "center"
|
459
|
+
}, "Click + Add to select a JSON attribute")))), (0, _react2.jsx)(_index.ButtonBar, null, (0, _react2.jsx)(_index.Button, {
|
460
|
+
variant: "primary"
|
461
|
+
}, "Save"), (0, _react2.jsx)(_index.Button, {
|
462
|
+
variant: "link"
|
463
|
+
}, "Cancel")));
|
464
|
+
};
|
465
|
+
exports.EditPanel = EditPanel;
|
466
|
+
EditPanel.parameters = {
|
467
|
+
design: {
|
468
|
+
type: 'figma',
|
469
|
+
url: _figmaLinks.FIGMA_LINKS.panelContent.editPanel
|
470
|
+
},
|
471
|
+
a11y: {
|
472
|
+
config: {
|
473
|
+
rules: [{
|
474
|
+
id: 'color-contrast',
|
475
|
+
enabled: false
|
476
|
+
}]
|
477
|
+
}
|
478
|
+
}
|
479
|
+
};
|
480
|
+
var AddAttributeButton = function AddAttributeButton() {
|
481
|
+
return (0, _react2.jsx)(_index.Box, {
|
482
|
+
sx: {
|
483
|
+
position: 'relative',
|
484
|
+
left: '700px',
|
485
|
+
top: '-35px',
|
486
|
+
width: 0,
|
487
|
+
height: 0
|
488
|
+
}
|
489
|
+
}, (0, _react2.jsx)(_index.Button, {
|
490
|
+
variant: "inlineWithIcon"
|
491
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
492
|
+
icon: _PlusIcon["default"],
|
493
|
+
size: "xs"
|
494
|
+
}), "Add"));
|
495
|
+
};
|
496
|
+
exports.AddAttributeButton = AddAttributeButton;
|
@@ -108,6 +108,10 @@ var FIGMA_LINKS = {
|
|
108
108
|
OnewayToBidirectionalArrow: {
|
109
109
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=43504-1214&mode=design&t=R4kdj0liRHxsqbV5-0'
|
110
110
|
},
|
111
|
+
panelContent: {
|
112
|
+
displayPanel: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43431%3A4249&mode=dev',
|
113
|
+
editPanel: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=5013%3A15377&mode=dev'
|
114
|
+
},
|
111
115
|
panelHeader: {
|
112
116
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44688%3A39612&mode=dev',
|
113
117
|
withSubtext: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39651&mode=dev',
|
Binary file
|
@@ -34,6 +34,14 @@ export var baseBadge = {
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
};
|
37
|
+
var defaultBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
38
|
+
backgroundColor: 'white !important',
|
39
|
+
outline: '1px solid',
|
40
|
+
outlineColor: 'neutral.80',
|
41
|
+
'& span': {
|
42
|
+
color: 'text.primary'
|
43
|
+
}
|
44
|
+
});
|
37
45
|
var multivaluesBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
|
38
46
|
alignSelf: 'center',
|
39
47
|
cursor: 'default',
|
@@ -178,23 +186,24 @@ var activeStatusBadge = _objectSpread(_objectSpread({}, statusBadge), {}, {
|
|
178
186
|
backgroundColor: '#F7F8FD !important'
|
179
187
|
});
|
180
188
|
export default {
|
189
|
+
activeStatusBadge: activeStatusBadge,
|
190
|
+
badgeDeleteButton: badgeDeleteButton,
|
181
191
|
baseBadge: baseBadge,
|
192
|
+
convenienceDefault: convenienceDefault,
|
193
|
+
countBadge: countBadge,
|
194
|
+
countNeutral: countNeutral,
|
195
|
+
criticalStatusBadge: criticalStatusBadge,
|
196
|
+
defaultBadge: defaultBadge,
|
197
|
+
deleteButton: deleteButton,
|
182
198
|
environmentBadge: environmentBadge,
|
199
|
+
errorCalloutBadge: errorCalloutBadge,
|
200
|
+
healthyStatusBadge: healthyStatusBadge,
|
201
|
+
infoCalloutBadge: infoCalloutBadge,
|
183
202
|
itemBadgeWithSlot: itemBadgeWithSlot,
|
184
203
|
multivaluesBadge: multivaluesBadge,
|
185
204
|
readOnlyBadge: readOnlyBadge,
|
186
205
|
selectedItemBadge: selectedItemBadge,
|
187
|
-
deleteButton: deleteButton,
|
188
|
-
countBadge: countBadge,
|
189
|
-
countNeutral: countNeutral,
|
190
|
-
badgeDeleteButton: badgeDeleteButton,
|
191
|
-
convenienceDefault: convenienceDefault,
|
192
|
-
errorCalloutBadge: errorCalloutBadge,
|
193
|
-
warningCalloutBadge: warningCalloutBadge,
|
194
206
|
successCalloutBadge: successCalloutBadge,
|
195
|
-
|
196
|
-
|
197
|
-
warningStatusBadge: warningStatusBadge,
|
198
|
-
healthyStatusBadge: healthyStatusBadge,
|
199
|
-
activeStatusBadge: activeStatusBadge
|
207
|
+
warningCalloutBadge: warningCalloutBadge,
|
208
|
+
warningStatusBadge: warningStatusBadge
|
200
209
|
};
|
package/lib/index.js
CHANGED
@@ -69,6 +69,7 @@ export { default as HelpHint } from './components/HelpHint';
|
|
69
69
|
export * from './components/HelpHint';
|
70
70
|
export { default as Icon } from './components/Icon';
|
71
71
|
export * from './components/Icon';
|
72
|
+
export { NoticeIcon } from './components/Icon/NoticeIcon';
|
72
73
|
export { default as IconBadge } from './components/IconBadge';
|
73
74
|
export * from './components/IconBadge';
|
74
75
|
export { default as IconButton } from './components/IconButton';
|
@@ -0,0 +1,477 @@
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
4
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
5
|
+
import React, { useRef } from 'react';
|
6
|
+
import { Item } from 'react-stately';
|
7
|
+
import PencilIcon from '@pingux/mdi-react/PencilIcon';
|
8
|
+
import PlusIcon from '@pingux/mdi-react/PlusIcon';
|
9
|
+
import { useOverlayPanelState } from '../hooks';
|
10
|
+
import { AccordionGroup, Badge, Box, Button, ButtonBar, CheckboxField, EditButton, Icon, Image, ImageUploadField, NoticeIcon, OverlayPanel, OverlayProvider, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SelectField, Tab, Tabs, Text, TextField } from '../index';
|
11
|
+
import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.js';
|
12
|
+
import UserImage from '../utils/devUtils/assets/UserImage.png';
|
13
|
+
import statuses from '../utils/devUtils/constants/statuses';
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
|
+
export default {
|
16
|
+
title: 'Experimental/PanelContent',
|
17
|
+
parameters: {
|
18
|
+
docs: {
|
19
|
+
source: {
|
20
|
+
type: 'code'
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
};
|
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
|
+
var OverlayWrapper = function OverlayWrapper(_ref) {
|
96
|
+
var children = _ref.children;
|
97
|
+
var _useOverlayPanelState = useOverlayPanelState({
|
98
|
+
isDefaultOpen: true
|
99
|
+
}),
|
100
|
+
state = _useOverlayPanelState.state;
|
101
|
+
var triggerRef = useRef();
|
102
|
+
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
103
|
+
ref: triggerRef,
|
104
|
+
onPress: state.open
|
105
|
+
}, "Open Panel"), ___EmotionJSX(OverlayPanel, {
|
106
|
+
isOpen: state.isOpen,
|
107
|
+
isTransitioning: state.isTransitioning,
|
108
|
+
size: "large",
|
109
|
+
p: "0"
|
110
|
+
}, ___EmotionJSX(PanelHeader, {
|
111
|
+
data: {
|
112
|
+
image: {
|
113
|
+
src: UserImage,
|
114
|
+
alt: 'user image'
|
115
|
+
},
|
116
|
+
text: data.personalInfo.fields[0].value,
|
117
|
+
subtext: data.personalInfo.fields[1].value
|
118
|
+
}
|
119
|
+
}, ___EmotionJSX(PanelHeaderSwitchField, null), ___EmotionJSX(PanelHeaderMenu, null), ___EmotionJSX(PanelHeaderCloseButton, {
|
120
|
+
onPress: state.close
|
121
|
+
})), children));
|
122
|
+
};
|
123
|
+
export var DisplayPanel = function DisplayPanel() {
|
124
|
+
var _context, _context2;
|
125
|
+
var renderProfileTab = ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
|
126
|
+
isRow: true,
|
127
|
+
gap: "md",
|
128
|
+
mb: "20px"
|
129
|
+
}, _mapInstanceProperty(colorBlockButtons).call(colorBlockButtons, function (tileData) {
|
130
|
+
return ___EmotionJSX(ColorBlockButton, {
|
131
|
+
buttonData: tileData,
|
132
|
+
key: "".concat(tileData.text, "-key")
|
133
|
+
});
|
134
|
+
})), ___EmotionJSX(Box, {
|
135
|
+
isRow: true,
|
136
|
+
justifyContent: "space-between"
|
137
|
+
}, ___EmotionJSX(AccordionGroup, {
|
138
|
+
defaultExpandedKeys: _mapInstanceProperty(_context = _Object$keys(data)).call(_context, function (item) {
|
139
|
+
return data[item].key;
|
140
|
+
}),
|
141
|
+
labelHeadingTag: "h2"
|
142
|
+
}, _mapInstanceProperty(_context2 = _Object$keys(data)).call(_context2, function (item) {
|
143
|
+
var _context3;
|
144
|
+
return ___EmotionJSX(Item, {
|
145
|
+
"data-id": data[item].label,
|
146
|
+
key: data[item].key,
|
147
|
+
label: data[item].label,
|
148
|
+
textValue: data[item].label
|
149
|
+
}, data[item].image ? ___EmotionJSX(Box, {
|
150
|
+
isRow: true,
|
151
|
+
gap: "md"
|
152
|
+
}, ___EmotionJSX(Image, {
|
153
|
+
src: UserImage,
|
154
|
+
alt: "user"
|
155
|
+
}), ___EmotionJSX(LabelValuePairs, {
|
156
|
+
fields: data[item].fields
|
157
|
+
})) : ___EmotionJSX(LabelValuePairs, {
|
158
|
+
fields: data[item].fields
|
159
|
+
}), data[item].badges && ___EmotionJSX(Box, {
|
160
|
+
isRow: true,
|
161
|
+
gap: "sm"
|
162
|
+
}, _mapInstanceProperty(_context3 = data[item].badges).call(_context3, function (badge) {
|
163
|
+
return ___EmotionJSX(Badge, {
|
164
|
+
label: badge,
|
165
|
+
variant: "defaultBadge",
|
166
|
+
key: "".concat(badge, "-key")
|
167
|
+
});
|
168
|
+
})));
|
169
|
+
})), ___EmotionJSX(EditButton, {
|
170
|
+
size: "lg"
|
171
|
+
})));
|
172
|
+
var tabs = [{
|
173
|
+
name: 'Profile',
|
174
|
+
children: renderProfileTab
|
175
|
+
}, {
|
176
|
+
name: 'Groups',
|
177
|
+
children: 'Groups'
|
178
|
+
}, {
|
179
|
+
name: 'Roles',
|
180
|
+
children: 'Roles'
|
181
|
+
}, {
|
182
|
+
name: 'Services',
|
183
|
+
list: [{
|
184
|
+
key: 'service1',
|
185
|
+
name: 'Service 1',
|
186
|
+
children: 'Service 1',
|
187
|
+
role: 'listitem'
|
188
|
+
}, {
|
189
|
+
key: 'service2',
|
190
|
+
name: 'Service 2',
|
191
|
+
children: 'Service 2',
|
192
|
+
role: 'listitem'
|
193
|
+
}]
|
194
|
+
}, {
|
195
|
+
name: 'API',
|
196
|
+
children: 'API'
|
197
|
+
}];
|
198
|
+
return ___EmotionJSX(OverlayWrapper, null, ___EmotionJSX(Box, {
|
199
|
+
p: "lg",
|
200
|
+
pt: "xs"
|
201
|
+
}, ___EmotionJSX(Tabs, {
|
202
|
+
items: tabs,
|
203
|
+
mode: "list",
|
204
|
+
tabListProps: {
|
205
|
+
justifyContent: 'center',
|
206
|
+
mb: 'lg'
|
207
|
+
}
|
208
|
+
}, function (item) {
|
209
|
+
return ___EmotionJSX(Tab, _extends({
|
210
|
+
key: item.name,
|
211
|
+
title: item.name
|
212
|
+
}, item), item.children);
|
213
|
+
})));
|
214
|
+
};
|
215
|
+
DisplayPanel.parameters = {
|
216
|
+
design: {
|
217
|
+
type: 'figma',
|
218
|
+
url: FIGMA_LINKS.panelContent.displayPanel
|
219
|
+
},
|
220
|
+
a11y: {
|
221
|
+
config: {
|
222
|
+
rules: [{
|
223
|
+
id: 'color-contrast',
|
224
|
+
enabled: false
|
225
|
+
}]
|
226
|
+
}
|
227
|
+
}
|
228
|
+
};
|
229
|
+
export var ColorBlockButton = function ColorBlockButton(_ref2) {
|
230
|
+
var _ref2$buttonData = _ref2.buttonData,
|
231
|
+
buttonData = _ref2$buttonData === void 0 ? colorBlockButtons[0] : _ref2$buttonData;
|
232
|
+
return ___EmotionJSX(Button, {
|
233
|
+
variant: "colorBlock",
|
234
|
+
className: buttonData.isConfigured ? 'is-configured' : ''
|
235
|
+
}, ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
236
|
+
variant: "buttonTitle"
|
237
|
+
}, buttonData.text), ___EmotionJSX(Text, {
|
238
|
+
variant: "buttonSubtitle"
|
239
|
+
}, buttonData.subtext)), ___EmotionJSX(Icon, {
|
240
|
+
icon: PencilIcon,
|
241
|
+
title: {
|
242
|
+
name: 'Create Icon'
|
243
|
+
}
|
244
|
+
}));
|
245
|
+
};
|
246
|
+
export var LabelValuePairs = function LabelValuePairs(_ref3) {
|
247
|
+
var _ref3$fields = _ref3.fields,
|
248
|
+
fields = _ref3$fields === void 0 ? data.contactInfo.fields : _ref3$fields;
|
249
|
+
return ___EmotionJSX(Box, {
|
250
|
+
gap: "md",
|
251
|
+
maxWidth: "675px"
|
252
|
+
}, _mapInstanceProperty(fields).call(fields, function (_ref4) {
|
253
|
+
var label = _ref4.label,
|
254
|
+
value = _ref4.value,
|
255
|
+
isVerified = _ref4.isVerified;
|
256
|
+
return ___EmotionJSX(Box, {
|
257
|
+
gap: "xs",
|
258
|
+
key: "".concat(label, "-key")
|
259
|
+
}, ___EmotionJSX(Text, {
|
260
|
+
variant: "h4"
|
261
|
+
}, label), ___EmotionJSX(Box, {
|
262
|
+
isRow: true,
|
263
|
+
gap: "md"
|
264
|
+
}, ___EmotionJSX(Text, null, value), isVerified && ___EmotionJSX(Box, {
|
265
|
+
isRow: true,
|
266
|
+
gap: "xs"
|
267
|
+
}, ___EmotionJSX(NoticeIcon, {
|
268
|
+
color: "success.dark",
|
269
|
+
status: statuses.SUCCESS,
|
270
|
+
"aria-label": "".concat(statuses.SUCCESS, "-icon"),
|
271
|
+
size: "xs"
|
272
|
+
}), ___EmotionJSX(Text, {
|
273
|
+
variant: "listSubtitle",
|
274
|
+
color: "success.dark"
|
275
|
+
}, "Verified"))));
|
276
|
+
}));
|
277
|
+
};
|
278
|
+
var editData = {
|
279
|
+
personalInfo: {
|
280
|
+
label: 'Personal Info',
|
281
|
+
key: 'personalInfoKey',
|
282
|
+
image: UserImage,
|
283
|
+
fields: [{
|
284
|
+
label: 'Prefix',
|
285
|
+
value: ''
|
286
|
+
}, {
|
287
|
+
label: 'Given Name',
|
288
|
+
value: 'Ed'
|
289
|
+
}, {
|
290
|
+
label: 'Middle Name',
|
291
|
+
value: ''
|
292
|
+
}, {
|
293
|
+
label: 'Family Name',
|
294
|
+
value: 'Nepomuceno'
|
295
|
+
}, {
|
296
|
+
label: 'Suffix',
|
297
|
+
value: ''
|
298
|
+
}, {
|
299
|
+
label: 'Formatted',
|
300
|
+
value: ''
|
301
|
+
}, {
|
302
|
+
label: 'Nickname',
|
303
|
+
value: ''
|
304
|
+
}]
|
305
|
+
},
|
306
|
+
contactInfo: {
|
307
|
+
label: 'Contact Info',
|
308
|
+
key: 'contactInfoKey',
|
309
|
+
fields: [{
|
310
|
+
label: 'Email',
|
311
|
+
value: 'ednepomuceno@pingidentity.com',
|
312
|
+
slot: ___EmotionJSX(CheckboxField, {
|
313
|
+
mt: "xs",
|
314
|
+
label: "Require Email to be Verified"
|
315
|
+
})
|
316
|
+
}, {
|
317
|
+
label: 'Phone Number',
|
318
|
+
value: '123-456-7890'
|
319
|
+
}, {
|
320
|
+
label: 'Street Address',
|
321
|
+
value: '123 Example St'
|
322
|
+
}, {
|
323
|
+
label: 'Country Code',
|
324
|
+
value: ''
|
325
|
+
}, {
|
326
|
+
label: 'Loality',
|
327
|
+
value: ''
|
328
|
+
}, {
|
329
|
+
label: 'Region',
|
330
|
+
value: ''
|
331
|
+
}, {
|
332
|
+
label: 'Zip Code',
|
333
|
+
value: '12345'
|
334
|
+
}]
|
335
|
+
},
|
336
|
+
companyInfo: {
|
337
|
+
label: 'Company Info',
|
338
|
+
key: 'companyInfoKey',
|
339
|
+
fields: [{
|
340
|
+
label: 'Account ID',
|
341
|
+
value: ''
|
342
|
+
}, {
|
343
|
+
label: 'Type',
|
344
|
+
value: ''
|
345
|
+
}, {
|
346
|
+
label: 'Title',
|
347
|
+
value: ''
|
348
|
+
}]
|
349
|
+
}
|
350
|
+
};
|
351
|
+
export var EditPanel = function EditPanel() {
|
352
|
+
var _context4, _context5, _context6;
|
353
|
+
return ___EmotionJSX(OverlayWrapper, null, ___EmotionJSX(Box, {
|
354
|
+
p: "lg",
|
355
|
+
pb: "0"
|
356
|
+
}, ___EmotionJSX(Box, {
|
357
|
+
gap: "md",
|
358
|
+
mb: "20px",
|
359
|
+
width: "500px"
|
360
|
+
}, ___EmotionJSX(TextField, {
|
361
|
+
defaultValue: "ednepomuceno",
|
362
|
+
isRequired: true,
|
363
|
+
label: "Username"
|
364
|
+
}), ___EmotionJSX(SelectField, {
|
365
|
+
label: "Population",
|
366
|
+
isRequired: true,
|
367
|
+
defaultSelectedKey: "population"
|
368
|
+
}, ___EmotionJSX(Item, {
|
369
|
+
key: "population"
|
370
|
+
}, "Denver"))), ___EmotionJSX(AccordionGroup, {
|
371
|
+
defaultExpandedKeys: _concatInstanceProperty(_context4 = []).call(_context4, _mapInstanceProperty(_context5 = _Object$keys(editData)).call(_context5, function (item) {
|
372
|
+
return editData[item].key;
|
373
|
+
}), ['preferencesKey', 'customAttributesKey', 'jsonAttributesKey']),
|
374
|
+
labelHeadingTag: "h2"
|
375
|
+
}, _mapInstanceProperty(_context6 = _Object$keys(editData)).call(_context6, function (item) {
|
376
|
+
var _context7;
|
377
|
+
return ___EmotionJSX(Item, {
|
378
|
+
"data-id": editData[item].label,
|
379
|
+
key: editData[item].key,
|
380
|
+
label: editData[item].label,
|
381
|
+
textValue: editData[item].label
|
382
|
+
}, ___EmotionJSX(Box, {
|
383
|
+
gap: "md",
|
384
|
+
width: "500px"
|
385
|
+
}, editData[item].image && ___EmotionJSX(ImageUploadField, {
|
386
|
+
label: "Photo",
|
387
|
+
previewHeight: 40,
|
388
|
+
previewWidth: 40,
|
389
|
+
previewImage: UserImage
|
390
|
+
}), _mapInstanceProperty(_context7 = editData[item].fields).call(_context7, function (_ref5) {
|
391
|
+
var label = _ref5.label,
|
392
|
+
value = _ref5.value,
|
393
|
+
slot = _ref5.slot;
|
394
|
+
return ___EmotionJSX(Box, {
|
395
|
+
key: "".concat(label, "-key")
|
396
|
+
}, ___EmotionJSX(TextField, {
|
397
|
+
label: label,
|
398
|
+
defaultValue: value
|
399
|
+
}), slot);
|
400
|
+
})));
|
401
|
+
}), ___EmotionJSX(Item, {
|
402
|
+
"data-id": "preferences",
|
403
|
+
key: "preferencesKey",
|
404
|
+
label: "Preferences",
|
405
|
+
textValue: "Preferences"
|
406
|
+
}, ___EmotionJSX(Box, {
|
407
|
+
gap: "md",
|
408
|
+
width: "500px"
|
409
|
+
}, ___EmotionJSX(SelectField, {
|
410
|
+
label: "Preferred Language",
|
411
|
+
defaultSelectedKey: "language"
|
412
|
+
}, ___EmotionJSX(Item, {
|
413
|
+
key: "language"
|
414
|
+
}, "Select a Language")), ___EmotionJSX(SelectField, {
|
415
|
+
label: "Locale",
|
416
|
+
defaultSelectedKey: "language"
|
417
|
+
}, ___EmotionJSX(Item, {
|
418
|
+
key: "language"
|
419
|
+
}, "Select a locale")), ___EmotionJSX(SelectField, {
|
420
|
+
label: "Timezone",
|
421
|
+
defaultSelectedKey: "language"
|
422
|
+
}, ___EmotionJSX(Item, {
|
423
|
+
key: "language"
|
424
|
+
}, "Select a timezone")))), ___EmotionJSX(Item, {
|
425
|
+
"data-id": "customAttributes",
|
426
|
+
key: "customAttributesKey",
|
427
|
+
label: "Custom Attributes",
|
428
|
+
textValue: "Custom Attributes"
|
429
|
+
}, ___EmotionJSX(AddAttributeButton, null), ___EmotionJSX(Text, {
|
430
|
+
fontWeight: "-1",
|
431
|
+
fontSize: "md",
|
432
|
+
textAlign: "center"
|
433
|
+
}, "Click + Add to select a custom attribute")), ___EmotionJSX(Item, {
|
434
|
+
"data-id": "jsonAttributes",
|
435
|
+
key: "jsonAttributesKey",
|
436
|
+
label: "JSON Attributes",
|
437
|
+
textValue: "JSON Attributes"
|
438
|
+
}, ___EmotionJSX(AddAttributeButton, null), ___EmotionJSX(Text, {
|
439
|
+
fontWeight: "-1",
|
440
|
+
fontSize: "md",
|
441
|
+
textAlign: "center"
|
442
|
+
}, "Click + Add to select a JSON attribute")))), ___EmotionJSX(ButtonBar, null, ___EmotionJSX(Button, {
|
443
|
+
variant: "primary"
|
444
|
+
}, "Save"), ___EmotionJSX(Button, {
|
445
|
+
variant: "link"
|
446
|
+
}, "Cancel")));
|
447
|
+
};
|
448
|
+
EditPanel.parameters = {
|
449
|
+
design: {
|
450
|
+
type: 'figma',
|
451
|
+
url: FIGMA_LINKS.panelContent.editPanel
|
452
|
+
},
|
453
|
+
a11y: {
|
454
|
+
config: {
|
455
|
+
rules: [{
|
456
|
+
id: 'color-contrast',
|
457
|
+
enabled: false
|
458
|
+
}]
|
459
|
+
}
|
460
|
+
}
|
461
|
+
};
|
462
|
+
export var AddAttributeButton = function AddAttributeButton() {
|
463
|
+
return ___EmotionJSX(Box, {
|
464
|
+
sx: {
|
465
|
+
position: 'relative',
|
466
|
+
left: '700px',
|
467
|
+
top: '-35px',
|
468
|
+
width: 0,
|
469
|
+
height: 0
|
470
|
+
}
|
471
|
+
}, ___EmotionJSX(Button, {
|
472
|
+
variant: "inlineWithIcon"
|
473
|
+
}, ___EmotionJSX(Icon, {
|
474
|
+
icon: PlusIcon,
|
475
|
+
size: "xs"
|
476
|
+
}), "Add"));
|
477
|
+
};
|
@@ -101,6 +101,10 @@ export var FIGMA_LINKS = {
|
|
101
101
|
OnewayToBidirectionalArrow: {
|
102
102
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=43504-1214&mode=design&t=R4kdj0liRHxsqbV5-0'
|
103
103
|
},
|
104
|
+
panelContent: {
|
105
|
+
displayPanel: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43431%3A4249&mode=dev',
|
106
|
+
editPanel: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=5013%3A15377&mode=dev'
|
107
|
+
},
|
104
108
|
panelHeader: {
|
105
109
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44688%3A39612&mode=dev',
|
106
110
|
withSubtext: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39651&mode=dev',
|
Binary file
|