@transferwise/components 0.0.0-experimental-def0600 → 0.0.0-experimental-f4ca4fa
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/build/Prompt/PrimitivePrompt/PrimitivePrompt.js +2 -1
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.mjs +2 -1
- package/build/Prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/Provider/Provider.js +24 -1
- package/build/Provider/Provider.js.map +1 -1
- package/build/Provider/Provider.mjs +24 -1
- package/build/Provider/Provider.mjs.map +1 -1
- package/build/Snackbar/Snackbar.js +179 -102
- package/build/Snackbar/Snackbar.js.map +1 -1
- package/build/Snackbar/Snackbar.messages.js +14 -0
- package/build/Snackbar/Snackbar.messages.js.map +1 -0
- package/build/Snackbar/Snackbar.messages.mjs +10 -0
- package/build/Snackbar/Snackbar.messages.mjs.map +1 -0
- package/build/Snackbar/Snackbar.mjs +181 -101
- package/build/Snackbar/Snackbar.mjs.map +1 -1
- package/build/Snackbar/SnackbarContext.js.map +1 -1
- package/build/Snackbar/SnackbarContext.mjs.map +1 -1
- package/build/Snackbar/SnackbarPortal.js +12 -0
- package/build/Snackbar/SnackbarPortal.js.map +1 -0
- package/build/Snackbar/SnackbarPortal.mjs +8 -0
- package/build/Snackbar/SnackbarPortal.mjs.map +1 -0
- package/build/Snackbar/SnackbarProvider.js +24 -28
- package/build/Snackbar/SnackbarProvider.js.map +1 -1
- package/build/Snackbar/SnackbarProvider.mjs +25 -29
- package/build/Snackbar/SnackbarProvider.mjs.map +1 -1
- package/build/Snackbar/constants.js +17 -0
- package/build/Snackbar/constants.js.map +1 -0
- package/build/Snackbar/constants.mjs +11 -0
- package/build/Snackbar/constants.mjs.map +1 -0
- package/build/Snackbar/useSnackbarAutoDismiss.js +66 -0
- package/build/Snackbar/useSnackbarAutoDismiss.js.map +1 -0
- package/build/Snackbar/useSnackbarAutoDismiss.mjs +62 -0
- package/build/Snackbar/useSnackbarAutoDismiss.mjs.map +1 -0
- package/build/Snackbar/useSnackbarManager.js +153 -0
- package/build/Snackbar/useSnackbarManager.js.map +1 -0
- package/build/Snackbar/useSnackbarManager.mjs +149 -0
- package/build/Snackbar/useSnackbarManager.mjs.map +1 -0
- package/build/Snackbar/useSnackbarSwipeDismiss.js +135 -0
- package/build/Snackbar/useSnackbarSwipeDismiss.js.map +1 -0
- package/build/Snackbar/useSnackbarSwipeDismiss.mjs +131 -0
- package/build/Snackbar/useSnackbarSwipeDismiss.mjs.map +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/en.json.js +1 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +1 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +119 -57
- package/build/styles/IconButton/IconButton.css +3 -4
- package/build/styles/Snackbar/Snackbar.css +117 -54
- package/build/styles/main.css +119 -57
- package/build/types/Prompt/PrimitivePrompt/PrimitivePrompt.d.ts +11 -0
- package/build/types/Prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/Snackbar/Snackbar.d.ts +55 -9
- package/build/types/Snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/Snackbar/Snackbar.messages.d.ts +9 -0
- package/build/types/Snackbar/Snackbar.messages.d.ts.map +1 -0
- package/build/types/Snackbar/Snackbar.types.d.ts +12 -0
- package/build/types/Snackbar/Snackbar.types.d.ts.map +1 -0
- package/build/types/Snackbar/SnackbarContext.d.ts +2 -2
- package/build/types/Snackbar/SnackbarContext.d.ts.map +1 -1
- package/build/types/Snackbar/SnackbarPortal.d.ts +4 -0
- package/build/types/Snackbar/SnackbarPortal.d.ts.map +1 -0
- package/build/types/Snackbar/SnackbarProvider.d.ts +7 -0
- package/build/types/Snackbar/SnackbarProvider.d.ts.map +1 -1
- package/build/types/Snackbar/constants.d.ts +9 -0
- package/build/types/Snackbar/constants.d.ts.map +1 -0
- package/build/types/Snackbar/index.d.ts +1 -1
- package/build/types/Snackbar/index.d.ts.map +1 -1
- package/build/types/Snackbar/useSnackbar.d.ts +1 -1
- package/build/types/Snackbar/useSnackbar.d.ts.map +1 -1
- package/build/types/Snackbar/useSnackbarAutoDismiss.d.ts +13 -0
- package/build/types/Snackbar/useSnackbarAutoDismiss.d.ts.map +1 -0
- package/build/types/Snackbar/useSnackbarManager.d.ts +20 -0
- package/build/types/Snackbar/useSnackbarManager.d.ts.map +1 -0
- package/build/types/Snackbar/useSnackbarSwipeDismiss.d.ts +22 -0
- package/build/types/Snackbar/useSnackbarSwipeDismiss.d.ts.map +1 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +2 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/IconButton/IconButton.css +3 -4
- package/src/IconButton/IconButton.less +14 -1
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.test.tsx +24 -1
- package/src/Prompt/PrimitivePrompt/PrimitivePrompt.tsx +8 -2
- package/src/Provider/Provider.tsx +1 -1
- package/src/Snackbar/Snackbar.css +117 -54
- package/src/Snackbar/Snackbar.less +139 -60
- package/src/Snackbar/Snackbar.messages.ts +9 -0
- package/src/Snackbar/Snackbar.test.tsx +992 -119
- package/src/Snackbar/Snackbar.tsx +209 -93
- package/src/Snackbar/Snackbar.types.ts +17 -0
- package/src/Snackbar/SnackbarContext.ts +2 -2
- package/src/Snackbar/SnackbarPortal.tsx +8 -0
- package/src/Snackbar/SnackbarProvider.test.tsx +783 -0
- package/src/Snackbar/SnackbarProvider.tsx +27 -19
- package/src/Snackbar/_stories/Snackbar.accessibility.docs.mdx +58 -0
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +16 -8
- package/src/Snackbar/_stories/Snackbar.story.tsx +388 -61
- package/src/Snackbar/_stories/Snackbar.test.story.tsx +171 -47
- package/src/Snackbar/constants.ts +10 -0
- package/src/Snackbar/index.ts +1 -1
- package/src/Snackbar/useSnackbarAutoDismiss.ts +74 -0
- package/src/Snackbar/useSnackbarManager.ts +169 -0
- package/src/Snackbar/useSnackbarSwipeDismiss.ts +169 -0
- package/src/i18n/en.json +1 -0
- package/src/index.ts +1 -1
- package/src/main.css +119 -57
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
import { SNACKBAR_SWIPE_DISMISS_THRESHOLD } from './constants';
|
|
4
|
+
|
|
5
|
+
const DISMISS_CLASS = 'wds-Snackbar--swipe-dismiss';
|
|
6
|
+
const SETTLE_CLASS = 'wds-Snackbar--swipe-settle';
|
|
7
|
+
|
|
8
|
+
type SwipePointer = {
|
|
9
|
+
id: number;
|
|
10
|
+
target: Element;
|
|
11
|
+
startX: number;
|
|
12
|
+
startY: number;
|
|
13
|
+
threshold: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Captures one primary pointer and follows downward, mostly vertical movement without re-rendering.
|
|
18
|
+
* Release dismisses at half the surface height; shorter/cancelled gestures settle back into place.
|
|
19
|
+
* The outer wrapper moves independently of entry/exit motion, and a committed swipe consumes its
|
|
20
|
+
* follow-up click so dragging from the action cannot activate it.
|
|
21
|
+
*/
|
|
22
|
+
const useSnackbarSwipeDismiss = ({
|
|
23
|
+
onDismissRequest,
|
|
24
|
+
onSwipeChange,
|
|
25
|
+
visible,
|
|
26
|
+
}: {
|
|
27
|
+
onDismissRequest: () => void;
|
|
28
|
+
/** Reports when a gesture starts and ends so auto-dismiss can pause beneath the pointer. */
|
|
29
|
+
onSwipeChange: (swiping: boolean) => void;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
}) => {
|
|
32
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
33
|
+
const pointerRef = useRef<SwipePointer | null>(null);
|
|
34
|
+
const suppressClick = useRef(false);
|
|
35
|
+
|
|
36
|
+
const clearSwipePosition = useCallback(() => {
|
|
37
|
+
const pointer = pointerRef.current;
|
|
38
|
+
pointerRef.current = null;
|
|
39
|
+
if (pointer) {
|
|
40
|
+
if (pointer.target.hasPointerCapture?.(pointer.id)) {
|
|
41
|
+
pointer.target.releasePointerCapture(pointer.id);
|
|
42
|
+
}
|
|
43
|
+
onSwipeChange(false);
|
|
44
|
+
}
|
|
45
|
+
suppressClick.current = false;
|
|
46
|
+
containerRef.current?.classList.remove(DISMISS_CLASS, SETTLE_CLASS);
|
|
47
|
+
containerRef.current?.style.removeProperty('transform');
|
|
48
|
+
}, [onSwipeChange]);
|
|
49
|
+
|
|
50
|
+
const handlePointerDown = (event: React.PointerEvent<HTMLDivElement>) => {
|
|
51
|
+
if (event.button !== 0 || !event.isPrimary || pointerRef.current) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
clearSwipePosition();
|
|
56
|
+
const target = event.target as Element;
|
|
57
|
+
target.setPointerCapture?.(event.pointerId);
|
|
58
|
+
pointerRef.current = {
|
|
59
|
+
id: event.pointerId,
|
|
60
|
+
target,
|
|
61
|
+
startX: event.clientX,
|
|
62
|
+
startY: event.clientY,
|
|
63
|
+
threshold: event.currentTarget.offsetHeight * SNACKBAR_SWIPE_DISMISS_THRESHOLD,
|
|
64
|
+
};
|
|
65
|
+
onSwipeChange(true);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const handlePointerMove = (event: React.PointerEvent<HTMLDivElement>) => {
|
|
69
|
+
const pointer = pointerRef.current;
|
|
70
|
+
if (pointer?.id !== event.pointerId) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const offsetY = event.clientY - pointer.startY;
|
|
75
|
+
const offsetX = event.clientX - pointer.startX;
|
|
76
|
+
if (offsetY > 0 && offsetY > Math.abs(offsetX)) {
|
|
77
|
+
containerRef.current?.style.setProperty('transform', `translateY(${offsetY}px)`);
|
|
78
|
+
} else {
|
|
79
|
+
containerRef.current?.style.removeProperty('transform');
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const handlePointerUp = (event: React.PointerEvent<HTMLDivElement>) => {
|
|
84
|
+
const pointer = pointerRef.current;
|
|
85
|
+
if (pointer?.id !== event.pointerId) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const offsetY = event.clientY - pointer.startY;
|
|
90
|
+
const offsetX = event.clientX - pointer.startX;
|
|
91
|
+
const container = containerRef.current;
|
|
92
|
+
const bounds = pointer.target.closest('a, button')?.getBoundingClientRect();
|
|
93
|
+
clearSwipePosition();
|
|
94
|
+
|
|
95
|
+
if (offsetY >= pointer.threshold && offsetY > Math.abs(offsetX)) {
|
|
96
|
+
if (container) {
|
|
97
|
+
// Include wrapper padding and the safe area, not only the surface, to clear the viewport.
|
|
98
|
+
container.classList.add(DISMISS_CLASS);
|
|
99
|
+
container.style.setProperty(
|
|
100
|
+
'transform',
|
|
101
|
+
`translateY(${Math.max(offsetY, container.offsetHeight)}px)`,
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
suppressClick.current = true;
|
|
105
|
+
onDismissRequest();
|
|
106
|
+
} else {
|
|
107
|
+
// Capture retargets clicks to the pressed control even when released outside it.
|
|
108
|
+
suppressClick.current =
|
|
109
|
+
!!bounds &&
|
|
110
|
+
(offsetX !== 0 || offsetY !== 0) &&
|
|
111
|
+
(event.clientX < bounds.left ||
|
|
112
|
+
event.clientX > bounds.right ||
|
|
113
|
+
event.clientY < bounds.top ||
|
|
114
|
+
event.clientY > bounds.bottom);
|
|
115
|
+
container?.classList.add(SETTLE_CLASS);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const handlePointerCancel = useCallback(
|
|
120
|
+
(event: Pick<PointerEvent, 'pointerId'>) => {
|
|
121
|
+
if (pointerRef.current?.id !== event.pointerId) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
clearSwipePosition();
|
|
126
|
+
containerRef.current?.classList.add(SETTLE_CLASS);
|
|
127
|
+
},
|
|
128
|
+
[clearSwipePosition],
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
if (visible) {
|
|
133
|
+
clearSwipePosition();
|
|
134
|
+
} else if (pointerRef.current) {
|
|
135
|
+
// An exit starting mid-gesture (timeout, Escape, replacement) ends it without dismissing again.
|
|
136
|
+
handlePointerCancel({ pointerId: pointerRef.current.id });
|
|
137
|
+
}
|
|
138
|
+
}, [visible, clearSwipePosition, handlePointerCancel]);
|
|
139
|
+
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
// Removed descendants report capture loss on their document, not the Snackbar surface.
|
|
142
|
+
const ownerDocument = containerRef.current?.ownerDocument;
|
|
143
|
+
ownerDocument?.addEventListener('lostpointercapture', handlePointerCancel);
|
|
144
|
+
return () => {
|
|
145
|
+
ownerDocument?.removeEventListener('lostpointercapture', handlePointerCancel);
|
|
146
|
+
clearSwipePosition();
|
|
147
|
+
};
|
|
148
|
+
}, [clearSwipePosition, handlePointerCancel]);
|
|
149
|
+
|
|
150
|
+
const handleClickCapture = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
151
|
+
if (suppressClick.current && event.detail > 0) {
|
|
152
|
+
suppressClick.current = false;
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
event.stopPropagation();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
clearSwipePosition,
|
|
160
|
+
containerRef,
|
|
161
|
+
handleClickCapture,
|
|
162
|
+
handlePointerCancel,
|
|
163
|
+
handlePointerDown,
|
|
164
|
+
handlePointerMove,
|
|
165
|
+
handlePointerUp,
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export default useSnackbarSwipeDismiss;
|
package/src/i18n/en.json
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"neptune.PhoneNumberInput.phoneNumberPrefix": "Prefix",
|
|
39
39
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
40
40
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
41
|
+
"neptune.Snackbar.escapeDismissHint": "Press Escape to dismiss.",
|
|
41
42
|
"neptune.StatusIcon.iconLabel.error": "Error:",
|
|
42
43
|
"neptune.StatusIcon.iconLabel.information": "Information:",
|
|
43
44
|
"neptune.StatusIcon.iconLabel.pending": "Pending:",
|
package/src/index.ts
CHANGED
|
@@ -146,7 +146,7 @@ export type {
|
|
|
146
146
|
SelectProps,
|
|
147
147
|
} from './_deprecated/Select';
|
|
148
148
|
export type { SlidingPanelProps } from './SlidingPanel';
|
|
149
|
-
export type {
|
|
149
|
+
export type { SnackbarCreationProps, SnackbarProviderProps } from './Snackbar';
|
|
150
150
|
export type { SnackbarContextType } from './Snackbar/SnackbarContext';
|
|
151
151
|
export type { StatusIconProps, StatusIconSentiment } from './StatusIcon';
|
|
152
152
|
export type { StickyProps } from './Sticky';
|
package/src/main.css
CHANGED
|
@@ -26948,15 +26948,14 @@ a[data-toggle="tooltip"] {
|
|
|
26948
26948
|
color: var(--color-white);
|
|
26949
26949
|
}
|
|
26950
26950
|
.np-icon-button-minimal-default {
|
|
26951
|
-
color: var(--color-interactive-primary);
|
|
26952
|
-
background-color: var(--color-background-screen);
|
|
26951
|
+
color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
|
|
26953
26952
|
background-color: transparent;
|
|
26954
26953
|
}
|
|
26955
26954
|
.np-icon-button-minimal-default:not(.disabled):not(:disabled):hover {
|
|
26956
|
-
background-color: var(--color-background-screen-hover);
|
|
26955
|
+
background-color: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-background-screen-hover));
|
|
26957
26956
|
}
|
|
26958
26957
|
.np-icon-button-minimal-default:not(.disabled):not(:disabled):active {
|
|
26959
|
-
background-color: var(--color-background-screen-active);
|
|
26958
|
+
background-color: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-background-screen-active));
|
|
26960
26959
|
}
|
|
26961
26960
|
.np-icon-button-secondary-default {
|
|
26962
26961
|
color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
|
|
@@ -31516,75 +31515,138 @@ button.np-link {
|
|
|
31516
31515
|
[dir="rtl"] .np-theme-personal .sliding-panel.sliding-panel--border-left {
|
|
31517
31516
|
box-shadow: inset 1px 0 0 0 var(--color-border-neutral);
|
|
31518
31517
|
}
|
|
31519
|
-
.
|
|
31520
|
-
|
|
31518
|
+
.wds-Snackbar {
|
|
31519
|
+
display: flex;
|
|
31520
|
+
justify-content: center;
|
|
31521
|
+
box-sizing: border-box;
|
|
31522
|
+
padding-inline: var(--size-16);
|
|
31523
|
+
padding-block-end: calc(var(--size-16) + env(safe-area-inset-bottom));
|
|
31521
31524
|
position: fixed;
|
|
31522
31525
|
inset-block-end: 0;
|
|
31523
|
-
inset-inline
|
|
31524
|
-
inset-inline-end: 0;
|
|
31526
|
+
inset-inline: 0;
|
|
31525
31527
|
z-index: 1060;
|
|
31526
31528
|
}
|
|
31527
|
-
|
|
31528
|
-
|
|
31529
|
-
|
|
31530
|
-
|
|
31531
|
-
|
|
31532
|
-
|
|
31533
|
-
|
|
31534
|
-
|
|
31529
|
+
@media (min-width: 600px) {
|
|
31530
|
+
.wds-Snackbar {
|
|
31531
|
+
padding-block-end: var(--size-24);
|
|
31532
|
+
}
|
|
31533
|
+
}
|
|
31534
|
+
.wds-Snackbar--swipe-dismiss {
|
|
31535
|
+
transition: transform var(--Snackbar-exit-duration) cubic-bezier(1, 0, 1, 1);
|
|
31536
|
+
}
|
|
31537
|
+
.wds-Snackbar--swipe-settle {
|
|
31538
|
+
transition: transform var(--Snackbar-exit-duration) cubic-bezier(0, 0, 0, 1);
|
|
31539
|
+
}
|
|
31540
|
+
.wds-Snackbar-container {
|
|
31541
|
+
--Prompt-border-radius: var(--radius-medium);
|
|
31542
|
+
--Prompt-gap: var(--size-8);
|
|
31543
|
+
--Prompt-padding-x: var(--size-12);
|
|
31544
|
+
--Prompt-padding-y: var(--size-12);
|
|
31545
|
+
box-sizing: border-box;
|
|
31546
|
+
max-inline-size: 480px;
|
|
31535
31547
|
text-align: start;
|
|
31536
|
-
|
|
31537
|
-
|
|
31538
|
-
margin-inline: var(--size-16);
|
|
31539
|
-
padding-block: var(--size-8);
|
|
31540
|
-
padding-inline: var(--size-16);
|
|
31541
|
-
inline-size: calc(100% - var(--size-32));
|
|
31542
|
-
transition: 400ms cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
31548
|
+
cursor: grab;
|
|
31549
|
+
touch-action: pan-x pinch-zoom;
|
|
31543
31550
|
}
|
|
31544
|
-
.
|
|
31545
|
-
|
|
31546
|
-
position: relative;
|
|
31547
|
-
background: var(--color-contrast-theme);
|
|
31548
|
-
border-radius: var(--radius-small);
|
|
31549
|
-
color: var(--color-contrast-overlay);
|
|
31551
|
+
.wds-Snackbar-container .wds-prompt__content-wrapper--with-dismiss {
|
|
31552
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
31550
31553
|
}
|
|
31551
|
-
|
|
31552
|
-
|
|
31553
|
-
|
|
31554
|
-
|
|
31555
|
-
inline-size: 100%;
|
|
31556
|
-
content: "";
|
|
31557
|
-
position: absolute;
|
|
31558
|
-
inset-inline-start: 0;
|
|
31559
|
-
inset-block-start: 0;
|
|
31560
|
-
z-index: -1;
|
|
31561
|
-
background-color: var(--color-background-neutral);
|
|
31554
|
+
@media (min-width: 600px) {
|
|
31555
|
+
.wds-Snackbar-container .wds-prompt__content-wrapper--with-dismiss {
|
|
31556
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
31557
|
+
}
|
|
31562
31558
|
}
|
|
31563
|
-
.
|
|
31564
|
-
|
|
31565
|
-
|
|
31559
|
+
.wds-Snackbar-container .wds-prompt__media-wrapper {
|
|
31560
|
+
display: flex;
|
|
31561
|
+
align-items: center;
|
|
31562
|
+
min-block-size: max(var(--size-32), 1lh);
|
|
31563
|
+
padding-block-start: 0;
|
|
31564
|
+
color: var(--color-sentiment-content-primary);
|
|
31565
|
+
}
|
|
31566
|
+
.wds-Snackbar-container .wds-prompt__media-wrapper:has(+ .wds-Snackbar__content .wds-Snackbar__action) {
|
|
31567
|
+
min-block-size: max(var(--size-32), calc(1lh + var(--size-5) * 2));
|
|
31568
|
+
}
|
|
31569
|
+
.wds-Snackbar__media-asset {
|
|
31570
|
+
display: flex;
|
|
31571
|
+
}
|
|
31572
|
+
.wds-Snackbar__media-asset svg {
|
|
31573
|
+
inline-size: var(--size-24);
|
|
31574
|
+
block-size: var(--size-24);
|
|
31575
|
+
}
|
|
31576
|
+
.wds-Snackbar__process-indicator .process-circle {
|
|
31577
|
+
stroke: currentColor;
|
|
31578
|
+
}
|
|
31579
|
+
.wds-Snackbar-container .wds-prompt__dismiss {
|
|
31580
|
+
display: none;
|
|
31581
|
+
align-self: flex-start;
|
|
31582
|
+
margin-block-start: calc(var(--size-4) - 1px);
|
|
31566
31583
|
}
|
|
31567
31584
|
@media (min-width: 600px) {
|
|
31568
|
-
.
|
|
31569
|
-
|
|
31570
|
-
max-inline-size: 600px;
|
|
31585
|
+
.wds-Snackbar-container .wds-prompt__dismiss {
|
|
31586
|
+
display: flex;
|
|
31571
31587
|
}
|
|
31572
31588
|
}
|
|
31573
|
-
.
|
|
31589
|
+
.wds-Snackbar__action {
|
|
31574
31590
|
flex-shrink: 0;
|
|
31575
|
-
margin-inline-start: var(--size-16);
|
|
31576
31591
|
}
|
|
31577
|
-
.
|
|
31578
|
-
|
|
31579
|
-
|
|
31592
|
+
.wds-Snackbar__content {
|
|
31593
|
+
display: flex;
|
|
31594
|
+
align-items: flex-start;
|
|
31595
|
+
gap: var(--size-8);
|
|
31596
|
+
flex: 1 0 0;
|
|
31597
|
+
min-block-size: var(--size-32);
|
|
31598
|
+
min-inline-size: 0;
|
|
31599
|
+
}
|
|
31600
|
+
.wds-Snackbar__message {
|
|
31601
|
+
display: flex;
|
|
31602
|
+
flex-direction: column;
|
|
31603
|
+
justify-content: center;
|
|
31604
|
+
inline-size: auto;
|
|
31605
|
+
flex: 1 0 0;
|
|
31606
|
+
min-inline-size: 0;
|
|
31607
|
+
align-self: stretch;
|
|
31608
|
+
}
|
|
31609
|
+
.wds-Snackbar__body {
|
|
31610
|
+
display: block;
|
|
31580
31611
|
}
|
|
31581
|
-
.
|
|
31582
|
-
|
|
31583
|
-
|
|
31612
|
+
.wds-Snackbar-container-appear,
|
|
31613
|
+
.wds-Snackbar-container-enter {
|
|
31614
|
+
opacity: 0;
|
|
31615
|
+
transform: translateY(80px) scale(0.5);
|
|
31584
31616
|
}
|
|
31585
|
-
|
|
31586
|
-
|
|
31587
|
-
|
|
31617
|
+
.wds-Snackbar-container-appear-active,
|
|
31618
|
+
.wds-Snackbar-container-enter-active {
|
|
31619
|
+
opacity: 1;
|
|
31620
|
+
transform: translateY(0) scale(1);
|
|
31621
|
+
transition: opacity 150ms linear, transform var(--Snackbar-enter-duration) cubic-bezier(0, 0, 0, 1);
|
|
31622
|
+
}
|
|
31623
|
+
.wds-Snackbar-container-exit {
|
|
31624
|
+
opacity: 1;
|
|
31625
|
+
transform: translateY(0) scale(1);
|
|
31626
|
+
}
|
|
31627
|
+
.wds-Snackbar-container-exit-active {
|
|
31628
|
+
opacity: 0;
|
|
31629
|
+
transform: translateY(80px) scale(0.5);
|
|
31630
|
+
transition: opacity 50ms linear 50ms, transform var(--Snackbar-exit-duration) cubic-bezier(1, 0, 1, 1);
|
|
31631
|
+
}
|
|
31632
|
+
@media (prefers-reduced-motion: reduce) {
|
|
31633
|
+
.wds-Snackbar--swipe-dismiss,
|
|
31634
|
+
.wds-Snackbar--swipe-settle {
|
|
31635
|
+
transition: none;
|
|
31636
|
+
}
|
|
31637
|
+
.wds-Snackbar-container-appear,
|
|
31638
|
+
.wds-Snackbar-container-appear-active,
|
|
31639
|
+
.wds-Snackbar-container-enter,
|
|
31640
|
+
.wds-Snackbar-container-enter-active,
|
|
31641
|
+
.wds-Snackbar-container-exit {
|
|
31642
|
+
opacity: 1;
|
|
31643
|
+
transform: none;
|
|
31644
|
+
transition: none;
|
|
31645
|
+
}
|
|
31646
|
+
.wds-Snackbar-container-exit-active {
|
|
31647
|
+
opacity: 0;
|
|
31648
|
+
transform: none;
|
|
31649
|
+
transition: none;
|
|
31588
31650
|
}
|
|
31589
31651
|
}
|
|
31590
31652
|
.status-circle.negative,
|