@transferwise/components 0.0.0-experimental-63c3fc6 → 0.0.0-experimental-5f03867
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/Snackbar/Snackbar.js +178 -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 +180 -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/index.js +0 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +0 -2
- package/build/index.mjs.map +1 -1
- package/build/main.css +116 -191
- package/build/styles/Snackbar/Snackbar.css +117 -54
- package/build/styles/main.css +116 -191
- 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 -5
- 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 +3 -3
- 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 +989 -119
- package/src/Snackbar/Snackbar.tsx +208 -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 +66 -0
- package/src/Snackbar/_stories/Snackbar.migration.docs.mdx +64 -0
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +16 -8
- package/src/Snackbar/_stories/Snackbar.story.tsx +389 -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 -14
- package/src/main.css +116 -191
- package/src/main.less +0 -2
- package/build/CardContainer/CardContainer.js +0 -33
- package/build/CardContainer/CardContainer.js.map +0 -1
- package/build/CardContainer/CardContainer.mjs +0 -29
- package/build/CardContainer/CardContainer.mjs.map +0 -1
- package/build/CardWidget/CardWidget.js +0 -94
- package/build/CardWidget/CardWidget.js.map +0 -1
- package/build/CardWidget/CardWidget.mjs +0 -90
- package/build/CardWidget/CardWidget.mjs.map +0 -1
- package/build/CardWidget/CardWidgetAction.js +0 -70
- package/build/CardWidget/CardWidgetAction.js.map +0 -1
- package/build/CardWidget/CardWidgetAction.mjs +0 -65
- package/build/CardWidget/CardWidgetAction.mjs.map +0 -1
- package/build/styles/CardContainer/CardContainer.css +0 -74
- package/build/styles/CardWidget/CardWidget.css +0 -64
- package/build/types/CardContainer/CardContainer.d.ts +0 -8
- package/build/types/CardContainer/CardContainer.d.ts.map +0 -1
- package/build/types/CardContainer/CardContainer.types.d.ts +0 -44
- package/build/types/CardContainer/CardContainer.types.d.ts.map +0 -1
- package/build/types/CardContainer/_stories/helpers.d.ts +0 -3
- package/build/types/CardContainer/_stories/helpers.d.ts.map +0 -1
- package/build/types/CardContainer/index.d.ts +0 -3
- package/build/types/CardContainer/index.d.ts.map +0 -1
- package/build/types/CardWidget/CardWidget.d.ts +0 -8
- package/build/types/CardWidget/CardWidget.d.ts.map +0 -1
- package/build/types/CardWidget/CardWidget.types.d.ts +0 -52
- package/build/types/CardWidget/CardWidget.types.d.ts.map +0 -1
- package/build/types/CardWidget/CardWidgetAction.d.ts +0 -54
- package/build/types/CardWidget/CardWidgetAction.d.ts.map +0 -1
- package/build/types/CardWidget/index.d.ts +0 -4
- package/build/types/CardWidget/index.d.ts.map +0 -1
- package/src/CardContainer/CardContainer.css +0 -74
- package/src/CardContainer/CardContainer.less +0 -112
- package/src/CardContainer/CardContainer.test.tsx +0 -118
- package/src/CardContainer/CardContainer.tsx +0 -39
- package/src/CardContainer/CardContainer.types.ts +0 -50
- package/src/CardContainer/_stories/CardContainer.story.tsx +0 -136
- package/src/CardContainer/_stories/CardContainer.test.story.tsx +0 -103
- package/src/CardContainer/_stories/helpers.tsx +0 -50
- package/src/CardContainer/index.ts +0 -6
- package/src/CardWidget/CardWidget.css +0 -64
- package/src/CardWidget/CardWidget.less +0 -82
- package/src/CardWidget/CardWidget.test.tsx +0 -189
- package/src/CardWidget/CardWidget.tsx +0 -74
- package/src/CardWidget/CardWidget.types.ts +0 -60
- package/src/CardWidget/CardWidgetAction.tsx +0 -126
- package/src/CardWidget/_stories/CardWidget.story.tsx +0 -209
- package/src/CardWidget/_stories/CardWidget.test.story.tsx +0 -350
- package/src/CardWidget/index.ts +0 -3
|
@@ -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
|
@@ -4,17 +4,6 @@
|
|
|
4
4
|
* Types
|
|
5
5
|
*/
|
|
6
6
|
export type { ContainerProps } from './Container';
|
|
7
|
-
export type {
|
|
8
|
-
CardContainerProps,
|
|
9
|
-
CardContainerSpotlight,
|
|
10
|
-
CardContainerPadding,
|
|
11
|
-
} from './CardContainer';
|
|
12
|
-
export type {
|
|
13
|
-
CardWidgetProps,
|
|
14
|
-
CardWidgetHeader,
|
|
15
|
-
CardWidgetTitleAction,
|
|
16
|
-
CardWidgetActionButton,
|
|
17
|
-
} from './CardWidget';
|
|
18
7
|
export type { LogoProps, LogoSize, LogoAssetName } from './Logo';
|
|
19
8
|
export type { FlowNavigationProps, CriticalBannerLegacyData } from './FlowNavigation';
|
|
20
9
|
export type { AccordionItem, AccordionProps } from './Accordion';
|
|
@@ -146,7 +135,7 @@ export type {
|
|
|
146
135
|
SelectProps,
|
|
147
136
|
} from './_deprecated/Select';
|
|
148
137
|
export type { SlidingPanelProps } from './SlidingPanel';
|
|
149
|
-
export type {
|
|
138
|
+
export type { SnackbarCreationProps, SnackbarProviderProps } from './Snackbar';
|
|
150
139
|
export type { SnackbarContextType } from './Snackbar/SnackbarContext';
|
|
151
140
|
export type { StatusIconProps, StatusIconSentiment } from './StatusIcon';
|
|
152
141
|
export type { StickyProps } from './Sticky';
|
|
@@ -229,8 +218,6 @@ export { default as Chevron } from './Chevron';
|
|
|
229
218
|
export { Chip, default as Chips } from './Chips';
|
|
230
219
|
export { default as CircularButton } from './CircularButton';
|
|
231
220
|
export { default as Container } from './Container';
|
|
232
|
-
export { default as CardContainer } from './CardContainer';
|
|
233
|
-
export { default as CardWidget } from './CardWidget';
|
|
234
221
|
export { default as Option } from './common/Option';
|
|
235
222
|
export { default as BottomSheet } from './common/BottomSheet';
|
|
236
223
|
export { default as BaseCard } from './common/BaseCard';
|
package/src/main.css
CHANGED
|
@@ -26203,144 +26203,6 @@ a[data-toggle="tooltip"] {
|
|
|
26203
26203
|
.wds-container--fluid {
|
|
26204
26204
|
max-inline-size: var(--wds-container-width-fluid);
|
|
26205
26205
|
}
|
|
26206
|
-
.wds-card-container {
|
|
26207
|
-
/**
|
|
26208
|
-
* There is no shadow or elevation token in @transferwise/neptune-tokens, so the active
|
|
26209
|
-
* spotlight's resting shadow is component-scoped for now, the way PromoCard scopes
|
|
26210
|
-
* `--Card-box-shadow`. The value is the "Module shadow" effect style from Figma: `#0e0f0c` at
|
|
26211
|
-
* 4%, kept literal so it doesn't drift with a theme's tokens. Collapses to a token reference
|
|
26212
|
-
* once one is minted.
|
|
26213
|
-
*/
|
|
26214
|
-
--CardContainer-shadow-color: rgba(14, 15, 12, 0.04);
|
|
26215
|
-
--CardContainer-shadow: 0 2px 12px var(--CardContainer-shadow-color), 0 2px 32px var(--CardContainer-shadow-color);
|
|
26216
|
-
--CardContainer-background-color: var(--color-background-screen);
|
|
26217
|
-
--CardContainer-border-color: var(--color-border-neutral);
|
|
26218
|
-
--CardContainer-border-radius: var(--radius-large);
|
|
26219
|
-
--CardContainer-padding-block: var(--size-8);
|
|
26220
|
-
--CardContainer-padding-inline: var(--size-8);
|
|
26221
|
-
background-color: var(--CardContainer-background-color);
|
|
26222
|
-
border: 1px solid var(--CardContainer-border-color);
|
|
26223
|
-
border-radius: var(--CardContainer-border-radius);
|
|
26224
|
-
box-sizing: border-box;
|
|
26225
|
-
display: flex;
|
|
26226
|
-
flex-direction: column;
|
|
26227
|
-
padding-block: var(--CardContainer-padding-block);
|
|
26228
|
-
padding-inline: var(--CardContainer-padding-inline);
|
|
26229
|
-
inline-size: 100%;
|
|
26230
|
-
}
|
|
26231
|
-
@media (min-width: 840px) {
|
|
26232
|
-
.wds-card-container {
|
|
26233
|
-
--CardContainer-padding-block: var(--size-16);
|
|
26234
|
-
--CardContainer-padding-inline: var(--size-16);
|
|
26235
|
-
}
|
|
26236
|
-
}
|
|
26237
|
-
.wds-card-container--padding-none {
|
|
26238
|
-
--CardContainer-padding-block: 0;
|
|
26239
|
-
--CardContainer-padding-inline: 0;
|
|
26240
|
-
overflow: clip;
|
|
26241
|
-
}
|
|
26242
|
-
.wds-card-container--active {
|
|
26243
|
-
--CardContainer-background-color: var(--color-background-elevated);
|
|
26244
|
-
--CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
|
|
26245
|
-
}
|
|
26246
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--bright-green):not(.np-theme-personal--forest-green):not(.np-theme-business--dark):not(.np-theme-business--bright-green):not(.np-theme-business--forest-green):not(.np-theme-platform--forest-green) .wds-card-container--active {
|
|
26247
|
-
box-shadow: var(--CardContainer-shadow);
|
|
26248
|
-
}
|
|
26249
|
-
.wds-card-container--inactive {
|
|
26250
|
-
--CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
26251
|
-
border-width: 0;
|
|
26252
|
-
padding-block: calc(var(--CardContainer-padding-block) + 1px);
|
|
26253
|
-
padding-inline: calc(var(--CardContainer-padding-inline) + 1px);
|
|
26254
|
-
position: relative;
|
|
26255
|
-
}
|
|
26256
|
-
.wds-card-container__border {
|
|
26257
|
-
container-type: size;
|
|
26258
|
-
inset: 0;
|
|
26259
|
-
pointer-events: none;
|
|
26260
|
-
position: absolute;
|
|
26261
|
-
}
|
|
26262
|
-
.wds-card-container__border svg {
|
|
26263
|
-
display: block;
|
|
26264
|
-
block-size: 100%;
|
|
26265
|
-
inline-size: 100%;
|
|
26266
|
-
}
|
|
26267
|
-
.wds-card-container__border rect {
|
|
26268
|
-
--CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
|
|
26269
|
-
--CardContainer-border-stroke-radius: calc(min(var(--CardContainer-border-radius), 50cqh, 50cqw) - 0.5px);
|
|
26270
|
-
fill: none;
|
|
26271
|
-
block-size: calc(100% - 1px);
|
|
26272
|
-
rx: var(--CardContainer-border-stroke-radius);
|
|
26273
|
-
ry: var(--CardContainer-border-stroke-radius);
|
|
26274
|
-
stroke: var(--color-border-neutral);
|
|
26275
|
-
stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
|
|
26276
|
-
inline-size: calc(100% - 1px);
|
|
26277
|
-
x: 0.5px;
|
|
26278
|
-
y: 0.5px;
|
|
26279
|
-
}
|
|
26280
|
-
.wds-card-widget {
|
|
26281
|
-
--CardWidget-inset: var(--size-8);
|
|
26282
|
-
--CardWidget-header-spacing: var(--size-8);
|
|
26283
|
-
--CardWidget-actions-gap: var(--size-8);
|
|
26284
|
-
}
|
|
26285
|
-
.wds-card-widget__header {
|
|
26286
|
-
align-items: center;
|
|
26287
|
-
-moz-column-gap: var(--size-24);
|
|
26288
|
-
column-gap: var(--size-24);
|
|
26289
|
-
container-type: inline-size;
|
|
26290
|
-
display: flex;
|
|
26291
|
-
flex-wrap: wrap;
|
|
26292
|
-
padding-inline-start: var(--CardWidget-inset);
|
|
26293
|
-
row-gap: var(--size-8);
|
|
26294
|
-
}
|
|
26295
|
-
.wds-card-widget__header:not(:last-child) {
|
|
26296
|
-
margin-block-end: var(--CardWidget-header-spacing);
|
|
26297
|
-
}
|
|
26298
|
-
.wds-card-widget__title {
|
|
26299
|
-
align-items: center;
|
|
26300
|
-
color: var(--color-content-secondary);
|
|
26301
|
-
display: grid;
|
|
26302
|
-
flex: 1 1 0;
|
|
26303
|
-
margin: 0;
|
|
26304
|
-
min-block-size: var(--size-32);
|
|
26305
|
-
}
|
|
26306
|
-
@container (width <= 360px) {
|
|
26307
|
-
.wds-card-widget__title {
|
|
26308
|
-
flex-basis: auto;
|
|
26309
|
-
}
|
|
26310
|
-
}
|
|
26311
|
-
.wds-card-widget__title-link.np-link {
|
|
26312
|
-
color: inherit;
|
|
26313
|
-
display: inline;
|
|
26314
|
-
font: inherit;
|
|
26315
|
-
letter-spacing: inherit;
|
|
26316
|
-
text-align: start;
|
|
26317
|
-
-webkit-text-decoration: none;
|
|
26318
|
-
text-decoration: none;
|
|
26319
|
-
}
|
|
26320
|
-
.wds-card-widget__title-link.np-link:hover,
|
|
26321
|
-
.wds-card-widget__title-link.np-link:focus-visible {
|
|
26322
|
-
-webkit-text-decoration: underline;
|
|
26323
|
-
text-decoration: underline;
|
|
26324
|
-
}
|
|
26325
|
-
.wds-card-widget__title-link.np-link .wds-card-widget__title-chevron {
|
|
26326
|
-
white-space: nowrap;
|
|
26327
|
-
}
|
|
26328
|
-
.wds-card-widget__title-link.np-link .wds-card-widget__title-chevron .tw-icon {
|
|
26329
|
-
display: inline-block;
|
|
26330
|
-
margin: 0;
|
|
26331
|
-
vertical-align: text-bottom;
|
|
26332
|
-
}
|
|
26333
|
-
.wds-card-widget__actions {
|
|
26334
|
-
align-self: start;
|
|
26335
|
-
align-items: center;
|
|
26336
|
-
display: flex;
|
|
26337
|
-
flex: none;
|
|
26338
|
-
gap: var(--CardWidget-actions-gap);
|
|
26339
|
-
margin-inline-start: auto;
|
|
26340
|
-
}
|
|
26341
|
-
.wds-card-widget--with-header .wds-card-widget__content {
|
|
26342
|
-
padding-inline: var(--CardWidget-inset);
|
|
26343
|
-
}
|
|
26344
26206
|
.critical-comms {
|
|
26345
26207
|
border-radius: var(--radius-medium);
|
|
26346
26208
|
overflow: hidden;
|
|
@@ -31460,75 +31322,138 @@ button.np-link {
|
|
|
31460
31322
|
[dir="rtl"] .np-theme-personal .sliding-panel.sliding-panel--border-left {
|
|
31461
31323
|
box-shadow: inset 1px 0 0 0 var(--color-border-neutral);
|
|
31462
31324
|
}
|
|
31463
|
-
.
|
|
31464
|
-
|
|
31325
|
+
.wds-Snackbar {
|
|
31326
|
+
display: flex;
|
|
31327
|
+
justify-content: center;
|
|
31328
|
+
box-sizing: border-box;
|
|
31329
|
+
padding-inline: var(--size-16);
|
|
31330
|
+
padding-block-end: calc(var(--size-16) + env(safe-area-inset-bottom));
|
|
31465
31331
|
position: fixed;
|
|
31466
31332
|
inset-block-end: 0;
|
|
31467
|
-
inset-inline
|
|
31468
|
-
inset-inline-end: 0;
|
|
31333
|
+
inset-inline: 0;
|
|
31469
31334
|
z-index: 1060;
|
|
31470
31335
|
}
|
|
31471
|
-
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31476
|
-
|
|
31477
|
-
|
|
31478
|
-
|
|
31336
|
+
@media (min-width: 600px) {
|
|
31337
|
+
.wds-Snackbar {
|
|
31338
|
+
padding-block-end: var(--size-24);
|
|
31339
|
+
}
|
|
31340
|
+
}
|
|
31341
|
+
.wds-Snackbar--swipe-dismiss {
|
|
31342
|
+
transition: transform var(--Snackbar-exit-duration) cubic-bezier(1, 0, 1, 1);
|
|
31343
|
+
}
|
|
31344
|
+
.wds-Snackbar--swipe-settle {
|
|
31345
|
+
transition: transform var(--Snackbar-exit-duration) cubic-bezier(0, 0, 0, 1);
|
|
31346
|
+
}
|
|
31347
|
+
.wds-Snackbar-container {
|
|
31348
|
+
--Prompt-border-radius: var(--radius-medium);
|
|
31349
|
+
--Prompt-gap: var(--size-8);
|
|
31350
|
+
--Prompt-padding-x: var(--size-12);
|
|
31351
|
+
--Prompt-padding-y: var(--size-12);
|
|
31352
|
+
box-sizing: border-box;
|
|
31353
|
+
max-inline-size: 480px;
|
|
31479
31354
|
text-align: start;
|
|
31480
|
-
|
|
31481
|
-
|
|
31482
|
-
margin-inline: var(--size-16);
|
|
31483
|
-
padding-block: var(--size-8);
|
|
31484
|
-
padding-inline: var(--size-16);
|
|
31485
|
-
inline-size: calc(100% - var(--size-32));
|
|
31486
|
-
transition: 400ms cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
31355
|
+
cursor: grab;
|
|
31356
|
+
touch-action: pan-x pinch-zoom;
|
|
31487
31357
|
}
|
|
31488
|
-
.
|
|
31489
|
-
|
|
31490
|
-
position: relative;
|
|
31491
|
-
background: var(--color-contrast-theme);
|
|
31492
|
-
border-radius: var(--radius-small);
|
|
31493
|
-
color: var(--color-contrast-overlay);
|
|
31358
|
+
.wds-Snackbar-container .wds-prompt__content-wrapper--with-dismiss {
|
|
31359
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
31494
31360
|
}
|
|
31495
|
-
|
|
31496
|
-
|
|
31497
|
-
|
|
31498
|
-
|
|
31499
|
-
inline-size: 100%;
|
|
31500
|
-
content: "";
|
|
31501
|
-
position: absolute;
|
|
31502
|
-
inset-inline-start: 0;
|
|
31503
|
-
inset-block-start: 0;
|
|
31504
|
-
z-index: -1;
|
|
31505
|
-
background-color: var(--color-background-neutral);
|
|
31361
|
+
@media (min-width: 600px) {
|
|
31362
|
+
.wds-Snackbar-container .wds-prompt__content-wrapper--with-dismiss {
|
|
31363
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
31364
|
+
}
|
|
31506
31365
|
}
|
|
31507
|
-
.
|
|
31508
|
-
|
|
31509
|
-
|
|
31366
|
+
.wds-Snackbar-container .wds-prompt__media-wrapper {
|
|
31367
|
+
display: flex;
|
|
31368
|
+
align-items: center;
|
|
31369
|
+
min-block-size: max(var(--size-32), 1lh);
|
|
31370
|
+
padding-block-start: 0;
|
|
31371
|
+
color: var(--color-sentiment-content-primary);
|
|
31372
|
+
}
|
|
31373
|
+
.wds-Snackbar-container .wds-prompt__media-wrapper:has(+ .wds-Snackbar__content .wds-Snackbar__action) {
|
|
31374
|
+
min-block-size: max(var(--size-32), calc(1lh + var(--size-5) * 2));
|
|
31375
|
+
}
|
|
31376
|
+
.wds-Snackbar__media-asset {
|
|
31377
|
+
display: flex;
|
|
31378
|
+
}
|
|
31379
|
+
.wds-Snackbar__media-asset svg {
|
|
31380
|
+
inline-size: var(--size-24);
|
|
31381
|
+
block-size: var(--size-24);
|
|
31382
|
+
}
|
|
31383
|
+
.wds-Snackbar__process-indicator .process-circle {
|
|
31384
|
+
stroke: currentColor;
|
|
31385
|
+
}
|
|
31386
|
+
.wds-Snackbar-container .wds-prompt__dismiss {
|
|
31387
|
+
display: none;
|
|
31388
|
+
align-self: flex-start;
|
|
31389
|
+
margin-block-start: calc(var(--size-4) - 1px);
|
|
31510
31390
|
}
|
|
31511
31391
|
@media (min-width: 600px) {
|
|
31512
|
-
.
|
|
31513
|
-
|
|
31514
|
-
max-inline-size: 600px;
|
|
31392
|
+
.wds-Snackbar-container .wds-prompt__dismiss {
|
|
31393
|
+
display: flex;
|
|
31515
31394
|
}
|
|
31516
31395
|
}
|
|
31517
|
-
.
|
|
31396
|
+
.wds-Snackbar__action {
|
|
31518
31397
|
flex-shrink: 0;
|
|
31519
|
-
margin-inline-start: var(--size-16);
|
|
31520
31398
|
}
|
|
31521
|
-
.
|
|
31522
|
-
|
|
31523
|
-
|
|
31399
|
+
.wds-Snackbar__content {
|
|
31400
|
+
display: flex;
|
|
31401
|
+
align-items: flex-start;
|
|
31402
|
+
gap: var(--size-8);
|
|
31403
|
+
flex: 1 0 0;
|
|
31404
|
+
min-block-size: var(--size-32);
|
|
31405
|
+
min-inline-size: 0;
|
|
31524
31406
|
}
|
|
31525
|
-
.
|
|
31526
|
-
|
|
31527
|
-
|
|
31407
|
+
.wds-Snackbar__message {
|
|
31408
|
+
display: flex;
|
|
31409
|
+
flex-direction: column;
|
|
31410
|
+
justify-content: center;
|
|
31411
|
+
inline-size: auto;
|
|
31412
|
+
flex: 1 0 0;
|
|
31413
|
+
min-inline-size: 0;
|
|
31414
|
+
align-self: stretch;
|
|
31528
31415
|
}
|
|
31529
|
-
|
|
31530
|
-
|
|
31531
|
-
|
|
31416
|
+
.wds-Snackbar__body {
|
|
31417
|
+
display: block;
|
|
31418
|
+
}
|
|
31419
|
+
.wds-Snackbar-container-appear,
|
|
31420
|
+
.wds-Snackbar-container-enter {
|
|
31421
|
+
opacity: 0;
|
|
31422
|
+
transform: translateY(80px) scale(0.5);
|
|
31423
|
+
}
|
|
31424
|
+
.wds-Snackbar-container-appear-active,
|
|
31425
|
+
.wds-Snackbar-container-enter-active {
|
|
31426
|
+
opacity: 1;
|
|
31427
|
+
transform: translateY(0) scale(1);
|
|
31428
|
+
transition: opacity 150ms linear, transform var(--Snackbar-enter-duration) cubic-bezier(0, 0, 0, 1);
|
|
31429
|
+
}
|
|
31430
|
+
.wds-Snackbar-container-exit {
|
|
31431
|
+
opacity: 1;
|
|
31432
|
+
transform: translateY(0) scale(1);
|
|
31433
|
+
}
|
|
31434
|
+
.wds-Snackbar-container-exit-active {
|
|
31435
|
+
opacity: 0;
|
|
31436
|
+
transform: translateY(80px) scale(0.5);
|
|
31437
|
+
transition: opacity 50ms linear 50ms, transform var(--Snackbar-exit-duration) cubic-bezier(1, 0, 1, 1);
|
|
31438
|
+
}
|
|
31439
|
+
@media (prefers-reduced-motion: reduce) {
|
|
31440
|
+
.wds-Snackbar--swipe-dismiss,
|
|
31441
|
+
.wds-Snackbar--swipe-settle {
|
|
31442
|
+
transition: none;
|
|
31443
|
+
}
|
|
31444
|
+
.wds-Snackbar-container-appear,
|
|
31445
|
+
.wds-Snackbar-container-appear-active,
|
|
31446
|
+
.wds-Snackbar-container-enter,
|
|
31447
|
+
.wds-Snackbar-container-enter-active,
|
|
31448
|
+
.wds-Snackbar-container-exit {
|
|
31449
|
+
opacity: 1;
|
|
31450
|
+
transform: none;
|
|
31451
|
+
transition: none;
|
|
31452
|
+
}
|
|
31453
|
+
.wds-Snackbar-container-exit-active {
|
|
31454
|
+
opacity: 0;
|
|
31455
|
+
transform: none;
|
|
31456
|
+
transition: none;
|
|
31532
31457
|
}
|
|
31533
31458
|
}
|
|
31534
31459
|
.status-circle.negative,
|
package/src/main.less
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
@import "./PocketSurface/PocketSurface.less";
|
|
5
5
|
|
|
6
6
|
@import "./Container/Container.less";
|
|
7
|
-
@import "./CardContainer/CardContainer.less";
|
|
8
|
-
@import "./CardWidget/CardWidget.less";
|
|
9
7
|
@import "./_deprecated/CriticalBanner/CriticalCommsBanner.less";
|
|
10
8
|
@import "./Accordion/Accordion.less";
|
|
11
9
|
@import "./_deprecated/ActionButton/ActionButton.less";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
|
|
9
|
-
const CardContainer = /*#__PURE__*/React.forwardRef(({
|
|
10
|
-
spotlight,
|
|
11
|
-
padding = 'md',
|
|
12
|
-
children,
|
|
13
|
-
as: Element = 'section',
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}, ref) => {
|
|
17
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Element, {
|
|
18
|
-
ref: ref,
|
|
19
|
-
className: clsx.clsx('wds-card-container', spotlight && `wds-card-container--${spotlight}`, padding === 'none' && 'wds-card-container--padding-none', className),
|
|
20
|
-
...props,
|
|
21
|
-
children: [children, spotlight === 'inactive' && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
22
|
-
"aria-hidden": "true",
|
|
23
|
-
className: "wds-card-container__border",
|
|
24
|
-
children: /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
25
|
-
children: /*#__PURE__*/jsxRuntime.jsx("rect", {})
|
|
26
|
-
})
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
CardContainer.displayName = 'CardContainer';
|
|
31
|
-
|
|
32
|
-
exports.default = CardContainer;
|
|
33
|
-
//# sourceMappingURL=CardContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardContainer.js","sources":["../../src/CardContainer/CardContainer.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { CardContainerProps } from './CardContainer.types';\n\n/**\n * A bounded surface that groups related content. It has no slots of its own: children are stacked\n * with no gap between them. For a card with a title and actions, use `CardWidget`.\n */\nconst CardContainer = forwardRef<HTMLElement, CardContainerProps>(\n ({ spotlight, padding = 'md', children, as: Element = 'section', className, ...props }, ref) => {\n return (\n <Element\n ref={ref as React.Ref<HTMLElement & HTMLDivElement>}\n className={clsx(\n 'wds-card-container',\n spotlight && `wds-card-container--${spotlight}`,\n padding === 'none' && 'wds-card-container--padding-none',\n className,\n )}\n {...props}\n >\n {children}\n\n {spotlight === 'inactive' && (\n <span aria-hidden=\"true\" className=\"wds-card-container__border\">\n <svg>\n <rect />\n </svg>\n </span>\n )}\n </Element>\n );\n },\n);\n\nCardContainer.displayName = 'CardContainer';\n\nexport default CardContainer;\n"],"names":["CardContainer","forwardRef","spotlight","padding","children","as","Element","className","props","ref","_jsxs","clsx","_jsx","displayName"],"mappings":";;;;;;;;AASA,MAAMA,aAAa,gBAAGC,gBAAU,CAC9B,CAAC;EAAEC,SAAS;AAAEC,EAAAA,OAAO,GAAG,IAAI;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,OAAO,GAAG,SAAS;EAAEC,SAAS;EAAE,GAAGC;AAAK,CAAE,EAAEC,GAAG,KAAI;EAC7F,oBACEC,eAAA,CAACJ,OAAO,EAAA;AACNG,IAAAA,GAAG,EAAEA,GAA+C;AACpDF,IAAAA,SAAS,EAAEI,SAAI,CACb,oBAAoB,EACpBT,SAAS,IAAI,CAAA,oBAAA,EAAuBA,SAAS,CAAA,CAAE,EAC/CC,OAAO,KAAK,MAAM,IAAI,kCAAkC,EACxDI,SAAS,CACT;AAAA,IAAA,GACEC,KAAK;AAAAJ,IAAAA,QAAA,GAERA,QAAQ,EAERF,SAAS,KAAK,UAAU,iBACvBU,cAAA,CAAA,MAAA,EAAA;AAAM,MAAA,aAAA,EAAY,MAAM;AAACL,MAAAA,SAAS,EAAC,4BAA4B;AAAAH,MAAAA,QAAA,eAC7DQ,cAAA,CAAA,KAAA,EAAA;QAAAR,QAAA,eACEQ,cAAA,CAAA,MAAA,EAAA,EAAK;OACF;AACP,KAAM,CACP;AAAA,GACM,CAAC;AAEd,CAAC;AAGHZ,aAAa,CAACa,WAAW,GAAG,eAAe;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
const CardContainer = /*#__PURE__*/forwardRef(({
|
|
6
|
-
spotlight,
|
|
7
|
-
padding = 'md',
|
|
8
|
-
children,
|
|
9
|
-
as: Element = 'section',
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}, ref) => {
|
|
13
|
-
return /*#__PURE__*/jsxs(Element, {
|
|
14
|
-
ref: ref,
|
|
15
|
-
className: clsx('wds-card-container', spotlight && `wds-card-container--${spotlight}`, padding === 'none' && 'wds-card-container--padding-none', className),
|
|
16
|
-
...props,
|
|
17
|
-
children: [children, spotlight === 'inactive' && /*#__PURE__*/jsx("span", {
|
|
18
|
-
"aria-hidden": "true",
|
|
19
|
-
className: "wds-card-container__border",
|
|
20
|
-
children: /*#__PURE__*/jsx("svg", {
|
|
21
|
-
children: /*#__PURE__*/jsx("rect", {})
|
|
22
|
-
})
|
|
23
|
-
})]
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
CardContainer.displayName = 'CardContainer';
|
|
27
|
-
|
|
28
|
-
export { CardContainer as default };
|
|
29
|
-
//# sourceMappingURL=CardContainer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardContainer.mjs","sources":["../../src/CardContainer/CardContainer.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { CardContainerProps } from './CardContainer.types';\n\n/**\n * A bounded surface that groups related content. It has no slots of its own: children are stacked\n * with no gap between them. For a card with a title and actions, use `CardWidget`.\n */\nconst CardContainer = forwardRef<HTMLElement, CardContainerProps>(\n ({ spotlight, padding = 'md', children, as: Element = 'section', className, ...props }, ref) => {\n return (\n <Element\n ref={ref as React.Ref<HTMLElement & HTMLDivElement>}\n className={clsx(\n 'wds-card-container',\n spotlight && `wds-card-container--${spotlight}`,\n padding === 'none' && 'wds-card-container--padding-none',\n className,\n )}\n {...props}\n >\n {children}\n\n {spotlight === 'inactive' && (\n <span aria-hidden=\"true\" className=\"wds-card-container__border\">\n <svg>\n <rect />\n </svg>\n </span>\n )}\n </Element>\n );\n },\n);\n\nCardContainer.displayName = 'CardContainer';\n\nexport default CardContainer;\n"],"names":["CardContainer","forwardRef","spotlight","padding","children","as","Element","className","props","ref","_jsxs","clsx","_jsx","displayName"],"mappings":";;;;AASA,MAAMA,aAAa,gBAAGC,UAAU,CAC9B,CAAC;EAAEC,SAAS;AAAEC,EAAAA,OAAO,GAAG,IAAI;EAAEC,QAAQ;EAAEC,EAAE,EAAEC,OAAO,GAAG,SAAS;EAAEC,SAAS;EAAE,GAAGC;AAAK,CAAE,EAAEC,GAAG,KAAI;EAC7F,oBACEC,IAAA,CAACJ,OAAO,EAAA;AACNG,IAAAA,GAAG,EAAEA,GAA+C;AACpDF,IAAAA,SAAS,EAAEI,IAAI,CACb,oBAAoB,EACpBT,SAAS,IAAI,CAAA,oBAAA,EAAuBA,SAAS,CAAA,CAAE,EAC/CC,OAAO,KAAK,MAAM,IAAI,kCAAkC,EACxDI,SAAS,CACT;AAAA,IAAA,GACEC,KAAK;AAAAJ,IAAAA,QAAA,GAERA,QAAQ,EAERF,SAAS,KAAK,UAAU,iBACvBU,GAAA,CAAA,MAAA,EAAA;AAAM,MAAA,aAAA,EAAY,MAAM;AAACL,MAAAA,SAAS,EAAC,4BAA4B;AAAAH,MAAAA,QAAA,eAC7DQ,GAAA,CAAA,KAAA,EAAA;QAAAR,QAAA,eACEQ,GAAA,CAAA,MAAA,EAAA,EAAK;OACF;AACP,KAAM,CACP;AAAA,GACM,CAAC;AAEd,CAAC;AAGHZ,aAAa,CAACa,WAAW,GAAG,eAAe;;"}
|