@pingux/astro 1.27.0-alpha.2 → 1.27.0-alpha.3

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.
@@ -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
- minHeight: "60px"
211
+ sx: sx.listElement.wrapper
138
212
  }, (0, _react2.jsx)(_index.Box, {
139
213
  isRow: true,
140
- mr: "auto",
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
- mr: "sm",
147
- color: "accent.40"
218
+ sx: sx.listElement.icon
148
219
  }) : (0, _react2.jsx)(_index.Avatar, {
149
- mr: "md",
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
- alignSelf: "start"
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
- alignSelf: "start"
227
+ sx: sx.listElement.subtitle
166
228
  }, item.email))), (0, _react2.jsx)(_index.Box, {
167
229
  isRow: true,
168
- alignSelf: "center"
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
- px: "lg",
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
- px: "md",
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
- bg: "accent.90"
327
+ sx: sx.separator
272
328
  }), (0, _react2.jsx)(_index.Box, {
273
- px: "lg",
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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, {
@@ -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
- minHeight: "60px"
175
+ sx: sx.listElement.wrapper
102
176
  }, ___EmotionJSX(Box, {
103
177
  isRow: true,
104
- mr: "auto",
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
- mr: "sm",
111
- color: "accent.40"
182
+ sx: sx.listElement.icon
112
183
  }) : ___EmotionJSX(Avatar, {
113
- mr: "md",
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
- alignSelf: "start"
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
- alignSelf: "start"
191
+ sx: sx.listElement.subtitle
130
192
  }, item.email))), ___EmotionJSX(Box, {
131
193
  isRow: true,
132
- alignSelf: "center"
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
- px: "lg",
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
- px: "md",
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
- bg: "accent.90"
291
+ sx: sx.separator
236
292
  }), ___EmotionJSX(Box, {
237
- px: "lg",
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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
- fontSize: 'sm',
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
- fontWeight: 0,
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, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.27.0-alpha.2",
3
+ "version": "1.27.0-alpha.3",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",