@12-apps/ui 6.6.0 → 6.7.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/dist/{chunk-3KWD5Y5O.js → chunk-RXE5CUUE.js} +8 -4
- package/dist/chunk-RXE5CUUE.js.map +1 -0
- package/dist/data-display/Alert.js +1 -1
- package/dist/data-display/AsyncStateContainer.js +2 -1
- package/dist/data-display/AsyncStateContainer.js.map +1 -1
- package/dist/data-display/Banner.js +4 -2
- package/dist/data-display/Banner.js.map +1 -1
- package/dist/data-display/CardKit.js +3 -1
- package/dist/data-display/CardKit.js.map +1 -1
- package/dist/data-display/Carousel.js +5 -2
- package/dist/data-display/Carousel.js.map +1 -1
- package/dist/data-display/DataViews.js +2 -1
- package/dist/data-display/DataViews.js.map +1 -1
- package/dist/data-display/Lightbox.js +147 -117
- package/dist/data-display/Lightbox.js.map +1 -1
- package/dist/data-display/MapPreview.js +14 -10
- package/dist/data-display/MapPreview.js.map +1 -1
- package/dist/pt-BR.js +37 -1
- package/dist/pt-BR.js.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.d.ts +9 -2
- package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.types.d.ts +25 -9
- package/dist/types/components/data-display/Alert/Alert.types.d.ts.map +1 -1
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.d.ts.map +1 -1
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.types.d.ts +6 -0
- package/dist/types/components/data-display/AsyncStateContainer/AsyncStateContainer.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.types.d.ts +2 -0
- package/dist/types/components/data-display/Banner/Banner.types.d.ts.map +1 -1
- package/dist/types/components/data-display/CardKit/card-actions-context.d.ts +3 -1
- package/dist/types/components/data-display/CardKit/card-actions-context.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.chrome.d.ts +3 -0
- package/dist/types/components/data-display/Carousel/Carousel.chrome.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Carousel/Carousel.types.d.ts +7 -0
- package/dist/types/components/data-display/Carousel/Carousel.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +2 -0
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-table-parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/Lightbox.types.d.ts +9 -0
- package/dist/types/components/data-display/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/LightboxControls.d.ts.map +1 -1
- package/dist/types/components/data-display/Lightbox/lightbox-copy-context.d.ts +17 -0
- package/dist/types/components/data-display/Lightbox/lightbox-copy-context.d.ts.map +1 -0
- package/dist/types/components/data-display/MapPreview/MapControlBar.d.ts +7 -0
- package/dist/types/components/data-display/MapPreview/MapControlBar.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapLayers.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapPreview.types.d.ts +9 -0
- package/dist/types/components/data-display/MapPreview/MapPreview.types.d.ts.map +1 -1
- package/dist/types/components/data-display/MapPreview/MapSearchBar.d.ts +2 -0
- package/dist/types/components/data-display/MapPreview/MapSearchBar.d.ts.map +1 -1
- package/dist/types/copy.d.ts +53 -0
- package/dist/types/copy.d.ts.map +1 -1
- package/dist/types/pt-BR.d.ts +5 -1
- package/dist/types/pt-BR.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/Alert/Alert.tsx +22 -5
- package/src/components/data-display/Alert/Alert.types.ts +20 -10
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.tsx +2 -1
- package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.types.ts +6 -0
- package/src/components/data-display/Banner/Banner.tsx +5 -2
- package/src/components/data-display/Banner/Banner.types.ts +2 -0
- package/src/components/data-display/CardKit/card-actions-context.tsx +4 -0
- package/src/components/data-display/Carousel/Carousel.chrome.tsx +5 -0
- package/src/components/data-display/Carousel/Carousel.parts.tsx +4 -3
- package/src/components/data-display/Carousel/Carousel.types.ts +7 -0
- package/src/components/data-display/DataViews/data-views-copy.ts +2 -0
- package/src/components/data-display/DataViews/data-views-table-parts.tsx +1 -0
- package/src/components/data-display/Lightbox/Lightbox.tsx +3 -0
- package/src/components/data-display/Lightbox/Lightbox.types.ts +9 -0
- package/src/components/data-display/Lightbox/LightboxControls.tsx +28 -15
- package/src/components/data-display/Lightbox/lightbox-copy-context.tsx +42 -0
- package/src/components/data-display/MapPreview/MapControlBar.tsx +17 -9
- package/src/components/data-display/MapPreview/MapLayers.tsx +2 -0
- package/src/components/data-display/MapPreview/MapPreview.types.ts +10 -0
- package/src/components/data-display/MapPreview/MapSearchBar.tsx +4 -1
- package/src/copy.ts +57 -0
- package/src/pt-BR.ts +41 -1
- package/dist/chunk-3KWD5Y5O.js.map +0 -1
|
@@ -60,8 +60,26 @@ var definedProps = (props) => Object.fromEntries(
|
|
|
60
60
|
);
|
|
61
61
|
var resolveLightboxProps = (props) => ({ ...LIGHTBOX_DEFAULTS, ...definedProps(props) });
|
|
62
62
|
|
|
63
|
-
// src/components/data-display/Lightbox/
|
|
63
|
+
// src/components/data-display/Lightbox/lightbox-copy-context.tsx
|
|
64
|
+
import { createContext, useContext } from "react";
|
|
64
65
|
import { jsx } from "react/jsx-runtime";
|
|
66
|
+
var LightboxCopyContext = createContext(null);
|
|
67
|
+
function LightboxCopyProvider({
|
|
68
|
+
copy,
|
|
69
|
+
children
|
|
70
|
+
}) {
|
|
71
|
+
return /* @__PURE__ */ jsx(LightboxCopyContext.Provider, { value: copy, children });
|
|
72
|
+
}
|
|
73
|
+
function useLightboxCopy() {
|
|
74
|
+
const copy = useContext(LightboxCopyContext);
|
|
75
|
+
if (!copy) {
|
|
76
|
+
throw new Error("useLightboxCopy must be rendered inside a <LightboxCopyProvider>");
|
|
77
|
+
}
|
|
78
|
+
return copy;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// src/components/data-display/Lightbox/LightboxMedia.tsx
|
|
82
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
65
83
|
var cursorFor = (zoomLevel, zoomable) => {
|
|
66
84
|
if (zoomLevel > 1) return "move";
|
|
67
85
|
return zoomable ? "zoom-in" : "default";
|
|
@@ -81,7 +99,7 @@ var LightboxMedia = ({
|
|
|
81
99
|
onDoubleClick
|
|
82
100
|
}) => {
|
|
83
101
|
if (item.type === "video") {
|
|
84
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsx2(
|
|
85
103
|
"video",
|
|
86
104
|
{
|
|
87
105
|
src: item.src,
|
|
@@ -94,7 +112,7 @@ var LightboxMedia = ({
|
|
|
94
112
|
}
|
|
95
113
|
);
|
|
96
114
|
}
|
|
97
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ jsx2(
|
|
98
116
|
"img",
|
|
99
117
|
{
|
|
100
118
|
src: item.src,
|
|
@@ -120,7 +138,7 @@ var LightboxMedia = ({
|
|
|
120
138
|
};
|
|
121
139
|
|
|
122
140
|
// src/components/data-display/Lightbox/LightboxCurrentMedia.tsx
|
|
123
|
-
import { jsx as
|
|
141
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
124
142
|
var LightboxCurrentMedia = ({
|
|
125
143
|
item,
|
|
126
144
|
index,
|
|
@@ -132,7 +150,7 @@ var LightboxCurrentMedia = ({
|
|
|
132
150
|
onWheel
|
|
133
151
|
}) => {
|
|
134
152
|
if (!item) return null;
|
|
135
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ jsx3(
|
|
136
154
|
LightboxMedia,
|
|
137
155
|
{
|
|
138
156
|
item,
|
|
@@ -161,20 +179,23 @@ import ResetZoomIcon from "@mui/icons-material/RestartAlt";
|
|
|
161
179
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
162
180
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
163
181
|
import { Box, IconButton } from "@mui/material";
|
|
164
|
-
import { Fragment, jsx as
|
|
182
|
+
import { Fragment, jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
165
183
|
var LightboxCloseButton = ({
|
|
166
184
|
testId,
|
|
167
185
|
onClose
|
|
168
|
-
}) =>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
)
|
|
186
|
+
}) => {
|
|
187
|
+
const copy = useLightboxCopy();
|
|
188
|
+
return /* @__PURE__ */ jsx4(
|
|
189
|
+
IconButton,
|
|
190
|
+
{
|
|
191
|
+
onClick: onClose,
|
|
192
|
+
sx: { ...overlayButtonSx, position: "absolute", top: 16, right: 16, zIndex: OVERLAY_Z_INDEX },
|
|
193
|
+
"aria-label": copy.close,
|
|
194
|
+
"data-testid": testId("close"),
|
|
195
|
+
children: /* @__PURE__ */ jsx4(CloseIcon, {})
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
};
|
|
178
199
|
var arrowSx = (side) => ({
|
|
179
200
|
...navButtonSx,
|
|
180
201
|
position: "absolute",
|
|
@@ -189,97 +210,106 @@ var LightboxNavButtons = ({
|
|
|
189
210
|
atEnd,
|
|
190
211
|
onPrev,
|
|
191
212
|
onNext
|
|
192
|
-
}) =>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
}) => {
|
|
214
|
+
const copy = useLightboxCopy();
|
|
215
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
216
|
+
/* @__PURE__ */ jsx4(
|
|
217
|
+
IconButton,
|
|
218
|
+
{
|
|
219
|
+
onClick: onPrev,
|
|
220
|
+
disabled: atStart,
|
|
221
|
+
sx: arrowSx("left"),
|
|
222
|
+
"aria-label": copy.previous,
|
|
223
|
+
"data-testid": testId("prev"),
|
|
224
|
+
children: /* @__PURE__ */ jsx4(PrevIcon, {})
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
/* @__PURE__ */ jsx4(
|
|
228
|
+
IconButton,
|
|
229
|
+
{
|
|
230
|
+
onClick: onNext,
|
|
231
|
+
disabled: atEnd,
|
|
232
|
+
sx: arrowSx("right"),
|
|
233
|
+
"aria-label": copy.next,
|
|
234
|
+
"data-testid": testId("next"),
|
|
235
|
+
children: /* @__PURE__ */ jsx4(NextIcon, {})
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
] });
|
|
239
|
+
};
|
|
216
240
|
var LightboxZoomControls = ({
|
|
217
241
|
testId,
|
|
218
242
|
onZoomIn,
|
|
219
243
|
onZoomOut,
|
|
220
244
|
onResetZoom
|
|
221
|
-
}) =>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
IconButton,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
245
|
+
}) => {
|
|
246
|
+
const copy = useLightboxCopy();
|
|
247
|
+
return /* @__PURE__ */ jsxs(
|
|
248
|
+
Box,
|
|
249
|
+
{
|
|
250
|
+
sx: {
|
|
251
|
+
position: "absolute",
|
|
252
|
+
top: 16,
|
|
253
|
+
left: 16,
|
|
254
|
+
display: "flex",
|
|
255
|
+
flexDirection: "column",
|
|
256
|
+
gap: 1,
|
|
257
|
+
zIndex: OVERLAY_Z_INDEX
|
|
258
|
+
},
|
|
259
|
+
"data-testid": testId("zoom-controls"),
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ jsx4(IconButton, { onClick: onZoomIn, sx: overlayButtonSx, "aria-label": copy.zoomIn, "data-testid": testId("zoom-in"), children: /* @__PURE__ */ jsx4(ZoomInIcon, {}) }),
|
|
262
|
+
/* @__PURE__ */ jsx4(
|
|
263
|
+
IconButton,
|
|
264
|
+
{
|
|
265
|
+
onClick: onZoomOut,
|
|
266
|
+
sx: overlayButtonSx,
|
|
267
|
+
"aria-label": copy.zoomOut,
|
|
268
|
+
"data-testid": testId("zoom-out"),
|
|
269
|
+
children: /* @__PURE__ */ jsx4(ZoomOutIcon, {})
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ jsx4(
|
|
273
|
+
IconButton,
|
|
274
|
+
{
|
|
275
|
+
onClick: onResetZoom,
|
|
276
|
+
sx: overlayButtonSx,
|
|
277
|
+
"aria-label": copy.resetZoom,
|
|
278
|
+
"data-testid": testId("zoom-reset"),
|
|
279
|
+
children: /* @__PURE__ */ jsx4(ResetZoomIcon, {})
|
|
280
|
+
}
|
|
281
|
+
)
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
};
|
|
259
286
|
var LightboxAutoplayButton = ({
|
|
260
287
|
testId,
|
|
261
288
|
isAutoPlaying,
|
|
262
289
|
onToggle
|
|
263
|
-
}) =>
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)
|
|
290
|
+
}) => {
|
|
291
|
+
const copy = useLightboxCopy();
|
|
292
|
+
return /* @__PURE__ */ jsx4(
|
|
293
|
+
IconButton,
|
|
294
|
+
{
|
|
295
|
+
onClick: onToggle,
|
|
296
|
+
sx: {
|
|
297
|
+
...overlayButtonSx,
|
|
298
|
+
position: "absolute",
|
|
299
|
+
top: 16,
|
|
300
|
+
left: "50%",
|
|
301
|
+
transform: "translateX(-50%)",
|
|
302
|
+
zIndex: OVERLAY_Z_INDEX
|
|
303
|
+
},
|
|
304
|
+
"aria-label": isAutoPlaying ? copy.pause : copy.play,
|
|
305
|
+
"data-testid": testId("autoplay"),
|
|
306
|
+
children: isAutoPlaying ? /* @__PURE__ */ jsx4(PauseIcon, {}) : /* @__PURE__ */ jsx4(PlayIcon, {})
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
};
|
|
280
310
|
|
|
281
311
|
// src/components/data-display/Lightbox/LightboxOverlay.tsx
|
|
282
|
-
import { Fragment as Fragment2, jsx as
|
|
312
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
283
313
|
var LightboxOverlay = ({
|
|
284
314
|
testId,
|
|
285
315
|
itemCount,
|
|
@@ -299,8 +329,8 @@ var LightboxOverlay = ({
|
|
|
299
329
|
}) => {
|
|
300
330
|
const hasMultiple = itemCount > 1;
|
|
301
331
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
showControls && hasMultiple && /* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ jsx5(LightboxCloseButton, { testId, onClose }),
|
|
333
|
+
showControls && hasMultiple && /* @__PURE__ */ jsx5(
|
|
304
334
|
LightboxNavButtons,
|
|
305
335
|
{
|
|
306
336
|
testId,
|
|
@@ -310,7 +340,7 @@ var LightboxOverlay = ({
|
|
|
310
340
|
onNext
|
|
311
341
|
}
|
|
312
342
|
),
|
|
313
|
-
canZoom && /* @__PURE__ */
|
|
343
|
+
canZoom && /* @__PURE__ */ jsx5(
|
|
314
344
|
LightboxZoomControls,
|
|
315
345
|
{
|
|
316
346
|
testId,
|
|
@@ -319,7 +349,7 @@ var LightboxOverlay = ({
|
|
|
319
349
|
onResetZoom
|
|
320
350
|
}
|
|
321
351
|
),
|
|
322
|
-
autoplay && hasMultiple && /* @__PURE__ */
|
|
352
|
+
autoplay && hasMultiple && /* @__PURE__ */ jsx5(
|
|
323
353
|
LightboxAutoplayButton,
|
|
324
354
|
{
|
|
325
355
|
testId,
|
|
@@ -332,7 +362,7 @@ var LightboxOverlay = ({
|
|
|
332
362
|
|
|
333
363
|
// src/components/data-display/Lightbox/LightboxStage.tsx
|
|
334
364
|
import { Box as Box2, CircularProgress, DialogContent, Typography } from "@mui/material";
|
|
335
|
-
import { jsx as
|
|
365
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
336
366
|
var LightboxStage = ({
|
|
337
367
|
items,
|
|
338
368
|
currentItem,
|
|
@@ -357,14 +387,14 @@ var LightboxStage = ({
|
|
|
357
387
|
},
|
|
358
388
|
"data-testid": testId("content"),
|
|
359
389
|
children: [
|
|
360
|
-
isLoading && /* @__PURE__ */
|
|
390
|
+
isLoading && /* @__PURE__ */ jsx6(
|
|
361
391
|
CircularProgress,
|
|
362
392
|
{
|
|
363
393
|
sx: { position: "absolute", color: "white", zIndex: 999 },
|
|
364
394
|
"data-testid": testId("loading")
|
|
365
395
|
}
|
|
366
396
|
),
|
|
367
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ jsx6(
|
|
368
398
|
Box2,
|
|
369
399
|
{
|
|
370
400
|
sx: {
|
|
@@ -378,7 +408,7 @@ var LightboxStage = ({
|
|
|
378
408
|
children: media
|
|
379
409
|
}
|
|
380
410
|
),
|
|
381
|
-
showCaptions && currentItem?.caption && /* @__PURE__ */
|
|
411
|
+
showCaptions && currentItem?.caption && /* @__PURE__ */ jsx6(
|
|
382
412
|
Typography,
|
|
383
413
|
{
|
|
384
414
|
id: "lightbox-description",
|
|
@@ -417,10 +447,10 @@ var LightboxStage = ({
|
|
|
417
447
|
// src/components/data-display/Lightbox/LightboxThumbnails.tsx
|
|
418
448
|
import PlayIcon2 from "@mui/icons-material/PlayArrow";
|
|
419
449
|
import { Box as Box3 } from "@mui/material";
|
|
420
|
-
import { jsx as
|
|
450
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
421
451
|
var THUMB_WIDTH = 60;
|
|
422
452
|
var THUMB_HEIGHT = 40;
|
|
423
|
-
var VideoThumbnail = () => /* @__PURE__ */
|
|
453
|
+
var VideoThumbnail = () => /* @__PURE__ */ jsx7(
|
|
424
454
|
Box3,
|
|
425
455
|
{
|
|
426
456
|
sx: {
|
|
@@ -431,7 +461,7 @@ var VideoThumbnail = () => /* @__PURE__ */ jsx6(
|
|
|
431
461
|
alignItems: "center",
|
|
432
462
|
justifyContent: "center"
|
|
433
463
|
},
|
|
434
|
-
children: /* @__PURE__ */
|
|
464
|
+
children: /* @__PURE__ */ jsx7(PlayIcon2, { sx: { color: "white", fontSize: 16 } })
|
|
435
465
|
}
|
|
436
466
|
);
|
|
437
467
|
var LightboxThumbnails = ({
|
|
@@ -439,7 +469,7 @@ var LightboxThumbnails = ({
|
|
|
439
469
|
currentIndex,
|
|
440
470
|
testId,
|
|
441
471
|
onSelect
|
|
442
|
-
}) => /* @__PURE__ */
|
|
472
|
+
}) => /* @__PURE__ */ jsx7(
|
|
443
473
|
Box3,
|
|
444
474
|
{
|
|
445
475
|
sx: {
|
|
@@ -455,7 +485,7 @@ var LightboxThumbnails = ({
|
|
|
455
485
|
padding: 1
|
|
456
486
|
},
|
|
457
487
|
"data-testid": testId("thumbnails"),
|
|
458
|
-
children: items.map((item, index) => /* @__PURE__ */
|
|
488
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx7(
|
|
459
489
|
Box3,
|
|
460
490
|
{
|
|
461
491
|
onClick: () => onSelect(index),
|
|
@@ -470,7 +500,7 @@ var LightboxThumbnails = ({
|
|
|
470
500
|
"&:hover": { border: "2px solid rgba(255, 255, 255, 0.7)" }
|
|
471
501
|
},
|
|
472
502
|
"data-testid": testId(`thumbnail-${index}`),
|
|
473
|
-
children: item.type === "video" ? /* @__PURE__ */
|
|
503
|
+
children: item.type === "video" ? /* @__PURE__ */ jsx7(VideoThumbnail, {}) : /* @__PURE__ */ jsx7(
|
|
474
504
|
"img",
|
|
475
505
|
{
|
|
476
506
|
src: item.src,
|
|
@@ -694,7 +724,7 @@ var useLightbox = ({ isOpen, onClose, items, startIndex, showControls, loop, aut
|
|
|
694
724
|
};
|
|
695
725
|
|
|
696
726
|
// src/components/data-display/Lightbox/Lightbox.tsx
|
|
697
|
-
import { jsx as
|
|
727
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
698
728
|
var DIALOG_STATIC_PROPS = {
|
|
699
729
|
maxWidth: false,
|
|
700
730
|
fullScreen: true,
|
|
@@ -713,7 +743,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
713
743
|
const testId = makeTestId(dataTestId);
|
|
714
744
|
const lightbox = useLightbox(props, ref);
|
|
715
745
|
const { currentIndex, currentItem, zoom } = lightbox;
|
|
716
|
-
return /* @__PURE__ */ jsxs4(
|
|
746
|
+
return /* @__PURE__ */ jsx8(LightboxCopyProvider, { copy: props.copy, children: /* @__PURE__ */ jsxs4(
|
|
717
747
|
Dialog,
|
|
718
748
|
{
|
|
719
749
|
open: isOpen,
|
|
@@ -729,7 +759,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
729
759
|
"Lightbox - ",
|
|
730
760
|
currentItem?.alt || `Item ${currentIndex + 1} of ${items.length}`
|
|
731
761
|
] }),
|
|
732
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ jsx8(
|
|
733
763
|
LightboxOverlay,
|
|
734
764
|
{
|
|
735
765
|
testId,
|
|
@@ -749,7 +779,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
749
779
|
onToggleAutoplay: () => lightbox.setIsAutoPlaying((playing) => !playing)
|
|
750
780
|
}
|
|
751
781
|
),
|
|
752
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ jsx8(
|
|
753
783
|
LightboxStage,
|
|
754
784
|
{
|
|
755
785
|
items,
|
|
@@ -759,7 +789,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
759
789
|
showCaptions,
|
|
760
790
|
thumbnails,
|
|
761
791
|
testId,
|
|
762
|
-
media: /* @__PURE__ */
|
|
792
|
+
media: /* @__PURE__ */ jsx8(
|
|
763
793
|
LightboxCurrentMedia,
|
|
764
794
|
{
|
|
765
795
|
item: currentItem,
|
|
@@ -772,7 +802,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
772
802
|
onWheel: lightbox.handleWheel
|
|
773
803
|
}
|
|
774
804
|
),
|
|
775
|
-
thumbnailStrip: thumbnails && items.length > 1 && /* @__PURE__ */
|
|
805
|
+
thumbnailStrip: thumbnails && items.length > 1 && /* @__PURE__ */ jsx8(
|
|
776
806
|
LightboxThumbnails,
|
|
777
807
|
{
|
|
778
808
|
items,
|
|
@@ -785,7 +815,7 @@ var Lightbox = React.forwardRef((componentProps, ref) => {
|
|
|
785
815
|
)
|
|
786
816
|
]
|
|
787
817
|
}
|
|
788
|
-
);
|
|
818
|
+
) });
|
|
789
819
|
});
|
|
790
820
|
Lightbox.displayName = "Lightbox";
|
|
791
821
|
var Lightbox_default = Lightbox;
|