Skip to content

Commit 83e1eb9

Browse files
committed
fix: onclickoutside selectinput
1 parent a9eaefb commit 83e1eb9

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
@@ -331,6 +331,9 @@ exports[`selectableCardOptionGroupField > should render correctly 1`] = `
331331
background: #ffffff;
332332
border-radius: 0.25rem;
333333
width: 100%;
334+
-webkit-align-content: center;
335+
-ms-flex-line-pack: center;
336+
align-content: center;
334337
}
335338
336339
.emotion-33[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
@@ -19,6 +19,9 @@ exports[`unitInputField > should handles onChange and selection 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'] {
@@ -262,6 +265,9 @@ exports[`unitInputField > should render correctly 1`] = `
262265
background: #ffffff;
263266
border-radius: 0.25rem;
264267
width: 100%;
268+
-webkit-align-content: center;
269+
-ms-flex-line-pack: center;
270+
align-content: center;
265271
}
266272
267273
.emotion-2[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'] {
@@ -2066,6 +2072,9 @@ exports[`estimateCost - Item > render with noPrice and noBorder 1`] = `
20662072
background: #ffffff;
20672073
border-radius: 0.25rem;
20682074
width: 100%;
2075+
-webkit-align-content: center;
2076+
-ms-flex-line-pack: center;
2077+
align-content: center;
20692078
}
20702079
20712080
.emotion-43[data-size='small'] {
@@ -3456,6 +3465,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
34563465
background: #ffffff;
34573466
border-radius: 0.25rem;
34583467
width: 100%;
3468+
-webkit-align-content: center;
3469+
-ms-flex-line-pack: center;
3470+
align-content: center;
34593471
}
34603472
34613473
.emotion-45[data-size='small'] {
@@ -3549,6 +3561,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
35493561
background: #ffffff;
35503562
border-radius: 0.25rem;
35513563
width: 100%;
3564+
-webkit-align-content: center;
3565+
-ms-flex-line-pack: center;
3566+
align-content: center;
35523567
}
35533568
35543569
.emotion-45[data-size='small'] {
@@ -5076,6 +5091,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
50765091
background: #ffffff;
50775092
border-radius: 0.25rem;
50785093
width: 100%;
5094+
-webkit-align-content: center;
5095+
-ms-flex-line-pack: center;
5096+
align-content: center;
50795097
}
50805098
50815099
.emotion-43[data-size='small'] {
@@ -5169,6 +5187,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
51695187
background: #ffffff;
51705188
border-radius: 0.25rem;
51715189
width: 100%;
5190+
-webkit-align-content: center;
5191+
-ms-flex-line-pack: center;
5192+
align-content: center;
51725193
}
51735194
51745195
.emotion-43[data-size='small'] {
@@ -6678,6 +6699,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
66786699
background: #ffffff;
66796700
border-radius: 0.25rem;
66806701
width: 100%;
6702+
-webkit-align-content: center;
6703+
-ms-flex-line-pack: center;
6704+
align-content: center;
66816705
}
66826706
66836707
.emotion-43[data-size='small'] {
@@ -6771,6 +6795,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
67716795
background: #ffffff;
67726796
border-radius: 0.25rem;
67736797
width: 100%;
6798+
-webkit-align-content: center;
6799+
-ms-flex-line-pack: center;
6800+
align-content: center;
67746801
}
67756802
67766803
.emotion-43[data-size='small'] {
@@ -8284,6 +8311,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
82848311
background: #ffffff;
82858312
border-radius: 0.25rem;
82868313
width: 100%;
8314+
-webkit-align-content: center;
8315+
-ms-flex-line-pack: center;
8316+
align-content: center;
82878317
}
82888318
82898319
.emotion-45[data-size='small'] {
@@ -8377,6 +8407,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
83778407
background: #ffffff;
83788408
border-radius: 0.25rem;
83798409
width: 100%;
8410+
-webkit-align-content: center;
8411+
-ms-flex-line-pack: center;
8412+
align-content: center;
83808413
}
83818414
83828415
.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'] {
@@ -1614,6 +1617,9 @@ exports[`estimateCost - NumberInput Item > render basic with overlay 1`] = `
16141617
background: #ffffff;
16151618
border-radius: 0.25rem;
16161619
width: 100%;
1620+
-webkit-align-content: center;
1621+
-ms-flex-line-pack: center;
1622+
align-content: center;
16171623
}
16181624
16191625
.emotion-44[data-size='small'] {
@@ -2784,6 +2790,9 @@ exports[`estimateCost - NumberInput Item > render with getAmountValue 1`] = `
27842790
background: #ffffff;
27852791
border-radius: 0.25rem;
27862792
width: 100%;
2793+
-webkit-align-content: center;
2794+
-ms-flex-line-pack: center;
2795+
align-content: center;
27872796
}
27882797
27892798
.emotion-44[data-size='small'] {
@@ -3954,6 +3963,9 @@ exports[`estimateCost - NumberInput Item > render with values 1`] = `
39543963
background: #ffffff;
39553964
border-radius: 0.25rem;
39563965
width: 100%;
3966+
-webkit-align-content: center;
3967+
-ms-flex-line-pack: center;
3968+
align-content: center;
39573969
}
39583970
39593971
.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
@@ -239,6 +239,9 @@ exports[`estimateCost - Strong Item > render basic props 1`] = `
239239
background: #ffffff;
240240
border-radius: 0.25rem;
241241
width: 100%;
242+
-webkit-align-content: center;
243+
-ms-flex-line-pack: center;
244+
align-content: center;
242245
}
243246
244247
.emotion-36[data-size='small'] {
@@ -949,6 +952,9 @@ exports[`estimateCost - Strong Item > render with isDisabledOnOverlay 1`] = `
949952
background: #ffffff;
950953
border-radius: 0.25rem;
951954
width: 100%;
955+
-webkit-align-content: center;
956+
-ms-flex-line-pack: center;
957+
align-content: center;
952958
}
953959
954960
.emotion-33[data-size='small'] {
@@ -1680,6 +1686,9 @@ exports[`estimateCost - Strong Item > render with small variant 1`] = `
16801686
background: #ffffff;
16811687
border-radius: 0.25rem;
16821688
width: 100%;
1689+
-webkit-align-content: center;
1690+
-ms-flex-line-pack: center;
1691+
align-content: center;
16831692
}
16841693
16851694
.emotion-36[data-size='small'] {

0 commit comments

Comments
 (0)