@pingux/astro 1.27.0 → 1.28.1

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 (69) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/NOTICE.html +2 -2
  3. package/lib/cjs/components/DataTable/DataTable.js +481 -0
  4. package/lib/cjs/components/DataTable/DataTable.stories.js +310 -0
  5. package/lib/cjs/components/DataTable/DataTable.styles.js +156 -0
  6. package/lib/cjs/components/DataTable/DataTable.test.js +1307 -0
  7. package/lib/cjs/components/DataTable/DataTableChip.js +63 -0
  8. package/lib/cjs/components/DataTable/DataTableChip.test.js +38 -0
  9. package/lib/cjs/components/DataTable/DataTableMenu.js +51 -0
  10. package/lib/cjs/components/DataTable/DataTableMenu.test.js +20 -0
  11. package/lib/cjs/components/DataTable/DataTableMultiLine.js +75 -0
  12. package/lib/cjs/components/DataTable/DataTableMultiLine.test.js +30 -0
  13. package/lib/cjs/components/DataTable/DataTableVirtualizer.js +188 -0
  14. package/lib/cjs/components/DataTable/index.js +54 -0
  15. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -2
  16. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +35 -0
  17. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +10 -10
  18. package/lib/cjs/components/PageHeader/PageHeader.js +7 -1
  19. package/lib/cjs/context/DataTableContext/index.js +31 -0
  20. package/lib/cjs/index.js +67 -2
  21. package/lib/cjs/recipes/CountryPicker.stories.js +25 -12
  22. package/lib/cjs/recipes/EditableInput.stories.js +55 -46
  23. package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +38 -30
  24. package/lib/cjs/recipes/ListAndPanel.stories.js +102 -87
  25. package/lib/cjs/recipes/MaskedValue.stories.js +8 -5
  26. package/lib/cjs/recipes/NeutralInput.stories.js +6 -3
  27. package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
  28. package/lib/cjs/recipes/PageHeader.stories.js +73 -0
  29. package/lib/cjs/recipes/RowLineChart.stories.js +58 -70
  30. package/lib/cjs/recipes/SelectedFieldOverlay.story.js +25 -21
  31. package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +81 -72
  32. package/lib/cjs/styles/forms/index.js +1 -1
  33. package/lib/cjs/styles/forms/label.js +1 -1
  34. package/lib/cjs/styles/forms/select.js +1 -1
  35. package/lib/cjs/styles/variants/variants.js +4 -1
  36. package/lib/components/DataTable/DataTable.js +436 -0
  37. package/lib/components/DataTable/DataTable.stories.js +273 -0
  38. package/lib/components/DataTable/DataTable.styles.js +137 -0
  39. package/lib/components/DataTable/DataTable.test.js +1256 -0
  40. package/lib/components/DataTable/DataTableChip.js +33 -0
  41. package/lib/components/DataTable/DataTableChip.test.js +31 -0
  42. package/lib/components/DataTable/DataTableMenu.js +24 -0
  43. package/lib/components/DataTable/DataTableMenu.test.js +13 -0
  44. package/lib/components/DataTable/DataTableMultiLine.js +46 -0
  45. package/lib/components/DataTable/DataTableMultiLine.test.js +22 -0
  46. package/lib/components/DataTable/DataTableVirtualizer.js +157 -0
  47. package/lib/components/DataTable/index.js +5 -0
  48. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +7 -2
  49. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +25 -0
  50. package/lib/components/MultivaluesField/MultivaluesField.js +10 -10
  51. package/lib/components/PageHeader/PageHeader.js +8 -1
  52. package/lib/context/DataTableContext/index.js +5 -0
  53. package/lib/index.js +4 -1
  54. package/lib/recipes/CountryPicker.stories.js +24 -12
  55. package/lib/recipes/EditableInput.stories.js +55 -46
  56. package/lib/recipes/FlippableCaretMenuButton.stories.js +38 -30
  57. package/lib/recipes/ListAndPanel.stories.js +102 -87
  58. package/lib/recipes/MaskedValue.stories.js +8 -5
  59. package/lib/recipes/NeutralInput.stories.js +6 -3
  60. package/lib/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
  61. package/lib/recipes/PageHeader.stories.js +53 -0
  62. package/lib/recipes/RowLineChart.stories.js +58 -70
  63. package/lib/recipes/SelectedFieldOverlay.story.js +25 -21
  64. package/lib/recipes/TrialExperienceStatusBar.stories.js +81 -72
  65. package/lib/styles/forms/index.js +1 -1
  66. package/lib/styles/forms/label.js +1 -1
  67. package/lib/styles/forms/select.js +1 -1
  68. package/lib/styles/variants/variants.js +3 -1
  69. package/package.json +54 -56
@@ -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
- mr: "15px",
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, {
@@ -31,6 +31,40 @@ export default {
31
31
  title: 'Recipes/FlippableCaretMenuButton'
32
32
  };
33
33
  var buttonArray = ['Web App', 'Native App', 'Single Page App', 'Non-Interactive', 'Worker', 'Advanced Configuration', 'Built-in admin console for this environment', 'Built-in Application portal'];
34
+ var sx = {
35
+ openButton: {
36
+ height: '30px',
37
+ borderRadius: 'md',
38
+ fontSize: '13px',
39
+ mb: 'sm'
40
+ },
41
+ closeIconButton: {
42
+ position: 'absolute',
43
+ top: '14px',
44
+ right: 'sm'
45
+ },
46
+ buttonsContainer: {
47
+ p: 'lg',
48
+ flexDirection: 'initial !important',
49
+ alignContent: 'space-between',
50
+ flexWrap: 'wrap'
51
+ },
52
+ selectedButton: {
53
+ mb: 'sm',
54
+ mr: '4px',
55
+ height: '30px',
56
+ borderRadius: '15px',
57
+ fontSize: '13px'
58
+ },
59
+ unSelectedButton: {
60
+ mb: 'sm',
61
+ mr: '4px',
62
+ borderColor: 'neutral.80',
63
+ height: '30px',
64
+ borderRadius: '15px',
65
+ fontSize: '13px'
66
+ }
67
+ };
34
68
  export var Default = function Default() {
35
69
  var buttonRef = useRef();
36
70
  var popoverRef = useRef();
@@ -89,14 +123,9 @@ export var Default = function Default() {
89
123
 
90
124
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Button, {
91
125
  ref: buttonRef,
92
- mb: "sm",
93
126
  variant: "inline",
94
127
  onPress: onChange,
95
- sx: {
96
- height: '30px',
97
- borderRadius: '15px',
98
- fontSize: '13px'
99
- }
128
+ sx: sx.openButton
100
129
  }, ___EmotionJSX(Box, {
101
130
  isRow: true,
102
131
  alignItems: "center"
@@ -119,36 +148,15 @@ export var Default = function Default() {
119
148
  onPress: function onPress() {
120
149
  return setIsOpen(false);
121
150
  },
122
- sx: {
123
- position: 'absolute',
124
- top: 14,
125
- right: 10
126
- }
151
+ sx: sx.closeIconButton
127
152
  }, ___EmotionJSX(Icon, {
128
153
  icon: CloseIcon
129
154
  })), ___EmotionJSX(Box, {
130
- sx: {
131
- p: 'lg',
132
- flexDirection: 'initial !important',
133
- alignContent: 'space-between',
134
- flexWrap: 'wrap'
135
- }
155
+ sx: sx.buttonsContainer
136
156
  }, _mapInstanceProperty(buttonArray).call(buttonArray, function (item) {
137
157
  return ___EmotionJSX(Button, {
138
- mb: "sm",
139
158
  variant: "inline",
140
- sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ? {
141
- mr: '4px',
142
- height: '30px',
143
- borderRadius: '15px',
144
- fontSize: '13px'
145
- } : {
146
- mr: '4px',
147
- borderColor: 'neutral.80',
148
- height: '30px',
149
- borderRadius: '15px',
150
- fontSize: '13px'
151
- },
159
+ sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ? sx.selectedButton : sx.unSelectedButton,
152
160
  key: item,
153
161
  onPress: function onPress() {
154
162
  return toggleButton(item);
@@ -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, {
@@ -23,6 +23,13 @@ export default {
23
23
  }
24
24
  }
25
25
  };
26
+ var sx = {
27
+ showHideButton: {
28
+ width: 'fit-content',
29
+ marginLeft: 'sm',
30
+ alignSelf: 'auto'
31
+ }
32
+ };
26
33
  export var Default = function Default(_ref) {
27
34
  var _context;
28
35
 
@@ -52,11 +59,7 @@ export var Default = function Default(_ref) {
52
59
  onPress: function onPress() {
53
60
  return setIsMasked(!isMasked);
54
61
  },
55
- sx: {
56
- width: 'fit-content',
57
- marginLeft: 10,
58
- alignSelf: 'auto'
59
- }
62
+ sx: sx.showHideButton
60
63
  }, ___EmotionJSX(Icon, {
61
64
  icon: isMasked ? EyeOffIcon : EyeIcon
62
65
  }))));
@@ -4,10 +4,13 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
4
4
  export default {
5
5
  title: 'Recipes/NeutralCheckboxField'
6
6
  };
7
+ var sx = {
8
+ checkboxColor: {
9
+ color: 'neutral.10'
10
+ }
11
+ };
7
12
  export var Default = function Default() {
8
13
  return ___EmotionJSX(CheckboxField, {
9
- controlProps: {
10
- color: 'neutral.10'
11
- }
14
+ sx: sx.checkboxColor
12
15
  }, "Click me");
13
16
  };
@@ -19,6 +19,29 @@ var items = [{
19
19
  name: 'Third Option',
20
20
  id: '3'
21
21
  }];
22
+ var sx = {
23
+ actionIcon: {
24
+ color: 'neutral.30'
25
+ },
26
+ dragVerticalIcon: {
27
+ color: 'neutral.50'
28
+ },
29
+ iconButton: {
30
+ ml: 'xs'
31
+ },
32
+ iconButtonToggleContainer: {
33
+ mx: 'sm',
34
+ flexShrink: 0
35
+ },
36
+ iconContainer: {
37
+ alignItems: 'center',
38
+ ml: '12px',
39
+ mr: '12px'
40
+ },
41
+ outerContainer: {
42
+ alignItems: 'center'
43
+ }
44
+ };
22
45
  export var Default = function Default() {
23
46
  var CustomOnSvg = function CustomOnSvg(props) {
24
47
  return ___EmotionJSX("svg", _extends({
@@ -66,24 +89,22 @@ export var Default = function Default() {
66
89
  };
67
90
 
68
91
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
69
- sx: {
70
- alignItems: 'center'
71
- },
92
+ sx: sx.outerContainer,
72
93
  isRow: true
73
94
  }, ___EmotionJSX(Icon, {
74
95
  icon: DragVerticalIcon,
75
96
  size: 25,
76
- color: "neutral.50"
97
+ sx: sx.dragVerticalIcon
77
98
  }), ___EmotionJSX(ComboBoxField, {
78
99
  items: items,
79
100
  defaultSelectedKey: "Last Name",
101
+ "aria-label": "Row one value",
80
102
  containerProps: {
81
103
  width: '275px'
82
104
  },
83
105
  labelProps: {
84
106
  mb: 0
85
107
  },
86
- "aria-label": "Row one value",
87
108
  controlProps: {
88
109
  'aria-label': 'test'
89
110
  }
@@ -93,10 +114,7 @@ export var Default = function Default() {
93
114
  "data-id": item.name
94
115
  }, item.name);
95
116
  }), ___EmotionJSX(Box, {
96
- sx: {
97
- mx: 'sm',
98
- flexShrink: 0
99
- }
117
+ sx: sx.iconButtonToggleContainer
100
118
  }, ___EmotionJSX(IconButtonToggle, {
101
119
  toggledIcon: CustomOnSvg,
102
120
  defaultIcon: CustomOffSvg,
@@ -126,35 +144,29 @@ export var Default = function Default() {
126
144
  }, item.name);
127
145
  }), ___EmotionJSX(Box, {
128
146
  isRow: true,
129
- alignItems: "center",
130
- sx: {
131
- marginLeft: '12px',
132
- marginRight: '12px'
133
- }
147
+ sx: sx.iconContainer
134
148
  }, ___EmotionJSX(IconButton, {
135
149
  "aria-label": "Edit"
136
150
  }, ___EmotionJSX(Icon, {
137
151
  icon: CogsIcon,
138
- color: "neutral.30",
152
+ sx: sx.actionIcon,
139
153
  size: 20,
140
154
  title: "edit icon"
141
155
  })), ___EmotionJSX(IconButton, {
142
- ml: "5px",
156
+ sx: sx.iconButton,
143
157
  "aria-label": "Delete"
144
158
  }, ___EmotionJSX(Icon, {
145
159
  icon: DeleteIcon,
146
- color: "neutral.30",
160
+ sx: sx.actionIcon,
147
161
  size: 20,
148
162
  title: "delete icon"
149
163
  })))), ___EmotionJSX(Box, {
150
- sx: {
151
- alignItems: 'center'
152
- },
164
+ sx: sx.outerContainer,
153
165
  isRow: true
154
166
  }, ___EmotionJSX(Icon, {
155
167
  icon: DragVerticalIcon,
156
168
  size: 25,
157
- color: "neutral.50"
169
+ sx: sx.dragVerticalIcon
158
170
  }), ___EmotionJSX(ComboBoxField, {
159
171
  items: items,
160
172
  defaultSelectedKey: "Last Name",
@@ -174,10 +186,7 @@ export var Default = function Default() {
174
186
  "data-id": item.name
175
187
  }, item.name);
176
188
  }), ___EmotionJSX(Box, {
177
- sx: {
178
- mx: 'sm',
179
- flexShrink: 0
180
- }
189
+ sx: sx.iconButtonToggleContainer
181
190
  }, ___EmotionJSX(IconButtonToggle, {
182
191
  toggledIcon: CustomRightSvg,
183
192
  defaultIcon: CustomRightSvg,
@@ -207,24 +216,20 @@ export var Default = function Default() {
207
216
  }, item.name);
208
217
  }), ___EmotionJSX(Box, {
209
218
  isRow: true,
210
- alignItems: "center",
211
- sx: {
212
- marginLeft: '12px',
213
- marginRight: '12px'
214
- }
219
+ sx: sx.iconContainer
215
220
  }, ___EmotionJSX(IconButton, {
216
221
  "aria-label": "Edit"
217
222
  }, ___EmotionJSX(Icon, {
218
223
  icon: CogsIcon,
219
- color: "neutral.30",
224
+ sx: sx.actionIcon,
220
225
  size: 20,
221
226
  title: "edit icon"
222
227
  })), ___EmotionJSX(IconButton, {
223
- ml: "5px",
228
+ sx: sx.iconButton,
224
229
  "aria-label": "Delete"
225
230
  }, ___EmotionJSX(Icon, {
226
231
  icon: DeleteIcon,
227
- color: "neutral.30",
232
+ sx: sx.actionIcon,
228
233
  size: 20,
229
234
  title: "delete icon"
230
235
  })))));