@pingux/astro 1.27.0-alpha.1 → 1.27.0-alpha.10
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/PageHeader/PageHeader.js +7 -1
- package/lib/cjs/recipes/CountryPicker.stories.js +25 -12
- package/lib/cjs/recipes/EditableInput.stories.js +55 -46
- package/lib/cjs/recipes/ListAndPanel.stories.js +102 -87
- package/lib/cjs/recipes/PageHeader.stories.js +73 -0
- package/lib/components/PageHeader/PageHeader.js +8 -1
- package/lib/recipes/CountryPicker.stories.js +24 -12
- package/lib/recipes/EditableInput.stories.js +55 -46
- package/lib/recipes/ListAndPanel.stories.js +102 -87
- package/lib/recipes/PageHeader.stories.js +53 -0
- package/package.json +2 -1
@@ -38,11 +38,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
38
38
|
|
39
39
|
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; }
|
40
40
|
|
41
|
+
/**
|
42
|
+
* A `Page Header` is a composed component using text and icon button.
|
43
|
+
* The component is separated from the body and appears at the top.
|
44
|
+
* For customization,
|
45
|
+
* please see [Page Header](./?path=/story/recipes-page-header--default) recipe docs.
|
46
|
+
*/
|
41
47
|
var PageHeader = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
42
48
|
var title = props.title,
|
43
49
|
children = props.children,
|
44
50
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
45
|
-
(0, _hooks.useDeprecationWarning)('The Page Header component will be deprecated in Astro-UI 2.0.0.');
|
51
|
+
(0, _hooks.useDeprecationWarning)('The Page Header component will be deprecated in Astro-UI 2.0.0. Use Page Header recipe instead.');
|
46
52
|
return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
|
47
53
|
isRow: true,
|
48
54
|
justifyContent: "space-between",
|
@@ -50,6 +50,28 @@ var validatePhoneNumber = function validatePhoneNumber(str) {
|
|
50
50
|
return reg.test(str);
|
51
51
|
};
|
52
52
|
|
53
|
+
var sx = {
|
54
|
+
wrapperBox: {
|
55
|
+
width: '100%',
|
56
|
+
maxWidth: 500,
|
57
|
+
position: 'relative'
|
58
|
+
},
|
59
|
+
comboBoxFieldWrapperOpen: {
|
60
|
+
position: 'absolute',
|
61
|
+
transition: '0.2s width ease',
|
62
|
+
width: '100%'
|
63
|
+
},
|
64
|
+
comboBoxFieldWrapperClose: {
|
65
|
+
position: 'absolute',
|
66
|
+
transition: '0.2s width ease',
|
67
|
+
width: '110px'
|
68
|
+
},
|
69
|
+
inputWrapper: {
|
70
|
+
width: '100%',
|
71
|
+
marginLeft: '110px'
|
72
|
+
}
|
73
|
+
};
|
74
|
+
|
53
75
|
var Default = function Default() {
|
54
76
|
var _useState = (0, _react.useState)(false),
|
55
77
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
@@ -117,22 +139,14 @@ var Default = function Default() {
|
|
117
139
|
|
118
140
|
return (0, _react2.jsx)(_Box["default"], {
|
119
141
|
isRow: true,
|
120
|
-
sx:
|
121
|
-
width: '100%',
|
122
|
-
maxWidth: 500,
|
123
|
-
position: 'relative'
|
124
|
-
}
|
142
|
+
sx: sx.wrapperBox
|
125
143
|
}, (0, _react2.jsx)(_ComboBoxField["default"], {
|
126
144
|
mt: -5,
|
127
145
|
width: "100%",
|
128
146
|
isOpen: isOpen,
|
129
147
|
onOpenChange: setIsOpen,
|
130
148
|
wrapperProps: {
|
131
|
-
sx:
|
132
|
-
position: 'absolute',
|
133
|
-
transition: '0.2s width ease',
|
134
|
-
width: isOpen ? '100%' : 110
|
135
|
-
}
|
149
|
+
sx: isOpen ? sx.comboBoxFieldWrapperOpen : sx.comboBoxFieldWrapperClose
|
136
150
|
},
|
137
151
|
controlProps: {
|
138
152
|
'aria-label': 'Country Picker'
|
@@ -151,8 +165,7 @@ var Default = function Default() {
|
|
151
165
|
key: item[0]
|
152
166
|
}, (0, _concat["default"])(_context = (0, _concat["default"])(_context2 = "".concat(item[1].name)).call(_context2, item[1].name !== item[1]["native"] ? " (".concat(item[1]["native"], ")") : '', " +")).call(_context, item[1].phone.split(',')[0]));
|
153
167
|
}), (0, _react2.jsx)(_Box["default"], {
|
154
|
-
|
155
|
-
ml: 110
|
168
|
+
sx: sx.inputWrapper
|
156
169
|
}, (0, _react2.jsx)(_Input["default"], {
|
157
170
|
placeholder: "Phone number...",
|
158
171
|
onChange: onPhoneNumberValueChange,
|
@@ -70,6 +70,48 @@ var inputProps = {
|
|
70
70
|
label: 'Example label',
|
71
71
|
ariaLabel: 'Example aria label'
|
72
72
|
};
|
73
|
+
var sx = {
|
74
|
+
editablePreview: {
|
75
|
+
whiteSpace: 'pre-line',
|
76
|
+
width: '100%',
|
77
|
+
overflowWrap: 'break-word',
|
78
|
+
minHeight: '45px',
|
79
|
+
paddingLeft: 'xs',
|
80
|
+
justifyContent: 'flex-end',
|
81
|
+
paddingBottom: 'xs',
|
82
|
+
borderBottomColor: 'active',
|
83
|
+
color: 'neutral.10',
|
84
|
+
fontSize: 'md',
|
85
|
+
fontWeight: 1,
|
86
|
+
lineHeight: '18px',
|
87
|
+
'&:focus': {
|
88
|
+
outline: 'none',
|
89
|
+
boxShadow: 'focus',
|
90
|
+
borderColor: 'active',
|
91
|
+
borderWidth: '1px',
|
92
|
+
borderStyle: 'solid'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
editableInputWrapper: {
|
96
|
+
marginRight: '30px',
|
97
|
+
flexGrow: 1
|
98
|
+
},
|
99
|
+
editableInpuTextArea: {
|
100
|
+
maxHeight: '150px'
|
101
|
+
},
|
102
|
+
editableControlWrapper: {
|
103
|
+
position: 'absolute',
|
104
|
+
right: '0',
|
105
|
+
top: '27.5%',
|
106
|
+
alignItems: 'center',
|
107
|
+
justifyContent: 'space-between'
|
108
|
+
},
|
109
|
+
editableControlIconButton: {
|
110
|
+
marginRight: 'md',
|
111
|
+
width: '20px',
|
112
|
+
height: '20px'
|
113
|
+
}
|
114
|
+
};
|
73
115
|
|
74
116
|
var Default = function Default() {
|
75
117
|
return (0, _react2.jsx)(Editable, {
|
@@ -127,6 +169,13 @@ var EditablePreview = function EditablePreview() {
|
|
127
169
|
hasFocus = _useState4[0],
|
128
170
|
setFocus = _useState4[1];
|
129
171
|
|
172
|
+
var editablePreviewDynamicSx = {
|
173
|
+
backgroundColor: hasFocus ? 'accent.95' : 'white',
|
174
|
+
borderBottom: editableContext.isEditing ? '0px' : '1px dashed',
|
175
|
+
'&:hover': {
|
176
|
+
background: editableContext.isEditing ? 'white' : 'accent.95'
|
177
|
+
}
|
178
|
+
};
|
130
179
|
(0, _react.useEffect)(function () {
|
131
180
|
if (hasFocus && editableContext.isEditing) {
|
132
181
|
setFocus(false);
|
@@ -153,8 +202,8 @@ var EditablePreview = function EditablePreview() {
|
|
153
202
|
"aria-hidden": editableContext.isEditing,
|
154
203
|
onClick: handleClick,
|
155
204
|
onKeyDown: handleKeyDown,
|
156
|
-
"aria-readonly": "false",
|
157
205
|
"aria-label": "Inline editable text field",
|
206
|
+
role: "textbox",
|
158
207
|
onFocus: function onFocus() {
|
159
208
|
return setFocus(true);
|
160
209
|
},
|
@@ -162,32 +211,7 @@ var EditablePreview = function EditablePreview() {
|
|
162
211
|
return setFocus(false);
|
163
212
|
},
|
164
213
|
placeholder: "Click or press enter to edit text",
|
165
|
-
sx: {
|
166
|
-
whiteSpace: 'pre-line',
|
167
|
-
backgroundColor: hasFocus ? 'accent.95' : 'white',
|
168
|
-
width: '100%',
|
169
|
-
overflowWrap: 'break-word',
|
170
|
-
minHeight: '45px',
|
171
|
-
paddingLeft: 'xs',
|
172
|
-
justifyContent: 'flex-end',
|
173
|
-
paddingBottom: 'xs',
|
174
|
-
borderBottom: editableContext.isEditing ? '0px' : '1px dashed',
|
175
|
-
borderBottomColor: 'active',
|
176
|
-
color: 'neutral.10',
|
177
|
-
fontSize: 'md',
|
178
|
-
fontWeight: 1,
|
179
|
-
lineHeight: '18px',
|
180
|
-
'&:hover': {
|
181
|
-
background: editableContext.isEditing ? 'white' : 'accent.95'
|
182
|
-
},
|
183
|
-
'&:focus': {
|
184
|
-
outline: 'none',
|
185
|
-
boxShadow: 'focus',
|
186
|
-
borderColor: 'active',
|
187
|
-
borderWidth: '1px',
|
188
|
-
borderStyle: 'solid'
|
189
|
-
}
|
190
|
-
}
|
214
|
+
sx: _objectSpread(_objectSpread({}, editablePreviewDynamicSx), sx.editablePreview)
|
191
215
|
}, editableContext.value);
|
192
216
|
};
|
193
217
|
/**
|
@@ -256,10 +280,7 @@ var EditableInput = function EditableInput(props) {
|
|
256
280
|
return (0, _react2.jsx)(_index.Box, {
|
257
281
|
display: editableContext.isEditing ? 'flex' : 'none',
|
258
282
|
"aria-hidden": !editableContext.isEditing,
|
259
|
-
sx:
|
260
|
-
marginRight: '30px',
|
261
|
-
flexGrow: 1
|
262
|
-
}
|
283
|
+
sx: sx.editableInputWrapper
|
263
284
|
}, (0, _react2.jsx)(_index.TextAreaField, {
|
264
285
|
rows: 1,
|
265
286
|
ref: editableInput,
|
@@ -270,9 +291,7 @@ var EditableInput = function EditableInput(props) {
|
|
270
291
|
onKeyDown: handleKeyDown,
|
271
292
|
value: editingValue,
|
272
293
|
"aria-label": ariaLabel,
|
273
|
-
sx:
|
274
|
-
maxHeight: '150px'
|
275
|
-
},
|
294
|
+
sx: sx.editableInpuTextArea,
|
276
295
|
isUnresizable: true
|
277
296
|
}));
|
278
297
|
};
|
@@ -323,22 +342,12 @@ var EditableControl = function EditableControl(props) {
|
|
323
342
|
display: editableContext.isEditing ? 'flex' : 'none',
|
324
343
|
"aria-hidden": !editableContext.isEditing,
|
325
344
|
isRow: true,
|
326
|
-
sx:
|
327
|
-
position: 'absolute',
|
328
|
-
right: '0',
|
329
|
-
top: '27.5%',
|
330
|
-
alignItems: 'center',
|
331
|
-
justifyContent: 'space-between'
|
332
|
-
}
|
345
|
+
sx: sx.editableControlWrapper
|
333
346
|
}, (0, _react2.jsx)(_index.IconButton, {
|
334
347
|
onPress: handleSubmit,
|
335
348
|
"aria-label": confirmBtn.ariaLabel,
|
336
349
|
variant: confirmBtn.variant,
|
337
|
-
|
338
|
-
sx: {
|
339
|
-
width: '20px',
|
340
|
-
height: '20px'
|
341
|
-
}
|
350
|
+
sx: sx.editableControlIconButton
|
342
351
|
}, (0, _react2.jsx)(_index.Icon, {
|
343
352
|
icon: _CheckIcon["default"]
|
344
353
|
})), (0, _react2.jsx)(_index.IconButton, {
|
@@ -128,44 +128,106 @@ var items = [{
|
|
128
128
|
avatar: _AccountIcon["default"],
|
129
129
|
hasSeparator: false
|
130
130
|
}];
|
131
|
+
var sx = {
|
132
|
+
wrapper: {
|
133
|
+
px: 'lg',
|
134
|
+
py: 'lg',
|
135
|
+
bg: 'accent.99',
|
136
|
+
height: '900px',
|
137
|
+
overflowY: 'scroll'
|
138
|
+
},
|
139
|
+
searchField: {
|
140
|
+
position: 'fixed',
|
141
|
+
mb: 'sm',
|
142
|
+
width: '400px'
|
143
|
+
},
|
144
|
+
listElementWrapper: {
|
145
|
+
px: 'md',
|
146
|
+
bg: 'accent.99',
|
147
|
+
justifyContent: 'center'
|
148
|
+
},
|
149
|
+
separator: {
|
150
|
+
bg: 'accent.90'
|
151
|
+
},
|
152
|
+
tabsWrapper: {
|
153
|
+
px: 'lg',
|
154
|
+
pt: 'xs'
|
155
|
+
},
|
156
|
+
iconButton: {
|
157
|
+
position: 'absolute',
|
158
|
+
top: 0,
|
159
|
+
right: 0
|
160
|
+
},
|
161
|
+
itemLabel: {
|
162
|
+
fontSize: 'sm',
|
163
|
+
fontWeight: 3,
|
164
|
+
lineHeight: '16px',
|
165
|
+
mb: 'xs'
|
166
|
+
},
|
167
|
+
itemValue: {
|
168
|
+
fontWeight: 0,
|
169
|
+
lineHeight: '18px',
|
170
|
+
variant: 'base',
|
171
|
+
mb: 'md'
|
172
|
+
},
|
173
|
+
listElement: {
|
174
|
+
wrapper: {
|
175
|
+
minHeight: '60px'
|
176
|
+
},
|
177
|
+
iconWrapper: {
|
178
|
+
mr: 'auto',
|
179
|
+
alignItems: 'center'
|
180
|
+
},
|
181
|
+
icon: {
|
182
|
+
mr: 'sm',
|
183
|
+
alignSelf: 'center',
|
184
|
+
color: 'accent.40'
|
185
|
+
},
|
186
|
+
avatar: {
|
187
|
+
width: '25px',
|
188
|
+
height: '25px',
|
189
|
+
mr: 'md'
|
190
|
+
},
|
191
|
+
title: {
|
192
|
+
alignSelf: 'start'
|
193
|
+
},
|
194
|
+
subtitle: {
|
195
|
+
fontSize: 'sm',
|
196
|
+
my: '1px',
|
197
|
+
lineHeight: '16px',
|
198
|
+
alignSelf: 'start'
|
199
|
+
},
|
200
|
+
menuWrapper: {
|
201
|
+
alignSelf: 'center'
|
202
|
+
}
|
203
|
+
}
|
204
|
+
};
|
131
205
|
|
132
206
|
var ListElement = function ListElement(_ref) {
|
133
207
|
var item = _ref.item,
|
134
208
|
onClosePanel = _ref.onClosePanel;
|
135
209
|
return (0, _react2.jsx)(_index.Box, {
|
136
210
|
isRow: true,
|
137
|
-
|
211
|
+
sx: sx.listElement.wrapper
|
138
212
|
}, (0, _react2.jsx)(_index.Box, {
|
139
213
|
isRow: true,
|
140
|
-
|
141
|
-
alignItems: "center"
|
214
|
+
sx: sx.listElement.iconWrapper
|
142
215
|
}, item.hasIcon ? (0, _react2.jsx)(_index.Icon, {
|
143
216
|
icon: item.avatar,
|
144
|
-
alignSelf: "center",
|
145
217
|
size: 24,
|
146
|
-
|
147
|
-
color: "accent.40"
|
218
|
+
sx: sx.listElement.icon
|
148
219
|
}) : (0, _react2.jsx)(_index.Avatar, {
|
149
|
-
|
150
|
-
sx: {
|
151
|
-
width: '25px',
|
152
|
-
height: '25px'
|
153
|
-
},
|
220
|
+
sx: sx.listElement.avatar,
|
154
221
|
src: item.avatar
|
155
222
|
}), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
156
223
|
variant: "bodyStrong",
|
157
|
-
|
224
|
+
sx: sx.listElement.title
|
158
225
|
}, item.lastName, ", ", item.firstName), (0, _react2.jsx)(_index.Text, {
|
159
|
-
sx: {
|
160
|
-
fontSize: 'sm',
|
161
|
-
my: '1px',
|
162
|
-
lineHeight: '16px'
|
163
|
-
},
|
164
226
|
variant: "subtitle",
|
165
|
-
|
227
|
+
sx: sx.listElement.subtitle
|
166
228
|
}, item.email))), (0, _react2.jsx)(_index.Box, {
|
167
229
|
isRow: true,
|
168
|
-
|
230
|
+
sx: sx.listElement.menuWrapper
|
169
231
|
}, (0, _react2.jsx)(_index.SwitchField, {
|
170
232
|
"aria-label": "active user",
|
171
233
|
isDefaultSelected: true,
|
@@ -222,11 +284,7 @@ var Default = function Default() {
|
|
222
284
|
};
|
223
285
|
|
224
286
|
return (0, _react2.jsx)(_index.Box, {
|
225
|
-
|
226
|
-
py: "lg",
|
227
|
-
bg: "accent.99",
|
228
|
-
height: "900px",
|
229
|
-
overflowY: "scroll"
|
287
|
+
sx: sx.wrapper
|
230
288
|
}, (0, _react2.jsx)(_index.SearchField, {
|
231
289
|
position: "fixed",
|
232
290
|
mb: "sm",
|
@@ -260,18 +318,15 @@ var Default = function Default() {
|
|
260
318
|
restoreFocus: true,
|
261
319
|
autoFocus: true
|
262
320
|
}, (0, _react2.jsx)(_index.Box, {
|
263
|
-
|
264
|
-
bg: "accent.99",
|
265
|
-
justifyContent: "center"
|
321
|
+
sx: sx.listElementWrapper
|
266
322
|
}, (0, _react2.jsx)(ListElement, {
|
267
323
|
item: selectedItemId >= 0 ? items[selectedItemId] : [],
|
268
324
|
onClosePanel: closePanelHandler
|
269
325
|
})), (0, _react2.jsx)(_index.Separator, {
|
270
326
|
margin: 0,
|
271
|
-
|
327
|
+
sx: sx.separator
|
272
328
|
}), (0, _react2.jsx)(_index.Box, {
|
273
|
-
|
274
|
-
pt: "xs"
|
329
|
+
sx: sx.tabsWrapper
|
275
330
|
}, (0, _react2.jsx)(_index.Tabs, {
|
276
331
|
tabListProps: {
|
277
332
|
justifyContent: 'center'
|
@@ -285,73 +340,33 @@ var Default = function Default() {
|
|
285
340
|
title: "Profile"
|
286
341
|
}, selectedItemId >= 0 && (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.IconButton, {
|
287
342
|
variant: "inverted",
|
288
|
-
sx:
|
289
|
-
position: 'absolute',
|
290
|
-
top: 0,
|
291
|
-
right: 0
|
292
|
-
}
|
343
|
+
sx: sx.iconButton
|
293
344
|
}, (0, _react2.jsx)(_PencilIcon["default"], {
|
294
345
|
size: 20
|
295
346
|
})), (0, _react2.jsx)(_index.Text, {
|
296
|
-
sx:
|
297
|
-
|
298
|
-
fontWeight: 3,
|
299
|
-
lineHeight: '16px'
|
300
|
-
},
|
301
|
-
variant: "base",
|
302
|
-
mb: "xs"
|
347
|
+
sx: sx.itemLabel,
|
348
|
+
variant: "base"
|
303
349
|
}, "Full Name"), (0, _react2.jsx)(_index.Text, {
|
304
|
-
sx:
|
305
|
-
|
306
|
-
lineHeight: '18px'
|
307
|
-
},
|
308
|
-
variant: "base",
|
309
|
-
mb: "md"
|
350
|
+
sx: sx.itemValue,
|
351
|
+
variant: "base"
|
310
352
|
}, items[selectedItemId].firstName, " ", items[selectedItemId].lastName), (0, _react2.jsx)(_index.Text, {
|
311
|
-
sx:
|
312
|
-
|
313
|
-
fontWeight: 3,
|
314
|
-
lineHeight: '16px'
|
315
|
-
},
|
316
|
-
variant: "base",
|
317
|
-
mb: "xs"
|
353
|
+
sx: sx.itemLabel,
|
354
|
+
variant: "base"
|
318
355
|
}, "First Name"), (0, _react2.jsx)(_index.Text, {
|
319
|
-
sx:
|
320
|
-
|
321
|
-
lineHeight: '18px'
|
322
|
-
},
|
323
|
-
variant: "base",
|
324
|
-
mb: "md"
|
356
|
+
sx: sx.itemValue,
|
357
|
+
variant: "base"
|
325
358
|
}, items[selectedItemId].firstName), (0, _react2.jsx)(_index.Text, {
|
326
|
-
sx:
|
327
|
-
|
328
|
-
fontWeight: 3,
|
329
|
-
lineHeight: '16px'
|
330
|
-
},
|
331
|
-
variant: "base",
|
332
|
-
mb: "xs"
|
359
|
+
sx: sx.itemLabel,
|
360
|
+
variant: "base"
|
333
361
|
}, "Last Name"), (0, _react2.jsx)(_index.Text, {
|
334
|
-
sx:
|
335
|
-
|
336
|
-
lineHeight: '18px'
|
337
|
-
},
|
338
|
-
variant: "base",
|
339
|
-
mb: "md"
|
362
|
+
sx: sx.itemValue,
|
363
|
+
variant: "base"
|
340
364
|
}, items[selectedItemId].lastName), (0, _react2.jsx)(_index.Text, {
|
341
|
-
sx:
|
342
|
-
|
343
|
-
fontWeight: 3,
|
344
|
-
lineHeight: '16px'
|
345
|
-
},
|
346
|
-
variant: "base",
|
347
|
-
mb: "xs"
|
365
|
+
sx: sx.itemLabel,
|
366
|
+
variant: "base"
|
348
367
|
}, "Email"), (0, _react2.jsx)(_index.Text, {
|
349
|
-
sx:
|
350
|
-
|
351
|
-
lineHeight: '18px'
|
352
|
-
},
|
353
|
-
variant: "base",
|
354
|
-
mb: "md"
|
368
|
+
sx: sx.itemValue,
|
369
|
+
variant: "base"
|
355
370
|
}, items[selectedItemId].email))), (0, _react2.jsx)(_index.Tab, {
|
356
371
|
title: "Group Memberships"
|
357
372
|
}, (0, _react2.jsx)(_index.Text, null, "Group Memberships")), (0, _react2.jsx)(_index.Tab, {
|
@@ -0,0 +1,73 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
exports["default"] = exports.Default = void 0;
|
12
|
+
|
13
|
+
var _react = _interopRequireDefault(require("react"));
|
14
|
+
|
15
|
+
var _PlusIcon = _interopRequireDefault(require("mdi-react/PlusIcon"));
|
16
|
+
|
17
|
+
var _index = require("../index");
|
18
|
+
|
19
|
+
var _react2 = require("@emotion/react");
|
20
|
+
|
21
|
+
var _default = {
|
22
|
+
title: 'Recipes/Page Header'
|
23
|
+
};
|
24
|
+
exports["default"] = _default;
|
25
|
+
|
26
|
+
var Default = function Default() {
|
27
|
+
var heading = 'Title of the Page';
|
28
|
+
var description = 'The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page.';
|
29
|
+
return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
|
30
|
+
align: "center",
|
31
|
+
isRow: true,
|
32
|
+
mb: "xs",
|
33
|
+
role: "heading",
|
34
|
+
"aria-level": "1"
|
35
|
+
}, (0, _react2.jsx)(_index.Text, {
|
36
|
+
variant: "title",
|
37
|
+
fontWeight: 3
|
38
|
+
}, heading), (0, _react2.jsx)(_index.Button, {
|
39
|
+
variant: "inlinePrimary",
|
40
|
+
ml: "sm"
|
41
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
42
|
+
icon: _PlusIcon["default"],
|
43
|
+
color: "white",
|
44
|
+
size: 13,
|
45
|
+
mr: "4px"
|
46
|
+
}), "\xA0", "Add")), (0, _react2.jsx)(_index.Text, {
|
47
|
+
variant: "bodyWeak"
|
48
|
+
}, description)), (0, _react2.jsx)(_index.Box, {
|
49
|
+
mt: "xl"
|
50
|
+
}, (0, _react2.jsx)(_index.Box, {
|
51
|
+
align: "center",
|
52
|
+
isRow: true,
|
53
|
+
mb: "xs",
|
54
|
+
role: "heading",
|
55
|
+
"aria-level": "1"
|
56
|
+
}, (0, _react2.jsx)(_index.Text, {
|
57
|
+
variant: "title",
|
58
|
+
fontWeight: 3
|
59
|
+
}, heading), (0, _react2.jsx)(_index.IconButton, {
|
60
|
+
"aria-label": "icon button",
|
61
|
+
ml: "sm",
|
62
|
+
mt: "3px",
|
63
|
+
variant: "inverted"
|
64
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
65
|
+
icon: _PlusIcon["default"],
|
66
|
+
color: "white",
|
67
|
+
size: 13
|
68
|
+
}))), (0, _react2.jsx)(_index.Text, {
|
69
|
+
variant: "bodyWeak"
|
70
|
+
}, description)));
|
71
|
+
};
|
72
|
+
|
73
|
+
exports.Default = Default;
|
@@ -6,13 +6,20 @@ import PropTypes from 'prop-types';
|
|
6
6
|
import Text from '../Text/Text';
|
7
7
|
import Box from '../Box/Box';
|
8
8
|
import { useDeprecationWarning } from '../../hooks';
|
9
|
+
/**
|
10
|
+
* A `Page Header` is a composed component using text and icon button.
|
11
|
+
* The component is separated from the body and appears at the top.
|
12
|
+
* For customization,
|
13
|
+
* please see [Page Header](./?path=/story/recipes-page-header--default) recipe docs.
|
14
|
+
*/
|
15
|
+
|
9
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
17
|
var PageHeader = /*#__PURE__*/forwardRef(function (props, ref) {
|
11
18
|
var title = props.title,
|
12
19
|
children = props.children,
|
13
20
|
others = _objectWithoutProperties(props, _excluded);
|
14
21
|
|
15
|
-
useDeprecationWarning('The Page Header component will be deprecated in Astro-UI 2.0.0.');
|
22
|
+
useDeprecationWarning('The Page Header component will be deprecated in Astro-UI 2.0.0. Use Page Header recipe instead.');
|
16
23
|
return ___EmotionJSX(Box, _extends({
|
17
24
|
isRow: true,
|
18
25
|
justifyContent: "space-between",
|
@@ -17,6 +17,27 @@ var validatePhoneNumber = function validatePhoneNumber(str) {
|
|
17
17
|
return reg.test(str);
|
18
18
|
};
|
19
19
|
|
20
|
+
var sx = {
|
21
|
+
wrapperBox: {
|
22
|
+
width: '100%',
|
23
|
+
maxWidth: 500,
|
24
|
+
position: 'relative'
|
25
|
+
},
|
26
|
+
comboBoxFieldWrapperOpen: {
|
27
|
+
position: 'absolute',
|
28
|
+
transition: '0.2s width ease',
|
29
|
+
width: '100%'
|
30
|
+
},
|
31
|
+
comboBoxFieldWrapperClose: {
|
32
|
+
position: 'absolute',
|
33
|
+
transition: '0.2s width ease',
|
34
|
+
width: '110px'
|
35
|
+
},
|
36
|
+
inputWrapper: {
|
37
|
+
width: '100%',
|
38
|
+
marginLeft: '110px'
|
39
|
+
}
|
40
|
+
};
|
20
41
|
export var Default = function Default() {
|
21
42
|
var _useState = useState(false),
|
22
43
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -84,22 +105,14 @@ export var Default = function Default() {
|
|
84
105
|
|
85
106
|
return ___EmotionJSX(Box, {
|
86
107
|
isRow: true,
|
87
|
-
sx:
|
88
|
-
width: '100%',
|
89
|
-
maxWidth: 500,
|
90
|
-
position: 'relative'
|
91
|
-
}
|
108
|
+
sx: sx.wrapperBox
|
92
109
|
}, ___EmotionJSX(ComboBoxField, {
|
93
110
|
mt: -5,
|
94
111
|
width: "100%",
|
95
112
|
isOpen: isOpen,
|
96
113
|
onOpenChange: setIsOpen,
|
97
114
|
wrapperProps: {
|
98
|
-
sx:
|
99
|
-
position: 'absolute',
|
100
|
-
transition: '0.2s width ease',
|
101
|
-
width: isOpen ? '100%' : 110
|
102
|
-
}
|
115
|
+
sx: isOpen ? sx.comboBoxFieldWrapperOpen : sx.comboBoxFieldWrapperClose
|
103
116
|
},
|
104
117
|
controlProps: {
|
105
118
|
'aria-label': 'Country Picker'
|
@@ -118,8 +131,7 @@ export var Default = function Default() {
|
|
118
131
|
key: item[0]
|
119
132
|
}, _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "".concat(item[1].name)).call(_context2, item[1].name !== item[1]["native"] ? " (".concat(item[1]["native"], ")") : '', " +")).call(_context, item[1].phone.split(',')[0]));
|
120
133
|
}), ___EmotionJSX(Box, {
|
121
|
-
|
122
|
-
ml: 110
|
134
|
+
sx: sx.inputWrapper
|
123
135
|
}, ___EmotionJSX(Input, {
|
124
136
|
placeholder: "Phone number...",
|
125
137
|
onChange: onPhoneNumberValueChange,
|
@@ -37,6 +37,48 @@ var inputProps = {
|
|
37
37
|
label: 'Example label',
|
38
38
|
ariaLabel: 'Example aria label'
|
39
39
|
};
|
40
|
+
var sx = {
|
41
|
+
editablePreview: {
|
42
|
+
whiteSpace: 'pre-line',
|
43
|
+
width: '100%',
|
44
|
+
overflowWrap: 'break-word',
|
45
|
+
minHeight: '45px',
|
46
|
+
paddingLeft: 'xs',
|
47
|
+
justifyContent: 'flex-end',
|
48
|
+
paddingBottom: 'xs',
|
49
|
+
borderBottomColor: 'active',
|
50
|
+
color: 'neutral.10',
|
51
|
+
fontSize: 'md',
|
52
|
+
fontWeight: 1,
|
53
|
+
lineHeight: '18px',
|
54
|
+
'&:focus': {
|
55
|
+
outline: 'none',
|
56
|
+
boxShadow: 'focus',
|
57
|
+
borderColor: 'active',
|
58
|
+
borderWidth: '1px',
|
59
|
+
borderStyle: 'solid'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
editableInputWrapper: {
|
63
|
+
marginRight: '30px',
|
64
|
+
flexGrow: 1
|
65
|
+
},
|
66
|
+
editableInpuTextArea: {
|
67
|
+
maxHeight: '150px'
|
68
|
+
},
|
69
|
+
editableControlWrapper: {
|
70
|
+
position: 'absolute',
|
71
|
+
right: '0',
|
72
|
+
top: '27.5%',
|
73
|
+
alignItems: 'center',
|
74
|
+
justifyContent: 'space-between'
|
75
|
+
},
|
76
|
+
editableControlIconButton: {
|
77
|
+
marginRight: 'md',
|
78
|
+
width: '20px',
|
79
|
+
height: '20px'
|
80
|
+
}
|
81
|
+
};
|
40
82
|
export var Default = function Default() {
|
41
83
|
return ___EmotionJSX(Editable, {
|
42
84
|
value: "Some value..."
|
@@ -90,6 +132,13 @@ var EditablePreview = function EditablePreview() {
|
|
90
132
|
hasFocus = _useState4[0],
|
91
133
|
setFocus = _useState4[1];
|
92
134
|
|
135
|
+
var editablePreviewDynamicSx = {
|
136
|
+
backgroundColor: hasFocus ? 'accent.95' : 'white',
|
137
|
+
borderBottom: editableContext.isEditing ? '0px' : '1px dashed',
|
138
|
+
'&:hover': {
|
139
|
+
background: editableContext.isEditing ? 'white' : 'accent.95'
|
140
|
+
}
|
141
|
+
};
|
93
142
|
useEffect(function () {
|
94
143
|
if (hasFocus && editableContext.isEditing) {
|
95
144
|
setFocus(false);
|
@@ -116,8 +165,8 @@ var EditablePreview = function EditablePreview() {
|
|
116
165
|
"aria-hidden": editableContext.isEditing,
|
117
166
|
onClick: handleClick,
|
118
167
|
onKeyDown: handleKeyDown,
|
119
|
-
"aria-readonly": "false",
|
120
168
|
"aria-label": "Inline editable text field",
|
169
|
+
role: "textbox",
|
121
170
|
onFocus: function onFocus() {
|
122
171
|
return setFocus(true);
|
123
172
|
},
|
@@ -125,32 +174,7 @@ var EditablePreview = function EditablePreview() {
|
|
125
174
|
return setFocus(false);
|
126
175
|
},
|
127
176
|
placeholder: "Click or press enter to edit text",
|
128
|
-
sx: {
|
129
|
-
whiteSpace: 'pre-line',
|
130
|
-
backgroundColor: hasFocus ? 'accent.95' : 'white',
|
131
|
-
width: '100%',
|
132
|
-
overflowWrap: 'break-word',
|
133
|
-
minHeight: '45px',
|
134
|
-
paddingLeft: 'xs',
|
135
|
-
justifyContent: 'flex-end',
|
136
|
-
paddingBottom: 'xs',
|
137
|
-
borderBottom: editableContext.isEditing ? '0px' : '1px dashed',
|
138
|
-
borderBottomColor: 'active',
|
139
|
-
color: 'neutral.10',
|
140
|
-
fontSize: 'md',
|
141
|
-
fontWeight: 1,
|
142
|
-
lineHeight: '18px',
|
143
|
-
'&:hover': {
|
144
|
-
background: editableContext.isEditing ? 'white' : 'accent.95'
|
145
|
-
},
|
146
|
-
'&:focus': {
|
147
|
-
outline: 'none',
|
148
|
-
boxShadow: 'focus',
|
149
|
-
borderColor: 'active',
|
150
|
-
borderWidth: '1px',
|
151
|
-
borderStyle: 'solid'
|
152
|
-
}
|
153
|
-
}
|
177
|
+
sx: _objectSpread(_objectSpread({}, editablePreviewDynamicSx), sx.editablePreview)
|
154
178
|
}, editableContext.value);
|
155
179
|
};
|
156
180
|
/**
|
@@ -219,10 +243,7 @@ var EditableInput = function EditableInput(props) {
|
|
219
243
|
return ___EmotionJSX(Box, {
|
220
244
|
display: editableContext.isEditing ? 'flex' : 'none',
|
221
245
|
"aria-hidden": !editableContext.isEditing,
|
222
|
-
sx:
|
223
|
-
marginRight: '30px',
|
224
|
-
flexGrow: 1
|
225
|
-
}
|
246
|
+
sx: sx.editableInputWrapper
|
226
247
|
}, ___EmotionJSX(TextAreaField, {
|
227
248
|
rows: 1,
|
228
249
|
ref: editableInput,
|
@@ -233,9 +254,7 @@ var EditableInput = function EditableInput(props) {
|
|
233
254
|
onKeyDown: handleKeyDown,
|
234
255
|
value: editingValue,
|
235
256
|
"aria-label": ariaLabel,
|
236
|
-
sx:
|
237
|
-
maxHeight: '150px'
|
238
|
-
},
|
257
|
+
sx: sx.editableInpuTextArea,
|
239
258
|
isUnresizable: true
|
240
259
|
}));
|
241
260
|
};
|
@@ -286,22 +305,12 @@ var EditableControl = function EditableControl(props) {
|
|
286
305
|
display: editableContext.isEditing ? 'flex' : 'none',
|
287
306
|
"aria-hidden": !editableContext.isEditing,
|
288
307
|
isRow: true,
|
289
|
-
sx:
|
290
|
-
position: 'absolute',
|
291
|
-
right: '0',
|
292
|
-
top: '27.5%',
|
293
|
-
alignItems: 'center',
|
294
|
-
justifyContent: 'space-between'
|
295
|
-
}
|
308
|
+
sx: sx.editableControlWrapper
|
296
309
|
}, ___EmotionJSX(IconButton, {
|
297
310
|
onPress: handleSubmit,
|
298
311
|
"aria-label": confirmBtn.ariaLabel,
|
299
312
|
variant: confirmBtn.variant,
|
300
|
-
|
301
|
-
sx: {
|
302
|
-
width: '20px',
|
303
|
-
height: '20px'
|
304
|
-
}
|
313
|
+
sx: sx.editableControlIconButton
|
305
314
|
}, ___EmotionJSX(Icon, {
|
306
315
|
icon: CheckIcon
|
307
316
|
})), ___EmotionJSX(IconButton, {
|
@@ -92,44 +92,106 @@ var items = [{
|
|
92
92
|
avatar: AccountIcon,
|
93
93
|
hasSeparator: false
|
94
94
|
}];
|
95
|
+
var sx = {
|
96
|
+
wrapper: {
|
97
|
+
px: 'lg',
|
98
|
+
py: 'lg',
|
99
|
+
bg: 'accent.99',
|
100
|
+
height: '900px',
|
101
|
+
overflowY: 'scroll'
|
102
|
+
},
|
103
|
+
searchField: {
|
104
|
+
position: 'fixed',
|
105
|
+
mb: 'sm',
|
106
|
+
width: '400px'
|
107
|
+
},
|
108
|
+
listElementWrapper: {
|
109
|
+
px: 'md',
|
110
|
+
bg: 'accent.99',
|
111
|
+
justifyContent: 'center'
|
112
|
+
},
|
113
|
+
separator: {
|
114
|
+
bg: 'accent.90'
|
115
|
+
},
|
116
|
+
tabsWrapper: {
|
117
|
+
px: 'lg',
|
118
|
+
pt: 'xs'
|
119
|
+
},
|
120
|
+
iconButton: {
|
121
|
+
position: 'absolute',
|
122
|
+
top: 0,
|
123
|
+
right: 0
|
124
|
+
},
|
125
|
+
itemLabel: {
|
126
|
+
fontSize: 'sm',
|
127
|
+
fontWeight: 3,
|
128
|
+
lineHeight: '16px',
|
129
|
+
mb: 'xs'
|
130
|
+
},
|
131
|
+
itemValue: {
|
132
|
+
fontWeight: 0,
|
133
|
+
lineHeight: '18px',
|
134
|
+
variant: 'base',
|
135
|
+
mb: 'md'
|
136
|
+
},
|
137
|
+
listElement: {
|
138
|
+
wrapper: {
|
139
|
+
minHeight: '60px'
|
140
|
+
},
|
141
|
+
iconWrapper: {
|
142
|
+
mr: 'auto',
|
143
|
+
alignItems: 'center'
|
144
|
+
},
|
145
|
+
icon: {
|
146
|
+
mr: 'sm',
|
147
|
+
alignSelf: 'center',
|
148
|
+
color: 'accent.40'
|
149
|
+
},
|
150
|
+
avatar: {
|
151
|
+
width: '25px',
|
152
|
+
height: '25px',
|
153
|
+
mr: 'md'
|
154
|
+
},
|
155
|
+
title: {
|
156
|
+
alignSelf: 'start'
|
157
|
+
},
|
158
|
+
subtitle: {
|
159
|
+
fontSize: 'sm',
|
160
|
+
my: '1px',
|
161
|
+
lineHeight: '16px',
|
162
|
+
alignSelf: 'start'
|
163
|
+
},
|
164
|
+
menuWrapper: {
|
165
|
+
alignSelf: 'center'
|
166
|
+
}
|
167
|
+
}
|
168
|
+
};
|
95
169
|
|
96
170
|
var ListElement = function ListElement(_ref) {
|
97
171
|
var item = _ref.item,
|
98
172
|
onClosePanel = _ref.onClosePanel;
|
99
173
|
return ___EmotionJSX(Box, {
|
100
174
|
isRow: true,
|
101
|
-
|
175
|
+
sx: sx.listElement.wrapper
|
102
176
|
}, ___EmotionJSX(Box, {
|
103
177
|
isRow: true,
|
104
|
-
|
105
|
-
alignItems: "center"
|
178
|
+
sx: sx.listElement.iconWrapper
|
106
179
|
}, item.hasIcon ? ___EmotionJSX(Icon, {
|
107
180
|
icon: item.avatar,
|
108
|
-
alignSelf: "center",
|
109
181
|
size: 24,
|
110
|
-
|
111
|
-
color: "accent.40"
|
182
|
+
sx: sx.listElement.icon
|
112
183
|
}) : ___EmotionJSX(Avatar, {
|
113
|
-
|
114
|
-
sx: {
|
115
|
-
width: '25px',
|
116
|
-
height: '25px'
|
117
|
-
},
|
184
|
+
sx: sx.listElement.avatar,
|
118
185
|
src: item.avatar
|
119
186
|
}), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
120
187
|
variant: "bodyStrong",
|
121
|
-
|
188
|
+
sx: sx.listElement.title
|
122
189
|
}, item.lastName, ", ", item.firstName), ___EmotionJSX(Text, {
|
123
|
-
sx: {
|
124
|
-
fontSize: 'sm',
|
125
|
-
my: '1px',
|
126
|
-
lineHeight: '16px'
|
127
|
-
},
|
128
190
|
variant: "subtitle",
|
129
|
-
|
191
|
+
sx: sx.listElement.subtitle
|
130
192
|
}, item.email))), ___EmotionJSX(Box, {
|
131
193
|
isRow: true,
|
132
|
-
|
194
|
+
sx: sx.listElement.menuWrapper
|
133
195
|
}, ___EmotionJSX(SwitchField, {
|
134
196
|
"aria-label": "active user",
|
135
197
|
isDefaultSelected: true,
|
@@ -186,11 +248,7 @@ export var Default = function Default() {
|
|
186
248
|
};
|
187
249
|
|
188
250
|
return ___EmotionJSX(Box, {
|
189
|
-
|
190
|
-
py: "lg",
|
191
|
-
bg: "accent.99",
|
192
|
-
height: "900px",
|
193
|
-
overflowY: "scroll"
|
251
|
+
sx: sx.wrapper
|
194
252
|
}, ___EmotionJSX(SearchField, {
|
195
253
|
position: "fixed",
|
196
254
|
mb: "sm",
|
@@ -224,18 +282,15 @@ export var Default = function Default() {
|
|
224
282
|
restoreFocus: true,
|
225
283
|
autoFocus: true
|
226
284
|
}, ___EmotionJSX(Box, {
|
227
|
-
|
228
|
-
bg: "accent.99",
|
229
|
-
justifyContent: "center"
|
285
|
+
sx: sx.listElementWrapper
|
230
286
|
}, ___EmotionJSX(ListElement, {
|
231
287
|
item: selectedItemId >= 0 ? items[selectedItemId] : [],
|
232
288
|
onClosePanel: closePanelHandler
|
233
289
|
})), ___EmotionJSX(Separator, {
|
234
290
|
margin: 0,
|
235
|
-
|
291
|
+
sx: sx.separator
|
236
292
|
}), ___EmotionJSX(Box, {
|
237
|
-
|
238
|
-
pt: "xs"
|
293
|
+
sx: sx.tabsWrapper
|
239
294
|
}, ___EmotionJSX(Tabs, {
|
240
295
|
tabListProps: {
|
241
296
|
justifyContent: 'center'
|
@@ -249,73 +304,33 @@ export var Default = function Default() {
|
|
249
304
|
title: "Profile"
|
250
305
|
}, selectedItemId >= 0 && ___EmotionJSX(React.Fragment, null, ___EmotionJSX(IconButton, {
|
251
306
|
variant: "inverted",
|
252
|
-
sx:
|
253
|
-
position: 'absolute',
|
254
|
-
top: 0,
|
255
|
-
right: 0
|
256
|
-
}
|
307
|
+
sx: sx.iconButton
|
257
308
|
}, ___EmotionJSX(PencilIcon, {
|
258
309
|
size: 20
|
259
310
|
})), ___EmotionJSX(Text, {
|
260
|
-
sx:
|
261
|
-
|
262
|
-
fontWeight: 3,
|
263
|
-
lineHeight: '16px'
|
264
|
-
},
|
265
|
-
variant: "base",
|
266
|
-
mb: "xs"
|
311
|
+
sx: sx.itemLabel,
|
312
|
+
variant: "base"
|
267
313
|
}, "Full Name"), ___EmotionJSX(Text, {
|
268
|
-
sx:
|
269
|
-
|
270
|
-
lineHeight: '18px'
|
271
|
-
},
|
272
|
-
variant: "base",
|
273
|
-
mb: "md"
|
314
|
+
sx: sx.itemValue,
|
315
|
+
variant: "base"
|
274
316
|
}, items[selectedItemId].firstName, " ", items[selectedItemId].lastName), ___EmotionJSX(Text, {
|
275
|
-
sx:
|
276
|
-
|
277
|
-
fontWeight: 3,
|
278
|
-
lineHeight: '16px'
|
279
|
-
},
|
280
|
-
variant: "base",
|
281
|
-
mb: "xs"
|
317
|
+
sx: sx.itemLabel,
|
318
|
+
variant: "base"
|
282
319
|
}, "First Name"), ___EmotionJSX(Text, {
|
283
|
-
sx:
|
284
|
-
|
285
|
-
lineHeight: '18px'
|
286
|
-
},
|
287
|
-
variant: "base",
|
288
|
-
mb: "md"
|
320
|
+
sx: sx.itemValue,
|
321
|
+
variant: "base"
|
289
322
|
}, items[selectedItemId].firstName), ___EmotionJSX(Text, {
|
290
|
-
sx:
|
291
|
-
|
292
|
-
fontWeight: 3,
|
293
|
-
lineHeight: '16px'
|
294
|
-
},
|
295
|
-
variant: "base",
|
296
|
-
mb: "xs"
|
323
|
+
sx: sx.itemLabel,
|
324
|
+
variant: "base"
|
297
325
|
}, "Last Name"), ___EmotionJSX(Text, {
|
298
|
-
sx:
|
299
|
-
|
300
|
-
lineHeight: '18px'
|
301
|
-
},
|
302
|
-
variant: "base",
|
303
|
-
mb: "md"
|
326
|
+
sx: sx.itemValue,
|
327
|
+
variant: "base"
|
304
328
|
}, items[selectedItemId].lastName), ___EmotionJSX(Text, {
|
305
|
-
sx:
|
306
|
-
|
307
|
-
fontWeight: 3,
|
308
|
-
lineHeight: '16px'
|
309
|
-
},
|
310
|
-
variant: "base",
|
311
|
-
mb: "xs"
|
329
|
+
sx: sx.itemLabel,
|
330
|
+
variant: "base"
|
312
331
|
}, "Email"), ___EmotionJSX(Text, {
|
313
|
-
sx:
|
314
|
-
|
315
|
-
lineHeight: '18px'
|
316
|
-
},
|
317
|
-
variant: "base",
|
318
|
-
mb: "md"
|
332
|
+
sx: sx.itemValue,
|
333
|
+
variant: "base"
|
319
334
|
}, items[selectedItemId].email))), ___EmotionJSX(Tab, {
|
320
335
|
title: "Group Memberships"
|
321
336
|
}, ___EmotionJSX(Text, null, "Group Memberships")), ___EmotionJSX(Tab, {
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PlusIcon from 'mdi-react/PlusIcon';
|
3
|
+
import { Box, Button, IconButton, Icon, Text } from '../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
export default {
|
6
|
+
title: 'Recipes/Page Header'
|
7
|
+
};
|
8
|
+
export var Default = function Default() {
|
9
|
+
var heading = 'Title of the Page';
|
10
|
+
var description = 'The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page. The description of the page.';
|
11
|
+
return ___EmotionJSX(Box, null, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
|
12
|
+
align: "center",
|
13
|
+
isRow: true,
|
14
|
+
mb: "xs",
|
15
|
+
role: "heading",
|
16
|
+
"aria-level": "1"
|
17
|
+
}, ___EmotionJSX(Text, {
|
18
|
+
variant: "title",
|
19
|
+
fontWeight: 3
|
20
|
+
}, heading), ___EmotionJSX(Button, {
|
21
|
+
variant: "inlinePrimary",
|
22
|
+
ml: "sm"
|
23
|
+
}, ___EmotionJSX(Icon, {
|
24
|
+
icon: PlusIcon,
|
25
|
+
color: "white",
|
26
|
+
size: 13,
|
27
|
+
mr: "4px"
|
28
|
+
}), "\xA0", "Add")), ___EmotionJSX(Text, {
|
29
|
+
variant: "bodyWeak"
|
30
|
+
}, description)), ___EmotionJSX(Box, {
|
31
|
+
mt: "xl"
|
32
|
+
}, ___EmotionJSX(Box, {
|
33
|
+
align: "center",
|
34
|
+
isRow: true,
|
35
|
+
mb: "xs",
|
36
|
+
role: "heading",
|
37
|
+
"aria-level": "1"
|
38
|
+
}, ___EmotionJSX(Text, {
|
39
|
+
variant: "title",
|
40
|
+
fontWeight: 3
|
41
|
+
}, heading), ___EmotionJSX(IconButton, {
|
42
|
+
"aria-label": "icon button",
|
43
|
+
ml: "sm",
|
44
|
+
mt: "3px",
|
45
|
+
variant: "inverted"
|
46
|
+
}, ___EmotionJSX(Icon, {
|
47
|
+
icon: PlusIcon,
|
48
|
+
color: "white",
|
49
|
+
size: 13
|
50
|
+
}))), ___EmotionJSX(Text, {
|
51
|
+
variant: "bodyWeak"
|
52
|
+
}, description)));
|
53
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pingux/astro",
|
3
|
-
"version": "1.27.0-alpha.
|
3
|
+
"version": "1.27.0-alpha.10",
|
4
4
|
"description": "PingUX themeable React component library",
|
5
5
|
"author": "ux-development@pingidentity.com",
|
6
6
|
"license": "Apache-2.0",
|
@@ -121,6 +121,7 @@
|
|
121
121
|
"@react-stately/radio": "^3.2.0",
|
122
122
|
"@react-stately/searchfield": "^3.1.1",
|
123
123
|
"@react-stately/select": "^3.1.1",
|
124
|
+
"@react-stately/selection": "~3.10.2",
|
124
125
|
"@react-stately/slider": "^3.0.7",
|
125
126
|
"@react-stately/tabs": "^3.0.1",
|
126
127
|
"@react-stately/toggle": "^3.2.0",
|