@platformatic/ui-components 0.3.5 → 0.4.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.
- package/.nvmrc +1 -1
- package/dist/assets/{index-BJ-rQoWR.css → index-K_bDNror.css} +1 -1
- package/dist/index.html +2 -2
- package/dist/main.css +14 -4
- package/package.json +11 -10
- package/src/components/Button.module.css +3 -0
- package/src/components/ButtonOnlyIcon.jsx +1 -1
- package/src/components/TooltipAbsolute.module.css +2 -2
- package/src/stories/BorderedBox.stories.jsx +3 -1
- package/src/stories/Button.stories.jsx +224 -47
- package/src/stories/ButtonFullRounded.stories.jsx +31 -6
- package/src/stories/ButtonOnlyIcon.stories.jsx +13 -3
- package/src/stories/DropDown.stories.jsx +43 -20
- package/src/stories/InfoBox.stories.jsx +12 -3
- package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +115 -117
- package/src/stories/List.stories.jsx +28 -5
- package/src/stories/ListElement.stories.jsx +2 -1
- package/src/stories/Loadable.stories.jsx +6 -5
- package/src/stories/LoadingSpinner.stories.jsx +4 -2
- package/src/stories/LogoDropDown.stories.jsx +38 -24
- package/src/stories/Modal.stories.jsx +72 -17
- package/src/stories/ModalDirectional.stories.jsx +12 -2
- package/src/stories/ModalStepsForward.stories.jsx +82 -13
- package/src/stories/PlatformaticIcon.stories.jsx +44 -9
- package/src/stories/SearchBar.stories.jsx +0 -1
- package/src/stories/SearchBarV2.stories.jsx +0 -1
- package/src/stories/Sidebar.stories.jsx +41 -10
- package/src/stories/TabbedWindow.stories.jsx +71 -31
- package/src/stories/TextWithLabel.stories.jsx +5 -1
- package/src/stories/Tooltip.stories.jsx +10 -2
- package/src/stories/TwoColumnsLayout.stories.jsx +7 -2
- package/src/stories/forms/Field.stories.jsx +53 -15
- package/src/stories/forms/Input.stories.jsx +8 -2
- package/src/stories/forms/InputWithSeparator.stories.jsx +31 -9
- package/src/stories/forms/Password.stories.jsx +5 -1
- package/src/stories/forms/Preview.stories.jsx +6 -1
- package/src/stories/forms/RadioGroup.stories.jsx +5 -1
- package/src/stories/forms/Select.stories.jsx +60 -38
- package/src/stories/forms/SelectWithInput.stories.jsx +78 -41
- package/src/stories/forms/ToggleSwitch.stories.jsx +14 -4
- package/src/stories/icons/Icons.stories.jsx +40 -13
- package/src/stories/logos/Logos.stories.jsx +9 -2
- /package/dist/assets/{index-YI7s19_T.js → index-DxEcxprd.js} +0 -0
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import Button from '../components/Button'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ALTERNATE_RICH_BLACK,
|
|
6
|
+
ANTI_FLASH_WHITE,
|
|
7
|
+
BOX_SHADOW,
|
|
8
|
+
CHANGE_BACKGROUND_COLOR,
|
|
9
|
+
COLORS_BUTTON,
|
|
10
|
+
ERROR_RED,
|
|
11
|
+
FIRE_ENGINE_RED,
|
|
12
|
+
HOVER_EFFECTS_BUTTONS,
|
|
13
|
+
LARGE,
|
|
14
|
+
RICH_BLACK,
|
|
15
|
+
SIZES,
|
|
16
|
+
WHITE,
|
|
17
|
+
ACTIVE_AND_INACTIVE_STATUS,
|
|
18
|
+
MEDIUM
|
|
19
|
+
} from '../components/constants'
|
|
5
20
|
|
|
6
21
|
const divStyle = {
|
|
7
22
|
width: '100%',
|
|
@@ -73,12 +88,21 @@ OnlyLabel.args = {
|
|
|
73
88
|
const AllBorderedTemplate = (args) => {
|
|
74
89
|
return (
|
|
75
90
|
<>
|
|
76
|
-
{COLORS_BUTTON.map(color => (
|
|
91
|
+
{COLORS_BUTTON.map((color) => (
|
|
77
92
|
<React.Fragment key={color}>
|
|
78
93
|
<div className='grid grid-cols-6 gap-2 items-center' key={color}>
|
|
79
94
|
<span className='text-sm'>{color}</span>
|
|
80
|
-
<Button
|
|
81
|
-
|
|
95
|
+
<Button
|
|
96
|
+
color={color}
|
|
97
|
+
onClick={() => alert('clicked ' + color)}
|
|
98
|
+
{...args}
|
|
99
|
+
/>
|
|
100
|
+
<Button
|
|
101
|
+
color={color}
|
|
102
|
+
onClick={() => alert('clicked ' + color)}
|
|
103
|
+
disabled
|
|
104
|
+
{...args}
|
|
105
|
+
/>
|
|
82
106
|
</div>
|
|
83
107
|
<br />
|
|
84
108
|
</React.Fragment>
|
|
@@ -97,12 +121,21 @@ AllBordered.args = {
|
|
|
97
121
|
const AllFilledTemplate = (args) => {
|
|
98
122
|
return (
|
|
99
123
|
<>
|
|
100
|
-
{COLORS_BUTTON.map(color => (
|
|
124
|
+
{COLORS_BUTTON.map((color) => (
|
|
101
125
|
<React.Fragment key={color}>
|
|
102
126
|
<div className='grid grid-cols-6 gap-2 items-center'>
|
|
103
127
|
<span className='text-sm'>{color}</span>
|
|
104
|
-
<Button
|
|
105
|
-
|
|
128
|
+
<Button
|
|
129
|
+
backgroundColor={color}
|
|
130
|
+
onClick={() => alert('clicked ' + color)}
|
|
131
|
+
{...args}
|
|
132
|
+
/>
|
|
133
|
+
<Button
|
|
134
|
+
backgroundColor={color}
|
|
135
|
+
onClick={() => alert('clicked ' + color)}
|
|
136
|
+
disabled
|
|
137
|
+
{...args}
|
|
138
|
+
/>
|
|
106
139
|
</div>
|
|
107
140
|
<br />
|
|
108
141
|
</React.Fragment>
|
|
@@ -125,7 +158,9 @@ AllFilled.args = {
|
|
|
125
158
|
const DesignSystem = (args) => {
|
|
126
159
|
return (
|
|
127
160
|
<div className='grid grid-cols-5 gap-2 items-center'>
|
|
128
|
-
<span className='text-sm text-white col-span-1'>
|
|
161
|
+
<span className='text-sm text-white col-span-1'>
|
|
162
|
+
Disabled with Background Color
|
|
163
|
+
</span>
|
|
129
164
|
<div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
|
|
130
165
|
<Button
|
|
131
166
|
color={RICH_BLACK}
|
|
@@ -156,7 +191,9 @@ const DesignSystem = (args) => {
|
|
|
156
191
|
bordered={false}
|
|
157
192
|
disabled
|
|
158
193
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
159
|
-
hoverEffectProperties={{
|
|
194
|
+
hoverEffectProperties={{
|
|
195
|
+
changeBackgroundColor: ALTERNATE_RICH_BLACK
|
|
196
|
+
}}
|
|
160
197
|
{...args}
|
|
161
198
|
/>
|
|
162
199
|
<Button
|
|
@@ -170,7 +207,9 @@ const DesignSystem = (args) => {
|
|
|
170
207
|
{...args}
|
|
171
208
|
/>
|
|
172
209
|
</div>
|
|
173
|
-
<span className='text-sm text-white col-span-1'>
|
|
210
|
+
<span className='text-sm text-white col-span-1'>
|
|
211
|
+
Default with Background Color
|
|
212
|
+
</span>
|
|
174
213
|
<div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
|
|
175
214
|
<Button
|
|
176
215
|
color={RICH_BLACK}
|
|
@@ -198,7 +237,9 @@ const DesignSystem = (args) => {
|
|
|
198
237
|
onClick={() => alert('clicked Default RICH_BLACK')}
|
|
199
238
|
bordered={false}
|
|
200
239
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
201
|
-
hoverEffectProperties={{
|
|
240
|
+
hoverEffectProperties={{
|
|
241
|
+
changeBackgroundColor: ALTERNATE_RICH_BLACK
|
|
242
|
+
}}
|
|
202
243
|
{...args}
|
|
203
244
|
/>
|
|
204
245
|
<Button
|
|
@@ -211,7 +252,9 @@ const DesignSystem = (args) => {
|
|
|
211
252
|
{...args}
|
|
212
253
|
/>
|
|
213
254
|
</div>
|
|
214
|
-
<span className='text-sm text-white col-span-1'>
|
|
255
|
+
<span className='text-sm text-white col-span-1'>
|
|
256
|
+
Disabled with Background Color 2
|
|
257
|
+
</span>
|
|
215
258
|
<div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
|
|
216
259
|
<Button
|
|
217
260
|
color={RICH_BLACK}
|
|
@@ -221,8 +264,16 @@ const DesignSystem = (args) => {
|
|
|
221
264
|
disabled
|
|
222
265
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
223
266
|
hoverEffectProperties={{ changeBackgroundColor: ANTI_FLASH_WHITE }}
|
|
224
|
-
platformaticIcon={{
|
|
225
|
-
|
|
267
|
+
platformaticIcon={{
|
|
268
|
+
iconName: 'GearIcon',
|
|
269
|
+
size: MEDIUM,
|
|
270
|
+
color: RICH_BLACK
|
|
271
|
+
}}
|
|
272
|
+
platformaticIconAfter={{
|
|
273
|
+
iconName: 'GearIcon',
|
|
274
|
+
size: MEDIUM,
|
|
275
|
+
color: RICH_BLACK
|
|
276
|
+
}}
|
|
226
277
|
{...args}
|
|
227
278
|
/>
|
|
228
279
|
<Button
|
|
@@ -233,8 +284,16 @@ const DesignSystem = (args) => {
|
|
|
233
284
|
disabled
|
|
234
285
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
235
286
|
hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
|
|
236
|
-
platformaticIcon={{
|
|
237
|
-
|
|
287
|
+
platformaticIcon={{
|
|
288
|
+
iconName: 'GearIcon',
|
|
289
|
+
size: MEDIUM,
|
|
290
|
+
color: WHITE
|
|
291
|
+
}}
|
|
292
|
+
platformaticIconAfter={{
|
|
293
|
+
iconName: 'GearIcon',
|
|
294
|
+
size: MEDIUM,
|
|
295
|
+
color: WHITE
|
|
296
|
+
}}
|
|
238
297
|
{...args}
|
|
239
298
|
/>
|
|
240
299
|
</div>
|
|
@@ -246,9 +305,19 @@ const DesignSystem = (args) => {
|
|
|
246
305
|
bordered={false}
|
|
247
306
|
disabled
|
|
248
307
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
249
|
-
hoverEffectProperties={{
|
|
250
|
-
|
|
251
|
-
|
|
308
|
+
hoverEffectProperties={{
|
|
309
|
+
changeBackgroundColor: ALTERNATE_RICH_BLACK
|
|
310
|
+
}}
|
|
311
|
+
platformaticIcon={{
|
|
312
|
+
iconName: 'GearIcon',
|
|
313
|
+
size: MEDIUM,
|
|
314
|
+
color: WHITE
|
|
315
|
+
}}
|
|
316
|
+
platformaticIconAfter={{
|
|
317
|
+
iconName: 'GearIcon',
|
|
318
|
+
size: MEDIUM,
|
|
319
|
+
color: WHITE
|
|
320
|
+
}}
|
|
252
321
|
{...args}
|
|
253
322
|
/>
|
|
254
323
|
<Button
|
|
@@ -259,12 +328,22 @@ const DesignSystem = (args) => {
|
|
|
259
328
|
disabled
|
|
260
329
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
261
330
|
hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
|
|
262
|
-
platformaticIcon={{
|
|
263
|
-
|
|
331
|
+
platformaticIcon={{
|
|
332
|
+
iconName: 'GearIcon',
|
|
333
|
+
size: MEDIUM,
|
|
334
|
+
color: WHITE
|
|
335
|
+
}}
|
|
336
|
+
platformaticIconAfter={{
|
|
337
|
+
iconName: 'GearIcon',
|
|
338
|
+
size: MEDIUM,
|
|
339
|
+
color: WHITE
|
|
340
|
+
}}
|
|
264
341
|
{...args}
|
|
265
342
|
/>
|
|
266
343
|
</div>
|
|
267
|
-
<span className='text-sm text-white col-span-1'>
|
|
344
|
+
<span className='text-sm text-white col-span-1'>
|
|
345
|
+
Default with Background Color 2
|
|
346
|
+
</span>
|
|
268
347
|
<div className='grid grid-cols-2 gap-x-2 bg-rich-black p-2 col-span-2'>
|
|
269
348
|
<Button
|
|
270
349
|
color={RICH_BLACK}
|
|
@@ -273,8 +352,16 @@ const DesignSystem = (args) => {
|
|
|
273
352
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
274
353
|
hoverEffectProperties={{ changeBackgroundColor: ANTI_FLASH_WHITE }}
|
|
275
354
|
bordered={false}
|
|
276
|
-
platformaticIcon={{
|
|
277
|
-
|
|
355
|
+
platformaticIcon={{
|
|
356
|
+
iconName: 'GearIcon',
|
|
357
|
+
size: MEDIUM,
|
|
358
|
+
color: RICH_BLACK
|
|
359
|
+
}}
|
|
360
|
+
platformaticIconAfter={{
|
|
361
|
+
iconName: 'GearIcon',
|
|
362
|
+
size: MEDIUM,
|
|
363
|
+
color: RICH_BLACK
|
|
364
|
+
}}
|
|
278
365
|
{...args}
|
|
279
366
|
/>
|
|
280
367
|
<Button
|
|
@@ -284,8 +371,16 @@ const DesignSystem = (args) => {
|
|
|
284
371
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
285
372
|
hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
|
|
286
373
|
bordered={false}
|
|
287
|
-
platformaticIcon={{
|
|
288
|
-
|
|
374
|
+
platformaticIcon={{
|
|
375
|
+
iconName: 'GearIcon',
|
|
376
|
+
size: MEDIUM,
|
|
377
|
+
color: WHITE
|
|
378
|
+
}}
|
|
379
|
+
platformaticIconAfter={{
|
|
380
|
+
iconName: 'GearIcon',
|
|
381
|
+
size: MEDIUM,
|
|
382
|
+
color: WHITE
|
|
383
|
+
}}
|
|
289
384
|
{...args}
|
|
290
385
|
/>
|
|
291
386
|
</div>
|
|
@@ -296,9 +391,19 @@ const DesignSystem = (args) => {
|
|
|
296
391
|
onClick={() => alert('clicked Default RICH_BLACK')}
|
|
297
392
|
bordered={false}
|
|
298
393
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
299
|
-
hoverEffectProperties={{
|
|
300
|
-
|
|
301
|
-
|
|
394
|
+
hoverEffectProperties={{
|
|
395
|
+
changeBackgroundColor: ALTERNATE_RICH_BLACK
|
|
396
|
+
}}
|
|
397
|
+
platformaticIcon={{
|
|
398
|
+
iconName: 'GearIcon',
|
|
399
|
+
size: MEDIUM,
|
|
400
|
+
color: WHITE
|
|
401
|
+
}}
|
|
402
|
+
platformaticIconAfter={{
|
|
403
|
+
iconName: 'GearIcon',
|
|
404
|
+
size: MEDIUM,
|
|
405
|
+
color: WHITE
|
|
406
|
+
}}
|
|
302
407
|
{...args}
|
|
303
408
|
/>
|
|
304
409
|
<Button
|
|
@@ -308,8 +413,16 @@ const DesignSystem = (args) => {
|
|
|
308
413
|
hoverEffect={CHANGE_BACKGROUND_COLOR}
|
|
309
414
|
hoverEffectProperties={{ changeBackgroundColor: FIRE_ENGINE_RED }}
|
|
310
415
|
bordered={false}
|
|
311
|
-
platformaticIcon={{
|
|
312
|
-
|
|
416
|
+
platformaticIcon={{
|
|
417
|
+
iconName: 'GearIcon',
|
|
418
|
+
size: MEDIUM,
|
|
419
|
+
color: WHITE
|
|
420
|
+
}}
|
|
421
|
+
platformaticIconAfter={{
|
|
422
|
+
iconName: 'GearIcon',
|
|
423
|
+
size: MEDIUM,
|
|
424
|
+
color: WHITE
|
|
425
|
+
}}
|
|
313
426
|
{...args}
|
|
314
427
|
/>
|
|
315
428
|
</div>
|
|
@@ -400,8 +513,16 @@ const DesignSystem = (args) => {
|
|
|
400
513
|
bordered={false}
|
|
401
514
|
disabled
|
|
402
515
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
403
|
-
platformaticIcon={{
|
|
404
|
-
|
|
516
|
+
platformaticIcon={{
|
|
517
|
+
iconName: 'GearIcon',
|
|
518
|
+
size: MEDIUM,
|
|
519
|
+
color: WHITE
|
|
520
|
+
}}
|
|
521
|
+
platformaticIconAfter={{
|
|
522
|
+
iconName: 'GearIcon',
|
|
523
|
+
size: MEDIUM,
|
|
524
|
+
color: WHITE
|
|
525
|
+
}}
|
|
405
526
|
{...args}
|
|
406
527
|
/>
|
|
407
528
|
<Button
|
|
@@ -411,8 +532,16 @@ const DesignSystem = (args) => {
|
|
|
411
532
|
bordered={false}
|
|
412
533
|
disabled
|
|
413
534
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
414
|
-
platformaticIcon={{
|
|
415
|
-
|
|
535
|
+
platformaticIcon={{
|
|
536
|
+
iconName: 'GearIcon',
|
|
537
|
+
size: MEDIUM,
|
|
538
|
+
color: ERROR_RED
|
|
539
|
+
}}
|
|
540
|
+
platformaticIconAfter={{
|
|
541
|
+
iconName: 'GearIcon',
|
|
542
|
+
size: MEDIUM,
|
|
543
|
+
color: ERROR_RED
|
|
544
|
+
}}
|
|
416
545
|
{...args}
|
|
417
546
|
/>
|
|
418
547
|
</div>
|
|
@@ -424,8 +553,16 @@ const DesignSystem = (args) => {
|
|
|
424
553
|
bordered={false}
|
|
425
554
|
disabled
|
|
426
555
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
427
|
-
platformaticIcon={{
|
|
428
|
-
|
|
556
|
+
platformaticIcon={{
|
|
557
|
+
iconName: 'GearIcon',
|
|
558
|
+
size: MEDIUM,
|
|
559
|
+
color: RICH_BLACK
|
|
560
|
+
}}
|
|
561
|
+
platformaticIconAfter={{
|
|
562
|
+
iconName: 'GearIcon',
|
|
563
|
+
size: MEDIUM,
|
|
564
|
+
color: RICH_BLACK
|
|
565
|
+
}}
|
|
429
566
|
{...args}
|
|
430
567
|
/>
|
|
431
568
|
<Button
|
|
@@ -435,8 +572,16 @@ const DesignSystem = (args) => {
|
|
|
435
572
|
bordered={false}
|
|
436
573
|
disabled
|
|
437
574
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
438
|
-
platformaticIcon={{
|
|
439
|
-
|
|
575
|
+
platformaticIcon={{
|
|
576
|
+
iconName: 'GearIcon',
|
|
577
|
+
size: MEDIUM,
|
|
578
|
+
color: ERROR_RED
|
|
579
|
+
}}
|
|
580
|
+
platformaticIconAfter={{
|
|
581
|
+
iconName: 'GearIcon',
|
|
582
|
+
size: MEDIUM,
|
|
583
|
+
color: ERROR_RED
|
|
584
|
+
}}
|
|
440
585
|
{...args}
|
|
441
586
|
/>
|
|
442
587
|
</div>
|
|
@@ -448,8 +593,16 @@ const DesignSystem = (args) => {
|
|
|
448
593
|
onClick={() => alert('clicked Default WHITE')}
|
|
449
594
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
450
595
|
bordered={false}
|
|
451
|
-
platformaticIcon={{
|
|
452
|
-
|
|
596
|
+
platformaticIcon={{
|
|
597
|
+
iconName: 'GearIcon',
|
|
598
|
+
size: MEDIUM,
|
|
599
|
+
color: WHITE
|
|
600
|
+
}}
|
|
601
|
+
platformaticIconAfter={{
|
|
602
|
+
iconName: 'GearIcon',
|
|
603
|
+
size: MEDIUM,
|
|
604
|
+
color: WHITE
|
|
605
|
+
}}
|
|
453
606
|
{...args}
|
|
454
607
|
/>
|
|
455
608
|
<Button
|
|
@@ -458,8 +611,16 @@ const DesignSystem = (args) => {
|
|
|
458
611
|
onClick={() => alert('clicked Default ERROR_RED')}
|
|
459
612
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
460
613
|
bordered={false}
|
|
461
|
-
platformaticIcon={{
|
|
462
|
-
|
|
614
|
+
platformaticIcon={{
|
|
615
|
+
iconName: 'GearIcon',
|
|
616
|
+
size: MEDIUM,
|
|
617
|
+
color: ERROR_RED
|
|
618
|
+
}}
|
|
619
|
+
platformaticIconAfter={{
|
|
620
|
+
iconName: 'GearIcon',
|
|
621
|
+
size: MEDIUM,
|
|
622
|
+
color: ERROR_RED
|
|
623
|
+
}}
|
|
463
624
|
{...args}
|
|
464
625
|
/>
|
|
465
626
|
</div>
|
|
@@ -470,8 +631,16 @@ const DesignSystem = (args) => {
|
|
|
470
631
|
onClick={() => alert('clicked Default RICH_BLACK')}
|
|
471
632
|
bordered={false}
|
|
472
633
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
473
|
-
platformaticIcon={{
|
|
474
|
-
|
|
634
|
+
platformaticIcon={{
|
|
635
|
+
iconName: 'GearIcon',
|
|
636
|
+
size: MEDIUM,
|
|
637
|
+
color: RICH_BLACK
|
|
638
|
+
}}
|
|
639
|
+
platformaticIconAfter={{
|
|
640
|
+
iconName: 'GearIcon',
|
|
641
|
+
size: MEDIUM,
|
|
642
|
+
color: RICH_BLACK
|
|
643
|
+
}}
|
|
475
644
|
{...args}
|
|
476
645
|
/>
|
|
477
646
|
<Button
|
|
@@ -480,8 +649,16 @@ const DesignSystem = (args) => {
|
|
|
480
649
|
onClick={() => alert('clicked Default ERROR_RED')}
|
|
481
650
|
hoverEffect={ACTIVE_AND_INACTIVE_STATUS}
|
|
482
651
|
bordered={false}
|
|
483
|
-
platformaticIcon={{
|
|
484
|
-
|
|
652
|
+
platformaticIcon={{
|
|
653
|
+
iconName: 'GearIcon',
|
|
654
|
+
size: MEDIUM,
|
|
655
|
+
color: ERROR_RED
|
|
656
|
+
}}
|
|
657
|
+
platformaticIconAfter={{
|
|
658
|
+
iconName: 'GearIcon',
|
|
659
|
+
size: MEDIUM,
|
|
660
|
+
color: ERROR_RED
|
|
661
|
+
}}
|
|
485
662
|
{...args}
|
|
486
663
|
/>
|
|
487
664
|
</div>
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import ButtonFullRounded from '../components/ButtonFullRounded'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
COLORS_ICON,
|
|
5
|
+
SIZES,
|
|
6
|
+
SMALL,
|
|
7
|
+
MEDIUM,
|
|
8
|
+
LARGE
|
|
9
|
+
} from '../components/constants'
|
|
4
10
|
import Icons from '../components/icons'
|
|
5
11
|
|
|
6
12
|
const divStyle = {
|
|
@@ -62,7 +68,9 @@ SingleButton.args = {
|
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
const AllCircleButtonsTemplate = (args) => {
|
|
65
|
-
const icons = Object.keys(Icons).filter(
|
|
71
|
+
const icons = Object.keys(Icons).filter(
|
|
72
|
+
(icon) => icon.indexOf('Circle') > -1
|
|
73
|
+
)
|
|
66
74
|
|
|
67
75
|
return (
|
|
68
76
|
<>
|
|
@@ -71,16 +79,33 @@ const AllCircleButtonsTemplate = (args) => {
|
|
|
71
79
|
{icons.map((icon, index) => (
|
|
72
80
|
<div style={row} key={index}>
|
|
73
81
|
<div style={col}>
|
|
74
|
-
<p style={paragraph}
|
|
82
|
+
<p style={paragraph}>
|
|
83
|
+
#{index + 1}: {icon}
|
|
84
|
+
</p>
|
|
75
85
|
</div>
|
|
76
86
|
<div style={col}>
|
|
77
|
-
<ButtonFullRounded
|
|
87
|
+
<ButtonFullRounded
|
|
88
|
+
key={icon}
|
|
89
|
+
iconName={icon}
|
|
90
|
+
iconSize={SMALL}
|
|
91
|
+
{...args}
|
|
92
|
+
/>
|
|
78
93
|
</div>
|
|
79
94
|
<div style={col}>
|
|
80
|
-
<ButtonFullRounded
|
|
95
|
+
<ButtonFullRounded
|
|
96
|
+
key={icon}
|
|
97
|
+
iconName={icon}
|
|
98
|
+
iconSize={MEDIUM}
|
|
99
|
+
{...args}
|
|
100
|
+
/>
|
|
81
101
|
</div>
|
|
82
102
|
<div style={col}>
|
|
83
|
-
<ButtonFullRounded
|
|
103
|
+
<ButtonFullRounded
|
|
104
|
+
key={icon}
|
|
105
|
+
iconName={icon}
|
|
106
|
+
iconSize={LARGE}
|
|
107
|
+
{...args}
|
|
108
|
+
/>
|
|
84
109
|
</div>
|
|
85
110
|
</div>
|
|
86
111
|
))}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import ButtonOnlyIcon from '../components/ButtonOnlyIcon'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
COLORS_BUTTON,
|
|
6
|
+
HOVER_EFFECTS_BUTTONS,
|
|
7
|
+
SIZES,
|
|
8
|
+
WHITE,
|
|
9
|
+
RICH_BLACK,
|
|
10
|
+
DULLS_BACKGROUND_COLOR,
|
|
11
|
+
SMALL
|
|
12
|
+
} from '../components/constants'
|
|
5
13
|
|
|
6
14
|
const divStyle = {
|
|
7
15
|
width: '100%',
|
|
@@ -62,14 +70,16 @@ export default {
|
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
|
|
65
|
-
const OnlyIconTemplate = (args) =>
|
|
73
|
+
const OnlyIconTemplate = (args) => <ButtonOnlyIcon {...args} />
|
|
66
74
|
|
|
67
75
|
export const OnlyIcon = OnlyIconTemplate.bind({})
|
|
68
76
|
|
|
69
77
|
OnlyIcon.args = {
|
|
70
78
|
color: WHITE,
|
|
71
79
|
backgroundColor: RICH_BLACK,
|
|
72
|
-
onClick: () => {
|
|
80
|
+
onClick: () => {
|
|
81
|
+
alert('hit!')
|
|
82
|
+
},
|
|
73
83
|
hoverEffect: DULLS_BACKGROUND_COLOR,
|
|
74
84
|
platformaticIcon: { size: SMALL, iconName: 'RunningIcon', color: WHITE }
|
|
75
85
|
}
|
|
@@ -4,11 +4,17 @@ import BorderedBox from '../components/BorderedBox'
|
|
|
4
4
|
import Button from '../components/Button'
|
|
5
5
|
import HorizontalSeparator from '../components/HorizontalSeparator'
|
|
6
6
|
import { useState } from 'react'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
BOX_SHADOW,
|
|
9
|
+
LIGHT_BLUE,
|
|
10
|
+
MAIN_DARK_BLUE,
|
|
11
|
+
RICH_BLACK,
|
|
12
|
+
WHITE
|
|
13
|
+
} from '../components/constants'
|
|
8
14
|
export default {
|
|
9
15
|
title: 'Platformatic/DropDown',
|
|
10
16
|
component: DropDown,
|
|
11
|
-
decorators: [dd => <div className='text-white'>{dd()}</div>]
|
|
17
|
+
decorators: [(dd) => <div className='text-white'>{dd()}</div>]
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
const Template = (args) => (
|
|
@@ -22,7 +28,11 @@ const Template = (args) => (
|
|
|
22
28
|
const ContentThatLoads = () => {
|
|
23
29
|
const [content, setContent] = useState(null)
|
|
24
30
|
setTimeout(() => {
|
|
25
|
-
setContent(
|
|
31
|
+
setContent(
|
|
32
|
+
<div className='mt-4'>
|
|
33
|
+
<BorderedBox>This is rendered after</BorderedBox>
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
26
36
|
}, 1000)
|
|
27
37
|
|
|
28
38
|
return content
|
|
@@ -33,9 +43,15 @@ export const DefaultAlignment = Template.bind({})
|
|
|
33
43
|
DefaultAlignment.args = {
|
|
34
44
|
header: 'My Menu',
|
|
35
45
|
items: [
|
|
36
|
-
<span className='text-white' key='1'>
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
<span className='text-white' key='1'>
|
|
47
|
+
Menu 1
|
|
48
|
+
</span>,
|
|
49
|
+
<span className='text-white' key='2'>
|
|
50
|
+
Menu 2
|
|
51
|
+
</span>,
|
|
52
|
+
<span className='text-white' key='3'>
|
|
53
|
+
This is a very long menu item
|
|
54
|
+
</span>
|
|
39
55
|
]
|
|
40
56
|
}
|
|
41
57
|
|
|
@@ -62,18 +78,19 @@ withButton.args = {
|
|
|
62
78
|
<span key='2'>Menu 2</span>,
|
|
63
79
|
<span key='3'>This is a very long menu item</span>
|
|
64
80
|
],
|
|
65
|
-
lastButton:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
lastButton: (
|
|
82
|
+
<Button
|
|
83
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
84
|
+
color={WHITE}
|
|
85
|
+
label='Test'
|
|
86
|
+
platformaticIcon={{ iconName: 'WorkspaceStaticIcon', color: WHITE }}
|
|
87
|
+
fullWidth
|
|
88
|
+
bold
|
|
89
|
+
bordered={false}
|
|
90
|
+
hoverEffect={BOX_SHADOW}
|
|
91
|
+
/>
|
|
92
|
+
),
|
|
75
93
|
borderColor: MAIN_DARK_BLUE
|
|
76
|
-
|
|
77
94
|
}
|
|
78
95
|
|
|
79
96
|
export const BlackVersion = Template.bind({})
|
|
@@ -83,8 +100,14 @@ BlackVersion.args = {
|
|
|
83
100
|
backgroundColor: RICH_BLACK,
|
|
84
101
|
borderColor: WHITE,
|
|
85
102
|
items: [
|
|
86
|
-
<span className='text-white' key='1'>
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
<span className='text-white' key='1'>
|
|
104
|
+
Menu 1
|
|
105
|
+
</span>,
|
|
106
|
+
<span className='text-white' key='2'>
|
|
107
|
+
Menu 2
|
|
108
|
+
</span>,
|
|
109
|
+
<span className='text-white' key='3'>
|
|
110
|
+
Menu3
|
|
111
|
+
</span>
|
|
89
112
|
]
|
|
90
113
|
}
|
|
@@ -20,7 +20,11 @@ export default {
|
|
|
20
20
|
]
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const Template = (args) =>
|
|
23
|
+
const Template = (args) => (
|
|
24
|
+
<InfoBox {...args}>
|
|
25
|
+
<p>this will be your custom title</p>
|
|
26
|
+
</InfoBox>
|
|
27
|
+
)
|
|
24
28
|
export const InfoBoxSample = Template.bind({})
|
|
25
29
|
InfoBoxSample.args = {
|
|
26
30
|
iconName: 'UpgradeIcon',
|
|
@@ -32,11 +36,16 @@ InfoBoxSample.args = {
|
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
|
|
35
|
-
const ContainedTemplate = (args) =>
|
|
39
|
+
const ContainedTemplate = (args) => (
|
|
40
|
+
<div style={{ maxWidth: '300px' }}>
|
|
41
|
+
<InfoBox {...args} />
|
|
42
|
+
</div>
|
|
43
|
+
)
|
|
36
44
|
export const InfoBoxContained = ContainedTemplate.bind({})
|
|
37
45
|
InfoBoxContained.args = {
|
|
38
46
|
iconName: 'UpgradeIcon',
|
|
39
|
-
helpText:
|
|
47
|
+
helpText:
|
|
48
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.',
|
|
40
49
|
buttonProps: {
|
|
41
50
|
label: 'Sample button',
|
|
42
51
|
color: 'white',
|