Skip to content

Commit 84c804e

Browse files
committed
fix: onclickoutside selectinput
1 parent 3fbbbd9 commit 84c804e

File tree

20 files changed

+556
-0
lines changed

20 files changed

+556
-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
@@ -72,6 +72,9 @@ exports[`SelectInputField > should display right value on grouped options 1`] =
7272
background: #ffffff;
7373
border-radius: 0.25rem;
7474
width: 100%;
75+
-webkit-align-content: center;
76+
-ms-flex-line-pack: center;
77+
align-content: center;
7578
}
7679
7780
.emotion-6[data-size='small'] {
@@ -914,6 +917,9 @@ exports[`SelectInputField > should render correctly 1`] = `
914917
background: #ffffff;
915918
border-radius: 0.25rem;
916919
width: 100%;
920+
-webkit-align-content: center;
921+
-ms-flex-line-pack: center;
922+
align-content: center;
917923
}
918924
919925
.emotion-6[data-size='small'] {
@@ -1165,6 +1171,9 @@ exports[`SelectInputField > should render correctly disabled 1`] = `
11651171
background: #ffffff;
11661172
border-radius: 0.25rem;
11671173
width: 100%;
1174+
-webkit-align-content: center;
1175+
-ms-flex-line-pack: center;
1176+
align-content: center;
11681177
}
11691178
11701179
.emotion-6[data-size='small'] {
@@ -1416,6 +1425,9 @@ exports[`SelectInputField > should render correctly grouped 1`] = `
14161425
background: #ffffff;
14171426
border-radius: 0.25rem;
14181427
width: 100%;
1428+
-webkit-align-content: center;
1429+
-ms-flex-line-pack: center;
1430+
align-content: center;
14191431
}
14201432
14211433
.emotion-6[data-size='small'] {
@@ -1667,6 +1679,9 @@ exports[`SelectInputField > should render correctly multiselect 1`] = `
16671679
background: #ffffff;
16681680
border-radius: 0.25rem;
16691681
width: 100%;
1682+
-webkit-align-content: center;
1683+
-ms-flex-line-pack: center;
1684+
align-content: center;
16701685
}
16711686
16721687
.emotion-6[data-size='small'] {
@@ -1918,6 +1933,9 @@ exports[`SelectInputField > should trigger events 1`] = `
19181933
background: #ffffff;
19191934
border-radius: 0.25rem;
19201935
width: 100%;
1936+
-webkit-align-content: center;
1937+
-ms-flex-line-pack: center;
1938+
align-content: center;
19211939
}
19221940
19231941
.emotion-6[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
@@ -563,6 +563,9 @@ exports[`SelectableCardOptionGroupField > should render correctly 1`] = `
563563
background: #ffffff;
564564
border-radius: 0.25rem;
565565
width: 100%;
566+
-webkit-align-content: center;
567+
-ms-flex-line-pack: center;
568+
align-content: center;
566569
}
567570
568571
.emotion-45[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
@@ -308,6 +308,9 @@ exports[`UnitInputField > should handles onChange and selection 1`] = `
308308
background: #ffffff;
309309
border-radius: 0.25rem;
310310
width: 100%;
311+
-webkit-align-content: center;
312+
-ms-flex-line-pack: center;
313+
align-content: center;
311314
}
312315
313316
.emotion-20[data-size='small'] {
@@ -837,6 +840,9 @@ exports[`UnitInputField > should render correctly 1`] = `
837840
background: #ffffff;
838841
border-radius: 0.25rem;
839842
width: 100%;
843+
-webkit-align-content: center;
844+
-ms-flex-line-pack: center;
845+
align-content: center;
840846
}
841847
842848
.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
@@ -305,6 +305,9 @@ exports[`EstimateCost - CustomUnitInput > render default values 1`] = `
305305
background: #ffffff;
306306
border-radius: 0.25rem;
307307
width: 100%;
308+
-webkit-align-content: center;
309+
-ms-flex-line-pack: center;
310+
align-content: center;
308311
}
309312
310313
.emotion-16[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
@@ -1265,6 +1265,9 @@ exports[`EstimateCost - Item > render with labelTextVariant 1`] = `
12651265
background: #ffffff;
12661266
border-radius: 0.25rem;
12671267
width: 100%;
1268+
-webkit-align-content: center;
1269+
-ms-flex-line-pack: center;
1270+
align-content: center;
12681271
}
12691272
12701273
.emotion-61[data-size='small'] {
@@ -1358,6 +1361,9 @@ exports[`EstimateCost - Item > render with labelTextVariant 1`] = `
13581361
background: #ffffff;
13591362
border-radius: 0.25rem;
13601363
width: 100%;
1364+
-webkit-align-content: center;
1365+
-ms-flex-line-pack: center;
1366+
align-content: center;
13611367
}
13621368
13631369
.emotion-61[data-size='small'] {
@@ -2684,6 +2690,9 @@ exports[`EstimateCost - Item > render with noPrice and noBorder 1`] = `
26842690
background: #ffffff;
26852691
border-radius: 0.25rem;
26862692
width: 100%;
2693+
-webkit-align-content: center;
2694+
-ms-flex-line-pack: center;
2695+
align-content: center;
26872696
}
26882697
26892698
.emotion-61[data-size='small'] {
@@ -4474,6 +4483,9 @@ exports[`EstimateCost - Item > render with notice 1`] = `
44744483
background: #ffffff;
44754484
border-radius: 0.25rem;
44764485
width: 100%;
4486+
-webkit-align-content: center;
4487+
-ms-flex-line-pack: center;
4488+
align-content: center;
44774489
}
44784490
44794491
.emotion-63[data-size='small'] {
@@ -4567,6 +4579,9 @@ exports[`EstimateCost - Item > render with notice 1`] = `
45674579
background: #ffffff;
45684580
border-radius: 0.25rem;
45694581
width: 100%;
4582+
-webkit-align-content: center;
4583+
-ms-flex-line-pack: center;
4584+
align-content: center;
45704585
}
45714586
45724587
.emotion-63[data-size='small'] {
@@ -6528,6 +6543,9 @@ exports[`EstimateCost - Item > render with priceText 1`] = `
65286543
background: #ffffff;
65296544
border-radius: 0.25rem;
65306545
width: 100%;
6546+
-webkit-align-content: center;
6547+
-ms-flex-line-pack: center;
6548+
align-content: center;
65316549
}
65326550
65336551
.emotion-61[data-size='small'] {
@@ -6621,6 +6639,9 @@ exports[`EstimateCost - Item > render with priceText 1`] = `
66216639
background: #ffffff;
66226640
border-radius: 0.25rem;
66236641
width: 100%;
6642+
-webkit-align-content: center;
6643+
-ms-flex-line-pack: center;
6644+
align-content: center;
66246645
}
66256646
66266647
.emotion-61[data-size='small'] {
@@ -8564,6 +8585,9 @@ exports[`EstimateCost - Item > render with tabulation 1`] = `
85648585
background: #ffffff;
85658586
border-radius: 0.25rem;
85668587
width: 100%;
8588+
-webkit-align-content: center;
8589+
-ms-flex-line-pack: center;
8590+
align-content: center;
85678591
}
85688592
85698593
.emotion-61[data-size='small'] {
@@ -8657,6 +8681,9 @@ exports[`EstimateCost - Item > render with tabulation 1`] = `
86578681
background: #ffffff;
86588682
border-radius: 0.25rem;
86598683
width: 100%;
8684+
-webkit-align-content: center;
8685+
-ms-flex-line-pack: center;
8686+
align-content: center;
86608687
}
86618688
86628689
.emotion-61[data-size='small'] {
@@ -10618,6 +10645,9 @@ exports[`EstimateCost - Item > render with tooltipInfo 1`] = `
1061810645
background: #ffffff;
1061910646
border-radius: 0.25rem;
1062010647
width: 100%;
10648+
-webkit-align-content: center;
10649+
-ms-flex-line-pack: center;
10650+
align-content: center;
1062110651
}
1062210652
1062310653
.emotion-67[data-size='small'] {
@@ -10711,6 +10741,9 @@ exports[`EstimateCost - Item > render with tooltipInfo 1`] = `
1071110741
background: #ffffff;
1071210742
border-radius: 0.25rem;
1071310743
width: 100%;
10744+
-webkit-align-content: center;
10745+
-ms-flex-line-pack: center;
10746+
align-content: center;
1071410747
}
1071510748
1071610749
.emotion-67[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
@@ -645,6 +645,9 @@ exports[`EstimateCost - Region > render region component 1`] = `
645645
background: #ffffff;
646646
border-radius: 0.25rem;
647647
width: 100%;
648+
-webkit-align-content: center;
649+
-ms-flex-line-pack: center;
650+
align-content: center;
648651
}
649652
650653
.emotion-63[data-size='small'] {

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ exports[`EstimateCost - Regular Item > render basic props 1`] = `
628628
background: #ffffff;
629629
border-radius: 0.25rem;
630630
width: 100%;
631+
-webkit-align-content: center;
632+
-ms-flex-line-pack: center;
633+
align-content: center;
631634
}
632635
633636
.emotion-60[data-size='small'] {
@@ -1760,6 +1763,9 @@ exports[`EstimateCost - Regular Item > render basic props with is not defined 1`
17601763
background: #ffffff;
17611764
border-radius: 0.25rem;
17621765
width: 100%;
1766+
-webkit-align-content: center;
1767+
-ms-flex-line-pack: center;
1768+
align-content: center;
17631769
}
17641770
17651771
.emotion-58[data-size='small'] {
@@ -2884,6 +2890,9 @@ exports[`EstimateCost - Regular Item > render basic props with long fractions di
28842890
background: #ffffff;
28852891
border-radius: 0.25rem;
28862892
width: 100%;
2893+
-webkit-align-content: center;
2894+
-ms-flex-line-pack: center;
2895+
align-content: center;
28872896
}
28882897
28892898
.emotion-60[data-size='small'] {
@@ -4031,6 +4040,9 @@ exports[`EstimateCost - Regular Item > render basic props with maxPrice 1`] = `
40314040
background: #ffffff;
40324041
border-radius: 0.25rem;
40334042
width: 100%;
4043+
-webkit-align-content: center;
4044+
-ms-flex-line-pack: center;
4045+
align-content: center;
40344046
}
40354047
40364048
.emotion-60[data-size='small'] {
@@ -5187,6 +5199,9 @@ exports[`EstimateCost - Regular Item > render basic props with maxPrice and long
51875199
background: #ffffff;
51885200
border-radius: 0.25rem;
51895201
width: 100%;
5202+
-webkit-align-content: center;
5203+
-ms-flex-line-pack: center;
5204+
align-content: center;
51905205
}
51915206
51925207
.emotion-60[data-size='small'] {
@@ -6374,6 +6389,9 @@ exports[`EstimateCost - Regular Item > render basic props with overlay 1`] = `
63746389
background: #ffffff;
63756390
border-radius: 0.25rem;
63766391
width: 100%;
6392+
-webkit-align-content: center;
6393+
-ms-flex-line-pack: center;
6394+
align-content: center;
63776395
}
63786396
63796397
.emotion-78[data-size='small'] {
@@ -7698,6 +7716,9 @@ exports[`EstimateCost - Regular Item > render basic props with overlay beta 1`]
76987716
background: #ffffff;
76997717
border-radius: 0.25rem;
77007718
width: 100%;
7719+
-webkit-align-content: center;
7720+
-ms-flex-line-pack: center;
7721+
align-content: center;
77017722
}
77027723
77037724
.emotion-68[data-size='small'] {
@@ -8909,6 +8930,9 @@ exports[`EstimateCost - Regular Item > render basic props with sublabel 1`] = `
89098930
background: #ffffff;
89108931
border-radius: 0.25rem;
89118932
width: 100%;
8933+
-webkit-align-content: center;
8934+
-ms-flex-line-pack: center;
8935+
align-content: center;
89128936
}
89138937
89148938
.emotion-60[data-size='small'] {
@@ -10065,6 +10089,9 @@ exports[`EstimateCost - Regular Item > render basic props with textNotDefined 1`
1006510089
background: #ffffff;
1006610090
border-radius: 0.25rem;
1006710091
width: 100%;
10092+
-webkit-align-content: center;
10093+
-ms-flex-line-pack: center;
10094+
align-content: center;
1006810095
}
1006910096
1007010097
.emotion-60[data-size='small'] {
@@ -11216,6 +11243,9 @@ exports[`EstimateCost - Regular Item > render basic with ellipsis 1`] = `
1121611243
background: #ffffff;
1121711244
border-radius: 0.25rem;
1121811245
width: 100%;
11246+
-webkit-align-content: center;
11247+
-ms-flex-line-pack: center;
11248+
align-content: center;
1121911249
}
1122011250
1122111251
.emotion-62[data-size='small'] {
@@ -12492,6 +12522,9 @@ exports[`EstimateCost - Regular Item > render with alert 1`] = `
1249212522
background: #ffffff;
1249312523
border-radius: 0.25rem;
1249412524
width: 100%;
12525+
-webkit-align-content: center;
12526+
-ms-flex-line-pack: center;
12527+
align-content: center;
1249512528
}
1249612529
1249712530
.emotion-70[data-size='small'] {
@@ -13660,6 +13693,9 @@ exports[`EstimateCost - Regular Item > render with isDisabledOnOverlay 1`] = `
1366013693
background: #ffffff;
1366113694
border-radius: 0.25rem;
1366213695
width: 100%;
13696+
-webkit-align-content: center;
13697+
-ms-flex-line-pack: center;
13698+
align-content: center;
1366313699
}
1366413700
1366513701
.emotion-58[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
@@ -628,6 +628,9 @@ exports[`EstimateCost - NumberInput Item > render basic props 1`] = `
628628
background: #ffffff;
629629
border-radius: 0.25rem;
630630
width: 100%;
631+
-webkit-align-content: center;
632+
-ms-flex-line-pack: center;
633+
align-content: center;
631634
}
632635
633636
.emotion-62[data-size='small'] {
@@ -2055,6 +2058,9 @@ exports[`EstimateCost - NumberInput Item > render basic with overlay 1`] = `
20552058
background: #ffffff;
20562059
border-radius: 0.25rem;
20572060
width: 100%;
2061+
-webkit-align-content: center;
2062+
-ms-flex-line-pack: center;
2063+
align-content: center;
20582064
}
20592065
20602066
.emotion-62[data-size='small'] {
@@ -3482,6 +3488,9 @@ exports[`EstimateCost - NumberInput Item > render with getAmountValue 1`] = `
34823488
background: #ffffff;
34833489
border-radius: 0.25rem;
34843490
width: 100%;
3491+
-webkit-align-content: center;
3492+
-ms-flex-line-pack: center;
3493+
align-content: center;
34853494
}
34863495
34873496
.emotion-62[data-size='small'] {
@@ -4909,6 +4918,9 @@ exports[`EstimateCost - NumberInput Item > render with values 1`] = `
49094918
background: #ffffff;
49104919
border-radius: 0.25rem;
49114920
width: 100%;
4921+
-webkit-align-content: center;
4922+
-ms-flex-line-pack: center;
4923+
align-content: center;
49124924
}
49134925
49144926
.emotion-62[data-size='small'] {

0 commit comments

Comments
 (0)