@pingux/astro 2.16.1-alpha.0 → 2.17.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.
Files changed (74) hide show
  1. package/lib/cjs/components/ListView/ListView.js +1 -1
  2. package/lib/cjs/components/ListView/ListView.mdx +4 -1
  3. package/lib/cjs/components/ListView/ListView.stories.js +52 -98
  4. package/lib/cjs/components/ListView/ListViewItem.js +126 -0
  5. package/lib/cjs/components/ListViewItem/ListViewItem.js +81 -100
  6. package/lib/cjs/{experimental → components}/ListViewItem/ListViewItem.mdx +4 -4
  7. package/lib/cjs/{experimental → components}/ListViewItem/ListViewItem.stories.js +32 -37
  8. package/lib/cjs/{experimental → components}/ListViewItem/ListViewItem.test.js +3 -3
  9. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.js +5 -5
  10. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.stories.js +5 -5
  11. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.test.js +2 -2
  12. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemMenu.js +8 -8
  13. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemMenu.stories.js +5 -5
  14. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemMenu.test.js +2 -3
  15. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.js +5 -5
  16. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.stories.js +5 -5
  17. package/lib/cjs/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.test.js +2 -2
  18. package/lib/cjs/experimental/PageHeader/PageHeader.js +14 -14
  19. package/lib/cjs/experimental/PageHeader/PageHeader.stories.js +27 -11
  20. package/lib/cjs/experimental/PageHeader/PageHeader.test.js +14 -5
  21. package/lib/cjs/experimental/PanelHeader/PanelHeader.js +1 -1
  22. package/lib/cjs/experimental/PanelHeader/PanelHeader.stories.js +1 -1
  23. package/lib/cjs/index.d.ts +4 -4
  24. package/lib/cjs/index.js +8 -8
  25. package/lib/cjs/recipes/ListAndPanel.stories.js +195 -267
  26. package/lib/cjs/recipes/MaskedValue.stories.js +8 -1
  27. package/lib/cjs/{experimental/recipes → recipes}/ScrollableListView.stories.js +2 -2
  28. package/lib/cjs/utils/designUtils/figmaLinks.js +3 -0
  29. package/lib/components/ListView/ListView.js +1 -1
  30. package/lib/components/ListView/ListView.mdx +4 -1
  31. package/lib/components/ListView/ListView.stories.js +47 -93
  32. package/lib/components/ListView/ListViewItem.js +113 -0
  33. package/lib/components/ListViewItem/ListViewItem.js +78 -99
  34. package/lib/{experimental → components}/ListViewItem/ListViewItem.mdx +4 -4
  35. package/lib/{experimental → components}/ListViewItem/ListViewItem.stories.js +7 -12
  36. package/lib/{experimental → components}/ListViewItem/ListViewItem.test.js +1 -1
  37. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.js +4 -4
  38. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.stories.js +3 -3
  39. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemEditButton.test.js +1 -1
  40. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemMenu.js +5 -5
  41. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemMenu.stories.js +3 -3
  42. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemMenu.test.js +1 -2
  43. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.js +4 -4
  44. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.stories.js +3 -3
  45. package/lib/{experimental → components}/ListViewItem/controls/ListViewItemSwitchField.test.js +1 -1
  46. package/lib/experimental/PageHeader/PageHeader.js +14 -14
  47. package/lib/experimental/PageHeader/PageHeader.stories.js +25 -10
  48. package/lib/experimental/PageHeader/PageHeader.test.js +14 -5
  49. package/lib/experimental/PanelHeader/PanelHeader.js +1 -1
  50. package/lib/experimental/PanelHeader/PanelHeader.stories.js +1 -1
  51. package/lib/index.js +4 -4
  52. package/lib/recipes/ListAndPanel.stories.js +186 -260
  53. package/lib/recipes/MaskedValue.stories.js +7 -0
  54. package/lib/{experimental/recipes → recipes}/ScrollableListView.stories.js +2 -2
  55. package/lib/utils/designUtils/figmaLinks.js +3 -0
  56. package/package.json +1 -1
  57. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -189
  58. package/lib/cjs/experimental/ListView/ListView.mdx +0 -47
  59. package/lib/cjs/experimental/ListView/ListView.stories.js +0 -742
  60. package/lib/cjs/experimental/ListViewItem/ListViewItem.js +0 -108
  61. package/lib/cjs/experimental/recipes/ListAndPanel.stories.js +0 -359
  62. package/lib/cjs/recipes/ScrollableListView.stories.hidden.js +0 -136
  63. package/lib/cjs/recipes/StatsCircle.stories.js +0 -37
  64. package/lib/components/ListItem/ListItem.stories.js +0 -174
  65. package/lib/experimental/ListView/ListView.mdx +0 -47
  66. package/lib/experimental/ListView/ListView.stories.js +0 -729
  67. package/lib/experimental/ListViewItem/ListViewItem.js +0 -93
  68. package/lib/experimental/recipes/ListAndPanel.stories.js +0 -342
  69. package/lib/recipes/ScrollableListView.stories.hidden.js +0 -121
  70. package/lib/recipes/StatsCircle.stories.js +0 -27
  71. /package/lib/cjs/{experimental → components}/ListViewItem/listViewItemAttributes.js +0 -0
  72. /package/lib/cjs/{experimental/recipes → recipes}/items.js +0 -0
  73. /package/lib/{experimental → components}/ListViewItem/listViewItemAttributes.js +0 -0
  74. /package/lib/{experimental/recipes → recipes}/items.js +0 -0
@@ -1,5 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
2
  import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
3
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
3
4
  import React, { useRef, useState } from 'react';
4
5
  import { FocusScope } from 'react-aria';
5
6
  import { Item } from 'react-stately';
@@ -8,92 +9,20 @@ import CloseIcon from '@pingux/mdi-react/CloseIcon';
8
9
  import MoreVertIcon from '@pingux/mdi-react/MoreVertIcon';
9
10
  import PencilIcon from '@pingux/mdi-react/PencilIcon';
10
11
  import PlusIcon from '@pingux/mdi-react/PlusIcon';
11
- import { useOverlayPanelState } from '../hooks';
12
- import useOverlappingMenuHoverState from '../hooks/useOverlappingMenuHoverState';
13
- import { Box, Icon, IconButton, Link, ListItem, ListView, Menu, OverlayPanel, PopoverMenu, SearchField, Separator, SwitchField, Tab, Tabs, Text } from '../index';
12
+ import { useOverlappingMenuHoverState, useOverlayPanelState } from '../hooks';
13
+ import { Box, Icon, IconButton, Link, ListView, ListViewItem, ListViewItemMenu, ListViewItemSwitchField, Menu, OverlayPanel, PopoverMenu, SearchField, Separator, SwitchField, Tab, Tabs, Text } from '../index';
14
+ import { items } from './items';
14
15
  import { jsx as ___EmotionJSX } from "@emotion/react";
15
16
  export default {
16
- title: 'Recipes/List with Panel'
17
+ title: 'Recipes/List And Panel',
18
+ parameters: {
19
+ docs: {
20
+ source: {
21
+ type: 'code'
22
+ }
23
+ }
24
+ }
17
25
  };
18
- var items = [{
19
- email: 'dburkitt5@columbia.edu',
20
- firstName: 'Nicola',
21
- lastName: 'Burkitt',
22
- hasIcon: true,
23
- avatar: AccountIcon
24
- }, {
25
- email: 'idixie2@elegantthemes.com',
26
- firstName: 'Cacilia',
27
- lastName: 'Dixie',
28
- hasIcon: true,
29
- avatar: AccountIcon
30
- }, {
31
- email: 'dfowler0@rambler.ru',
32
- firstName: 'Stavro',
33
- lastName: 'Fowler',
34
- hasIcon: true,
35
- avatar: AccountIcon
36
- }, {
37
- email: 'jgolde8@jimdo.com',
38
- firstName: 'Celisse',
39
- lastName: 'Golde',
40
- hasIcon: true,
41
- avatar: AccountIcon
42
- }, {
43
- email: 'shearst9@answers.com',
44
- firstName: 'Jeth',
45
- lastName: 'Hearst',
46
- hasIcon: true,
47
- avatar: AccountIcon
48
- }, {
49
- email: 'ajinaa@mapquest.com',
50
- firstName: 'Kaycee',
51
- lastName: 'Jina',
52
- hasIcon: true,
53
- avatar: AccountIcon
54
- }, {
55
- email: 'vmalster4@biblegateway.com',
56
- firstName: 'Lorry',
57
- lastName: 'Malster',
58
- hasIcon: true,
59
- avatar: AccountIcon
60
- }, {
61
- email: 'yphipp6@yellowpages.com',
62
- firstName: 'Stanley',
63
- lastName: 'Phipp',
64
- hasIcon: true,
65
- avatar: AccountIcon
66
- }, {
67
- email: 'mskilbeck3@bbc.co.uk',
68
- firstName: 'Gradey',
69
- lastName: 'Skilbeck',
70
- hasIcon: true,
71
- avatar: AccountIcon
72
- }, {
73
- email: 'dstebbing1@msu.edu',
74
- firstName: 'Marnia',
75
- lastName: 'Stebbing',
76
- hasIcon: true,
77
- avatar: AccountIcon
78
- }, {
79
- email: 'lsterley7@lulu.com',
80
- firstName: 'Joshua',
81
- lastName: 'Sterley',
82
- hasIcon: true,
83
- avatar: AccountIcon
84
- }, {
85
- email: 'luttleyb@hugedomains.com',
86
- firstName: 'Jarrod',
87
- lastName: 'Uttley',
88
- hasIcon: true,
89
- avatar: AccountIcon
90
- }, {
91
- email: 'lidelc@yelp.com',
92
- firstName: 'Andromache',
93
- lastName: 'Idel',
94
- hasIcon: true,
95
- avatar: AccountIcon
96
- }];
97
26
  var sx = {
98
27
  wrapper: {
99
28
  px: 'lg',
@@ -102,16 +31,6 @@ var sx = {
102
31
  height: '900px',
103
32
  overflowY: 'scroll'
104
33
  },
105
- searchField: {
106
- position: 'fixed',
107
- mb: 'sm',
108
- width: '400px'
109
- },
110
- listElementWrapper: {
111
- px: 'md',
112
- bg: 'accent.99',
113
- justifyContent: 'center'
114
- },
115
34
  separator: {
116
35
  bg: 'accent.90'
117
36
  },
@@ -133,120 +52,83 @@ var sx = {
133
52
  itemValue: {
134
53
  fontWeight: 0,
135
54
  lineHeight: '18px',
136
- variant: 'base',
137
55
  mb: 'md'
138
56
  },
139
- listElement: {
140
- wrapper: {
141
- minHeight: '60px',
142
- pl: '14px'
143
- },
144
- iconWrapper: {
145
- mr: 'auto',
146
- alignItems: 'center'
57
+ panelHeader: {
58
+ container: {
59
+ bg: 'accent.99',
60
+ minHeight: 58,
61
+ ml: 0,
62
+ pl: 14,
63
+ pr: 'xs'
147
64
  },
148
- icon: {
149
- mr: 'md',
65
+ controls: {
150
66
  alignSelf: 'center',
151
- color: 'accent.40'
152
- },
153
- avatar: {
154
- width: '25px',
155
- height: '25px',
156
- mr: '14px'
67
+ ml: 'auto',
68
+ pr: 'sm'
157
69
  },
158
- title: {
159
- alignSelf: 'start',
160
- fontSize: 'md'
70
+ data: {
71
+ alignItems: 'center'
161
72
  },
162
73
  subtitle: {
74
+ alignSelf: 'start',
163
75
  fontSize: 'sm',
164
- my: '1px',
165
76
  lineHeight: '16px',
166
- alignSelf: 'start'
77
+ my: '1px'
167
78
  },
168
- menuWrapper: {
169
- alignSelf: 'center',
170
- pr: '4px'
171
- }
172
- }
173
- };
174
- var ListElement = function ListElement(_ref) {
175
- var item = _ref.item,
176
- isHoverable = _ref.isHoverable,
177
- onClosePanel = _ref.onClosePanel;
178
- var listItemRef = useRef();
179
- var _useOverlappingMenuHo = useOverlappingMenuHoverState({
180
- listItemRef: listItemRef
181
- }),
182
- handleHoverEnd = _useOverlappingMenuHo.handleHoverEnd,
183
- handleHoverStart = _useOverlappingMenuHo.handleHoverStart,
184
- handleMenuHoverEnd = _useOverlappingMenuHo.handleMenuHoverEnd,
185
- handleMouseMove = _useOverlappingMenuHo.handleMouseMove,
186
- isHovered = _useOverlappingMenuHo.isHovered;
187
- return ___EmotionJSX(ListItem, {
188
- isHovered: isHoverable && isHovered,
189
- isRow: true,
190
- onHoverEnd: handleHoverEnd,
191
- onHoverStart: handleHoverStart,
192
- onMouseMove: handleMouseMove,
193
- ref: listItemRef,
194
- sx: sx.listElement.wrapper
195
- }, ___EmotionJSX(Box, {
196
- isRow: true,
197
- sx: sx.listElement.iconWrapper
198
- }, ___EmotionJSX(Icon, {
199
- icon: item.avatar,
200
- size: "md",
201
- sx: sx.listElement.icon,
202
- title: {
203
- name: 'Account Icon'
204
- }
205
- }), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
206
- variant: "bodyStrong",
207
- sx: sx.listElement.title
208
- }, item.lastName, ",", ' ', item.firstName), ___EmotionJSX(Text, {
209
- variant: "subtitle",
210
- sx: sx.listElement.subtitle
211
- }, item.email))), ___EmotionJSX(Box, {
212
- isRow: true,
213
- sx: sx.listElement.menuWrapper
214
- }, ___EmotionJSX(SwitchField, {
215
- "aria-label": "active user",
216
- isDefaultSelected: true,
217
- alignSelf: "center",
218
- mr: "sm"
219
- }), ___EmotionJSX(PopoverMenu, null, ___EmotionJSX(IconButton, {
220
- "aria-label": "more icon button",
221
- mr: onClosePanel ? 'sm' : 0
222
- }, ___EmotionJSX(Icon, {
223
- icon: MoreVertIcon,
224
- size: "md",
225
79
  title: {
226
- name: 'More Vertical Icon'
227
- }
228
- })), ___EmotionJSX(Menu, {
229
- onAction: handleHoverEnd,
230
- onHoverEnd: handleMenuHoverEnd,
231
- onHoverStart: handleHoverStart
232
- }, ___EmotionJSX(Item, {
233
- key: "enable"
234
- }, "Enable user"), ___EmotionJSX(Item, {
235
- key: "disable"
236
- }, "Disable user"), ___EmotionJSX(Item, {
237
- key: "delete"
238
- }, "Delete user"))), onClosePanel && ___EmotionJSX(IconButton, {
239
- "aria-label": "close icon button",
240
- onPress: onClosePanel
241
- }, ___EmotionJSX(Icon, {
242
- size: "sm",
243
- icon: CloseIcon,
244
- title: {
245
- name: 'Close Icon'
80
+ alignSelf: 'start',
81
+ fontSize: 'md'
82
+ },
83
+ wrapper: {
84
+ cursor: 'pointer',
85
+ display: 'flex',
86
+ flex: '1 1 0px',
87
+ ml: 'md'
246
88
  }
247
- }))));
89
+ }
248
90
  };
249
- export var Default = function Default() {
91
+ var heading = 'Users';
92
+ 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.';
93
+ var title = ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
94
+ align: "center",
95
+ isRow: true,
96
+ mb: "xs",
97
+ role: "heading",
98
+ "aria-level": "1"
99
+ }, ___EmotionJSX(Text, {
100
+ fontSize: "xx",
101
+ fontWeight: 3,
102
+ fontColor: "text.primary"
103
+ }, heading), ___EmotionJSX(IconButton, {
104
+ "aria-label": "icon button",
105
+ ml: "sm",
106
+ variant: "inverted"
107
+ }, ___EmotionJSX(Icon, {
108
+ icon: PlusIcon,
109
+ size: "sm"
110
+ }))), ___EmotionJSX(Text, {
111
+ fontSize: "sm",
112
+ color: "text.secondary",
113
+ fontWeight: 0,
114
+ width: "800px"
115
+ }, description, ___EmotionJSX(Link, {
116
+ href: "https://uilibrary.ping-eng.com/",
117
+ sx: {
118
+ fontSize: '13px'
119
+ }
120
+ }, " Learn more")));
121
+ export var ListAndPanel = function ListAndPanel() {
122
+ // Example of items data structure
123
+ // const items = [
124
+ // {
125
+ // email: 'dburkitt5@columbia.edu',
126
+ // firstName: 'Nicola',
127
+ // lastName: 'Burkitt',
128
+ // icon: AccountIcon,
129
+ // },
130
+ // ]
131
+
250
132
  var _useState = useState(),
251
133
  _useState2 = _slicedToArray(_useState, 2),
252
134
  selectedItemId = _useState2[0],
@@ -259,8 +141,6 @@ export var Default = function Default() {
259
141
  panelState = _useOverlayPanelState.state,
260
142
  onPanelClose = _useOverlayPanelState.onClose;
261
143
  var panelTriggerRef = useRef();
262
- var heading = 'Users';
263
- 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.';
264
144
  var closePanelHandler = function closePanelHandler() {
265
145
  onPanelClose(panelState, panelTriggerRef);
266
146
  setSelectedItemId(-1);
@@ -277,37 +157,6 @@ export var Default = function Default() {
277
157
  closePanelHandler();
278
158
  }
279
159
  };
280
- var title = ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
281
- align: "center",
282
- isRow: true,
283
- mb: "xs",
284
- role: "heading",
285
- "aria-level": "1"
286
- }, ___EmotionJSX(Text, {
287
- fontSize: "xx",
288
- fontWeight: 3,
289
- fontColor: "text.primary"
290
- }, heading), ___EmotionJSX(IconButton, {
291
- "aria-label": "icon button",
292
- ml: "sm",
293
- variant: "inverted"
294
- }, ___EmotionJSX(Icon, {
295
- icon: PlusIcon,
296
- size: "sm",
297
- title: {
298
- name: 'Plus Icon'
299
- }
300
- }))), ___EmotionJSX(Text, {
301
- fontSize: "sm",
302
- color: "text.secondary",
303
- fontWeight: 0,
304
- width: "800px"
305
- }, description, ___EmotionJSX(Link, {
306
- href: "https://uilibrary.ping-eng.com/",
307
- sx: {
308
- fontSize: '13px'
309
- }
310
- }, " Learn more")));
311
160
  return ___EmotionJSX(Box, {
312
161
  sx: sx.wrapper
313
162
  }, title, ___EmotionJSX(SearchField, {
@@ -323,20 +172,17 @@ export var Default = function Default() {
323
172
  items: items,
324
173
  onSelectionChange: selectItemHandler,
325
174
  ref: panelTriggerRef,
326
- selectedKeys: selectedKeys,
327
- isHoverable: false
175
+ selectedKeys: selectedKeys
328
176
  }, function (item) {
177
+ var _context;
329
178
  return ___EmotionJSX(Item, {
330
- key: item.email,
331
- textValue: item.email,
332
- hasSeparator: item.hasSeparator,
333
- listItemProps: {
334
- minHeight: 75,
335
- padding: 1
336
- }
179
+ key: item.email
337
180
  }, ___EmotionJSX(ListElement, {
338
- isHoverable: true,
339
- item: item
181
+ data: {
182
+ text: _concatInstanceProperty(_context = "".concat(item.lastName, ", ")).call(_context, item.firstName),
183
+ subtext: item.email,
184
+ icon: item.icon
185
+ }
340
186
  }));
341
187
  }), ___EmotionJSX(OverlayPanel, {
342
188
  isOpen: panelState.isOpen,
@@ -348,12 +194,10 @@ export var Default = function Default() {
348
194
  contain: true,
349
195
  restoreFocus: true,
350
196
  autoFocus: true
351
- }, ___EmotionJSX(Box, {
352
- sx: sx.listElementWrapper
353
- }, ___EmotionJSX(ListElement, {
197
+ }, ___EmotionJSX(PanelHeader, {
354
198
  item: selectedItemId >= 0 ? items[selectedItemId] : [],
355
199
  onClosePanel: closePanelHandler
356
- })), ___EmotionJSX(Separator, {
200
+ }), ___EmotionJSX(Separator, {
357
201
  margin: 0,
358
202
  sx: sx.separator
359
203
  }), ___EmotionJSX(Box, {
@@ -373,35 +217,117 @@ export var Default = function Default() {
373
217
  variant: "inverted",
374
218
  "aria-label": "pencil icon button",
375
219
  sx: sx.iconButton
376
- }, ___EmotionJSX(PencilIcon, {
377
- size: 20
220
+ }, ___EmotionJSX(Icon, {
221
+ icon: PencilIcon,
222
+ size: "sm"
378
223
  })), ___EmotionJSX(Text, {
379
- sx: sx.itemLabel,
380
- variant: "base"
224
+ sx: sx.itemLabel
381
225
  }, "Full Name"), ___EmotionJSX(Text, {
382
- sx: sx.itemValue,
383
- variant: "base"
226
+ sx: sx.itemValue
384
227
  }, items[selectedItemId].firstName, ' ', items[selectedItemId].lastName), ___EmotionJSX(Text, {
385
- sx: sx.itemLabel,
386
- variant: "base"
228
+ sx: sx.itemLabel
387
229
  }, "First Name"), ___EmotionJSX(Text, {
388
- sx: sx.itemValue,
389
- variant: "base"
230
+ sx: sx.itemValue
390
231
  }, items[selectedItemId].firstName), ___EmotionJSX(Text, {
391
- sx: sx.itemLabel,
392
- variant: "base"
232
+ sx: sx.itemLabel
393
233
  }, "Last Name"), ___EmotionJSX(Text, {
394
- sx: sx.itemValue,
395
- variant: "base"
234
+ sx: sx.itemValue
396
235
  }, items[selectedItemId].lastName), ___EmotionJSX(Text, {
397
- sx: sx.itemLabel,
398
- variant: "base"
236
+ sx: sx.itemLabel
399
237
  }, "Email"), ___EmotionJSX(Text, {
400
- sx: sx.itemValue,
401
- variant: "base"
238
+ sx: sx.itemValue
402
239
  }, items[selectedItemId].email))), ___EmotionJSX(Tab, {
403
240
  title: "Group Memberships"
404
241
  }, ___EmotionJSX(Text, null, "Group Memberships")), ___EmotionJSX(Tab, {
405
242
  title: "Account Info"
406
243
  }, ___EmotionJSX(Text, null, "Account Info")))))));
244
+ };
245
+ export var ListElement = function ListElement(_ref) {
246
+ var _ref$data = _ref.data,
247
+ data = _ref$data === void 0 ? {
248
+ subtext: 'dburkitt5@columbia.edu',
249
+ text: 'Burkitt, Nicola',
250
+ icon: AccountIcon
251
+ } : _ref$data;
252
+ var listItemRef = useRef();
253
+ var _useOverlappingMenuHo = useOverlappingMenuHoverState({
254
+ listItemRef: listItemRef
255
+ }),
256
+ handleHoverEnd = _useOverlappingMenuHo.handleHoverEnd,
257
+ handleHoverStart = _useOverlappingMenuHo.handleHoverStart,
258
+ handleMenuHoverEnd = _useOverlappingMenuHo.handleMenuHoverEnd,
259
+ handleMouseMove = _useOverlappingMenuHo.handleMouseMove,
260
+ isHovered = _useOverlappingMenuHo.isHovered;
261
+ return ___EmotionJSX(ListViewItem, {
262
+ data: data,
263
+ isHovered: isHovered,
264
+ onHoverEnd: handleHoverEnd,
265
+ onHoverStart: handleHoverStart,
266
+ onMouseMove: handleMouseMove,
267
+ ref: listItemRef
268
+ }, ___EmotionJSX(ListViewItemSwitchField, null), ___EmotionJSX(ListViewItemMenu, {
269
+ onAction: handleHoverEnd,
270
+ onHoverEnd: handleMenuHoverEnd,
271
+ onHoverStart: handleHoverStart
272
+ }, ___EmotionJSX(Item, {
273
+ key: "enable"
274
+ }, "Enable user"), ___EmotionJSX(Item, {
275
+ key: "disable"
276
+ }, "Disable user"), ___EmotionJSX(Item, {
277
+ key: "delete"
278
+ }, "Delete user")));
279
+ };
280
+ export var PanelHeader = function PanelHeader(_ref2) {
281
+ var _context2;
282
+ var _ref2$item = _ref2.item,
283
+ item = _ref2$item === void 0 ? {
284
+ email: 'dburkitt5@columbia.edu',
285
+ icon: AccountIcon,
286
+ firstName: 'John',
287
+ lastName: 'Doe'
288
+ } : _ref2$item,
289
+ onClosePanel = _ref2.onClosePanel;
290
+ var email = item.email,
291
+ firstName = item.firstName,
292
+ lastName = item.lastName;
293
+ var text = _concatInstanceProperty(_context2 = "".concat(lastName, ", ")).call(_context2, firstName);
294
+ return ___EmotionJSX(Box, {
295
+ sx: sx.panelHeader.container
296
+ }, ___EmotionJSX(Box, {
297
+ isRow: true,
298
+ sx: sx.panelHeader.wrapper
299
+ }, ___EmotionJSX(Box, {
300
+ isRow: true,
301
+ sx: sx.panelHeader.data
302
+ }, ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
303
+ variant: "bodyStrong",
304
+ sx: sx.panelHeader.title
305
+ }, text), ___EmotionJSX(Text, {
306
+ variant: "subtitle",
307
+ sx: sx.panelHeader.subtitle
308
+ }, email))), ___EmotionJSX(Box, {
309
+ isRow: true,
310
+ sx: sx.panelHeader.controls
311
+ }, ___EmotionJSX(SwitchField, {
312
+ isDefaultSelected: true,
313
+ alignSelf: "center",
314
+ mr: "xs"
315
+ }), ___EmotionJSX(PopoverMenu, null, ___EmotionJSX(IconButton, {
316
+ "aria-label": "more"
317
+ }, ___EmotionJSX(Icon, {
318
+ icon: MoreVertIcon,
319
+ size: "md"
320
+ })), ___EmotionJSX(Menu, null, ___EmotionJSX(Item, {
321
+ key: "enable"
322
+ }, "Enable user"), ___EmotionJSX(Item, {
323
+ key: "disable"
324
+ }, "Disable user"), ___EmotionJSX(Item, {
325
+ key: "delete"
326
+ }, "Delete user"))), ___EmotionJSX(IconButton, {
327
+ "aria-label": "close icon button",
328
+ onPress: onClosePanel
329
+ }, ___EmotionJSX(Icon, {
330
+ size: "md",
331
+ icon: CloseIcon
332
+ })))));
407
333
  };
@@ -5,6 +5,7 @@ import EyeOffIcon from '@pingux/mdi-react/EyeOffOutlineIcon';
5
5
  import EyeIcon from '@pingux/mdi-react/EyeOutlineIcon';
6
6
  import { useStatusClasses } from '../hooks';
7
7
  import { Box, Icon, IconButton, Text } from '../index';
8
+ import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.js';
8
9
  import { jsx as ___EmotionJSX } from "@emotion/react";
9
10
  export default {
10
11
  title: 'Recipes/Masked Values',
@@ -83,4 +84,10 @@ export var Default = function Default(_ref) {
83
84
  name: isMasked ? 'Eye Off Icon' : 'Eye Icon'
84
85
  }
85
86
  }))));
87
+ };
88
+ Default.parameters = {
89
+ design: {
90
+ type: 'figma',
91
+ url: FIGMA_LINKS.maskedValue["default"]
92
+ }
86
93
  };
@@ -4,10 +4,10 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
4
4
  import React, { useState } from 'react';
5
5
  import { Item } from 'react-stately';
6
6
  import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
7
- import { Box, ListView, ListViewItem, ListViewItemEditButton, ListViewItemMenu, ScrollBox, SearchField } from '../../index';
7
+ import { Box, ListView, ListViewItem, ListViewItemEditButton, ListViewItemMenu, ScrollBox, SearchField } from '../index';
8
8
  import { jsx as ___EmotionJSX } from "@emotion/react";
9
9
  export default {
10
- title: 'Experimental/recipes/ScrollableListView'
10
+ title: 'Recipes/Scrollable List View'
11
11
  };
12
12
  export var ScrollableListView = function ScrollableListView() {
13
13
  var unfilteredItems = [{
@@ -57,6 +57,9 @@ export var FIGMA_LINKS = {
57
57
  loader: {
58
58
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=13675-33113&t=8Wwd3tIBh3GEjCJB-0'
59
59
  },
60
+ maskedValue: {
61
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=10328%3A31859&mode=dev'
62
+ },
60
63
  menu: {
61
64
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=12726-41720&t=8Wwd3tIBh3GEjCJB-0'
62
65
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.16.1-alpha.0",
3
+ "version": "2.17.0-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",