@salla.sa/twilight-components 1.6.2 → 1.6.4

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 (152) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/salla-button_27.cjs.entry.js +27879 -0
  3. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +26 -0
  4. package/dist/cjs/salla-scopes.cjs.entry.js +9 -6
  5. package/dist/cjs/salla-select.cjs.entry.js +159 -0
  6. package/dist/cjs/twilight-components.cjs.js +1 -1
  7. package/dist/collection/assets/svg/caret-down.svg +0 -1
  8. package/dist/collection/assets/svg/images.svg +0 -1
  9. package/dist/collection/collection-manifest.json +5 -0
  10. package/dist/collection/components/salla-datetime-picker/interfaces.js +4 -0
  11. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.css +13 -0
  12. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1374 -0
  13. package/dist/collection/components/salla-file-upload/interfaces.js +42 -0
  14. package/dist/collection/components/salla-file-upload/salla-file-upload.css +219 -0
  15. package/dist/collection/components/salla-file-upload/salla-file-upload.js +1435 -0
  16. package/dist/collection/components/salla-gifting/gift-schema.js +4 -0
  17. package/dist/collection/components/salla-gifting/intefaces.js +4 -0
  18. package/dist/collection/components/salla-gifting/salla-gifting.css +20 -0
  19. package/dist/collection/components/salla-gifting/salla-gifting.js +564 -0
  20. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +23 -13
  21. package/dist/collection/components/salla-login-modal/salla-login-modal.js +46 -28
  22. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.css +3 -0
  23. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +69 -0
  24. package/dist/collection/components/salla-loyalty/salla-loyalty.css +0 -4
  25. package/dist/collection/components/salla-loyalty/salla-loyalty.js +29 -16
  26. package/dist/collection/components/salla-modal/salla-modal.css +6 -1
  27. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +37 -13
  28. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +23 -8
  29. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +87 -64
  30. package/dist/collection/components/salla-scopes/salla-scopes.js +11 -7
  31. package/dist/collection/components/salla-search/salla-search.js +1 -1
  32. package/dist/collection/components/salla-select/salla-select.css +86 -0
  33. package/dist/collection/components/salla-select/salla-select.js +610 -0
  34. package/dist/collection/components/salla-tel-input/interfaces.js +4 -0
  35. package/dist/collection/components/salla-tel-input/salla-tel-input.css +1 -2
  36. package/dist/collection/components/salla-tel-input/salla-tel-input.js +32 -3
  37. package/dist/collection/components/salla-verify/salla-verify.js +1 -1
  38. package/dist/collection/global/app.js +15 -12
  39. package/dist/components/_commonjsHelpers.js +24 -0
  40. package/dist/{esm/salla-social-share.entry.js → components/anime.es.js} +1 -132
  41. package/dist/components/index.d.ts +5 -0
  42. package/dist/components/index.js +5 -0
  43. package/dist/components/salla-datetime-picker.d.ts +11 -0
  44. package/dist/components/salla-datetime-picker.js +9 -0
  45. package/dist/components/salla-datetime-picker2.js +2876 -0
  46. package/dist/components/salla-file-upload.d.ts +11 -0
  47. package/dist/components/salla-file-upload.js +9 -0
  48. package/dist/components/salla-file-upload2.js +14623 -0
  49. package/dist/components/salla-gifting.d.ts +11 -0
  50. package/dist/components/salla-gifting.js +499 -0
  51. package/dist/components/salla-localization-modal.js +31 -16
  52. package/dist/components/salla-login-modal.js +35 -19
  53. package/dist/components/salla-loyalty-prize-item.d.ts +11 -0
  54. package/dist/components/salla-loyalty-prize-item.js +42 -0
  55. package/dist/components/salla-loyalty.js +28 -17
  56. package/dist/components/salla-modal2.js +1 -1
  57. package/dist/components/salla-offer-modal.js +42 -12
  58. package/dist/components/salla-product-size-guide.js +21 -6
  59. package/dist/components/salla-rating-modal.js +47 -19
  60. package/dist/components/salla-scopes.js +10 -6
  61. package/dist/components/salla-search.js +1 -1
  62. package/dist/components/salla-select.d.ts +11 -0
  63. package/dist/components/salla-select.js +199 -0
  64. package/dist/components/salla-social-share.js +1 -1308
  65. package/dist/components/salla-swiper2.js +9 -9
  66. package/dist/components/salla-tel-input2.js +15 -18
  67. package/dist/components/salla-verify2.js +1 -1
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/salla-button_27.entry.js +27849 -0
  70. package/dist/esm/salla-loyalty-prize-item.entry.js +22 -0
  71. package/dist/esm/salla-scopes.entry.js +9 -6
  72. package/dist/esm/salla-select.entry.js +155 -0
  73. package/dist/esm/twilight-components.js +1 -1
  74. package/dist/twilight-components/p-49125b6a.entry.js +4 -0
  75. package/dist/twilight-components/p-9a25753c.entry.js +4 -0
  76. package/dist/twilight-components/p-b7b9439d.entry.js +22 -0
  77. package/dist/twilight-components/p-df1eb1e5.entry.js +4 -0
  78. package/dist/twilight-components/twilight-components.esm.js +1 -1
  79. package/dist/types/components/salla-datetime-picker/interfaces.d.ts +8 -0
  80. package/dist/types/components/salla-datetime-picker/salla-datetime-picker.d.ts +250 -0
  81. package/dist/types/components/salla-file-upload/interfaces.d.ts +766 -0
  82. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +267 -0
  83. package/dist/types/components/salla-gifting/gift-schema.d.ts +20 -0
  84. package/dist/types/components/salla-gifting/intefaces.d.ts +18 -0
  85. package/dist/types/components/salla-gifting/salla-gifting.d.ts +98 -0
  86. package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +3 -2
  87. package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +13 -3
  88. package/dist/types/components/salla-loyalty/salla-loyalty-prize-item.d.ts +8 -0
  89. package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +2 -0
  90. package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -1
  91. package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +4 -0
  92. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -2
  93. package/dist/types/components/salla-scopes/salla-scopes.d.ts +1 -0
  94. package/dist/types/components/salla-select/salla-select.d.ts +110 -0
  95. package/dist/types/components/salla-tel-input/interfaces.d.ts +4 -0
  96. package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -0
  97. package/dist/types/components.d.ts +1253 -10
  98. package/package.json +9 -3
  99. package/dist/cjs/Helper-8ae6a805.js +0 -28
  100. package/dist/cjs/arrow-right-3d137e4c.js +0 -13
  101. package/dist/cjs/cancel-ae668d91.js +0 -13
  102. package/dist/cjs/check-circle2-1aac98d1.js +0 -13
  103. package/dist/cjs/mail-2db058ee.js +0 -13
  104. package/dist/cjs/salla-button_10.cjs.entry.js +0 -2584
  105. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +0 -93
  106. package/dist/cjs/salla-list-tile_2.cjs.entry.js +0 -80
  107. package/dist/cjs/salla-loyalty.cjs.entry.js +0 -229
  108. package/dist/cjs/salla-product-availability.cjs.entry.js +0 -128
  109. package/dist/cjs/salla-product-size-guide.cjs.entry.js +0 -52
  110. package/dist/cjs/salla-quantity-input.cjs.entry.js +0 -101
  111. package/dist/cjs/salla-rating-modal.cjs.entry.js +0 -169
  112. package/dist/cjs/salla-rating-stars.cjs.entry.js +0 -83
  113. package/dist/cjs/salla-social-share.cjs.entry.js +0 -1447
  114. package/dist/cjs/salla-swiper.cjs.entry.js +0 -5023
  115. package/dist/cjs/salla-tab-content_3.cjs.entry.js +0 -159
  116. package/dist/cjs/star2-8288e6e1.js +0 -13
  117. package/dist/esm/Helper-e1d414a5.js +0 -26
  118. package/dist/esm/arrow-right-1c3e04f2.js +0 -11
  119. package/dist/esm/cancel-41a92070.js +0 -11
  120. package/dist/esm/check-circle2-f6e5f685.js +0 -11
  121. package/dist/esm/mail-9d5204c6.js +0 -11
  122. package/dist/esm/salla-button_10.entry.js +0 -2571
  123. package/dist/esm/salla-infinite-scroll.entry.js +0 -89
  124. package/dist/esm/salla-list-tile_2.entry.js +0 -75
  125. package/dist/esm/salla-loyalty.entry.js +0 -225
  126. package/dist/esm/salla-product-availability.entry.js +0 -124
  127. package/dist/esm/salla-product-size-guide.entry.js +0 -48
  128. package/dist/esm/salla-quantity-input.entry.js +0 -97
  129. package/dist/esm/salla-rating-modal.entry.js +0 -165
  130. package/dist/esm/salla-rating-stars.entry.js +0 -79
  131. package/dist/esm/salla-swiper.entry.js +0 -5019
  132. package/dist/esm/salla-tab-content_3.entry.js +0 -153
  133. package/dist/esm/star2-b134fc74.js +0 -11
  134. package/dist/twilight-components/p-0d498694.entry.js +0 -4
  135. package/dist/twilight-components/p-14f0ff17.entry.js +0 -4
  136. package/dist/twilight-components/p-335abbbb.entry.js +0 -4
  137. package/dist/twilight-components/p-4cafb11b.entry.js +0 -4
  138. package/dist/twilight-components/p-5e63e308.entry.js +0 -4
  139. package/dist/twilight-components/p-5fb32395.entry.js +0 -4
  140. package/dist/twilight-components/p-648e74e5.entry.js +0 -4
  141. package/dist/twilight-components/p-6a3adf55.entry.js +0 -4
  142. package/dist/twilight-components/p-6da4bb74.entry.js +0 -4
  143. package/dist/twilight-components/p-897b2018.js +0 -4
  144. package/dist/twilight-components/p-93708e1e.js +0 -4
  145. package/dist/twilight-components/p-9d236cf4.entry.js +0 -4
  146. package/dist/twilight-components/p-9d2ca9c8.js +0 -4
  147. package/dist/twilight-components/p-af7d5660.js +0 -4
  148. package/dist/twilight-components/p-bdbd2386.entry.js +0 -4
  149. package/dist/twilight-components/p-cac3db69.entry.js +0 -4
  150. package/dist/twilight-components/p-d914a212.js +0 -4
  151. package/dist/twilight-components/p-dace8e6d.js +0 -4
  152. package/dist/twilight-components/p-f9253fda.entry.js +0 -4
@@ -1,159 +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-0d0167d5.js');
9
-
10
- const sallaTabContentCss = "";
11
-
12
- const SallaTabContent = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.isSelected = false;
16
- }
17
- /**
18
- * Expose self for the parent.
19
- */
20
- async getChild() {
21
- return {
22
- selected: this.selected.bind(this),
23
- unselect: this.unselect.bind(this),
24
- name: this.name
25
- };
26
- }
27
- unselect() {
28
- this.isSelected = false;
29
- }
30
- selected() {
31
- this.isSelected = true;
32
- }
33
- render() {
34
- const classes = {
35
- 's-tabs-content': true,
36
- 's-tabs-content-selected': this.isSelected
37
- };
38
- return (index.h("div", { class: classes }, index.h("slot", null)));
39
- }
40
- };
41
- SallaTabContent.style = sallaTabContentCss;
42
-
43
- function generateRandomId() {
44
- return Math.random().toString(36).slice(2, 10);
45
- }
46
-
47
- const sallaTabHeaderCss = "";
48
-
49
- const SallaTabHeader = class {
50
- constructor(hostRef) {
51
- index.registerInstance(this, hostRef);
52
- this.tabSelected = index.createEvent(this, "tabSelected", 7);
53
- this.id = generateRandomId();
54
- /**
55
- * The class applied to the currently active(selected) tab
56
- */
57
- this.activeClass = undefined;
58
- /**
59
- * Set the height of the tab bar
60
- */
61
- this.height = undefined;
62
- /**
63
- * Center tab items in the given flex.
64
- */
65
- this.centered = false;
66
- this.isSelected = false;
67
- }
68
- /**
69
- * Expose self for the parent.
70
- */
71
- async getChild() {
72
- return {
73
- selected: this.selected.bind(this),
74
- unselect: this.unselect.bind(this),
75
- name: this.name,
76
- id: this.id
77
- };
78
- }
79
- unselect() {
80
- this.isSelected = false;
81
- }
82
- selected() {
83
- this.isSelected = true;
84
- }
85
- onClick() {
86
- this.getChild().then(child => {
87
- this.tabSelected.emit(child);
88
- });
89
- }
90
- render() {
91
- const classes = {
92
- 's-tabs-header-item': true,
93
- 's-tabs-bg-normal': true,
94
- 's-tabs-active': this.isSelected,
95
- };
96
- return [
97
- index.h("div", { class: classes, onClick: this.onClick.bind(this) }, index.h("slot", null)),
98
- ];
99
- }
100
- };
101
- SallaTabHeader.style = sallaTabHeaderCss;
102
-
103
- const sallaTabsCss = ".s-tabs-header{-ms-overflow-style:none;scrollbar-width:none;}.s-tabs-header::-webkit-scrollbar{display:none}";
104
-
105
- const SallaTabs = class {
106
- constructor(hostRef) {
107
- index.registerInstance(this, hostRef);
108
- /**
109
- * Background color
110
- */
111
- this.backgroundColor = undefined;
112
- /**
113
- * Align tabs vertically.
114
- */
115
- this.vertical = false;
116
- }
117
- componentWillLoad() {
118
- this.createGroup().then(() => {
119
- const [group] = this.tabGroup;
120
- this.selectGroup(group);
121
- });
122
- }
123
- onSelectedTab(event) {
124
- const group = this.tabGroup.find(group => group.header.id === event.detail.id);
125
- this.selectGroup(group);
126
- }
127
- async createGroup() {
128
- const tabsHeaderEl = Array.from(this.host.querySelectorAll('salla-tab-header'));
129
- this.tabsHeader = await Promise.all(tabsHeaderEl.map(el => el.getChild()));
130
- const tabsContentEl = Array.from(this.host.querySelectorAll('salla-tab-content'));
131
- this.tabsContent = await Promise.all(tabsContentEl.map(el => el.getChild()));
132
- this.tabGroup = this.tabsHeader.map(header => {
133
- const content = this.tabsContent.find(content => content.name === header.name);
134
- return {
135
- header: header,
136
- content: content
137
- };
138
- });
139
- }
140
- selectGroup(group) {
141
- this.tabGroup.map(g => {
142
- g.header.unselect();
143
- g.content.unselect();
144
- });
145
- group.header.selected();
146
- group.content.selected();
147
- }
148
- render() {
149
- return [
150
- index.h("div", { class: "s-tabs" }, index.h("div", { class: "s-tabs-header" }, index.h("slot", { name: "header" })), index.h("div", { class: "s-tabs-content-wrapper" }, index.h("slot", { name: "content" })))
151
- ];
152
- }
153
- get host() { return index.getElement(this); }
154
- };
155
- SallaTabs.style = sallaTabsCss;
156
-
157
- exports.salla_tab_content = SallaTabContent;
158
- exports.salla_tab_header = SallaTabHeader;
159
- exports.salla_tabs = SallaTabs;
@@ -1,13 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- 'use strict';
5
-
6
- const Star2 = `<!-- Generated by IcoMoon.io -->
7
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="32" viewBox="0 0 30 32">
8
- <title>star2</title>
9
- <path d="M29.714 11.839c0 0.321-0.232 0.625-0.464 0.857l-6.482 6.321 1.536 8.929c0.018 0.125 0.018 0.232 0.018 0.357 0 0.464-0.214 0.893-0.732 0.893-0.25 0-0.5-0.089-0.714-0.214l-8.018-4.214-8.018 4.214c-0.232 0.125-0.464 0.214-0.714 0.214-0.518 0-0.75-0.429-0.75-0.893 0-0.125 0.018-0.232 0.036-0.357l1.536-8.929-6.5-6.321c-0.214-0.232-0.446-0.536-0.446-0.857 0-0.536 0.554-0.75 1-0.821l8.964-1.304 4.018-8.125c0.161-0.339 0.464-0.732 0.875-0.732s0.714 0.393 0.875 0.732l4.018 8.125 8.964 1.304c0.429 0.071 1 0.286 1 0.821z"></path>
10
- </svg>
11
- `;
12
-
13
- exports.Star2 = Star2;
@@ -1,26 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- //TODO::check why there are too much listeners for languages::translations.loaded
5
- salla.event.setMaxListeners(20);
6
- class Helper extends salla.AppHelpers {
7
- setHost(host) {
8
- this.host = host;
9
- }
10
- getElement(selector) {
11
- return this.host.querySelector(selector);
12
- }
13
- getAttribute(selector, attribute) {
14
- var _a;
15
- return (_a = this.getElement(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(attribute);
16
- }
17
- val(selector) {
18
- return this.getAttribute(selector, 'value');
19
- }
20
- isUser() {
21
- return salla.config.get('user.type') === 'user';
22
- }
23
- }
24
- const Helper$1 = new Helper;
25
-
26
- export { Helper$1 as H };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- const ArrowRightIcon = `<!-- 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-right</title>
7
- <path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>
8
- </svg>
9
- `;
10
-
11
- export { ArrowRightIcon as A };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- const Cancel = `<!-- 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>cancel</title>
7
- <path d="M17.885 16l7.057-7.057c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-7.057 7.057-7.057-7.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l7.057 7.057-7.057 7.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l7.057-7.057 7.057 7.057c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
8
- </svg>
9
- `;
10
-
11
- export { Cancel as C };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- const CheckCircle2 = `<!-- 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>check-circle2</title>
7
- <path d="M29.333 14.133c-0.8 0-1.333 0.533-1.333 1.333v1.2c0 6.667-5.333 12-12 12 0 0 0 0 0 0-6.667 0-12-5.333-12-12s5.333-12 12-12c0 0 0 0 0 0 1.733 0 3.333 0.4 4.933 1.067 0.667 0.267 1.467 0 1.733-0.667s0-1.467-0.667-1.733c-1.867-0.8-3.867-1.333-6-1.333 0 0 0 0 0 0-8.133 0-14.667 6.533-14.667 14.667s6.533 14.667 14.667 14.667c0 0 0 0 0 0 8.133 0 14.667-6.533 14.667-14.667v-1.2c0-0.8-0.533-1.333-1.333-1.333zM12.933 14.4c-0.533-0.533-1.333-0.533-1.867 0s-0.533 1.333 0 1.867l4 4c0.267 0.267 0.533 0.4 0.933 0.4s0.667-0.133 0.933-0.4l13.333-13.333c0.533-0.533 0.533-1.333 0-1.867s-1.333-0.533-1.867 0l-12.4 12.4-3.067-3.067z"></path>
8
- </svg>
9
- `;
10
-
11
- export { CheckCircle2 as C };
@@ -1,11 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- const email = `<!-- 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>mail</title>
7
- <path d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z"></path>
8
- </svg>
9
- `;
10
-
11
- export { email as e };