@seresweb/website-component 2.1.0 → 2.2.1

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.
Files changed (34) hide show
  1. package/dist/cjs/horizontal-viewer.cjs +1 -1
  2. package/dist/cjs/image-indicator.cjs +1 -1
  3. package/dist/cjs/index.cjs +1 -1
  4. package/dist/cjs/swiper-normal.cjs +1 -1
  5. package/dist/cjs/swiper-showcase.cjs +1 -0
  6. package/dist/cjs/swiper-vehicle.cjs +1 -1
  7. package/dist/cjs/video.cjs +1 -1
  8. package/dist/css/swiper-showcase.css +1 -0
  9. package/dist/es/horizontal-viewer.mjs +1 -1
  10. package/dist/es/image-indicator.mjs +1 -1
  11. package/dist/es/index.mjs +18 -16
  12. package/dist/es/swiper-normal.mjs +1 -1
  13. package/dist/es/swiper-showcase.mjs +274 -0
  14. package/dist/es/swiper-vehicle.mjs +158 -2
  15. package/dist/es/video.mjs +380 -169
  16. package/dist/global.d.ts +1 -0
  17. package/dist/index-BIPlvoY9.cjs +1 -0
  18. package/dist/{index-C6ZSfMR8.js → index-tkvNmWjy.js} +22 -20
  19. package/dist/index.css +1 -1
  20. package/dist/scss/index.scss +1 -0
  21. package/dist/scss/swiper-showcase.scss +142 -0
  22. package/dist/swiper-bundle-DOQ1LV4x.js +5104 -0
  23. package/dist/swiper-bundle-gkukcY4l.cjs +5 -0
  24. package/dist/types/components/index.d.ts +1 -0
  25. package/dist/types/components/swiper-showcase/index.d.ts +6 -0
  26. package/dist/types/components/swiper-showcase/swiper-showcase.vue.d.ts +14 -0
  27. package/dist/types/components/swiper-showcase/type.d.ts +34 -0
  28. package/dist/types/components/video/video-multiple.vue.d.ts +339 -0
  29. package/dist/types/components/video/video-normal.vue.d.ts +339 -0
  30. package/dist/types/components/video/video.vue.d.ts +335 -185
  31. package/package.json +2 -2
  32. package/dist/index-BVX78e_m.cjs +0 -1
  33. package/dist/index-BrggpRcU.js +0 -5287
  34. package/dist/index-DrnEpWXW.cjs +0 -5
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BVX78e_m.cjs");exports.ScHorizontalViewer=e.ScHorizontalViewer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BIPlvoY9.cjs");exports.ScHorizontalViewer=e.ScHorizontalViewer;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BVX78e_m.cjs");exports.ScImageIndicator=e.ScImageIndicator;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BIPlvoY9.cjs");exports.ScImageIndicator=e.ScImageIndicator;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./accordion-info-panel.cjs"),d=require("./animated-number.cjs"),u=require("./drawer.cjs"),m=require("./dropdown.cjs"),p=require("./gradual-highlight.cjs"),c=require("../index-BVX78e_m.cjs"),w=require("./input.cjs"),f=require("./layz-image.cjs"),I=require("./parameter-box.cjs"),g=require("./radio.cjs"),h=require("../index-DrnEpWXW.cjs"),q=require("./tab-indicator.cjs"),b=require("./video.cjs"),S="@seresweb/website-component",V=(o={})=>{const i=o.prefix||"Sc",e=o.importStyle??"css";return{type:"component",resolve:s=>{if(!s.startsWith(i))return;const n=s.slice(i.length).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),y=`${S}/dist/es/${n}`;let t;const a=r=>{if(r==="scss")return`${S}/dist/scss/${n}.scss`;if(r==="css")return`${S}/dist/css/${n}.css`};if(typeof e=="function"){const r=e(n);r==="css"||r==="scss"?t=a(r):r===!0&&(t=a("css"))}else(e===!0||e==="css"||e==="scss")&&(t=a(e===!0?"css":e));return{name:s,from:y,sideEffects:t?[t]:void 0}}}},N=[l.ScAccordionInfoPanel,d.ScAnimatedNumber,u.ScDrawer,m.ScDropdown,p.ScGradualHighlight,c.ScHorizontalViewer,c.ScImageIndicator,w.ScInput,f.ScLayzImage,I.ScParameterBox,g.ScRadio,c.ScSwiperNormal,h.ScSwiperVehicle,q.ScTabIndicator,b.ScVideo],P={install:o=>(N.forEach(i=>{o.use(i)}),o)};exports.ScAccordionInfoPanel=l.ScAccordionInfoPanel;exports.ScAnimatedNumber=d.ScAnimatedNumber;exports.ScDrawer=u.ScDrawer;exports.ScDropdown=m.ScDropdown;exports.ScGradualHighlight=p.ScGradualHighlight;exports.ScHorizontalViewer=c.ScHorizontalViewer;exports.ScImageIndicator=c.ScImageIndicator;exports.ScSwiperNormal=c.ScSwiperNormal;exports.ScInput=w.ScInput;exports.ScLayzImage=f.ScLayzImage;exports.ScParameterBox=I.ScParameterBox;exports.ScRadio=g.ScRadio;exports.ScSwiperVehicle=h.ScSwiperVehicle;exports.ScTabIndicator=q.ScTabIndicator;exports.ScVideo=b.ScVideo;exports.ComponentsResolver=V;exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./accordion-info-panel.cjs"),u=require("./animated-number.cjs"),d=require("./drawer.cjs"),m=require("./dropdown.cjs"),p=require("./gradual-highlight.cjs"),c=require("../index-BIPlvoY9.cjs"),w=require("./input.cjs"),h=require("./layz-image.cjs"),f=require("./parameter-box.cjs"),I=require("./radio.cjs"),g=require("./swiper-showcase.cjs"),q=require("./swiper-vehicle.cjs"),b=require("./tab-indicator.cjs"),y=require("./video.cjs"),S="@seresweb/website-component",N=(o={})=>{const i=o.prefix||"Sc",e=o.importStyle??"css";return{type:"component",resolve:n=>{if(!n.startsWith(i))return;const s=n.slice(i.length).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),V=`${S}/dist/es/${s}`;let t;const a=r=>{if(r==="scss")return`${S}/dist/scss/${s}.scss`;if(r==="css")return`${S}/dist/css/${s}.css`};if(typeof e=="function"){const r=e(s);r==="css"||r==="scss"?t=a(r):r===!0&&(t=a("css"))}else(e===!0||e==="css"||e==="scss")&&(t=a(e===!0?"css":e));return{name:n,from:V,sideEffects:t?[t]:void 0}}}},P=[l.ScAccordionInfoPanel,u.ScAnimatedNumber,d.ScDrawer,m.ScDropdown,p.ScGradualHighlight,c.ScHorizontalViewer,c.ScImageIndicator,w.ScInput,h.ScLayzImage,f.ScParameterBox,I.ScRadio,c.ScSwiperNormal,g.ScSwiperShowcase,q.ScSwiperVehicle,b.ScTabIndicator,y.ScVideo],v={install:o=>(P.forEach(i=>{o.use(i)}),o)};exports.ScAccordionInfoPanel=l.ScAccordionInfoPanel;exports.ScAnimatedNumber=u.ScAnimatedNumber;exports.ScDrawer=d.ScDrawer;exports.ScDropdown=m.ScDropdown;exports.ScGradualHighlight=p.ScGradualHighlight;exports.ScHorizontalViewer=c.ScHorizontalViewer;exports.ScImageIndicator=c.ScImageIndicator;exports.ScSwiperNormal=c.ScSwiperNormal;exports.ScInput=w.ScInput;exports.ScLayzImage=h.ScLayzImage;exports.ScParameterBox=f.ScParameterBox;exports.ScRadio=I.ScRadio;exports.ScSwiperShowcase=g.ScSwiperShowcase;exports.ScSwiperVehicle=q.ScSwiperVehicle;exports.ScTabIndicator=b.ScTabIndicator;exports.ScVideo=y.ScVideo;exports.ComponentsResolver=N;exports.default=v;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BVX78e_m.cjs");exports.ScSwiperNormal=e.ScSwiperNormal;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-BIPlvoY9.cjs");exports.ScSwiperNormal=e.ScSwiperNormal;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),k=require("../swiper-bundle-gkukcY4l.cjs"),s=require("../_vars-CyrPevgT.cjs"),B=require("./layz-image.cjs"),V={class:"swiper-wrapper"},P=["disabled"],N=["disabled"],w=e.defineComponent({__name:"swiper-showcase",props:{dataList:{default:()=>[]},slidesPerView:{default:4},spaceBetween:{default:24},swiperOptions:{default:()=>({})},placeholder:{}},emits:["slideChange"],setup(l,{emit:f}){const t=l,E=f;let a=null;const o=e.ref(),c=e.ref(!0),d=e.ref(!0),p=e.computed(()=>t.dataList&&t.dataList.length>0),u=i=>[`${s.PREFIX}-swiper-showcase__nav-btn`,i?`${s.PREFIX}-swiper-showcase__nav-btn--prev`:`${s.PREFIX}-swiper-showcase__nav-btn--next`],m=()=>{if(!a){c.value=!0,d.value=!0;return}c.value=a.isBeginning,d.value=a.isEnd,E("slideChange",a.activeIndex)},h=()=>{a&&(a.destroy(),a=null)},v=()=>{var n;if(h(),!o.value||!p.value)return;const i={0:{slidesPerView:1,spaceBetween:12},768:{slidesPerView:Math.min(2,t.slidesPerView),spaceBetween:16},1024:{slidesPerView:t.slidesPerView,spaceBetween:t.spaceBetween}};a=new k.Swiper(o.value,{slidesPerView:t.slidesPerView,spaceBetween:t.spaceBetween,observer:!0,observeParents:!0,...t.swiperOptions,breakpoints:{...i,...((n=t.swiperOptions)==null?void 0:n.breakpoints)||{}}}),a.on("slideChange",m),m()},C=()=>{a&&a.slideNext()},_=()=>{a&&a.slidePrev()};return e.watch(()=>[t.dataList,t.slidesPerView,t.spaceBetween,t.swiperOptions],()=>{e.nextTick(v)},{deep:!0}),e.onMounted(()=>{v()}),e.onBeforeUnmount(()=>{h()}),(i,n)=>p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase`)},[e.createElementVNode("div",{ref_key:"swiperRef",ref:o,class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__main`)},[e.createElementVNode("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(r,g)=>(e.openBlock(),e.createElementBlock("div",{key:`${r.title}-${g}`,class:"swiper-slide"},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__card`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__media`)},[r.tag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__tag`)},e.toDisplayString(r.tag),3)):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(B.ScLayzImage),{src:r.url||i.placeholder||"",alt:r.alt||r.title||"",class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__image`),"img-class":"sc-swiper-showcase__img"},null,8,["src","alt","class"])],2),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__info`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__title`)},e.toDisplayString(r.title),3),r.desc?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__desc`)},e.toDisplayString(r.desc),3)):e.createCommentVNode("v-if",!0)],2)],2)]))),128))])],2),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__nav`)},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(u(!0)),disabled:c.value,"aria-label":"previous",onClick:_},[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"true",class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__nav-icon ${e.unref(s.PREFIX)}-swiper-showcase__nav-icon--prev`),width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...n[0]||(n[0]=[e.createElementVNode("g",{id:"right"},[e.createElementVNode("path",{d:"M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",fill:"white","fill-opacity":"0.3"}),e.createElementVNode("path",{d:"M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",stroke:"white","stroke-opacity":"0.1"}),e.createElementVNode("path",{id:"Rectangle 302 (Stroke)",d:"M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",fill:"white"})],-1)])],2))],10,P),e.createElementVNode("button",{type:"button",class:e.normalizeClass(u(!1)),disabled:d.value,"aria-label":"next",onClick:C},[(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"true",class:e.normalizeClass(`${e.unref(s.PREFIX)}-swiper-showcase__nav-icon`),width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...n[1]||(n[1]=[e.createElementVNode("g",{id:"right"},[e.createElementVNode("path",{d:"M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",fill:"white","fill-opacity":"0.3"}),e.createElementVNode("path",{d:"M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",stroke:"white","stroke-opacity":"0.1"}),e.createElementVNode("path",{id:"Rectangle 302 (Stroke)",d:"M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",fill:"white"})],-1)])],2))],10,N)],2)],2)):e.createCommentVNode("v-if",!0)}});w.install=l=>(l.component("ScSwiperShowcase",w),l);const S=w;exports.ScSwiperShowcase=S;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DrnEpWXW.cjs");exports.ScSwiperVehicle=e.ScSwiperVehicle;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("../swiper-bundle-gkukcY4l.cjs"),n=require("../_vars-CyrPevgT.cjs"),f=require("./layz-image.cjs"),b={class:"swiper-wrapper"},y=["onClick"],u=e.defineComponent({__name:"swiper-vehicle",props:{modelValue:{default:0},backgroundImgUrl:{},backgroundImgAlt:{},dataList:{},imgFullHeightInMobile:{type:Boolean},swiperOptions:{default:()=>({})},effect:{default:"fade"},indicatorClass:{},tabIndicatorBottom:{},showTextBackground:{type:Boolean}},emits:["change","update:modelValue"],setup(s,{emit:v}){const o=s,d=v;let l=null;const r=e.ref(o.modelValue),c=e.ref(),g=e.computed(()=>{const t={};return o.tabIndicatorBottom&&(t.position="absolute",t.zIndex=1,t.left="50%",t.bottom=typeof o.tabIndicatorBottom=="number"?`${o.tabIndicatorBottom}px`:o.tabIndicatorBottom,t.transform="translateX(-50%)"),t}),k=e.computed(()=>o.dataList[r.value].text);e.watch(()=>o.modelValue,t=>{r.value!==t&&(r.value=t,p(r.value))});const p=t=>{l==null||l.slideTo(t)},i=()=>{l==null||l.destroy(),c.value&&(l=new B.Swiper(c.value,{slidesPerView:1,allowTouchMove:!1,effect:o.effect,autoplay:!0,...o.swiperOptions}),l.on("realIndexChange",t=>{r.value=t.realIndex,d("change",t.realIndex),d("update:modelValue",t.realIndex)}))},I=()=>{(l==null?void 0:l.params.autoplay).enabled&&(l==null||l.autoplay.start())},h=()=>{(l==null?void 0:l.params.autoplay).enabled&&(l==null||l.autoplay.stop())};return e.onMounted(()=>{i(),window.addEventListener("resize",i)}),e.onBeforeUnmount(()=>{l==null||l.destroy(),window.removeEventListener("resize",i)}),(t,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle`])},[t.backgroundImgUrl?(e.openBlock(),e.createBlock(e.unref(f.ScLayzImage),{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__bg`),src:t.backgroundImgUrl,alt:t.backgroundImgAlt},null,8,["class","src","alt"])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"swiperRef",ref:c,class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle__main`])},[e.createElementVNode("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,a=>(e.openBlock(),e.createElementBlock("div",{key:a.url,class:"swiper-slide"},[t.showTextBackground?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__text-bg`)},e.toDisplayString(a.text),3)):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(f.ScLayzImage),{class:e.normalizeClass(t.imgFullHeightInMobile?`${e.unref(n.PREFIX)}-swiper-vehicle__full-height`:""),src:a.url,alt:a.alt},null,8,["class","src","alt"])]))),128))])],2),e.createElementVNode("div",{class:e.normalizeClass([`${e.unref(n.PREFIX)}-swiper-vehicle__indicator`,t.indicatorClass]),style:e.normalizeStyle(g.value)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__indicator-control`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,(a,m)=>(e.openBlock(),e.createElementBlock("div",{key:a.color,class:e.normalizeClass([r.value===m&&"active","color-stroke"]),style:e.normalizeStyle({"background-color":a.color,"border-color":a.color}),onClick:w=>p(m),onMouseenter:h,onMouseleave:I},null,46,y))),128))],2),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-vehicle__indicator-text`)},e.toDisplayString(k.value),3)],6)],2))}});u.install=s=>(s.component("ScSwiperVehicle",u),s);const E=u;exports.ScSwiperVehicle=E;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../_vars-CyrPevgT.cjs"),w=require("./layz-image.cjs"),_=["controls","poster","src"],h=e.defineComponent({__name:"video-wrapper",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},emits:["paused"],setup(d,{expose:l,emit:P}){const t=d,C=P,B=/xiaomi|miui/i,g=`${u.PREFIX}-player-wrapper`,y=`${u.PREFIX}-player-is-fullscreen`,k=`${u.PREFIX}-player-close-btn`,m=`${u.PREFIX}-player-icon`,a=e.ref(),s=e.ref(!0),c=e.ref(B.test(navigator.userAgent)?void 0:t.url);let r=null;const n=o=>{var p,i;o.target!==a.value&&((p=a.value)==null||p.pause(),s.value=!!((i=a.value)!=null&&i.paused),C("paused"))},f=o=>{const p=o[0],i=a.value;!i||!t.playable||(p.isIntersecting&&t.autoPlay&&i.paused?(i.play().catch(console.warn),s.value=!1):!p.isIntersecting&&!i.paused&&(i.pause(),s.value=!0))},v=()=>{t.autoPlay&&t.playable&&a.value&&(r=new IntersectionObserver(f,{threshold:.25}),r.observe(a.value))},b=()=>{r==null||r.disconnect(),r=null};return e.watch(()=>t.playable,()=>{b(),e.nextTick(()=>v())}),l({play(){a.value.play(),s.value=a.value.paused},pause(){a.value.pause(),s.value=a.value.paused}}),e.onMounted(()=>{B.test(navigator.userAgent)&&fetch(t.url).then(o=>{if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return o.blob()}).then(o=>{c.value=URL.createObjectURL(o)}).catch(o=>{console.error("获取视频失败:",o)}),v()}),e.onBeforeUnmount(()=>{b()}),(o,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([g,t.class,!s.value&&!t.autoPlay&&y])},[e.createElementVNode("video",{ref_key:"videoRef",ref:a,muted:"",loop:"",playsinline:"","webkit-playsinline":"","x5-video-player-type":"h5",controls:!s.value&&!t.autoPlay,poster:t.poster,src:c.value},null,8,_),!s.value&&!t.autoPlay?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([k,t.playerButtonClass]),onClick:n},[e.renderSlot(o.$slots,"close",{},()=>[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(m),viewBox:"0 0 1121 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[...p[0]||(p[0]=[e.createElementVNode("path",{d:"M1040.725333 49.005714l-965.485714 965.436953-48.420571-48.469334L992.256 0.487619l48.469333 48.518095z",fill:"#ffffff"},null,-1),e.createElementVNode("path",{d:"M1040.725333 1014.442667l-965.485714-965.485715 48.518095-48.420571L1089.194667 965.973333l-48.469334 48.469334z",fill:"#ffffff"},null,-1)])]))])],2)):e.createCommentVNode("v-if",!0)],2))}}),E=e.defineComponent({__name:"video",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{default:""},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},setup(d){const l=d,P=`${u.PREFIX}-player-wrapper`,t=`${u.PREFIX}-player-poster`,C=`${u.PREFIX}-player-btn`,B=`${u.PREFIX}-player-btn-text`,g=`${u.PREFIX}-player-icon`,y=e.ref(),k=e.ref(),m=e.ref(),a=n=>{var f,v;n.stopPropagation(),(f=m.value)==null||f.pause(),(v=k.value)==null||v.play()},s=()=>{var n;(n=m.value)==null||n.play()};let c=null;const r=e.ref(!1);return e.onMounted(()=>{c=new IntersectionObserver(([n])=>{n.isIntersecting&&(r.value=!0)},{threshold:.1}),y.value&&c.observe(y.value)}),e.onUnmounted(()=>{c==null||c.disconnect()}),(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.autoPlay||l.multiple?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0},l,{url:l.multiple&&l.urlSmall||l.url,ref_key:"autoPlayRef",ref:m}),null,16,["url"])):e.createCommentVNode("v-if",!0),!l.autoPlay||l.multiple?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([P,l.class,{"is-multiple":l.multiple}]),style:e.normalizeStyle(l.style)},[l.poster?(e.openBlock(),e.createBlock(e.unref(w.ScLayzImage),{key:0,class:e.normalizeClass(t),src:l.poster,alt:"AITO"},null,8,["src"])):e.createCommentVNode("v-if",!0),e.createElementVNode("button",{ref_key:"btnRef",ref:y,class:e.normalizeClass([C,l.playerButtonClass]),onClick:a},[e.renderSlot(n.$slots,"play",{},()=>[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(g),viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[...f[0]||(f[0]=[e.createElementVNode("path",{d:"M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",fill:"#ffffff"},null,-1),e.createElementVNode("path",{d:"M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752z",fill:"#ffffff"},null,-1)])])),e.createElementVNode("span",{class:e.normalizeClass(B)},e.toDisplayString(l.playerButtonText),1)])],2)],6),r.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(h,e.mergeProps(l,{autoPlay:!1,ref_key:"vwRef",ref:k,onPaused:s}),null,16)])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0)],64))}});E.install=d=>(d.component("ScVideo",E),d);const I=E;exports.ScVideo=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("../_vars-CyrPevgT.cjs"),b=require("./layz-image.cjs"),E=["controls","poster","src"],h=e.defineComponent({__name:"video-wrapper",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},emits:["paused"],setup(f,{expose:B,emit:l}){const o=f,r=l,C=/xiaomi|miui/i,g=`${i.PREFIX}-player-wrapper`,k=`${i.PREFIX}-player-is-fullscreen`,d=`${i.PREFIX}-player-close-btn`,y=`${i.PREFIX}-player-icon`,a=e.ref(),n=e.ref(!0),P=e.ref(C.test(navigator.userAgent)?void 0:o.url);let u=null;const s=p=>{var m,v;p.target!==a.value&&((m=a.value)==null||m.pause(),n.value=!!((v=a.value)!=null&&v.paused),r("paused"))},t=p=>{const m=p[0],v=a.value;!v||!o.playable||(m.isIntersecting&&o.autoPlay&&v.paused?(v.play().catch(console.warn),n.value=!1):!m.isIntersecting&&!v.paused&&(v.pause(),n.value=!0))},c=()=>{o.autoPlay&&o.playable&&a.value&&(u=new IntersectionObserver(t,{threshold:.25}),u.observe(a.value))},_=()=>{u==null||u.disconnect(),u=null};return e.watch(()=>o.playable,()=>{_(),e.nextTick(()=>c())}),B({play(){a.value.play(),n.value=a.value.paused},pause(){a.value.pause(),n.value=a.value.paused}}),e.onMounted(()=>{C.test(navigator.userAgent)&&fetch(o.url).then(p=>{if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return p.blob()}).then(p=>{P.value=URL.createObjectURL(p)}).catch(p=>{console.error("获取视频失败:",p)}),c()}),e.onBeforeUnmount(()=>{_()}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([g,o.class,!n.value&&!o.autoPlay&&k])},[e.createElementVNode("video",{ref_key:"videoRef",ref:a,muted:"",loop:"",playsinline:"","webkit-playsinline":"","x5-video-player-type":"h5",controls:!n.value&&!o.autoPlay,poster:o.poster,src:P.value},null,8,E),!n.value&&!o.autoPlay?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([d,o.playerButtonClass]),onClick:s},[e.renderSlot(p.$slots,"close",{},()=>[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(y),viewBox:"0 0 1121 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[...m[0]||(m[0]=[e.createElementVNode("path",{d:"M1040.725333 49.005714l-965.485714 965.436953-48.420571-48.469334L992.256 0.487619l48.469333 48.518095z",fill:"#ffffff"},null,-1),e.createElementVNode("path",{d:"M1040.725333 1014.442667l-965.485714-965.485715 48.518095-48.420571L1089.194667 965.973333l-48.469334 48.469334z",fill:"#ffffff"},null,-1)])]))])],2)):e.createCommentVNode("v-if",!0)],2))}}),V=e.defineComponent({__name:"video-normal",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{default:""},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},setup(f,{expose:B}){const l=f,o=`${i.PREFIX}-player-wrapper`,r=`${i.PREFIX}-player-poster`,C=`${i.PREFIX}-player-btn`,g=`${i.PREFIX}-player-btn-text`,k=`${i.PREFIX}-player-icon`,d=e.ref(),y=e.ref(),a=e.ref(),n=e.ref(!1),P=t=>{t.stopPropagation(),l.playable&&(n.value=!0,setTimeout(()=>{var c;(c=a.value)==null||c.play()},0))},u=()=>{n.value=!1};let s=null;return e.onMounted(()=>{!l.autoPlay&&d.value&&(s=new IntersectionObserver(([t])=>{t.isIntersecting&&(n.value=!0)},{threshold:.1}),s.observe(d.value))}),e.onUnmounted(()=>{s==null||s.disconnect()}),B({play(){var t;l.autoPlay?(t=y.value)==null||t.play():P(new MouseEvent("click"))},pause(){var t,c;(t=y.value)==null||t.pause(),(c=a.value)==null||c.pause()}}),(t,c)=>l.autoPlay?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0},l,{url:l.url,ref_key:"videoRef",ref:y}),null,16,["url"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o,l.class]),style:e.normalizeStyle(l.style)},[l.poster?(e.openBlock(),e.createBlock(e.unref(b.ScLayzImage),{key:0,class:e.normalizeClass(r),src:l.poster,alt:"AITO"},null,8,["src"])):e.createCommentVNode("v-if",!0),e.createElementVNode("button",{ref_key:"btnRef",ref:d,class:e.normalizeClass([C,l.playerButtonClass]),onClick:P},[e.renderSlot(t.$slots,"play",{},()=>[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(k),viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[...c[0]||(c[0]=[e.createElementVNode("path",{d:"M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",fill:"#ffffff"},null,-1),e.createElementVNode("path",{d:"M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752z",fill:"#ffffff"},null,-1)])])),e.createElementVNode("span",{class:e.normalizeClass(g)},e.toDisplayString(l.playerButtonText),1)])],2)],6),n.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(h,e.mergeProps(l,{autoPlay:!1,ref_key:"modalVideoRef",ref:a,onPaused:u}),{close:e.withCtx(()=>[e.renderSlot(t.$slots,"close")]),_:3},16)])):e.createCommentVNode("v-if",!0)],64))}}),R=e.defineComponent({__name:"video-multiple",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{default:""},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},setup(f,{expose:B}){const l=f,o=`${i.PREFIX}-player-wrapper`,r=`${i.PREFIX}-player-btn`,C=`${i.PREFIX}-player-btn-text`,g=`${i.PREFIX}-player-icon`,k=e.ref(),d=e.ref(),y=e.ref(),a=e.ref(!1),n=s=>{var t;s.stopPropagation(),l.playable&&((t=d.value)==null||t.pause(),a.value=!0,setTimeout(()=>{var c;(c=y.value)==null||c.play()},0))},P=()=>{var s;a.value=!1,(s=d.value)==null||s.play()};let u=null;return e.onMounted(()=>{k.value&&(u=new IntersectionObserver(([s])=>{s.isIntersecting&&(a.value=!0)},{threshold:.1}),u.observe(k.value))}),e.onUnmounted(()=>{u==null||u.disconnect()}),B({play(){n(new MouseEvent("click"))},pause(){var s,t;(s=d.value)==null||s.pause(),(t=y.value)==null||t.pause()}}),(s,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(" Background: Small Video AutoPlay "),e.createVNode(h,e.mergeProps(l,{url:l.urlSmall||l.url,autoPlay:!0,ref_key:"smallVideoRef",ref:d}),null,16,["url"]),e.createCommentVNode(" Foreground: Button -> Modal Video (Large) "),e.createElementVNode("div",{class:e.normalizeClass([o,l.class,"is-multiple"]),style:e.normalizeStyle(l.style)},[e.createElementVNode("button",{ref_key:"btnRef",ref:k,class:e.normalizeClass([r,l.playerButtonClass]),onClick:n},[e.renderSlot(s.$slots,"play",{},()=>[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(g),viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",fill:"#ffffff"},null,-1),e.createElementVNode("path",{d:"M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752-458.752z",fill:"#ffffff"},null,-1)])])),e.createElementVNode("span",{class:e.normalizeClass(C)},e.toDisplayString(l.playerButtonText),1)])],2)],6),a.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(h,e.mergeProps(l,{url:l.url,autoPlay:!1,ref_key:"modalVideoRef",ref:y,onPaused:P}),{close:e.withCtx(()=>[e.renderSlot(s.$slots,"close")]),_:3},16,["url"])])):e.createCommentVNode("v-if",!0)],64))}}),w=e.defineComponent({__name:"video",props:{class:{},style:{},playerButtonClass:{},playerButtonText:{default:"PLAY"},poster:{default:""},url:{},autoPlay:{type:Boolean,default:!0},playable:{type:Boolean,default:!0},multiple:{type:Boolean},urlSmall:{}},setup(f,{expose:B}){const l=f,o=e.ref();return B({play(){var r;(r=o.value)==null||r.play()},pause(){var r;(r=o.value)==null||r.pause()}}),(r,C)=>l.multiple?(e.openBlock(),e.createBlock(R,e.mergeProps({key:0},l,{ref_key:"videoRef",ref:o}),{play:e.withCtx(()=>[e.renderSlot(r.$slots,"play")]),close:e.withCtx(()=>[e.renderSlot(r.$slots,"close")]),_:3},16)):(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},l,{ref_key:"videoRef",ref:o}),{play:e.withCtx(()=>[e.renderSlot(r.$slots,"play")]),close:e.withCtx(()=>[e.renderSlot(r.$slots,"close")]),_:3},16))}});w.install=f=>(f.component("ScVideo",w),f);const I=w;exports.ScVideo=I;
@@ -0,0 +1 @@
1
+ .sc-swiper-showcase{width:100%;color:#fff;display:flex;flex-direction:column;gap:16px}.sc-swiper-showcase__main{width:100%}.sc-swiper-showcase .swiper-slide{height:auto}.sc-swiper-showcase__card{display:flex;flex-direction:column;overflow:hidden;height:100%}.sc-swiper-showcase__media{position:relative;width:100%}.sc-swiper-showcase__tag{position:absolute;top:0;left:0;padding:14px 30px;background:#0009;border-radius:1px;z-index:2;font-weight:400;font-size:24px;line-height:30px;color:#fff}.sc-swiper-showcase__image{width:100%;height:100%;display:block}.sc-swiper-showcase .sc-img{width:100%;height:100%;object-fit:cover;background-color:transparent}.sc-swiper-showcase__info{margin-top:24px;display:flex;flex-direction:column;gap:6px}.sc-swiper-showcase__title{font-size:18px;line-height:26px;font-weight:600;letter-spacing:.2px}.sc-swiper-showcase__desc{color:#cfcfd6;font-size:14px;line-height:20px}.sc-swiper-showcase__nav{display:flex;gap:12px;justify-content:flex-end}.sc-swiper-showcase__nav-btn{width:48px;height:48px;border:none;background:transparent;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:opacity .2s ease}.sc-swiper-showcase__nav-btn:hover:not(:disabled){opacity:.85}.sc-swiper-showcase__nav-btn:disabled{cursor:not-allowed;opacity:.35}.sc-swiper-showcase__nav-icon{width:48px;height:48px;display:block}.sc-swiper-showcase__nav-icon--prev{transform:rotate(180deg)}@media (max-width: 1024px){.sc-swiper-showcase__title{font-size:16px}.sc-swiper-showcase__desc{font-size:13px}.sc-swiper-showcase__nav{justify-content:center;padding-bottom:4px}}@media (max-width: 640px){.sc-swiper-showcase{gap:12px}.sc-swiper-showcase__info{padding:12px}}
@@ -1,4 +1,4 @@
1
- import { S as e } from "../index-C6ZSfMR8.js";
1
+ import { S as e } from "../index-tkvNmWjy.js";
2
2
  export {
3
3
  e as ScHorizontalViewer
4
4
  };
@@ -1,4 +1,4 @@
1
- import { a as r } from "../index-C6ZSfMR8.js";
1
+ import { a as r } from "../index-tkvNmWjy.js";
2
2
  export {
3
3
  r as ScImageIndicator
4
4
  };
package/dist/es/index.mjs CHANGED
@@ -1,17 +1,18 @@
1
- import { ScAccordionInfoPanel as f } from "./accordion-info-panel.mjs";
2
- import { ScAnimatedNumber as p } from "./animated-number.mjs";
1
+ import { ScAccordionInfoPanel as p } from "./accordion-info-panel.mjs";
2
+ import { ScAnimatedNumber as f } from "./animated-number.mjs";
3
3
  import { ScDrawer as S } from "./drawer.mjs";
4
4
  import { ScDropdown as l } from "./dropdown.mjs";
5
5
  import { ScGradualHighlight as d } from "./gradual-highlight.mjs";
6
- import { S as u, a as h, b as w } from "../index-C6ZSfMR8.js";
6
+ import { S as u, a as h, b as w } from "../index-tkvNmWjy.js";
7
7
  import { ScInput as y } from "./input.mjs";
8
8
  import { ScLayzImage as g } from "./layz-image.mjs";
9
9
  import { ScParameterBox as I } from "./parameter-box.mjs";
10
10
  import { ScRadio as $ } from "./radio.mjs";
11
- import { S as b } from "../index-BrggpRcU.js";
12
- import { ScTabIndicator as v } from "./tab-indicator.mjs";
13
- import { ScVideo as x } from "./video.mjs";
14
- const n = "@seresweb/website-component", Z = (t = {}) => {
11
+ import { ScSwiperShowcase as b } from "./swiper-showcase.mjs";
12
+ import { ScSwiperVehicle as v } from "./swiper-vehicle.mjs";
13
+ import { ScTabIndicator as x } from "./tab-indicator.mjs";
14
+ import { ScVideo as N } from "./video.mjs";
15
+ const n = "@seresweb/website-component", k = (t = {}) => {
15
16
  const s = t.prefix || "Sc", o = t.importStyle ?? "css";
16
17
  return {
17
18
  type: "component",
@@ -34,15 +35,15 @@ const n = "@seresweb/website-component", Z = (t = {}) => {
34
35
  };
35
36
  }
36
37
  };
37
- }, N = [f, p, S, l, d, u, h, y, g, I, $, w, b, v, x], j = {
38
- install: (t) => (N.forEach((s) => {
38
+ }, P = [p, f, S, l, d, u, h, y, g, I, $, w, b, v, x, N], q = {
39
+ install: (t) => (P.forEach((s) => {
39
40
  t.use(s);
40
41
  }), t)
41
42
  };
42
43
  export {
43
- Z as ComponentsResolver,
44
- f as ScAccordionInfoPanel,
45
- p as ScAnimatedNumber,
44
+ k as ComponentsResolver,
45
+ p as ScAccordionInfoPanel,
46
+ f as ScAnimatedNumber,
46
47
  S as ScDrawer,
47
48
  l as ScDropdown,
48
49
  d as ScGradualHighlight,
@@ -53,8 +54,9 @@ export {
53
54
  I as ScParameterBox,
54
55
  $ as ScRadio,
55
56
  w as ScSwiperNormal,
56
- b as ScSwiperVehicle,
57
- v as ScTabIndicator,
58
- x as ScVideo,
59
- j as default
57
+ b as ScSwiperShowcase,
58
+ v as ScSwiperVehicle,
59
+ x as ScTabIndicator,
60
+ N as ScVideo,
61
+ q as default
60
62
  };
@@ -1,4 +1,4 @@
1
- import { b as a } from "../index-C6ZSfMR8.js";
1
+ import { b as a } from "../index-tkvNmWjy.js";
2
2
  export {
3
3
  a as ScSwiperNormal
4
4
  };
@@ -0,0 +1,274 @@
1
+ import { defineComponent as V, ref as v, computed as x, watch as M, nextTick as E, onMounted as Z, onBeforeUnmount as N, createElementBlock as o, createCommentVNode as _, openBlock as c, normalizeClass as t, unref as i, createElementVNode as e, Fragment as R, renderList as O, createVNode as I, toDisplayString as f } from "vue";
2
+ import { S as z } from "../swiper-bundle-DOQ1LV4x.js";
3
+ import { P as s } from "../_vars-BV4QQF-p.js";
4
+ import { ScLayzImage as D } from "./layz-image.mjs";
5
+ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /* @__PURE__ */ V({
6
+ __name: "swiper-showcase",
7
+ props: {
8
+ dataList: { default: () => [] },
9
+ slidesPerView: { default: 4 },
10
+ spaceBetween: { default: 24 },
11
+ swiperOptions: { default: () => ({}) },
12
+ placeholder: {}
13
+ },
14
+ emits: ["slideChange"],
15
+ setup(d, { emit: b }) {
16
+ const a = d, B = b;
17
+ let r = null;
18
+ const p = v(), h = v(!0), u = v(!0), m = x(() => a.dataList && a.dataList.length > 0), C = (w) => [
19
+ `${s}-swiper-showcase__nav-btn`,
20
+ w ? `${s}-swiper-showcase__nav-btn--prev` : `${s}-swiper-showcase__nav-btn--next`
21
+ ], k = () => {
22
+ if (!r) {
23
+ h.value = !0, u.value = !0;
24
+ return;
25
+ }
26
+ h.value = r.isBeginning, u.value = r.isEnd, B("slideChange", r.activeIndex);
27
+ }, L = () => {
28
+ r && (r.destroy(), r = null);
29
+ }, $ = () => {
30
+ var l;
31
+ if (L(), !p.value || !m.value) return;
32
+ const w = {
33
+ 0: { slidesPerView: 1, spaceBetween: 12 },
34
+ 768: { slidesPerView: Math.min(2, a.slidesPerView), spaceBetween: 16 },
35
+ 1024: { slidesPerView: a.slidesPerView, spaceBetween: a.spaceBetween }
36
+ };
37
+ r = new z(p.value, {
38
+ slidesPerView: a.slidesPerView,
39
+ spaceBetween: a.spaceBetween,
40
+ observer: !0,
41
+ observeParents: !0,
42
+ ...a.swiperOptions,
43
+ breakpoints: {
44
+ ...w,
45
+ ...((l = a.swiperOptions) == null ? void 0 : l.breakpoints) || {}
46
+ }
47
+ }), r.on("slideChange", k), k();
48
+ }, y = () => {
49
+ r && r.slideNext();
50
+ }, S = () => {
51
+ r && r.slidePrev();
52
+ };
53
+ return M(
54
+ () => [a.dataList, a.slidesPerView, a.spaceBetween, a.swiperOptions],
55
+ () => {
56
+ E($);
57
+ },
58
+ { deep: !0 }
59
+ ), Z(() => {
60
+ $();
61
+ }), N(() => {
62
+ L();
63
+ }), (w, l) => m.value ? (c(), o(
64
+ "div",
65
+ {
66
+ key: 0,
67
+ class: t(`${i(s)}-swiper-showcase`)
68
+ },
69
+ [
70
+ e(
71
+ "div",
72
+ {
73
+ ref_key: "swiperRef",
74
+ ref: p,
75
+ class: t(`${i(s)}-swiper-showcase__main`)
76
+ },
77
+ [
78
+ e("div", F, [
79
+ (c(!0), o(
80
+ R,
81
+ null,
82
+ O(w.dataList, (n, P) => (c(), o("div", {
83
+ key: `${n.title}-${P}`,
84
+ class: "swiper-slide"
85
+ }, [
86
+ e(
87
+ "div",
88
+ {
89
+ class: t(`${i(s)}-swiper-showcase__card`)
90
+ },
91
+ [
92
+ e(
93
+ "div",
94
+ {
95
+ class: t(`${i(s)}-swiper-showcase__media`)
96
+ },
97
+ [
98
+ n.tag ? (c(), o(
99
+ "div",
100
+ {
101
+ key: 0,
102
+ class: t(`${i(s)}-swiper-showcase__tag`)
103
+ },
104
+ f(n.tag),
105
+ 3
106
+ /* TEXT, CLASS */
107
+ )) : _("v-if", !0),
108
+ I(i(D), {
109
+ src: n.url || w.placeholder || "",
110
+ alt: n.alt || n.title || "",
111
+ class: t(`${i(s)}-swiper-showcase__image`),
112
+ "img-class": "sc-swiper-showcase__img"
113
+ }, null, 8, ["src", "alt", "class"])
114
+ ],
115
+ 2
116
+ /* CLASS */
117
+ ),
118
+ e(
119
+ "div",
120
+ {
121
+ class: t(`${i(s)}-swiper-showcase__info`)
122
+ },
123
+ [
124
+ e(
125
+ "div",
126
+ {
127
+ class: t(`${i(s)}-swiper-showcase__title`)
128
+ },
129
+ f(n.title),
130
+ 3
131
+ /* TEXT, CLASS */
132
+ ),
133
+ n.desc ? (c(), o(
134
+ "div",
135
+ {
136
+ key: 0,
137
+ class: t(`${i(s)}-swiper-showcase__desc`)
138
+ },
139
+ f(n.desc),
140
+ 3
141
+ /* TEXT, CLASS */
142
+ )) : _("v-if", !0)
143
+ ],
144
+ 2
145
+ /* CLASS */
146
+ )
147
+ ],
148
+ 2
149
+ /* CLASS */
150
+ )
151
+ ]))),
152
+ 128
153
+ /* KEYED_FRAGMENT */
154
+ ))
155
+ ])
156
+ ],
157
+ 2
158
+ /* CLASS */
159
+ ),
160
+ e(
161
+ "div",
162
+ {
163
+ class: t(`${i(s)}-swiper-showcase__nav`)
164
+ },
165
+ [
166
+ e("button", {
167
+ type: "button",
168
+ class: t(C(!0)),
169
+ disabled: h.value,
170
+ "aria-label": "previous",
171
+ onClick: S
172
+ }, [
173
+ (c(), o(
174
+ "svg",
175
+ {
176
+ "aria-hidden": "true",
177
+ class: t(`${i(s)}-swiper-showcase__nav-icon ${i(s)}-swiper-showcase__nav-icon--prev`),
178
+ width: "48",
179
+ height: "48",
180
+ viewBox: "0 0 48 48",
181
+ fill: "none",
182
+ xmlns: "http://www.w3.org/2000/svg"
183
+ },
184
+ [...l[0] || (l[0] = [
185
+ e(
186
+ "g",
187
+ { id: "right" },
188
+ [
189
+ e("path", {
190
+ d: "M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",
191
+ fill: "white",
192
+ "fill-opacity": "0.3"
193
+ }),
194
+ e("path", {
195
+ d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
196
+ stroke: "white",
197
+ "stroke-opacity": "0.1"
198
+ }),
199
+ e("path", {
200
+ id: "Rectangle 302 (Stroke)",
201
+ d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
202
+ fill: "white"
203
+ })
204
+ ],
205
+ -1
206
+ /* CACHED */
207
+ )
208
+ ])],
209
+ 2
210
+ /* CLASS */
211
+ ))
212
+ ], 10, T),
213
+ e("button", {
214
+ type: "button",
215
+ class: t(C(!1)),
216
+ disabled: u.value,
217
+ "aria-label": "next",
218
+ onClick: y
219
+ }, [
220
+ (c(), o(
221
+ "svg",
222
+ {
223
+ "aria-hidden": "true",
224
+ class: t(`${i(s)}-swiper-showcase__nav-icon`),
225
+ width: "48",
226
+ height: "48",
227
+ viewBox: "0 0 48 48",
228
+ fill: "none",
229
+ xmlns: "http://www.w3.org/2000/svg"
230
+ },
231
+ [...l[1] || (l[1] = [
232
+ e(
233
+ "g",
234
+ { id: "right" },
235
+ [
236
+ e("path", {
237
+ d: "M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",
238
+ fill: "white",
239
+ "fill-opacity": "0.3"
240
+ }),
241
+ e("path", {
242
+ d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
243
+ stroke: "white",
244
+ "stroke-opacity": "0.1"
245
+ }),
246
+ e("path", {
247
+ id: "Rectangle 302 (Stroke)",
248
+ d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
249
+ fill: "white"
250
+ })
251
+ ],
252
+ -1
253
+ /* CACHED */
254
+ )
255
+ ])],
256
+ 2
257
+ /* CLASS */
258
+ ))
259
+ ], 10, U)
260
+ ],
261
+ 2
262
+ /* CLASS */
263
+ )
264
+ ],
265
+ 2
266
+ /* CLASS */
267
+ )) : _("v-if", !0);
268
+ }
269
+ });
270
+ g.install = (d) => (d.component("ScSwiperShowcase", g), d);
271
+ const G = g;
272
+ export {
273
+ G as ScSwiperShowcase
274
+ };
@@ -1,4 +1,160 @@
1
- import { S } from "../index-BrggpRcU.js";
1
+ import { defineComponent as M, ref as b, computed as I, watch as E, onMounted as T, onBeforeUnmount as A, createElementBlock as c, openBlock as n, normalizeClass as l, unref as o, createBlock as F, createCommentVNode as k, createElementVNode as u, Fragment as _, renderList as w, createVNode as U, toDisplayString as y, normalizeStyle as B } from "vue";
2
+ import { S as N } from "../swiper-bundle-DOQ1LV4x.js";
3
+ import { P as s } from "../_vars-BV4QQF-p.js";
4
+ import { ScLayzImage as V } from "./layz-image.mjs";
5
+ const P = { class: "swiper-wrapper" }, R = ["onClick"], f = /* @__PURE__ */ M({
6
+ __name: "swiper-vehicle",
7
+ props: {
8
+ modelValue: { default: 0 },
9
+ backgroundImgUrl: {},
10
+ backgroundImgAlt: {},
11
+ dataList: {},
12
+ imgFullHeightInMobile: { type: Boolean },
13
+ swiperOptions: { default: () => ({}) },
14
+ effect: { default: "fade" },
15
+ indicatorClass: {},
16
+ tabIndicatorBottom: {},
17
+ showTextBackground: { type: Boolean }
18
+ },
19
+ emits: ["change", "update:modelValue"],
20
+ setup(d, { emit: $ }) {
21
+ const a = d, m = $;
22
+ let t = null;
23
+ const i = b(a.modelValue), p = b(), C = I(() => {
24
+ const e = {};
25
+ return a.tabIndicatorBottom && (e.position = "absolute", e.zIndex = 1, e.left = "50%", e.bottom = typeof a.tabIndicatorBottom == "number" ? `${a.tabIndicatorBottom}px` : a.tabIndicatorBottom, e.transform = "translateX(-50%)"), e;
26
+ }), L = I(() => a.dataList[i.value].text);
27
+ E(
28
+ () => a.modelValue,
29
+ (e) => {
30
+ i.value !== e && (i.value = e, g(i.value));
31
+ }
32
+ );
33
+ const g = (e) => {
34
+ t == null || t.slideTo(e);
35
+ }, v = () => {
36
+ t == null || t.destroy(), p.value && (t = new N(p.value, {
37
+ slidesPerView: 1,
38
+ allowTouchMove: !1,
39
+ effect: a.effect,
40
+ autoplay: !0,
41
+ ...a.swiperOptions
42
+ }), t.on("realIndexChange", (e) => {
43
+ i.value = e.realIndex, m("change", e.realIndex), m("update:modelValue", e.realIndex);
44
+ }));
45
+ }, x = () => {
46
+ (t == null ? void 0 : t.params.autoplay).enabled && (t == null || t.autoplay.start());
47
+ }, z = () => {
48
+ (t == null ? void 0 : t.params.autoplay).enabled && (t == null || t.autoplay.stop());
49
+ };
50
+ return T(() => {
51
+ v(), window.addEventListener("resize", v);
52
+ }), A(() => {
53
+ t == null || t.destroy(), window.removeEventListener("resize", v);
54
+ }), (e, H) => (n(), c(
55
+ "div",
56
+ {
57
+ class: l([`${o(s)}-swiper-vehicle`])
58
+ },
59
+ [
60
+ e.backgroundImgUrl ? (n(), F(o(V), {
61
+ key: 0,
62
+ class: l(`${o(s)}-swiper-vehicle__bg`),
63
+ src: e.backgroundImgUrl,
64
+ alt: e.backgroundImgAlt
65
+ }, null, 8, ["class", "src", "alt"])) : k("v-if", !0),
66
+ u(
67
+ "div",
68
+ {
69
+ ref_key: "swiperRef",
70
+ ref: p,
71
+ class: l([`${o(s)}-swiper-vehicle__main`])
72
+ },
73
+ [
74
+ u("div", P, [
75
+ (n(!0), c(
76
+ _,
77
+ null,
78
+ w(e.dataList, (r) => (n(), c("div", {
79
+ key: r.url,
80
+ class: "swiper-slide"
81
+ }, [
82
+ e.showTextBackground ? (n(), c(
83
+ "span",
84
+ {
85
+ key: 0,
86
+ class: l(`${o(s)}-swiper-vehicle__text-bg`)
87
+ },
88
+ y(r.text),
89
+ 3
90
+ /* TEXT, CLASS */
91
+ )) : k("v-if", !0),
92
+ U(o(V), {
93
+ class: l(e.imgFullHeightInMobile ? `${o(s)}-swiper-vehicle__full-height` : ""),
94
+ src: r.url,
95
+ alt: r.alt
96
+ }, null, 8, ["class", "src", "alt"])
97
+ ]))),
98
+ 128
99
+ /* KEYED_FRAGMENT */
100
+ ))
101
+ ])
102
+ ],
103
+ 2
104
+ /* CLASS */
105
+ ),
106
+ u(
107
+ "div",
108
+ {
109
+ class: l([`${o(s)}-swiper-vehicle__indicator`, e.indicatorClass]),
110
+ style: B(C.value)
111
+ },
112
+ [
113
+ u(
114
+ "div",
115
+ {
116
+ class: l(`${o(s)}-swiper-vehicle__indicator-control`)
117
+ },
118
+ [
119
+ (n(!0), c(
120
+ _,
121
+ null,
122
+ w(e.dataList, (r, h) => (n(), c("div", {
123
+ key: r.color,
124
+ class: l([i.value === h && "active", "color-stroke"]),
125
+ style: B({ "background-color": r.color, "border-color": r.color }),
126
+ onClick: (O) => g(h),
127
+ onMouseenter: z,
128
+ onMouseleave: x
129
+ }, null, 46, R))),
130
+ 128
131
+ /* KEYED_FRAGMENT */
132
+ ))
133
+ ],
134
+ 2
135
+ /* CLASS */
136
+ ),
137
+ u(
138
+ "div",
139
+ {
140
+ class: l(`${o(s)}-swiper-vehicle__indicator-text`)
141
+ },
142
+ y(L.value),
143
+ 3
144
+ /* TEXT, CLASS */
145
+ )
146
+ ],
147
+ 6
148
+ /* CLASS, STYLE */
149
+ )
150
+ ],
151
+ 2
152
+ /* CLASS */
153
+ ));
154
+ }
155
+ });
156
+ f.install = (d) => (d.component("ScSwiperVehicle", f), d);
157
+ const G = f;
2
158
  export {
3
- S as ScSwiperVehicle
159
+ G as ScSwiperVehicle
4
160
  };