@page-speed/lightbox 0.0.1 → 0.1.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/README.md +19 -1
- package/dist/components/Layouts/CustomSlideLayout.d.ts +15 -0
- package/dist/components/Layouts/FullscreenLayout.d.ts +15 -0
- package/dist/components/Layouts/InlineLayout.d.ts +15 -0
- package/dist/components/Layouts/VerticalSplitLayout.d.ts +16 -0
- package/dist/components/LightboxContent.d.ts +3 -2
- package/dist/components/index.css +161 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +973 -155
- package/dist/index.cjs +977 -159
- package/dist/index.css +161 -0
- package/dist/index.js +977 -159
- package/dist/renderers/ImageRenderer.d.ts +7 -6
- package/dist/renderers/index.css +161 -0
- package/dist/renderers/index.js +763 -95
- package/dist/types.d.ts +21 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
1
3
|
# @page-speed/lightbox
|
|
2
4
|
|
|
3
|
-
High‑performance, media‑rich lightbox for React, designed
|
|
5
|
+
High‑performance, media‑rich lightbox for React, professionally designed by the UI/UX team at [OpenSite](https://opensite.ai/) for their Semantic UI engine.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Page Speed Lightbox Showcase
|
|
9
|
+
|
|
10
|
+
> Below you can see the wide range of layouts that are available automatically, enabling a modern UI experience for users. And since the component was specifically engineered for our Semantic UI engine, in addition to the default layout and style variants, the Lightbox components are also completely customizable.
|
|
11
|
+
|
|
12
|
+
<p>
|
|
13
|
+
<br />
|
|
14
|
+
<div align="center">
|
|
15
|
+
<img src="https://github.com/user-attachments/assets/fe5c9392-5b8b-4e68-afe3-7dfccc5e657e" alt="ShadCN and Tailwind Lightbox Library" width="100%">
|
|
16
|
+
</div>
|
|
17
|
+
<br />
|
|
18
|
+
</p>
|
|
19
|
+
<br />
|
|
20
|
+
<p></p>
|
|
21
|
+
|
|
4
22
|
|
|
5
23
|
## Overview
|
|
6
24
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface CustomSlideLayoutProps {
|
|
3
|
+
content: React.ReactNode;
|
|
4
|
+
chrome: React.ReactNode;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
maxWidth?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Custom slide layout: optimized for component-type items where you want
|
|
12
|
+
* full creative control over the slide content. Chrome is overlaid or minimal.
|
|
13
|
+
*/
|
|
14
|
+
export declare function CustomSlideLayout({ content, chrome, height, maxWidth, className, style, }: CustomSlideLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface FullscreenLayoutProps {
|
|
3
|
+
content: React.ReactNode;
|
|
4
|
+
chrome: React.ReactNode;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
maxWidth?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fullscreen layout: takes up the entire viewport with minimal chrome.
|
|
12
|
+
* Ideal for mobile devices and immersive viewing experiences.
|
|
13
|
+
*/
|
|
14
|
+
export declare function FullscreenLayout({ content, chrome, className, style, }: FullscreenLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface InlineLayoutProps {
|
|
3
|
+
content: React.ReactNode;
|
|
4
|
+
chrome: React.ReactNode;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
maxWidth?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Inline layout: renders the lightbox content inline on the page without
|
|
12
|
+
* the modal overlay. Useful for embedding galleries directly in page flow.
|
|
13
|
+
*/
|
|
14
|
+
export declare function InlineLayout({ content, chrome, height, maxWidth, className, style, }: InlineLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface VerticalSplitLayoutProps {
|
|
3
|
+
content: React.ReactNode;
|
|
4
|
+
chrome: React.ReactNode;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
maxWidth?: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Vertical split layout: content on the left, chrome/controls on the right.
|
|
12
|
+
* Ideal for tablet and medium-sized viewports where you want side-by-side
|
|
13
|
+
* media and metadata/controls.
|
|
14
|
+
*/
|
|
15
|
+
export declare function VerticalSplitLayout({ content, chrome, height, maxWidth, className, style, }: VerticalSplitLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LightboxItem, LightboxLayoutType } from "../types";
|
|
1
|
+
import { LightboxItem, LightboxLayoutType, LightboxOptixFlowConfig } from "../types";
|
|
2
2
|
interface LightboxContentProps {
|
|
3
3
|
item: LightboxItem | null;
|
|
4
4
|
layout: LightboxLayoutType;
|
|
5
|
+
optixFlowConfig?: LightboxOptixFlowConfig;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Dispatches to the appropriate renderer based on the LightboxItem type.
|
|
@@ -9,5 +10,5 @@ interface LightboxContentProps {
|
|
|
9
10
|
* This component stays very small so individual renderers can be
|
|
10
11
|
* tree-shaken and swapped out by the Semantic UI engine if needed.
|
|
11
12
|
*/
|
|
12
|
-
export declare function LightboxContent({ item, layout }: LightboxContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare function LightboxContent({ item, layout, optixFlowConfig }: LightboxContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export {};
|
|
@@ -97,3 +97,164 @@
|
|
|
97
97
|
height: 100%;
|
|
98
98
|
color: var(--lightbox-text-muted, rgba(255, 255, 255, 0.7));
|
|
99
99
|
}
|
|
100
|
+
.Lightbox_verticalSplitLayoutRoot3 {
|
|
101
|
+
position: relative;
|
|
102
|
+
max-width: var(--lightbox-max-width, 90vw);
|
|
103
|
+
width: 100%;
|
|
104
|
+
padding: var(--lightbox-padding, 24px);
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
}
|
|
107
|
+
.Lightbox_verticalSplitLayoutContainer3 {
|
|
108
|
+
position: relative;
|
|
109
|
+
background: var(--lightbox-modal-bg, #111);
|
|
110
|
+
color: var(--lightbox-text, #fff);
|
|
111
|
+
border-radius: var(--lightbox-radius, 12px);
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
min-height: 70vh;
|
|
116
|
+
}
|
|
117
|
+
.Lightbox_verticalSplitContent3 {
|
|
118
|
+
flex: 2;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
background: var(--lightbox-content-bg, #000);
|
|
123
|
+
overflow: auto;
|
|
124
|
+
}
|
|
125
|
+
.Lightbox_verticalSplitSidebar3 {
|
|
126
|
+
flex: 1;
|
|
127
|
+
min-width: 300px;
|
|
128
|
+
max-width: 400px;
|
|
129
|
+
border-left: 1px solid var(--lightbox-border, rgba(255, 255, 255, 0.1));
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
background: var(--lightbox-sidebar-bg, rgba(0, 0, 0, 0.3));
|
|
133
|
+
}
|
|
134
|
+
@media (max-width: 1024px) {
|
|
135
|
+
.Lightbox_verticalSplitLayoutContainer3 {
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
}
|
|
138
|
+
.Lightbox_verticalSplitSidebar3 {
|
|
139
|
+
min-width: auto;
|
|
140
|
+
max-width: none;
|
|
141
|
+
border-left: none;
|
|
142
|
+
border-top: 1px solid var(--lightbox-border, rgba(255, 255, 255, 0.1));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
.Lightbox_customSlideLayoutRoot3 {
|
|
146
|
+
position: relative;
|
|
147
|
+
max-width: var(--lightbox-max-width, 95vw);
|
|
148
|
+
width: 100%;
|
|
149
|
+
padding: var(--lightbox-padding, 16px);
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
}
|
|
152
|
+
.Lightbox_customSlideLayoutContainer3 {
|
|
153
|
+
position: relative;
|
|
154
|
+
background: var(--lightbox-modal-bg, #111);
|
|
155
|
+
color: var(--lightbox-text, #fff);
|
|
156
|
+
border-radius: var(--lightbox-radius, 12px);
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
min-height: 80vh;
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
}
|
|
162
|
+
.Lightbox_customSlideContent3 {
|
|
163
|
+
flex: 1;
|
|
164
|
+
position: relative;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
background: var(--lightbox-content-bg, #000);
|
|
169
|
+
overflow: auto;
|
|
170
|
+
}
|
|
171
|
+
.Lightbox_customSlideChrome3 {
|
|
172
|
+
position: absolute;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
left: 0;
|
|
175
|
+
right: 0;
|
|
176
|
+
background:
|
|
177
|
+
linear-gradient(
|
|
178
|
+
to top,
|
|
179
|
+
rgba(0, 0, 0, 0.8) 0%,
|
|
180
|
+
transparent 100%);
|
|
181
|
+
padding: 24px 16px 16px;
|
|
182
|
+
z-index: 10;
|
|
183
|
+
}
|
|
184
|
+
.Lightbox_fullscreenLayoutRoot3 {
|
|
185
|
+
position: fixed;
|
|
186
|
+
inset: 0;
|
|
187
|
+
z-index: 1000;
|
|
188
|
+
background: var(--lightbox-fullscreen-bg, #000);
|
|
189
|
+
}
|
|
190
|
+
.Lightbox_fullscreenLayoutContainer3 {
|
|
191
|
+
width: 100%;
|
|
192
|
+
height: 100%;
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
color: var(--lightbox-text, #fff);
|
|
196
|
+
}
|
|
197
|
+
.Lightbox_fullscreenContent3 {
|
|
198
|
+
flex: 1;
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
background: var(--lightbox-content-bg, #000);
|
|
203
|
+
overflow: auto;
|
|
204
|
+
}
|
|
205
|
+
.Lightbox_fullscreenChrome3 {
|
|
206
|
+
position: absolute;
|
|
207
|
+
top: 0;
|
|
208
|
+
left: 0;
|
|
209
|
+
right: 0;
|
|
210
|
+
background:
|
|
211
|
+
linear-gradient(
|
|
212
|
+
to bottom,
|
|
213
|
+
rgba(0, 0, 0, 0.8) 0%,
|
|
214
|
+
transparent 100%);
|
|
215
|
+
padding: 16px 24px 48px;
|
|
216
|
+
z-index: 10;
|
|
217
|
+
}
|
|
218
|
+
.Lightbox_inlineLayoutRoot3 {
|
|
219
|
+
position: relative;
|
|
220
|
+
max-width: var(--lightbox-max-width, 100%);
|
|
221
|
+
width: 100%;
|
|
222
|
+
margin: 0 auto;
|
|
223
|
+
}
|
|
224
|
+
.Lightbox_inlineLayoutContainer3 {
|
|
225
|
+
position: relative;
|
|
226
|
+
background: var(--lightbox-modal-bg, #111);
|
|
227
|
+
color: var(--lightbox-text, #fff);
|
|
228
|
+
border-radius: var(--lightbox-radius, 12px);
|
|
229
|
+
overflow: hidden;
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
}
|
|
233
|
+
.Lightbox_inlineContent3 {
|
|
234
|
+
flex: 1;
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
background: var(--lightbox-content-bg, #000);
|
|
239
|
+
min-height: 400px;
|
|
240
|
+
}
|
|
241
|
+
.Lightbox_inlineToolbar3 {
|
|
242
|
+
border-top: 1px solid var(--lightbox-border, rgba(255, 255, 255, 0.1));
|
|
243
|
+
}
|
|
244
|
+
@media (max-width: 768px) {
|
|
245
|
+
.Lightbox_verticalSplitLayoutRoot3,
|
|
246
|
+
.Lightbox_customSlideLayoutRoot3 {
|
|
247
|
+
padding: 0;
|
|
248
|
+
max-width: 100vw;
|
|
249
|
+
max-height: 100vh;
|
|
250
|
+
}
|
|
251
|
+
.Lightbox_verticalSplitLayoutContainer3,
|
|
252
|
+
.Lightbox_customSlideLayoutContainer3 {
|
|
253
|
+
border-radius: 0;
|
|
254
|
+
min-height: 100vh;
|
|
255
|
+
}
|
|
256
|
+
.Lightbox_customSlideChrome3,
|
|
257
|
+
.Lightbox_fullscreenChrome3 {
|
|
258
|
+
padding: 12px;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -3,3 +3,7 @@ export { LightboxOverlay } from "./LightboxOverlay";
|
|
|
3
3
|
export { LightboxContent } from "./LightboxContent";
|
|
4
4
|
export { LightboxChrome } from "./LightboxChrome";
|
|
5
5
|
export { HorizontalLayout } from "./Layouts/HorizontalLayout";
|
|
6
|
+
export { VerticalSplitLayout } from "./Layouts/VerticalSplitLayout";
|
|
7
|
+
export { CustomSlideLayout } from "./Layouts/CustomSlideLayout";
|
|
8
|
+
export { FullscreenLayout } from "./Layouts/FullscreenLayout";
|
|
9
|
+
export { InlineLayout } from "./Layouts/InlineLayout";
|