@salla.sa/twilight-components 1.0.57 → 1.0.58
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-button.cjs.entry.js +7 -7
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +76 -0
- package/dist/cjs/salla-quantity-input.cjs.entry.js +64 -0
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/salla-button/salla-button.js +10 -10
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.css +3 -0
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +82 -0
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.css +3 -0
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +71 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button.entry.js +7 -7
- package/dist/esm/salla-conditional-fields.entry.js +72 -0
- package/dist/esm/salla-quantity-input.entry.js +60 -0
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/p-40693cd3.entry.js +1 -0
- package/dist/twilight-components/p-5d5b04ec.entry.js +1 -0
- package/dist/twilight-components/p-6c928c14.entry.js +1 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-button/salla-button.d.ts +2 -2
- package/dist/types/components/salla-conditional-fields/salla-conditional-fields.d.ts +9 -0
- package/dist/types/components/salla-quantity-input/salla-quantity-input.d.ts +18 -0
- package/dist/types/components.d.ts +34 -8
- package/example/dist/tailwind.css +944 -326
- package/example/dist/twilight.js +1 -1
- package/example/index.html +523 -123
- package/package.json +1 -1
- package/dist/twilight-components/p-646fbb7f.entry.js +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-8b97d225.js';
|
|
2
|
+
|
|
3
|
+
const sallaQuantityInputCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const SallaQuantityInput = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.hostAttributes = {};
|
|
9
|
+
this.hasIncrementSlot = false;
|
|
10
|
+
this.hasDecrementSlot = false;
|
|
11
|
+
this.quantity = 1;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Workaround to fire change event for the input.
|
|
15
|
+
*/
|
|
16
|
+
watchPropHandler() {
|
|
17
|
+
salla.helpers.debounce(() => salla.document.event.fireEvent(this.textInput, 'change', { 'bubbles': true }))();
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.hasIncrementSlot = !!this.host.querySelector('[slot="increment-button"]');
|
|
21
|
+
this.hasDecrementSlot = !!this.host.querySelector('[slot="decrement-button"]');
|
|
22
|
+
}
|
|
23
|
+
// border-border-color
|
|
24
|
+
// transtion transition-color duration-300
|
|
25
|
+
componentdidLoad() {
|
|
26
|
+
this.quantity = parseInt(this.host.getAttribute('value')) || 1;
|
|
27
|
+
//app.on('input', '[name="quantity"]', event => salla.helpers.inputDigitsOnly(event.target));
|
|
28
|
+
}
|
|
29
|
+
getInputAttributes() {
|
|
30
|
+
for (let i = 0; i < this.host.attributes.length; i++) {
|
|
31
|
+
if (!['id', 'value', 'min', 'class'].includes(this.host.attributes[i].name)) {
|
|
32
|
+
this.hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return this.hostAttributes;
|
|
36
|
+
}
|
|
37
|
+
decrement() {
|
|
38
|
+
if (this.quantity <= 1) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.quantity--;
|
|
42
|
+
}
|
|
43
|
+
increment() {
|
|
44
|
+
let maxQuantity = parseInt(this.host.getAttribute('max'));
|
|
45
|
+
if (maxQuantity && this.quantity >= maxQuantity) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this.quantity++;
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
return (h(Host, { class: "s-quantity-input s-quantity-input-container" }, h("button", { onClick: () => this.increment(), class: "s-quantity-input-button", type: "button" }, !this.hasIncrementSlot ? h("i", { class: "sicon-add" }) : '', h("slot", { name: "increment-button" })), h("input", Object.assign({ class: "s-quantity-input-input" }, this.getInputAttributes(), { min: "1", value: this.quantity, ref: (el) => this.textInput = el })), h("button", { class: "s-quantity-input-button", onClick: () => this.decrement(), type: "button" }, !this.hasDecrementSlot ? h("i", { class: "sicon-minus" }) : '', h("slot", { name: "decrement-button" }))));
|
|
52
|
+
}
|
|
53
|
+
get host() { return getElement(this); }
|
|
54
|
+
static get watchers() { return {
|
|
55
|
+
"quantity": ["watchPropHandler"]
|
|
56
|
+
}; }
|
|
57
|
+
};
|
|
58
|
+
SallaQuantityInput.style = sallaQuantityInputCss;
|
|
59
|
+
|
|
60
|
+
export { SallaQuantityInput as salla_quantity_input };
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["salla-button",[[4,"salla-button",{"
|
|
16
|
+
return bootstrapLazy([["salla-button",[[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-modal_2",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability",[[4,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"show":[64],"showOffer":[64]}]]],["salla-rating-modal",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-conditional-fields",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-quantity-input",[[4,"salla-quantity-input",{"quantity":[32]}]]],["salla-verify-modal",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-tel-input",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"countryKey":[1025,"country-key"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}]]]], options);
|
|
17
17
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as o,g as n}from"./p-cb1c59a2.js";const e=class{constructor(s){t(this,s),this.hostAttributes={},this.shape="btn",this.color="primary",this.fill="solid",this.size="medium",this.width="normal",this.loading=!1,this.disabled=!1,this.loaderPosition="after",this.wide=!1,this.wide&&this.host.classList.add("s-button-wide")}async load(){return"center"==this.loaderPosition&&this.text.classList.add("s-button-hide"),this.host.setAttribute("loading",""),this.host}async stop(){return this.host.removeAttribute("loading"),"center"==this.loaderPosition&&this.text.classList.remove("s-button-hide"),this.host}async setText(t){return this.text.innerHTML=t,this.host}async disable(){return this.host.setAttribute("disabled",""),this.host}async enable(){return this.host.removeAttribute("disabled"),this.host}getBtnAttributes(){for(let t=0;t<this.host.attributes.length;t++)["color","fill","size","width","id","loading"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes.type=this.hostAttributes.type||"button",this.hostAttributes.class+=" s-button-element s-button-"+this.shape+" s-button-"+("none"==this.fill?"fill-none":this.fill)+("medium"!=this.size?" s-button-"+this.size:"")+("normal"!=this.width?" s-button-"+this.width:"")+("link"==this.shape?" s-button-"+this.color+"-link":"")+("link"!=this.shape&&"outline"!=this.fill?" s-button-"+this.color:"")+("outline"==this.fill?" s-button-"+this.color+"-outline":"")+(this.disabled?" s-button-disabled ":"")+("icon"==this.shape?" s-button-loader-center":" s-button-loader-"+this.loaderPosition),this.hostAttributes}render(){return s(o,{class:"s-button-wrap"},s("button",Object.assign({},this.getBtnAttributes(),{disabled:this.disabled}),s("span",{class:"s-button-text",ref:t=>this.text=t},s("slot",null)),this.loading?s("span",{class:"s-button-loader"}):""))}get host(){return n(this)}};e.style="salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-right:40px}.s-button-wrap .s-button-loader-start .s-button-loader{position:absolute;right:8px}.s-button-wrap .s-button-loader-start .s-button-loader [dir=ltr]{left:8px;right:auto}.s-button-wrap .s-button-loader-end.s-button-element{padding-left:40px}.s-button-wrap .s-button-loader-end .s-button-loader{position:absolute;left:8px}.s-button-wrap .s-button-loader-end .s-button-loader [dir=ltr]{right:8px;left:auto}.s-button-wrap .s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin:0 !important}";export{e as salla_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as l,g as a}from"./p-cb1c59a2.js";const n=class{constructor(t){e(this,t)}changeHandler(e){if(salla.log("Received the change event: ",e),!["SELECT"].includes(e.target.tagName)&&!["checkbox"].includes(e.target.getAttribute("type")))return void salla.log("Ignore the change because is not support input: "+e.target.tagName);let t=e.target.name.replace("[]",""),l="checkbox"===e.target.getAttribute("type");salla.log("Trying to find all the element with condation:",`[data-show-when^="${t}"]`),this.host.querySelectorAll(`[data-show-when^="${t}"]`).forEach((t=>{let a=!(null==t?void 0:t.dataset.showWhen.includes("!=")),n=null==t?void 0:t.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim(),i=!1;i=l?Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>null==e?void 0:e.value)).includes(n.toString()):n===e.target.value,salla.log("The input is ",l?"Multiple":"Single"," value:",i),a&&i||!a&&!i?(t.classList.remove("hidden"),t.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled"),!["checkbox"].includes(e.getAttribute("type"))&&t.getElementsByClassName("required").length&&e.setAttribute("required","")}))):(t.classList.add("hidden"),t.querySelectorAll("[name]").forEach((e=>{e.setAttribute("disabled",""),e.removeAttribute("required"),["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")&&(e.checked=!1)})))}))}render(){return t(l,null,t("slot",null))}get host(){return a(this)}};n.style=":host{display:block}";export{n as salla_conditional_fields}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,g as n}from"./p-cb1c59a2.js";const e=class{constructor(s){t(this,s),this.hostAttributes={},this.hasIncrementSlot=!1,this.hasDecrementSlot=!1,this.quantity=1}watchPropHandler(){salla.helpers.debounce((()=>salla.document.event.fireEvent(this.textInput,"change",{bubbles:!0})))()}componentWillLoad(){this.hasIncrementSlot=!!this.host.querySelector('[slot="increment-button"]'),this.hasDecrementSlot=!!this.host.querySelector('[slot="decrement-button"]')}componentdidLoad(){this.quantity=parseInt(this.host.getAttribute("value"))||1}getInputAttributes(){for(let t=0;t<this.host.attributes.length;t++)["id","value","min","class"].includes(this.host.attributes[t].name)||(this.hostAttributes[this.host.attributes[t].name]=this.host.attributes[t].value);return this.hostAttributes}decrement(){this.quantity<=1||this.quantity--}increment(){let t=parseInt(this.host.getAttribute("max"));t&&this.quantity>=t||this.quantity++}render(){return s(i,{class:"s-quantity-input s-quantity-input-container"},s("button",{onClick:()=>this.increment(),class:"s-quantity-input-button",type:"button"},this.hasIncrementSlot?"":s("i",{class:"sicon-add"}),s("slot",{name:"increment-button"})),s("input",Object.assign({class:"s-quantity-input-input"},this.getInputAttributes(),{min:"1",value:this.quantity,ref:t=>this.textInput=t})),s("button",{class:"s-quantity-input-button",onClick:()=>this.decrement(),type:"button"},this.hasDecrementSlot?"":s("i",{class:"sicon-minus"}),s("slot",{name:"decrement-button"})))}get host(){return n(this)}static get watchers(){return{quantity:["watchPropHandler"]}}};e.style=":host{display:block}";export{e as salla_quantity_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as l}from"./p-cb1c59a2.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l([["p-40693cd3",[[4,"salla-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],wide:[4],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}]]],["p-64977eab",[[0,"salla-search",{inline:[4],oval:[4],height:[2],results:[32],placeholder:[32],noResultsText:[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],isLoading:[1540,"is-loading"],subTitleFirst:[4,"sub-title-first"],noPadding:[4,"no-padding"],subTitle:[1,"sub-title"],icon:[1],iconStyle:[1,"icon-style"],imageIcon:[1,"image-icon"],title:[32],show:[64],hide:[64],setTitle:[64],loading:[64],stopLoading:[64]}]]],["p-7c4ba872",[[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],title:[32],loginTypeTitle:[32],loginText:[32],smsLabel:[32],mobileLabel:[32],emailLabel:[32],enterText:[32],bySMSText:[32],byEmailText:[32],emailErrorMsg:[32],firstNameLabel:[32],lastNameLabel:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],show:[64]},[[0,"verified","onVerified"]]]]],["p-2f3f4cce",[[4,"salla-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],subTitle:[32],mobileLabel:[32],emailLabel:[32],emailPlaceholder:[32],subscribedMessage:[32],title_:[32],emailErrorMsg:[32],isVisitorSubscribed:[32]}]]],["p-2a032b88",[[4,"salla-branches",{position:[1],displayAs:[1,"display-as"],browseProductsFrom:[1,"browse-products-from"],branches:[16],current:[1026],open:[32],selected:[32],isOpenedBefore:[32],show:[64],hide:[64]}]]],["p-c51984d6",[[0,"salla-localization-modal",{language:[1537],currency:[1537],languages:[32],currencies:[32],languagesTitle:[32],currenciesTitle:[32],isLoading:[32],show:[64],hide:[64],submit:[64]}]]],["p-84936d9d",[[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],offer_expires_in:[32],remember_my_choice:[32],add_to_cart:[32],out_of_stock:[32],show:[64],showOffer:[64]}]]],["p-ee9d8563",[[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],show:[64],hide:[64]}]]],["p-5d5b04ec",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-884a80ca",[[4,"salla-infinite-scroll",{nextPage:[1,"next-page"],nextPageAutoload:[1028,"next-page-autoload"],container:[1],item:[1],loadMore:[32],noMore:[32],failedToLoad:[32]}]]],["p-6c928c14",[[4,"salla-quantity-input",{quantity:[32]}]]],["p-635c08a7",[[4,"salla-verify-modal",{withoutModal:[4,"without-modal"],url:[513],by:[1],autoReload:[4,"auto-reload"],title:[32],getCode:[64],show:[64]}]]],["p-79ab1ed9",[[0,"salla-tel-input",{mobile:[1025],countryCode:[1025,"country-code"],countryKey:[1025,"country-key"],mobileRequired:[32],countryCodeLabel:[32],mobileLabel:[32],tooShort:[32],tooLong:[32],invalidCountryCode:[32],invalidNumber:[32],errorMap:[32],getValues:[64],isValid:[64]}]]]],e)));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* its to easy to use, currenlty its support select & checkbox input as trigger for show/hide the dom
|
|
3
|
+
* the dom you can put it like this data-show-when="{name of the field} {= or !=} {value of the field}"
|
|
4
|
+
*/
|
|
5
|
+
export declare class SallaConditionalFields {
|
|
6
|
+
host: HTMLElement;
|
|
7
|
+
changeHandler(event: any): void;
|
|
8
|
+
render(): any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class SallaQuantityInput {
|
|
2
|
+
host: HTMLElement;
|
|
3
|
+
private hostAttributes;
|
|
4
|
+
private hasIncrementSlot;
|
|
5
|
+
private hasDecrementSlot;
|
|
6
|
+
private textInput;
|
|
7
|
+
quantity: number;
|
|
8
|
+
/**
|
|
9
|
+
* Workaround to fire change event for the input.
|
|
10
|
+
*/
|
|
11
|
+
watchPropHandler(): void;
|
|
12
|
+
componentWillLoad(): void;
|
|
13
|
+
componentdidLoad(): void;
|
|
14
|
+
private getInputAttributes;
|
|
15
|
+
decrement(): void;
|
|
16
|
+
increment(): void;
|
|
17
|
+
render(): any;
|
|
18
|
+
}
|
|
@@ -16,10 +16,6 @@ export namespace Components {
|
|
|
16
16
|
"show": () => Promise<HTMLElement>;
|
|
17
17
|
}
|
|
18
18
|
interface SallaButton {
|
|
19
|
-
/**
|
|
20
|
-
* Button Type
|
|
21
|
-
*/
|
|
22
|
-
"buttonType": 'link' | 'icon' | 'btn';
|
|
23
19
|
/**
|
|
24
20
|
* Button Color
|
|
25
21
|
*/
|
|
@@ -61,6 +57,10 @@ export namespace Components {
|
|
|
61
57
|
* @param html
|
|
62
58
|
*/
|
|
63
59
|
"setText": (html: string) => Promise<HTMLElement>;
|
|
60
|
+
/**
|
|
61
|
+
* Button Type todo :: find better name,
|
|
62
|
+
*/
|
|
63
|
+
"shape": 'link' | 'icon' | 'btn';
|
|
64
64
|
/**
|
|
65
65
|
* Button Size
|
|
66
66
|
*/
|
|
@@ -78,6 +78,8 @@ export namespace Components {
|
|
|
78
78
|
*/
|
|
79
79
|
"width": 'wide' | 'normal';
|
|
80
80
|
}
|
|
81
|
+
interface SallaConditionalFields {
|
|
82
|
+
}
|
|
81
83
|
interface SallaInfiniteScroll {
|
|
82
84
|
/**
|
|
83
85
|
* Class selector to know the container if it's not the host `<salla-infinite-scroll>`
|
|
@@ -205,6 +207,8 @@ export namespace Components {
|
|
|
205
207
|
*/
|
|
206
208
|
"productId": number;
|
|
207
209
|
}
|
|
210
|
+
interface SallaQuantityInput {
|
|
211
|
+
}
|
|
208
212
|
interface SallaRatingModal {
|
|
209
213
|
/**
|
|
210
214
|
* Show the rating modal
|
|
@@ -287,6 +291,12 @@ declare global {
|
|
|
287
291
|
prototype: HTMLSallaButtonElement;
|
|
288
292
|
new (): HTMLSallaButtonElement;
|
|
289
293
|
};
|
|
294
|
+
interface HTMLSallaConditionalFieldsElement extends Components.SallaConditionalFields, HTMLStencilElement {
|
|
295
|
+
}
|
|
296
|
+
var HTMLSallaConditionalFieldsElement: {
|
|
297
|
+
prototype: HTMLSallaConditionalFieldsElement;
|
|
298
|
+
new (): HTMLSallaConditionalFieldsElement;
|
|
299
|
+
};
|
|
290
300
|
interface HTMLSallaInfiniteScrollElement extends Components.SallaInfiniteScroll, HTMLStencilElement {
|
|
291
301
|
}
|
|
292
302
|
var HTMLSallaInfiniteScrollElement: {
|
|
@@ -323,6 +333,12 @@ declare global {
|
|
|
323
333
|
prototype: HTMLSallaProductAvailabilityElement;
|
|
324
334
|
new (): HTMLSallaProductAvailabilityElement;
|
|
325
335
|
};
|
|
336
|
+
interface HTMLSallaQuantityInputElement extends Components.SallaQuantityInput, HTMLStencilElement {
|
|
337
|
+
}
|
|
338
|
+
var HTMLSallaQuantityInputElement: {
|
|
339
|
+
prototype: HTMLSallaQuantityInputElement;
|
|
340
|
+
new (): HTMLSallaQuantityInputElement;
|
|
341
|
+
};
|
|
326
342
|
interface HTMLSallaRatingModalElement extends Components.SallaRatingModal, HTMLStencilElement {
|
|
327
343
|
}
|
|
328
344
|
var HTMLSallaRatingModalElement: {
|
|
@@ -350,12 +366,14 @@ declare global {
|
|
|
350
366
|
interface HTMLElementTagNameMap {
|
|
351
367
|
"salla-branches": HTMLSallaBranchesElement;
|
|
352
368
|
"salla-button": HTMLSallaButtonElement;
|
|
369
|
+
"salla-conditional-fields": HTMLSallaConditionalFieldsElement;
|
|
353
370
|
"salla-infinite-scroll": HTMLSallaInfiniteScrollElement;
|
|
354
371
|
"salla-localization-modal": HTMLSallaLocalizationModalElement;
|
|
355
372
|
"salla-login-modal": HTMLSallaLoginModalElement;
|
|
356
373
|
"salla-modal": HTMLSallaModalElement;
|
|
357
374
|
"salla-offer-modal": HTMLSallaOfferModalElement;
|
|
358
375
|
"salla-product-availability": HTMLSallaProductAvailabilityElement;
|
|
376
|
+
"salla-quantity-input": HTMLSallaQuantityInputElement;
|
|
359
377
|
"salla-rating-modal": HTMLSallaRatingModalElement;
|
|
360
378
|
"salla-search": HTMLSallaSearchElement;
|
|
361
379
|
"salla-tel-input": HTMLSallaTelInputElement;
|
|
@@ -371,10 +389,6 @@ declare namespace LocalJSX {
|
|
|
371
389
|
"position"?: string;
|
|
372
390
|
}
|
|
373
391
|
interface SallaButton {
|
|
374
|
-
/**
|
|
375
|
-
* Button Type
|
|
376
|
-
*/
|
|
377
|
-
"buttonType"?: 'link' | 'icon' | 'btn';
|
|
378
392
|
/**
|
|
379
393
|
* Button Color
|
|
380
394
|
*/
|
|
@@ -399,6 +413,10 @@ declare namespace LocalJSX {
|
|
|
399
413
|
* Is the button currently loading
|
|
400
414
|
*/
|
|
401
415
|
"loading"?: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Button Type todo :: find better name,
|
|
418
|
+
*/
|
|
419
|
+
"shape"?: 'link' | 'icon' | 'btn';
|
|
402
420
|
/**
|
|
403
421
|
* Button Size
|
|
404
422
|
*/
|
|
@@ -412,6 +430,8 @@ declare namespace LocalJSX {
|
|
|
412
430
|
*/
|
|
413
431
|
"width"?: 'wide' | 'normal';
|
|
414
432
|
}
|
|
433
|
+
interface SallaConditionalFields {
|
|
434
|
+
}
|
|
415
435
|
interface SallaInfiniteScroll {
|
|
416
436
|
/**
|
|
417
437
|
* Class selector to know the container if it's not the host `<salla-infinite-scroll>`
|
|
@@ -497,6 +517,8 @@ declare namespace LocalJSX {
|
|
|
497
517
|
*/
|
|
498
518
|
"productId"?: number;
|
|
499
519
|
}
|
|
520
|
+
interface SallaQuantityInput {
|
|
521
|
+
}
|
|
500
522
|
interface SallaRatingModal {
|
|
501
523
|
/**
|
|
502
524
|
* The order id, to rate on its products & shipping
|
|
@@ -545,12 +567,14 @@ declare namespace LocalJSX {
|
|
|
545
567
|
interface IntrinsicElements {
|
|
546
568
|
"salla-branches": SallaBranches;
|
|
547
569
|
"salla-button": SallaButton;
|
|
570
|
+
"salla-conditional-fields": SallaConditionalFields;
|
|
548
571
|
"salla-infinite-scroll": SallaInfiniteScroll;
|
|
549
572
|
"salla-localization-modal": SallaLocalizationModal;
|
|
550
573
|
"salla-login-modal": SallaLoginModal;
|
|
551
574
|
"salla-modal": SallaModal;
|
|
552
575
|
"salla-offer-modal": SallaOfferModal;
|
|
553
576
|
"salla-product-availability": SallaProductAvailability;
|
|
577
|
+
"salla-quantity-input": SallaQuantityInput;
|
|
554
578
|
"salla-rating-modal": SallaRatingModal;
|
|
555
579
|
"salla-search": SallaSearch;
|
|
556
580
|
"salla-tel-input": SallaTelInput;
|
|
@@ -563,12 +587,14 @@ declare module "@stencil/core" {
|
|
|
563
587
|
interface IntrinsicElements {
|
|
564
588
|
"salla-branches": LocalJSX.SallaBranches & JSXBase.HTMLAttributes<HTMLSallaBranchesElement>;
|
|
565
589
|
"salla-button": LocalJSX.SallaButton & JSXBase.HTMLAttributes<HTMLSallaButtonElement>;
|
|
590
|
+
"salla-conditional-fields": LocalJSX.SallaConditionalFields & JSXBase.HTMLAttributes<HTMLSallaConditionalFieldsElement>;
|
|
566
591
|
"salla-infinite-scroll": LocalJSX.SallaInfiniteScroll & JSXBase.HTMLAttributes<HTMLSallaInfiniteScrollElement>;
|
|
567
592
|
"salla-localization-modal": LocalJSX.SallaLocalizationModal & JSXBase.HTMLAttributes<HTMLSallaLocalizationModalElement>;
|
|
568
593
|
"salla-login-modal": LocalJSX.SallaLoginModal & JSXBase.HTMLAttributes<HTMLSallaLoginModalElement>;
|
|
569
594
|
"salla-modal": LocalJSX.SallaModal & JSXBase.HTMLAttributes<HTMLSallaModalElement>;
|
|
570
595
|
"salla-offer-modal": LocalJSX.SallaOfferModal & JSXBase.HTMLAttributes<HTMLSallaOfferModalElement>;
|
|
571
596
|
"salla-product-availability": LocalJSX.SallaProductAvailability & JSXBase.HTMLAttributes<HTMLSallaProductAvailabilityElement>;
|
|
597
|
+
"salla-quantity-input": LocalJSX.SallaQuantityInput & JSXBase.HTMLAttributes<HTMLSallaQuantityInputElement>;
|
|
572
598
|
"salla-rating-modal": LocalJSX.SallaRatingModal & JSXBase.HTMLAttributes<HTMLSallaRatingModalElement>;
|
|
573
599
|
"salla-search": LocalJSX.SallaSearch & JSXBase.HTMLAttributes<HTMLSallaSearchElement>;
|
|
574
600
|
"salla-tel-input": LocalJSX.SallaTelInput & JSXBase.HTMLAttributes<HTMLSallaTelInputElement>;
|