Skip to content

Commit 7157f91

Browse files
committed
fix: onclickoutside selectinput
1 parent 209a627 commit 7157f91

File tree

18 files changed

+430
-0
lines changed

18 files changed

+430
-0
lines changed

.changeset/sharp-steaks-nail.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
`SelectInput`:
6+
- click outside should work in every context
7+
- fix placeholder alignment when small

packages/form/src/components/SelectInputField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ exports[`selectInputField > should display right value on grouped options 1`] =
1919
background: #ffffff;
2020
border-radius: 0.25rem;
2121
width: 100%;
22+
-webkit-align-content: center;
23+
-ms-flex-line-pack: center;
24+
align-content: center;
2225
}
2326
2427
.emotion-2[data-size='small'] {
@@ -654,6 +657,9 @@ exports[`selectInputField > should render correctly 1`] = `
654657
background: #ffffff;
655658
border-radius: 0.25rem;
656659
width: 100%;
660+
-webkit-align-content: center;
661+
-ms-flex-line-pack: center;
662+
align-content: center;
657663
}
658664
659665
.emotion-2[data-size='small'] {
@@ -835,6 +841,9 @@ exports[`selectInputField > should render correctly disabled 1`] = `
835841
background: #ffffff;
836842
border-radius: 0.25rem;
837843
width: 100%;
844+
-webkit-align-content: center;
845+
-ms-flex-line-pack: center;
846+
align-content: center;
838847
}
839848
840849
.emotion-2[data-size='small'] {
@@ -1016,6 +1025,9 @@ exports[`selectInputField > should render correctly grouped 1`] = `
10161025
background: #ffffff;
10171026
border-radius: 0.25rem;
10181027
width: 100%;
1028+
-webkit-align-content: center;
1029+
-ms-flex-line-pack: center;
1030+
align-content: center;
10191031
}
10201032
10211033
.emotion-2[data-size='small'] {
@@ -1197,6 +1209,9 @@ exports[`selectInputField > should render correctly multiselect 1`] = `
11971209
background: #ffffff;
11981210
border-radius: 0.25rem;
11991211
width: 100%;
1212+
-webkit-align-content: center;
1213+
-ms-flex-line-pack: center;
1214+
align-content: center;
12001215
}
12011216
12021217
.emotion-2[data-size='small'] {
@@ -1378,6 +1393,9 @@ exports[`selectInputField > should trigger events 1`] = `
13781393
background: #ffffff;
13791394
border-radius: 0.25rem;
13801395
width: 100%;
1396+
-webkit-align-content: center;
1397+
-ms-flex-line-pack: center;
1398+
align-content: center;
13811399
}
13821400
13831401
.emotion-2[data-size='small'] {

packages/form/src/components/SelectableCardOptionGroupField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ exports[`selectableCardOptionGroupField > should render correctly 1`] = `
323323
background: #ffffff;
324324
border-radius: 0.25rem;
325325
width: 100%;
326+
-webkit-align-content: center;
327+
-ms-flex-line-pack: center;
328+
align-content: center;
326329
}
327330
328331
.emotion-29[data-size='small'] {

packages/form/src/components/UnitInputField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ exports[`unitInputField > should handles onChange and selection 1`] = `
236236
background: #ffffff;
237237
border-radius: 0.25rem;
238238
width: 100%;
239+
-webkit-align-content: center;
240+
-ms-flex-line-pack: center;
241+
align-content: center;
239242
}
240243
241244
.emotion-9[data-size='small'] {
@@ -781,6 +784,9 @@ exports[`unitInputField > should render correctly 1`] = `
781784
background: #ffffff;
782785
border-radius: 0.25rem;
783786
width: 100%;
787+
-webkit-align-content: center;
788+
-ms-flex-line-pack: center;
789+
align-content: center;
784790
}
785791
786792
.emotion-18[data-size='small'] {

packages/plus/src/components/EstimateCost/__tests__/__snapshots__/CustomUnitInput.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ exports[`estimateCost - CustomUnitInput > render default values 1`] = `
236236
background: #ffffff;
237237
border-radius: 0.25rem;
238238
width: 100%;
239+
-webkit-align-content: center;
240+
-ms-flex-line-pack: center;
241+
align-content: center;
239242
}
240243
241244
.emotion-9[data-size='small'] {

packages/plus/src/components/EstimateCost/__tests__/__snapshots__/Item.test.tsx.snap

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ exports[`estimateCost - Item > render with labelTextVariant 1`] = `
897897
background: #ffffff;
898898
border-radius: 0.25rem;
899899
width: 100%;
900+
-webkit-align-content: center;
901+
-ms-flex-line-pack: center;
902+
align-content: center;
900903
}
901904
902905
.emotion-43[data-size='small'] {
@@ -990,6 +993,9 @@ exports[`estimateCost - Item > render with labelTextVariant 1`] = `
990993
background: #ffffff;
991994
border-radius: 0.25rem;
992995
width: 100%;
996+
-webkit-align-content: center;
997+
-ms-flex-line-pack: center;
998+
align-content: center;
993999
}
9941000
9951001
.emotion-43[data-size='small'] {
@@ -2065,6 +2071,9 @@ exports[`estimateCost - Item > render with noPrice and noBorder 1`] = `
20652071
background: #ffffff;
20662072
border-radius: 0.25rem;
20672073
width: 100%;
2074+
-webkit-align-content: center;
2075+
-ms-flex-line-pack: center;
2076+
align-content: center;
20682077
}
20692078
20702079
.emotion-43[data-size='small'] {
@@ -3454,6 +3463,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
34543463
background: #ffffff;
34553464
border-radius: 0.25rem;
34563465
width: 100%;
3466+
-webkit-align-content: center;
3467+
-ms-flex-line-pack: center;
3468+
align-content: center;
34573469
}
34583470
34593471
.emotion-45[data-size='small'] {
@@ -3547,6 +3559,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
35473559
background: #ffffff;
35483560
border-radius: 0.25rem;
35493561
width: 100%;
3562+
-webkit-align-content: center;
3563+
-ms-flex-line-pack: center;
3564+
align-content: center;
35503565
}
35513566
35523567
.emotion-45[data-size='small'] {
@@ -5073,6 +5088,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
50735088
background: #ffffff;
50745089
border-radius: 0.25rem;
50755090
width: 100%;
5091+
-webkit-align-content: center;
5092+
-ms-flex-line-pack: center;
5093+
align-content: center;
50765094
}
50775095
50785096
.emotion-43[data-size='small'] {
@@ -5166,6 +5184,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
51665184
background: #ffffff;
51675185
border-radius: 0.25rem;
51685186
width: 100%;
5187+
-webkit-align-content: center;
5188+
-ms-flex-line-pack: center;
5189+
align-content: center;
51695190
}
51705191
51715192
.emotion-43[data-size='small'] {
@@ -6674,6 +6695,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
66746695
background: #ffffff;
66756696
border-radius: 0.25rem;
66766697
width: 100%;
6698+
-webkit-align-content: center;
6699+
-ms-flex-line-pack: center;
6700+
align-content: center;
66776701
}
66786702
66796703
.emotion-43[data-size='small'] {
@@ -6767,6 +6791,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
67676791
background: #ffffff;
67686792
border-radius: 0.25rem;
67696793
width: 100%;
6794+
-webkit-align-content: center;
6795+
-ms-flex-line-pack: center;
6796+
align-content: center;
67706797
}
67716798
67726799
.emotion-43[data-size='small'] {
@@ -8279,6 +8306,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
82798306
background: #ffffff;
82808307
border-radius: 0.25rem;
82818308
width: 100%;
8309+
-webkit-align-content: center;
8310+
-ms-flex-line-pack: center;
8311+
align-content: center;
82828312
}
82838313
82848314
.emotion-45[data-size='small'] {
@@ -8372,6 +8402,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
83728402
background: #ffffff;
83738403
border-radius: 0.25rem;
83748404
width: 100%;
8405+
-webkit-align-content: center;
8406+
-ms-flex-line-pack: center;
8407+
align-content: center;
83758408
}
83768409
83778410
.emotion-45[data-size='small'] {

packages/plus/src/components/EstimateCost/__tests__/__snapshots__/Region.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ exports[`estimateCost - Region > render region component 1`] = `
461461
background: #ffffff;
462462
border-radius: 0.25rem;
463463
width: 100%;
464+
-webkit-align-content: center;
465+
-ms-flex-line-pack: center;
466+
align-content: center;
464467
}
465468
466469
.emotion-45[data-size='small'] {

packages/plus/src/components/EstimateCost/__tests__/__snapshots__/Stepper.test.tsx.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ exports[`estimateCost - NumberInput Item > render basic props 1`] = `
444444
background: #ffffff;
445445
border-radius: 0.25rem;
446446
width: 100%;
447+
-webkit-align-content: center;
448+
-ms-flex-line-pack: center;
449+
align-content: center;
447450
}
448451
449452
.emotion-44[data-size='small'] {
@@ -1613,6 +1616,9 @@ exports[`estimateCost - NumberInput Item > render basic with overlay 1`] = `
16131616
background: #ffffff;
16141617
border-radius: 0.25rem;
16151618
width: 100%;
1619+
-webkit-align-content: center;
1620+
-ms-flex-line-pack: center;
1621+
align-content: center;
16161622
}
16171623
16181624
.emotion-44[data-size='small'] {
@@ -2782,6 +2788,9 @@ exports[`estimateCost - NumberInput Item > render with getAmountValue 1`] = `
27822788
background: #ffffff;
27832789
border-radius: 0.25rem;
27842790
width: 100%;
2791+
-webkit-align-content: center;
2792+
-ms-flex-line-pack: center;
2793+
align-content: center;
27852794
}
27862795
27872796
.emotion-44[data-size='small'] {
@@ -3951,6 +3960,9 @@ exports[`estimateCost - NumberInput Item > render with values 1`] = `
39513960
background: #ffffff;
39523961
border-radius: 0.25rem;
39533962
width: 100%;
3963+
-webkit-align-content: center;
3964+
-ms-flex-line-pack: center;
3965+
align-content: center;
39543966
}
39553967
39563968
.emotion-44[data-size='small'] {

packages/plus/src/components/EstimateCost/__tests__/__snapshots__/Strong.test.tsx.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ exports[`estimateCost - Strong Item > render basic props 1`] = `
456456
background: #ffffff;
457457
border-radius: 0.25rem;
458458
width: 100%;
459+
-webkit-align-content: center;
460+
-ms-flex-line-pack: center;
461+
align-content: center;
459462
}
460463
461464
.emotion-43[data-size='small'] {
@@ -1383,6 +1386,9 @@ exports[`estimateCost - Strong Item > render with isDisabledOnOverlay 1`] = `
13831386
background: #ffffff;
13841387
border-radius: 0.25rem;
13851388
width: 100%;
1389+
-webkit-align-content: center;
1390+
-ms-flex-line-pack: center;
1391+
align-content: center;
13861392
}
13871393
13881394
.emotion-40[data-size='small'] {
@@ -2331,6 +2337,9 @@ exports[`estimateCost - Strong Item > render with small variant 1`] = `
23312337
background: #ffffff;
23322338
border-radius: 0.25rem;
23332339
width: 100%;
2340+
-webkit-align-content: center;
2341+
-ms-flex-line-pack: center;
2342+
align-content: center;
23342343
}
23352344
23362345
.emotion-43[data-size='small'] {

0 commit comments

Comments
 (0)