@salla.sa/twilight-components 1.0.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.
- package/LICENSE +21 -0
- package/README.md +34 -0
- package/dist/cjs/index-6ea83d19.js +1619 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/salla-alert_3.cjs.entry.js +171 -0
- package/dist/cjs/salla-modal.cjs.entry.js +52 -0
- package/dist/cjs/twilight-components.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/alert/alert.css +112 -0
- package/dist/collection/components/alert/alert.js +194 -0
- package/dist/collection/components/generate-summary.js +35 -0
- package/dist/collection/components/modal/modal.css +158 -0
- package/dist/collection/components/modal/modal.js +180 -0
- package/dist/collection/components/salla-login/salla-login.css +104 -0
- package/dist/collection/components/salla-login/salla-login.js +113 -0
- package/dist/collection/components/search-modal/search-modal.css +0 -0
- package/dist/collection/components/search-modal/search-modal.js +126 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/interfaces/colors.js +1 -0
- package/dist/collection/interfaces/index.js +2 -0
- package/dist/collection/interfaces/ratio.js +1 -0
- package/dist/collection/plugins/tailwind-theme/index.js +35 -0
- package/dist/collection/plugins/tailwind-theme/scripts/generator.js +51 -0
- package/dist/collection/utils/utils.js +16 -0
- package/dist/esm/index-3c2b0663.js +1591 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/salla-alert_3.entry.js +165 -0
- package/dist/esm/salla-modal.entry.js +48 -0
- package/dist/esm/twilight-components.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/twilight-components/index.esm.js +0 -0
- package/dist/twilight-components/p-58168e3c.entry.js +1 -0
- package/dist/twilight-components/p-a2a8cae2.entry.js +1 -0
- package/dist/twilight-components/p-e1773073.js +1 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -0
- package/dist/types/components/alert/alert.d.ts +38 -0
- package/dist/types/components/modal/modal.d.ts +28 -0
- package/dist/types/components/salla-login/salla-login.d.ts +14 -0
- package/dist/types/components/search-modal/search-modal.d.ts +22 -0
- package/dist/types/components.d.ts +188 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interfaces/colors.d.ts +1 -0
- package/dist/types/interfaces/index.d.ts +2 -0
- package/dist/types/interfaces/ratio.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1563 -0
- package/dist/types/utils/utils.d.ts +6 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +13 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +66 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-3c2b0663.js';
|
|
2
|
+
|
|
3
|
+
const alertCss = ".sc-salla-alert-h{-webkit-font-smoothing:antialiased;padding:var(--padding-top, 8px) var(--padding-right, 16px) var(--padding-bottom, 8px) var(--padding-left, 16px);min-height:var(--height, 24px);color:var(--color, #fff);background-color:var(--background-color, #327bb7);border-color:transparent;font-family:var(--font-family, \"Helvetica Neue\", Helvetica, Arial, sans-serif);font-size:var(--font-size, 13px);font-weight:var(--font-weight, normal);line-height:1;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}.sc-salla-alert-h .alert__content.sc-salla-alert{display:block;height:100%;width:100%}.sc-salla-alert-h .alert__close-text.sc-salla-alert{cursor:pointer;opacity:0.7;position:absolute;top:14px;right:16px;font-size:0.8em}.sc-salla-alert-h .alert__close-text.sc-salla-alert:hover{opacity:0.85}.primary.sc-salla-alert-h{color:white;background-color:#5cd5c4}.secondary.sc-salla-alert-h{color:white;background-color:#ff7d09}.success.sc-salla-alert-h{color:white;background-color:#00c092}.warning.sc-salla-alert-h{color:white;background-color:#e8d700}.error.sc-salla-alert-h{color:white;background-color:#d0021b}.light.sc-salla-alert-h{color:black;background-color:#e5e5e5}.info.sc-salla-alert-h{color:black;background-color:#53ff5c}.dark.sc-salla-alert-h{color:white;background-color:#5d5d5d}.white.sc-salla-alert-h{color:black;background-color:white}.black.sc-salla-alert-h{color:white;background-color:black}.rounded.sc-salla-alert-h{border-radius:var(--border-radius, 4px)}";
|
|
4
|
+
|
|
5
|
+
const Alert = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.closed = createEvent(this, "closed", 7);
|
|
9
|
+
/**
|
|
10
|
+
* If `true` alert will close automatically.
|
|
11
|
+
*/
|
|
12
|
+
this.autoClose = true;
|
|
13
|
+
/**
|
|
14
|
+
* Number of seconds to close alert automatically if autoClose `true`.
|
|
15
|
+
*/
|
|
16
|
+
this.closeSecs = 3;
|
|
17
|
+
/**
|
|
18
|
+
* If closable or not.
|
|
19
|
+
*/
|
|
20
|
+
this.closeable = true;
|
|
21
|
+
/**
|
|
22
|
+
* Customized close button text.
|
|
23
|
+
*/
|
|
24
|
+
this.closeText = '\u2573';
|
|
25
|
+
/**
|
|
26
|
+
* If `true`, make the alert rounded.
|
|
27
|
+
*/
|
|
28
|
+
this.rounded = false;
|
|
29
|
+
this.countDownTimerId = null;
|
|
30
|
+
this.close = () => {
|
|
31
|
+
this.closed.emit(true);
|
|
32
|
+
this.el.remove();
|
|
33
|
+
};
|
|
34
|
+
this.renderCloseText = () => {
|
|
35
|
+
if (this.closeable) {
|
|
36
|
+
return (h("span", { class: "alert__close-text", onClick: this.close }, this.closeText));
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
componentWillLoad() {
|
|
42
|
+
if (this.el.attributes['auto-close']) {
|
|
43
|
+
this.countDownTimerId = window.setTimeout(() => {
|
|
44
|
+
this.close();
|
|
45
|
+
}, this.closeSecs * 1000);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
if (this.autoClose) {
|
|
50
|
+
window.clearInterval(this.countDownTimerId);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return (h(Host, { class: {
|
|
55
|
+
[this.color]: true,
|
|
56
|
+
rounded: this.rounded,
|
|
57
|
+
} }, h("div", { class: "alert__content" }, h("slot", null)), this.renderCloseText()));
|
|
58
|
+
}
|
|
59
|
+
get el() { return getElement(this); }
|
|
60
|
+
};
|
|
61
|
+
Alert.style = alertCss;
|
|
62
|
+
|
|
63
|
+
const sallaLoginCss = ".wrapper{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:#fcfcfc;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper .modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper .modal{max-width:500px}}.wrapper .modal .displayed{display:flex}.wrapper .modal .modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.visible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.hide{display:none !important}.show{display:block !important}.search-box{display:flex}.search-box input{width:100%;padding:10px;padding-inline-start:32px}.search-box button{background-color:transparent;border:0;position:absolute;padding:12px;left:12px}.results{list-style:none;padding:0;margin:0;max-height:300px;overflow-y:scroll}.results .product-img{width:50px;margin-inline-end:10px}.results a:first-child{margin-top:20px}.results a{display:flex;border-bottom:1px solid #ddd}.results a h5{margin-top:5px}";
|
|
64
|
+
|
|
65
|
+
const SallaLogin = class {
|
|
66
|
+
constructor(hostRef) {
|
|
67
|
+
registerInstance(this, hostRef);
|
|
68
|
+
this.fetchStatus = '';
|
|
69
|
+
this.searchIcon = 'Search_Icon.svg';
|
|
70
|
+
/**
|
|
71
|
+
* If 'true' will make the modal visible.
|
|
72
|
+
*/
|
|
73
|
+
this.visible = false;
|
|
74
|
+
this.handleClose = () => {
|
|
75
|
+
this.visible = false;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
handleClick(ev) {
|
|
79
|
+
if (!ev.path.some(x => x.className && x.className.includes('modal-body')) &&
|
|
80
|
+
ev.target.localName === 'salla-search-modal') {
|
|
81
|
+
this.visible = false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
return (h("div", { class: this.visible ? 'wrapper visible' : 'wrapper' }, h("div", { class: "modal" }, h("div", { class: 'modal-header' }, h("h5", { class: "title" }, "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644 \u0625\u0644\u064A \u0627\u0644\u0645\u0648\u0642\u0639"), h("button", { type: "button", class: "close", "data-dismiss": "modal", "aria-label": "Close", onClick: this.handleClose }, h("span", { "aria-hidden": "true" }, "\u00D7"))), h("div", { class: "modal-body" }, h("div", { id: "showLoginMethods" }, 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"), 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" }, h("div", { class: "flex-shrink-0" }, h("div", { class: "bg-primary w-12 h-12 text-lg text-white rounded-icon" }, h("i", { class: "sicon-mail" }))), h("div", { class: "flex-1 min-w-0" }, h("a", { href: "#", class: "focus:outline-none flex justify-between items-center" }, h("div", { class: "flex-1" }, h("span", { class: "absolute inset-0", "aria-hidden": "true" }), h("p", { class: "text-sm text-gray-text" }, "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644"), h("h6", { class: "font-boldf" }, "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A")), h("i", { class: "sicon-keyboard_arrow_left text-primary text-xl" })))), 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" }, h("div", { class: "flex-shrink-0" }, h("div", { class: "bg-primary w-12 h-12 text-lg text-white rounded-icon" }, h("i", { class: "sicon-phone" }))), h("div", { class: "flex-1 min-w-0" }, h("a", { href: "#", class: "focus:outline-none flex justify-between items-center" }, h("div", { class: "flex-1" }, h("span", { class: "absolute inset-0", "aria-hidden": "true" }), h("p", { class: "text-sm text-gray-text" }, "\u0633\u062C\u0644 \u062F\u062E\u0648\u0644"), h("h6", { class: "font-boldf" }, "\u0627\u0644\u0647\u0627\u062A\u0641")), h("i", { class: "sicon-keyboard_arrow_left text-primary text-xl" })))))))));
|
|
86
|
+
}
|
|
87
|
+
static get assetsDirs() { return ["assets"]; }
|
|
88
|
+
};
|
|
89
|
+
SallaLogin.style = sallaLoginCss;
|
|
90
|
+
|
|
91
|
+
const searchModalCss = "";
|
|
92
|
+
|
|
93
|
+
const SearchModal = class {
|
|
94
|
+
constructor(hostRef) {
|
|
95
|
+
registerInstance(this, hostRef);
|
|
96
|
+
this.fetchStatus = '';
|
|
97
|
+
this.showModal = false;
|
|
98
|
+
/**
|
|
99
|
+
* The text to overwrite search placeholder.
|
|
100
|
+
*/
|
|
101
|
+
this.searchPlaceholder = 'Search here ...';
|
|
102
|
+
this.handleChange = event => {
|
|
103
|
+
this.searchTerm = event.target.value;
|
|
104
|
+
console.log('this.value', this.searchTerm);
|
|
105
|
+
this.fetchStatus = 'loading';
|
|
106
|
+
this.showResult = false;
|
|
107
|
+
this.results = [];
|
|
108
|
+
if (this.searchTerm.length > 2) {
|
|
109
|
+
window.salla.search.api
|
|
110
|
+
.search(this.searchTerm)
|
|
111
|
+
.then(response => response)
|
|
112
|
+
.then(response => {
|
|
113
|
+
console.log('response', response);
|
|
114
|
+
this.fetchStatus = 'idle';
|
|
115
|
+
this.results = response.results;
|
|
116
|
+
this.showResult = true;
|
|
117
|
+
if (this.results.length < 1) {
|
|
118
|
+
this.fetchStatus = 'error';
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
.catch(err => {
|
|
122
|
+
this.showResult = true;
|
|
123
|
+
this.fetchStatus = 'error';
|
|
124
|
+
console.log(err);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
this.openSearch = () => {
|
|
129
|
+
console.log('openSearchModal');
|
|
130
|
+
this.searchTerm = '';
|
|
131
|
+
this.fetchStatus = '';
|
|
132
|
+
this.results = [];
|
|
133
|
+
this.showModal = true;
|
|
134
|
+
window.scrollTo(0, 0);
|
|
135
|
+
document.getElementsByTagName('html')[0].style.position = 'fixed';
|
|
136
|
+
document.getElementsByTagName('html')[0].style.overflowY = 'scroll';
|
|
137
|
+
//this.$nextTick(() => { this.$refs.searchInput.focus(); });
|
|
138
|
+
};
|
|
139
|
+
this.closeSearch = () => {
|
|
140
|
+
console.log('closeSearchModal');
|
|
141
|
+
this.searchTerm = '';
|
|
142
|
+
this.fetchStatus = '';
|
|
143
|
+
this.results = [];
|
|
144
|
+
document.getElementsByTagName('html')[0].style.position = 'static';
|
|
145
|
+
document.getElementsByTagName('html')[0].style.overflowY = 'auto';
|
|
146
|
+
this.showModal = false;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
getProduct(item) {
|
|
150
|
+
var _a;
|
|
151
|
+
return (h("div", { key: item.id, class: "s-search-modal-results-item" }, h("div", { class: "s-search-modal-product" }, h("a", { target: "_blank", href: item.url, class: "s-search-modal-product-image-container" }, h("img", { class: "s-search-modal-product-image", src: item.thumb })), h("div", { class: "s-search-modal-product-details" }, h("div", { class: "s-search-modal-product-title" }, h("h3", { class: "s-search-modal-product-title-h3" }, item.title)), h("div", { class: "s-search-modal-product-price" }, h("h4", { class: "s-search-modal-product-price-h4" }, (_a = item.price) === null || _a === void 0 ? void 0 : _a.after))))));
|
|
152
|
+
}
|
|
153
|
+
render() {
|
|
154
|
+
return (h(Host, { class: "s-search-modal" }, h("button", { type: "button", onClick: this.openSearch, class: "s-search-modal-search-button-icon" }, h("i", { class: "sicon-search font-bold" })), this.showModal && (h("div", { class: "s-search-modal-container", style: { backgroundColor: 'rgba(0,0,0,0.5)' } }, h("div", { class: "s-search-modal-wrapper", onClick: this.closeSearch }, h("div", { class: "s-search-modal-inner" }, h("div", { class: "s-search-modal-search-box-container" }, h("div", { class: !this.showResult ? 's-search-modal-search-box-inner' : 's-search-modal-search-box-inner-open' }, h("input", { onClick: e => {
|
|
155
|
+
e.stopPropagation();
|
|
156
|
+
}, class: "s-search-modal-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchTerm, onInput: event => this.handleChange(event) }), this.fetchStatus != 'loading' ? (h("button", { class: "s-search-modal-search-icon" }, h("i", { class: "sicon-search" }))) : (h("span", { class: "s-search-modal-spinner" }, h("span", { class: "s-search-modal-spinner-loader" }))))), h("div", { class: "s-search-modal-search-results" }, this.fetchStatus === 'error' && (h("p", { class: "s-search-modal-no-results error p-4 text-sm text-gray-text" }, "\u0644\u0627 \u064A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C")), this.results &&
|
|
157
|
+
this.results.map(item => {
|
|
158
|
+
return this.getProduct(item);
|
|
159
|
+
}))))))));
|
|
160
|
+
}
|
|
161
|
+
static get assetsDirs() { return ["assets"]; }
|
|
162
|
+
};
|
|
163
|
+
SearchModal.style = searchModalCss;
|
|
164
|
+
|
|
165
|
+
export { Alert as salla_alert, SallaLogin as salla_login, SearchModal as salla_search_modal };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-3c2b0663.js';
|
|
2
|
+
|
|
3
|
+
const modalCss = ".wrapper.sc-salla-modal{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.42);-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper.sc-salla-modal .modal.sc-salla-modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper.sc-salla-modal .modal.sc-salla-modal{max-width:500px}}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal{display:none;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:0.3rem;border-top-right-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal h5.sc-salla-modal{margin:0;font-weight:normal}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal .title.sc-salla-modal{font-size:1.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:grey;outline:0;float:right;font-size:1.5rem;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff;opacity:0.5}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal .sc-salla-modal:hover{color:black;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .displayed.sc-salla-modal{display:flex}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-body.sc-salla-modal{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:0.3rem;border-bottom-left-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal{color:#fff;background-color:#007bff;border-color:#007bff;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal:hover{background-color:#0069d9;border-color:#0062cc;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal{color:#fff;background-color:#6c757d;border-color:#6c757d;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal:hover{background-color:#5a6269;border-color:#5a6269;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal>.sc-salla-modal:not(:last-child){margin-right:0.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .button-container.sc-salla-modal{text-align:right}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;line-height:1.5;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal:hover{background-color:#6c757d;border-color:#6c757d}.visible.sc-salla-modal{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}";
|
|
4
|
+
|
|
5
|
+
const Modal = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.ok = createEvent(this, "ok", 7);
|
|
9
|
+
this.cancel = createEvent(this, "cancel", 7);
|
|
10
|
+
/**
|
|
11
|
+
* The title to display in the modal.
|
|
12
|
+
*/
|
|
13
|
+
this.modalTitle = 'Modal Title';
|
|
14
|
+
/**
|
|
15
|
+
* The text to display in the cancel button.
|
|
16
|
+
*/
|
|
17
|
+
this.cancelText = 'Cancel';
|
|
18
|
+
/**
|
|
19
|
+
* The text to display in the save button.
|
|
20
|
+
*/
|
|
21
|
+
this.saveText = 'Save';
|
|
22
|
+
/**
|
|
23
|
+
* If 'true' will make the modal visible.
|
|
24
|
+
*/
|
|
25
|
+
this.visible = false;
|
|
26
|
+
/**
|
|
27
|
+
* If 'true' will show the modal header.
|
|
28
|
+
*/
|
|
29
|
+
this.modalHeader = false;
|
|
30
|
+
this.handleCancelClick = () => {
|
|
31
|
+
this.visible = false;
|
|
32
|
+
this.cancel.emit();
|
|
33
|
+
};
|
|
34
|
+
this.handleOkClick = () => {
|
|
35
|
+
this.visible = false;
|
|
36
|
+
this.ok.emit();
|
|
37
|
+
};
|
|
38
|
+
this.handleClose = () => {
|
|
39
|
+
this.visible = false;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return (h("div", { class: this.visible ? 'wrapper visible' : 'wrapper' }, h("div", { class: "modal" }, h("div", { class: this.modalHeader ? 'modal-header displayed' : 'modal-header' }, h("h5", { class: "title" }, this.modalTitle), h("button", { type: "button", class: "close", "data-dismiss": "modal", "aria-label": "Close", onClick: this.handleClose }, h("span", { "aria-hidden": "true" }, "\u00D7"))), h("div", { class: "modal-body" }, h("slot", null)), h("div", { class: "modal-footer" }, h("button", { type: "button", class: "btn-secondary", onClick: this.handleCancelClick }, this.cancelText), h("button", { type: "button", class: "btn-primary", onClick: this.handleOkClick }, this.saveText)))));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
Modal.style = modalCss;
|
|
47
|
+
|
|
48
|
+
export { Modal as salla_modal };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-3c2b0663.js';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
5
|
+
*/
|
|
6
|
+
const patchBrowser = () => {
|
|
7
|
+
const importMeta = import.meta.url;
|
|
8
|
+
const opts = {};
|
|
9
|
+
if (importMeta !== '') {
|
|
10
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
11
|
+
}
|
|
12
|
+
return promiseResolve(opts);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
patchBrowser().then(options => {
|
|
16
|
+
return bootstrapLazy([["salla-alert_3",[[6,"salla-alert",{"color":[1],"autoClose":[4,"auto-close"],"closeSecs":[2,"close-secs"],"closeable":[4],"closeText":[1,"close-text"],"rounded":[4],"countDownTimerId":[32]}],[1,"salla-login",{"searchIcon":[1,"search-icon"],"visible":[1540],"searchTerm":[32],"results":[32],"fetchStatus":[32],"showResult":[32]},[[8,"click","handleClick"]]],[0,"salla-search-modal",{"searchPlaceholder":[1,"search-placeholder"],"searchTerm":[32],"results":[32],"fetchStatus":[32],"showResult":[32],"showModal":[32]}]]],["salla-modal",[[6,"salla-modal",{"modalTitle":[1,"modal-title"],"cancelText":[1,"cancel-text"],"saveText":[1,"save-text"],"visible":[1540],"modalHeader":[516,"modal-header"]}]]]], options);
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as a,H as e,g as i}from"./p-e1773073.js";const l=class{constructor(e){s(this,e),this.closed=t(this,"closed",7),this.autoClose=!0,this.closeSecs=3,this.closeable=!0,this.closeText="╳",this.rounded=!1,this.countDownTimerId=null,this.close=()=>{this.closed.emit(!0),this.el.remove()},this.renderCloseText=()=>this.closeable?a("span",{class:"alert__close-text",onClick:this.close},this.closeText):null}componentWillLoad(){this.el.attributes["auto-close"]&&(this.countDownTimerId=window.setTimeout((()=>{this.close()}),1e3*this.closeSecs))}disconnectedCallback(){this.autoClose&&window.clearInterval(this.countDownTimerId)}render(){return a(e,{class:{[this.color]:!0,rounded:this.rounded}},a("div",{class:"alert__content"},a("slot",null)),this.renderCloseText())}get el(){return i(this)}};l.style='.sc-salla-alert-h{-webkit-font-smoothing:antialiased;padding:var(--padding-top, 8px) var(--padding-right, 16px) var(--padding-bottom, 8px) var(--padding-left, 16px);min-height:var(--height, 24px);color:var(--color, #fff);background-color:var(--background-color, #327bb7);border-color:transparent;font-family:var(--font-family, "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:var(--font-size, 13px);font-weight:var(--font-weight, normal);line-height:1;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}.sc-salla-alert-h .alert__content.sc-salla-alert{display:block;height:100%;width:100%}.sc-salla-alert-h .alert__close-text.sc-salla-alert{cursor:pointer;opacity:0.7;position:absolute;top:14px;right:16px;font-size:0.8em}.sc-salla-alert-h .alert__close-text.sc-salla-alert:hover{opacity:0.85}.primary.sc-salla-alert-h{color:white;background-color:#5cd5c4}.secondary.sc-salla-alert-h{color:white;background-color:#ff7d09}.success.sc-salla-alert-h{color:white;background-color:#00c092}.warning.sc-salla-alert-h{color:white;background-color:#e8d700}.error.sc-salla-alert-h{color:white;background-color:#d0021b}.light.sc-salla-alert-h{color:black;background-color:#e5e5e5}.info.sc-salla-alert-h{color:black;background-color:#53ff5c}.dark.sc-salla-alert-h{color:white;background-color:#5d5d5d}.white.sc-salla-alert-h{color:black;background-color:white}.black.sc-salla-alert-h{color:white;background-color:black}.rounded.sc-salla-alert-h{border-radius:var(--border-radius, 4px)}';const r=class{constructor(t){s(this,t),this.fetchStatus="",this.searchIcon="Search_Icon.svg",this.visible=!1,this.handleClose=()=>{this.visible=!1}}handleClick(s){s.path.some((s=>s.className&&s.className.includes("modal-body")))||"salla-search-modal"!==s.target.localName||(this.visible=!1)}render(){return a("div",{class:this.visible?"wrapper visible":"wrapper"},a("div",{class:"modal"},a("div",{class:"modal-header"},a("h5",{class:"title"},"سجل دخول إلي الموقع"),a("button",{type:"button",class:"close","data-dismiss":"modal","aria-label":"Close",onClick:this.handleClose},a("span",{"aria-hidden":"true"},"×"))),a("div",{class:"modal-body"},a("div",{id:"showLoginMethods"},a("p",{class:"text-sm text-gray-text mb-5"},"اختر الوسيلة المناسبة"),a("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"},a("div",{class:"flex-shrink-0"},a("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},a("i",{class:"sicon-mail"}))),a("div",{class:"flex-1 min-w-0"},a("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},a("div",{class:"flex-1"},a("span",{class:"absolute inset-0","aria-hidden":"true"}),a("p",{class:"text-sm text-gray-text"},"سجل دخول"),a("h6",{class:"font-boldf"},"البريد الإلكتروني")),a("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"})))),a("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"},a("div",{class:"flex-shrink-0"},a("div",{class:"bg-primary w-12 h-12 text-lg text-white rounded-icon"},a("i",{class:"sicon-phone"}))),a("div",{class:"flex-1 min-w-0"},a("a",{href:"#",class:"focus:outline-none flex justify-between items-center"},a("div",{class:"flex-1"},a("span",{class:"absolute inset-0","aria-hidden":"true"}),a("p",{class:"text-sm text-gray-text"},"سجل دخول"),a("h6",{class:"font-boldf"},"الهاتف")),a("i",{class:"sicon-keyboard_arrow_left text-primary text-xl"}))))))))}static get assetsDirs(){return["assets"]}};r.style=".wrapper{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:#fcfcfc;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper .modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper .modal{max-width:500px}}.wrapper .modal .displayed{display:flex}.wrapper .modal .modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.visible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.hide{display:none !important}.show{display:block !important}.search-box{display:flex}.search-box input{width:100%;padding:10px;padding-inline-start:32px}.search-box button{background-color:transparent;border:0;position:absolute;padding:12px;left:12px}.results{list-style:none;padding:0;margin:0;max-height:300px;overflow-y:scroll}.results .product-img{width:50px;margin-inline-end:10px}.results a:first-child{margin-top:20px}.results a{display:flex;border-bottom:1px solid #ddd}.results a h5{margin-top:5px}";const o=class{constructor(t){s(this,t),this.fetchStatus="",this.showModal=!1,this.searchPlaceholder="Search here ...",this.handleChange=s=>{this.searchTerm=s.target.value,console.log("this.value",this.searchTerm),this.fetchStatus="loading",this.showResult=!1,this.results=[],this.searchTerm.length>2&&window.salla.search.api.search(this.searchTerm).then((s=>s)).then((s=>{console.log("response",s),this.fetchStatus="idle",this.results=s.results,this.showResult=!0,this.results.length<1&&(this.fetchStatus="error")})).catch((s=>{this.showResult=!0,this.fetchStatus="error",console.log(s)}))},this.openSearch=()=>{console.log("openSearchModal"),this.searchTerm="",this.fetchStatus="",this.results=[],this.showModal=!0,window.scrollTo(0,0),document.getElementsByTagName("html")[0].style.position="fixed",document.getElementsByTagName("html")[0].style.overflowY="scroll"},this.closeSearch=()=>{console.log("closeSearchModal"),this.searchTerm="",this.fetchStatus="",this.results=[],document.getElementsByTagName("html")[0].style.position="static",document.getElementsByTagName("html")[0].style.overflowY="auto",this.showModal=!1}}getProduct(s){var t;return a("div",{key:s.id,class:"s-search-modal-results-item"},a("div",{class:"s-search-modal-product"},a("a",{target:"_blank",href:s.url,class:"s-search-modal-product-image-container"},a("img",{class:"s-search-modal-product-image",src:s.thumb})),a("div",{class:"s-search-modal-product-details"},a("div",{class:"s-search-modal-product-title"},a("h3",{class:"s-search-modal-product-title-h3"},s.title)),a("div",{class:"s-search-modal-product-price"},a("h4",{class:"s-search-modal-product-price-h4"},null===(t=s.price)||void 0===t?void 0:t.after)))))}render(){return a(e,{class:"s-search-modal"},a("button",{type:"button",onClick:this.openSearch,class:"s-search-modal-search-button-icon"},a("i",{class:"sicon-search font-bold"})),this.showModal&&a("div",{class:"s-search-modal-container",style:{backgroundColor:"rgba(0,0,0,0.5)"}},a("div",{class:"s-search-modal-wrapper",onClick:this.closeSearch},a("div",{class:"s-search-modal-inner"},a("div",{class:"s-search-modal-search-box-container"},a("div",{class:this.showResult?"s-search-modal-search-box-inner-open":"s-search-modal-search-box-inner"},a("input",{onClick:s=>{s.stopPropagation()},class:"s-search-modal-input",type:"text",placeholder:this.searchPlaceholder,value:this.searchTerm,onInput:s=>this.handleChange(s)}),"loading"!=this.fetchStatus?a("button",{class:"s-search-modal-search-icon"},a("i",{class:"sicon-search"})):a("span",{class:"s-search-modal-spinner"},a("span",{class:"s-search-modal-spinner-loader"})))),a("div",{class:"s-search-modal-search-results"},"error"===this.fetchStatus&&a("p",{class:"s-search-modal-no-results error p-4 text-sm text-gray-text"},"لا يوجد نتائج"),this.results&&this.results.map((s=>this.getProduct(s))))))))}static get assetsDirs(){return["assets"]}};o.style="";export{l as salla_alert,r as salla_login,o as salla_search_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as l,h as o}from"./p-e1773073.js";const s=class{constructor(o){a(this,o),this.ok=l(this,"ok",7),this.cancel=l(this,"cancel",7),this.modalTitle="Modal Title",this.cancelText="Cancel",this.saveText="Save",this.visible=!1,this.modalHeader=!1,this.handleCancelClick=()=>{this.visible=!1,this.cancel.emit()},this.handleOkClick=()=>{this.visible=!1,this.ok.emit()},this.handleClose=()=>{this.visible=!1}}render(){return o("div",{class:this.visible?"wrapper visible":"wrapper"},o("div",{class:"modal"},o("div",{class:this.modalHeader?"modal-header displayed":"modal-header"},o("h5",{class:"title"},this.modalTitle),o("button",{type:"button",class:"close","data-dismiss":"modal","aria-label":"Close",onClick:this.handleClose},o("span",{"aria-hidden":"true"},"×"))),o("div",{class:"modal-body"},o("slot",null)),o("div",{class:"modal-footer"},o("button",{type:"button",class:"btn-secondary",onClick:this.handleCancelClick},this.cancelText),o("button",{type:"button",class:"btn-primary",onClick:this.handleOkClick},this.saveText))))}};s.style=".wrapper.sc-salla-modal{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.42);-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:1050}.wrapper.sc-salla-modal .modal.sc-salla-modal{font-family:Helvetica, sans-serif;font-size:14px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:90%;border:1px solid rgba(0, 0, 0, 0.2);border-radius:0.3rem}@media (min-width: 576px){.wrapper.sc-salla-modal .modal.sc-salla-modal{max-width:500px}}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal{display:none;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:0.3rem;border-top-right-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal h5.sc-salla-modal{margin:0;font-weight:normal}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal .title.sc-salla-modal{font-size:1.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;color:grey;outline:0;float:right;font-size:1.5rem;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff;opacity:0.5}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-header.sc-salla-modal button.close.sc-salla-modal .sc-salla-modal:hover{color:black;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .displayed.sc-salla-modal{display:flex}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-body.sc-salla-modal{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #dee2e6;border-bottom-right-radius:0.3rem;border-bottom-left-radius:0.3rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal{color:#fff;background-color:#007bff;border-color:#007bff;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-primary.sc-salla-modal:hover{background-color:#0069d9;border-color:#0062cc;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal{color:#fff;background-color:#6c757d;border-color:#6c757d;outline:none}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal .btn-secondary.sc-salla-modal:hover{background-color:#5a6269;border-color:#5a6269;cursor:pointer}.wrapper.sc-salla-modal .modal.sc-salla-modal .modal-footer.sc-salla-modal>.sc-salla-modal:not(:last-child){margin-right:0.25rem}.wrapper.sc-salla-modal .modal.sc-salla-modal .button-container.sc-salla-modal{text-align:right}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;line-height:1.5;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}.wrapper.sc-salla-modal .modal.sc-salla-modal button.sc-salla-modal:hover{background-color:#6c757d;border-color:#6c757d}.visible.sc-salla-modal{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}";export{s as salla_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,l,n=!1,s=!1,o=!1,i=!1;const c="undefined"!=typeof window?window:{},r=c.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,l,n)=>e.addEventListener(t,l,n),rel:(e,t,l,n)=>e.removeEventListener(t,l,n),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),$=(e,t,l)=>{l&&l.map((([l,n,s])=>{const o=y(e,l),i=d(t,s),c=h(l);f.ael(o,n,i,c),(t.o=t.o||[]).push((()=>f.rel(o,n,i,c)))}))},d=(e,t)=>l=>{try{256&e.t?e.i[t](l):(e.u=e.u||[]).push([t,l])}catch(e){oe(e)}},y=(e,t)=>8&t?c:e,h=e=>0!=(2&e),p=new WeakMap,m=e=>"sc-"+e.$,b={},w=e=>"object"==(e=typeof e)||"function"===e,k=(e,t,...l)=>{let n=null,s=null,o=null,i=!1,c=!1,r=[];const f=t=>{for(let l=0;l<t.length;l++)n=t[l],Array.isArray(n)?f(n):null!=n&&"boolean"!=typeof n&&((i="function"!=typeof e&&!w(n))&&(n+=""),i&&c?r[r.length-1].h+=n:r.push(i?S(null,n):n),c=i)};if(f(l),t){t.key&&(s=t.key),t.name&&(o=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=S(e,null);return a.p=t,r.length>0&&(a.m=r),a.k=s,a.S=o,a},S=(e,t)=>({t:0,g:e,h:t,v:null,m:null,p:null,k:null,S:null}),g={},v=(e,t,l,n,s,o)=>{if(l!==n){let i=se(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=M(l),o=M(n);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in l)n&&null!=n[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)l&&n[t]===l[t]||(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"===t);else if(i||"o"!==t[0]||"n"!==t[1]){const c=w(n);if((i||c&&null!==n)&&!s)try{if(e.tagName.includes("-"))e[t]=n;else{let s=null==n?"":n;"list"===t?i=!1:null!=l&&e[t]==s||(e[t]=s)}}catch(e){}null==n||!1===n?!1===n&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&o||s)&&!c&&e.setAttribute(t,n=!0===n?"":n)}else t="-"===t[2]?t.slice(3):se(c,r)?r.slice(2):r[2]+t.slice(3),l&&f.rel(e,t,l,!1),n&&f.ael(e,t,n,!1)}},j=/\s/,M=e=>e?e.split(j):[],C=(e,t,l,n)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.p||b,i=t.p||b;for(n in o)n in i||v(s,n,o[n],void 0,l,t.t);for(n in i)v(s,n,o[n],i[n],l,t.t)},O=(s,i,c,f)=>{let a,u,$,d=i.m[c],y=0;if(n||(o=!0,"slot"===d.g&&(e&&f.classList.add(e+"-s"),d.t|=d.m?2:1)),null!==d.h)a=d.v=r.createTextNode(d.h);else if(1&d.t)a=d.v=r.createTextNode("");else if(a=d.v=r.createElement(2&d.t?"slot-fb":d.g),C(null,d,!1),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),d.m)for(y=0;y<d.m.length;++y)u=O(s,d,y,a),u&&a.appendChild(u);return a["s-hn"]=l,3&d.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=d.S||"",$=s&&s.m&&s.m[c],$&&$.g===d.g&&s.v&&R(s.v,!1)),a},R=(e,t)=>{f.t|=1;const n=e.childNodes;for(let e=n.length-1;e>=0;e--){const s=n[e];s["s-hn"]!==l&&s["s-ol"]&&(L(s).insertBefore(s,E(s)),s["s-ol"].remove(),s["s-ol"]=void 0,o=!0),t&&R(s,t)}f.t&=-2},T=(e,t,n,s,o,i)=>{let c,r=e["s-cr"]&&e["s-cr"].parentNode||e;for(r.shadowRoot&&r.tagName===l&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=O(null,n,o,e),c&&(s[o].v=c,r.insertBefore(c,E(t))))},P=(e,t,l,n,o)=>{for(;t<=l;++t)(n=e[t])&&(s=!0,(o=n.v)["s-ol"]?o["s-ol"].remove():R(o,!0),o.remove())},x=(e,t)=>e.g===t.g&&("slot"===e.g?e.S===t.S:e.k===t.k),E=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const l=t.v=e.v,n=e.m,s=t.m,o=t.h;let i;null===o?("slot"===t.g||C(e,t,!1),null!==n&&null!==s?((e,t,l,n)=>{let s,o,i=0,c=0,r=0,f=0,a=t.length-1,u=t[0],$=t[a],d=n.length-1,y=n[0],h=n[d];for(;i<=a&&c<=d;)if(null==u)u=t[++i];else if(null==$)$=t[--a];else if(null==y)y=n[++c];else if(null==h)h=n[--d];else if(x(u,y))W(u,y),u=t[++i],y=n[++c];else if(x($,h))W($,h),$=t[--a],h=n[--d];else if(x(u,h))"slot"!==u.g&&"slot"!==h.g||R(u.v.parentNode,!1),W(u,h),e.insertBefore(u.v,$.v.nextSibling),u=t[++i],h=n[--d];else if(x($,y))"slot"!==u.g&&"slot"!==h.g||R($.v.parentNode,!1),W($,y),e.insertBefore($.v,u.v),$=t[--a],y=n[++c];else{for(r=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].k&&t[f].k===y.k){r=f;break}r>=0?(o=t[r],o.g!==y.g?s=O(t&&t[c],l,r,e):(W(o,y),t[r]=void 0,s=o.v),y=n[++c]):(s=O(t&&t[c],l,c,e),y=n[++c]),s&&L(u.v).insertBefore(s,E(u.v))}i>a?T(e,null==n[d+1]?null:n[d+1].v,l,n,c,d):c>d&&P(t,i,a)})(l,n,t,s):null!==s?(null!==e.h&&(l.textContent=""),T(l,null,t,s,0,s.length-1)):null!==n&&P(n,0,n.length-1)):(i=l["s-cr"])?i.parentNode.textContent=o:e.h!==o&&(l.data=o)},A=e=>{let t,l,n,s,o,i,c=e.childNodes;for(l=0,n=c.length;l<n;l++)if(t=c[l],1===t.nodeType){if(t["s-sr"])for(o=t["s-sn"],t.hidden=!1,s=0;s<n;s++)if(i=c[s].nodeType,c[s]["s-hn"]!==t["s-hn"]||""!==o){if(1===i&&o===c[s].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==c[s].textContent.trim()){t.hidden=!0;break}A(t)}},F=[],H=e=>{let t,l,n,o,i,c,r=0,f=e.childNodes,a=f.length;for(;r<a;r++){if(t=f[r],t["s-sr"]&&(l=t["s-cr"])&&l.parentNode)for(n=l.parentNode.childNodes,o=t["s-sn"],c=n.length-1;c>=0;c--)l=n[c],l["s-cn"]||l["s-nr"]||l["s-hn"]===t["s-hn"]||(N(l,o)?(i=F.find((e=>e.j===l)),s=!0,l["s-sn"]=l["s-sn"]||o,i?i.M=t:F.push({M:t,j:l}),l["s-sr"]&&F.map((e=>{N(e.j,l["s-sn"])&&(i=F.find((e=>e.j===l)),i&&!e.M&&(e.M=i.M))}))):F.some((e=>e.j===l))||F.push({j:l}));1===t.nodeType&&H(t)}},N=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>te(e).C,q=(e,t,l)=>{const n=U(e);return{emit:e=>V(n,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},V=(e,t,l)=>{const n=f.ce(t,l);return e.dispatchEvent(n),n},_=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},z=(e,t)=>{if(e.t|=16,!(4&e.t))return _(e,e.R),he((()=>B(e,t)));e.t|=512},B=(e,t)=>{const l=e.i;let n;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>K(l,e,t))),e.u=null),n=K(l,"componentWillLoad")),Q(n,(()=>D(e,l,t)))},D=async(e,t,l)=>{const n=e.C,s=n["s-rc"];l&&(e=>{const t=e.T,l=e.C,n=t.t,s=((e,t)=>{let l=m(t),n=re.get(l);if(e=11===e.nodeType?e:r,n)if("string"==typeof n){let t,s=p.get(e=e.head||e);s||p.set(e,s=new Set),s.has(l)||(t=r.createElement("style"),t.innerHTML=n,e.insertBefore(t,e.querySelector("link")),s&&s.add(l))}else e.adoptedStyleSheets.includes(n)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]);return l})(l.shadowRoot?l.shadowRoot:l.getRootNode(),t);10&n&&(l["s-sc"]=s,l.classList.add(s+"-h"),2&n&&l.classList.add(s+"-s"))})(e);G(e,t),s&&(s.map((e=>e())),n["s-rc"]=void 0);{const t=n["s-p"],l=()=>I(e);0===t.length?l():(Promise.all(t).then(l),e.t|=4,t.length=0)}},G=(i,c)=>{try{c=c.render(),i.t&=-17,i.t|=2,((i,c)=>{const a=i.C,u=i.T,$=i.P||S(null,null),d=(e=>e&&e.g===g)(c)?c:k(null,null,c);if(l=a.tagName,u.L&&(d.p=d.p||{},u.L.map((([e,t])=>d.p[t]=a[e]))),d.g=null,d.t|=4,i.P=d,d.v=$.v=a.shadowRoot||a,e=a["s-sc"],t=a["s-cr"],n=0!=(1&u.t),s=!1,W($,d),f.t|=1,o){let e,t,l,n,s,o;H(d.v);let i=0;for(;i<F.length;i++)e=F[i],t=e.j,t["s-ol"]||(l=r.createTextNode(""),l["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=l,t));for(i=0;i<F.length;i++)if(e=F[i],t=e.j,e.M){for(n=e.M.parentNode,s=e.M.nextSibling,l=t["s-ol"];l=l.previousSibling;)if(o=l["s-nr"],o&&o["s-sn"]===t["s-sn"]&&n===o.parentNode&&(o=o.nextSibling,!o||!o["s-nr"])){s=o;break}(!s&&n!==t.parentNode||t.nextSibling!==s)&&t!==s&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,s))}else 1===t.nodeType&&(t.hidden=!0)}s&&A(d.v),f.t&=-2,F.length=0})(i,c)}catch(e){oe(e,i.C)}return null},I=e=>{const t=e.C,l=e.R;64&e.t||(e.t|=64,X(t),e.W(t),l||J()),e.O&&(e.O(),e.O=void 0),512&e.t&&ye((()=>z(e,!1))),e.t&=-517},J=()=>{X(r.documentElement),ye((()=>V(c,"appload",{detail:{namespace:"twilight-components"}})))},K=(e,t,l)=>{if(e&&e[t])try{return e[t](l)}catch(e){oe(e)}},Q=(e,t)=>e&&e.then?e.then(t):t(),X=e=>e.classList.add("hydrated"),Y=(e,t,l)=>{if(t.A){const n=Object.entries(t.A),s=e.prototype;if(n.map((([e,[n]])=>{(31&n||2&l&&32&n)&&Object.defineProperty(s,e,{get(){return((e,t)=>te(this).F.get(t))(0,e)},set(l){((e,t,l,n)=>{const s=te(e),o=s.F.get(t),i=s.t,c=s.i;l=((e,t)=>null==e||w(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,n.A[t][0]),8&i&&void 0!==o||l===o||(s.F.set(t,l),c&&2==(18&i)&&z(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;s.attributeChangedCallback=function(e,t,n){f.jmp((()=>{const t=l.get(e);this.hasOwnProperty(t)&&(n=this[t],delete this[t]),this[t]=(null!==n||"boolean"!=typeof this[t])&&n}))},e.observedAttributes=n.filter((([e,t])=>15&t[0])).map((([e,n])=>{const s=n[1]||e;return l.set(s,e),512&n[0]&&t.L.push([e,s]),s}))}}return e},Z=(e,t={})=>{const l=[],n=t.exclude||[],s=c.customElements,o=r.head,i=o.querySelector("meta[charset]"),a=r.createElement("style"),d=[];let y,h=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",r.baseURI).href,e.map((e=>e[1].map((t=>{const o={t:t[0],$:t[1],A:t[2],H:t[3]};o.A=t[2],o.H=t[3],o.L=[];const i=o.$,c=class extends HTMLElement{constructor(e){super(e),ne(e=this,o),1&o.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),h?d.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=te(e),l=t.T,n=()=>{};if(1&t.t)$(e,t,l.H);else{t.t|=1,12&l.t&&(e=>{const t=e["s-cr"]=r.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let l=e;for(;l=l.parentNode||l.host;)if(l["s-p"]){_(t,t.R=l);break}}l.A&&Object.entries(l.A).map((([t,[l]])=>{if(31&l&&e.hasOwnProperty(t)){const l=e[t];delete e[t],e[t]=l}})),(async(e,t,l,n,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=ce(l)).then){const e=()=>{};s=await s,e()}s.isProxied||(Y(s,l,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){oe(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=m(l);if(!re.has(t)){const n=()=>{};((e,t,l)=>{let n=re.get(e);u&&l?(n=n||new CSSStyleSheet,n.replace(t)):n=t,re.set(e,n)})(t,e,!!(1&l.t)),n()}}}const o=t.R,i=()=>z(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,l)}n()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{if(0==(1&f.t)){const e=te(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return te(this).N}};o.U=e[0],n.includes(i)||s.get(i)||(l.push(i),s.define(i,Y(c,o,1)))})))),a.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.setAttribute("data-styles",""),o.insertBefore(a,i?i.nextSibling:o.firstChild),h=!1,d.length?d.map((e=>e.connectedCallback())):f.jmp((()=>y=setTimeout(J,30)))},ee=new WeakMap,te=e=>ee.get(e),le=(e,t)=>ee.set(t.i=e,t),ne=(e,t)=>{const l={t:0,C:e,T:t,F:new Map};return l.N=new Promise((e=>l.W=e)),e["s-p"]=[],e["s-rc"]=[],$(e,l,t.H),ee.set(e,l)},se=(e,t)=>t in e,oe=(e,t)=>(0,console.error)(e,t),ie=new Map,ce=e=>{const t=e.$.replace(/-/g,"_"),l=e.U,n=ie.get(l);return n?n[t]:import(`./${l}.entry.js`).then((e=>(ie.set(l,e),e[t])),oe)},re=new Map,fe=[],ae=[],ue=(e,t)=>l=>{e.push(l),i||(i=!0,t&&4&f.t?ye(de):f.raf(de))},$e=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){oe(e)}e.length=0},de=()=>{$e(fe),$e(ae),(i=fe.length>0)&&f.raf(de)},ye=e=>a().then(e),he=ue(ae,!0);export{g as H,Z as b,q as c,U as g,k as h,a as p,le as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,b as l}from"./p-e1773073.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l([["p-58168e3c",[[6,"salla-alert",{color:[1],autoClose:[4,"auto-close"],closeSecs:[2,"close-secs"],closeable:[4],closeText:[1,"close-text"],rounded:[4],countDownTimerId:[32]}],[1,"salla-login",{searchIcon:[1,"search-icon"],visible:[1540],searchTerm:[32],results:[32],fetchStatus:[32],showResult:[32]},[[8,"click","handleClick"]]],[0,"salla-search-modal",{searchPlaceholder:[1,"search-placeholder"],searchTerm:[32],results:[32],fetchStatus:[32],showResult:[32],showModal:[32]}]]],["p-a2a8cae2",[[6,"salla-modal",{modalTitle:[1,"modal-title"],cancelText:[1,"cancel-text"],saveText:[1,"save-text"],visible:[1540],modalHeader:[516,"modal-header"]}]]]],e)));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class Alert {
|
|
3
|
+
/**
|
|
4
|
+
* The color options are: `"primary"`, `"secondary"`, `"success"`, `"warning"`, `"error"`, `"light"`, `"info"`, `"white"`, `"black"`, and `"dark"`.
|
|
5
|
+
*/
|
|
6
|
+
color?: string;
|
|
7
|
+
/**
|
|
8
|
+
* If `true` alert will close automatically.
|
|
9
|
+
*/
|
|
10
|
+
autoClose: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Number of seconds to close alert automatically if autoClose `true`.
|
|
13
|
+
*/
|
|
14
|
+
closeSecs: number;
|
|
15
|
+
/**
|
|
16
|
+
* If closable or not.
|
|
17
|
+
*/
|
|
18
|
+
closeable: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Customized close button text.
|
|
21
|
+
*/
|
|
22
|
+
closeText?: string;
|
|
23
|
+
/**
|
|
24
|
+
* If `true`, make the alert rounded.
|
|
25
|
+
*/
|
|
26
|
+
rounded?: boolean;
|
|
27
|
+
countDownTimerId: any;
|
|
28
|
+
el: HTMLSallaAlertElement;
|
|
29
|
+
private close;
|
|
30
|
+
/**
|
|
31
|
+
* Emitted when the alert is closed.
|
|
32
|
+
*/
|
|
33
|
+
closed: EventEmitter;
|
|
34
|
+
private renderCloseText;
|
|
35
|
+
componentWillLoad(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
37
|
+
render(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare class Modal {
|
|
2
|
+
private ok;
|
|
3
|
+
private cancel;
|
|
4
|
+
/**
|
|
5
|
+
* The title to display in the modal.
|
|
6
|
+
*/
|
|
7
|
+
modalTitle: string;
|
|
8
|
+
/**
|
|
9
|
+
* The text to display in the cancel button.
|
|
10
|
+
*/
|
|
11
|
+
cancelText: string;
|
|
12
|
+
/**
|
|
13
|
+
* The text to display in the save button.
|
|
14
|
+
*/
|
|
15
|
+
saveText: string;
|
|
16
|
+
/**
|
|
17
|
+
* If 'true' will make the modal visible.
|
|
18
|
+
*/
|
|
19
|
+
visible: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* If 'true' will show the modal header.
|
|
22
|
+
*/
|
|
23
|
+
modalHeader: boolean;
|
|
24
|
+
private handleCancelClick;
|
|
25
|
+
private handleOkClick;
|
|
26
|
+
private handleClose;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class SallaLogin {
|
|
2
|
+
searchTerm: string;
|
|
3
|
+
results: string[];
|
|
4
|
+
fetchStatus: string;
|
|
5
|
+
showResult: boolean;
|
|
6
|
+
searchIcon: string;
|
|
7
|
+
/**
|
|
8
|
+
* If 'true' will make the modal visible.
|
|
9
|
+
*/
|
|
10
|
+
visible: boolean;
|
|
11
|
+
handleClick(ev: any): void;
|
|
12
|
+
private handleClose;
|
|
13
|
+
render(): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
salla: any;
|
|
4
|
+
taha: string;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class SearchModal {
|
|
8
|
+
searchTerm: string;
|
|
9
|
+
results: string[];
|
|
10
|
+
fetchStatus: string;
|
|
11
|
+
showResult: boolean;
|
|
12
|
+
showModal: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The text to overwrite search placeholder.
|
|
15
|
+
*/
|
|
16
|
+
searchPlaceholder: string;
|
|
17
|
+
private handleChange;
|
|
18
|
+
private getProduct;
|
|
19
|
+
private openSearch;
|
|
20
|
+
private closeSearch;
|
|
21
|
+
render(): any;
|
|
22
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
export namespace Components {
|
|
9
|
+
interface SallaAlert {
|
|
10
|
+
/**
|
|
11
|
+
* If `true` alert will close automatically.
|
|
12
|
+
*/
|
|
13
|
+
"autoClose": boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Number of seconds to close alert automatically if autoClose `true`.
|
|
16
|
+
*/
|
|
17
|
+
"closeSecs": number;
|
|
18
|
+
/**
|
|
19
|
+
* Customized close button text.
|
|
20
|
+
*/
|
|
21
|
+
"closeText"?: string;
|
|
22
|
+
/**
|
|
23
|
+
* If closable or not.
|
|
24
|
+
*/
|
|
25
|
+
"closeable": boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The color options are: `"primary"`, `"secondary"`, `"success"`, `"warning"`, `"error"`, `"light"`, `"info"`, `"white"`, `"black"`, and `"dark"`.
|
|
28
|
+
*/
|
|
29
|
+
"color"?: string;
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, make the alert rounded.
|
|
32
|
+
*/
|
|
33
|
+
"rounded"?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface SallaLogin {
|
|
36
|
+
"searchIcon": string;
|
|
37
|
+
/**
|
|
38
|
+
* If 'true' will make the modal visible.
|
|
39
|
+
*/
|
|
40
|
+
"visible": boolean;
|
|
41
|
+
}
|
|
42
|
+
interface SallaModal {
|
|
43
|
+
/**
|
|
44
|
+
* The text to display in the cancel button.
|
|
45
|
+
*/
|
|
46
|
+
"cancelText": string;
|
|
47
|
+
/**
|
|
48
|
+
* If 'true' will show the modal header.
|
|
49
|
+
*/
|
|
50
|
+
"modalHeader": boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The title to display in the modal.
|
|
53
|
+
*/
|
|
54
|
+
"modalTitle": string;
|
|
55
|
+
/**
|
|
56
|
+
* The text to display in the save button.
|
|
57
|
+
*/
|
|
58
|
+
"saveText": string;
|
|
59
|
+
/**
|
|
60
|
+
* If 'true' will make the modal visible.
|
|
61
|
+
*/
|
|
62
|
+
"visible": boolean;
|
|
63
|
+
}
|
|
64
|
+
interface SallaSearchModal {
|
|
65
|
+
/**
|
|
66
|
+
* The text to overwrite search placeholder.
|
|
67
|
+
*/
|
|
68
|
+
"searchPlaceholder": string;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
declare global {
|
|
72
|
+
interface HTMLSallaAlertElement extends Components.SallaAlert, HTMLStencilElement {
|
|
73
|
+
}
|
|
74
|
+
var HTMLSallaAlertElement: {
|
|
75
|
+
prototype: HTMLSallaAlertElement;
|
|
76
|
+
new (): HTMLSallaAlertElement;
|
|
77
|
+
};
|
|
78
|
+
interface HTMLSallaLoginElement extends Components.SallaLogin, HTMLStencilElement {
|
|
79
|
+
}
|
|
80
|
+
var HTMLSallaLoginElement: {
|
|
81
|
+
prototype: HTMLSallaLoginElement;
|
|
82
|
+
new (): HTMLSallaLoginElement;
|
|
83
|
+
};
|
|
84
|
+
interface HTMLSallaModalElement extends Components.SallaModal, HTMLStencilElement {
|
|
85
|
+
}
|
|
86
|
+
var HTMLSallaModalElement: {
|
|
87
|
+
prototype: HTMLSallaModalElement;
|
|
88
|
+
new (): HTMLSallaModalElement;
|
|
89
|
+
};
|
|
90
|
+
interface HTMLSallaSearchModalElement extends Components.SallaSearchModal, HTMLStencilElement {
|
|
91
|
+
}
|
|
92
|
+
var HTMLSallaSearchModalElement: {
|
|
93
|
+
prototype: HTMLSallaSearchModalElement;
|
|
94
|
+
new (): HTMLSallaSearchModalElement;
|
|
95
|
+
};
|
|
96
|
+
interface HTMLElementTagNameMap {
|
|
97
|
+
"salla-alert": HTMLSallaAlertElement;
|
|
98
|
+
"salla-login": HTMLSallaLoginElement;
|
|
99
|
+
"salla-modal": HTMLSallaModalElement;
|
|
100
|
+
"salla-search-modal": HTMLSallaSearchModalElement;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
declare namespace LocalJSX {
|
|
104
|
+
interface SallaAlert {
|
|
105
|
+
/**
|
|
106
|
+
* If `true` alert will close automatically.
|
|
107
|
+
*/
|
|
108
|
+
"autoClose"?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Number of seconds to close alert automatically if autoClose `true`.
|
|
111
|
+
*/
|
|
112
|
+
"closeSecs"?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Customized close button text.
|
|
115
|
+
*/
|
|
116
|
+
"closeText"?: string;
|
|
117
|
+
/**
|
|
118
|
+
* If closable or not.
|
|
119
|
+
*/
|
|
120
|
+
"closeable"?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* The color options are: `"primary"`, `"secondary"`, `"success"`, `"warning"`, `"error"`, `"light"`, `"info"`, `"white"`, `"black"`, and `"dark"`.
|
|
123
|
+
*/
|
|
124
|
+
"color"?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Emitted when the alert is closed.
|
|
127
|
+
*/
|
|
128
|
+
"onClosed"?: (event: CustomEvent<any>) => void;
|
|
129
|
+
/**
|
|
130
|
+
* If `true`, make the alert rounded.
|
|
131
|
+
*/
|
|
132
|
+
"rounded"?: boolean;
|
|
133
|
+
}
|
|
134
|
+
interface SallaLogin {
|
|
135
|
+
"searchIcon"?: string;
|
|
136
|
+
/**
|
|
137
|
+
* If 'true' will make the modal visible.
|
|
138
|
+
*/
|
|
139
|
+
"visible"?: boolean;
|
|
140
|
+
}
|
|
141
|
+
interface SallaModal {
|
|
142
|
+
/**
|
|
143
|
+
* The text to display in the cancel button.
|
|
144
|
+
*/
|
|
145
|
+
"cancelText"?: string;
|
|
146
|
+
/**
|
|
147
|
+
* If 'true' will show the modal header.
|
|
148
|
+
*/
|
|
149
|
+
"modalHeader"?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* The title to display in the modal.
|
|
152
|
+
*/
|
|
153
|
+
"modalTitle"?: string;
|
|
154
|
+
"onCancel"?: (event: CustomEvent<any>) => void;
|
|
155
|
+
"onOk"?: (event: CustomEvent<any>) => void;
|
|
156
|
+
/**
|
|
157
|
+
* The text to display in the save button.
|
|
158
|
+
*/
|
|
159
|
+
"saveText"?: string;
|
|
160
|
+
/**
|
|
161
|
+
* If 'true' will make the modal visible.
|
|
162
|
+
*/
|
|
163
|
+
"visible"?: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface SallaSearchModal {
|
|
166
|
+
/**
|
|
167
|
+
* The text to overwrite search placeholder.
|
|
168
|
+
*/
|
|
169
|
+
"searchPlaceholder"?: string;
|
|
170
|
+
}
|
|
171
|
+
interface IntrinsicElements {
|
|
172
|
+
"salla-alert": SallaAlert;
|
|
173
|
+
"salla-login": SallaLogin;
|
|
174
|
+
"salla-modal": SallaModal;
|
|
175
|
+
"salla-search-modal": SallaSearchModal;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export { LocalJSX as JSX };
|
|
179
|
+
declare module "@stencil/core" {
|
|
180
|
+
export namespace JSX {
|
|
181
|
+
interface IntrinsicElements {
|
|
182
|
+
"salla-alert": LocalJSX.SallaAlert & JSXBase.HTMLAttributes<HTMLSallaAlertElement>;
|
|
183
|
+
"salla-login": LocalJSX.SallaLogin & JSXBase.HTMLAttributes<HTMLSallaLoginElement>;
|
|
184
|
+
"salla-modal": LocalJSX.SallaModal & JSXBase.HTMLAttributes<HTMLSallaModalElement>;
|
|
185
|
+
"salla-search-modal": LocalJSX.SallaSearchModal & JSXBase.HTMLAttributes<HTMLSallaSearchModalElement>;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Color = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Ratio = '1x1' | '5x4' | '5x3' | '3x2' | '16x9' | '2x1' | '3x1';
|