@salla.sa/twilight-components 1.0.99 → 1.0.100

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 (111) hide show
  1. package/dist/cjs/{index-fdf99836.js → index-3771e52a.js} +8 -87
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/salla-add-product-button_6.cjs.entry.js +34 -25
  4. package/dist/cjs/salla-branches.cjs.entry.js +2 -2
  5. package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -4
  6. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-localization-modal.cjs.entry.js +3 -3
  9. package/dist/cjs/salla-login-modal.cjs.entry.js +4 -4
  10. package/dist/cjs/salla-offer-modal.cjs.entry.js +3 -3
  11. package/dist/cjs/salla-quantity-input.cjs.entry.js +2 -2
  12. package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -5
  13. package/dist/cjs/salla-rating-stars.cjs.entry.js +27 -36
  14. package/dist/cjs/{salla-verify-modal.cjs.entry.js → salla-verify.cjs.entry.js} +20 -14
  15. package/dist/cjs/twilight-components.cjs.js +2 -2
  16. package/dist/collection/collection-manifest.json +1 -2
  17. package/dist/collection/components/salla-branches/salla-branches.js +1 -1
  18. package/dist/collection/components/salla-button/salla-button.css +1 -85
  19. package/dist/collection/components/salla-button/salla-button.js +2 -26
  20. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +0 -6
  21. package/dist/collection/components/salla-installment/salla-installment.css +6 -2
  22. package/dist/collection/components/salla-localization-modal/salla-localization-modal.css +0 -11
  23. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  24. package/dist/collection/components/salla-login-modal/salla-login-modal.css +1 -5
  25. package/dist/collection/components/salla-login-modal/salla-login-modal.js +2 -2
  26. package/dist/collection/components/salla-modal/salla-modal.js +1 -1
  27. package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +1 -22
  28. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  29. package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +7 -3
  30. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  31. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +1 -17
  32. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +3 -3
  33. package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +4 -3
  34. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +26 -35
  35. package/dist/collection/components/salla-search/salla-search.css +1 -42
  36. package/dist/collection/components/salla-search/salla-search.js +35 -16
  37. package/dist/collection/components/salla-tel-input/salla-tel-input.css +13 -5
  38. package/dist/collection/components/{salla-verify-modal/salla-verify-modal.css → salla-verify/salla-verify.css} +1 -5
  39. package/dist/collection/components/{salla-verify-modal/salla-verify-modal.js → salla-verify/salla-verify.js} +33 -26
  40. package/dist/collection/plugins/tailwind-theme/generator.js +6 -2
  41. package/dist/collection/plugins/tailwind-theme/index.js +3 -3
  42. package/dist/components/salla-branches.js +1 -1
  43. package/dist/components/salla-button2.js +3 -10
  44. package/dist/components/salla-conditional-fields.js +0 -3
  45. package/dist/components/salla-localization-modal.js +2 -2
  46. package/dist/components/salla-login-modal.js +6 -6
  47. package/dist/components/salla-modal2.js +1 -1
  48. package/dist/components/salla-offer-modal.js +2 -2
  49. package/dist/components/salla-quantity-input.js +1 -1
  50. package/dist/components/salla-rating-modal.js +4 -4
  51. package/dist/components/salla-rating-stars2.js +26 -35
  52. package/dist/components/salla-search.js +33 -15
  53. package/dist/components/{salla-sizes-table.d.ts → salla-verify.d.ts} +4 -4
  54. package/dist/components/salla-verify.js +9 -0
  55. package/dist/components/{salla-verify-modal2.js → salla-verify2.js} +24 -18
  56. package/dist/esm/{index-4ffd4317.js → index-ee729716.js} +8 -87
  57. package/dist/esm/loader.js +2 -2
  58. package/dist/esm/salla-add-product-button_6.entry.js +34 -25
  59. package/dist/esm/salla-branches.entry.js +2 -2
  60. package/dist/esm/salla-conditional-fields.entry.js +1 -4
  61. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  62. package/dist/esm/salla-installment.entry.js +1 -1
  63. package/dist/esm/salla-localization-modal.entry.js +3 -3
  64. package/dist/esm/salla-login-modal.entry.js +4 -4
  65. package/dist/esm/salla-offer-modal.entry.js +3 -3
  66. package/dist/esm/salla-quantity-input.entry.js +2 -2
  67. package/dist/esm/salla-rating-modal.entry.js +5 -5
  68. package/dist/esm/salla-rating-stars.entry.js +27 -36
  69. package/dist/esm/{salla-verify-modal.entry.js → salla-verify.entry.js} +20 -14
  70. package/dist/esm/twilight-components.js +2 -2
  71. package/dist/twilight-components/p-00c61851.entry.js +4 -0
  72. package/dist/twilight-components/p-058ae0f8.entry.js +4 -0
  73. package/dist/twilight-components/p-27530b47.entry.js +4 -0
  74. package/dist/twilight-components/p-3f90fa16.entry.js +4 -0
  75. package/dist/twilight-components/{p-56065da6.entry.js → p-5c1d4ef9.entry.js} +1 -1
  76. package/dist/twilight-components/p-714ff288.entry.js +4 -0
  77. package/dist/twilight-components/p-77af5fef.entry.js +4 -0
  78. package/dist/twilight-components/{p-edbb12b2.entry.js → p-9a75d4ec.entry.js} +1 -1
  79. package/dist/twilight-components/p-a268e672.entry.js +4 -0
  80. package/dist/twilight-components/p-d566f357.js +4 -0
  81. package/dist/twilight-components/p-df7417e4.entry.js +4 -0
  82. package/dist/twilight-components/{p-210f5278.entry.js → p-e97c00e1.entry.js} +1 -1
  83. package/dist/twilight-components/{p-8c69a096.entry.js → p-f0f7a51b.entry.js} +1 -1
  84. package/dist/twilight-components/twilight-components.esm.js +1 -1
  85. package/dist/types/components/salla-button/salla-button.d.ts +0 -5
  86. package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +1 -0
  87. package/dist/types/components/salla-search/salla-search.d.ts +6 -1
  88. package/dist/types/components/{salla-verify-modal/salla-verify-modal.d.ts → salla-verify/salla-verify.d.ts} +3 -2
  89. package/dist/types/components.d.ts +17 -38
  90. package/example/index.html +12 -12
  91. package/example/tailwind.config.js +4 -7
  92. package/package.json +1 -1
  93. package/dist/cjs/salla-sizes-table.cjs.entry.js +0 -22
  94. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.css +0 -3
  95. package/dist/collection/components/salla-sizes-table/salla-sizes-table.css +0 -6
  96. package/dist/collection/components/salla-sizes-table/salla-sizes-table.js +0 -18
  97. package/dist/components/salla-sizes-table.js +0 -37
  98. package/dist/components/salla-verify-modal.d.ts +0 -11
  99. package/dist/components/salla-verify-modal.js +0 -9
  100. package/dist/esm/salla-sizes-table.entry.js +0 -18
  101. package/dist/twilight-components/p-1d0e664c.js +0 -4
  102. package/dist/twilight-components/p-2384537d.entry.js +0 -4
  103. package/dist/twilight-components/p-2b1c3490.entry.js +0 -4
  104. package/dist/twilight-components/p-7fae6b84.entry.js +0 -4
  105. package/dist/twilight-components/p-9e05640e.entry.js +0 -4
  106. package/dist/twilight-components/p-af450175.entry.js +0 -4
  107. package/dist/twilight-components/p-d762e16f.entry.js +0 -4
  108. package/dist/twilight-components/p-d77dd260.entry.js +0 -4
  109. package/dist/twilight-components/p-e435a209.entry.js +0 -4
  110. package/dist/twilight-components/p-ecaee6a4.entry.js +0 -4
  111. package/dist/types/components/salla-sizes-table/salla-sizes-table.d.ts +0 -3
@@ -5,10 +5,10 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-fdf99836.js');
8
+ const index = require('./index-3771e52a.js');
9
9
  const Helper = require('./Helper-8ae6a805.js');
10
10
 
11
- const sallaOfferModalCss = "#salla-offer-modal .s-offer-modal-body{-webkit-overflow-scrolling:touch}#salla-offer-modal .s-offer-modal-body::-webkit-scrollbar{display:none}#salla-offer-modal .s-offer-modal-next-btn{background:linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}#salla-offer-modal .s-offer-modal-prev-btn{background:linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}.rtl #salla-offer-modal .s-offer-modal-next-btn{transform:scale(-1) translateX(100%)}.rtl #salla-offer-modal .s-offer-modal-prev-btn{transform:scale(-1) translateX(-100%)}.rtl #salla-offer-modal .s-offer-modal-btn-is-active{transform:scale(-1) translateX(0)}";
11
+ const sallaOfferModalCss = "";
12
12
 
13
13
  const SallaOfferModal = class {
14
14
  constructor(hostRef) {
@@ -95,7 +95,7 @@ const SallaOfferModal = class {
95
95
  componentDidRender() {
96
96
  // Sooo mini Slider
97
97
  if (this.offer && window.screen.width > 639) {
98
- let sliderWrap = document.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = document.querySelector('.s-offer-modal-scrolled-slider'), navButtons = document.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = document.querySelector('.s-offer-modal-next-btn'), prevBtn = document.querySelector('.s-offer-modal-prev-btn'), items = document.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
98
+ let sliderWrap = this.modal.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = this.modal.querySelector('.s-offer-modal-scrolled-slider'), navButtons = this.modal.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = this.modal.querySelector('.s-offer-modal-next-btn'), prevBtn = this.modal.querySelector('.s-offer-modal-prev-btn'), items = this.modal.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
99
99
  current = 0, // current slide
100
100
  slidesToScroll = 3, itemsLength = items.length;
101
101
  console.log('items[0]:', items[0]);
@@ -5,10 +5,10 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-fdf99836.js');
8
+ const index = require('./index-3771e52a.js');
9
9
  const Helper = require('./Helper-8ae6a805.js');
10
10
 
11
- const sallaQuantityInputCss = ":host{display:block}";
11
+ const sallaQuantityInputCss = "";
12
12
 
13
13
  const SallaQuantityInput = class {
14
14
  constructor(hostRef) {
@@ -5,10 +5,10 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-fdf99836.js');
8
+ const index = require('./index-3771e52a.js');
9
9
  const Helper = require('./Helper-8ae6a805.js');
10
10
 
11
- const sallaRatingModalCss = "#s-rating .s-rating-modal-product-img{font-size:0;position:relative}#s-rating .s-rating-modal-product-img:before{content:\"\";position:absolute;width:100%;height:100%;left:0;top:0;background:#eee}#s-rating .unicode{unicode-bidi:plaintext}";
11
+ const sallaRatingModalCss = "";
12
12
 
13
13
  const SallaRatingModal = class {
14
14
  constructor(hostRef) {
@@ -62,8 +62,8 @@ const SallaRatingModal = class {
62
62
  }
63
63
  // handle wizard
64
64
  handleWizard() {
65
- this.steps = document.querySelectorAll(".s-rating-modal-step");
66
- this.dots = document.querySelectorAll(".s-rating-modal-step-dot");
65
+ this.steps = this.modal.querySelectorAll(".s-rating-modal-step");
66
+ this.dots = this.modal.querySelectorAll(".s-rating-modal-step-dot");
67
67
  this.showActiveStep();
68
68
  }
69
69
  showActiveStep(current = null) {
@@ -151,7 +151,7 @@ const SallaRatingModal = class {
151
151
  this.thanksTime.remove();
152
152
  this.close().then(() => window.location.reload());
153
153
  }, 1000);
154
- document.querySelector('.s-rating-modal-footer').classList.add('s-rating-modal-unvisiable');
154
+ this.modal.querySelector('.s-rating-modal-footer').classList.add('s-rating-modal-unvisiable');
155
155
  this.showActiveStep(this.thanksTab);
156
156
  }
157
157
  render() {
@@ -5,10 +5,10 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-fdf99836.js');
8
+ const index = require('./index-3771e52a.js');
9
9
  const Helper = require('./Helper-8ae6a805.js');
10
10
 
11
- const sallaRatingStarsCss = ":host{display:block}";
11
+ const sallaRatingStarsCss = "";
12
12
 
13
13
  const SallaRatingStars = class {
14
14
  constructor(hostRef) {
@@ -17,45 +17,36 @@ const SallaRatingStars = class {
17
17
  this.size = 'medium';
18
18
  }
19
19
  initiateRating() {
20
- document.querySelectorAll('.s-rating-stars-element').forEach((elem) => {
21
- elem.addEventListener('submit', function (event) {
22
- event.preventDefault();
23
- // Get the selected star - activeElement is not supported in safari
24
- let activeStars = event.target.querySelectorAll('.s-rating-stars-btn-star.s-rating-stars-hovered');
25
- let selected = activeStars[activeStars.length - 1];
26
- if (!selected)
27
- return;
28
- let selectedIndex = selected.getAttribute('data-star');
29
- event.target.querySelector('.rating_hidden_input').value = selectedIndex;
30
- // Get all stars in this form (only search in the form, not the whole document)
31
- // Loop through each star, and add or remove the `.selected` class to toggle highlighting
32
- event.target
33
- .querySelectorAll('.s-rating-stars-btn-star')
34
- .forEach((star, index) => Helper.Helper.toggleElementClassIf(star, 's-rating-stars-selected', 's-rating-stars-unselected', () => index < parseInt(selectedIndex)));
35
- // Remove aria-pressed from any previously selected star
36
- event.target.querySelectorAll('.s-rating-stars-btn-star[aria-pressed="true"]').forEach(star => star.removeAttribute('aria-pressed'));
37
- // Add aria-pressed role to the selected button
38
- selected.setAttribute('aria-pressed', '');
39
- });
20
+ this.host.addEventListener('click', () => {
21
+ if (!this.startsElem)
22
+ return;
23
+ // Get the selected star - activeElement is not supported in safari
24
+ let activeStars = this.startsElem.querySelectorAll('.s-rating-stars-hovered');
25
+ let selected = activeStars[activeStars.length - 1];
26
+ if (!selected)
27
+ return;
28
+ let selectedIndex = selected.getAttribute('data-star');
29
+ this.startsElem.querySelector('.rating_hidden_input').value = selectedIndex;
30
+ // Loop through each star, and add or remove the `.selected` class to toggle highlighting
31
+ this.startsElem.querySelectorAll('.s-rating-stars-btn-star')
32
+ .forEach((star, index) => Helper.Helper.toggleElementClassIf(star, 's-rating-stars-selected', 's-rating-stars-unselected', () => index < parseInt(selectedIndex)));
33
+ // update aria-pressed attr status
34
+ this.startsElem.querySelectorAll('[aria-pressed]').forEach(star => star.removeAttribute('aria-pressed'));
35
+ selected.setAttribute('aria-pressed', 'true');
40
36
  });
41
37
  }
42
38
  highlightSelectedStars() {
43
- let hover = ['s-rating-stars-hovered'], element = this.host.querySelector('.s-rating-stars-element'), starElements = element === null || element === void 0 ? void 0 : element.querySelectorAll('.s-rating-stars-btn-star');
44
- element === null || element === void 0 ? void 0 : element.addEventListener('mouseout', () => starElements.forEach(star => star.classList.remove(...hover)));
45
- starElements === null || starElements === void 0 ? void 0 : starElements.forEach((starElement, index) => {
46
- starElement.addEventListener('mouseover', () => {
47
- starElement.classList.add(...hover);
48
- if (index <= 1) {
49
- starElement.previousElementSibling.tagName === 'BUTTON' ? starElement.previousElementSibling.classList.add(...hover) : null;
50
- }
51
- else {
52
- for (let i = 0; i < index; i++) {
53
- starElements[i].classList.add(...hover);
54
- }
39
+ var _a, _b;
40
+ let hoveredClass = 's-rating-stars-hovered', stars = (_a = this.startsElem) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.s-rating-stars-btn-star');
41
+ stars === null || stars === void 0 ? void 0 : stars.forEach((star, index) => {
42
+ star.addEventListener('mouseover', () => {
43
+ for (let i = 0; i <= index; i++) {
44
+ stars[i].classList.add(hoveredClass);
55
45
  }
56
46
  });
57
- starElement.addEventListener('mouseout', () => starElement.classList.remove(...hover));
47
+ star.addEventListener('mouseout', () => star.classList.remove(hoveredClass));
58
48
  });
49
+ (_b = this.startsElem) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseout', () => stars.forEach(star => star.classList.remove(hoveredClass)));
59
50
  }
60
51
  createStars(n) {
61
52
  let stars = [];
@@ -72,7 +63,7 @@ const SallaRatingStars = class {
72
63
  return (index.h(index.Host, null, this.value ?
73
64
  index.h("div", { class: "s-rating-stars-wrapper" }, " ", this.createStars(this.value), " ")
74
65
  :
75
- index.h("form", { class: "s-rating-stars-element" }, index.h("input", { type: "hidden", class: "rating_hidden_input", name: this.name, value: "" }), [1, 2, 3, 4, 5].map(star => index.h("button", { type: "submit", class: `s-rating-stars-btn-star s-rating-stars-` + this.size, "data-star": star }, index.h("i", { class: "sicon-star2" }))))));
66
+ index.h("div", { class: "s-rating-stars-element", ref: (el) => this.startsElem = el }, index.h("input", { type: "hidden", class: "rating_hidden_input", name: this.name, value: "" }), [1, 2, 3, 4, 5].map(star => index.h("button", { class: `s-rating-stars-btn-star s-rating-stars-` + this.size, "data-star": star }, index.h("i", { class: "sicon-star2" }))))));
76
67
  }
77
68
  componentDidLoad() {
78
69
  this.initiateRating();
@@ -5,16 +5,20 @@
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
- const index = require('./index-fdf99836.js');
8
+ const index = require('./index-3771e52a.js');
9
9
  const Helper = require('./Helper-8ae6a805.js');
10
10
 
11
- const sallaVerifyModalCss = "salla-verify-modal{display:block}[dir=ltr] #s-verify-modal .s-verify-modal-back{transform:scale(-1)}";
11
+ const sallaVerifyCss = "salla-verify{display:block}";
12
12
 
13
- const SallaVerifyModal = class {
13
+ const SallaVerify = class {
14
14
  constructor(hostRef) {
15
15
  index.registerInstance(this, hostRef);
16
16
  this.verified = index.createEvent(this, "verified", 7);
17
17
  this.initiated = false;
18
+ /**
19
+ * Should render component without modal
20
+ */
21
+ this.display = 'modal';
18
22
  /**
19
23
  * Verifying method
20
24
  */
@@ -35,7 +39,7 @@ const SallaVerifyModal = class {
35
39
  (_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.title);
36
40
  (_b = this.btn) === null || _b === void 0 ? void 0 : _b.setText(salla.lang.get('pages.profile.verify'));
37
41
  });
38
- if (this.withoutModal) {
42
+ if (this.display == 'inline') {
39
43
  this.modal = { open: () => '', close: () => '', setTitle: () => '' };
40
44
  return;
41
45
  }
@@ -68,10 +72,10 @@ const SallaVerifyModal = class {
68
72
  this.data.type = this.data.type || this.type;
69
73
  this.type = this.data.type;
70
74
  this.resendTimer();
71
- this.otpInputs = document.querySelectorAll('.s-verify-modal-input');
75
+ this.otpInputs = this.body.querySelectorAll('.s-verify-input');
72
76
  if (!this.initiated) {
73
- Helper.Helper.on('input', '.s-verify-modal-input', e => salla.helpers.inputDigitsOnly(e.target));
74
- Helper.Helper.onKeyUp('.s-verify-modal-input', event => {
77
+ Helper.Helper.on('input', '.s-verify-input', e => salla.helpers.inputDigitsOnly(e.target));
78
+ Helper.Helper.onKeyUp('.s-verify-input', event => {
75
79
  var _a, _b, _c, _d;
76
80
  let key = event.keyCode || event.charCode;
77
81
  if (event.target.value) {
@@ -84,7 +88,7 @@ const SallaVerifyModal = class {
84
88
  }
85
89
  this.toggleOTPSubmit();
86
90
  });
87
- Helper.Helper.on('paste', '.s-verify-modal-input', event => {
91
+ Helper.Helper.on('paste', '.s-verify-input', event => {
88
92
  let text = salla.helpers.number(event.clipboardData.getData('text')).replace(/[^0-9.]/g, '').replace('..', '.');
89
93
  this.otpInputs.forEach((input, i) => input.value = text[i] || '');
90
94
  this.toggleOTPSubmit();
@@ -94,8 +98,10 @@ const SallaVerifyModal = class {
94
98
  this.initiated = true;
95
99
  }
96
100
  this.reset();
97
- !this.withoutModal && ((_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.title));
101
+ this.display == 'modal' && ((_a = this.modal) === null || _a === void 0 ? void 0 : _a.setTitle(this.title));
98
102
  this.modal.open();
103
+ // focus the first input after opening the modal
104
+ setTimeout(() => this.otpInputs[0].focus(), 100);
99
105
  }
100
106
  toggleOTPSubmit() {
101
107
  let otp = [];
@@ -149,14 +155,14 @@ const SallaVerifyModal = class {
149
155
  .catch(() => this.btn.stop() && this.btn.enable() && this.reset());
150
156
  }
151
157
  render() {
152
- return this.withoutModal ? index.h(index.Host, null, this.myBody()) :
153
- index.h("salla-modal", { icon: "sicon-android-phone", width: "xs", id: "s-verify-modal", ref: modal => this.modal = modal, "modal-title": this.title }, this.myBody());
158
+ return this.display == 'inline' ? index.h(index.Host, null, this.myBody()) :
159
+ index.h("salla-modal", { icon: "sicon-android-phone", width: "xs", class: "s-verify", ref: modal => this.modal = modal, "modal-title": this.title }, this.myBody());
154
160
  }
155
161
  myBody() {
156
- return (index.h("div", { id: "s-verify-modal" }, index.h("div", { class: "s-verify-modal-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), index.h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), index.h("div", { class: "s-verify-modal-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => index.h("input", { type: "text", maxlength: "1", class: "s-verify-modal-input", required: true }))), index.h("div", { slot: "footer", class: "s-verify-modal-footer" }, index.h("salla-button", { class: "s-verify-modal-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), index.h("p", { class: "s-verify-modal-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), index.h("b", { class: "s-verify-modal-timer", ref: el => this.timer = el })), index.h("a", { href: "#", class: "s-verify-modal-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), index.h("slot", { name: "after-footer" })));
162
+ return (index.h("div", { class: "s-verify-body", ref: body => this.body = body }, index.h("div", { class: "s-verify-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), index.h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), index.h("div", { class: "s-verify-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => index.h("input", { type: "text", maxlength: "1", class: "s-verify-input", required: true }))), index.h("div", { slot: "footer", class: "s-verify-footer" }, index.h("salla-button", { class: "s-verify-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), index.h("p", { class: "s-verify-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), index.h("b", { class: "s-verify-timer", ref: el => this.timer = el })), index.h("a", { href: "#", class: "s-verify-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), index.h("slot", { name: "after-footer" })));
157
163
  }
158
164
  get host() { return index.getElement(this); }
159
165
  };
160
- SallaVerifyModal.style = sallaVerifyModalCss;
166
+ SallaVerify.style = sallaVerifyCss;
161
167
 
162
- exports.salla_verify_modal = SallaVerifyModal;
168
+ exports.salla_verify = SallaVerify;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const index = require('./index-fdf99836.js');
6
+ const index = require('./index-3771e52a.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Browser v2.15.0 | MIT Licensed | https://stenciljs.com
@@ -18,5 +18,5 @@ const patchBrowser = () => {
18
18
  };
19
19
 
20
20
  patchBrowser().then(options => {
21
- return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]}],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-sizes-table.cjs",[[1,"salla-sizes-table"]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
21
+ return index.bootstrapLazy([["salla-add-product-button_6.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"disabled":[516]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"open":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-verify.cjs",[[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]]], options);
22
22
  });
@@ -15,9 +15,8 @@
15
15
  "./components/salla-rating-modal/salla-rating-modal.js",
16
16
  "./components/salla-rating-stars/salla-rating-stars.js",
17
17
  "./components/salla-search/salla-search.js",
18
- "./components/salla-sizes-table/salla-sizes-table.js",
19
18
  "./components/salla-tel-input/salla-tel-input.js",
20
- "./components/salla-verify-modal/salla-verify-modal.js"
19
+ "./components/salla-verify/salla-verify.js"
21
20
  ],
22
21
  "compiler": {
23
22
  "name": "@stencil/core",
@@ -82,7 +82,7 @@ export class SallaBranches {
82
82
  branch.open ? '' : '- مُغلق')))),
83
83
  this.isChoiceable() ?
84
84
  h("slot", { name: "footer" },
85
- h("salla-button", { ref: btn => this.btn = btn, onClick: () => this.handleSubmit(), class: "s-branches-submit", wide: true }, salla.lang.get('common.elements.ok')))
85
+ h("salla-button", { ref: btn => this.btn = btn, onClick: () => this.handleSubmit(), class: "s-branches-submit", width: "wide" }, salla.lang.get('common.elements.ok')))
86
86
  : ''));
87
87
  }
88
88
  componentDidRender() {
@@ -4,88 +4,4 @@
4
4
  /*
5
5
  * Salla Button Component: has many sizes, styles and loading state.
6
6
  * You can use these classes to target the elements in the component.
7
- */
8
- salla-button {
9
- pointer-events: none;
10
- }
11
- salla-button[type=submit], salla-button[type=button], salla-button[type=reset] {
12
- -webkit-appearance: none;
13
- }
14
- salla-button[width=wide] {
15
- width: 100%;
16
- }
17
-
18
- .s-button-wrap[loading] {
19
- pointer-events: none;
20
- }
21
- .s-button-wrap[loading] .s-button-element {
22
- pointer-events: none !important;
23
- }
24
- .s-button-wrap[loading] .s-button-loader-center .s-button-text {
25
- opacity: 0;
26
- }
27
- .s-button-wrap .s-button-element[loading] {
28
- pointer-events: none !important;
29
- }
30
- .s-button-wrap .s-button-element:not(:disabled) {
31
- pointer-events: auto;
32
- }
33
- .s-button-wrap .s-button-solid .s-button-loader:before {
34
- border-color: #fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2);
35
- }
36
- .s-button-wrap .s-button-outline {
37
- border: 1px solid currentColor;
38
- }
39
- .s-button-wrap .s-button-outline:hover {
40
- border-color: transparent;
41
- }
42
- .s-button-wrap .s-button-outline .s-button-loader:before {
43
- border-top-color: currentColor;
44
- border-left-color: currentColor;
45
- }
46
- .s-button-wrap .s-button-icon.s-button-large {
47
- width: 56px;
48
- height: 56px;
49
- }
50
- .s-button-wrap .s-button-icon.s-button-small {
51
- width: 24px;
52
- height: 24px;
53
- }
54
- .s-button-wrap .s-button-icon.s-button-small .s-button-loader:before {
55
- width: 0.85rem;
56
- height: 0.85rem;
57
- }
58
- .s-button-wrap .s-button-loader-after .s-button-load {
59
- flex-direction: row;
60
- }
61
- .s-button-wrap .s-button-loader-start.s-button-element {
62
- padding-left: 32px;
63
- padding-right: 32px;
64
- }
65
- .s-button-wrap .s-button-loader-start .s-button-loader {
66
- position: absolute;
67
- right: 8px;
68
- }
69
- .s-button-wrap .s-button-loader-start .s-button-loader [dir=ltr] {
70
- left: 8px;
71
- right: auto;
72
- }
73
- .s-button-wrap .s-button-loader-end.s-button-element {
74
- padding-left: 32px;
75
- padding-right: 32px;
76
- }
77
- .s-button-wrap .s-button-loader-end .s-button-loader {
78
- position: absolute;
79
- left: 8px;
80
- }
81
- .s-button-wrap .s-button-loader-end .s-button-loader [dir=ltr] {
82
- right: 8px;
83
- left: auto;
84
- }
85
- .s-button-wrap .s-button-loader-center .s-button-loader {
86
- position: absolute;
87
- top: 50%;
88
- left: 50%;
89
- transform: translateY(-50%) translateX(-50%);
90
- margin: 0 !important;
91
- }
7
+ */
@@ -37,13 +37,6 @@ export class SallaButton {
37
37
  * If there is need to change loader position, pass the position
38
38
  */
39
39
  this.loaderPosition = 'after';
40
- /**
41
- * Is the button wide
42
- */
43
- this.wide = false;
44
- if (this.wide) {
45
- this.host.classList.add('s-button-wide');
46
- }
47
40
  }
48
41
  /**
49
42
  * Run loading animation
@@ -59,6 +52,7 @@ export class SallaButton {
59
52
  */
60
53
  async stop() {
61
54
  this.host.removeAttribute('loading');
55
+ this.host.querySelector('button').removeAttribute('loading');
62
56
  if (this.loaderPosition == 'center')
63
57
  this.text.classList.remove('s-button-hide');
64
58
  return this.host;
@@ -87,7 +81,7 @@ export class SallaButton {
87
81
  }
88
82
  getBtnAttributes() {
89
83
  for (let i = 0; i < this.host.attributes.length; i++) {
90
- if (!['color', 'fill', 'size', 'width', 'id', 'loading'].includes(this.host.attributes[i].name)) {
84
+ if (!['color', 'fill', 'size', 'width', 'id'].includes(this.host.attributes[i].name)) {
91
85
  this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
92
86
  }
93
87
  }
@@ -265,24 +259,6 @@ export class SallaButton {
265
259
  "reflect": false,
266
260
  "defaultValue": "'after'"
267
261
  },
268
- "wide": {
269
- "type": "boolean",
270
- "mutable": false,
271
- "complexType": {
272
- "original": "boolean",
273
- "resolved": "boolean",
274
- "references": {}
275
- },
276
- "required": false,
277
- "optional": false,
278
- "docs": {
279
- "tags": [],
280
- "text": "Is the button wide"
281
- },
282
- "attribute": "wide",
283
- "reflect": false,
284
- "defaultValue": "false"
285
- },
286
262
  "href": {
287
263
  "type": "string",
288
264
  "mutable": false,
@@ -79,12 +79,6 @@ export class SallaConditionalFields {
79
79
  h("slot", null)));
80
80
  }
81
81
  static get is() { return "salla-conditional-fields"; }
82
- static get originalStyleUrls() { return {
83
- "$": ["salla-conditional-fields.css"]
84
- }; }
85
- static get styleUrls() { return {
86
- "$": ["salla-conditional-fields.css"]
87
- }; }
88
82
  static get elementRef() { return "host"; }
89
83
  static get listeners() { return [{
90
84
  "name": "change",
@@ -1,8 +1,12 @@
1
1
  /*
2
2
  * Global flags style [imported from Int-tel-input]
3
3
  */
4
+ /*
5
+ The whole installment methods is a third-party widgets,
6
+ So there aren't a custom classes (as other components) to style them.
7
+ */
4
8
  /*
5
- * Tabby ------------------------
9
+ * Installment::Tabby
6
10
  */
7
11
  #tabbyPromoWrapper {
8
12
  background: white;
@@ -52,7 +56,7 @@
52
56
  }
53
57
 
54
58
  /*
55
- * Tamara ---------------------
59
+ * Installment::Tamara & Spotii
56
60
  */
57
61
  .tamara-product-widget {
58
62
  margin-bottom: 20px;
@@ -5,17 +5,6 @@
5
5
  * Salla Localization Component: Languages & Currencies popup modal
6
6
  * You can use these classes to target the elements in the component.
7
7
  */
8
- #salla-localization .s-localization-modal-label-slot {
9
- flex-grow: 1;
10
- }
11
- #salla-localization .s-localization-modal-select {
12
- appearance: none;
13
- -webkit-appearance: none;
14
- }
15
-
16
- /*
17
- * global flags style, imported from int-tel-input
18
- */
19
8
  .iti__flag {
20
9
  width: 20px;
21
10
  }
@@ -112,7 +112,7 @@ export class SallaLocalizationModal {
112
112
  .replace(/\{country_code\}/g, currency.country_code) }))) :
113
113
  h("select", { class: "s-localization-modal-select", name: "currency", onChange: e => this.onChangeCurrency(e) }, this.currencies.map(currency => h("option", { value: currency.code, selected: this.currency == currency.code }, currency.name)))))
114
114
  : '',
115
- h("salla-button", { wide: true, ref: btn => this.btn = btn, onClick: () => this.submit() }, salla.lang.get('common.elements.ok')))
115
+ h("salla-button", { width: "wide", ref: btn => this.btn = btn, onClick: () => this.submit() }, salla.lang.get('common.elements.ok')))
116
116
  : ''));
117
117
  }
118
118
  /**
@@ -4,8 +4,4 @@
4
4
  /*
5
5
  * Salla Login Component: login popup modal
6
6
  * You can use these classes to target the elements in the component.
7
- */
8
- [dir=ltr] #salla-login .s-login-modal-main-btn .arrow {
9
- display: inline-block;
10
- transform: scale(-1);
11
- }
7
+ */
@@ -147,7 +147,7 @@ export class SallaLoginModal {
147
147
  setTimeout(() => tabs.map(el => Helper.toggleElementClassIf(el, 's-login-modal-active', 's-login-modal-unactive', () => el == tab)), 200);
148
148
  //we should have only one salla-login, so it's okay to get it from document
149
149
  //todo:: use better way for resize the modal
150
- setTimeout(() => { var _a; return (_a = document.querySelector('.s-login-modal-wrapper')) === null || _a === void 0 ? void 0 : _a.setAttribute('style', 'height:' + (tab === null || tab === void 0 ? void 0 : tab.scrollHeight) + 'px'); });
150
+ setTimeout(() => { var _a; return (_a = this.modal.querySelector('.s-login-modal-wrapper')) === null || _a === void 0 ? void 0 : _a.setAttribute('style', 'height:' + (tab === null || tab === void 0 ? void 0 : tab.scrollHeight) + 'px'); });
151
151
  if ([this.mobileTab, this.emailTab].includes(tab)) {
152
152
  this.regType = tab === this.mobileTab ? 'phone' : 'email';
153
153
  }
@@ -219,7 +219,7 @@ export class SallaLoginModal {
219
219
  h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText)
220
220
  : '',
221
221
  h("slot", { name: "after-login-email" })) : '',
222
- h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false },
222
+ h("salla-verify", { display: "inline", ref: tab => this.verifyTab = tab, autoReload: false },
223
223
  h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })),
224
224
  h("div", { ref: tab => this.registrationTab = tab },
225
225
  h("slot", { name: "before-registration" }),
@@ -124,7 +124,7 @@ export class SallaModal {
124
124
  //todo:: pref for each modal
125
125
  render() {
126
126
  this.host.id = this.host.id || 'salla-modal';
127
- return (h(Host, { class: 'salla-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" },
127
+ return (h(Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" },
128
128
  h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }),
129
129
  h("div", { class: "s-modal-wrapper" },
130
130
  h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"),
@@ -4,25 +4,4 @@
4
4
  /*
5
5
  * Salla Offer Modal Component: popup modal to display the offers
6
6
  * You can use these classes to target the elements in the component.
7
- */
8
- #salla-offer-modal .s-offer-modal-body {
9
- -webkit-overflow-scrolling: touch;
10
- }
11
- #salla-offer-modal .s-offer-modal-body::-webkit-scrollbar {
12
- display: none;
13
- }
14
- #salla-offer-modal .s-offer-modal-next-btn {
15
- background: linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
16
- }
17
- #salla-offer-modal .s-offer-modal-prev-btn {
18
- background: linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
19
- }
20
- .rtl #salla-offer-modal .s-offer-modal-next-btn {
21
- transform: scale(-1) translateX(100%);
22
- }
23
- .rtl #salla-offer-modal .s-offer-modal-prev-btn {
24
- transform: scale(-1) translateX(-100%);
25
- }
26
- .rtl #salla-offer-modal .s-offer-modal-btn-is-active {
27
- transform: scale(-1) translateX(0);
28
- }
7
+ */
@@ -108,7 +108,7 @@ export class SallaOfferModal {
108
108
  componentDidRender() {
109
109
  // Sooo mini Slider
110
110
  if (this.offer && window.screen.width > 639) {
111
- let sliderWrap = document.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = document.querySelector('.s-offer-modal-scrolled-slider'), navButtons = document.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = document.querySelector('.s-offer-modal-next-btn'), prevBtn = document.querySelector('.s-offer-modal-prev-btn'), items = document.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
111
+ let sliderWrap = this.modal.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = this.modal.querySelector('.s-offer-modal-scrolled-slider'), navButtons = this.modal.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = this.modal.querySelector('.s-offer-modal-next-btn'), prevBtn = this.modal.querySelector('.s-offer-modal-prev-btn'), items = this.modal.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
112
112
  current = 0, // current slide
113
113
  slidesToScroll = 3, itemsLength = items.length;
114
114
  console.log('items[0]:', items[0]);
@@ -1,3 +1,7 @@
1
- :host {
2
- display: block;
3
- }
1
+ /*
2
+ * Global flags style [imported from Int-tel-input]
3
+ */
4
+ /*
5
+ * Salla Qunatity Input Component: quantity input with increase & decrease buttons.
6
+ * You can use these classes to target the elements in the component.
7
+ */
@@ -78,7 +78,7 @@ export class SallaQuantityInput {
78
78
  }
79
79
  static get is() { return "salla-quantity-input"; }
80
80
  static get originalStyleUrls() { return {
81
- "$": ["salla-quantity-input.css"]
81
+ "$": ["salla-quantity-input.scss"]
82
82
  }; }
83
83
  static get styleUrls() { return {
84
84
  "$": ["salla-quantity-input.css"]