@yamatozhen/design_system 1.0.0
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/LICENSE +201 -0
- package/README.md +101 -0
- package/package.json +49 -0
- package/scripts/postinstall.js +105 -0
- package/template/app/ClientNav.tsx +310 -0
- package/template/app/globals.css +167 -0
- package/template/app/layout.tsx +128 -0
- package/template/app/themes/dark-mc.css +51 -0
- package/template/app/themes/dark.css +51 -0
- package/template/app/themes/light-mc.css +51 -0
- package/template/app/themes/light.css +51 -0
- package/template/app/themes/theme.css +82 -0
- package/template/components/layout/Lightbox/LightboxCard.tsx +100 -0
- package/template/components/layout/Lightbox/LightboxGallery.module.css +249 -0
- package/template/components/layout/Lightbox/LightboxGallery.tsx +72 -0
- package/template/components/layout/Lightbox/LightboxGrid.tsx +186 -0
- package/template/components/layout/Lightbox/LightboxModal.module.css +395 -0
- package/template/components/layout/Lightbox/LightboxModal.tsx +500 -0
- package/template/components/layout/Lightbox/demo.tsx +412 -0
- package/template/components/layout/Lightbox/index.ts +30 -0
- package/template/components/layout/Lightbox/types.ts +113 -0
- package/template/components/layout/Lightbox/useLightboxFilters.ts +140 -0
- package/template/components/layout/accordion/Accordion.module.css +149 -0
- package/template/components/layout/accordion/Accordion.tsx +114 -0
- package/template/components/layout/button/Button.module.css +305 -0
- package/template/components/layout/button/ButtonGroup.tsx +503 -0
- package/template/components/layout/button/FAB.tsx +118 -0
- package/template/components/layout/button/button.tsx +128 -0
- package/template/components/layout/button/drop.module.css +229 -0
- package/template/components/layout/button/drop.tsx +516 -0
- package/template/components/layout/hero/v1/heroSlideshow.module.css +107 -0
- package/template/components/layout/hero/v1/heroSlideshow.tsx +233 -0
- package/template/components/layout/modals/accessibilityModal/AccessibilityModal.module.css +126 -0
- package/template/components/layout/modals/accessibilityModal/AccessibilityModal.tsx +290 -0
- package/template/components/layout/modals/alert/Alert.tsx +188 -0
- package/template/components/layout/navigation/MioCard.module.css +88 -0
- package/template/components/layout/navigation/MioCard.tsx +266 -0
- package/template/components/layout/navigation/Wrap.tsx +41 -0
- package/template/components/layout/navigation/nav/Nav.module.css +508 -0
- package/template/components/layout/navigation/nav/Nav.tsx +167 -0
- package/template/components/layout/navigation/nav/NavBar.tsx +419 -0
- package/template/components/layout/navigation/nav/NavContext.tsx +259 -0
- package/template/components/layout/navigation/nav/NavItem.tsx +173 -0
- package/template/components/layout/navigation/nav/NavNew.module.css +373 -0
- package/template/components/layout/navigation/nav/NavRail.tsx +315 -0
- package/template/components/layout/navigation/nav/NavSection.tsx +102 -0
- package/template/components/layout/navigation/nav/NavTab.tsx +25 -0
- package/template/components/layout/navigation/nav/navftb/NavFTB.module.css +252 -0
- package/template/components/layout/navigation/nav/navftb/NavFTB.tsx +399 -0
- package/template/components/layout/navigation/nav/navftb/useTabIndicator.ts +484 -0
- package/template/components/layout/navigation/nav/navheader/NavHeader.module.css +59 -0
- package/template/components/layout/navigation/nav/navheader/NavHeader.tsx +478 -0
- package/template/components/layout/pages/loadingScreen.tsx +102 -0
- package/template/components/layout/pages/maintenance/Maintenance.tsx +53 -0
- package/template/components/layout/pages/maintenance/maintenance.module.css +163 -0
- package/template/components/layout/switch/Switch.module.css +102 -0
- package/template/components/layout/switch/Switch.tsx +48 -0
- package/template/components/tools/Divider.tsx +11 -0
- package/template/components/tools/ProgressiveBlur.tsx +73 -0
- package/template/components/tools/ReduceMotionContext.tsx +5 -0
- package/template/components/tools/Sinewave.tsx +199 -0
- package/template/components/tools/SinewaveProgress.tsx +135 -0
- package/template/components/tools/badge/Badge.tsx +28 -0
- package/template/components/tools/flubber.d.ts +7 -0
- package/template/components/tools/icon/SocialIcons.tsx +88 -0
- package/template/components/tools/icon/icon.module.css +0 -0
- package/template/components/tools/icon/icon.tsx +125 -0
- package/template/components/tools/mobileViewProvider.tsx +58 -0
- package/template/components/tools/react-bits/ClickSpark.tsx +177 -0
- package/template/components/tools/react-bits/FadeContent.tsx +90 -0
- package/template/components/tools/react-bits/GlareHover.tsx +73 -0
- package/template/components/tools/react-bits/GradientText/GradientText.css +70 -0
- package/template/components/tools/react-bits/GradientText/GradientText.tsx +44 -0
- package/template/components/tools/react-bits/Magnet.tsx +118 -0
- package/template/components/tools/react-bits/Stepper/Stepper.css +134 -0
- package/template/components/tools/react-bits/Stepper/Stepper.tsx +412 -0
- package/template/components/tools/ripple/ripple.css +41 -0
- package/template/components/tools/ripple/ripple.tsx +53 -0
- package/template/components/tools/shape/ShapeLoader.tsx +101 -0
- package/template/components/tools/shape/ShapeMorph.tsx +190 -0
- package/template/components/tools/shape/ShapePaths.ts +116 -0
- package/template/components/tools/switch/Switch.module.css +102 -0
- package/template/components/tools/switch/Switch.tsx +48 -0
- package/template/components/tools/useBodyScrollLock.tsx +27 -0
- package/template/components/tools/useImageColor.ts +47 -0
- package/template/components/tools/useNavSheetDrag.tsx +196 -0
- package/template/public/fonts/material-symbols/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useCallback,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
type CSSProperties,
|
|
8
|
+
} from "react";
|
|
9
|
+
import type { LightboxItem, ViewMode } from "./types";
|
|
10
|
+
import { LightboxCard } from "./LightboxCard";
|
|
11
|
+
import styles from "./LightboxGallery.module.css";
|
|
12
|
+
|
|
13
|
+
export interface LightboxGridProps {
|
|
14
|
+
items: LightboxItem[];
|
|
15
|
+
mode: ViewMode;
|
|
16
|
+
/** Min cell size in pixels. Drives the CSS `--lb-cell` variable. */
|
|
17
|
+
zoom?: number;
|
|
18
|
+
onCardClick?: (item: LightboxItem) => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const DEFAULT_DURATION = 480;
|
|
24
|
+
const DEFAULT_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The visual grid. Layout switches between bento / square / aspect via the
|
|
28
|
+
* `mode` prop. A FLIP animation runs on each card's inner surface whenever
|
|
29
|
+
* `mode` changes, so the transition between layouts is smooth.
|
|
30
|
+
*
|
|
31
|
+
* The animation duration & easing are read from CSS variables on the grid
|
|
32
|
+
* element, so parents can override them via the cascade:
|
|
33
|
+
*
|
|
34
|
+
* --lb-duration-grid: 600ms;
|
|
35
|
+
* --lb-easing: cubic-bezier(.4, 0, .2, 1);
|
|
36
|
+
*/
|
|
37
|
+
export function LightboxGrid({
|
|
38
|
+
items,
|
|
39
|
+
mode,
|
|
40
|
+
zoom = 160,
|
|
41
|
+
onCardClick,
|
|
42
|
+
className,
|
|
43
|
+
style,
|
|
44
|
+
}: LightboxGridProps) {
|
|
45
|
+
const gridRef = useRef<HTMLDivElement>(null);
|
|
46
|
+
const prevModeRef = useRef<ViewMode>(mode);
|
|
47
|
+
const prevRectsRef = useRef<Map<string, DOMRect>>(new Map());
|
|
48
|
+
|
|
49
|
+
/** Snapshot every visible card's screen rect, keyed by item id. */
|
|
50
|
+
const captureRects = useCallback((): Map<string, DOMRect> => {
|
|
51
|
+
const rects = new Map<string, DOMRect>();
|
|
52
|
+
const grid = gridRef.current;
|
|
53
|
+
if (!grid) return rects;
|
|
54
|
+
grid.querySelectorAll<HTMLElement>("[data-id]").forEach((cell) => {
|
|
55
|
+
const id = cell.dataset.id;
|
|
56
|
+
if (!id) return;
|
|
57
|
+
const card = cell.querySelector<HTMLElement>("[data-card]");
|
|
58
|
+
if (card) rects.set(id, card.getBoundingClientRect());
|
|
59
|
+
});
|
|
60
|
+
return rects;
|
|
61
|
+
}, []);
|
|
62
|
+
|
|
63
|
+
useLayoutEffect(() => {
|
|
64
|
+
const grid = gridRef.current;
|
|
65
|
+
if (!grid) return;
|
|
66
|
+
|
|
67
|
+
const currentRects = captureRects();
|
|
68
|
+
|
|
69
|
+
if (prevModeRef.current !== mode) {
|
|
70
|
+
const firsts = prevRectsRef.current;
|
|
71
|
+
|
|
72
|
+
// Read animation tokens from CSS variables on the grid
|
|
73
|
+
const cs = getComputedStyle(grid);
|
|
74
|
+
const durRaw = cs.getPropertyValue("--lb-duration-grid").trim();
|
|
75
|
+
const easeRaw = cs.getPropertyValue("--lb-easing").trim();
|
|
76
|
+
const duration = parseDuration(durRaw, DEFAULT_DURATION);
|
|
77
|
+
const easing = easeRaw || DEFAULT_EASING;
|
|
78
|
+
|
|
79
|
+
grid.querySelectorAll<HTMLElement>("[data-id]").forEach((cell) => {
|
|
80
|
+
const id = cell.dataset.id;
|
|
81
|
+
if (!id) return;
|
|
82
|
+
const card = cell.querySelector<HTMLElement>("[data-card]");
|
|
83
|
+
if (!card) return;
|
|
84
|
+
|
|
85
|
+
const first = firsts.get(id);
|
|
86
|
+
const last = currentRects.get(id);
|
|
87
|
+
if (!first || !last) return;
|
|
88
|
+
|
|
89
|
+
// Bail if the destination has zero size — would produce Infinity scales
|
|
90
|
+
if (last.width <= 0 || last.height <= 0) return;
|
|
91
|
+
if (first.width <= 0 || first.height <= 0) return;
|
|
92
|
+
|
|
93
|
+
const dx = first.left - last.left;
|
|
94
|
+
const dy = first.top - last.top;
|
|
95
|
+
const sx = first.width / last.width;
|
|
96
|
+
const sy = first.height / last.height;
|
|
97
|
+
|
|
98
|
+
// Reject any non-finite results
|
|
99
|
+
if (
|
|
100
|
+
!Number.isFinite(dx) ||
|
|
101
|
+
!Number.isFinite(dy) ||
|
|
102
|
+
!Number.isFinite(sx) ||
|
|
103
|
+
!Number.isFinite(sy)
|
|
104
|
+
) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Skip identity transforms
|
|
109
|
+
if (
|
|
110
|
+
Math.abs(dx) < 0.5 &&
|
|
111
|
+
Math.abs(dy) < 0.5 &&
|
|
112
|
+
Math.abs(sx - 1) < 0.005 &&
|
|
113
|
+
Math.abs(sy - 1) < 0.005
|
|
114
|
+
) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Cancel any in-flight animation on this card before starting a new one
|
|
119
|
+
card.getAnimations().forEach((a) => a.cancel());
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
card.animate(
|
|
123
|
+
[
|
|
124
|
+
{ transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` },
|
|
125
|
+
{ transform: "translate(0, 0) scale(1, 1)" },
|
|
126
|
+
],
|
|
127
|
+
{ duration, easing },
|
|
128
|
+
);
|
|
129
|
+
} catch (err) {
|
|
130
|
+
// Some easing values from CSS vars can fail to parse on certain
|
|
131
|
+
// browsers / build tools. Retry with the safe default easing.
|
|
132
|
+
if (process.env.NODE_ENV !== "production") {
|
|
133
|
+
// eslint-disable-next-line no-console
|
|
134
|
+
console.warn("[LightboxGrid] animate() failed, retrying:", err);
|
|
135
|
+
}
|
|
136
|
+
try {
|
|
137
|
+
card.animate(
|
|
138
|
+
[
|
|
139
|
+
{
|
|
140
|
+
transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})`,
|
|
141
|
+
},
|
|
142
|
+
{ transform: "translate(0, 0) scale(1, 1)" },
|
|
143
|
+
],
|
|
144
|
+
{ duration: DEFAULT_DURATION, easing: DEFAULT_EASING },
|
|
145
|
+
);
|
|
146
|
+
} catch {
|
|
147
|
+
// Swallow — the layout has already been applied, so the user
|
|
148
|
+
// sees the new mode immediately, just without animation.
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
prevModeRef.current = mode;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Snapshot for the next FLIP cycle (covers filter/zoom updates too)
|
|
157
|
+
prevRectsRef.current = currentRects;
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const gridStyle = {
|
|
161
|
+
...style,
|
|
162
|
+
"--lb-cell": `${zoom}px`,
|
|
163
|
+
} as CSSProperties;
|
|
164
|
+
|
|
165
|
+
return (
|
|
166
|
+
<div
|
|
167
|
+
ref={gridRef}
|
|
168
|
+
className={`${styles.grid}${className ? ` ${className}` : ""}`}
|
|
169
|
+
data-mode={mode}
|
|
170
|
+
style={gridStyle}
|
|
171
|
+
>
|
|
172
|
+
{items.map((item) => (
|
|
173
|
+
<LightboxCard key={item.id} item={item} onClick={onCardClick} />
|
|
174
|
+
))}
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Parse a CSS duration ("480ms" / "0.48s") to milliseconds. */
|
|
180
|
+
function parseDuration(raw: string, fallback: number): number {
|
|
181
|
+
const trimmed = (raw || "").trim();
|
|
182
|
+
if (!trimmed) return fallback;
|
|
183
|
+
const value = parseFloat(trimmed);
|
|
184
|
+
if (!Number.isFinite(value) || value < 0) return fallback;
|
|
185
|
+
return trimmed.endsWith("ms") ? value : value * 1000;
|
|
186
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
.backdrop {
|
|
2
|
+
/* --- Sizing --- */
|
|
3
|
+
--lb-modal-width: calc(100% - 48px);
|
|
4
|
+
--lb-modal-min-width: 320px;
|
|
5
|
+
--lb-modal-max-width: 100%;
|
|
6
|
+
--lb-modal-margin-y: 2.5%;
|
|
7
|
+
--lb-modal-info-width: 320px;
|
|
8
|
+
--lb-modal-gap: 12px;
|
|
9
|
+
--lb-modal-padding: 12px;
|
|
10
|
+
|
|
11
|
+
/* --- Surfaces --- */
|
|
12
|
+
--lb-modal-radius: 36px;
|
|
13
|
+
--lb-modal-bg: var(--md-sys-color-surface-container-low, #f4f4f4);
|
|
14
|
+
--lb-modal-border: 1px solid var(--globalUIBorderCard, rgba(15, 15, 15, 0.08));
|
|
15
|
+
|
|
16
|
+
/* --- Slides --- */
|
|
17
|
+
--lb-slide-radius: 24px;
|
|
18
|
+
--lb-slide-gap: 12px;
|
|
19
|
+
--lb-slide-ratio: 16 / 9;
|
|
20
|
+
--lb-slide-bg: var(--md-sys-color-surface-container-low, #f4f4f4);
|
|
21
|
+
--lb-slide-border: 1px solid var(--globalUIBorderCard, rgba(15, 15, 15, 0.08));
|
|
22
|
+
|
|
23
|
+
/* --- Backdrop & motion --- */
|
|
24
|
+
--lb-backdrop-bg: rgba(0, 0, 0, 0.4);
|
|
25
|
+
--lb-modal-duration: 500ms;
|
|
26
|
+
--lb-modal-easing: cubic-bezier(0.01, 1.25, 0.23, 1.01);
|
|
27
|
+
|
|
28
|
+
/* --- Layout --- */
|
|
29
|
+
position: fixed;
|
|
30
|
+
inset: 0;
|
|
31
|
+
z-index: 1100;
|
|
32
|
+
overflow-y: auto;
|
|
33
|
+
overflow-x: hidden;
|
|
34
|
+
background: var(--lb-backdrop-bg);
|
|
35
|
+
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transition: all var(--lb-modal-duration) var(--lb-modal-easing);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.backdrop.isOpen {
|
|
41
|
+
animation: backdropIn var(--lb-modal-duration) var(--lb-modal-easing) forwards;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.backdrop.isClosing {
|
|
45
|
+
animation: backdropIn var(--lb-modal-duration) var(--lb-modal-easing) reverse
|
|
46
|
+
forwards;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes backdropIn {
|
|
50
|
+
from {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
}
|
|
53
|
+
to {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ----- Modal ----- */
|
|
59
|
+
.modal {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: flex-start;
|
|
62
|
+
gap: var(--lb-modal-gap);
|
|
63
|
+
width: var(--lb-modal-width);
|
|
64
|
+
min-width: var(--lb-modal-min-width);
|
|
65
|
+
max-width: var(--lb-modal-max-width);
|
|
66
|
+
min-height: 90dvh;
|
|
67
|
+
margin: var(--lb-modal-margin-y) auto;
|
|
68
|
+
padding: var(--lb-modal-padding);
|
|
69
|
+
background: var(--lb-modal-bg);
|
|
70
|
+
border: var(--lb-modal-border);
|
|
71
|
+
border-radius: var(--lb-modal-radius);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
transform: translateY(100dvh) scale(0.7);
|
|
74
|
+
opacity: 0;
|
|
75
|
+
box-shadow:
|
|
76
|
+
0 2px 2px rgba(0, 0, 0, 0.2),
|
|
77
|
+
0 2px 6px rgba(0, 0, 0, 0.1),
|
|
78
|
+
0 4px 12px rgba(0, 0, 0, 0.1);
|
|
79
|
+
will-change: transform, opacity;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.backdrop.isOpen .modal {
|
|
83
|
+
animation: modalIn var(--lb-modal-duration) var(--lb-modal-easing) forwards;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.backdrop.isClosing .modal {
|
|
87
|
+
animation: modalIn var(--lb-modal-duration) var(--lb-modal-easing) reverse
|
|
88
|
+
forwards;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@keyframes modalIn {
|
|
92
|
+
from {
|
|
93
|
+
transform: translateY(-5%) scale(0.8);
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
to {
|
|
97
|
+
transform: translateY(0) scale(1);
|
|
98
|
+
opacity: 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ----- Images column ----- */
|
|
103
|
+
.imagesColumn {
|
|
104
|
+
flex: 1 1 auto;
|
|
105
|
+
min-width: 0;
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
gap: var(--lb-slide-gap);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.empty {
|
|
112
|
+
padding: 80px 20px;
|
|
113
|
+
text-align: center;
|
|
114
|
+
color: var(--md-sys-color-on-surface-variant, rgba(15, 15, 15, 0.55));
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.slideEntry {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: 10px;
|
|
122
|
+
margin-bottom: 24px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.slideImageWrap {
|
|
126
|
+
position: relative;
|
|
127
|
+
width: 100%;
|
|
128
|
+
aspect-ratio: var(--lb-slide-ratio);
|
|
129
|
+
border-radius: var(--lb-slide-radius);
|
|
130
|
+
border: var(--lb-slide-border);
|
|
131
|
+
background: var(--lb-slide-bg);
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.slideDownloadBtn {
|
|
136
|
+
position: absolute;
|
|
137
|
+
top: 12px;
|
|
138
|
+
right: 12px;
|
|
139
|
+
z-index: 1;
|
|
140
|
+
transform: scale(0.9);
|
|
141
|
+
opacity: 0;
|
|
142
|
+
visibility: hidden;
|
|
143
|
+
transition:
|
|
144
|
+
opacity 180ms ease,
|
|
145
|
+
visibility 180ms ease,
|
|
146
|
+
transform 180ms ease;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.slideImageWrap:hover .slideDownloadBtn,
|
|
150
|
+
.slideDownloadBtn:focus-visible {
|
|
151
|
+
transform: scale(1);
|
|
152
|
+
opacity: 1;
|
|
153
|
+
visibility: visible;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.slideImage {
|
|
157
|
+
position: absolute;
|
|
158
|
+
inset: 0;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
object-fit: cover;
|
|
162
|
+
display: block;
|
|
163
|
+
user-select: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.slideImagePlaceholder {
|
|
167
|
+
position: absolute;
|
|
168
|
+
inset: 0;
|
|
169
|
+
background: var(--md-sys-color-surface-container-high);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.slideMeta {
|
|
173
|
+
padding: 4px 6px 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.slideTitle {
|
|
177
|
+
font-size: 18px;
|
|
178
|
+
font-weight: 600;
|
|
179
|
+
margin-left: 12px;
|
|
180
|
+
color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
181
|
+
letter-spacing: -0.01em;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.slideComment {
|
|
185
|
+
font-size: 16px;
|
|
186
|
+
line-height: 1.5;
|
|
187
|
+
margin-left: 12px;
|
|
188
|
+
color: var(--md-sys-color-on-surface-variant, rgba(15, 15, 15, 0.65));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ----- Info panel ----- */
|
|
192
|
+
.infoPanel {
|
|
193
|
+
position: sticky;
|
|
194
|
+
top: var(--lb-modal-margin-y);
|
|
195
|
+
align-self: flex-start;
|
|
196
|
+
max-width: var(--lb-modal-info-width);
|
|
197
|
+
flex: 0 0 var(--lb-modal-info-width);
|
|
198
|
+
display: flex;
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.infoHeader,
|
|
203
|
+
.currentSlide {
|
|
204
|
+
border-radius: 24px;
|
|
205
|
+
gap: 12px;
|
|
206
|
+
height: auto;
|
|
207
|
+
min-width: 240px;
|
|
208
|
+
padding: 24px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.closeBtn {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: 2px;
|
|
214
|
+
right: 2px;
|
|
215
|
+
}
|
|
216
|
+
.infoHeader {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: 6px;
|
|
220
|
+
padding-right: 36px; /* space for close button */
|
|
221
|
+
background-color: var(--md-sys-color-surface-container-lowest);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.author {
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
text-transform: uppercase;
|
|
227
|
+
color: var(--md-sys-color-primary, rgba(15, 15, 15, 0.55));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.itemTitle {
|
|
231
|
+
font-size: 24px;
|
|
232
|
+
font-weight: 500;
|
|
233
|
+
margin: 0;
|
|
234
|
+
letter-spacing: -0.02em;
|
|
235
|
+
color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
236
|
+
line-height: 1.15;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.itemDescription {
|
|
240
|
+
font-size: 18px;
|
|
241
|
+
line-height: 1.55;
|
|
242
|
+
font-weight: 400;
|
|
243
|
+
margin: 0;
|
|
244
|
+
color: var(--md-sys-color-on-surface-variant, rgba(15, 15, 15, 0.65));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.currentSlide {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
gap: 6px;
|
|
251
|
+
background-color: var(--md-sys-color-surface-container-lowest);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.currentSlideLabel {
|
|
255
|
+
font-size: 14px;
|
|
256
|
+
text-transform: uppercase;
|
|
257
|
+
color: var(--md-sys-color-primary, rgba(15, 15, 15, 0.55));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.currentSlideTitle {
|
|
261
|
+
font-size: 18px;
|
|
262
|
+
font-weight: 600;
|
|
263
|
+
margin: 0;
|
|
264
|
+
color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
265
|
+
letter-spacing: -0.01em;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.currentSlideComment {
|
|
269
|
+
font-size: 16px;
|
|
270
|
+
line-height: 1.5;
|
|
271
|
+
margin: 0;
|
|
272
|
+
color: var(--md-sys-color-on-surface-variant, rgba(15, 15, 15, 0.65));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* ----- Action buttons ----- */
|
|
276
|
+
.fl_actions {
|
|
277
|
+
padding: 8px;
|
|
278
|
+
border-radius: 64px;
|
|
279
|
+
background-color: var(--md-sys-color-surface-container-lowest);
|
|
280
|
+
position: relative;
|
|
281
|
+
margin-top: 12px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.actions {
|
|
285
|
+
display: flex;
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
gap: 6px;
|
|
288
|
+
margin-top: 8px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.actionBtn {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: 10px;
|
|
295
|
+
padding: 10px 14px;
|
|
296
|
+
border-radius: 99px;
|
|
297
|
+
border: 1px solid var(--globalUIBorderCard, rgba(15, 15, 15, 0.18));
|
|
298
|
+
background: transparent;
|
|
299
|
+
color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
300
|
+
cursor: pointer;
|
|
301
|
+
font-family: inherit;
|
|
302
|
+
font-size: 13px;
|
|
303
|
+
transition:
|
|
304
|
+
background 0.15s ease,
|
|
305
|
+
border-color 0.15s ease,
|
|
306
|
+
color 0.15s ease;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.actionBtn:hover {
|
|
310
|
+
background: rgba(15, 15, 15, 0.04);
|
|
311
|
+
border-color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.actionBtn.isFav {
|
|
315
|
+
background: var(--md-sys-color-on-surface, #0f0f0f);
|
|
316
|
+
color: var(--md-sys-color-surface-container-low, #ffffff);
|
|
317
|
+
border-color: var(--md-sys-color-on-surface, #0f0f0f);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@media (max-width: 900px) {
|
|
321
|
+
.backdrop {
|
|
322
|
+
--lb-modal-padding: 0px;
|
|
323
|
+
--lb-modal-gap: 12px;
|
|
324
|
+
--lb-modal-radius: 36px;
|
|
325
|
+
--lb-slide-radius: 24px;
|
|
326
|
+
min-height: 90dvh;
|
|
327
|
+
overscroll-behavior: contain;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Grown by JS while dragging past the bottom of the sheet, so the pull
|
|
331
|
+
gesture stretches the sheet's own surface over the reveal instead of
|
|
332
|
+
the native rubber-band bounce showing the backdrop underneath. */
|
|
333
|
+
.stretchFiller {
|
|
334
|
+
width: 100%;
|
|
335
|
+
height: 0;
|
|
336
|
+
flex-shrink: 0;
|
|
337
|
+
box-sizing: border-box;
|
|
338
|
+
background: var(--lb-modal-bg);
|
|
339
|
+
border-left: var(--lb-modal-border);
|
|
340
|
+
border-right: var(--lb-modal-border);
|
|
341
|
+
overflow: hidden;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.modal {
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
margin: 25% auto 0 auto;
|
|
347
|
+
bottom: 25px;
|
|
348
|
+
border-radius: 36px 36px 0 0;
|
|
349
|
+
width: 100%;
|
|
350
|
+
flex-direction: column-reverse;
|
|
351
|
+
}
|
|
352
|
+
@keyframes modalIn {
|
|
353
|
+
from {
|
|
354
|
+
transform: translateY(50%) scale(1);
|
|
355
|
+
opacity: 0;
|
|
356
|
+
}
|
|
357
|
+
to {
|
|
358
|
+
transform: translateY(10%) scale(1);
|
|
359
|
+
opacity: 1;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
.imagesColumn {
|
|
363
|
+
width: 100%;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.closeBtn {
|
|
367
|
+
top: 12px;
|
|
368
|
+
right: 12px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.infoPanel {
|
|
372
|
+
position: static;
|
|
373
|
+
flex: 0 0 auto;
|
|
374
|
+
height: max-content;
|
|
375
|
+
width: 100%;
|
|
376
|
+
max-width: 100%;
|
|
377
|
+
padding: 12px;
|
|
378
|
+
border-radius: 36px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.downloadBtn {
|
|
382
|
+
opacity: 1;
|
|
383
|
+
transform: scale(1);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@media (prefers-reduced-motion: reduce) {
|
|
388
|
+
.backdrop,
|
|
389
|
+
.backdrop.isOpen,
|
|
390
|
+
.backdrop.isClosing,
|
|
391
|
+
.backdrop.isOpen .modal,
|
|
392
|
+
.backdrop.isClosing .modal {
|
|
393
|
+
animation-duration: 1ms !important;
|
|
394
|
+
}
|
|
395
|
+
}
|