@pingux/astro 1.3.0 → 1.3.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 (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/cjs/components/CheckboxField/CheckboxField.js +4 -1
  3. package/lib/cjs/components/Input/Input.js +3 -11
  4. package/lib/cjs/components/Input/Input.test.js +14 -2
  5. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +10 -2
  6. package/lib/cjs/components/NumberField/NumberField.js +30 -10
  7. package/lib/cjs/components/NumberField/NumberField.test.js +7 -0
  8. package/lib/cjs/components/PageHeader/PageHeader.js +3 -0
  9. package/lib/cjs/components/PageHeader/PageHeader.stories.js +6 -1
  10. package/lib/cjs/components/RadioGroupField/RadioGroupField.js +9 -5
  11. package/lib/cjs/components/SelectField/SelectField.stories.js +3 -55
  12. package/lib/cjs/components/Tabs/Tabs.stories.js +1 -15
  13. package/lib/cjs/hooks/useField/useField.js +2 -2
  14. package/lib/cjs/styles/forms/checkbox.js +0 -1
  15. package/lib/cjs/styles/forms/input.js +1 -1
  16. package/lib/cjs/styles/forms/label.js +3 -0
  17. package/lib/cjs/styles/forms/radio.js +1 -1
  18. package/lib/cjs/styles/forms/switch.js +3 -1
  19. package/lib/cjs/styles/variants/boxes.js +4 -1
  20. package/lib/components/CheckboxField/CheckboxField.js +4 -1
  21. package/lib/components/Input/Input.js +2 -10
  22. package/lib/components/Input/Input.test.js +11 -2
  23. package/lib/components/MultivaluesField/MultivaluesField.js +9 -2
  24. package/lib/components/NumberField/NumberField.js +32 -12
  25. package/lib/components/NumberField/NumberField.test.js +5 -0
  26. package/lib/components/PageHeader/PageHeader.js +2 -0
  27. package/lib/components/PageHeader/PageHeader.stories.js +5 -1
  28. package/lib/components/RadioGroupField/RadioGroupField.js +9 -5
  29. package/lib/components/SelectField/SelectField.stories.js +2 -50
  30. package/lib/components/Tabs/Tabs.stories.js +0 -11
  31. package/lib/hooks/useField/useField.js +2 -2
  32. package/lib/styles/forms/checkbox.js +0 -1
  33. package/lib/styles/forms/input.js +1 -1
  34. package/lib/styles/forms/label.js +3 -0
  35. package/lib/styles/forms/radio.js +1 -1
  36. package/lib/styles/forms/switch.js +3 -1
  37. package/lib/styles/variants/boxes.js +4 -1
  38. package/package.json +1 -1
  39. package/lib/cjs/layouts/ListLayout.stories.js +0 -895
  40. package/lib/cjs/layouts/SchemaFormLayout.stories.js +0 -139
  41. package/lib/layouts/ListLayout.stories.js +0 -866
  42. package/lib/layouts/SchemaFormLayout.stories.js +0 -107
@@ -1,866 +0,0 @@
1
- import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
2
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
5
- import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
6
- import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
7
- import React, { useState } from 'react';
8
- import SearchIcon from 'mdi-react/SearchIcon';
9
- import AddIcon from 'mdi-react/AddIcon';
10
- import PencilIcon from 'mdi-react/PencilIcon';
11
- import ContentCopyIcon from 'mdi-react/ContentCopyIcon';
12
- import CloseIcon from 'mdi-react/CloseIcon';
13
- import { Box, Button, CheckboxField, Chip, Icon, IconButton, Item, List, ListItem, Menu, Messages, Modal, OverlayProvider, OverlayPanel, PopoverMenu, Separator, SelectField, SearchField, Stepper, Step, Tab, Tabs, Text, TextAreaField, TextField } from '../index';
14
- import { jsx as ___EmotionJSX } from "@emotion/react";
15
- export default {
16
- title: 'Layouts/ListLayout'
17
- };
18
-
19
- var Person = function Person(props) {
20
- return ___EmotionJSX("svg", _extends({
21
- xmlns: "http://www.w3.org/2000/svg",
22
- height: "24px",
23
- viewBox: "0 0 24 24",
24
- width: "24px",
25
- fill: "#000000"
26
- }, props), ___EmotionJSX("path", {
27
- d: "M0 0h24v24H0z",
28
- fill: "none"
29
- }), ___EmotionJSX("path", {
30
- d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
31
- }));
32
- };
33
-
34
- var DotsVerticalIcon = function DotsVerticalIcon(props) {
35
- return ___EmotionJSX("svg", _extends({
36
- viewBox: "0 0 24 24"
37
- }, props), ___EmotionJSX("path", {
38
- d: "M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"
39
- }));
40
- };
41
-
42
- var ChevronRight = function ChevronRight(props) {
43
- return ___EmotionJSX("svg", _extends({
44
- viewBox: "0 0 24 24"
45
- }, props), ___EmotionJSX("path", {
46
- d: "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
47
- }));
48
- };
49
-
50
- export var Default = function Default() {
51
- var _useState = useState([{
52
- title: 'First Item',
53
- subtitle: 'First Item Subtitle',
54
- id: '1'
55
- }, {
56
- title: 'Second Item',
57
- subtitle: 'Second Item Subtitle',
58
- id: '2'
59
- }, {
60
- title: 'Third Item',
61
- subtitle: 'Third Item Subtitle',
62
- id: '3'
63
- }, {
64
- title: 'Fourth Item',
65
- subtitle: 'Fourth Item Subtitle',
66
- id: '4'
67
- }, {
68
- title: 'Fifth Item',
69
- subtitle: 'Fifth Item Subtitle',
70
- id: '5'
71
- }]),
72
- _useState2 = _slicedToArray(_useState, 2),
73
- items = _useState2[0],
74
- setItems = _useState2[1];
75
-
76
- var _useState3 = useState(false),
77
- _useState4 = _slicedToArray(_useState3, 2),
78
- editOverviewVisible = _useState4[0],
79
- setEditOverviewVisible = _useState4[1];
80
-
81
- var _useState5 = useState(false),
82
- _useState6 = _slicedToArray(_useState5, 2),
83
- editConfigurationVisible = _useState6[0],
84
- setEditConfigurationVisible = _useState6[1];
85
-
86
- var _useState7 = useState(false),
87
- _useState8 = _slicedToArray(_useState7, 2),
88
- addItemVisible = _useState8[0],
89
- setAddItemVisible = _useState8[1];
90
-
91
- var _useState9 = useState(false),
92
- _useState10 = _slicedToArray(_useState9, 2),
93
- staticVisible = _useState10[0],
94
- setStaticVisible = _useState10[1];
95
-
96
- var _useState11 = useState(null),
97
- _useState12 = _slicedToArray(_useState11, 2),
98
- selectedId = _useState12[0],
99
- setSelectedId = _useState12[1];
100
-
101
- var _useState13 = useState('1'),
102
- _useState14 = _slicedToArray(_useState13, 2),
103
- activeTab = _useState14[0],
104
- setActiveTab = _useState14[1];
105
-
106
- var _useState15 = useState(1),
107
- _useState16 = _slicedToArray(_useState15, 2),
108
- activeStep = _useState16[0],
109
- setActiveStep = _useState16[1];
110
-
111
- var _useState17 = useState(false),
112
- _useState18 = _slicedToArray(_useState17, 2),
113
- isDeleting = _useState18[0],
114
- setIsDeleting = _useState18[1];
115
-
116
- var _useState19 = useState(null),
117
- _useState20 = _slicedToArray(_useState19, 2),
118
- interactingItem = _useState20[0],
119
- setInteractingItem = _useState20[1];
120
-
121
- var _useState21 = useState(false),
122
- _useState22 = _slicedToArray(_useState21, 2),
123
- hasAdded = _useState22[0],
124
- setHasAdded = _useState22[1];
125
-
126
- var editOverview = function editOverview() {
127
- setStaticVisible(false);
128
- setEditOverviewVisible(true);
129
- };
130
-
131
- var editConfiguration = function editConfiguration() {
132
- setStaticVisible(false);
133
- setEditConfigurationVisible(true);
134
- };
135
-
136
- var viewItem = function viewItem() {
137
- setStaticVisible(true);
138
- setEditConfigurationVisible(false);
139
- setEditOverviewVisible(false);
140
- };
141
-
142
- var openStaticListItem = function openStaticListItem(id) {
143
- setSelectedId(id);
144
- setStaticVisible(true);
145
- };
146
-
147
- var saveItem = function saveItem() {
148
- var newItems = _concatInstanceProperty(items).call(items, {
149
- title: 'New Item',
150
- subtitle: 'New Item Subtitle',
151
- id: '6'
152
- });
153
-
154
- setItems(newItems);
155
- setSelectedId('6');
156
- setStaticVisible(true);
157
- setAddItemVisible(false);
158
- setActiveStep(1);
159
- setHasAdded(true);
160
- };
161
-
162
- var resetListItem = function resetListItem() {
163
- setSelectedId(null);
164
- setEditOverviewVisible(false);
165
- setEditConfigurationVisible(false);
166
- setStaticVisible(false);
167
- setActiveTab('1');
168
- setActiveStep(1);
169
- setAddItemVisible(false);
170
- };
171
-
172
- var handleMenuChange = function handleMenuChange(menuItemKey, listItemKey) {
173
- if (menuItemKey === 'view') {
174
- openStaticListItem(listItemKey.id);
175
- }
176
-
177
- if (menuItemKey === 'delete') {
178
- setIsDeleting(true);
179
- setInteractingItem(listItemKey);
180
- }
181
- };
182
-
183
- var deleteItem = function deleteItem() {
184
- var newItems = _filterInstanceProperty(items).call(items, function (item) {
185
- return item.id !== interactingItem.id;
186
- });
187
-
188
- setItems(newItems);
189
- setIsDeleting(false);
190
- };
191
-
192
- var onMessageClose = function onMessageClose() {
193
- setHasAdded(false);
194
- };
195
-
196
- var buttonBarStyles = {
197
- bottom: '0',
198
- position: 'absolute',
199
- bg: 'white',
200
- width: '100%',
201
- height: '75px',
202
- alignItems: 'center',
203
- pb: 'lg',
204
- pt: 'lg',
205
- zIndex: 1
206
- };
207
- return ___EmotionJSX(Box, {
208
- isRow: true,
209
- bg: "accent.99",
210
- p: "lg"
211
- }, ___EmotionJSX(Box, {
212
- flexGrow: 1,
213
- maxWidth: "100%"
214
- }, ___EmotionJSX(Box, {
215
- isRow: true,
216
- mb: "md"
217
- }, ___EmotionJSX(Text, {
218
- variant: "title",
219
- mr: "sm"
220
- }, "List Items"), ___EmotionJSX(IconButton, {
221
- "aria-label": "my-label",
222
- title: "Add List Item",
223
- onPress: function onPress() {
224
- return setAddItemVisible(true);
225
- },
226
- variant: "inverted"
227
- }, ___EmotionJSX(Icon, {
228
- icon: AddIcon
229
- }))), ___EmotionJSX(Text, {
230
- pb: "md",
231
- variant: "itemSubtitle"
232
- }, "Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam", ___EmotionJSX("br", null), "eius modi tempora incidunt ut labore et doloremagnam aliquam quaerat voluptatem."), ___EmotionJSX(SearchField, {
233
- icon: SearchIcon,
234
- "aria-label": "Search",
235
- minWidth: "40%",
236
- maxWidth: "400px",
237
- mb: "md",
238
- placeholder: "Search"
239
- }), ___EmotionJSX(List, null, _mapInstanceProperty(items).call(items, function (item, i) {
240
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ListItem, {
241
- flexGrow: 1,
242
- bg: item.id === selectedId ? 'white ' : 'accent.99',
243
- key: item.id
244
- }, ___EmotionJSX(Box, {
245
- isRow: true,
246
- mr: "auto",
247
- flexBasis: "0px",
248
- flexGrow: "1",
249
- onClick: function onClick() {
250
- return openStaticListItem(item.id);
251
- }
252
- }, ___EmotionJSX(Icon, {
253
- icon: Person,
254
- alignSelf: "center",
255
- mr: "md",
256
- color: "accent.40",
257
- size: 25,
258
- flexShrink: 0
259
- }), ___EmotionJSX(Box, {
260
- isRow: true,
261
- alignItems: "center"
262
- }, ___EmotionJSX(Box, {
263
- alignSelf: "center"
264
- }, ___EmotionJSX(Text, {
265
- variant: "listTitle",
266
- alignSelf: "center",
267
- mr: "auto"
268
- }, item.title), ___EmotionJSX(Text, {
269
- alignSelf: "center",
270
- variant: "listSubtitle",
271
- mr: "auto"
272
- }, item.subtitle)), item.id === '6' ? ___EmotionJSX(Box, {
273
- ml: "sm"
274
- }, ___EmotionJSX(Chip, {
275
- bg: "success.light",
276
- textColor: "success.dark",
277
- label: "New",
278
- isUppercase: true
279
- })) : null)), ___EmotionJSX(Box, {
280
- isRow: true,
281
- alignSelf: "center"
282
- }, ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(PopoverMenu, null, ___EmotionJSX(IconButton, {
283
- "aria-label": "my-label"
284
- }, ___EmotionJSX(Icon, {
285
- icon: DotsVerticalIcon,
286
- size: 20
287
- })), ___EmotionJSX(Menu, {
288
- selectionMode: "single",
289
- onAction: function onAction(key) {
290
- return handleMenuChange(key, item);
291
- }
292
- }, ___EmotionJSX(Item, {
293
- key: "view"
294
- }, ___EmotionJSX(Box, null, "View")), ___EmotionJSX(Item, {
295
- key: "rename"
296
- }, ___EmotionJSX(Box, null, "Rename")), ___EmotionJSX(Item, {
297
- key: "delete",
298
- textValue: "Delete"
299
- }, ___EmotionJSX(Text, {
300
- color: "critical.bright"
301
- }, "Delete"))))))), i !== items.length - 1 ? ___EmotionJSX(Separator, {
302
- margin: "0"
303
- }) : null);
304
- }))), staticVisible && ___EmotionJSX(OverlayPanel, {
305
- p: "0",
306
- isOpen: staticVisible
307
- }, ___EmotionJSX(Box, {
308
- height: "60px",
309
- bg: "accent.99"
310
- }, ___EmotionJSX(Box, {
311
- isRow: true,
312
- flexBasis: "0px",
313
- flexGrow: "1",
314
- alignItems: "center",
315
- pl: "md",
316
- pr: "md",
317
- justifyContent: "space-between"
318
- }, ___EmotionJSX(Box, {
319
- isRow: true
320
- }, ___EmotionJSX(Icon, {
321
- icon: Person,
322
- alignSelf: "center",
323
- mr: "md",
324
- color: "accent.40",
325
- size: 25,
326
- flexShrink: 0
327
- }), ___EmotionJSX(Box, {
328
- alignSelf: "center"
329
- }, ___EmotionJSX(Text, {
330
- variant: "listTitle",
331
- alignSelf: "center",
332
- mr: "auto"
333
- }, selectedId ? _findInstanceProperty(items).call(items, function (i) {
334
- return i.id === selectedId;
335
- }).title : null), ___EmotionJSX(Text, {
336
- alignSelf: "center",
337
- variant: "listSubtitle",
338
- mr: "auto"
339
- }, selectedId ? _findInstanceProperty(items).call(items, function (i) {
340
- return i.id === selectedId;
341
- }).subtitle : null))), ___EmotionJSX(Box, {
342
- isRow: true
343
- }, ___EmotionJSX(IconButton, {
344
- "aria-label": "kebab",
345
- flexShrink: 0
346
- }, ___EmotionJSX(Icon, {
347
- icon: DotsVerticalIcon,
348
- size: 20
349
- })), ___EmotionJSX(IconButton, {
350
- "aria-label": "my-label",
351
- onClick: function onClick() {
352
- return resetListItem();
353
- },
354
- flexShrink: 0
355
- }, ___EmotionJSX(Icon, {
356
- icon: CloseIcon
357
- }))))), ___EmotionJSX(Box, {
358
- pr: "lg",
359
- pl: "lg"
360
- }, ___EmotionJSX(Tabs, {
361
- tabListProps: {
362
- justifyContent: 'center'
363
- },
364
- selectedKey: activeTab,
365
- onSelectionChange: setActiveTab
366
- }, ___EmotionJSX(Tab, {
367
- key: "1",
368
- title: "Overview"
369
- }, ___EmotionJSX(Box, {
370
- isRow: true,
371
- justifyContent: "space-between"
372
- }, ___EmotionJSX(Text, null, "Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam", ___EmotionJSX("br", null), " eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem."), ___EmotionJSX(IconButton, {
373
- "aria-label": "my-label",
374
- onClick: editOverview,
375
- variant: "inverted",
376
- size: "20px",
377
- ml: "sm"
378
- }, ___EmotionJSX(Icon, {
379
- icon: PencilIcon
380
- })))), ___EmotionJSX(Tab, {
381
- key: "2",
382
- title: "Configuration"
383
- }, ___EmotionJSX(Box, {
384
- isRow: true,
385
- justifyContent: "space-between"
386
- }, ___EmotionJSX(Box, {
387
- sx: {
388
- overflowY: 'auto'
389
- }
390
- }, ___EmotionJSX(Box, {
391
- mb: "lg"
392
- }, ___EmotionJSX(Text, {
393
- variant: "bodyStrong",
394
- sx: {
395
- fontWeight: '700',
396
- fontSize: '13px'
397
- },
398
- pb: "xs"
399
- }, "Configuration Type"), ___EmotionJSX(Text, {
400
- variant: "base"
401
- }, "Regular Configuration")), ___EmotionJSX(Box, {
402
- mb: "lg"
403
- }, ___EmotionJSX(Text, {
404
- variant: "bodyStrong",
405
- sx: {
406
- fontWeight: '700',
407
- fontSize: '13px'
408
- },
409
- pb: "xs"
410
- }, "URLs"), ___EmotionJSX(Box, {
411
- isRow: true,
412
- pb: "xs",
413
- alignItems: "center"
414
- }, ___EmotionJSX(Text, {
415
- variant: "base"
416
- }, "https://domain.com:9999"), ___EmotionJSX(IconButton, {
417
- "aria-label": "my-label",
418
- ml: 5
419
- }, ___EmotionJSX(Icon, {
420
- icon: ContentCopyIcon,
421
- size: "15px"
422
- })))), ___EmotionJSX(Box, {
423
- mb: "lg"
424
- }, ___EmotionJSX(Text, {
425
- variant: "bodyStrong",
426
- sx: {
427
- fontWeight: '700',
428
- fontSize: '13px'
429
- },
430
- pb: "xs"
431
- }, "Super Mode"), ___EmotionJSX(Text, {
432
- variant: "base"
433
- }, "Enabled")), ___EmotionJSX(Box, {
434
- mb: "lg"
435
- }, ___EmotionJSX(Text, {
436
- variant: "bodyStrong",
437
- sx: {
438
- fontWeight: '700',
439
- fontSize: '13px'
440
- },
441
- pb: "xs"
442
- }, "Username"), ___EmotionJSX(Text, {
443
- variant: "base"
444
- }, "somebody"))), ___EmotionJSX(IconButton, {
445
- "aria-label": "my-label",
446
- onClick: editConfiguration,
447
- variant: "inverted",
448
- size: "20px"
449
- }, ___EmotionJSX(Icon, {
450
- icon: PencilIcon
451
- }))))))), editOverviewVisible && ___EmotionJSX(OverlayPanel, {
452
- p: "0",
453
- isOpen: editOverviewVisible
454
- }, ___EmotionJSX(Box, {
455
- height: "60px",
456
- bg: "accent.99",
457
- pl: "lg",
458
- pr: "lg"
459
- }, ___EmotionJSX(Box, {
460
- isRow: true,
461
- flexBasis: "0px",
462
- flexGrow: "1",
463
- alignItems: "center",
464
- justifyContent: "space-between"
465
- }, ___EmotionJSX(Box, {
466
- isRow: true
467
- }, ___EmotionJSX(Icon, {
468
- icon: Person,
469
- alignSelf: "center",
470
- mr: "md",
471
- color: "accent.40",
472
- size: 25,
473
- flexShrink: 0
474
- }), ___EmotionJSX(Text, {
475
- variant: "sectionTitle",
476
- alignSelf: "center",
477
- color: "active",
478
- mr: "xs"
479
- }, selectedId ? _findInstanceProperty(items).call(items, function (i) {
480
- return i.id === selectedId;
481
- }).title : null), ___EmotionJSX(Icon, {
482
- icon: ChevronRight,
483
- alignSelf: "center",
484
- mr: "xs",
485
- color: "accent.40",
486
- size: 22,
487
- flexShrink: 0
488
- }), ___EmotionJSX(Box, {
489
- alignSelf: "center",
490
- justifyContent: "center"
491
- }, ___EmotionJSX(Text, {
492
- variant: "sectionTitle",
493
- alignSelf: "center",
494
- mr: "auto"
495
- }, "Edit Overview"))), ___EmotionJSX(Box, {
496
- isRow: true
497
- }, ___EmotionJSX(IconButton, {
498
- "aria-label": "my-label",
499
- onClick: function onClick() {
500
- return resetListItem();
501
- },
502
- flexShrink: 0
503
- }, ___EmotionJSX(Icon, {
504
- icon: CloseIcon
505
- }))))), ___EmotionJSX(Box, {
506
- height: "100%",
507
- pl: "lg",
508
- pr: "lg"
509
- }, ___EmotionJSX(Box, {
510
- sx: {
511
- overflowY: 'auto'
512
- }
513
- }, ___EmotionJSX(Box, {
514
- pt: "lg",
515
- pb: "lg"
516
- }, ___EmotionJSX(TextField, {
517
- label: "Name",
518
- labelMode: "float",
519
- width: "85%",
520
- value: selectedId ? _findInstanceProperty(items).call(items, function (i) {
521
- return i.id === selectedId;
522
- }).title : null,
523
- "aria-label": "Name Field"
524
- })), ___EmotionJSX(Box, {
525
- pb: "lg"
526
- }, ___EmotionJSX(TextField, {
527
- label: "Subtitle",
528
- labelMode: "float",
529
- width: "85%",
530
- value: selectedId ? _findInstanceProperty(items).call(items, function (i) {
531
- return i.id === selectedId;
532
- }).subtitle : null,
533
- "aria-label": "Subtitle Field"
534
- })), ___EmotionJSX(Box, null, ___EmotionJSX(TextAreaField, {
535
- label: "Subtitle",
536
- labelMode: "float",
537
- width: "85%",
538
- value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
539
- "aria-label": "Subtitle Field"
540
- })))), ___EmotionJSX(Box, {
541
- isRow: true,
542
- sx: buttonBarStyles,
543
- pl: "lg"
544
- }, ___EmotionJSX(Button, {
545
- variant: "primary",
546
- onPress: viewItem,
547
- mr: "md",
548
- "aria-label": "Save Button"
549
- }, "Save"), ___EmotionJSX(Button, {
550
- variant: "link",
551
- onPress: viewItem,
552
- "aria-label": "Cancel Button"
553
- }, "Cancel"))), editConfigurationVisible && ___EmotionJSX(OverlayPanel, {
554
- p: "0",
555
- isOpen: editConfiguration
556
- }, ___EmotionJSX(Box, {
557
- height: "60px",
558
- bg: "accent.99"
559
- }, ___EmotionJSX(Box, {
560
- isRow: true,
561
- flexBasis: "0px",
562
- flexGrow: "1",
563
- alignItems: "center",
564
- pl: "md",
565
- pr: "md",
566
- justifyContent: "space-between"
567
- }, ___EmotionJSX(Box, {
568
- isRow: true
569
- }, ___EmotionJSX(Icon, {
570
- icon: Person,
571
- alignSelf: "center",
572
- mr: "md",
573
- color: "accent.40",
574
- size: 25,
575
- flexShrink: 0
576
- }), ___EmotionJSX(Text, {
577
- variant: "sectionTitle",
578
- alignSelf: "center",
579
- color: "active",
580
- mr: "xs"
581
- }, selectedId ? _findInstanceProperty(items).call(items, function (i) {
582
- return i.id === selectedId;
583
- }).title : null), ___EmotionJSX(Icon, {
584
- icon: ChevronRight,
585
- alignSelf: "center",
586
- mr: "xs",
587
- color: "accent.40",
588
- size: 22,
589
- flexShrink: 0
590
- }), ___EmotionJSX(Box, {
591
- alignSelf: "center",
592
- justifyContent: "center"
593
- }, ___EmotionJSX(Text, {
594
- variant: "sectionTitle",
595
- alignSelf: "center",
596
- mr: "auto"
597
- }, "Edit Configuration"))), ___EmotionJSX(Box, {
598
- isRow: true
599
- }, ___EmotionJSX(IconButton, {
600
- "aria-label": "my-label",
601
- onClick: function onClick() {
602
- return resetListItem();
603
- },
604
- flexShrink: 0
605
- }, ___EmotionJSX(Icon, {
606
- icon: CloseIcon
607
- }))))), ___EmotionJSX(Box, {
608
- height: "100%",
609
- sx: {
610
- overflowY: 'auto'
611
- }
612
- }, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
613
- pt: "lg",
614
- pb: "lg",
615
- pl: "md"
616
- }, ___EmotionJSX(SelectField, {
617
- labelMode: "float",
618
- label: "Configuration Type",
619
- minWidth: "40%",
620
- maxWidth: "400px",
621
- "aria-label": "Configuration Type Input"
622
- }, ___EmotionJSX(Item, {
623
- key: "1"
624
- }, "Regular Configuration"), ___EmotionJSX(Item, {
625
- key: "2"
626
- }, "Placeholder Configuration 1"), ___EmotionJSX(Item, {
627
- key: "3"
628
- }, "Placeholder Configuration 2"))), ___EmotionJSX(Box, {
629
- pb: "lg",
630
- pl: "md"
631
- }, ___EmotionJSX(TextField, {
632
- label: "URL",
633
- labelMode: "float",
634
- minWidth: "35%",
635
- maxWidth: "400px",
636
- "aria-label": "URL Input"
637
- })), ___EmotionJSX(Box, {
638
- pb: "sm",
639
- pl: "md"
640
- }, ___EmotionJSX(TextField, {
641
- label: "URL",
642
- labelMode: "float",
643
- minWidth: "35%",
644
- maxWidth: "400px",
645
- "aria-label": "URL Input"
646
- })), ___EmotionJSX(Box, {
647
- pb: "lg",
648
- pl: "md"
649
- }, ___EmotionJSX(CheckboxField, {
650
- label: "Super Mode",
651
- "aria-label": "Super Mode Input"
652
- })), ___EmotionJSX(Box, {
653
- pb: "lg",
654
- pl: "md"
655
- }, ___EmotionJSX(TextField, {
656
- label: "Username",
657
- labelMode: "float",
658
- minWidth: "35%",
659
- maxWidth: "400px",
660
- "aria-label": "Username Input"
661
- })), ___EmotionJSX(Box, {
662
- pb: "lg",
663
- pl: "md"
664
- }, ___EmotionJSX(TextField, {
665
- labelMode: "float",
666
- label: "Password",
667
- minWidth: "35%",
668
- maxWidth: "400px",
669
- "aria-label": "Password Input"
670
- })))), ___EmotionJSX(Box, {
671
- isRow: true,
672
- pl: "lg",
673
- sx: buttonBarStyles
674
- }, ___EmotionJSX(Button, {
675
- variant: "primary",
676
- onPress: viewItem,
677
- mr: "md",
678
- "aria-label": "Save Button"
679
- }, "Save"), ___EmotionJSX(Button, {
680
- variant: "link",
681
- onPress: viewItem,
682
- "aria-label": "Cancel Button"
683
- }, "Cancel"))), addItemVisible && ___EmotionJSX(OverlayPanel, {
684
- p: "0",
685
- isOpen: addItemVisible
686
- }, ___EmotionJSX(Box, {
687
- height: "60px",
688
- bg: "accent.99"
689
- }, ___EmotionJSX(Box, {
690
- isRow: true,
691
- lexBasis: "0px",
692
- flexGrow: "1",
693
- alignItems: "center",
694
- pl: "md",
695
- pr: "md",
696
- justifyContent: "space-between"
697
- }, ___EmotionJSX(Box, {
698
- isRow: true
699
- }, ___EmotionJSX(Icon, {
700
- icon: Person,
701
- alignSelf: "center",
702
- mr: "md",
703
- color: "accent.40",
704
- size: 25,
705
- flexShrink: 0
706
- }), ___EmotionJSX(Box, {
707
- alignSelf: "center"
708
- }, ___EmotionJSX(Text, {
709
- alignSelf: "center",
710
- variant: "itemTitle",
711
- mr: "auto"
712
- }, "Add Item"))), ___EmotionJSX(Box, {
713
- isRow: true
714
- }, ___EmotionJSX(IconButton, {
715
- "aria-label": "my-label",
716
- onClick: function onClick() {
717
- return resetListItem();
718
- },
719
- flexShrink: 0
720
- }, ___EmotionJSX(Icon, {
721
- icon: CloseIcon
722
- }))))), ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
723
- p: "lg"
724
- }, ___EmotionJSX(Stepper, {
725
- activeStep: activeStep,
726
- onStepChange: setActiveStep
727
- }, ___EmotionJSX(Step, {
728
- key: "1",
729
- textValue: "Step 1"
730
- }, ___EmotionJSX(Text, {
731
- alignSelf: "center",
732
- variant: "sectionTitle",
733
- mr: "auto",
734
- mt: "lg"
735
- }, "Name & Description"), ___EmotionJSX(Box, {
736
- pt: "lg",
737
- pb: "lg"
738
- }, ___EmotionJSX(TextField, {
739
- label: "Name",
740
- labelMode: "float",
741
- minWidth: "40%",
742
- maxWidth: "400px",
743
- "aria-label": "Name Input",
744
- key: "name-input"
745
- })), ___EmotionJSX(Box, {
746
- pb: "lg"
747
- }, ___EmotionJSX(TextField, {
748
- label: "Subtitle",
749
- labelMode: "float",
750
- minWidth: "40%",
751
- maxWidth: "400px",
752
- "aria-label": "Subtitle Input",
753
- key: "subtitle-input"
754
- })), ___EmotionJSX(Box, null, ___EmotionJSX(TextAreaField, {
755
- label: "Description",
756
- labelMode: "float",
757
- minWidth: "40%",
758
- maxWidth: "400px",
759
- rows: 5,
760
- "aria-label": "Name Input",
761
- key: "description-input"
762
- })), ___EmotionJSX(Box, {
763
- isRow: true,
764
- sx: buttonBarStyles
765
- }, ___EmotionJSX(Button, {
766
- variant: "link",
767
- onPress: resetListItem,
768
- mr: "md",
769
- "aria-label": "Cancel Button"
770
- }, "Cancel"), ___EmotionJSX(Button, {
771
- variant: "primary",
772
- onPress: function onPress() {
773
- return setActiveStep(2);
774
- },
775
- "aria-label": "Next Button"
776
- }, "Next"))), ___EmotionJSX(Step, {
777
- key: "2",
778
- textValue: "Step 2"
779
- }, ___EmotionJSX(Text, {
780
- alignSelf: "center",
781
- variant: "sectionTitle",
782
- mr: "auto",
783
- mt: "lg",
784
- mb: "lg"
785
- }, "Name & Description"), ___EmotionJSX(Box, {
786
- pb: "lg"
787
- }, ___EmotionJSX(SelectField, {
788
- selectedKey: "1",
789
- labelMode: "float",
790
- label: "Configuration Type",
791
- minWidth: "40%",
792
- maxWidth: "400px",
793
- key: "configuration-type"
794
- }, ___EmotionJSX(Item, {
795
- key: "1"
796
- }, "Regular Configuration"), ___EmotionJSX(Item, {
797
- key: "2"
798
- }, "Placeholder 1"), ___EmotionJSX(Item, {
799
- key: "3"
800
- }, "Placeholder 2"))), ___EmotionJSX(Box, {
801
- pb: "sm"
802
- }, ___EmotionJSX(TextField, {
803
- label: "URL",
804
- labelMode: "float",
805
- minWidth: "40%",
806
- maxWidth: "400px",
807
- value: "https://domain.com:9999",
808
- key: "url-input-1"
809
- })), ___EmotionJSX(Box, {
810
- pb: "sm"
811
- }, ___EmotionJSX(TextField, {
812
- label: "URL",
813
- labelMode: "float",
814
- minWidth: "40%",
815
- maxWidth: "400px",
816
- value: "https://somewhere.else.com:9090",
817
- key: "url-input-2"
818
- })), ___EmotionJSX(Box, {
819
- pb: "lg"
820
- }, ___EmotionJSX(CheckboxField, {
821
- label: "Super Mode",
822
- isSelected: true
823
- })), ___EmotionJSX(Box, {
824
- isRow: true,
825
- sx: buttonBarStyles
826
- }, ___EmotionJSX(Button, {
827
- variant: "link",
828
- onPress: resetListItem,
829
- mr: "md"
830
- }, "Cancel"), ___EmotionJSX(Button, {
831
- variant: "primary",
832
- onPress: saveItem
833
- }, "Save"))))))), isDeleting && ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Modal, {
834
- title: "Delete Item",
835
- isOpen: isDeleting,
836
- isDismissable: true,
837
- hasCloseButton: true,
838
- onClose: function onClose() {
839
- return setIsDeleting(false);
840
- }
841
- }, ___EmotionJSX(Text, {
842
- variant: "subtitle",
843
- pt: "lg"
844
- }, "Are you sure you want to delete this item?"), ___EmotionJSX(Box, {
845
- isRow: true,
846
- pt: "lg",
847
- mr: "auto"
848
- }, ___EmotionJSX(Button, {
849
- variant: "critical",
850
- mr: "md",
851
- onPress: deleteItem
852
- }, "Delete"), ___EmotionJSX(Button, {
853
- variant: "link",
854
- onPress: function onPress() {
855
- return setIsDeleting(false);
856
- }
857
- }, "Cancel")))), ___EmotionJSX(Messages, {
858
- onClose: onMessageClose,
859
- style: {
860
- zIndex: 9999
861
- }
862
- }, hasAdded && ___EmotionJSX(Item, {
863
- key: "message2",
864
- status: "success"
865
- }, "A new item has been successfully added.")));
866
- };