@qwanyx/carousel 0.1.6 → 0.1.7
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/index.js +36 -2
- package/dist/index.mjs +36 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1197,13 +1197,47 @@ var Carousel = (0, import_react4.forwardRef)(
|
|
|
1197
1197
|
children: isFullscreen ? "\u22A0" : "\u229E"
|
|
1198
1198
|
}
|
|
1199
1199
|
),
|
|
1200
|
+
currentSlide && (getSlideUrl || extractSlideUrl(currentSlide)) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1201
|
+
"button",
|
|
1202
|
+
{
|
|
1203
|
+
className: "qc-carousel__download-slide",
|
|
1204
|
+
onClick: () => {
|
|
1205
|
+
const url = getSlideUrl ? getSlideUrl(currentSlide) : extractSlideUrl(currentSlide);
|
|
1206
|
+
if (url) {
|
|
1207
|
+
const link = document.createElement("a");
|
|
1208
|
+
link.href = url;
|
|
1209
|
+
link.download = currentSlide.name || `slide-${currentIndex + 1}`;
|
|
1210
|
+
link.target = "_blank";
|
|
1211
|
+
document.body.appendChild(link);
|
|
1212
|
+
link.click();
|
|
1213
|
+
document.body.removeChild(link);
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
"aria-label": "Download",
|
|
1217
|
+
title: "Download",
|
|
1218
|
+
style: {
|
|
1219
|
+
width: "40px",
|
|
1220
|
+
height: "40px",
|
|
1221
|
+
borderRadius: "8px",
|
|
1222
|
+
border: "none",
|
|
1223
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
1224
|
+
color: "white",
|
|
1225
|
+
cursor: "pointer",
|
|
1226
|
+
display: "flex",
|
|
1227
|
+
alignItems: "center",
|
|
1228
|
+
justifyContent: "center",
|
|
1229
|
+
fontSize: "18px"
|
|
1230
|
+
},
|
|
1231
|
+
children: "\u2B07"
|
|
1232
|
+
}
|
|
1233
|
+
),
|
|
1200
1234
|
currentSlide && (getSlideUrl || extractSlideUrl(currentSlide)) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1201
1235
|
"button",
|
|
1202
1236
|
{
|
|
1203
1237
|
className: "qc-carousel__copy-slide",
|
|
1204
1238
|
onClick: () => handleCopySlide(currentSlide),
|
|
1205
|
-
"aria-label": "Copy
|
|
1206
|
-
title: "Copy
|
|
1239
|
+
"aria-label": "Copy URL",
|
|
1240
|
+
title: "Copy URL",
|
|
1207
1241
|
style: {
|
|
1208
1242
|
width: "40px",
|
|
1209
1243
|
height: "40px",
|
package/dist/index.mjs
CHANGED
|
@@ -1162,13 +1162,47 @@ var Carousel = forwardRef(
|
|
|
1162
1162
|
children: isFullscreen ? "\u22A0" : "\u229E"
|
|
1163
1163
|
}
|
|
1164
1164
|
),
|
|
1165
|
+
currentSlide && (getSlideUrl || extractSlideUrl(currentSlide)) && /* @__PURE__ */ jsx3(
|
|
1166
|
+
"button",
|
|
1167
|
+
{
|
|
1168
|
+
className: "qc-carousel__download-slide",
|
|
1169
|
+
onClick: () => {
|
|
1170
|
+
const url = getSlideUrl ? getSlideUrl(currentSlide) : extractSlideUrl(currentSlide);
|
|
1171
|
+
if (url) {
|
|
1172
|
+
const link = document.createElement("a");
|
|
1173
|
+
link.href = url;
|
|
1174
|
+
link.download = currentSlide.name || `slide-${currentIndex + 1}`;
|
|
1175
|
+
link.target = "_blank";
|
|
1176
|
+
document.body.appendChild(link);
|
|
1177
|
+
link.click();
|
|
1178
|
+
document.body.removeChild(link);
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
"aria-label": "Download",
|
|
1182
|
+
title: "Download",
|
|
1183
|
+
style: {
|
|
1184
|
+
width: "40px",
|
|
1185
|
+
height: "40px",
|
|
1186
|
+
borderRadius: "8px",
|
|
1187
|
+
border: "none",
|
|
1188
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
1189
|
+
color: "white",
|
|
1190
|
+
cursor: "pointer",
|
|
1191
|
+
display: "flex",
|
|
1192
|
+
alignItems: "center",
|
|
1193
|
+
justifyContent: "center",
|
|
1194
|
+
fontSize: "18px"
|
|
1195
|
+
},
|
|
1196
|
+
children: "\u2B07"
|
|
1197
|
+
}
|
|
1198
|
+
),
|
|
1165
1199
|
currentSlide && (getSlideUrl || extractSlideUrl(currentSlide)) && /* @__PURE__ */ jsx3(
|
|
1166
1200
|
"button",
|
|
1167
1201
|
{
|
|
1168
1202
|
className: "qc-carousel__copy-slide",
|
|
1169
1203
|
onClick: () => handleCopySlide(currentSlide),
|
|
1170
|
-
"aria-label": "Copy
|
|
1171
|
-
title: "Copy
|
|
1204
|
+
"aria-label": "Copy URL",
|
|
1205
|
+
title: "Copy URL",
|
|
1172
1206
|
style: {
|
|
1173
1207
|
width: "40px",
|
|
1174
1208
|
height: "40px",
|