@pingux/astro 1.41.0-alpha.1 → 1.41.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.
Files changed (89) hide show
  1. package/lib/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +138 -0
  2. package/lib/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +145 -0
  3. package/lib/Patterns/ListAndPanelPattern.stories.hidden.js +381 -0
  4. package/lib/Patterns/MessagesPattern.stories.hidden.js +69 -0
  5. package/lib/Patterns/SaveBarPattern.stories.hidden.js +80 -0
  6. package/lib/Patterns/UnsavedChangesPattern.stories.hidden.js +106 -0
  7. package/lib/cjs/Patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +158 -0
  8. package/lib/cjs/Patterns/AttributeMappingEditViewPattern.stories.hidden.js +167 -0
  9. package/lib/cjs/Patterns/ListAndPanelPattern.stories.hidden.js +418 -0
  10. package/lib/cjs/Patterns/MessagesPattern.stories.hidden.js +99 -0
  11. package/lib/cjs/Patterns/SaveBarPattern.stories.hidden.js +109 -0
  12. package/lib/cjs/Patterns/UnsavedChangesPattern.stories.hidden.js +136 -0
  13. package/lib/cjs/components/Bracket/Bracket.stories.js +1 -3
  14. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
  15. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +2 -18
  16. package/lib/cjs/components/Card/Card.js +117 -6
  17. package/lib/cjs/components/Card/Card.stories.js +55 -16
  18. package/lib/cjs/components/Card/Card.test.js +50 -0
  19. package/lib/cjs/components/Chip/Badge.js +0 -5
  20. package/lib/cjs/components/Chip/Badge.stories.js +11 -0
  21. package/lib/cjs/components/Chip/Chip.js +0 -5
  22. package/lib/cjs/components/CodeView/CodeView.js +0 -4
  23. package/lib/cjs/components/CodeView/CodeView.stories.js +9 -0
  24. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.js +0 -4
  25. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +7 -0
  26. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +13 -1
  27. package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +75 -4
  28. package/lib/cjs/components/CopyText/CopyText.js +0 -4
  29. package/lib/cjs/components/CopyText/CopyText.stories.js +11 -0
  30. package/lib/cjs/components/DataTable/DataTable.js +33 -15
  31. package/lib/cjs/components/DataTable/DataTable.stories.js +91 -17
  32. package/lib/cjs/components/DataTable/DataTable.test.js +38 -6
  33. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -3
  34. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +25 -3
  35. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +19 -5
  36. package/lib/cjs/components/HelpHint/HelpHint.js +0 -7
  37. package/lib/cjs/components/HelpHint/HelpHint.stories.js +11 -0
  38. package/lib/cjs/components/Icon/Icon.js +0 -12
  39. package/lib/cjs/components/Icon/Icon.stories.js +7 -0
  40. package/lib/cjs/components/Image/Image.stories.js +2 -2
  41. package/lib/cjs/components/ListBox/ListBoxSection.js +8 -1
  42. package/lib/cjs/components/ListView/ListView.stories.js +6 -4
  43. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +2 -1
  44. package/lib/cjs/components/SelectField/SelectField.stories.js +13 -1
  45. package/lib/cjs/components/SelectField/SelectField.test.js +75 -0
  46. package/lib/cjs/recipes/ConditionalFilter.stories.js +0 -1
  47. package/lib/cjs/recipes/ScrollableListView.stories.js +3 -2
  48. package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +4 -8
  49. package/lib/cjs/styles/variants/boxes.js +6 -6
  50. package/lib/cjs/utils/devUtils/constants/text.js +11 -0
  51. package/lib/components/Bracket/Bracket.stories.js +1 -3
  52. package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
  53. package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +0 -13
  54. package/lib/components/Card/Card.js +110 -7
  55. package/lib/components/Card/Card.stories.js +44 -10
  56. package/lib/components/Card/Card.test.js +36 -0
  57. package/lib/components/Chip/Badge.js +0 -6
  58. package/lib/components/Chip/Badge.stories.js +9 -0
  59. package/lib/components/Chip/Chip.js +0 -6
  60. package/lib/components/CodeView/CodeView.js +0 -5
  61. package/lib/components/CodeView/CodeView.stories.js +7 -0
  62. package/lib/components/CollapsiblePanel/CollapsiblePanel.js +0 -5
  63. package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +5 -0
  64. package/lib/components/ComboBoxField/ComboBoxField.stories.js +13 -1
  65. package/lib/components/ComboBoxField/ComboBoxField.test.js +70 -5
  66. package/lib/components/CopyText/CopyText.js +0 -4
  67. package/lib/components/CopyText/CopyText.stories.js +9 -0
  68. package/lib/components/DataTable/DataTable.js +33 -15
  69. package/lib/components/DataTable/DataTable.stories.js +80 -17
  70. package/lib/components/DataTable/DataTable.test.js +36 -6
  71. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +1 -3
  72. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +23 -3
  73. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +16 -5
  74. package/lib/components/HelpHint/HelpHint.js +0 -7
  75. package/lib/components/HelpHint/HelpHint.stories.js +9 -0
  76. package/lib/components/Icon/Icon.js +0 -13
  77. package/lib/components/Icon/Icon.stories.js +5 -0
  78. package/lib/components/Image/Image.stories.js +2 -2
  79. package/lib/components/ListBox/ListBoxSection.js +7 -2
  80. package/lib/components/ListView/ListView.stories.js +6 -4
  81. package/lib/components/OverlayPanel/OverlayPanel.stories.js +2 -1
  82. package/lib/components/SelectField/SelectField.stories.js +13 -1
  83. package/lib/components/SelectField/SelectField.test.js +68 -1
  84. package/lib/recipes/ConditionalFilter.stories.js +0 -1
  85. package/lib/recipes/ScrollableListView.stories.js +3 -2
  86. package/lib/recipes/TrialExperienceIndustryButtons.stories.js +4 -8
  87. package/lib/styles/variants/boxes.js +6 -6
  88. package/lib/utils/devUtils/constants/text.js +1 -0
  89. package/package.json +1 -1
@@ -0,0 +1,138 @@
1
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
2
+ import React from 'react';
3
+ import { Box, Chip, Separator, Text, TextField } from '../index';
4
+ import { jsx as ___EmotionJSX } from "@emotion/react";
5
+ export default {
6
+ title: 'Design Patterns/Attribute Mapping Display View'
7
+ };
8
+ var fieldValues = [{
9
+ field1: 'username',
10
+ field2: 'UserID',
11
+ hasChip: true,
12
+ chipLabel: 'Required',
13
+ key: 1
14
+ }, {
15
+ field1: 'firstName',
16
+ field2: 'Given Name',
17
+ hasChip: false,
18
+ key: 2
19
+ }, {
20
+ field1: 'lastName',
21
+ field2: 'Family Name',
22
+ hasChip: false,
23
+ key: 3
24
+ }, {
25
+ field1: 'population',
26
+ field2: 'Population',
27
+ hasChip: false,
28
+ key: 4
29
+ }];
30
+ var sx = {
31
+ mainContentBox: {
32
+ bg: 'accent.99',
33
+ alignItems: 'center',
34
+ maxWidth: '450px',
35
+ height: '220px'
36
+ },
37
+ innerContentBox: {
38
+ p: 'md'
39
+ },
40
+ applicationText: {
41
+ pl: 'sm',
42
+ fontWeight: '3',
43
+ lineHeight: '18.31px',
44
+ width: 'calc(50% - 22px)'
45
+ },
46
+ pingOneText: {
47
+ fontWeight: '3',
48
+ fontSize: 'md',
49
+ lineHeight: '18.31px'
50
+ },
51
+ separatorBox: {
52
+ px: 'sm'
53
+ },
54
+ separatorStyle: {
55
+ mt: 'sm',
56
+ mb: 'sm',
57
+ width: '100%'
58
+ },
59
+ mainFieldValueBox: {
60
+ pl: 'sm'
61
+ },
62
+ textFieldStyleProps: {
63
+ width: '165px',
64
+ py: '5px'
65
+ },
66
+ textFieldSeparator: {
67
+ mt: 'auto',
68
+ mb: 'auto',
69
+ width: '21px'
70
+ },
71
+ chipStyle: {
72
+ width: '65px',
73
+ height: '22px',
74
+ minWidth: 'fit-content',
75
+ alignSelf: 'center',
76
+ py: '3px',
77
+ ml: 'sm',
78
+ mr: 'xs',
79
+ border: '1px solid',
80
+ borderColor: 'neutral.80',
81
+ bg: 'white',
82
+ '& span': {
83
+ fontSize: 'sm',
84
+ width: '55px',
85
+ height: '16px'
86
+ }
87
+ }
88
+ };
89
+ export var Default = function Default() {
90
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
91
+ sx: sx.mainContentBox
92
+ }, ___EmotionJSX(Box, {
93
+ items: fieldValues,
94
+ sx: sx.innerContentBox
95
+ }, ___EmotionJSX(Box, {
96
+ isRow: true
97
+ }, ___EmotionJSX(Text, {
98
+ sx: sx.applicationText
99
+ }, "Application"), ___EmotionJSX(Text, {
100
+ sx: sx.pingOneText
101
+ }, "PingOne")), ___EmotionJSX(Box, {
102
+ sx: sx.separatorBox
103
+ }, ___EmotionJSX(Separator, {
104
+ sx: sx.separatorStyle
105
+ })), _mapInstanceProperty(fieldValues).call(fieldValues, function (_ref) {
106
+ var field1 = _ref.field1,
107
+ field2 = _ref.field2,
108
+ hasChip = _ref.hasChip,
109
+ key = _ref.key;
110
+ return ___EmotionJSX(Box, {
111
+ isRow: true,
112
+ key: key,
113
+ sx: sx.mainFieldValueBox
114
+ }, ___EmotionJSX(TextField, {
115
+ "aria-label": field1,
116
+ isReadOnly: true,
117
+ value: field1,
118
+ controlProps: {
119
+ variant: 'input.small',
120
+ sx: sx.textFieldStyleProps
121
+ }
122
+ }), ___EmotionJSX(Separator, {
123
+ sx: sx.textFieldSeparator
124
+ }), ___EmotionJSX(TextField, {
125
+ "aria-label": field2,
126
+ isReadOnly: true,
127
+ value: field2,
128
+ controlProps: {
129
+ variant: 'input.small',
130
+ sx: sx.textFieldStyleProps
131
+ }
132
+ }), hasChip && ___EmotionJSX(Chip, {
133
+ label: "Required",
134
+ textColor: "#253746",
135
+ sx: sx.chipStyle
136
+ }));
137
+ }))));
138
+ };
@@ -0,0 +1,145 @@
1
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
2
+ import React from 'react';
3
+ import CogsIcon from 'mdi-react/CogsIcon';
4
+ import DeleteIcon from 'mdi-react/DeleteIcon';
5
+ import { Box, CheckboxField, ComboBoxField, Icon, IconButton, Separator, Text } from '../index';
6
+ import { jsx as ___EmotionJSX } from "@emotion/react";
7
+ export default {
8
+ title: 'Design Patterns/Attribute Mapping Edit View'
9
+ };
10
+ var editFieldValues = [{
11
+ field1: 'username',
12
+ field2: 'User ID',
13
+ key: 1
14
+ }, {
15
+ field1: 'firstName',
16
+ field2: 'Given Name',
17
+ hasChip: false,
18
+ key: 2
19
+ }, {
20
+ field1: 'lastName',
21
+ field2: 'Family Name',
22
+ hasChip: false,
23
+ key: 3
24
+ }, {
25
+ field1: 'population',
26
+ field2: 'Population',
27
+ hasChip: false,
28
+ key: 4
29
+ }];
30
+ var sx = {
31
+ editFieldsBox: {
32
+ mb: 'md'
33
+ },
34
+ mainBox: {
35
+ maxWidth: '750px',
36
+ height: '263px',
37
+ 'justifyContent': 'center',
38
+ bg: 'accent.99',
39
+ pl: 'md',
40
+ pr: 'md'
41
+ },
42
+ headerTextApplication: {
43
+ fontWeight: '3',
44
+ fontSize: 'md',
45
+ width: 'calc(50% - 26px)',
46
+ lineHeight: '18.31px',
47
+ pt: 'sm'
48
+ },
49
+ headerTextPingOne: {
50
+ fontWeight: '3',
51
+ fontSize: 'md',
52
+ width: 'calc(50% - 5px)',
53
+ lineHeight: '18.31px',
54
+ pt: 'sm'
55
+ },
56
+ headerTextRequired: {
57
+ fontWeight: '3',
58
+ fontSize: 'md',
59
+ width: 'calc(25% - 48px)',
60
+ lineHeight: '18.31px',
61
+ pt: 'sm'
62
+ },
63
+ separator: {
64
+ mt: 'xs',
65
+ mb: 'xs',
66
+ width: '100%'
67
+ },
68
+ checkboxField: {
69
+ 'aria-label': 'Select',
70
+ pt: 'xs'
71
+ },
72
+ comboBoxFieldContainer: {
73
+ mb: 'xs'
74
+ },
75
+ comboBoxField: {
76
+ 'aria-label': 'Edit Text Field',
77
+ width: '275px !important',
78
+ py: '11px',
79
+ pl: 'md',
80
+ pr: '45px',
81
+ lineHeight: '18.31px'
82
+ },
83
+ iconsBox: {
84
+ mt: 'sm'
85
+ }
86
+ };
87
+ export var Default = function Default() {
88
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
89
+ sx: sx.mainBox
90
+ }, ___EmotionJSX(Box, {
91
+ isRow: true
92
+ }, ___EmotionJSX(Text, {
93
+ sx: sx.headerTextApplication
94
+ }, "Application"), ___EmotionJSX(Text, {
95
+ sx: sx.headerTextPingOne
96
+ }, "PingOne"), ___EmotionJSX(Text, {
97
+ sx: sx.headerTextRequired
98
+ }, "Required")), ___EmotionJSX(Separator, {
99
+ sx: sx.separator
100
+ }), ___EmotionJSX(Box, {
101
+ items: editFieldValues,
102
+ sx: sx.editFieldsBox
103
+ }, _mapInstanceProperty(editFieldValues).call(editFieldValues, function (_ref) {
104
+ var field1 = _ref.field1,
105
+ field2 = _ref.field2,
106
+ key = _ref.key;
107
+ return ___EmotionJSX(Box, {
108
+ isRow: true,
109
+ key: key,
110
+ gap: "sm",
111
+ sx: sx.comboBoxFieldContainer
112
+ }, ___EmotionJSX(ComboBoxField, {
113
+ isReadonly: true,
114
+ value: field1,
115
+ controlProps: {
116
+ sx: sx.comboBoxField
117
+ }
118
+ }), ___EmotionJSX(ComboBoxField, {
119
+ isReadonly: true,
120
+ value: field2,
121
+ controlProps: {
122
+ sx: sx.comboBoxField
123
+ }
124
+ }), ___EmotionJSX(Box, {
125
+ isRow: true,
126
+ gap: "lg",
127
+ sx: sx.iconsBox
128
+ }, ___EmotionJSX(IconButton, {
129
+ "aria-label": "Cogs Icon"
130
+ }, ___EmotionJSX(Icon, {
131
+ icon: CogsIcon,
132
+ size: 24
133
+ })), ___EmotionJSX(CheckboxField, {
134
+ status: "default",
135
+ containerProps: {
136
+ sx: sx.checkboxField
137
+ }
138
+ }), ___EmotionJSX(IconButton, {
139
+ "aria-label": "Delete Icon"
140
+ }, ___EmotionJSX(Icon, {
141
+ icon: DeleteIcon,
142
+ size: 24
143
+ }))));
144
+ }))));
145
+ };
@@ -0,0 +1,381 @@
1
+ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
3
+ import React, { useState, useRef } from 'react';
4
+ import AccountIcon from 'mdi-react/AccountIcon';
5
+ import Close from 'mdi-react/CloseIcon';
6
+ import CreateIcon from 'mdi-react/CreateIcon';
7
+ import DotsVertical from 'mdi-react/DotsVerticalIcon';
8
+ import { useOverlayPanelState } from '../hooks';
9
+ import { pingImg } from '../utils/devUtils/constants/images';
10
+ import { Avatar, Box, Icon, IconButton, ListItem, OverlayProvider, OverlayPanel, Separator, SearchField, SwitchField, Tab, Tabs, Text } from '../index';
11
+ import { jsx as ___EmotionJSX } from "@emotion/react";
12
+ export default {
13
+ title: 'Design Patterns/List And Panel'
14
+ };
15
+ var usersInfo = [{
16
+ fullname: 'Fons, Vernall',
17
+ firstname: 'Fons',
18
+ lastname: 'Vernall',
19
+ email: 'fvernall0@google.it',
20
+ hasIcon: true,
21
+ avatar: AccountIcon
22
+ }, {
23
+ fullname: 'Priya, Ponnappa',
24
+ firstname: 'Priya',
25
+ lastname: 'Ponnappa',
26
+ email: 'Priyaponnappa0w@google.it',
27
+ hasIcon: false,
28
+ avatar: pingImg
29
+ }, {
30
+ fullname: 'French, Tamzyn',
31
+ firstname: 'French',
32
+ lastname: 'Tamzyn',
33
+ email: 'frenchtamzyn03@google.it',
34
+ hasIcon: false,
35
+ avatar: pingImg
36
+ }, {
37
+ fullname: 'John, Stone',
38
+ firstname: 'John',
39
+ lastname: 'Stone',
40
+ email: 'johnsstone2@google.it',
41
+ hasIcon: true,
42
+ avatar: AccountIcon
43
+ }, {
44
+ fullname: 'Ang, Li',
45
+ firstname: 'Ang',
46
+ lastname: 'Li',
47
+ email: 'Angli022@google.it',
48
+ hasIcon: true,
49
+ avatar: AccountIcon
50
+ }, {
51
+ fullname: 'Eugenia, Anders',
52
+ firstname: 'Eugenia',
53
+ lastname: 'Anders',
54
+ email: 'EugeniaaAnders2@google.it',
55
+ hasIcon: true,
56
+ avatar: AccountIcon
57
+ }, {
58
+ fullname: 'Trevor, Virtue',
59
+ firstname: 'Trevor',
60
+ lastname: 'Virtue',
61
+ email: 'TrevorVirtue33@google.it',
62
+ hasIcon: true,
63
+ avatar: AccountIcon
64
+ }, {
65
+ fullname: 'Salome, Simoes',
66
+ firstname: 'Salome',
67
+ lastname: 'Simoes',
68
+ email: 'SalomesimoesS@google.it',
69
+ hasIcon: true,
70
+ avatar: AccountIcon
71
+ }, {
72
+ fullname: 'Verona, Blair',
73
+ firstname: 'Verona',
74
+ lastname: 'Blair',
75
+ email: 'VeronaBlair01@google.it',
76
+ hasIcon: true,
77
+ avatar: AccountIcon
78
+ }, {
79
+ fullname: 'Tarryn, Campbell-Gillies',
80
+ firstname: 'Tarryn',
81
+ lastname: 'Campbell-Gillies',
82
+ email: 'tarryncampbellGillies@google.it',
83
+ hasIcon: true,
84
+ avatar: AccountIcon
85
+ }, {
86
+ fullname: 'Daly, Harry',
87
+ firstname: 'Daly',
88
+ lastname: 'Harry',
89
+ email: 'Daly93Harry@google.it',
90
+ hasIcon: true,
91
+ avatar: AccountIcon
92
+ }, {
93
+ fullname: 'Dallas, Potter',
94
+ firstname: 'Dallas',
95
+ lastname: 'Potter',
96
+ email: 'DallasPotter94@google.it',
97
+ hasIcon: true,
98
+ avatar: AccountIcon
99
+ }, {
100
+ fullname: 'Alexander, Crawford',
101
+ firstname: 'Alexander',
102
+ lastname: 'Crawford',
103
+ email: 'alexCrawford011@google.it',
104
+ hasIcon: true,
105
+ avatar: AccountIcon
106
+ }];
107
+ var sx = {
108
+ mainBox: {
109
+ bg: 'accent.99'
110
+ },
111
+ contentBox: {
112
+ p: 'md',
113
+ m: 'sm',
114
+ 'justifyContent': 'center',
115
+ height: '900px',
116
+ overflowY: 'scroll'
117
+ },
118
+ searchFieldStyle: {
119
+ mb: 'sm'
120
+ },
121
+ searchFieldStyleProps: {
122
+ variant: 'input.small',
123
+ py: '11px',
124
+ pl: '42px',
125
+ pr: '47px',
126
+ height: '40px',
127
+ width: '400px'
128
+ },
129
+ listItemBoxStyle: {
130
+ alignSelf: 'center',
131
+ mr: 'auto'
132
+ },
133
+ emailBoxStyle: {
134
+ lineHeight: '15.51px'
135
+ },
136
+ iconStyle: {
137
+ alignSelf: 'center',
138
+ mr: 'sm',
139
+ color: 'accent.40'
140
+ },
141
+ avatarStyle: {
142
+ mr: 'md',
143
+ width: '25px',
144
+ height: '25px'
145
+ },
146
+ subtitleTextStyle: {
147
+ mt: '1'
148
+ },
149
+ switchFieldStyle: {
150
+ mt: 'xs'
151
+ },
152
+ dotsVerticalIcon: {
153
+ color: 'neutral.20'
154
+ },
155
+ closeIconStyle: {
156
+ color: 'neutral.20'
157
+ },
158
+ separatorStyle: {
159
+ m: '0',
160
+ bg: 'accent.90'
161
+ },
162
+ overlayPanelStyle: {
163
+ p: '0'
164
+ },
165
+ overlayPanelListItemBox: {
166
+ width: '100%'
167
+ },
168
+ listItemInPanelStyle: {
169
+ justifyContent: 'space-between'
170
+ },
171
+ tabsBox: {
172
+ px: 'md'
173
+ },
174
+ tabsListPropsStyle: {
175
+ justifyContent: 'center',
176
+ width: '100%'
177
+ },
178
+ tabsCreateIconButton: {
179
+ ml: 'auto'
180
+ },
181
+ tabsBoldText: {
182
+ mb: 'sm',
183
+ lineHeight: '15.87px',
184
+ fontWeight: '3',
185
+ fontSize: 'sm',
186
+ height: '16px'
187
+ },
188
+ tabsFirstAndLastNameText: {
189
+ mb: 'sm',
190
+ lineHeight: '15.87px',
191
+ fontWeight: '3',
192
+ fontSize: 'sm',
193
+ width: '68px',
194
+ height: '16px'
195
+ },
196
+ tabsEmailText: {
197
+ mb: 'sm',
198
+ lineHeight: '15.87px',
199
+ fontWeight: '3',
200
+ fontSize: 'sm',
201
+ width: '35px',
202
+ height: '16px'
203
+ },
204
+ tabsSelectedItemText: {
205
+ mb: 'sm',
206
+ height: '18px',
207
+ fontWeight: '0',
208
+ fontSize: 'md',
209
+ lineHeight: '17.89px'
210
+ }
211
+ };
212
+ export var Default = function Default() {
213
+ var _useState = useState(usersInfo),
214
+ _useState2 = _slicedToArray(_useState, 1),
215
+ items = _useState2[0];
216
+
217
+ var _useState3 = useState(null),
218
+ _useState4 = _slicedToArray(_useState3, 2),
219
+ selected = _useState4[0],
220
+ setSelected = _useState4[1];
221
+
222
+ var _useOverlayPanelState = useOverlayPanelState(),
223
+ state = _useOverlayPanelState.state,
224
+ onClose = _useOverlayPanelState.onClose;
225
+
226
+ var triggerRef = useRef();
227
+ return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Box, {
228
+ sx: sx.mainBox
229
+ }, ___EmotionJSX(Box, {
230
+ sx: sx.contentBox
231
+ }, ___EmotionJSX(SearchField, {
232
+ controlProps: {
233
+ sx: sx.searchFieldStyleProps
234
+ },
235
+ containerProps: {
236
+ sx: sx.searchFieldStyle
237
+ },
238
+ position: "fixed",
239
+ "aria-label": "Search",
240
+ placeholder: "Search"
241
+ }), _mapInstanceProperty(items).call(items, function (person) {
242
+ return ___EmotionJSX(Box, {
243
+ key: person.email,
244
+ sx: sx.emailBoxStyle
245
+ }, ___EmotionJSX(ListItem, {
246
+ name: person.fullname,
247
+ onClick: function onClick() {
248
+ state.toggle();
249
+ setSelected(person);
250
+ }
251
+ }, ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
252
+ isRow: true,
253
+ sx: sx.listItemBoxStyle
254
+ }, person.hasIcon ? ___EmotionJSX(Icon, {
255
+ icon: person.avatar,
256
+ sx: sx.iconStyle,
257
+ size: 24
258
+ }) : ___EmotionJSX(Avatar, {
259
+ sx: sx.avatarStyle,
260
+ src: person.avatar
261
+ }), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
262
+ variant: "itemTitle"
263
+ }, person.fullname), ___EmotionJSX(Text, {
264
+ sx: sx.subtitleTextStyle,
265
+ variant: "itemSubtitle"
266
+ }, person.email))), ___EmotionJSX(Box, null, ___EmotionJSX(SwitchField, {
267
+ containerProps: {
268
+ sx: sx.switchFieldStyle
269
+ },
270
+ "aria-label": "active user",
271
+ isDefaultSelected: true,
272
+ label: "",
273
+ value: "my-switch"
274
+ })), ___EmotionJSX(Box, {
275
+ alignSelf: "center",
276
+ isRow: true
277
+ }, ___EmotionJSX(IconButton, {
278
+ "aria-label": "Dots Vertical Icon"
279
+ }, ___EmotionJSX(Icon, {
280
+ icon: DotsVertical,
281
+ sx: sx.dotsVerticalIcon,
282
+ size: 24
283
+ }))))), ___EmotionJSX(Separator, {
284
+ sx: sx.separatorStyle
285
+ }));
286
+ })), state.isOpen && ___EmotionJSX(OverlayPanel, {
287
+ isOpen: state.isOpen,
288
+ state: state,
289
+ triggerRef: triggerRef,
290
+ sx: sx.overlayPanelStyle
291
+ }, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
292
+ isRow: true,
293
+ sx: sx.overlayPanelListItemBox
294
+ }, ___EmotionJSX(ListItem, {
295
+ name: selected.fullname,
296
+ sx: sx.listItemInPanelStyle
297
+ }, ___EmotionJSX(Box, {
298
+ isRow: true
299
+ }, selected.hasIcon ? ___EmotionJSX(Icon, {
300
+ icon: selected.avatar,
301
+ sx: sx.iconStyle,
302
+ size: 24
303
+ }) : ___EmotionJSX(Avatar, {
304
+ sx: sx.avatarStyle,
305
+ src: selected.avatar
306
+ }), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
307
+ variant: "itemTitle"
308
+ }, selected.fullname), ___EmotionJSX(Text, {
309
+ sx: sx.subtitleTextStyle,
310
+ variant: "itemSubtitle"
311
+ }, selected.email))), ___EmotionJSX(Box, {
312
+ isRow: true,
313
+ alignSelf: "center"
314
+ }, ___EmotionJSX(SwitchField, {
315
+ "aria-label": "active user",
316
+ isDefaultSelected: true,
317
+ label: "",
318
+ value: "my-switch",
319
+ justifyContent: "center"
320
+ }), ___EmotionJSX(IconButton, {
321
+ "aria-label": "Dots Vertical Icon"
322
+ }, ___EmotionJSX(Icon, {
323
+ icon: DotsVertical,
324
+ sx: sx.dotsVerticalIcon,
325
+ size: 24
326
+ })), ___EmotionJSX(IconButton, {
327
+ "aria-label": "Close Icon Button",
328
+ onPress: function onPress() {
329
+ onClose(state, triggerRef);
330
+ }
331
+ }, ___EmotionJSX(Icon, {
332
+ icon: Close,
333
+ sx: sx.closeIconStyle,
334
+ size: 24
335
+ }))))), ___EmotionJSX(Box, {
336
+ sx: sx.tabsBox
337
+ }, ___EmotionJSX(Tabs, {
338
+ items: items,
339
+ tabListProps: {
340
+ sx: sx.tabsListPropsStyle
341
+ }
342
+ }, ___EmotionJSX(Tab, {
343
+ key: "tab1",
344
+ title: "Profile",
345
+ "aria-label": "Tab 1"
346
+ }, ___EmotionJSX(Box, null, ___EmotionJSX(IconButton, {
347
+ "aria-label": "Create Icon",
348
+ variant: "inverted",
349
+ sx: sx.tabsCreateIconButton
350
+ }, ___EmotionJSX(Icon, {
351
+ icon: CreateIcon
352
+ }))), ___EmotionJSX(Text, {
353
+ sx: sx.tabsBoldText
354
+ }, "Full Name"), ___EmotionJSX(Text, {
355
+ sx: sx.tabsSelectedItemText,
356
+ "aria-label": "Selected Fullname"
357
+ }, selected.fullname), ___EmotionJSX(Text, {
358
+ sx: sx.tabsBoldText
359
+ }, "First Name"), ___EmotionJSX(Text, {
360
+ sx: sx.tabsSelectedItemText,
361
+ "aria-label": "Selected Firstname"
362
+ }, selected.firstname), ___EmotionJSX(Text, {
363
+ sx: sx.tabsBoldText
364
+ }, "Last Name"), ___EmotionJSX(Text, {
365
+ sx: sx.tabsSelectedItemText,
366
+ "aria-label": "Selected Lastname"
367
+ }, selected.lastname), ___EmotionJSX(Text, {
368
+ sx: sx.tabsBoldText
369
+ }, "Email"), ___EmotionJSX(Text, {
370
+ sx: sx.tabsSelectedItemText,
371
+ "aria-label": "Selected Email"
372
+ }, selected.email)), ___EmotionJSX(Tab, {
373
+ key: "tab2",
374
+ title: "Group Memberships",
375
+ "aria-label": "Tab 2"
376
+ }, ___EmotionJSX(Text, null, "Placeholder content for group membership tab")), ___EmotionJSX(Tab, {
377
+ key: "tab3",
378
+ title: "Account Info",
379
+ "aria-label": "Tab 3"
380
+ }, ___EmotionJSX(Text, null, "Placeholder content for account info tab"))))))));
381
+ };