@salla.sa/twilight-components 1.0.15 → 1.0.16

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 (84) hide show
  1. package/dist/{esm → twilight-components}/Helper-81ac9a8c.js +0 -0
  2. package/dist/twilight-components/app-globals-0f993ce5.js +3 -0
  3. package/dist/twilight-components/css-shim-a64b8820.js +4 -0
  4. package/dist/twilight-components/dom-d08ba8aa.js +73 -0
  5. package/dist/twilight-components/index-8966d27f.js +3010 -0
  6. package/dist/twilight-components/index.esm.js +4 -1
  7. package/dist/{esm → twilight-components}/salla-branches.entry.js +1 -1
  8. package/dist/{esm → twilight-components}/salla-button.entry.js +7 -7
  9. package/dist/{esm → twilight-components}/salla-localization.entry.js +1 -1
  10. package/dist/{esm/salla-login-c9c9fa57.js → twilight-components/salla-login-4d620368.js} +1 -1
  11. package/dist/twilight-components/salla-login.entry.js +2 -0
  12. package/dist/{esm/salla-login_2.entry.js → twilight-components/salla-modal.entry.js} +1 -2
  13. package/dist/{esm → twilight-components}/salla-product-availability.entry.js +1 -1
  14. package/dist/twilight-components/salla-rating.entry.js +293 -0
  15. package/dist/{esm/salla-search-add7bdb6.js → twilight-components/salla-search-5338c0a1.js} +3 -3
  16. package/dist/twilight-components/salla-search.entry.js +3 -0
  17. package/dist/{esm → twilight-components}/salla-verify.entry.js +1 -1
  18. package/dist/twilight-components/shadow-css-bc14d9fd.js +389 -0
  19. package/dist/twilight-components/twilight-components.css +3 -1
  20. package/dist/twilight-components/twilight-components.esm.js +125 -1
  21. package/dist/types/components/salla-rating/salla-rating.d.ts +7 -8
  22. package/package.json +1 -1
  23. package/dist/cjs/Helper-8852feaa.js +0 -23
  24. package/dist/cjs/index-0b5b5867.js +0 -1656
  25. package/dist/cjs/index.cjs.js +0 -13
  26. package/dist/cjs/loader.cjs.js +0 -21
  27. package/dist/cjs/salla-branches.cjs.entry.js +0 -92
  28. package/dist/cjs/salla-button.cjs.entry.js +0 -77
  29. package/dist/cjs/salla-localization.cjs.entry.js +0 -77
  30. package/dist/cjs/salla-login-6a54572d.js +0 -14
  31. package/dist/cjs/salla-login_2.cjs.entry.js +0 -97
  32. package/dist/cjs/salla-product-availability.cjs.entry.js +0 -75
  33. package/dist/cjs/salla-rating.cjs.entry.js +0 -303
  34. package/dist/cjs/salla-search-311c7053.js +0 -81
  35. package/dist/cjs/salla-search.cjs.entry.js +0 -11
  36. package/dist/cjs/salla-verify.cjs.entry.js +0 -96
  37. package/dist/cjs/twilight-components.cjs.js +0 -19
  38. package/dist/collection/Helpers/Helper.js +0 -19
  39. package/dist/collection/collection-manifest.json +0 -20
  40. package/dist/collection/components/generate-summary.js +0 -35
  41. package/dist/collection/components/salla-branches/salla-branches.css +0 -12
  42. package/dist/collection/components/salla-branches/salla-branches.js +0 -235
  43. package/dist/collection/components/salla-button/salla-button.css +0 -3
  44. package/dist/collection/components/salla-button/salla-button.js +0 -243
  45. package/dist/collection/components/salla-localization/salla-localization.js +0 -200
  46. package/dist/collection/components/salla-login/salla-login.js +0 -31
  47. package/dist/collection/components/salla-modal/salla-modal.js +0 -360
  48. package/dist/collection/components/salla-product-availability/salla-product-availability.js +0 -331
  49. package/dist/collection/components/salla-rating/salla-rating.css +0 -3
  50. package/dist/collection/components/salla-rating/salla-rating.js +0 -488
  51. package/dist/collection/components/salla-search/salla-search.js +0 -132
  52. package/dist/collection/components/salla-verify/salla-verify.js +0 -99
  53. package/dist/collection/index.js +0 -2
  54. package/dist/collection/interfaces/colors.js +0 -1
  55. package/dist/collection/interfaces/index.js +0 -2
  56. package/dist/collection/interfaces/ratio.js +0 -1
  57. package/dist/collection/plugins/tailwind-theme/generator.js +0 -53
  58. package/dist/collection/plugins/tailwind-theme/index.js +0 -26
  59. package/dist/esm/index-8b97d225.js +0 -1628
  60. package/dist/esm/index.js +0 -4
  61. package/dist/esm/loader.js +0 -17
  62. package/dist/esm/polyfills/core-js.js +0 -11
  63. package/dist/esm/polyfills/css-shim.js +0 -1
  64. package/dist/esm/polyfills/dom.js +0 -79
  65. package/dist/esm/polyfills/es5-html-element.js +0 -1
  66. package/dist/esm/polyfills/index.js +0 -34
  67. package/dist/esm/polyfills/system.js +0 -6
  68. package/dist/esm/salla-rating.entry.js +0 -299
  69. package/dist/esm/salla-search.entry.js +0 -3
  70. package/dist/esm/twilight-components.js +0 -17
  71. package/dist/index.cjs.js +0 -1
  72. package/dist/index.js +0 -1
  73. package/dist/twilight-components/p-010b8dfd.entry.js +0 -1
  74. package/dist/twilight-components/p-0ceecf63.js +0 -1
  75. package/dist/twilight-components/p-32d29245.entry.js +0 -1
  76. package/dist/twilight-components/p-50e70ad4.entry.js +0 -1
  77. package/dist/twilight-components/p-68c9f122.entry.js +0 -1
  78. package/dist/twilight-components/p-8126278e.entry.js +0 -1
  79. package/dist/twilight-components/p-9bc28e0c.js +0 -1
  80. package/dist/twilight-components/p-9d327a79.entry.js +0 -1
  81. package/dist/twilight-components/p-b05450bc.entry.js +0 -1
  82. package/dist/twilight-components/p-bd5da080.js +0 -1
  83. package/dist/twilight-components/p-cb1c59a2.js +0 -1
  84. package/dist/twilight-components/p-d584d0c7.entry.js +0 -1
@@ -1,31 +0,0 @@
1
- import { Component, h } from '@stencil/core';
2
- export class SallaLogin {
3
- render() {
4
- return (h("salla-modal", { id: "salla-login", title: "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0645\u0648\u0642\u0639" },
5
- h("div", { id: "showLoginMethods" },
6
- h("p", { class: "text-sm text-gray-text mb-5" }, "\u0627\u062E\u062A\u0631 \u0627\u0644\u0648\u0633\u064A\u0644\u0629 \u0627\u0644\u0645\u0646\u0627\u0633\u0628\u0629"),
7
- h("div", { id: "openEmailLogin", class: "mb-2.5 box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200" },
8
- h("div", { class: "flex-shrink-0" },
9
- h("div", { class: "bg-primary w-12 h-12 text-lg text-white rounded-icon" },
10
- h("i", { class: "sicon-mail" }))),
11
- h("div", { class: "flex-1 min-w-0" },
12
- h("a", { href: "#", class: "focus:outline-none flex justify-between items-center" },
13
- h("div", { class: "flex-1" },
14
- h("span", { class: "absolute inset-0", "aria-hidden": "true" }),
15
- h("p", { class: "text-sm text-gray-text" }, "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644"),
16
- h("h6", { class: "font-boldf" }, "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A")),
17
- h("i", { class: "sicon-keyboard_arrow_left text-primary text-xl" })))),
18
- h("div", { class: "box-content relative rounded-md border border-border-color bg-white py-5 pe-4 ps-5 flex items-center space-s-3 hover:border-gray-200" },
19
- h("div", { class: "flex-shrink-0" },
20
- h("div", { class: "bg-primary w-12 h-12 text-lg text-white rounded-icon" },
21
- h("i", { class: "sicon-phone" }))),
22
- h("div", { class: "flex-1 min-w-0" },
23
- h("a", { href: "#", class: "focus:outline-none flex justify-between items-center" },
24
- h("div", { class: "flex-1" },
25
- h("span", { class: "absolute inset-0", "aria-hidden": "true" }),
26
- h("p", { class: "text-sm text-gray-text" }, "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644"),
27
- h("h6", { class: "font-boldf" }, "\u0627\u0644\u0647\u0627\u062A\u0641")),
28
- h("i", { class: "sicon-keyboard_arrow_left text-primary text-xl" })))))));
29
- }
30
- static get is() { return "salla-login"; }
31
- }
@@ -1,360 +0,0 @@
1
- import { Component, h, Prop, Host, Element, Event, Watch, Method } from '@stencil/core';
2
- import Helper from "../../Helpers/Helper";
3
- //todo:: button component
4
- export class SallaModal {
5
- constructor() {
6
- var _a;
7
- this.error = false;
8
- this.success = false;
9
- this.isClosable = true;
10
- this.modalWidth = 'w-96'; //todo use friendly names
11
- this.visible = false;
12
- this.subTitleFirst = false;
13
- this.subTitle = '';
14
- this.icon = '';
15
- this.imageIcon = '';
16
- Helper.setHost(this.host);
17
- salla.event.on('modal::open', btn => btn.dataset.target == this.host.id && this.show());
18
- salla.event.on('modal::close', btn => btn.dataset.target == this.host.id && this.hide());
19
- this.title = this.host.title;
20
- this.host.removeAttribute('title');
21
- (_a = Helper.getElement('[slot=body]')) === null || _a === void 0 ? void 0 : _a.classList.add('s-modal-body');
22
- }
23
- handleVisible(newValue) {
24
- if (!newValue) {
25
- this.toggleModal(false);
26
- this.close.emit();
27
- return;
28
- }
29
- this.host.classList.remove('hidden');
30
- setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden
31
- this.ready.emit();
32
- }
33
- async show() {
34
- this.host.setAttribute('visible', '');
35
- return this.host;
36
- }
37
- async hide() {
38
- this.host.removeAttribute('visible');
39
- return this.host;
40
- }
41
- async setTitle(title) {
42
- this.title = title;
43
- return this.host;
44
- }
45
- toggleModal(isOpen) {
46
- Helper.toggleElement(this.host.querySelector('.s-modal-body'), 's-modal-entering', 's-modal-leaving', () => isOpen)
47
- .toggleElement(this.host.querySelector('[slot=body]'), 's-modal-entering', 's-modal-leaving', () => isOpen)
48
- .toggleElement(this.overlay, 's-modal-entering', 's-modal-overlay-leaving', () => isOpen)
49
- .toggleElement(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
50
- if (!isOpen) {
51
- setTimeout(() => this.host.classList.add('hidden'), 350);
52
- }
53
- }
54
- closeModal() {
55
- if (!this.isClosable) {
56
- return;
57
- }
58
- this.host.removeAttribute('visible');
59
- }
60
- //todo:: pref for each modal
61
- render() {
62
- this.host.id = this.host.id || 'salla-modal';
63
- return (h(Host, { class: 's-modal-container hidden', "aria-modal": "true", role: "dialog" },
64
- h("div", { class: "s-modal-wrapper" },
65
- h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal() }),
66
- h("span", { class: "s-modal-spacer" }, "\u200B"),
67
- h("slot", { name: "body" },
68
- h("div", { class: 's-modal-body ' + this.modalWidth },
69
- h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.icon != '' || this.imageIcon != '' } },
70
- this.isClosable ?
71
- h("button", { class: "s-modal-close cursor-pointer", onClick: () => this.closeModal(), type: "button" },
72
- h("span", { class: "sicon-cancel" }))
73
- : '',
74
- this.error || this.success || this.icon
75
- ? h("div", { class: {
76
- 's-modal-icon': true,
77
- 's-modal-bg-error': this.error,
78
- 's-modal-bg-success': this.success,
79
- 's-modal-bg-normal': !this.error && !this.success
80
- } },
81
- h("i", { class: {
82
- [this.icon]: true,
83
- 's-modal-text-error': this.error,
84
- 's-modal-text-success': this.success,
85
- } }))
86
- : this.imageIcon ?
87
- h("img", { class: "s-modal-header-img", src: this.imageIcon })
88
- : '',
89
- this.title || this.subTitle ?
90
- h("div", { class: "s-modal-header-content" },
91
- h("div", { class: { 's-modal-title': true, 's-modal-title-below': this.subTitleFirst }, innerHTML: this.title }),
92
- h("p", { class: { 's-modal-sub-title': true }, innerHTML: this.subTitle }))
93
- : ''),
94
- h("slot", null),
95
- h("slot", { name: "footer" }))))));
96
- }
97
- static get is() { return "salla-modal"; }
98
- static get properties() { return {
99
- "error": {
100
- "type": "boolean",
101
- "mutable": false,
102
- "complexType": {
103
- "original": "boolean",
104
- "resolved": "boolean",
105
- "references": {}
106
- },
107
- "required": false,
108
- "optional": false,
109
- "docs": {
110
- "tags": [],
111
- "text": ""
112
- },
113
- "attribute": "error",
114
- "reflect": false,
115
- "defaultValue": "false"
116
- },
117
- "success": {
118
- "type": "boolean",
119
- "mutable": false,
120
- "complexType": {
121
- "original": "boolean",
122
- "resolved": "boolean",
123
- "references": {}
124
- },
125
- "required": false,
126
- "optional": false,
127
- "docs": {
128
- "tags": [],
129
- "text": ""
130
- },
131
- "attribute": "success",
132
- "reflect": false,
133
- "defaultValue": "false"
134
- },
135
- "isClosable": {
136
- "type": "boolean",
137
- "mutable": true,
138
- "complexType": {
139
- "original": "boolean",
140
- "resolved": "boolean",
141
- "references": {}
142
- },
143
- "required": false,
144
- "optional": false,
145
- "docs": {
146
- "tags": [],
147
- "text": ""
148
- },
149
- "attribute": "is-closable",
150
- "reflect": false,
151
- "defaultValue": "true"
152
- },
153
- "modalWidth": {
154
- "type": "string",
155
- "mutable": false,
156
- "complexType": {
157
- "original": "string",
158
- "resolved": "string",
159
- "references": {}
160
- },
161
- "required": false,
162
- "optional": false,
163
- "docs": {
164
- "tags": [],
165
- "text": ""
166
- },
167
- "attribute": "modal-width",
168
- "reflect": true,
169
- "defaultValue": "'w-96'"
170
- },
171
- "visible": {
172
- "type": "boolean",
173
- "mutable": false,
174
- "complexType": {
175
- "original": "boolean",
176
- "resolved": "boolean",
177
- "references": {}
178
- },
179
- "required": false,
180
- "optional": false,
181
- "docs": {
182
- "tags": [],
183
- "text": ""
184
- },
185
- "attribute": "visible",
186
- "reflect": true,
187
- "defaultValue": "false"
188
- },
189
- "subTitleFirst": {
190
- "type": "boolean",
191
- "mutable": false,
192
- "complexType": {
193
- "original": "boolean",
194
- "resolved": "boolean",
195
- "references": {}
196
- },
197
- "required": false,
198
- "optional": false,
199
- "docs": {
200
- "tags": [],
201
- "text": ""
202
- },
203
- "attribute": "sub-title-first",
204
- "reflect": false,
205
- "defaultValue": "false"
206
- },
207
- "subTitle": {
208
- "type": "string",
209
- "mutable": false,
210
- "complexType": {
211
- "original": "string",
212
- "resolved": "string",
213
- "references": {}
214
- },
215
- "required": false,
216
- "optional": false,
217
- "docs": {
218
- "tags": [],
219
- "text": ""
220
- },
221
- "attribute": "sub-title",
222
- "reflect": false,
223
- "defaultValue": "''"
224
- },
225
- "icon": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "string",
230
- "resolved": "string",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": ""
238
- },
239
- "attribute": "icon",
240
- "reflect": false,
241
- "defaultValue": "''"
242
- },
243
- "imageIcon": {
244
- "type": "string",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "string",
248
- "resolved": "string",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": ""
256
- },
257
- "attribute": "image-icon",
258
- "reflect": false,
259
- "defaultValue": "''"
260
- }
261
- }; }
262
- static get events() { return [{
263
- "method": "ready",
264
- "name": "ready",
265
- "bubbles": true,
266
- "cancelable": true,
267
- "composed": true,
268
- "docs": {
269
- "tags": [],
270
- "text": ""
271
- },
272
- "complexType": {
273
- "original": "any",
274
- "resolved": "any",
275
- "references": {}
276
- }
277
- }, {
278
- "method": "close",
279
- "name": "close",
280
- "bubbles": true,
281
- "cancelable": true,
282
- "composed": true,
283
- "docs": {
284
- "tags": [],
285
- "text": ""
286
- },
287
- "complexType": {
288
- "original": "any",
289
- "resolved": "any",
290
- "references": {}
291
- }
292
- }]; }
293
- static get methods() { return {
294
- "show": {
295
- "complexType": {
296
- "signature": "() => Promise<HTMLElement>",
297
- "parameters": [],
298
- "references": {
299
- "Promise": {
300
- "location": "global"
301
- },
302
- "HTMLElement": {
303
- "location": "global"
304
- }
305
- },
306
- "return": "Promise<HTMLElement>"
307
- },
308
- "docs": {
309
- "text": "",
310
- "tags": []
311
- }
312
- },
313
- "hide": {
314
- "complexType": {
315
- "signature": "() => Promise<HTMLElement>",
316
- "parameters": [],
317
- "references": {
318
- "Promise": {
319
- "location": "global"
320
- },
321
- "HTMLElement": {
322
- "location": "global"
323
- }
324
- },
325
- "return": "Promise<HTMLElement>"
326
- },
327
- "docs": {
328
- "text": "",
329
- "tags": []
330
- }
331
- },
332
- "setTitle": {
333
- "complexType": {
334
- "signature": "(title: any) => Promise<HTMLElement>",
335
- "parameters": [{
336
- "tags": [],
337
- "text": ""
338
- }],
339
- "references": {
340
- "Promise": {
341
- "location": "global"
342
- },
343
- "HTMLElement": {
344
- "location": "global"
345
- }
346
- },
347
- "return": "Promise<HTMLElement>"
348
- },
349
- "docs": {
350
- "text": "",
351
- "tags": []
352
- }
353
- }
354
- }; }
355
- static get elementRef() { return "host"; }
356
- static get watchers() { return [{
357
- "propName": "visible",
358
- "methodName": "handleVisible"
359
- }]; }
360
- }