@crystaldesign/content-item 25.12.0-beta.2 → 25.12.0-beta.21
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/build/esm/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import { useState, useDeferredValue, useTransition, useEffect, useCallback, useM
|
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import { useDivaCore, useTranslation, DivaError } from '@crystaldesign/diva-core';
|
|
5
|
+
import classNames from 'classnames';
|
|
5
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
7
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
7
8
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
8
9
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
9
10
|
import axios from 'axios';
|
|
10
|
-
import classNames from 'classnames';
|
|
11
11
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
12
12
|
import { FreeMode, Navigation, Thumbs } from 'swiper/modules';
|
|
13
13
|
|
|
@@ -185,7 +185,7 @@ var _Image = function Image(_ref) {
|
|
|
185
185
|
overwrittenZIndex: 3000000,
|
|
186
186
|
content: /*#__PURE__*/jsx("div", {
|
|
187
187
|
id: "diva-content-item",
|
|
188
|
-
className: fullscreenWrapper$1,
|
|
188
|
+
className: classNames(fullscreenWrapper$1, 'in-gallery-in-fullscreen'),
|
|
189
189
|
children: /*#__PURE__*/jsx(_Image, {
|
|
190
190
|
item: {
|
|
191
191
|
image: image,
|
|
@@ -639,7 +639,7 @@ var fullscreenWrapper = "fullscreen-wrapper-TiWjP";
|
|
|
639
639
|
var fullscreenButton = "fullscreen-button-unFbw";
|
|
640
640
|
var mySwiper2 = "mySwiper2-mfrK1";
|
|
641
641
|
var mySwiper = "mySwiper-urn8y";
|
|
642
|
-
var css_248z$3 = "#diva-content-item .swiper {\n width: 100%;\n height: 100%;\n}\n#diva-content-item .swiper-slide {\n text-align: center;\n font-size: 18px;\n background: #fff;\n\n /* Center slide text vertically */\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.fullscreen-wrapper-TiWjP {\n display: flex;\n justify-content: center;\n align-items: center;\n background: #fff;\n position: relative;\n height: 100%;\n width: 100%;\n z-index: 2000005;\n}\n\n.fullscreen-button-unFbw {\n cursor: pointer;\n position: absolute;\n width: 20px;\n height: 20px;\n top: 16px;\n right: 8px;\n border-radius: 3px;\n z-index: 1000;\n background: center / 75% no-repeat rgba(255,255,255,0.53333) url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M12 1H2C1.44772 1 1 1.44772 1 2V22C1 22.5523 1.44772 23 2 23H21.9999C22.5522 23 22.9999 22.5523 22.9999 22V12M16.0078 1H21.9989C22.5512 1 22.9989 1.44772 22.9989 2V7.99114M22.5002 1.5L13.3195 10.68%22 stroke%3D%22%234B4B4B%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.mobile #diva-content-item .swiper-slide {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n\n#diva-content-item .swiper {\n width: 100%;\n height: 350px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.
|
|
642
|
+
var css_248z$3 = "#diva-content-item .swiper {\n width: 100%;\n height: 100%;\n}\n#diva-content-item .swiper-slide {\n text-align: center;\n font-size: 18px;\n background: #fff;\n\n /* Center slide text vertically */\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.fullscreen-wrapper-TiWjP {\n display: flex;\n justify-content: center;\n align-items: center;\n background: #fff;\n position: relative;\n height: 100%;\n width: 100%;\n z-index: 2000005;\n}\n\n.fullscreen-button-unFbw {\n cursor: pointer;\n position: absolute;\n width: 20px;\n height: 20px;\n top: 16px;\n right: 8px;\n border-radius: 3px;\n z-index: 1000;\n background: center / 75% no-repeat rgba(255,255,255,0.53333) url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M12 1H2C1.44772 1 1 1.44772 1 2V22C1 22.5523 1.44772 23 2 23H21.9999C22.5522 23 22.9999 22.5523 22.9999 22V12M16.0078 1H21.9989C22.5512 1 22.9989 1.44772 22.9989 2V7.99114M22.5002 1.5L13.3195 10.68%22 stroke%3D%22%234B4B4B%22 stroke-width%3D%221.5%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.mobile #diva-content-item .swiper-slide {\n background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;\n background: initial;\n}\n\n#diva-content-item .swiper {\n width: 100%;\n height: 350px;\n margin-left: auto;\n margin-right: auto;\n}\n\n.in-gallery-in-fullscreen #DivaContentItemGallery {\n height: 90% !important;\n width: 90% !important;\n}\n\n.in-gallery-in-fullscreen #diva-content-item .mySwiper2-mfrK1 {\n height: 100%;\n}\n\n#diva-content-item .swiper-slide {\n background-size: cover;\n background-position: center;\n}\n#diva-content-item .mySwiper2-mfrK1 {\n height: 80%;\n width: 100%;\n}\n#diva-content-item .mySwiper-urn8y {\n height: 20%;\n box-sizing: border-box;\n padding: 10px 0;\n}\n#diva-content-item .mySwiper-urn8y .swiper-slide {\n width: 25%;\n height: 100%;\n opacity: 0.4;\n}\n#diva-content-item .mySwiper-urn8y .swiper-slide-thumb-active {\n opacity: 1;\n}\n";
|
|
643
643
|
styleInject(css_248z$3);
|
|
644
644
|
|
|
645
645
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -673,7 +673,7 @@ var _Gallery = function Gallery(_ref) {
|
|
|
673
673
|
overwrittenZIndex: 3000000,
|
|
674
674
|
content: /*#__PURE__*/jsxs("div", {
|
|
675
675
|
id: "diva-content-item",
|
|
676
|
-
className: fullscreenWrapper,
|
|
676
|
+
className: classNames(fullscreenWrapper, 'in-gallery-in-fullscreen'),
|
|
677
677
|
children: [/*#__PURE__*/jsx(_Gallery, {
|
|
678
678
|
item: {
|
|
679
679
|
content: content,
|
|
@@ -709,7 +709,7 @@ var _Gallery = function Gallery(_ref) {
|
|
|
709
709
|
},
|
|
710
710
|
modules: [FreeMode, Navigation, Thumbs],
|
|
711
711
|
initialSlide: initIndex,
|
|
712
|
-
className: mySwiper2,
|
|
712
|
+
className: classNames(mySwiper2, 'diva-stop-swipe-detection'),
|
|
713
713
|
children: content.map(function (item, i) {
|
|
714
714
|
return /*#__PURE__*/jsx(SwiperSlide, {
|
|
715
715
|
children: /*#__PURE__*/jsx(ContentItem, {
|
|
@@ -726,7 +726,7 @@ var _Gallery = function Gallery(_ref) {
|
|
|
726
726
|
freeMode: true,
|
|
727
727
|
watchSlidesProgress: true,
|
|
728
728
|
modules: [FreeMode, Navigation, Thumbs],
|
|
729
|
-
className: mySwiper,
|
|
729
|
+
className: classNames(mySwiper, 'diva-stop-swipe-detection'),
|
|
730
730
|
children: content.map(function (item, i) {
|
|
731
731
|
return /*#__PURE__*/jsx(SwiperSlide, {
|
|
732
732
|
children: /*#__PURE__*/jsx(ContentItem, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Gallery/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Gallery/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ1C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,QAAA,MAAM,OAAO,qFAAsF,KAAK,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,sBAgEpI,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,kGAAmG,KAAK,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,sBAoD/I,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/content-item",
|
|
3
|
-
"version": "25.12.0-beta.
|
|
3
|
+
"version": "25.12.0-beta.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"storybook": "storybook dev -p 6006",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"classnames": "^2.5.1",
|
|
28
|
-
"swiper": "^11.
|
|
28
|
+
"swiper": "^11.2.10"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@crystaldesign/diva-core": "*",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
},
|
|
35
35
|
"module": "build/esm/index.js",
|
|
36
36
|
"types": "./build/types/content-item/src/index.d.ts",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "b93c1e0a66fcc79cb40906bb01b49a2ab4705da2"
|
|
38
38
|
}
|