@x-plat/design-system 0.14.13 → 0.14.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Dropdown/index.cjs +7 -6
- package/dist/components/Dropdown/index.css +2 -2
- package/dist/components/Dropdown/index.js +7 -6
- package/dist/components/PopOver/index.cjs +7 -6
- package/dist/components/PopOver/index.js +7 -6
- package/dist/components/Select/index.cjs +7 -6
- package/dist/components/Select/index.css +4 -4
- package/dist/components/Select/index.js +7 -6
- package/dist/components/TimePicker/index.cjs +7 -6
- package/dist/components/TimePicker/index.js +7 -6
- package/dist/components/index.cjs +7 -6
- package/dist/components/index.css +6 -6
- package/dist/components/index.js +7 -6
- package/dist/index.cjs +7 -6
- package/dist/index.css +6 -6
- package/dist/index.js +7 -6
- package/package.json +1 -1
|
@@ -55,26 +55,27 @@ var findScrollParent = (el) => {
|
|
|
55
55
|
}
|
|
56
56
|
return null;
|
|
57
57
|
};
|
|
58
|
+
var TRIGGER_GAP = 8;
|
|
58
59
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
59
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
60
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
60
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
61
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
61
62
|
let direction;
|
|
62
63
|
let top;
|
|
63
64
|
let maxHeight = null;
|
|
64
65
|
if (popH <= roomBelow) {
|
|
65
66
|
direction = "bottom";
|
|
66
|
-
top = triggerRect.bottom;
|
|
67
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
67
68
|
} else if (popH <= roomAbove) {
|
|
68
69
|
direction = "top";
|
|
69
|
-
top = triggerRect.top - popH;
|
|
70
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
70
71
|
} else {
|
|
71
72
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
72
73
|
if (roomBelow >= roomAbove) {
|
|
73
74
|
direction = "bottom";
|
|
74
|
-
top = triggerRect.bottom;
|
|
75
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
75
76
|
} else {
|
|
76
77
|
direction = "top";
|
|
77
|
-
top = triggerRect.top - room;
|
|
78
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
78
79
|
}
|
|
79
80
|
maxHeight = room;
|
|
80
81
|
}
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
box-shadow: var(--semantic-shadow-md);
|
|
20
20
|
padding: var(--spacing-space-1) 0;
|
|
21
21
|
opacity: 0;
|
|
22
|
-
transform: translateY(
|
|
22
|
+
transform: translateY(4px);
|
|
23
23
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
24
24
|
}
|
|
25
25
|
.lib-xplat-dropdown-menu.bottom {
|
|
26
|
-
transform: translateY(4px);
|
|
26
|
+
transform: translateY(-4px);
|
|
27
27
|
}
|
|
28
28
|
.lib-xplat-dropdown-menu.visible {
|
|
29
29
|
opacity: 1;
|
|
@@ -19,26 +19,27 @@ var findScrollParent = (el) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
|
+
var TRIGGER_GAP = 8;
|
|
22
23
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
23
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
24
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
24
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
25
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
25
26
|
let direction;
|
|
26
27
|
let top;
|
|
27
28
|
let maxHeight = null;
|
|
28
29
|
if (popH <= roomBelow) {
|
|
29
30
|
direction = "bottom";
|
|
30
|
-
top = triggerRect.bottom;
|
|
31
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
31
32
|
} else if (popH <= roomAbove) {
|
|
32
33
|
direction = "top";
|
|
33
|
-
top = triggerRect.top - popH;
|
|
34
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
34
35
|
} else {
|
|
35
36
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
36
37
|
if (roomBelow >= roomAbove) {
|
|
37
38
|
direction = "bottom";
|
|
38
|
-
top = triggerRect.bottom;
|
|
39
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
39
40
|
} else {
|
|
40
41
|
direction = "top";
|
|
41
|
-
top = triggerRect.top - room;
|
|
42
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
42
43
|
}
|
|
43
44
|
maxHeight = room;
|
|
44
45
|
}
|
|
@@ -55,26 +55,27 @@ var findScrollParent = (el) => {
|
|
|
55
55
|
}
|
|
56
56
|
return null;
|
|
57
57
|
};
|
|
58
|
+
var TRIGGER_GAP = 8;
|
|
58
59
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
59
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
60
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
60
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
61
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
61
62
|
let direction;
|
|
62
63
|
let top;
|
|
63
64
|
let maxHeight = null;
|
|
64
65
|
if (popH <= roomBelow) {
|
|
65
66
|
direction = "bottom";
|
|
66
|
-
top = triggerRect.bottom;
|
|
67
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
67
68
|
} else if (popH <= roomAbove) {
|
|
68
69
|
direction = "top";
|
|
69
|
-
top = triggerRect.top - popH;
|
|
70
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
70
71
|
} else {
|
|
71
72
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
72
73
|
if (roomBelow >= roomAbove) {
|
|
73
74
|
direction = "bottom";
|
|
74
|
-
top = triggerRect.bottom;
|
|
75
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
75
76
|
} else {
|
|
76
77
|
direction = "top";
|
|
77
|
-
top = triggerRect.top - room;
|
|
78
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
78
79
|
}
|
|
79
80
|
maxHeight = room;
|
|
80
81
|
}
|
|
@@ -19,26 +19,27 @@ var findScrollParent = (el) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
|
+
var TRIGGER_GAP = 8;
|
|
22
23
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
23
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
24
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
24
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
25
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
25
26
|
let direction;
|
|
26
27
|
let top;
|
|
27
28
|
let maxHeight = null;
|
|
28
29
|
if (popH <= roomBelow) {
|
|
29
30
|
direction = "bottom";
|
|
30
|
-
top = triggerRect.bottom;
|
|
31
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
31
32
|
} else if (popH <= roomAbove) {
|
|
32
33
|
direction = "top";
|
|
33
|
-
top = triggerRect.top - popH;
|
|
34
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
34
35
|
} else {
|
|
35
36
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
36
37
|
if (roomBelow >= roomAbove) {
|
|
37
38
|
direction = "bottom";
|
|
38
|
-
top = triggerRect.bottom;
|
|
39
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
39
40
|
} else {
|
|
40
41
|
direction = "top";
|
|
41
|
-
top = triggerRect.top - room;
|
|
42
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
42
43
|
}
|
|
43
44
|
maxHeight = room;
|
|
44
45
|
}
|
|
@@ -56,26 +56,27 @@ var findScrollParent = (el) => {
|
|
|
56
56
|
}
|
|
57
57
|
return null;
|
|
58
58
|
};
|
|
59
|
+
var TRIGGER_GAP = 8;
|
|
59
60
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
60
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
61
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
61
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
62
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
62
63
|
let direction;
|
|
63
64
|
let top;
|
|
64
65
|
let maxHeight = null;
|
|
65
66
|
if (popH <= roomBelow) {
|
|
66
67
|
direction = "bottom";
|
|
67
|
-
top = triggerRect.bottom;
|
|
68
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
68
69
|
} else if (popH <= roomAbove) {
|
|
69
70
|
direction = "top";
|
|
70
|
-
top = triggerRect.top - popH;
|
|
71
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
71
72
|
} else {
|
|
72
73
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
73
74
|
if (roomBelow >= roomAbove) {
|
|
74
75
|
direction = "bottom";
|
|
75
|
-
top = triggerRect.bottom;
|
|
76
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
76
77
|
} else {
|
|
77
78
|
direction = "top";
|
|
78
|
-
top = triggerRect.top - room;
|
|
79
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
79
80
|
}
|
|
80
81
|
maxHeight = room;
|
|
81
82
|
}
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
213
213
|
}
|
|
214
214
|
.lib-xplat-select-content.bottom {
|
|
215
|
-
transform: translateY(
|
|
215
|
+
transform: translateY(-4px);
|
|
216
216
|
}
|
|
217
217
|
.lib-xplat-select-content.bottom.visible {
|
|
218
218
|
opacity: 1;
|
|
@@ -220,12 +220,12 @@
|
|
|
220
220
|
}
|
|
221
221
|
.lib-xplat-select-content.bottom.exit {
|
|
222
222
|
opacity: 0;
|
|
223
|
-
transform: translateY(
|
|
223
|
+
transform: translateY(-4px);
|
|
224
224
|
}
|
|
225
225
|
.lib-xplat-select-content {
|
|
226
226
|
}
|
|
227
227
|
.lib-xplat-select-content.top {
|
|
228
|
-
transform: translateY(
|
|
228
|
+
transform: translateY(4px);
|
|
229
229
|
}
|
|
230
230
|
.lib-xplat-select-content.top.visible {
|
|
231
231
|
opacity: 1;
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
}
|
|
234
234
|
.lib-xplat-select-content.top.exit {
|
|
235
235
|
opacity: 0;
|
|
236
|
-
transform: translateY(
|
|
236
|
+
transform: translateY(4px);
|
|
237
237
|
}
|
|
238
238
|
.lib-xplat-select-content.sm .select-item {
|
|
239
239
|
padding: var(--spacing-space-2) var(--spacing-space-2);
|
|
@@ -19,26 +19,27 @@ var findScrollParent = (el) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
|
+
var TRIGGER_GAP = 8;
|
|
22
23
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
23
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
24
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
24
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
25
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
25
26
|
let direction;
|
|
26
27
|
let top;
|
|
27
28
|
let maxHeight = null;
|
|
28
29
|
if (popH <= roomBelow) {
|
|
29
30
|
direction = "bottom";
|
|
30
|
-
top = triggerRect.bottom;
|
|
31
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
31
32
|
} else if (popH <= roomAbove) {
|
|
32
33
|
direction = "top";
|
|
33
|
-
top = triggerRect.top - popH;
|
|
34
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
34
35
|
} else {
|
|
35
36
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
36
37
|
if (roomBelow >= roomAbove) {
|
|
37
38
|
direction = "bottom";
|
|
38
|
-
top = triggerRect.bottom;
|
|
39
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
39
40
|
} else {
|
|
40
41
|
direction = "top";
|
|
41
|
-
top = triggerRect.top - room;
|
|
42
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
42
43
|
}
|
|
43
44
|
maxHeight = room;
|
|
44
45
|
}
|
|
@@ -55,26 +55,27 @@ var findScrollParent = (el) => {
|
|
|
55
55
|
}
|
|
56
56
|
return null;
|
|
57
57
|
};
|
|
58
|
+
var TRIGGER_GAP = 8;
|
|
58
59
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
59
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
60
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
60
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
61
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
61
62
|
let direction;
|
|
62
63
|
let top;
|
|
63
64
|
let maxHeight = null;
|
|
64
65
|
if (popH <= roomBelow) {
|
|
65
66
|
direction = "bottom";
|
|
66
|
-
top = triggerRect.bottom;
|
|
67
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
67
68
|
} else if (popH <= roomAbove) {
|
|
68
69
|
direction = "top";
|
|
69
|
-
top = triggerRect.top - popH;
|
|
70
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
70
71
|
} else {
|
|
71
72
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
72
73
|
if (roomBelow >= roomAbove) {
|
|
73
74
|
direction = "bottom";
|
|
74
|
-
top = triggerRect.bottom;
|
|
75
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
75
76
|
} else {
|
|
76
77
|
direction = "top";
|
|
77
|
-
top = triggerRect.top - room;
|
|
78
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
78
79
|
}
|
|
79
80
|
maxHeight = room;
|
|
80
81
|
}
|
|
@@ -19,26 +19,27 @@ var findScrollParent = (el) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
|
+
var TRIGGER_GAP = 8;
|
|
22
23
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
23
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
24
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
24
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
25
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
25
26
|
let direction;
|
|
26
27
|
let top;
|
|
27
28
|
let maxHeight = null;
|
|
28
29
|
if (popH <= roomBelow) {
|
|
29
30
|
direction = "bottom";
|
|
30
|
-
top = triggerRect.bottom;
|
|
31
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
31
32
|
} else if (popH <= roomAbove) {
|
|
32
33
|
direction = "top";
|
|
33
|
-
top = triggerRect.top - popH;
|
|
34
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
34
35
|
} else {
|
|
35
36
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
36
37
|
if (roomBelow >= roomAbove) {
|
|
37
38
|
direction = "bottom";
|
|
38
|
-
top = triggerRect.bottom;
|
|
39
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
39
40
|
} else {
|
|
40
41
|
direction = "top";
|
|
41
|
-
top = triggerRect.top - room;
|
|
42
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
42
43
|
}
|
|
43
44
|
maxHeight = room;
|
|
44
45
|
}
|
|
@@ -3999,26 +3999,27 @@ var findScrollParent = (el) => {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
return null;
|
|
4001
4001
|
};
|
|
4002
|
+
var TRIGGER_GAP = 8;
|
|
4002
4003
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
4003
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
4004
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
4004
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
4005
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
4005
4006
|
let direction;
|
|
4006
4007
|
let top;
|
|
4007
4008
|
let maxHeight = null;
|
|
4008
4009
|
if (popH <= roomBelow) {
|
|
4009
4010
|
direction = "bottom";
|
|
4010
|
-
top = triggerRect.bottom;
|
|
4011
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
4011
4012
|
} else if (popH <= roomAbove) {
|
|
4012
4013
|
direction = "top";
|
|
4013
|
-
top = triggerRect.top - popH;
|
|
4014
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
4014
4015
|
} else {
|
|
4015
4016
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
4016
4017
|
if (roomBelow >= roomAbove) {
|
|
4017
4018
|
direction = "bottom";
|
|
4018
|
-
top = triggerRect.bottom;
|
|
4019
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
4019
4020
|
} else {
|
|
4020
4021
|
direction = "top";
|
|
4021
|
-
top = triggerRect.top - room;
|
|
4022
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
4022
4023
|
}
|
|
4023
4024
|
maxHeight = room;
|
|
4024
4025
|
}
|
|
@@ -3282,11 +3282,11 @@
|
|
|
3282
3282
|
box-shadow: var(--semantic-shadow-md);
|
|
3283
3283
|
padding: var(--spacing-space-1) 0;
|
|
3284
3284
|
opacity: 0;
|
|
3285
|
-
transform: translateY(
|
|
3285
|
+
transform: translateY(4px);
|
|
3286
3286
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
3287
3287
|
}
|
|
3288
3288
|
.lib-xplat-dropdown-menu.bottom {
|
|
3289
|
-
transform: translateY(4px);
|
|
3289
|
+
transform: translateY(-4px);
|
|
3290
3290
|
}
|
|
3291
3291
|
.lib-xplat-dropdown-menu.visible {
|
|
3292
3292
|
opacity: 1;
|
|
@@ -4513,7 +4513,7 @@
|
|
|
4513
4513
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
4514
4514
|
}
|
|
4515
4515
|
.lib-xplat-select-content.bottom {
|
|
4516
|
-
transform: translateY(
|
|
4516
|
+
transform: translateY(-4px);
|
|
4517
4517
|
}
|
|
4518
4518
|
.lib-xplat-select-content.bottom.visible {
|
|
4519
4519
|
opacity: 1;
|
|
@@ -4521,12 +4521,12 @@
|
|
|
4521
4521
|
}
|
|
4522
4522
|
.lib-xplat-select-content.bottom.exit {
|
|
4523
4523
|
opacity: 0;
|
|
4524
|
-
transform: translateY(
|
|
4524
|
+
transform: translateY(-4px);
|
|
4525
4525
|
}
|
|
4526
4526
|
.lib-xplat-select-content {
|
|
4527
4527
|
}
|
|
4528
4528
|
.lib-xplat-select-content.top {
|
|
4529
|
-
transform: translateY(
|
|
4529
|
+
transform: translateY(4px);
|
|
4530
4530
|
}
|
|
4531
4531
|
.lib-xplat-select-content.top.visible {
|
|
4532
4532
|
opacity: 1;
|
|
@@ -4534,7 +4534,7 @@
|
|
|
4534
4534
|
}
|
|
4535
4535
|
.lib-xplat-select-content.top.exit {
|
|
4536
4536
|
opacity: 0;
|
|
4537
|
-
transform: translateY(
|
|
4537
|
+
transform: translateY(4px);
|
|
4538
4538
|
}
|
|
4539
4539
|
.lib-xplat-select-content.sm .select-item {
|
|
4540
4540
|
padding: var(--spacing-space-2) var(--spacing-space-2);
|
package/dist/components/index.js
CHANGED
|
@@ -3897,26 +3897,27 @@ var findScrollParent = (el) => {
|
|
|
3897
3897
|
}
|
|
3898
3898
|
return null;
|
|
3899
3899
|
};
|
|
3900
|
+
var TRIGGER_GAP = 8;
|
|
3900
3901
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
3901
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
3902
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
3902
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
3903
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
3903
3904
|
let direction;
|
|
3904
3905
|
let top;
|
|
3905
3906
|
let maxHeight = null;
|
|
3906
3907
|
if (popH <= roomBelow) {
|
|
3907
3908
|
direction = "bottom";
|
|
3908
|
-
top = triggerRect.bottom;
|
|
3909
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
3909
3910
|
} else if (popH <= roomAbove) {
|
|
3910
3911
|
direction = "top";
|
|
3911
|
-
top = triggerRect.top - popH;
|
|
3912
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
3912
3913
|
} else {
|
|
3913
3914
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
3914
3915
|
if (roomBelow >= roomAbove) {
|
|
3915
3916
|
direction = "bottom";
|
|
3916
|
-
top = triggerRect.bottom;
|
|
3917
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
3917
3918
|
} else {
|
|
3918
3919
|
direction = "top";
|
|
3919
|
-
top = triggerRect.top - room;
|
|
3920
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
3920
3921
|
}
|
|
3921
3922
|
maxHeight = room;
|
|
3922
3923
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -8411,26 +8411,27 @@ var findScrollParent = (el) => {
|
|
|
8411
8411
|
}
|
|
8412
8412
|
return null;
|
|
8413
8413
|
};
|
|
8414
|
+
var TRIGGER_GAP = 8;
|
|
8414
8415
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
8415
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
8416
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
8416
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
8417
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
8417
8418
|
let direction;
|
|
8418
8419
|
let top;
|
|
8419
8420
|
let maxHeight = null;
|
|
8420
8421
|
if (popH <= roomBelow) {
|
|
8421
8422
|
direction = "bottom";
|
|
8422
|
-
top = triggerRect.bottom;
|
|
8423
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
8423
8424
|
} else if (popH <= roomAbove) {
|
|
8424
8425
|
direction = "top";
|
|
8425
|
-
top = triggerRect.top - popH;
|
|
8426
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
8426
8427
|
} else {
|
|
8427
8428
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
8428
8429
|
if (roomBelow >= roomAbove) {
|
|
8429
8430
|
direction = "bottom";
|
|
8430
|
-
top = triggerRect.bottom;
|
|
8431
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
8431
8432
|
} else {
|
|
8432
8433
|
direction = "top";
|
|
8433
|
-
top = triggerRect.top - room;
|
|
8434
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
8434
8435
|
}
|
|
8435
8436
|
maxHeight = room;
|
|
8436
8437
|
}
|
package/dist/index.css
CHANGED
|
@@ -3282,11 +3282,11 @@
|
|
|
3282
3282
|
box-shadow: var(--semantic-shadow-md);
|
|
3283
3283
|
padding: var(--spacing-space-1) 0;
|
|
3284
3284
|
opacity: 0;
|
|
3285
|
-
transform: translateY(
|
|
3285
|
+
transform: translateY(4px);
|
|
3286
3286
|
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
3287
3287
|
}
|
|
3288
3288
|
.lib-xplat-dropdown-menu.bottom {
|
|
3289
|
-
transform: translateY(4px);
|
|
3289
|
+
transform: translateY(-4px);
|
|
3290
3290
|
}
|
|
3291
3291
|
.lib-xplat-dropdown-menu.visible {
|
|
3292
3292
|
opacity: 1;
|
|
@@ -4513,7 +4513,7 @@
|
|
|
4513
4513
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
4514
4514
|
}
|
|
4515
4515
|
.lib-xplat-select-content.bottom {
|
|
4516
|
-
transform: translateY(
|
|
4516
|
+
transform: translateY(-4px);
|
|
4517
4517
|
}
|
|
4518
4518
|
.lib-xplat-select-content.bottom.visible {
|
|
4519
4519
|
opacity: 1;
|
|
@@ -4521,12 +4521,12 @@
|
|
|
4521
4521
|
}
|
|
4522
4522
|
.lib-xplat-select-content.bottom.exit {
|
|
4523
4523
|
opacity: 0;
|
|
4524
|
-
transform: translateY(
|
|
4524
|
+
transform: translateY(-4px);
|
|
4525
4525
|
}
|
|
4526
4526
|
.lib-xplat-select-content {
|
|
4527
4527
|
}
|
|
4528
4528
|
.lib-xplat-select-content.top {
|
|
4529
|
-
transform: translateY(
|
|
4529
|
+
transform: translateY(4px);
|
|
4530
4530
|
}
|
|
4531
4531
|
.lib-xplat-select-content.top.visible {
|
|
4532
4532
|
opacity: 1;
|
|
@@ -4534,7 +4534,7 @@
|
|
|
4534
4534
|
}
|
|
4535
4535
|
.lib-xplat-select-content.top.exit {
|
|
4536
4536
|
opacity: 0;
|
|
4537
|
-
transform: translateY(
|
|
4537
|
+
transform: translateY(4px);
|
|
4538
4538
|
}
|
|
4539
4539
|
.lib-xplat-select-content.sm .select-item {
|
|
4540
4540
|
padding: var(--spacing-space-2) var(--spacing-space-2);
|
package/dist/index.js
CHANGED
|
@@ -8000,26 +8000,27 @@ var findScrollParent = (el) => {
|
|
|
8000
8000
|
}
|
|
8001
8001
|
return null;
|
|
8002
8002
|
};
|
|
8003
|
+
var TRIGGER_GAP = 8;
|
|
8003
8004
|
var computePlacement = (triggerRect, popW, popH, clip) => {
|
|
8004
|
-
const roomBelow = clip.bottom - triggerRect.bottom;
|
|
8005
|
-
const roomAbove = triggerRect.top - clip.top;
|
|
8005
|
+
const roomBelow = clip.bottom - triggerRect.bottom - TRIGGER_GAP;
|
|
8006
|
+
const roomAbove = triggerRect.top - clip.top - TRIGGER_GAP;
|
|
8006
8007
|
let direction;
|
|
8007
8008
|
let top;
|
|
8008
8009
|
let maxHeight = null;
|
|
8009
8010
|
if (popH <= roomBelow) {
|
|
8010
8011
|
direction = "bottom";
|
|
8011
|
-
top = triggerRect.bottom;
|
|
8012
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
8012
8013
|
} else if (popH <= roomAbove) {
|
|
8013
8014
|
direction = "top";
|
|
8014
|
-
top = triggerRect.top - popH;
|
|
8015
|
+
top = triggerRect.top - TRIGGER_GAP - popH;
|
|
8015
8016
|
} else {
|
|
8016
8017
|
const room = Math.max(roomBelow, roomAbove, 0);
|
|
8017
8018
|
if (roomBelow >= roomAbove) {
|
|
8018
8019
|
direction = "bottom";
|
|
8019
|
-
top = triggerRect.bottom;
|
|
8020
|
+
top = triggerRect.bottom + TRIGGER_GAP;
|
|
8020
8021
|
} else {
|
|
8021
8022
|
direction = "top";
|
|
8022
|
-
top = triggerRect.top - room;
|
|
8023
|
+
top = triggerRect.top - TRIGGER_GAP - room;
|
|
8023
8024
|
}
|
|
8024
8025
|
maxHeight = room;
|
|
8025
8026
|
}
|