Skip to content

Commit 0f82f61

Browse files
committed
fix: onclickoutside selectinput
1 parent 4a0764e commit 0f82f61

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
@@ -42,6 +42,9 @@ exports[`SelectInputField > should display right value on grouped options 1`] =
4242
background: #ffffff;
4343
border-radius: 0.25rem;
4444
width: 100%;
45+
-webkit-align-content: center;
46+
-ms-flex-line-pack: center;
47+
align-content: center;
4548
}
4649
4750
.emotion-4[data-size='small'] {
@@ -817,6 +820,9 @@ exports[`SelectInputField > should render correctly 1`] = `
817820
background: #ffffff;
818821
border-radius: 0.25rem;
819822
width: 100%;
823+
-webkit-align-content: center;
824+
-ms-flex-line-pack: center;
825+
align-content: center;
820826
}
821827
822828
.emotion-4[data-size='small'] {
@@ -1055,6 +1061,9 @@ exports[`SelectInputField > should render correctly disabled 1`] = `
10551061
background: #ffffff;
10561062
border-radius: 0.25rem;
10571063
width: 100%;
1064+
-webkit-align-content: center;
1065+
-ms-flex-line-pack: center;
1066+
align-content: center;
10581067
}
10591068
10601069
.emotion-4[data-size='small'] {
@@ -1293,6 +1302,9 @@ exports[`SelectInputField > should render correctly grouped 1`] = `
12931302
background: #ffffff;
12941303
border-radius: 0.25rem;
12951304
width: 100%;
1305+
-webkit-align-content: center;
1306+
-ms-flex-line-pack: center;
1307+
align-content: center;
12961308
}
12971309
12981310
.emotion-4[data-size='small'] {
@@ -1531,6 +1543,9 @@ exports[`SelectInputField > should render correctly multiselect 1`] = `
15311543
background: #ffffff;
15321544
border-radius: 0.25rem;
15331545
width: 100%;
1546+
-webkit-align-content: center;
1547+
-ms-flex-line-pack: center;
1548+
align-content: center;
15341549
}
15351550
15361551
.emotion-4[data-size='small'] {
@@ -1769,6 +1784,9 @@ exports[`SelectInputField > should trigger events 1`] = `
17691784
background: #ffffff;
17701785
border-radius: 0.25rem;
17711786
width: 100%;
1787+
-webkit-align-content: center;
1788+
-ms-flex-line-pack: center;
1789+
align-content: center;
17721790
}
17731791
17741792
.emotion-4[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
@@ -551,6 +551,9 @@ exports[`SelectableCardOptionGroupField > should render correctly 1`] = `
551551
background: #ffffff;
552552
border-radius: 0.25rem;
553553
width: 100%;
554+
-webkit-align-content: center;
555+
-ms-flex-line-pack: center;
556+
align-content: center;
554557
}
555558
556559
.emotion-43[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
@@ -296,6 +296,9 @@ exports[`UnitInputField > should handles onChange and selection 1`] = `
296296
background: #ffffff;
297297
border-radius: 0.25rem;
298298
width: 100%;
299+
-webkit-align-content: center;
300+
-ms-flex-line-pack: center;
301+
align-content: center;
299302
}
300303
301304
.emotion-18[data-size='small'] {
@@ -812,6 +815,9 @@ exports[`UnitInputField > should render correctly 1`] = `
812815
background: #ffffff;
813816
border-radius: 0.25rem;
814817
width: 100%;
818+
-webkit-align-content: center;
819+
-ms-flex-line-pack: center;
820+
align-content: center;
815821
}
816822
817823
.emotion-16[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
@@ -293,6 +293,9 @@ exports[`EstimateCost - CustomUnitInput > render default values 1`] = `
293293
background: #ffffff;
294294
border-radius: 0.25rem;
295295
width: 100%;
296+
-webkit-align-content: center;
297+
-ms-flex-line-pack: center;
298+
align-content: center;
296299
}
297300
298301
.emotion-14[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
@@ -1241,6 +1241,9 @@ exports[`EstimateCost - Item > render with labelTextVariant 1`] = `
12411241
background: #ffffff;
12421242
border-radius: 0.25rem;
12431243
width: 100%;
1244+
-webkit-align-content: center;
1245+
-ms-flex-line-pack: center;
1246+
align-content: center;
12441247
}
12451248
12461249
.emotion-59[data-size='small'] {
@@ -1334,6 +1337,9 @@ exports[`EstimateCost - Item > render with labelTextVariant 1`] = `
13341337
background: #ffffff;
13351338
border-radius: 0.25rem;
13361339
width: 100%;
1340+
-webkit-align-content: center;
1341+
-ms-flex-line-pack: center;
1342+
align-content: center;
13371343
}
13381344
13391345
.emotion-59[data-size='small'] {
@@ -2647,6 +2653,9 @@ exports[`EstimateCost - Item > render with noPrice and noBorder 1`] = `
26472653
background: #ffffff;
26482654
border-radius: 0.25rem;
26492655
width: 100%;
2656+
-webkit-align-content: center;
2657+
-ms-flex-line-pack: center;
2658+
align-content: center;
26502659
}
26512660
26522661
.emotion-59[data-size='small'] {
@@ -4412,6 +4421,9 @@ exports[`EstimateCost - Item > render with notice 1`] = `
44124421
background: #ffffff;
44134422
border-radius: 0.25rem;
44144423
width: 100%;
4424+
-webkit-align-content: center;
4425+
-ms-flex-line-pack: center;
4426+
align-content: center;
44154427
}
44164428
44174429
.emotion-61[data-size='small'] {
@@ -4505,6 +4517,9 @@ exports[`EstimateCost - Item > render with notice 1`] = `
45054517
background: #ffffff;
45064518
border-radius: 0.25rem;
45074519
width: 100%;
4520+
-webkit-align-content: center;
4521+
-ms-flex-line-pack: center;
4522+
align-content: center;
45084523
}
45094524
45104525
.emotion-61[data-size='small'] {
@@ -6441,6 +6456,9 @@ exports[`EstimateCost - Item > render with priceText 1`] = `
64416456
background: #ffffff;
64426457
border-radius: 0.25rem;
64436458
width: 100%;
6459+
-webkit-align-content: center;
6460+
-ms-flex-line-pack: center;
6461+
align-content: center;
64446462
}
64456463
64466464
.emotion-59[data-size='small'] {
@@ -6534,6 +6552,9 @@ exports[`EstimateCost - Item > render with priceText 1`] = `
65346552
background: #ffffff;
65356553
border-radius: 0.25rem;
65366554
width: 100%;
6555+
-webkit-align-content: center;
6556+
-ms-flex-line-pack: center;
6557+
align-content: center;
65376558
}
65386559
65396560
.emotion-59[data-size='small'] {
@@ -8452,6 +8473,9 @@ exports[`EstimateCost - Item > render with tabulation 1`] = `
84528473
background: #ffffff;
84538474
border-radius: 0.25rem;
84548475
width: 100%;
8476+
-webkit-align-content: center;
8477+
-ms-flex-line-pack: center;
8478+
align-content: center;
84558479
}
84568480
84578481
.emotion-59[data-size='small'] {
@@ -8545,6 +8569,9 @@ exports[`EstimateCost - Item > render with tabulation 1`] = `
85458569
background: #ffffff;
85468570
border-radius: 0.25rem;
85478571
width: 100%;
8572+
-webkit-align-content: center;
8573+
-ms-flex-line-pack: center;
8574+
align-content: center;
85488575
}
85498576
85508577
.emotion-59[data-size='small'] {
@@ -10481,6 +10508,9 @@ exports[`EstimateCost - Item > render with tooltipInfo 1`] = `
1048110508
background: #ffffff;
1048210509
border-radius: 0.25rem;
1048310510
width: 100%;
10511+
-webkit-align-content: center;
10512+
-ms-flex-line-pack: center;
10513+
align-content: center;
1048410514
}
1048510515
1048610516
.emotion-63[data-size='small'] {
@@ -10574,6 +10604,9 @@ exports[`EstimateCost - Item > render with tooltipInfo 1`] = `
1057410604
background: #ffffff;
1057510605
border-radius: 0.25rem;
1057610606
width: 100%;
10607+
-webkit-align-content: center;
10608+
-ms-flex-line-pack: center;
10609+
align-content: center;
1057710610
}
1057810611
1057910612
.emotion-63[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
@@ -633,6 +633,9 @@ exports[`EstimateCost - Region > render region component 1`] = `
633633
background: #ffffff;
634634
border-radius: 0.25rem;
635635
width: 100%;
636+
-webkit-align-content: center;
637+
-ms-flex-line-pack: center;
638+
align-content: center;
636639
}
637640
638641
.emotion-61[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
@@ -616,6 +616,9 @@ exports[`EstimateCost - Regular Item > render basic props 1`] = `
616616
background: #ffffff;
617617
border-radius: 0.25rem;
618618
width: 100%;
619+
-webkit-align-content: center;
620+
-ms-flex-line-pack: center;
621+
align-content: center;
619622
}
620623
621624
.emotion-58[data-size='small'] {
@@ -1735,6 +1738,9 @@ exports[`EstimateCost - Regular Item > render basic props with is not defined 1`
17351738
background: #ffffff;
17361739
border-radius: 0.25rem;
17371740
width: 100%;
1741+
-webkit-align-content: center;
1742+
-ms-flex-line-pack: center;
1743+
align-content: center;
17381744
}
17391745
17401746
.emotion-56[data-size='small'] {
@@ -2846,6 +2852,9 @@ exports[`EstimateCost - Regular Item > render basic props with long fractions di
28462852
background: #ffffff;
28472853
border-radius: 0.25rem;
28482854
width: 100%;
2855+
-webkit-align-content: center;
2856+
-ms-flex-line-pack: center;
2857+
align-content: center;
28492858
}
28502859
28512860
.emotion-58[data-size='small'] {
@@ -3980,6 +3989,9 @@ exports[`EstimateCost - Regular Item > render basic props with maxPrice 1`] = `
39803989
background: #ffffff;
39813990
border-radius: 0.25rem;
39823991
width: 100%;
3992+
-webkit-align-content: center;
3993+
-ms-flex-line-pack: center;
3994+
align-content: center;
39833995
}
39843996
39853997
.emotion-58[data-size='small'] {
@@ -5123,6 +5135,9 @@ exports[`EstimateCost - Regular Item > render basic props with maxPrice and long
51235135
background: #ffffff;
51245136
border-radius: 0.25rem;
51255137
width: 100%;
5138+
-webkit-align-content: center;
5139+
-ms-flex-line-pack: center;
5140+
align-content: center;
51265141
}
51275142
51285143
.emotion-58[data-size='small'] {
@@ -6297,6 +6312,9 @@ exports[`EstimateCost - Regular Item > render basic props with overlay 1`] = `
62976312
background: #ffffff;
62986313
border-radius: 0.25rem;
62996314
width: 100%;
6315+
-webkit-align-content: center;
6316+
-ms-flex-line-pack: center;
6317+
align-content: center;
63006318
}
63016319
63026320
.emotion-76[data-size='small'] {
@@ -7608,6 +7626,9 @@ exports[`EstimateCost - Regular Item > render basic props with overlay beta 1`]
76087626
background: #ffffff;
76097627
border-radius: 0.25rem;
76107628
width: 100%;
7629+
-webkit-align-content: center;
7630+
-ms-flex-line-pack: center;
7631+
align-content: center;
76117632
}
76127633
76137634
.emotion-66[data-size='small'] {
@@ -8806,6 +8827,9 @@ exports[`EstimateCost - Regular Item > render basic props with sublabel 1`] = `
88068827
background: #ffffff;
88078828
border-radius: 0.25rem;
88088829
width: 100%;
8830+
-webkit-align-content: center;
8831+
-ms-flex-line-pack: center;
8832+
align-content: center;
88098833
}
88108834
88118835
.emotion-58[data-size='small'] {
@@ -9949,6 +9973,9 @@ exports[`EstimateCost - Regular Item > render basic props with textNotDefined 1`
99499973
background: #ffffff;
99509974
border-radius: 0.25rem;
99519975
width: 100%;
9976+
-webkit-align-content: center;
9977+
-ms-flex-line-pack: center;
9978+
align-content: center;
99529979
}
99539980
99549981
.emotion-58[data-size='small'] {
@@ -11087,6 +11114,9 @@ exports[`EstimateCost - Regular Item > render basic with ellipsis 1`] = `
1108711114
background: #ffffff;
1108811115
border-radius: 0.25rem;
1108911116
width: 100%;
11117+
-webkit-align-content: center;
11118+
-ms-flex-line-pack: center;
11119+
align-content: center;
1109011120
}
1109111121
1109211122
.emotion-60[data-size='small'] {
@@ -12350,6 +12380,9 @@ exports[`EstimateCost - Regular Item > render with alert 1`] = `
1235012380
background: #ffffff;
1235112381
border-radius: 0.25rem;
1235212382
width: 100%;
12383+
-webkit-align-content: center;
12384+
-ms-flex-line-pack: center;
12385+
align-content: center;
1235312386
}
1235412387
1235512388
.emotion-68[data-size='small'] {
@@ -13505,6 +13538,9 @@ exports[`EstimateCost - Regular Item > render with isDisabledOnOverlay 1`] = `
1350513538
background: #ffffff;
1350613539
border-radius: 0.25rem;
1350713540
width: 100%;
13541+
-webkit-align-content: center;
13542+
-ms-flex-line-pack: center;
13543+
align-content: center;
1350813544
}
1350913545
1351013546
.emotion-56[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
@@ -616,6 +616,9 @@ exports[`EstimateCost - NumberInput Item > render basic props 1`] = `
616616
background: #ffffff;
617617
border-radius: 0.25rem;
618618
width: 100%;
619+
-webkit-align-content: center;
620+
-ms-flex-line-pack: center;
621+
align-content: center;
619622
}
620623
621624
.emotion-60[data-size='small'] {
@@ -2030,6 +2033,9 @@ exports[`EstimateCost - NumberInput Item > render basic with overlay 1`] = `
20302033
background: #ffffff;
20312034
border-radius: 0.25rem;
20322035
width: 100%;
2036+
-webkit-align-content: center;
2037+
-ms-flex-line-pack: center;
2038+
align-content: center;
20332039
}
20342040
20352041
.emotion-60[data-size='small'] {
@@ -3444,6 +3450,9 @@ exports[`EstimateCost - NumberInput Item > render with getAmountValue 1`] = `
34443450
background: #ffffff;
34453451
border-radius: 0.25rem;
34463452
width: 100%;
3453+
-webkit-align-content: center;
3454+
-ms-flex-line-pack: center;
3455+
align-content: center;
34473456
}
34483457
34493458
.emotion-60[data-size='small'] {
@@ -4858,6 +4867,9 @@ exports[`EstimateCost - NumberInput Item > render with values 1`] = `
48584867
background: #ffffff;
48594868
border-radius: 0.25rem;
48604869
width: 100%;
4870+
-webkit-align-content: center;
4871+
-ms-flex-line-pack: center;
4872+
align-content: center;
48614873
}
48624874
48634875
.emotion-60[data-size='small'] {

0 commit comments

Comments
 (0)