@vkontakte/vkui 8.2.1 → 8.2.3
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/DateInput/DateInput.js +1 -1
- package/dist/components/DateInput/DateInput.js.map +1 -1
- package/dist/components/DateRangeInput/DateRangeInput.js +1 -1
- package/dist/components/DateRangeInput/DateRangeInput.js.map +1 -1
- package/dist/components/Search/Search.js +1 -4
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/Snackbar/subcomponents/Basic/Basic.d.ts +1 -1
- package/dist/components/Snackbar/subcomponents/Basic/Basic.d.ts.map +1 -1
- package/dist/components/Snackbar/subcomponents/Basic/Basic.js +11 -2
- package/dist/components/Snackbar/subcomponents/Basic/Basic.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/DateInput/DateInput.js +1 -1
- package/dist/cssm/components/DateInput/DateInput.js.map +1 -1
- package/dist/cssm/components/DateRangeInput/DateRangeInput.js +1 -1
- package/dist/cssm/components/DateRangeInput/DateRangeInput.js.map +1 -1
- package/dist/cssm/components/PopoutWrapper/PopoutWrapper.module.css +11 -11
- package/dist/cssm/components/PullToRefresh/PullToRefresh.module.css +2 -0
- package/dist/cssm/components/Search/Search.js +1 -4
- package/dist/cssm/components/Search/Search.js.map +1 -1
- package/dist/cssm/components/Search/Search.module.css +8 -11
- package/dist/cssm/components/SegmentedControl/SegmentedControl.module.css +2 -4
- package/dist/cssm/components/Snackbar/subcomponents/Basic/Basic.js +11 -2
- package/dist/cssm/components/Snackbar/subcomponents/Basic/Basic.js.map +1 -1
- package/dist/cssm/components/Snackbar/subcomponents/Basic/Basic.module.css +0 -8
- package/dist/cssm/hooks/useMergeProps.js +1 -1
- package/dist/cssm/hooks/useMergeProps.js.map +1 -1
- package/dist/cssm/lib/date.js +1 -1
- package/dist/cssm/lib/date.js.map +1 -1
- package/dist/cssm/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js +1 -1
- package/dist/cssm/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js.map +1 -1
- package/dist/hooks/useMergeProps.js +1 -1
- package/dist/hooks/useMergeProps.js.map +1 -1
- package/dist/lib/date.js +1 -1
- package/dist/lib/date.js.map +1 -1
- package/dist/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js +1 -1
- package/dist/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js.map +1 -1
- package/dist/vkui.css +1 -1
- package/dist/vkui.css.map +1 -1
- package/package.json +1 -1
- package/src/components/DateInput/DateInput.tsx +1 -1
- package/src/components/DateRangeInput/DateRangeInput.tsx +1 -1
- package/src/components/PopoutWrapper/PopoutWrapper.module.css +11 -11
- package/src/components/PopoutWrapper/PopoutWrapper.module.css.d.ts.map +1 -1
- package/src/components/PullToRefresh/PullToRefresh.module.css +2 -0
- package/src/components/PullToRefresh/PullToRefresh.module.css.d.ts.map +1 -1
- package/src/components/Search/Search.module.css +8 -11
- package/src/components/Search/Search.module.css.d.ts.map +1 -1
- package/src/components/Search/Search.tsx +1 -1
- package/src/components/SegmentedControl/SegmentedControl.module.css +2 -4
- package/src/components/SegmentedControl/SegmentedControl.module.css.d.ts.map +1 -1
- package/src/components/Snackbar/subcomponents/Basic/Basic.module.css +0 -8
- package/src/components/Snackbar/subcomponents/Basic/Basic.module.css.d.ts.map +1 -1
- package/src/components/Snackbar/subcomponents/Basic/Basic.tsx +9 -3
- package/src/hooks/useMergeProps.ts +1 -1
- package/src/lib/date.ts +1 -1
- package/src/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.ts +1 -1
package/package.json
CHANGED
|
@@ -441,7 +441,7 @@ export const DateInput = ({
|
|
|
441
441
|
}
|
|
442
442
|
}, [handleFieldEnter, openCalendar, accessible]);
|
|
443
443
|
|
|
444
|
-
const showCalendarButton = !disableCalendar && (accessible ||
|
|
444
|
+
const showCalendarButton = !disableCalendar && (accessible || !value);
|
|
445
445
|
const showClearButton = value && !readOnly;
|
|
446
446
|
|
|
447
447
|
useGlobalEscKeyDown(open && !disableCalendar, closeCalendar, {
|
|
@@ -415,7 +415,7 @@ export const DateRangeInput = ({
|
|
|
415
415
|
}
|
|
416
416
|
}, [handleFieldEnter, openCalendar, accessible]);
|
|
417
417
|
|
|
418
|
-
const showCalendarButton = !disableCalendar && (accessible ||
|
|
418
|
+
const showCalendarButton = !disableCalendar && (accessible || !value);
|
|
419
419
|
const showClearButton = value && !readOnly;
|
|
420
420
|
|
|
421
421
|
useGlobalEscKeyDown(open && !disableCalendar, closeCalendar, {
|
|
@@ -32,22 +32,22 @@
|
|
|
32
32
|
opacity: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.opened .overlay {
|
|
35
|
+
.opened > .container > .overlay {
|
|
36
36
|
animation: animationPopoutWrapperFullFadeIn var(--vkui--animation_duration_m) ease both;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.closing .overlay {
|
|
39
|
+
.closing > .container > .overlay {
|
|
40
40
|
opacity: 0;
|
|
41
41
|
animation: animationPopoutWrapperFullFadeOut var(--vkui--animation_duration_m)
|
|
42
42
|
var(--vkui--animation_easing_default) both;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.masked .overlay {
|
|
45
|
+
.masked > .container > .overlay {
|
|
46
46
|
background: var(--vkui--color_overlay_primary);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.fixed .overlay,
|
|
50
|
-
.absolute .overlay {
|
|
49
|
+
.fixed > .container > .overlay,
|
|
50
|
+
.absolute > .container > .overlay {
|
|
51
51
|
position: absolute;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -72,27 +72,27 @@
|
|
|
72
72
|
pointer-events: auto;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.alignYCenter .container {
|
|
75
|
+
.alignYCenter > .container {
|
|
76
76
|
align-items: center;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.alignYBottom .container {
|
|
79
|
+
.alignYBottom > .container {
|
|
80
80
|
align-items: flex-end;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.alignYTop .container {
|
|
83
|
+
.alignYTop > .container {
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
.alignXCenter .container {
|
|
87
|
+
.alignXCenter > .container {
|
|
88
88
|
justify-content: center;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.alignXLeft .container {
|
|
91
|
+
.alignXLeft > .container {
|
|
92
92
|
justify-content: flex-start;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.alignXRight .container {
|
|
95
|
+
.alignXRight > .container {
|
|
96
96
|
justify-content: flex-end;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["./PopoutWrapper.module.css"],"names":["host","opened","closing","fixed","absolute","overlay","
|
|
1
|
+
{"version":3,"sources":["./PopoutWrapper.module.css"],"names":["host","opened","closing","fixed","absolute","overlay","container","masked","content","alignYCenter","alignYBottom","alignYTop","alignXCenter","alignXLeft","alignXRight"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aASAC,Q,WATA;AAAA,E,aAaAC,S,WAbA;AAAA,E,aAiBAC,O,WAjBA;AAAA,E,aAqBAC,U,WArBA;AAAA,E,aAyBAC,S,WAzBA;AAAA,E,aAkCAJ,Q,WAlCA;AAAA,E,aAkCUK,W,WAlCV;AAAA,E,aAkCuBD,S,WAlCvB;AAAA,E,aAsCAH,S,WAtCA;AAAA,E,aAsCWI,W,WAtCX;AAAA,E,aAsCwBD,S,WAtCxB;AAAA,E,aA4CAE,Q,WA5CA;AAAA,E,aA4CUD,W,WA5CV;AAAA,E,aA4CuBD,S,WA5CvB;AAAA,E,aAgDAF,O,WAhDA;AAAA,E,aAgDSG,W,WAhDT;AAAA,E,aAgDsBD,S,WAhDtB;AAAA,E,aAiDAD,U,WAjDA;AAAA,E,aAiDYE,W,WAjDZ;AAAA,E,aAiDyBD,S,WAjDzB;AAAA,E,aAqDAC,W,WArDA;AAAA,E,aA6DAE,S,WA7DA;AAAA,E,aAsEAA,S,WAtEA;AAAA,E,aA0EAC,c,WA1EA;AAAA,E,aA0EgBH,W,WA1EhB;AAAA,E,aA8EAI,c,WA9EA;AAAA,E,aA8EgBJ,W,WA9EhB;AAAA,E,aAkFAK,W,WAlFA;AAAA,E,aAkFaL,W,WAlFb;AAAA,E,aAsFAM,c,WAtFA;AAAA,E,aAsFgBN,W,WAtFhB;AAAA,E,aA0FAO,Y,WA1FA;AAAA,E,aA0FcP,W,WA1Fd;AAAA,E,aA8FAQ,a,WA9FA;AAAA,E,aA8FeR,W,WA9Ff;AAAA;AAAA","file":"PopoutWrapper.module.css.d.ts","sourceRoot":""}
|
|
@@ -75,6 +75,8 @@
|
|
|
75
75
|
flex-grow: 1;
|
|
76
76
|
flex-direction: column;
|
|
77
77
|
overflow: hidden;
|
|
78
|
+
/* TODO [>=9]: использовать clip чтобы не создовать контекст контейнера прокрутки и не мешать sticky элементам */
|
|
79
|
+
overflow: clip;
|
|
78
80
|
transition: transform 400ms var(--vkui--animation_easing_platform);
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["./PullToRefresh.module.css"],"names":["host","refreshing","controls","ios","spinner","watching","spinnerSelf","spinnerPath","spinnerOn","content"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aAMAC,Y,WANA;AAAA,E,aAWAC,U,WAXA;AAAA,E,aAgBAF,M,WAhBA;AAAA,E,aAgBUG,K,WAhBV;AAAA,E,aAgBgBD,U,WAhBhB;AAAA,E,aAoBAE,S,WApBA;AAAA,E,aAsCAD,K,WAtCA;AAAA,E,aAsCKC,S,WAtCL;AAAA,E,aA6CAC,U,WA7CA;AAAA,E,aA6CUD,S,WA7CV;AAAA,E,aAiDAE,a,WAjDA;AAAA,E,aAqDAH,K,WArDA;AAAA,E,aAqDIF,Y,WArDJ;AAAA,E,aAqDgBK,a,WArDhB;AAAA,E,aAyDAC,a,WAzDA;AAAA,E,aA+DAF,U,WA/DA;AAAA,E,aA+DUE,a,WA/DV;AAAA,E,aAgEAN,Y,WAhEA;AAAA,E,aAgEYM,a,WAhEZ;AAAA,E,aAoEAC,W,WApEA;AAAA,E,aAoEWD,a,WApEX;AAAA,E,aAwEAE,S,WAxEA;AAAA,E,
|
|
1
|
+
{"version":3,"sources":["./PullToRefresh.module.css"],"names":["host","refreshing","controls","ios","spinner","watching","spinnerSelf","spinnerPath","spinnerOn","content"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aAMAC,Y,WANA;AAAA,E,aAWAC,U,WAXA;AAAA,E,aAgBAF,M,WAhBA;AAAA,E,aAgBUG,K,WAhBV;AAAA,E,aAgBgBD,U,WAhBhB;AAAA,E,aAoBAE,S,WApBA;AAAA,E,aAsCAD,K,WAtCA;AAAA,E,aAsCKC,S,WAtCL;AAAA,E,aA6CAC,U,WA7CA;AAAA,E,aA6CUD,S,WA7CV;AAAA,E,aAiDAE,a,WAjDA;AAAA,E,aAqDAH,K,WArDA;AAAA,E,aAqDIF,Y,WArDJ;AAAA,E,aAqDgBK,a,WArDhB;AAAA,E,aAyDAC,a,WAzDA;AAAA,E,aA+DAF,U,WA/DA;AAAA,E,aA+DUE,a,WA/DV;AAAA,E,aAgEAN,Y,WAhEA;AAAA,E,aAgEYM,a,WAhEZ;AAAA,E,aAoEAC,W,WApEA;AAAA,E,aAoEWD,a,WApEX;AAAA,E,aAwEAE,S,WAxEA;AAAA,E,aAkFAJ,U,WAlFA;AAAA,E,aAkFUI,S,WAlFV;AAAA;AAAA","file":"PullToRefresh.module.css.d.ts","sourceRoot":""}
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
padding-inline: var(--vkui--size_base_padding_horizontal--regular);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.hasAfter.withPadding {
|
|
21
|
+
padding-inline-end: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
/*
|
|
21
25
|
density-compact
|
|
22
26
|
*/
|
|
@@ -182,6 +186,10 @@
|
|
|
182
186
|
transition: flex-grow 0.3s var(--vkui--animation_easing_platform);
|
|
183
187
|
}
|
|
184
188
|
|
|
189
|
+
.hasAfter.withPadding .after {
|
|
190
|
+
min-inline-size: var(--vkui--size_base_padding_horizontal--regular);
|
|
191
|
+
}
|
|
192
|
+
|
|
185
193
|
.focused .after,
|
|
186
194
|
.hasValue .after {
|
|
187
195
|
flex-grow: 1;
|
|
@@ -197,17 +205,6 @@
|
|
|
197
205
|
content: '';
|
|
198
206
|
}
|
|
199
207
|
|
|
200
|
-
.withPadding .after::after {
|
|
201
|
-
margin-inline-end: calc(-1 * var(--vkui--size_base_padding_horizontal--regular));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.afterTextClip {
|
|
205
|
-
display: block;
|
|
206
|
-
overflow: hidden;
|
|
207
|
-
text-overflow: clip;
|
|
208
|
-
white-space: nowrap;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
208
|
.findButton {
|
|
212
209
|
inline-size: initial;
|
|
213
210
|
min-inline-size: initial;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["./Search.module.css"],"names":["host","rtl","withPadding","densityCompact","densityNone","field","label","input","nativeInput","
|
|
1
|
+
{"version":3,"sources":["./Search.module.css"],"names":["host","rtl","withPadding","hasAfter","densityCompact","densityNone","field","label","input","nativeInput","disabled","controls","hasIcon","hasValue","icon","after","focused","findButton"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aAUAC,K,WAVA;AAAA,E,aAcAC,a,WAdA;AAAA,E,aAmBAC,U,WAnBA;AAAA,E,aAmBSD,a,WAnBT;AAAA,E,aA2BAE,gB,WA3BA;AAAA,E,aAgCEC,a,WAhCF;AAAA,E,aAqCAC,O,WArCA;AAAA,E,aAoDAA,O,WApDA;AAAA,E,aAwDAA,O,WAxDA;AAAA,E,aA4DAC,O,WA5DA;AAAA,E,aAmEAC,O,WAnEA;AAAA,E,aA+EAC,a,WA/EA;AAAA,E,aAkGAA,a,WAlGA;AAAA,E,aAmGAA,a,WAnGA;AAAA,E,aAoGAA,a,WApGA;AAAA,E,aAqGAA,a,WArGA;AAAA,E,aAyGAA,a,WAzGA;AAAA,E,aA6GAN,U,WA7GA;AAAA,E,aA6GUM,a,WA7GV;AAAA,E,aAkHAC,U,WAlHA;AAAA,E,aAwHAD,a,WAxHA;AAAA,E,aA4HAA,a,WA5HA;AAAA,E,aAkIAA,a,WAlIA;AAAA,E,aAsIAE,U,WAtIA;AAAA,E,aAmJAC,S,WAnJA;AAAA,E,aAmJSD,U,WAnJT;AAAA,E,aA+JAE,U,WA/JA;AAAA,E,aA+JUF,U,WA/JV;AAAA,E,aAmKAG,M,WAnKA;AAAA,E,aA6KAA,M,WA7KA;AAAA,E,aAiLAC,O,WAjLA;AAAA,E,aA4LAZ,U,WA5LA;AAAA,E,aA4LSD,a,WA5LT;AAAA,E,aA4LsBa,O,WA5LtB;AAAA,E,aAgMAC,S,WAhMA;AAAA,E,aAgMSD,O,WAhMT;AAAA,E,aAiMAF,U,WAjMA;AAAA,E,aAiMUE,O,WAjMV;AAAA,E,aAsMAA,O,WAtMA;AAAA,E,aAuMAA,O,WAvMA;AAAA,E,aA+MAE,Y,WA/MA;AAAA,E,aAsNwCjB,M,WAtNxC;AAAA;AAAA","file":"Search.module.css.d.ts","sourceRoot":""}
|
|
@@ -26,11 +26,9 @@
|
|
|
26
26
|
inset-inline-start: 0;
|
|
27
27
|
inline-size: calc(100% / var(--vkui_internal--SegmentedControl_options));
|
|
28
28
|
background-color: var(--vkui--color_segmented_control);
|
|
29
|
+
border: var(--vkui--size_border--regular) solid var(--vkui--color_image_border_alpha);
|
|
29
30
|
border-radius: inherit;
|
|
30
|
-
box-shadow:
|
|
31
|
-
inset 0 0 0 0.5px var(--vkui--color_image_border_alpha),
|
|
32
|
-
0 3px 8px rgb(0, 0, 0, 0.12),
|
|
33
|
-
0 3px 1px rgb(0, 0, 0, 0.04);
|
|
31
|
+
box-shadow: var(--vkui--elevation2);
|
|
34
32
|
transform: translateX(calc(var(--vkui_internal--SegmentedControl_actual_index) * 100%));
|
|
35
33
|
transform-origin: 0 0;
|
|
36
34
|
transition: transform 150ms;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["./SegmentedControl.module.css"],"names":["host","sizeL","in","slider","rtl","densityRegular","densityNone"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aASAC,O,WATA;AAAA,E,aAaAC,I,WAbA;AAAA,E,aAsBAC,Q,WAtBA;AAAA,E,
|
|
1
|
+
{"version":3,"sources":["./SegmentedControl.module.css"],"names":["host","sizeL","in","slider","rtl","densityRegular","densityNone"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aASAC,O,WATA;AAAA,E,aAaAC,I,WAbA;AAAA,E,aAsBAC,Q,WAtBA;AAAA,E,aAuCAC,K,WAvCA;AAAA,E,aAuCKD,Q,WAvCL;AAAA,E,aA8CAE,gB,WA9CA;AAAA,E,aAkDAA,gB,WAlDA;AAAA,E,aAkDeJ,O,WAlDf;AAAA,E,aAuDEK,a,WAvDF;AAAA,E,aA2DEA,a,WA3DF;AAAA,E,aA2DcL,O,WA3Dd;AAAA;AAAA","file":"SegmentedControl.module.css.d.ts","sourceRoot":""}
|
|
@@ -42,10 +42,6 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.modeDark {
|
|
46
|
-
background: var(--vkui--color_background_contrast_inverse);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
45
|
.before {
|
|
50
46
|
margin-inline-end: 12px;
|
|
51
47
|
}
|
|
@@ -76,10 +72,6 @@
|
|
|
76
72
|
color: var(--vkui--color_text_subhead);
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
.modeDark .contentText {
|
|
80
|
-
color: var(--vkui--color_text_contrast);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
75
|
/* layout */
|
|
84
76
|
.layoutHorizontal .action {
|
|
85
77
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["./Basic.module.css"],"names":["body","densityRegular","densityNone","
|
|
1
|
+
{"version":3,"sources":["./Basic.module.css"],"names":["body","densityRegular","densityNone","before","after","content","contentText","contentSubtitle","layoutHorizontal","action","layoutVertical","layoutNone"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aAoBAC,gB,WApBA;AAAA,E,aAgCEC,a,WAhCF;AAAA,E,aA4CAC,Q,WA5CA;AAAA,E,aAgDAC,O,WAhDA;AAAA,E,aAoDAC,S,WApDA;AAAA,E,aA2DAC,a,WA3DA;AAAA,E,aAqEAC,iB,WArEA;AAAA,E,aA2EAC,kB,WA3EA;AAAA,E,aA2EkBC,Q,WA3ElB;AAAA,E,aAgFAC,gB,WAhFA;AAAA,E,aAgFgBL,S,WAhFhB;AAAA,E,aAqFAK,gB,WArFA;AAAA,E,aAqFgBD,Q,WArFhB;AAAA,E,aA4FEE,Y,WA5FF;AAAA,E,aA4FcF,Q,WA5Fd;AAAA,E,aAkGEE,Y,WAlGF;AAAA,E,aAkGcN,S,WAlGd;AAAA,E,aAuGEM,Y,WAvGF;AAAA,E,aAuGcF,Q,WAvGd;AAAA;AAAA","file":"Basic.module.css.d.ts","sourceRoot":""}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import { classNames } from '@vkontakte/vkjs';
|
|
5
5
|
import { useAdaptivity } from '../../../../hooks/useAdaptivity';
|
|
6
6
|
import type { HTMLAttributesWithRootRef } from '../../../../types';
|
|
7
|
+
import { ColorSchemeProvider } from '../../../ColorSchemeProvider/ColorSchemeProvider';
|
|
7
8
|
import { RootComponent } from '../../../RootComponent/RootComponent';
|
|
8
9
|
import { Paragraph } from '../../../Typography/Paragraph/Paragraph';
|
|
9
10
|
import { Subhead } from '../../../Typography/Subhead/Subhead';
|
|
@@ -74,14 +75,13 @@ export function Basic({
|
|
|
74
75
|
const { density = 'none' } = useAdaptivity();
|
|
75
76
|
const layout = after || subtitle ? 'vertical' : 'none';
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
const snackbar = (
|
|
78
79
|
<RootComponent
|
|
79
80
|
{...restProps}
|
|
80
81
|
baseClassName={classNames(
|
|
81
82
|
styles.body,
|
|
82
83
|
stylesLayout[layoutProps || layout],
|
|
83
84
|
density !== 'compact' && densityClassNames[density],
|
|
84
|
-
mode === 'dark' && styles.modeDark,
|
|
85
85
|
)}
|
|
86
86
|
>
|
|
87
87
|
{before && <div className={styles.before}>{before}</div>}
|
|
@@ -96,4 +96,10 @@ export function Basic({
|
|
|
96
96
|
{after && <div className={styles.after}>{after}</div>}
|
|
97
97
|
</RootComponent>
|
|
98
98
|
);
|
|
99
|
+
|
|
100
|
+
if (mode === 'dark') {
|
|
101
|
+
return <ColorSchemeProvider value="dark">{snackbar}</ColorSchemeProvider>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return snackbar;
|
|
99
105
|
}
|
|
@@ -26,7 +26,7 @@ export const useMergeProps = <T extends BaseProps = BaseProps>(
|
|
|
26
26
|
return filterProps(originalProps);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const { className: rootSlotClassName, style: rootSlotStyle, ...rootSlotProps } = slotProps
|
|
29
|
+
const { className: rootSlotClassName, style: rootSlotStyle, ...rootSlotProps } = slotProps;
|
|
30
30
|
|
|
31
31
|
const {
|
|
32
32
|
className: originalClassName,
|
package/src/lib/date.ts
CHANGED
|
@@ -310,7 +310,7 @@ export const useFloatingWithInteractions = <T extends HTMLElement = HTMLElement>
|
|
|
310
310
|
if (shownLocalState.shown) {
|
|
311
311
|
setShownFinalState(true);
|
|
312
312
|
onShownChanged(true, shownLocalState.reason);
|
|
313
|
-
} else if (hasCSSAnimation.current
|
|
313
|
+
} else if (hasCSSAnimation.current) {
|
|
314
314
|
setWillBeHide(true);
|
|
315
315
|
} else {
|
|
316
316
|
setShownFinalState(false);
|