@salla.sa/twilight-components 2.9.48 → 2.10.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.
Files changed (82) hide show
  1. package/dist/cjs/{index-4700898c.js → app-globals-a24e299c.js} +31 -2
  2. package/dist/cjs/index-1d2b3370.js +0 -4
  3. package/dist/cjs/loader.cjs.js +3 -2
  4. package/dist/cjs/salla-add-product-button.cjs.entry.js +7 -3
  5. package/dist/cjs/salla-button_35.cjs.entry.js +595 -1903
  6. package/dist/cjs/twilight.cjs.js +3 -2
  7. package/dist/collection/collection-manifest.json +0 -1
  8. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +9 -5
  9. package/dist/collection/components/salla-button/salla-button.js +5 -1
  10. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +3 -3
  11. package/dist/collection/components/salla-file-upload/salla-file-upload.js +9 -8
  12. package/dist/collection/components/salla-gifting/salla-gifting.js +18 -14
  13. package/dist/collection/components/salla-loyalty/salla-loyalty.js +5 -3
  14. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +6 -5
  15. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +14 -10
  16. package/dist/collection/components/salla-slider/salla-slider.css +242 -0
  17. package/dist/collection/components/salla-slider/salla-slider.js +403 -110
  18. package/dist/collection/components/salla-user-menu/salla-user-menu.js +8 -1
  19. package/dist/collection/global/app-dev.js +2 -1
  20. package/dist/collection/global/app.js +15 -0
  21. package/dist/components/index.d.ts +0 -1
  22. package/dist/components/index.js +31 -3
  23. package/dist/components/salla-add-product-button.js +7 -3
  24. package/dist/components/salla-button2.js +5 -1
  25. package/dist/components/salla-cart-summary.js +3 -3
  26. package/dist/components/salla-file-upload2.js +249 -3
  27. package/dist/components/salla-gifting.js +26 -16
  28. package/dist/components/salla-loyalty.js +3 -3
  29. package/dist/components/salla-offer-modal.js +5 -4
  30. package/dist/components/salla-rating-stars2.js +8 -4
  31. package/dist/components/salla-slider2.js +229 -1806
  32. package/dist/components/salla-user-menu.js +8 -1
  33. package/dist/esm/{index-55e33cdf.js → app-globals-1619c0de.js} +31 -2
  34. package/dist/esm/index-f1d446ac.js +0 -4
  35. package/dist/esm/loader.js +3 -2
  36. package/dist/esm/salla-add-product-button.entry.js +7 -3
  37. package/dist/esm/salla-button_35.entry.js +594 -1902
  38. package/dist/esm/twilight.js +3 -2
  39. package/dist/esm-es5/{index-55e33cdf.js → app-globals-1619c0de.js} +2 -2
  40. package/dist/esm-es5/index-f1d446ac.js +2 -2
  41. package/dist/esm-es5/loader.js +1 -1
  42. package/dist/esm-es5/salla-add-product-button.entry.js +1 -1
  43. package/dist/esm-es5/salla-button_35.entry.js +11 -5
  44. package/dist/esm-es5/twilight.js +1 -1
  45. package/dist/twilight/p-0f839b43.system.js +4 -0
  46. package/dist/twilight/p-3420f00c.entry.js +30 -0
  47. package/dist/twilight/p-5207a10c.system.js +24 -0
  48. package/dist/twilight/{p-486ce499.system.entry.js → p-5a1197bb.system.entry.js} +1 -1
  49. package/dist/twilight/p-5b30b649.system.entry.js +47 -0
  50. package/dist/twilight/p-97614f6d.js +24 -0
  51. package/dist/twilight/{p-6f41faf8.entry.js → p-dbb379ce.entry.js} +1 -1
  52. package/dist/twilight/twilight.esm.js +1 -1
  53. package/dist/twilight/twilight.js +1 -1
  54. package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +3 -3
  55. package/dist/types/components/salla-slider/salla-slider.d.ts +73 -14
  56. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +1 -0
  57. package/dist/types/components.d.ts +83 -60
  58. package/dist/types/global/app-dev.d.ts +0 -1
  59. package/package.json +6 -4
  60. package/dist/cjs/core-c7a9fb22.js +0 -4982
  61. package/dist/cjs/salla-swiper.cjs.entry.js +0 -62
  62. package/dist/collection/components/salla-swiper/salla-swiper.css +0 -177
  63. package/dist/collection/components/salla-swiper/salla-swiper.js +0 -152
  64. package/dist/components/arrow-left.js +0 -11
  65. package/dist/components/core.js +0 -4959
  66. package/dist/components/salla-swiper.d.ts +0 -11
  67. package/dist/components/salla-swiper.js +0 -92
  68. package/dist/esm/core-572aabd0.js +0 -4973
  69. package/dist/esm/salla-swiper.entry.js +0 -58
  70. package/dist/esm-es5/core-572aabd0.js +0 -4
  71. package/dist/esm-es5/salla-swiper.entry.js +0 -4
  72. package/dist/twilight/p-00e66d1a.system.js +0 -4
  73. package/dist/twilight/p-0cf11465.system.js +0 -4
  74. package/dist/twilight/p-0de275dc.system.entry.js +0 -41
  75. package/dist/twilight/p-37381192.entry.js +0 -30
  76. package/dist/twilight/p-684a004a.system.entry.js +0 -4
  77. package/dist/twilight/p-6b7896e1.system.js +0 -24
  78. package/dist/twilight/p-6ed7d3a2.js +0 -4
  79. package/dist/twilight/p-e8c3c209.entry.js +0 -4
  80. package/dist/twilight/p-f286c803.js +0 -24
  81. package/dist/types/components/salla-swiper/salla-swiper.d.ts +0 -31
  82. package/dist/types/index.d.ts +0 -7
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface SallaSwiper extends Components.SallaSwiper, HTMLElement {}
4
- export const SallaSwiper: {
5
- prototype: SallaSwiper;
6
- new (): SallaSwiper;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,92 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
5
- import { S as Swiper } from './core.js';
6
- import { A as ArrowRightIcon } from './arrow-right.js';
7
- import { A as ArrowLeftIcon } from './arrow-left.js';
8
- import { d as defineCustomElement$2 } from './salla-button2.js';
9
-
10
- const sallaSwiperCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYAB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CYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/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}";
11
-
12
- const SallaSwiper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13
- constructor() {
14
- super();
15
- this.__registerHost();
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 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 (h("div", { class: "s-swiper" }, h("div", { class: "s-swiper-button-prev" }, h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() }, h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))), h("div", { class: "s-swiper-button-next" }, h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() }, h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))), h("div", { class: "swiper" }, h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el }, h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el }, h("slot", null))))));
58
- }
59
- static get style() { return sallaSwiperCss; }
60
- }, [4, "salla-swiper", {
61
- "loop": [4],
62
- "speed": [2],
63
- "itemPerView": [8, "item-per-view"],
64
- "spaceBetweenItems": [2, "space-between-items"],
65
- "currentIndex": [32],
66
- "isLastSlideItem": [32],
67
- "isFirstSlideItem": [32]
68
- }]);
69
- function defineCustomElement$1() {
70
- if (typeof customElements === "undefined") {
71
- return;
72
- }
73
- const components = ["salla-swiper", "salla-button"];
74
- components.forEach(tagName => { switch (tagName) {
75
- case "salla-swiper":
76
- if (!customElements.get(tagName)) {
77
- customElements.define(tagName, SallaSwiper$1);
78
- }
79
- break;
80
- case "salla-button":
81
- if (!customElements.get(tagName)) {
82
- defineCustomElement$2();
83
- }
84
- break;
85
- } });
86
- }
87
- defineCustomElement$1();
88
-
89
- const SallaSwiper = SallaSwiper$1;
90
- const defineCustomElement = defineCustomElement$1;
91
-
92
- export { SallaSwiper, defineCustomElement };