@yamatozhen/design_system 1.0.1 → 1.2.1

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.
Files changed (156) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +101 -101
  3. package/package.json +50 -50
  4. package/scripts/postinstall.js +91 -91
  5. package/template/app/ClientNav.tsx +258 -310
  6. package/template/app/globals.css +2 -167
  7. package/template/app/layout.tsx +94 -82
  8. package/template/app/themes/dark-mc.css +51 -51
  9. package/template/app/themes/dark.css +51 -51
  10. package/template/app/themes/light-mc.css +51 -51
  11. package/template/app/themes/light.css +51 -51
  12. package/template/app/themes/theme.css +272 -82
  13. package/template/components/{layout/button → (buttons)}/Button.module.css +351 -305
  14. package/template/components/{layout/button → (buttons)}/ButtonGroup.tsx +414 -503
  15. package/template/components/{layout/button → (buttons)}/FAB.tsx +119 -118
  16. package/template/components/(buttons)/button.tsx +164 -0
  17. package/template/components/(controls)/slider/Slider.module.css +250 -0
  18. package/template/components/(controls)/slider/Slider.tsx +386 -0
  19. package/template/components/{layout → (controls)}/switch/Switch.module.css +108 -102
  20. package/template/components/{layout → (controls)}/switch/Switch.tsx +69 -48
  21. package/template/components/(date & time)/calendar/Calendar.module.css +125 -0
  22. package/template/components/(date & time)/calendar/Calendar.tsx +206 -0
  23. package/template/components/(date & time)/dateField/DateField.module.css +25 -0
  24. package/template/components/(date & time)/dateField/DateField.tsx +193 -0
  25. package/template/components/(date & time)/datePicker/DatePicker.tsx +118 -0
  26. package/template/components/(date & time)/dateRangePicker/DateRangePicker.tsx +144 -0
  27. package/template/components/(date & time)/rangeCalendar/RangeCalendar.module.css +203 -0
  28. package/template/components/(date & time)/rangeCalendar/RangeCalendar.tsx +263 -0
  29. package/template/components/(date & time)/shared/dateUtils.ts +107 -0
  30. package/template/components/(date & time)/timeField/TimeField.module.css +39 -0
  31. package/template/components/(date & time)/timeField/TimeField.tsx +158 -0
  32. package/template/components/(feedback)/circularProgress/CircularProgress.tsx +646 -0
  33. package/template/components/(feedback)/linearProgress/LinearProgress.tsx +337 -0
  34. package/template/components/(feedback)/meter/Meter.tsx +111 -0
  35. package/template/components/(feedback)/skeleton/Skeleton.module.css +49 -0
  36. package/template/components/(feedback)/skeleton/Skeleton.tsx +32 -0
  37. package/template/components/(feedback)/spinner/Spinner.module.css +27 -0
  38. package/template/components/(feedback)/spinner/Spinner.tsx +60 -0
  39. package/template/components/(forms)/checkbox/Checkbox.tsx +121 -0
  40. package/template/components/(forms)/checkboxGroup/CheckboxGroup.tsx +83 -0
  41. package/template/components/(forms)/description/Description.tsx +34 -0
  42. package/template/components/(forms)/errorMessage/ErrorMessage.tsx +31 -0
  43. package/template/components/(forms)/fieldError/FieldError.tsx +39 -0
  44. package/template/components/(forms)/fieldset/Fieldset.tsx +51 -0
  45. package/template/components/(forms)/form/Form.tsx +54 -0
  46. package/template/components/(forms)/input/Input.tsx +50 -0
  47. package/template/components/(forms)/inputGroup/InputGroup.tsx +65 -0
  48. package/template/components/(forms)/inputOtp/InputOtp.tsx +139 -0
  49. package/template/components/(forms)/label/Label.tsx +46 -0
  50. package/template/components/(forms)/numberField/NumberField.tsx +292 -0
  51. package/template/components/(forms)/radioGroup/RadioGroup.tsx +175 -0
  52. package/template/components/(forms)/searchField/SearchField.tsx +139 -0
  53. package/template/components/(forms)/shared/field.module.css +75 -0
  54. package/template/components/(forms)/shared/fieldContext.ts +28 -0
  55. package/template/components/(forms)/textArea/TextArea.tsx +55 -0
  56. package/template/components/(forms)/textField/TextField.tsx +91 -0
  57. package/template/components/{layout → (layout)}/Lightbox/LightboxCard.tsx +100 -100
  58. package/template/components/{layout → (layout)}/Lightbox/LightboxGallery.module.css +249 -249
  59. package/template/components/{layout → (layout)}/Lightbox/LightboxGallery.tsx +72 -72
  60. package/template/components/{layout → (layout)}/Lightbox/LightboxGrid.tsx +185 -186
  61. package/template/components/{layout → (layout)}/Lightbox/LightboxModal.module.css +395 -395
  62. package/template/components/{layout → (layout)}/Lightbox/LightboxModal.tsx +498 -500
  63. package/template/components/{layout → (layout)}/Lightbox/demo.tsx +396 -412
  64. package/template/components/{layout → (layout)}/Lightbox/index.ts +30 -30
  65. package/template/components/{layout → (layout)}/Lightbox/types.ts +101 -113
  66. package/template/components/{layout → (layout)}/Lightbox/useLightboxFilters.ts +140 -140
  67. package/template/components/(layout)/accordion/Accordion.module.css +108 -0
  68. package/template/components/(layout)/accordion/Accordion.tsx +251 -0
  69. package/template/components/(layout)/card/Card.module.css +136 -0
  70. package/template/components/(layout)/card/Card.tsx +371 -0
  71. package/template/components/(layout)/list/List.module.css +83 -0
  72. package/template/components/(layout)/list/List.tsx +332 -0
  73. package/template/components/{layout → (layout)}/navigation/Wrap.tsx +41 -41
  74. package/template/components/(layout)/navigation/breadcrumbs/Breadcrumbs.tsx +145 -0
  75. package/template/components/{layout/navigation/nav/Nav.module.css → (layout)/navigation/nav/Nav.module.css.old} +474 -508
  76. package/template/components/{layout → (layout)}/navigation/nav/Nav.tsx +186 -167
  77. package/template/components/{layout → (layout)}/navigation/nav/NavBar.tsx +396 -419
  78. package/template/components/{layout → (layout)}/navigation/nav/NavContext.tsx +259 -259
  79. package/template/components/{layout → (layout)}/navigation/nav/NavItem.tsx +195 -173
  80. package/template/components/{layout → (layout)}/navigation/nav/NavNew.module.css +406 -373
  81. package/template/components/{layout → (layout)}/navigation/nav/NavRail.tsx +317 -315
  82. package/template/components/{layout → (layout)}/navigation/nav/NavSection.tsx +101 -102
  83. package/template/components/{layout → (layout)}/navigation/nav/NavTab.tsx +25 -25
  84. package/template/components/{layout → (layout)}/navigation/nav/navftb/NavFTB.module.css +253 -252
  85. package/template/components/{layout → (layout)}/navigation/nav/navftb/NavFTB.tsx +448 -399
  86. package/template/components/{layout → (layout)}/navigation/nav/navftb/useTabIndicator.ts +498 -484
  87. package/template/components/{layout → (layout)}/navigation/nav/navheader/NavHeader.module.css +59 -59
  88. package/template/components/{layout → (layout)}/navigation/nav/navheader/NavHeader.tsx +465 -473
  89. package/template/components/(layout)/navigation/pagination/Pagination.tsx +261 -0
  90. package/template/components/{layout → (layout)}/pages/loadingScreen.tsx +117 -102
  91. package/template/components/{layout → (layout)}/pages/maintenance/Maintenance.tsx +52 -52
  92. package/template/components/{layout → (layout)}/pages/maintenance/maintenance.module.css +162 -162
  93. package/template/components/(layout)/scrollShadow/ScrollShadow.module.css +81 -0
  94. package/template/components/(layout)/scrollShadow/ScrollShadow.tsx +161 -0
  95. package/template/components/(layout)/scrollShadow/useScrollShadow.ts +130 -0
  96. package/template/components/(layout)/separator/Separator.tsx +112 -0
  97. package/template/components/(overlays)/accessibilityModal/AccessibilityModal.tsx +307 -0
  98. package/template/components/(overlays)/drawer/Drawer.tsx +953 -0
  99. package/template/components/(overlays)/modal/Modal.tsx +654 -0
  100. package/template/components/(overlays)/popover/Popover.tsx +420 -0
  101. package/template/components/(overlays)/toast/Toast.tsx +692 -0
  102. package/template/components/(pickers)/autocomplete/Autocomplete.tsx +24 -0
  103. package/template/components/(pickers)/comboBox/ComboBox.tsx +21 -0
  104. package/template/components/(pickers)/select/Select.tsx +188 -0
  105. package/template/components/(pickers)/shared/FilterableField.tsx +223 -0
  106. package/template/components/(pickers)/shared/PickerItem.ts +13 -0
  107. package/template/components/tools/CustomScrollbar.tsx +107 -0
  108. package/template/components/tools/Divider.tsx +11 -11
  109. package/template/components/tools/ReduceMotionContext.tsx +5 -5
  110. package/template/components/tools/Sinewave.tsx +396 -199
  111. package/template/components/tools/SinewaveProgress.tsx +140 -135
  112. package/template/components/tools/badge/Badge.tsx +28 -28
  113. package/template/components/tools/dropdown/drop.module.css +196 -0
  114. package/template/components/tools/dropdown/drop.tsx +568 -0
  115. package/template/components/tools/easing.ts +118 -0
  116. package/template/components/tools/flubber.d.ts +6 -6
  117. package/template/components/tools/footer/Footer.tsx +20 -0
  118. package/template/components/tools/input/Input.module.css +45 -0
  119. package/template/components/tools/input/Input.tsx +99 -0
  120. package/template/components/tools/label/Icon.tsx +39 -0
  121. package/template/components/tools/label/Label.tsx +156 -0
  122. package/template/components/tools/mobileViewProvider.tsx +53 -58
  123. package/template/components/tools/ripple/ripple.css +38 -41
  124. package/template/components/tools/ripple/ripple.tsx +78 -53
  125. package/template/components/tools/shape/Shape.module.css +25 -0
  126. package/template/components/tools/shape/{ShapeMorph.tsx → Shape.tsx} +316 -190
  127. package/template/components/tools/shape/ShapeLoader.tsx +104 -101
  128. package/template/components/tools/shape/ShapePaths.ts +116 -116
  129. package/template/components/tools/switch/Switch.module.css +102 -102
  130. package/template/components/tools/switch/Switch.tsx +48 -48
  131. package/template/components/tools/useBodyScrollLock.tsx +27 -27
  132. package/template/components/tools/useImageColor.ts +47 -47
  133. package/template/components/tools/useNavSheetDrag.tsx +196 -196
  134. package/template/components/layout/accordion/Accordion.module.css +0 -149
  135. package/template/components/layout/accordion/Accordion.tsx +0 -114
  136. package/template/components/layout/button/button.tsx +0 -128
  137. package/template/components/layout/button/drop.module.css +0 -229
  138. package/template/components/layout/button/drop.tsx +0 -516
  139. package/template/components/layout/hero/v1/heroSlideshow.module.css +0 -107
  140. package/template/components/layout/hero/v1/heroSlideshow.tsx +0 -233
  141. package/template/components/layout/modals/accessibilityModal/AccessibilityModal.module.css +0 -126
  142. package/template/components/layout/modals/accessibilityModal/AccessibilityModal.tsx +0 -290
  143. package/template/components/layout/modals/alert/Alert.tsx +0 -188
  144. package/template/components/layout/navigation/MioCard.module.css +0 -88
  145. package/template/components/layout/navigation/MioCard.tsx +0 -266
  146. package/template/components/tools/ProgressiveBlur.tsx +0 -73
  147. package/template/components/tools/icon/icon.module.css +0 -0
  148. package/template/components/tools/icon/icon.tsx +0 -125
  149. package/template/components/tools/react-bits/ClickSpark.tsx +0 -177
  150. package/template/components/tools/react-bits/FadeContent.tsx +0 -90
  151. package/template/components/tools/react-bits/GlareHover.tsx +0 -73
  152. package/template/components/tools/react-bits/GradientText/GradientText.css +0 -70
  153. package/template/components/tools/react-bits/GradientText/GradientText.tsx +0 -44
  154. package/template/components/tools/react-bits/Magnet.tsx +0 -118
  155. package/template/components/tools/react-bits/Stepper/Stepper.css +0 -134
  156. package/template/components/tools/react-bits/Stepper/Stepper.tsx +0 -412
@@ -0,0 +1,251 @@
1
+ // Accordion.tsx
2
+ //Note, accordion is not meant to be used within Nav.Section
3
+ import React, {
4
+ Children,
5
+ cloneElement,
6
+ isValidElement,
7
+ createContext,
8
+ useContext,
9
+ useCallback,
10
+ useState,
11
+ useMemo,
12
+ } from "react";
13
+ import { AnimatePresence, motion, MotionConfig } from "framer-motion";
14
+ import styles from "./Accordion.module.css";
15
+ import Icon from "@/components/tools/label/Icon";
16
+ import { Badge } from "@/components/tools/badge/Badge";
17
+ import Shape from "@/components/tools/shape/Shape";
18
+ import { useReduceMotion } from "@/components/tools/ReduceMotionContext";
19
+ import Button from "@/components/(buttons)/button";
20
+ import { ShapeInput } from "@/components/tools/shape/ShapePaths";
21
+
22
+ //MARK: Types
23
+ type AccordionProps = {
24
+ children?: React.ReactNode;
25
+ variant?: AccordionGroupVariant;
26
+ };
27
+
28
+ type AccordionTabInjected = {
29
+ isExpanded?: boolean;
30
+ isFirstAbove?: boolean;
31
+ isFirstBelow?: boolean;
32
+ onToggle?: () => void;
33
+ };
34
+
35
+ export type AccordionTabProps = {
36
+ title: string;
37
+ text: string;
38
+ withIcon?: {
39
+ systemName: string;
40
+ shapePath: ShapeInput;
41
+ variant?: AccordionItemVariant;
42
+ };
43
+ withBadge?: {
44
+ variant?: "error" | "primary" | "secondary" | "tertiary";
45
+ title: string;
46
+ };
47
+ } & Partial<AccordionTabInjected>;
48
+
49
+ export type AccordionGroupVariant =
50
+ | "default"
51
+ | "lowest"
52
+ | "low"
53
+ | "high"
54
+ | "highest"
55
+ | "primary"
56
+ | "secondary"
57
+ | "tertiary";
58
+
59
+ export type AccordionItemVariant =
60
+ | "default"
61
+ | "primary"
62
+ | "secondary"
63
+ | "tertiary";
64
+
65
+ type AccordionColorRole = "primary" | "secondary" | "tertiary";
66
+
67
+ //MARK: Colors
68
+ const COLOR_ROLE_VARIANTS = new Set<AccordionGroupVariant>([
69
+ "primary",
70
+ "secondary",
71
+ "tertiary",
72
+ ]);
73
+
74
+ function isColorRole(
75
+ variant: AccordionGroupVariant,
76
+ ): variant is AccordionColorRole {
77
+ return COLOR_ROLE_VARIANTS.has(variant);
78
+ }
79
+
80
+ const DEFAULT_ICON_BG = "var(--globalUIBorderCard)";
81
+ const DEFAULT_ICON_FG = "var(--md-sys-color-on-surface)";
82
+
83
+ function accordionItemColors(variant: AccordionItemVariant) {
84
+ if (variant === "default") {
85
+ return { bg: DEFAULT_ICON_BG, fg: DEFAULT_ICON_FG };
86
+ }
87
+ return {
88
+ bg: `var(--md-sys-color-${variant})`,
89
+ fg: `var(--md-sys-color-on-${variant})`,
90
+ };
91
+ }
92
+
93
+ //MARK: Group context
94
+ interface AccordionGroupContextValue {
95
+ forcedVariant: AccordionColorRole | null;
96
+ groupVariant: AccordionGroupVariant;
97
+ }
98
+ const AccordionGroupContext = createContext<AccordionGroupContextValue>({
99
+ forcedVariant: null,
100
+ groupVariant: "lowest",
101
+ });
102
+
103
+ //MARK: Root
104
+ function AccordionRoot({ children, variant = "lowest" }: AccordionProps) {
105
+ const [expandedIndex, setExpandedIndex] = useState<number | null>(null);
106
+
107
+ const tabs = Children.toArray(children).filter(isValidElement);
108
+
109
+ const handleToggle = useCallback(
110
+ (index: number) =>
111
+ setExpandedIndex((prev) => (prev === index ? null : index)),
112
+ [],
113
+ );
114
+
115
+ const forcedVariant = isColorRole(variant) ? variant : null;
116
+
117
+ const contextValue = useMemo<AccordionGroupContextValue>(
118
+ () => ({ forcedVariant, groupVariant: variant }),
119
+ [forcedVariant, variant],
120
+ );
121
+
122
+ return (
123
+ <ul className={styles.accordionWrapper}>
124
+ <AccordionGroupContext.Provider value={contextValue}>
125
+ {tabs.map((child, index) => {
126
+ if (!isValidElement(child)) return null;
127
+ const isExpanded = expandedIndex === index;
128
+ const isFirstAbove =
129
+ expandedIndex !== null && index === expandedIndex - 1;
130
+ const isFirstBelow =
131
+ expandedIndex !== null && index === expandedIndex + 1;
132
+ return cloneElement(
133
+ child as React.ReactElement<AccordionTabInjected>,
134
+ {
135
+ key: index,
136
+ isExpanded,
137
+ isFirstAbove,
138
+ isFirstBelow,
139
+ onToggle: () => handleToggle(index),
140
+ },
141
+ );
142
+ })}
143
+ </AccordionGroupContext.Provider>
144
+ </ul>
145
+ );
146
+ }
147
+
148
+ //MARK: Tab
149
+ const AccordionTab: React.FC<AccordionTabProps> = ({
150
+ title,
151
+ text,
152
+ isExpanded,
153
+ isFirstAbove,
154
+ isFirstBelow,
155
+ withIcon,
156
+ onToggle,
157
+ withBadge,
158
+ }) => {
159
+ const rm = useReduceMotion();
160
+ const { forcedVariant, groupVariant } = useContext(AccordionGroupContext);
161
+
162
+ const effectiveIconVariant: AccordionItemVariant =
163
+ forcedVariant ?? withIcon?.variant ?? "default";
164
+ const iconColors = accordionItemColors(effectiveIconVariant);
165
+
166
+ const effectiveBadgeVariant = forcedVariant ?? withBadge?.variant;
167
+
168
+ const titleColor = forcedVariant
169
+ ? `var(--md-sys-color-on-${forcedVariant}-container)`
170
+ : "var(--md-sys-color-on-surface)";
171
+ const textColor = forcedVariant
172
+ ? `color-mix(in srgb, var(--md-sys-color-on-${forcedVariant}-container) 75%, transparent)`
173
+ : "var(--md-sys-color-on-surface-variant)";
174
+
175
+ const background = forcedVariant
176
+ ? `var(--md-sys-color-${forcedVariant}-container)`
177
+ : groupVariant === "default"
178
+ ? "var(--md-sys-color-surface-container)"
179
+ : `var(--md-sys-color-surface-container-${groupVariant})`;
180
+
181
+ return (
182
+ <MotionConfig reducedMotion={rm ? "always" : "never"}>
183
+ <li
184
+ className={`${styles.accordionTab} ${isExpanded ? styles.exp : ""}${isFirstAbove ? styles.aboveExp : ""}${isFirstBelow ? styles.belowExp : ""}`}
185
+ onClick={onToggle}
186
+ style={{ backgroundColor: background }}
187
+ >
188
+ <div className={styles.accordionTitle}>
189
+ <div className={styles.accordionTitleInner}>
190
+ {withIcon && (
191
+ <Shape
192
+ systemName={withIcon.systemName}
193
+ shapePath={withIcon.shapePath}
194
+ size="xs"
195
+ background={iconColors.bg}
196
+ color={iconColors.fg}
197
+ interactive={false}
198
+ />
199
+ )}
200
+ <p style={{ color: titleColor }}>{title}</p>
201
+ {withBadge && (
202
+ <Badge badgeVariant={effectiveBadgeVariant}>
203
+ {withBadge.title}
204
+ </Badge>
205
+ )}
206
+ </div>
207
+ <Button
208
+ type="button"
209
+ variant="text"
210
+ aria-label="Increment"
211
+ style={{
212
+ borderRadius: 60,
213
+ padding: 0,
214
+ maxWidth: 36,
215
+ minWidth: 36,
216
+ minHeight: 36,
217
+ maxHeight: 36,
218
+ }}
219
+ >
220
+ <motion.div
221
+ className={styles.accordionChevron}
222
+ animate={{ rotate: isExpanded ? 180 : 0 }}
223
+ transition={{ duration: 0.2, ease: [0.01, 1.25, 0.23, 1.01] }}
224
+ >
225
+ <Icon systemName="keyboard_arrow_down" />
226
+ </motion.div>
227
+ </Button>
228
+ </div>
229
+
230
+ <AnimatePresence initial={false}>
231
+ {isExpanded && (
232
+ <motion.div
233
+ className={styles.accordionTextWrapper}
234
+ initial={{ height: 0, opacity: 0 }}
235
+ animate={{ height: "auto", opacity: 1 }}
236
+ exit={{ height: 0, opacity: 0 }}
237
+ transition={{ duration: 0.4, ease: [0.01, 1.25, 0.23, 1.01] }}
238
+ >
239
+ <p className={styles.accordionText} style={{ color: textColor }}>
240
+ {text}
241
+ </p>
242
+ </motion.div>
243
+ )}
244
+ </AnimatePresence>
245
+ </li>
246
+ </MotionConfig>
247
+ );
248
+ };
249
+
250
+ const Accordion = Object.assign(AccordionRoot, { Tab: AccordionTab });
251
+ export default Accordion;
@@ -0,0 +1,136 @@
1
+ .cardBody {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ padding: 24px;
6
+ border-radius: var(--borderRadius-md);
7
+ background-color: var(--card-idle-bg, transparent);
8
+ overflow: hidden;
9
+ transition:
10
+ background-color var(--transition-expressive-color),
11
+ border-radius var(--transition-expressive-fast);
12
+ }
13
+
14
+ /* Inset outline, as a positioned pseudo-element rather than cardBody's own
15
+ box-shadow — an element's own box-shadow paints behind its children, so a
16
+ bled-through first-child image would otherwise cover it. This paints
17
+ after normal in-flow children (like that image), on top. Present in both
18
+ elevated and non-elevated modes — elevated only adds outer drop-shadow
19
+ layers on top of this, kept separately on cardBody itself (an outer
20
+ shadow on this pseudo-element would get clipped by cardBody's own
21
+ overflow: hidden; cardBody's own box-shadow isn't). */
22
+ .cardBody::before {
23
+ content: "";
24
+ position: absolute;
25
+ inset: 0;
26
+ z-index: 1;
27
+ border-radius: inherit;
28
+ pointer-events: none;
29
+ }
30
+
31
+ /* Row holding the content column + withIcon's Shape, side by side. */
32
+ .cardRow {
33
+ display: flex;
34
+ flex-direction: row;
35
+ justify-content: space-between;
36
+ align-items: flex-start;
37
+ width: 100%;
38
+ }
39
+
40
+ /* Content column: Header/Content/Footer stack here — this is where the
41
+ card's old min-height/min-width/gap live now, since .cardBody itself
42
+ may also hold a full-bleed image and a side-by-side icon. */
43
+ .cardColumn {
44
+ display: flex;
45
+ flex-direction: column;
46
+ flex: 1;
47
+ min-height: 60px;
48
+ min-width: 102px;
49
+ gap: 12px;
50
+ }
51
+
52
+ .cardBody.interactive {
53
+ cursor: pointer;
54
+ }
55
+
56
+ .cardBody.interactive:hover {
57
+ border-radius: calc(
58
+ var(--borderRadius-md) + calc(var(--borderRadius-sm) / 1.4)
59
+ );
60
+ background-color: var(--md-sys-color-secondary-container);
61
+ }
62
+
63
+ .cardBody.interactive:active {
64
+ border-radius: calc(var(--borderRadius-md) - var(--borderRadius-xs));
65
+ }
66
+
67
+ /* MD3 state layer — composited replacement for `filter: brightness`.
68
+ Animating opacity stays on the GPU instead of repainting the image + SVG. */
69
+ .cardBody.interactive::after {
70
+ content: "";
71
+ position: absolute;
72
+ inset: 0;
73
+ z-index: -1;
74
+ border-radius: inherit;
75
+ background-color: var(--md-sys-color-on-surface);
76
+ opacity: 0;
77
+ pointer-events: none;
78
+ transition: opacity var(--transition-expressive-color);
79
+ }
80
+
81
+ .cardBody.interactive:hover::after {
82
+ opacity: 0.08;
83
+ }
84
+
85
+ .cardBody.interactive:active::after {
86
+ opacity: 0.12;
87
+ }
88
+
89
+ /* ── Accessibility: Show Borders ──────────────────────────────────────────── */
90
+ :global([data-show-borders="true"]) .cardBody {
91
+ box-shadow: var(--a11y-border);
92
+ }
93
+
94
+ .cardBody :global(.ripple) {
95
+ background-color: var(--globalUIBorderCard) !important;
96
+ opacity: 1;
97
+ animation: ripple-animation 1200ms linear;
98
+ }
99
+
100
+ .cardBody img {
101
+ border-radius: 12px;
102
+ width: 100%;
103
+ min-height: 260px;
104
+ }
105
+
106
+ .cardBody > img:first-child {
107
+ border-radius: 12px 12px 0 0;
108
+ margin: -24px -24px 16px -24px;
109
+ min-width: calc(100% + 48px);
110
+ min-height: 260px;
111
+ }
112
+
113
+ :global([data-show-borders="true"]) .cardBody {
114
+ box-shadow: var(--a11y-border) !important;
115
+ }
116
+
117
+ @keyframes ripple-animation {
118
+ to {
119
+ transform: scale(4);
120
+ opacity: 0;
121
+ }
122
+ }
123
+
124
+ @media screen and (max-width: 812px) {
125
+ .cardBody {
126
+ border-radius: var(--borderRadius-l);
127
+ }
128
+
129
+ .cardBody.interactive:hover {
130
+ border-radius: calc(var(--borderRadius-l) + 24px);
131
+ }
132
+
133
+ .cardBody.interactive:active {
134
+ border-radius: var(--borderRadius-l);
135
+ }
136
+ }