@pareto-engineering/design-system 2.0.0-alpha.15 → 2.0.0-alpha.19
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/dist/cjs/a/Conversation/styles.scss +1 -13
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/cjs/f/fields/SelectInput/styles.scss +3 -3
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -5
- package/dist/cjs/f/fields/TextInput/styles.scss +0 -4
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +13 -6
- package/dist/es/a/Conversation/styles.scss +1 -13
- package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/es/f/fields/SelectInput/styles.scss +3 -3
- package/dist/es/f/fields/TextInput/TextInput.js +19 -5
- package/dist/es/f/fields/TextInput/styles.scss +0 -4
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +13 -6
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +227 -22
- package/src/stories/f/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TextInput.stories.jsx +10 -0
- package/src/stories/f/TextareaInput.stories.jsx +40 -4
- package/src/ui/a/Conversation/styles.scss +1 -13
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
- package/src/ui/f/fields/SelectInput/styles.scss +3 -3
- package/src/ui/f/fields/TextInput/TextInput.jsx +15 -2
- package/src/ui/f/fields/TextInput/styles.scss +0 -4
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +21 -10
|
@@ -9130,7 +9130,7 @@ exports[`Storyshots f/FormInput Base 1`] = `
|
|
|
9130
9130
|
className="base text-input form-input"
|
|
9131
9131
|
>
|
|
9132
9132
|
<label
|
|
9133
|
-
className="base label
|
|
9133
|
+
className="base label v50 mb-v x-main2"
|
|
9134
9134
|
htmlFor="firstName"
|
|
9135
9135
|
>
|
|
9136
9136
|
What's your first name ?
|
|
@@ -9150,7 +9150,7 @@ exports[`Storyshots f/FormInput Base 1`] = `
|
|
|
9150
9150
|
className="base text-input form-input"
|
|
9151
9151
|
>
|
|
9152
9152
|
<label
|
|
9153
|
-
className="base label
|
|
9153
|
+
className="base label v50 mb-v x-main2"
|
|
9154
9154
|
htmlFor="lastName"
|
|
9155
9155
|
>
|
|
9156
9156
|
What's your last name ?
|
|
@@ -9166,10 +9166,10 @@ exports[`Storyshots f/FormInput Base 1`] = `
|
|
|
9166
9166
|
/>
|
|
9167
9167
|
</div>
|
|
9168
9168
|
<div
|
|
9169
|
-
className="base text-area-input form-input x-background1
|
|
9169
|
+
className="base text-area-input form-input x-background1"
|
|
9170
9170
|
>
|
|
9171
9171
|
<label
|
|
9172
|
-
className="base label
|
|
9172
|
+
className="base label v50 mb-v x-main2"
|
|
9173
9173
|
htmlFor="description"
|
|
9174
9174
|
>
|
|
9175
9175
|
Describe yourself in a few sentences
|
|
@@ -9273,18 +9273,22 @@ exports[`Storyshots f/FormInput Base 1`] = `
|
|
|
9273
9273
|
name="food"
|
|
9274
9274
|
onBlur={[Function]}
|
|
9275
9275
|
onChange={[Function]}
|
|
9276
|
+
value=""
|
|
9276
9277
|
>
|
|
9277
9278
|
<option
|
|
9279
|
+
disabled={false}
|
|
9278
9280
|
value="italian"
|
|
9279
9281
|
>
|
|
9280
9282
|
A nice pizza
|
|
9281
9283
|
</option>
|
|
9282
9284
|
<option
|
|
9285
|
+
disabled={false}
|
|
9283
9286
|
value="turkish"
|
|
9284
9287
|
>
|
|
9285
9288
|
A delicious kebab
|
|
9286
9289
|
</option>
|
|
9287
9290
|
<option
|
|
9291
|
+
disabled={false}
|
|
9288
9292
|
value="french"
|
|
9289
9293
|
>
|
|
9290
9294
|
A three course delicate french meal
|
|
@@ -9315,7 +9319,7 @@ exports[`Storyshots f/FormInput Disabled Form Input 1`] = `
|
|
|
9315
9319
|
className="base text-input form-input"
|
|
9316
9320
|
>
|
|
9317
9321
|
<label
|
|
9318
|
-
className="base label
|
|
9322
|
+
className="base label v50 mb-v x-main2"
|
|
9319
9323
|
htmlFor="firstName"
|
|
9320
9324
|
>
|
|
9321
9325
|
What's your first name ?
|
|
@@ -9335,7 +9339,7 @@ exports[`Storyshots f/FormInput Disabled Form Input 1`] = `
|
|
|
9335
9339
|
className="base text-input form-input"
|
|
9336
9340
|
>
|
|
9337
9341
|
<label
|
|
9338
|
-
className="base label
|
|
9342
|
+
className="base label v50 mb-v x-main2"
|
|
9339
9343
|
htmlFor="lastName"
|
|
9340
9344
|
>
|
|
9341
9345
|
What's your last name ?
|
|
@@ -9351,10 +9355,10 @@ exports[`Storyshots f/FormInput Disabled Form Input 1`] = `
|
|
|
9351
9355
|
/>
|
|
9352
9356
|
</div>
|
|
9353
9357
|
<div
|
|
9354
|
-
className="base text-area-input form-input x-background1
|
|
9358
|
+
className="base text-area-input form-input x-background1"
|
|
9355
9359
|
>
|
|
9356
9360
|
<label
|
|
9357
|
-
className="base label
|
|
9361
|
+
className="base label v50 mb-v x-main2"
|
|
9358
9362
|
htmlFor="description"
|
|
9359
9363
|
>
|
|
9360
9364
|
Describe yourself in a few sentences
|
|
@@ -9458,18 +9462,22 @@ exports[`Storyshots f/FormInput Disabled Form Input 1`] = `
|
|
|
9458
9462
|
name="food"
|
|
9459
9463
|
onBlur={[Function]}
|
|
9460
9464
|
onChange={[Function]}
|
|
9465
|
+
value=""
|
|
9461
9466
|
>
|
|
9462
9467
|
<option
|
|
9468
|
+
disabled={false}
|
|
9463
9469
|
value="italian"
|
|
9464
9470
|
>
|
|
9465
9471
|
A nice pizza
|
|
9466
9472
|
</option>
|
|
9467
9473
|
<option
|
|
9474
|
+
disabled={false}
|
|
9468
9475
|
value="turkish"
|
|
9469
9476
|
>
|
|
9470
9477
|
A delicious kebab
|
|
9471
9478
|
</option>
|
|
9472
9479
|
<option
|
|
9480
|
+
disabled={false}
|
|
9473
9481
|
value="french"
|
|
9474
9482
|
>
|
|
9475
9483
|
A three course delicate french meal
|
|
@@ -9500,7 +9508,7 @@ exports[`Storyshots f/FormInput Extensible Form Input 1`] = `
|
|
|
9500
9508
|
className="base text-input form-input"
|
|
9501
9509
|
>
|
|
9502
9510
|
<label
|
|
9503
|
-
className="base label
|
|
9511
|
+
className="base label v50 mb-v x-main2"
|
|
9504
9512
|
htmlFor="extended"
|
|
9505
9513
|
>
|
|
9506
9514
|
Extended type input
|
|
@@ -11124,16 +11132,19 @@ exports[`Storyshots f/fields/SelectInput Base 1`] = `
|
|
|
11124
11132
|
value="Work"
|
|
11125
11133
|
>
|
|
11126
11134
|
<option
|
|
11135
|
+
disabled={false}
|
|
11127
11136
|
value="Work"
|
|
11128
11137
|
>
|
|
11129
11138
|
Work
|
|
11130
11139
|
</option>
|
|
11131
11140
|
<option
|
|
11141
|
+
disabled={false}
|
|
11132
11142
|
value="Managing"
|
|
11133
11143
|
>
|
|
11134
11144
|
Managing
|
|
11135
11145
|
</option>
|
|
11136
11146
|
<option
|
|
11147
|
+
disabled={false}
|
|
11137
11148
|
value="Training"
|
|
11138
11149
|
>
|
|
11139
11150
|
Training
|
|
@@ -11179,26 +11190,31 @@ exports[`Storyshots f/fields/SelectInput Disabled Select Input 1`] = `
|
|
|
11179
11190
|
value="Work"
|
|
11180
11191
|
>
|
|
11181
11192
|
<option
|
|
11193
|
+
disabled={false}
|
|
11182
11194
|
value="Work"
|
|
11183
11195
|
>
|
|
11184
11196
|
Work
|
|
11185
11197
|
</option>
|
|
11186
11198
|
<option
|
|
11199
|
+
disabled={false}
|
|
11187
11200
|
value="Managing"
|
|
11188
11201
|
>
|
|
11189
11202
|
Managing
|
|
11190
11203
|
</option>
|
|
11191
11204
|
<option
|
|
11205
|
+
disabled={false}
|
|
11192
11206
|
value="Training"
|
|
11193
11207
|
>
|
|
11194
11208
|
Training
|
|
11195
11209
|
</option>
|
|
11196
11210
|
<option
|
|
11211
|
+
disabled={false}
|
|
11197
11212
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
11198
11213
|
>
|
|
11199
11214
|
20th Aug 2020 to 19th Sept, 2020
|
|
11200
11215
|
</option>
|
|
11201
11216
|
<option
|
|
11217
|
+
disabled={false}
|
|
11202
11218
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
11203
11219
|
>
|
|
11204
11220
|
20th Sept 2020 to 19th Oct, 2020
|
|
@@ -11244,11 +11260,13 @@ exports[`Storyshots f/fields/SelectInput Objects 1`] = `
|
|
|
11244
11260
|
value="Work"
|
|
11245
11261
|
>
|
|
11246
11262
|
<option
|
|
11263
|
+
disabled={false}
|
|
11247
11264
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
11248
11265
|
>
|
|
11249
11266
|
20th Aug 2020 to 19th Sept, 2020
|
|
11250
11267
|
</option>
|
|
11251
11268
|
<option
|
|
11269
|
+
disabled={false}
|
|
11252
11270
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
11253
11271
|
>
|
|
11254
11272
|
20th Sept 2020 to 19th Oct, 2020
|
|
@@ -11269,6 +11287,64 @@ exports[`Storyshots f/fields/SelectInput Objects 1`] = `
|
|
|
11269
11287
|
</form>
|
|
11270
11288
|
`;
|
|
11271
11289
|
|
|
11290
|
+
exports[`Storyshots f/fields/SelectInput Required Select 1`] = `
|
|
11291
|
+
<form
|
|
11292
|
+
action="#"
|
|
11293
|
+
onReset={[Function]}
|
|
11294
|
+
onSubmit={[Function]}
|
|
11295
|
+
>
|
|
11296
|
+
<div
|
|
11297
|
+
className="base select-input"
|
|
11298
|
+
>
|
|
11299
|
+
<label
|
|
11300
|
+
className="base label input-label x-main2"
|
|
11301
|
+
htmlFor="activity"
|
|
11302
|
+
>
|
|
11303
|
+
Activity Type
|
|
11304
|
+
</label>
|
|
11305
|
+
<select
|
|
11306
|
+
className="input v25 pv-v"
|
|
11307
|
+
disabled={false}
|
|
11308
|
+
id="activity"
|
|
11309
|
+
name="activity"
|
|
11310
|
+
onBlur={[Function]}
|
|
11311
|
+
onChange={[Function]}
|
|
11312
|
+
value=""
|
|
11313
|
+
>
|
|
11314
|
+
<option
|
|
11315
|
+
disabled={true}
|
|
11316
|
+
value=""
|
|
11317
|
+
>
|
|
11318
|
+
Select activity type
|
|
11319
|
+
</option>
|
|
11320
|
+
<option
|
|
11321
|
+
disabled={false}
|
|
11322
|
+
value="review"
|
|
11323
|
+
>
|
|
11324
|
+
Review
|
|
11325
|
+
</option>
|
|
11326
|
+
<option
|
|
11327
|
+
disabled={false}
|
|
11328
|
+
value="Approve"
|
|
11329
|
+
>
|
|
11330
|
+
Approve
|
|
11331
|
+
</option>
|
|
11332
|
+
</select>
|
|
11333
|
+
</div>
|
|
11334
|
+
<div
|
|
11335
|
+
className="debugger"
|
|
11336
|
+
>
|
|
11337
|
+
<button
|
|
11338
|
+
className="base button x-main2"
|
|
11339
|
+
onClick={[Function]}
|
|
11340
|
+
type="button"
|
|
11341
|
+
>
|
|
11342
|
+
Open FormDebugger
|
|
11343
|
+
</button>
|
|
11344
|
+
</div>
|
|
11345
|
+
</form>
|
|
11346
|
+
`;
|
|
11347
|
+
|
|
11272
11348
|
exports[`Storyshots f/fields/SelectInput String And Objects 1`] = `
|
|
11273
11349
|
<form
|
|
11274
11350
|
action="#"
|
|
@@ -11294,26 +11370,31 @@ exports[`Storyshots f/fields/SelectInput String And Objects 1`] = `
|
|
|
11294
11370
|
value="Work"
|
|
11295
11371
|
>
|
|
11296
11372
|
<option
|
|
11373
|
+
disabled={false}
|
|
11297
11374
|
value="Work"
|
|
11298
11375
|
>
|
|
11299
11376
|
Work
|
|
11300
11377
|
</option>
|
|
11301
11378
|
<option
|
|
11379
|
+
disabled={false}
|
|
11302
11380
|
value="Managing"
|
|
11303
11381
|
>
|
|
11304
11382
|
Managing
|
|
11305
11383
|
</option>
|
|
11306
11384
|
<option
|
|
11385
|
+
disabled={false}
|
|
11307
11386
|
value="Training"
|
|
11308
11387
|
>
|
|
11309
11388
|
Training
|
|
11310
11389
|
</option>
|
|
11311
11390
|
<option
|
|
11391
|
+
disabled={false}
|
|
11312
11392
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
11313
11393
|
>
|
|
11314
11394
|
20th Aug 2020 to 19th Sept, 2020
|
|
11315
11395
|
</option>
|
|
11316
11396
|
<option
|
|
11397
|
+
disabled={false}
|
|
11317
11398
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
11318
11399
|
>
|
|
11319
11400
|
20th Sept 2020 to 19th Oct, 2020
|
|
@@ -11402,7 +11483,7 @@ exports[`Storyshots f/fields/TextInput Base 1`] = `
|
|
|
11402
11483
|
className="base text-input"
|
|
11403
11484
|
>
|
|
11404
11485
|
<label
|
|
11405
|
-
className="base label
|
|
11486
|
+
className="base label v50 mb-v x-main2"
|
|
11406
11487
|
htmlFor="firstName"
|
|
11407
11488
|
>
|
|
11408
11489
|
What's your first name ?
|
|
@@ -11446,7 +11527,7 @@ exports[`Storyshots f/fields/TextInput Date Time 1`] = `
|
|
|
11446
11527
|
className="base text-input"
|
|
11447
11528
|
>
|
|
11448
11529
|
<label
|
|
11449
|
-
className="base label
|
|
11530
|
+
className="base label v50 mb-v x-main2"
|
|
11450
11531
|
htmlFor="date"
|
|
11451
11532
|
>
|
|
11452
11533
|
Select date
|
|
@@ -11466,7 +11547,7 @@ exports[`Storyshots f/fields/TextInput Date Time 1`] = `
|
|
|
11466
11547
|
className="base text-input"
|
|
11467
11548
|
>
|
|
11468
11549
|
<label
|
|
11469
|
-
className="base label
|
|
11550
|
+
className="base label v50 mb-v x-main2"
|
|
11470
11551
|
htmlFor="time"
|
|
11471
11552
|
>
|
|
11472
11553
|
Select time
|
|
@@ -11510,7 +11591,7 @@ exports[`Storyshots f/fields/TextInput Disabled Text Input 1`] = `
|
|
|
11510
11591
|
className="base text-input"
|
|
11511
11592
|
>
|
|
11512
11593
|
<label
|
|
11513
|
-
className="base label
|
|
11594
|
+
className="base label v50 mb-v x-main2"
|
|
11514
11595
|
htmlFor="firstName"
|
|
11515
11596
|
>
|
|
11516
11597
|
What's your first name ?
|
|
@@ -11530,6 +11611,40 @@ exports[`Storyshots f/fields/TextInput Disabled Text Input 1`] = `
|
|
|
11530
11611
|
</form>
|
|
11531
11612
|
`;
|
|
11532
11613
|
|
|
11614
|
+
exports[`Storyshots f/fields/TextInput Text Input With Place Holder 1`] = `
|
|
11615
|
+
<form
|
|
11616
|
+
action="#"
|
|
11617
|
+
onReset={[Function]}
|
|
11618
|
+
onSubmit={[Function]}
|
|
11619
|
+
>
|
|
11620
|
+
<div
|
|
11621
|
+
className="y-background1 b-dark-y u2 pb-u"
|
|
11622
|
+
>
|
|
11623
|
+
<div
|
|
11624
|
+
className="base text-input"
|
|
11625
|
+
>
|
|
11626
|
+
<label
|
|
11627
|
+
className="base label v50 mb-v x-main2"
|
|
11628
|
+
htmlFor="firstName"
|
|
11629
|
+
>
|
|
11630
|
+
What's your first name ?
|
|
11631
|
+
</label>
|
|
11632
|
+
<input
|
|
11633
|
+
className="input input-border"
|
|
11634
|
+
disabled={false}
|
|
11635
|
+
id="firstName"
|
|
11636
|
+
name="firstName"
|
|
11637
|
+
onBlur={[Function]}
|
|
11638
|
+
onChange={[Function]}
|
|
11639
|
+
placeholder="First Name"
|
|
11640
|
+
type="text"
|
|
11641
|
+
value=""
|
|
11642
|
+
/>
|
|
11643
|
+
</div>
|
|
11644
|
+
</div>
|
|
11645
|
+
</form>
|
|
11646
|
+
`;
|
|
11647
|
+
|
|
11533
11648
|
exports[`Storyshots f/fields/TextareaInput Base 1`] = `
|
|
11534
11649
|
<form
|
|
11535
11650
|
action="#"
|
|
@@ -11540,18 +11655,18 @@ exports[`Storyshots f/fields/TextareaInput Base 1`] = `
|
|
|
11540
11655
|
className="y-background1 b-dark-y"
|
|
11541
11656
|
>
|
|
11542
11657
|
<div
|
|
11543
|
-
className="base text-area-input x-background1
|
|
11658
|
+
className="base text-area-input x-background1"
|
|
11544
11659
|
>
|
|
11545
11660
|
<label
|
|
11546
|
-
className="base label
|
|
11547
|
-
htmlFor="
|
|
11661
|
+
className="base label v50 mb-v x-main2"
|
|
11662
|
+
htmlFor="feedback"
|
|
11548
11663
|
>
|
|
11549
11664
|
What can we improve on?
|
|
11550
11665
|
</label>
|
|
11551
11666
|
<textarea
|
|
11552
11667
|
className="textarea v50 pv-v input-border"
|
|
11553
11668
|
disabled={false}
|
|
11554
|
-
name="
|
|
11669
|
+
name="feedback"
|
|
11555
11670
|
onBlur={[Function]}
|
|
11556
11671
|
onChange={[Function]}
|
|
11557
11672
|
rows={3}
|
|
@@ -11574,7 +11689,7 @@ exports[`Storyshots f/fields/TextareaInput Base 1`] = `
|
|
|
11574
11689
|
</form>
|
|
11575
11690
|
`;
|
|
11576
11691
|
|
|
11577
|
-
exports[`Storyshots f/fields/TextareaInput Disabled
|
|
11692
|
+
exports[`Storyshots f/fields/TextareaInput Disabled 1`] = `
|
|
11578
11693
|
<form
|
|
11579
11694
|
action="#"
|
|
11580
11695
|
onReset={[Function]}
|
|
@@ -11584,20 +11699,110 @@ exports[`Storyshots f/fields/TextareaInput Disabled Textarea Input 1`] = `
|
|
|
11584
11699
|
className="y-background1 b-dark-y"
|
|
11585
11700
|
>
|
|
11586
11701
|
<div
|
|
11587
|
-
className="base text-area-input x-background1
|
|
11702
|
+
className="base text-area-input x-background1"
|
|
11588
11703
|
>
|
|
11589
11704
|
<label
|
|
11590
|
-
className="base label
|
|
11591
|
-
htmlFor="
|
|
11705
|
+
className="base label v50 mb-v x-main2"
|
|
11706
|
+
htmlFor="feedback"
|
|
11592
11707
|
>
|
|
11593
11708
|
What can we improve on?
|
|
11594
11709
|
</label>
|
|
11595
11710
|
<textarea
|
|
11596
11711
|
className="textarea v50 pv-v input-border"
|
|
11597
11712
|
disabled={true}
|
|
11598
|
-
name="
|
|
11713
|
+
name="feedback"
|
|
11714
|
+
onBlur={[Function]}
|
|
11715
|
+
onChange={[Function]}
|
|
11716
|
+
rows={3}
|
|
11717
|
+
value=""
|
|
11718
|
+
/>
|
|
11719
|
+
|
|
11720
|
+
</div>
|
|
11721
|
+
<div
|
|
11722
|
+
className="debugger"
|
|
11723
|
+
>
|
|
11724
|
+
<button
|
|
11725
|
+
className="base button x-main2"
|
|
11726
|
+
onClick={[Function]}
|
|
11727
|
+
type="button"
|
|
11728
|
+
>
|
|
11729
|
+
Open FormDebugger
|
|
11730
|
+
</button>
|
|
11731
|
+
</div>
|
|
11732
|
+
</div>
|
|
11733
|
+
</form>
|
|
11734
|
+
`;
|
|
11735
|
+
|
|
11736
|
+
exports[`Storyshots f/fields/TextareaInput Placeholder 1`] = `
|
|
11737
|
+
<form
|
|
11738
|
+
action="#"
|
|
11739
|
+
onReset={[Function]}
|
|
11740
|
+
onSubmit={[Function]}
|
|
11741
|
+
>
|
|
11742
|
+
<div
|
|
11743
|
+
className="y-background1 b-dark-y"
|
|
11744
|
+
>
|
|
11745
|
+
<div
|
|
11746
|
+
className="base text-area-input x-background1"
|
|
11747
|
+
>
|
|
11748
|
+
<label
|
|
11749
|
+
className="base label v50 mb-v x-main2"
|
|
11750
|
+
htmlFor="feedback"
|
|
11751
|
+
>
|
|
11752
|
+
What can we improve on?
|
|
11753
|
+
</label>
|
|
11754
|
+
<textarea
|
|
11755
|
+
className="textarea v50 pv-v input-border"
|
|
11756
|
+
disabled={false}
|
|
11757
|
+
name="feedback"
|
|
11758
|
+
onBlur={[Function]}
|
|
11759
|
+
onChange={[Function]}
|
|
11760
|
+
placeholder="Type your feedback here..."
|
|
11761
|
+
rows={3}
|
|
11762
|
+
value=""
|
|
11763
|
+
/>
|
|
11764
|
+
|
|
11765
|
+
</div>
|
|
11766
|
+
<div
|
|
11767
|
+
className="debugger"
|
|
11768
|
+
>
|
|
11769
|
+
<button
|
|
11770
|
+
className="base button x-main2"
|
|
11771
|
+
onClick={[Function]}
|
|
11772
|
+
type="button"
|
|
11773
|
+
>
|
|
11774
|
+
Open FormDebugger
|
|
11775
|
+
</button>
|
|
11776
|
+
</div>
|
|
11777
|
+
</div>
|
|
11778
|
+
</form>
|
|
11779
|
+
`;
|
|
11780
|
+
|
|
11781
|
+
exports[`Storyshots f/fields/TextareaInput Validation 1`] = `
|
|
11782
|
+
<form
|
|
11783
|
+
action="#"
|
|
11784
|
+
onReset={[Function]}
|
|
11785
|
+
onSubmit={[Function]}
|
|
11786
|
+
>
|
|
11787
|
+
<div
|
|
11788
|
+
className="y-background1 b-dark-y"
|
|
11789
|
+
>
|
|
11790
|
+
<div
|
|
11791
|
+
className="base text-area-input x-background1"
|
|
11792
|
+
>
|
|
11793
|
+
<label
|
|
11794
|
+
className="base label v50 mb-v x-main2"
|
|
11795
|
+
htmlFor="feedback"
|
|
11796
|
+
>
|
|
11797
|
+
What can we improve on?
|
|
11798
|
+
</label>
|
|
11799
|
+
<textarea
|
|
11800
|
+
className="textarea v50 pv-v input-border"
|
|
11801
|
+
disabled={false}
|
|
11802
|
+
name="feedback"
|
|
11599
11803
|
onBlur={[Function]}
|
|
11600
11804
|
onChange={[Function]}
|
|
11805
|
+
placeholder="Type your feedback here..."
|
|
11601
11806
|
rows={3}
|
|
11602
11807
|
value=""
|
|
11603
11808
|
/>
|
|
@@ -38,6 +38,35 @@ export const Base = () => (
|
|
|
38
38
|
</>
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
+
export const RequiredSelect = () => {
|
|
42
|
+
const requiredInput = (inputValue) => {
|
|
43
|
+
let error = ''
|
|
44
|
+
|
|
45
|
+
if (!inputValue || !inputValue?.length === 0) {
|
|
46
|
+
error = 'This information is required'
|
|
47
|
+
}
|
|
48
|
+
return error
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
<SelectInput
|
|
54
|
+
validate={requiredInput}
|
|
55
|
+
name="activity"
|
|
56
|
+
label="Activity Type"
|
|
57
|
+
options={[
|
|
58
|
+
{
|
|
59
|
+
value:'', label:'Select activity type', disabled:true,
|
|
60
|
+
},
|
|
61
|
+
{ value: 'review', label: 'Review' },
|
|
62
|
+
{ value: 'Approve', label: 'Approve' },
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
<FormDebugger />
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
41
70
|
export const Objects = () => (
|
|
42
71
|
<>
|
|
43
72
|
<SelectInput
|
|
@@ -52,6 +52,16 @@ export const Base = () => {
|
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export const TextInputWithPlaceHolder = () => (
|
|
56
|
+
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
|
+
<TextInput
|
|
58
|
+
name="firstName"
|
|
59
|
+
label="What's your first name ?"
|
|
60
|
+
placeholder="First Name"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
|
|
55
65
|
export const DisabledTextInput = () => (
|
|
56
66
|
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
67
|
<TextInput
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
decorators:[
|
|
15
15
|
(storyfn) => (
|
|
16
16
|
<Formik
|
|
17
|
-
initialValues={{
|
|
17
|
+
initialValues={{ feedback: '' }}
|
|
18
18
|
>
|
|
19
19
|
<Form>
|
|
20
20
|
|
|
@@ -31,16 +31,52 @@ export default {
|
|
|
31
31
|
export const Base = () => (
|
|
32
32
|
<div className="y-background1 b-dark-y">
|
|
33
33
|
<TextareaInput
|
|
34
|
-
name="
|
|
34
|
+
name="feedback"
|
|
35
35
|
label="What can we improve on?"
|
|
36
36
|
/>
|
|
37
37
|
<FormDebugger />
|
|
38
38
|
</div>
|
|
39
39
|
)
|
|
40
|
-
|
|
40
|
+
|
|
41
|
+
export const Placeholder = () => (
|
|
42
|
+
<div className="y-background1 b-dark-y">
|
|
43
|
+
<TextareaInput
|
|
44
|
+
name="feedback"
|
|
45
|
+
label="What can we improve on?"
|
|
46
|
+
placeholder="Type your feedback here..."
|
|
47
|
+
/>
|
|
48
|
+
<FormDebugger />
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
export const Validation = () => {
|
|
53
|
+
const validate = (value) => {
|
|
54
|
+
let errorMessage = ''
|
|
55
|
+
const isValid = value.length > 3
|
|
56
|
+
|
|
57
|
+
if (!isValid) {
|
|
58
|
+
errorMessage = 'Value should be greater than 3 characters'
|
|
59
|
+
}
|
|
60
|
+
return errorMessage
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="y-background1 b-dark-y">
|
|
65
|
+
<TextareaInput
|
|
66
|
+
name="feedback"
|
|
67
|
+
label="What can we improve on?"
|
|
68
|
+
placeholder="Type your feedback here..."
|
|
69
|
+
validate={validate}
|
|
70
|
+
/>
|
|
71
|
+
<FormDebugger />
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const Disabled = () => (
|
|
41
77
|
<div className="y-background1 b-dark-y">
|
|
42
78
|
<TextareaInput
|
|
43
|
-
name="
|
|
79
|
+
name="feedback"
|
|
44
80
|
label="What can we improve on?"
|
|
45
81
|
disabled
|
|
46
82
|
/>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
$default-padding: var(--u);
|
|
8
8
|
$default-conversation-background: var(--y);
|
|
9
|
-
$default-message-max-width: calc(100% - #{$default-padding});
|
|
9
|
+
$default-message-max-width: calc(100% - 4 * #{$default-padding});
|
|
10
10
|
$default-message-min-width: 12em;
|
|
11
11
|
$default-message-border: var(--theme-border);
|
|
12
12
|
$triangle-border-size: 15px;
|
|
@@ -147,15 +147,3 @@ $triangle-after-side:25px;
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
//@keyframes fadeIn {
|
|
152
|
-
// from {
|
|
153
|
-
// opacity: 0;
|
|
154
|
-
// transform: translate3d(0, 50%, 0);
|
|
155
|
-
// }
|
|
156
|
-
//
|
|
157
|
-
// to {
|
|
158
|
-
// opacity: 1;
|
|
159
|
-
// transform: translate3d(0, 0, 0);
|
|
160
|
-
// }
|
|
161
|
-
//}
|