@salla.sa/twilight-components 2.9.49 → 2.10.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.
- package/dist/cjs/{index-7b85482c.js → app-globals-0a1abeac.js} +31 -2
- package/dist/cjs/index-1d2b3370.js +0 -4
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/salla-add-product-button.cjs.entry.js +7 -3
- package/dist/cjs/salla-button_35.cjs.entry.js +614 -1947
- package/dist/cjs/twilight.cjs.js +3 -2
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +9 -5
- package/dist/collection/components/salla-button/salla-button.js +5 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +9 -8
- package/dist/collection/components/salla-gifting/salla-gifting.js +16 -15
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +5 -3
- package/dist/collection/components/salla-map/salla-map.css +1 -56
- package/dist/collection/components/salla-map/salla-map.js +6 -6
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +17 -16
- package/dist/collection/components/salla-quick-order/salla-quick-order.css +0 -71
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +65 -102
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +14 -10
- package/dist/collection/components/salla-slider/salla-slider.css +242 -0
- package/dist/collection/components/salla-slider/salla-slider.js +461 -109
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -2
- package/dist/collection/global/app-dev.js +2 -1
- package/dist/collection/global/app.js +15 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +31 -3
- package/dist/components/salla-add-product-button.js +7 -3
- package/dist/components/salla-button2.js +5 -1
- package/dist/components/salla-file-upload2.js +249 -3
- package/dist/components/salla-gifting.js +24 -17
- package/dist/components/salla-loyalty.js +3 -3
- package/dist/components/salla-map.js +4 -4
- package/dist/components/salla-offer-modal.js +10 -9
- package/dist/components/salla-quick-order.js +58 -95
- package/dist/components/salla-rating-stars2.js +8 -4
- package/dist/components/salla-slider2.js +253 -1805
- package/dist/components/salla-tel-input2.js +2 -2
- package/dist/esm/{index-adc28dc8.js → app-globals-d3b05078.js} +31 -2
- package/dist/esm/index-f1d446ac.js +0 -4
- package/dist/esm/loader.js +3 -2
- package/dist/esm/salla-add-product-button.entry.js +7 -3
- package/dist/esm/salla-button_35.entry.js +613 -1946
- package/dist/esm/twilight.js +3 -2
- package/dist/esm-es5/{index-adc28dc8.js → app-globals-d3b05078.js} +2 -2
- package/dist/esm-es5/index-f1d446ac.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button.entry.js +1 -1
- package/dist/esm-es5/salla-button_35.entry.js +11 -5
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/p-1b14dc52.js +24 -0
- package/dist/twilight/{p-486ce499.system.entry.js → p-5a1197bb.system.entry.js} +1 -1
- package/dist/twilight/p-6bb79b61.entry.js +30 -0
- package/dist/twilight/p-70235d2a.system.js +24 -0
- package/dist/twilight/p-97f66179.system.js +4 -0
- package/dist/twilight/{p-6f41faf8.entry.js → p-dbb379ce.entry.js} +1 -1
- package/dist/twilight/p-ec1b297c.system.entry.js +47 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +4 -7
- package/dist/types/components/salla-slider/salla-slider.d.ts +87 -14
- package/dist/types/components.d.ts +99 -60
- package/dist/types/global/app-dev.d.ts +0 -1
- package/package.json +6 -4
- package/dist/cjs/core-c7a9fb22.js +0 -4982
- package/dist/cjs/salla-swiper.cjs.entry.js +0 -62
- package/dist/collection/components/salla-swiper/salla-swiper.css +0 -177
- package/dist/collection/components/salla-swiper/salla-swiper.js +0 -152
- package/dist/components/arrow-left.js +0 -11
- package/dist/components/core.js +0 -4959
- package/dist/components/salla-swiper.d.ts +0 -11
- package/dist/components/salla-swiper.js +0 -92
- package/dist/esm/core-572aabd0.js +0 -4973
- package/dist/esm/salla-swiper.entry.js +0 -58
- package/dist/esm-es5/core-572aabd0.js +0 -4
- package/dist/esm-es5/salla-swiper.entry.js +0 -4
- package/dist/twilight/p-00e66d1a.system.js +0 -4
- package/dist/twilight/p-684a004a.system.entry.js +0 -4
- package/dist/twilight/p-6ed7d3a2.js +0 -4
- package/dist/twilight/p-7234a2a2.entry.js +0 -30
- package/dist/twilight/p-a84812f4.system.js +0 -4
- package/dist/twilight/p-d3daf7a7.system.entry.js +0 -41
- package/dist/twilight/p-e55e8d3d.js +0 -24
- package/dist/twilight/p-e8c3c209.entry.js +0 -4
- package/dist/twilight/p-ea021b56.system.js +0 -24
- package/dist/types/components/salla-swiper/salla-swiper.d.ts +0 -31
- package/dist/types/index.d.ts +0 -7
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
-
|
|
8
|
-
const index = require('./index-1d2b3370.js');
|
|
9
|
-
const core = require('./core-c7a9fb22.js');
|
|
10
|
-
|
|
11
|
-
const sallaSwiperCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkAB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ji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA\") format(\"woff\");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-pointer-events{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-pointer-events.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:\"\";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}.s-swiper{position:relative}";
|
|
12
|
-
|
|
13
|
-
const SallaSwiper = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
/**
|
|
17
|
-
* Set to true to enable continuous loop mode. Defaults to false.
|
|
18
|
-
*/
|
|
19
|
-
this.loop = false;
|
|
20
|
-
/**
|
|
21
|
-
* Duration of transition between slides (in ms). Defaults to 300ms.
|
|
22
|
-
*/
|
|
23
|
-
this.speed = 300;
|
|
24
|
-
/**
|
|
25
|
-
* Number of slides per view (slides visible at the same time on slider's container).
|
|
26
|
-
*/
|
|
27
|
-
this.itemPerView = "auto";
|
|
28
|
-
/**
|
|
29
|
-
* Distance between slide items in px. Defaults to 8px
|
|
30
|
-
*/
|
|
31
|
-
this.spaceBetweenItems = 8;
|
|
32
|
-
// States
|
|
33
|
-
this.currentIndex = undefined;
|
|
34
|
-
this.isLastSlideItem = false;
|
|
35
|
-
this.isFirstSlideItem = true;
|
|
36
|
-
}
|
|
37
|
-
componentDidLoad() {
|
|
38
|
-
this.initSwiper();
|
|
39
|
-
}
|
|
40
|
-
initSwiper() {
|
|
41
|
-
for (const slide of this.swiperWrapper.children) {
|
|
42
|
-
//todo:: use `s-swiper-slide`
|
|
43
|
-
slide.classList.add('swiper-slide');
|
|
44
|
-
}
|
|
45
|
-
this.swiper = new core.Swiper(this.swiperContainer, {
|
|
46
|
-
loop: this.loop,
|
|
47
|
-
speed: this.speed,
|
|
48
|
-
slidesPerView: this.itemPerView,
|
|
49
|
-
spaceBetween: this.spaceBetweenItems,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
update() {
|
|
53
|
-
this.swiper.update();
|
|
54
|
-
}
|
|
55
|
-
render() {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
return (index.h("div", { class: "s-swiper" }, index.h("div", { class: "s-swiper-button-prev" }, index.h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() }, index.h("span", { class: "s-swiper-button-icon", innerHTML: core.ArrowLeftIcon }))), index.h("div", { class: "s-swiper-button-next" }, index.h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() }, index.h("span", { class: "s-swiper-button-icon", innerHTML: core.ArrowRightIcon }))), index.h("div", { class: "swiper" }, index.h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el }, index.h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el }, index.h("slot", null))))));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
SallaSwiper.style = sallaSwiperCss;
|
|
61
|
-
|
|
62
|
-
exports.salla_swiper = SallaSwiper;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swiper 8.3.2
|
|
3
|
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4
|
-
* https://swiperjs.com
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2014-2022 Vladimir Kharlampidi
|
|
7
|
-
*
|
|
8
|
-
* Released under the MIT License
|
|
9
|
-
*
|
|
10
|
-
* Released on: July 26, 2022
|
|
11
|
-
*/
|
|
12
|
-
@font-face {
|
|
13
|
-
font-family: "swiper-icons";
|
|
14
|
-
src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZ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8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
font-style: normal;
|
|
17
|
-
}
|
|
18
|
-
:root {
|
|
19
|
-
--swiper-theme-color: #007aff;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.swiper {
|
|
23
|
-
margin-left: auto;
|
|
24
|
-
margin-right: auto;
|
|
25
|
-
position: relative;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
list-style: none;
|
|
28
|
-
padding: 0;
|
|
29
|
-
/* Fix of Webkit flickering */
|
|
30
|
-
z-index: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.swiper-vertical > .swiper-wrapper {
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.swiper-wrapper {
|
|
38
|
-
position: relative;
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
z-index: 1;
|
|
42
|
-
display: flex;
|
|
43
|
-
transition-property: transform;
|
|
44
|
-
box-sizing: content-box;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.swiper-android .swiper-slide,
|
|
48
|
-
.swiper-wrapper {
|
|
49
|
-
transform: translate3d(0px, 0, 0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.swiper-pointer-events {
|
|
53
|
-
touch-action: pan-y;
|
|
54
|
-
}
|
|
55
|
-
.swiper-pointer-events.swiper-vertical {
|
|
56
|
-
touch-action: pan-x;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.swiper-slide {
|
|
60
|
-
flex-shrink: 0;
|
|
61
|
-
width: 100%;
|
|
62
|
-
height: 100%;
|
|
63
|
-
position: relative;
|
|
64
|
-
transition-property: transform;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.swiper-slide-invisible-blank {
|
|
68
|
-
visibility: hidden;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Auto Height */
|
|
72
|
-
.swiper-autoheight,
|
|
73
|
-
.swiper-autoheight .swiper-slide {
|
|
74
|
-
height: auto;
|
|
75
|
-
}
|
|
76
|
-
.swiper-autoheight .swiper-wrapper {
|
|
77
|
-
align-items: flex-start;
|
|
78
|
-
transition-property: transform, height;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.swiper-backface-hidden .swiper-slide {
|
|
82
|
-
transform: translateZ(0);
|
|
83
|
-
backface-visibility: hidden;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* 3D Effects */
|
|
87
|
-
.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {
|
|
88
|
-
perspective: 1200px;
|
|
89
|
-
}
|
|
90
|
-
.swiper-3d .swiper-wrapper,
|
|
91
|
-
.swiper-3d .swiper-slide,
|
|
92
|
-
.swiper-3d .swiper-slide-shadow,
|
|
93
|
-
.swiper-3d .swiper-slide-shadow-left,
|
|
94
|
-
.swiper-3d .swiper-slide-shadow-right,
|
|
95
|
-
.swiper-3d .swiper-slide-shadow-top,
|
|
96
|
-
.swiper-3d .swiper-slide-shadow-bottom,
|
|
97
|
-
.swiper-3d .swiper-cube-shadow {
|
|
98
|
-
transform-style: preserve-3d;
|
|
99
|
-
}
|
|
100
|
-
.swiper-3d .swiper-slide-shadow,
|
|
101
|
-
.swiper-3d .swiper-slide-shadow-left,
|
|
102
|
-
.swiper-3d .swiper-slide-shadow-right,
|
|
103
|
-
.swiper-3d .swiper-slide-shadow-top,
|
|
104
|
-
.swiper-3d .swiper-slide-shadow-bottom {
|
|
105
|
-
position: absolute;
|
|
106
|
-
left: 0;
|
|
107
|
-
top: 0;
|
|
108
|
-
width: 100%;
|
|
109
|
-
height: 100%;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
z-index: 10;
|
|
112
|
-
}
|
|
113
|
-
.swiper-3d .swiper-slide-shadow {
|
|
114
|
-
background: rgba(0, 0, 0, 0.15);
|
|
115
|
-
}
|
|
116
|
-
.swiper-3d .swiper-slide-shadow-left {
|
|
117
|
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
118
|
-
}
|
|
119
|
-
.swiper-3d .swiper-slide-shadow-right {
|
|
120
|
-
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
121
|
-
}
|
|
122
|
-
.swiper-3d .swiper-slide-shadow-top {
|
|
123
|
-
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
124
|
-
}
|
|
125
|
-
.swiper-3d .swiper-slide-shadow-bottom {
|
|
126
|
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* CSS Mode */
|
|
130
|
-
.swiper-css-mode > .swiper-wrapper {
|
|
131
|
-
overflow: auto;
|
|
132
|
-
scrollbar-width: none;
|
|
133
|
-
/* For Firefox */
|
|
134
|
-
-ms-overflow-style: none;
|
|
135
|
-
/* For Internet Explorer and Edge */
|
|
136
|
-
}
|
|
137
|
-
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
|
138
|
-
display: none;
|
|
139
|
-
}
|
|
140
|
-
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
|
141
|
-
scroll-snap-align: start start;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
|
|
145
|
-
scroll-snap-type: x mandatory;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
|
149
|
-
scroll-snap-type: y mandatory;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.swiper-centered > .swiper-wrapper::before {
|
|
153
|
-
content: "";
|
|
154
|
-
flex-shrink: 0;
|
|
155
|
-
order: 9999;
|
|
156
|
-
}
|
|
157
|
-
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
|
158
|
-
margin-inline-start: var(--swiper-centered-offset-before);
|
|
159
|
-
}
|
|
160
|
-
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
|
161
|
-
height: 100%;
|
|
162
|
-
width: var(--swiper-centered-offset-after);
|
|
163
|
-
}
|
|
164
|
-
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
|
165
|
-
margin-block-start: var(--swiper-centered-offset-before);
|
|
166
|
-
}
|
|
167
|
-
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
|
168
|
-
width: 100%;
|
|
169
|
-
height: var(--swiper-centered-offset-after);
|
|
170
|
-
}
|
|
171
|
-
.swiper-centered > .swiper-wrapper > .swiper-slide {
|
|
172
|
-
scroll-snap-align: center center;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.s-swiper {
|
|
176
|
-
position: relative;
|
|
177
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import { Component, State, Prop, h } from '@stencil/core';
|
|
5
|
-
import Swiper from 'swiper';
|
|
6
|
-
import ArrowRightIcon from "../../assets/svg/arrow-right.svg";
|
|
7
|
-
import ArrowLeftIcon from "../../assets/svg/arrow-left.svg";
|
|
8
|
-
/**
|
|
9
|
-
* @slot The default slot.
|
|
10
|
-
*/
|
|
11
|
-
export class SallaSwiper {
|
|
12
|
-
constructor() {
|
|
13
|
-
/**
|
|
14
|
-
* Set to true to enable continuous loop mode. Defaults to false.
|
|
15
|
-
*/
|
|
16
|
-
this.loop = false;
|
|
17
|
-
/**
|
|
18
|
-
* Duration of transition between slides (in ms). Defaults to 300ms.
|
|
19
|
-
*/
|
|
20
|
-
this.speed = 300;
|
|
21
|
-
/**
|
|
22
|
-
* Number of slides per view (slides visible at the same time on slider's container).
|
|
23
|
-
*/
|
|
24
|
-
this.itemPerView = "auto";
|
|
25
|
-
/**
|
|
26
|
-
* Distance between slide items in px. Defaults to 8px
|
|
27
|
-
*/
|
|
28
|
-
this.spaceBetweenItems = 8;
|
|
29
|
-
// States
|
|
30
|
-
this.currentIndex = undefined;
|
|
31
|
-
this.isLastSlideItem = false;
|
|
32
|
-
this.isFirstSlideItem = true;
|
|
33
|
-
}
|
|
34
|
-
componentDidLoad() {
|
|
35
|
-
this.initSwiper();
|
|
36
|
-
}
|
|
37
|
-
initSwiper() {
|
|
38
|
-
for (const slide of this.swiperWrapper.children) {
|
|
39
|
-
//todo:: use `s-swiper-slide`
|
|
40
|
-
slide.classList.add('swiper-slide');
|
|
41
|
-
}
|
|
42
|
-
this.swiper = new Swiper(this.swiperContainer, {
|
|
43
|
-
loop: this.loop,
|
|
44
|
-
speed: this.speed,
|
|
45
|
-
slidesPerView: this.itemPerView,
|
|
46
|
-
spaceBetween: this.spaceBetweenItems,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
update() {
|
|
50
|
-
this.swiper.update();
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
var _a, _b;
|
|
54
|
-
return (h("div", { class: "s-swiper" },
|
|
55
|
-
h("div", { class: "s-swiper-button-prev" },
|
|
56
|
-
h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() },
|
|
57
|
-
h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))),
|
|
58
|
-
h("div", { class: "s-swiper-button-next" },
|
|
59
|
-
h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() },
|
|
60
|
-
h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))),
|
|
61
|
-
h("div", { class: "swiper" },
|
|
62
|
-
h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el },
|
|
63
|
-
h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el },
|
|
64
|
-
h("slot", null))))));
|
|
65
|
-
}
|
|
66
|
-
static get is() { return "salla-swiper"; }
|
|
67
|
-
static get originalStyleUrls() { return {
|
|
68
|
-
"$": ["salla-swiper.scss"]
|
|
69
|
-
}; }
|
|
70
|
-
static get styleUrls() { return {
|
|
71
|
-
"$": ["salla-swiper.css"]
|
|
72
|
-
}; }
|
|
73
|
-
static get properties() { return {
|
|
74
|
-
"loop": {
|
|
75
|
-
"type": "boolean",
|
|
76
|
-
"mutable": false,
|
|
77
|
-
"complexType": {
|
|
78
|
-
"original": "boolean",
|
|
79
|
-
"resolved": "boolean",
|
|
80
|
-
"references": {}
|
|
81
|
-
},
|
|
82
|
-
"required": false,
|
|
83
|
-
"optional": false,
|
|
84
|
-
"docs": {
|
|
85
|
-
"tags": [],
|
|
86
|
-
"text": "Set to true to enable continuous loop mode. Defaults to false."
|
|
87
|
-
},
|
|
88
|
-
"attribute": "loop",
|
|
89
|
-
"reflect": false,
|
|
90
|
-
"defaultValue": "false"
|
|
91
|
-
},
|
|
92
|
-
"speed": {
|
|
93
|
-
"type": "number",
|
|
94
|
-
"mutable": false,
|
|
95
|
-
"complexType": {
|
|
96
|
-
"original": "number",
|
|
97
|
-
"resolved": "number",
|
|
98
|
-
"references": {}
|
|
99
|
-
},
|
|
100
|
-
"required": false,
|
|
101
|
-
"optional": false,
|
|
102
|
-
"docs": {
|
|
103
|
-
"tags": [],
|
|
104
|
-
"text": "Duration of transition between slides (in ms). Defaults to 300ms."
|
|
105
|
-
},
|
|
106
|
-
"attribute": "speed",
|
|
107
|
-
"reflect": false,
|
|
108
|
-
"defaultValue": "300"
|
|
109
|
-
},
|
|
110
|
-
"itemPerView": {
|
|
111
|
-
"type": "any",
|
|
112
|
-
"mutable": false,
|
|
113
|
-
"complexType": {
|
|
114
|
-
"original": "\"auto\" | number",
|
|
115
|
-
"resolved": "\"auto\" | number",
|
|
116
|
-
"references": {}
|
|
117
|
-
},
|
|
118
|
-
"required": false,
|
|
119
|
-
"optional": false,
|
|
120
|
-
"docs": {
|
|
121
|
-
"tags": [],
|
|
122
|
-
"text": "Number of slides per view (slides visible at the same time on slider's container)."
|
|
123
|
-
},
|
|
124
|
-
"attribute": "item-per-view",
|
|
125
|
-
"reflect": false,
|
|
126
|
-
"defaultValue": "\"auto\""
|
|
127
|
-
},
|
|
128
|
-
"spaceBetweenItems": {
|
|
129
|
-
"type": "number",
|
|
130
|
-
"mutable": false,
|
|
131
|
-
"complexType": {
|
|
132
|
-
"original": "number",
|
|
133
|
-
"resolved": "number",
|
|
134
|
-
"references": {}
|
|
135
|
-
},
|
|
136
|
-
"required": false,
|
|
137
|
-
"optional": false,
|
|
138
|
-
"docs": {
|
|
139
|
-
"tags": [],
|
|
140
|
-
"text": "Distance between slide items in px. Defaults to 8px"
|
|
141
|
-
},
|
|
142
|
-
"attribute": "space-between-items",
|
|
143
|
-
"reflect": false,
|
|
144
|
-
"defaultValue": "8"
|
|
145
|
-
}
|
|
146
|
-
}; }
|
|
147
|
-
static get states() { return {
|
|
148
|
-
"currentIndex": {},
|
|
149
|
-
"isLastSlideItem": {},
|
|
150
|
-
"isFirstSlideItem": {}
|
|
151
|
-
}; }
|
|
152
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
const ArrowLeftIcon = `<!-- Generated by IcoMoon.io -->
|
|
5
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
6
|
-
<title>arrow-left</title>
|
|
7
|
-
<path d="M28 14.667h-20.452l7.996-6.997c0.555-0.485 0.611-1.327 0.125-1.881-0.485-0.553-1.327-0.611-1.881-0.125l-10.667 9.333c-0.011 0.009-0.015 0.024-0.025 0.033-0.096 0.089-0.167 0.199-0.232 0.313-0.025 0.043-0.063 0.076-0.081 0.121-0.073 0.165-0.116 0.345-0.116 0.536s0.043 0.371 0.116 0.535c0.020 0.045 0.057 0.079 0.081 0.121 0.067 0.115 0.136 0.224 0.232 0.313 0.011 0.009 0.015 0.024 0.025 0.033l10.667 9.333c0.253 0.221 0.567 0.331 0.879 0.331 0.371 0 0.74-0.155 1.004-0.455 0.485-0.555 0.429-1.396-0.125-1.881l-7.997-6.997h20.452c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>
|
|
8
|
-
</svg>
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
export { ArrowLeftIcon as A };
|