Skip to content

Commit 5a1ee29

Browse files
committed
fix: onclickoutside selectinput
1 parent d1d09cc commit 5a1ee29

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
@@ -64,6 +64,9 @@ exports[`selectableCardOptionGroupField > should render correctly 1`] = `
6464
background: #ffffff;
6565
border-radius: 0.25rem;
6666
width: 100%;
67+
-webkit-align-content: center;
68+
-ms-flex-line-pack: center;
69+
align-content: center;
6770
}
6871
6972
.emotion-13[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'] {
@@ -248,6 +251,9 @@ exports[`unitInputField > should render correctly 1`] = `
248251
background: #ffffff;
249252
border-radius: 0.25rem;
250253
width: 100%;
254+
-webkit-align-content: center;
255+
-ms-flex-line-pack: center;
256+
align-content: center;
251257
}
252258
253259
.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
@@ -19,6 +19,9 @@ exports[`estimateCost - CustomUnitInput > render default values 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'] {

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
@@ -463,6 +463,9 @@ exports[`estimateCost - Item > render with labelTextVariant 1`] = `
463463
background: #ffffff;
464464
border-radius: 0.25rem;
465465
width: 100%;
466+
-webkit-align-content: center;
467+
-ms-flex-line-pack: center;
468+
align-content: center;
466469
}
467470
468471
.emotion-36[data-size='small'] {
@@ -556,6 +559,9 @@ exports[`estimateCost - Item > render with labelTextVariant 1`] = `
556559
background: #ffffff;
557560
border-radius: 0.25rem;
558561
width: 100%;
562+
-webkit-align-content: center;
563+
-ms-flex-line-pack: center;
564+
align-content: center;
559565
}
560566
561567
.emotion-36[data-size='small'] {
@@ -1414,6 +1420,9 @@ exports[`estimateCost - Item > render with noPrice and noBorder 1`] = `
14141420
background: #ffffff;
14151421
border-radius: 0.25rem;
14161422
width: 100%;
1423+
-webkit-align-content: center;
1424+
-ms-flex-line-pack: center;
1425+
align-content: center;
14171426
}
14181427
14191428
.emotion-36[data-size='small'] {
@@ -2369,6 +2378,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
23692378
background: #ffffff;
23702379
border-radius: 0.25rem;
23712380
width: 100%;
2381+
-webkit-align-content: center;
2382+
-ms-flex-line-pack: center;
2383+
align-content: center;
23722384
}
23732385
23742386
.emotion-38[data-size='small'] {
@@ -2462,6 +2474,9 @@ exports[`estimateCost - Item > render with notice 1`] = `
24622474
background: #ffffff;
24632475
border-radius: 0.25rem;
24642476
width: 100%;
2477+
-webkit-align-content: center;
2478+
-ms-flex-line-pack: center;
2479+
align-content: center;
24652480
}
24662481
24672482
.emotion-38[data-size='small'] {
@@ -3554,6 +3569,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
35543569
background: #ffffff;
35553570
border-radius: 0.25rem;
35563571
width: 100%;
3572+
-webkit-align-content: center;
3573+
-ms-flex-line-pack: center;
3574+
align-content: center;
35573575
}
35583576
35593577
.emotion-36[data-size='small'] {
@@ -3647,6 +3665,9 @@ exports[`estimateCost - Item > render with priceText 1`] = `
36473665
background: #ffffff;
36483666
border-radius: 0.25rem;
36493667
width: 100%;
3668+
-webkit-align-content: center;
3669+
-ms-flex-line-pack: center;
3670+
align-content: center;
36503671
}
36513672
36523673
.emotion-36[data-size='small'] {
@@ -4721,6 +4742,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
47214742
background: #ffffff;
47224743
border-radius: 0.25rem;
47234744
width: 100%;
4745+
-webkit-align-content: center;
4746+
-ms-flex-line-pack: center;
4747+
align-content: center;
47244748
}
47254749
47264750
.emotion-36[data-size='small'] {
@@ -4814,6 +4838,9 @@ exports[`estimateCost - Item > render with tabulation 1`] = `
48144838
background: #ffffff;
48154839
border-radius: 0.25rem;
48164840
width: 100%;
4841+
-webkit-align-content: center;
4842+
-ms-flex-line-pack: center;
4843+
align-content: center;
48174844
}
48184845
48194846
.emotion-36[data-size='small'] {
@@ -5892,6 +5919,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
58925919
background: #ffffff;
58935920
border-radius: 0.25rem;
58945921
width: 100%;
5922+
-webkit-align-content: center;
5923+
-ms-flex-line-pack: center;
5924+
align-content: center;
58955925
}
58965926
58975927
.emotion-38[data-size='small'] {
@@ -5985,6 +6015,9 @@ exports[`estimateCost - Item > render with tooltipInfo 1`] = `
59856015
background: #ffffff;
59866016
border-radius: 0.25rem;
59876017
width: 100%;
6018+
-webkit-align-content: center;
6019+
-ms-flex-line-pack: center;
6020+
align-content: center;
59886021
}
59896022
59906023
.emotion-38[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
@@ -244,6 +244,9 @@ exports[`estimateCost - Region > render region component 1`] = `
244244
background: #ffffff;
245245
border-radius: 0.25rem;
246246
width: 100%;
247+
-webkit-align-content: center;
248+
-ms-flex-line-pack: center;
249+
align-content: center;
247250
}
248251
249252
.emotion-38[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
@@ -227,6 +227,9 @@ exports[`estimateCost - NumberInput Item > render basic props 1`] = `
227227
background: #ffffff;
228228
border-radius: 0.25rem;
229229
width: 100%;
230+
-webkit-align-content: center;
231+
-ms-flex-line-pack: center;
232+
align-content: center;
230233
}
231234
232235
.emotion-37[data-size='small'] {
@@ -992,6 +995,9 @@ exports[`estimateCost - NumberInput Item > render basic with overlay 1`] = `
992995
background: #ffffff;
993996
border-radius: 0.25rem;
994997
width: 100%;
998+
-webkit-align-content: center;
999+
-ms-flex-line-pack: center;
1000+
align-content: center;
9951001
}
9961002
9971003
.emotion-37[data-size='small'] {
@@ -1757,6 +1763,9 @@ exports[`estimateCost - NumberInput Item > render with getAmountValue 1`] = `
17571763
background: #ffffff;
17581764
border-radius: 0.25rem;
17591765
width: 100%;
1766+
-webkit-align-content: center;
1767+
-ms-flex-line-pack: center;
1768+
align-content: center;
17601769
}
17611770
17621771
.emotion-37[data-size='small'] {
@@ -2522,6 +2531,9 @@ exports[`estimateCost - NumberInput Item > render with values 1`] = `
25222531
background: #ffffff;
25232532
border-radius: 0.25rem;
25242533
width: 100%;
2534+
-webkit-align-content: center;
2535+
-ms-flex-line-pack: center;
2536+
align-content: center;
25252537
}
25262538
25272539
.emotion-37[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)