@salla.sa/twilight-components 1.5.3 → 1.5.6
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/{index-0d0167d5.js → index-d43334bf.js} +0 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-add-product-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-button_24.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/global/app.js +1 -1
- package/dist/esm/{index-4e30ffd0.js → index-c78562f8.js} +0 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-add-product-button.entry.js +1 -1
- package/dist/esm/salla-button_24.entry.js +1 -1
- package/dist/esm/salla-conditional-fields.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/{p-1503d976.js → p-336eda99.js} +0 -0
- package/dist/twilight-components/{p-40a01521.entry.js → p-5707f352.entry.js} +1 -1
- package/dist/twilight-components/{p-282f9df8.entry.js → p-aa546227.entry.js} +1 -1
- package/dist/twilight-components/{p-4cba804f.entry.js → p-b5028001.entry.js} +1 -1
- package/dist/twilight-components/{p-b9fe5498.entry.js → p-c2947b0f.entry.js} +1 -1
- package/dist/twilight-components/{p-019bb315.entry.js → p-ca871c42.entry.js} +1 -1
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/global/app.d.ts +1 -1
- package/package.json +7 -10
- package/dist/collection/plugins/tailwind-theme/generator.js +0 -67
- package/dist/collection/plugins/tailwind-theme/index.js +0 -79
- package/example/.gitignore +0 -2
- package/example/assets/images/star.png +0 -0
- package/example/assets/tailwind.css +0 -5235
- package/example/assets/translations.js +0 -4981
- package/example/auth/email/send_verification +0 -0
- package/example/auth/email/verify +0 -11
- package/example/auth/mobile/send_verification +0 -0
- package/example/auth/mobile/verify +0 -9
- package/example/currencies +0 -23
- package/example/index.html +0 -974
- package/example/infinit-scroll.html +0 -7
- package/example/languages +0 -17
- package/example/package.json +0 -19
- package/example/products/search +0 -13
- package/example/rating/products +0 -0
- package/example/rating/rating.json +0 -1
- package/example/rating/shipping +0 -0
- package/example/rating/store +0 -0
- package/example/tailwind.config.js +0 -59
|
File without changes
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-d43334bf.js');
|
|
9
9
|
|
|
10
10
|
const sallaAddProductButtonCss = ":host{display:block}salla-add-product-button[width=wide]{width:100%}";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-d43334bf.js');
|
|
9
9
|
|
|
10
10
|
const sallaInstallmentCss = "#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-d43334bf.js');
|
|
9
9
|
const search = require('./search-b487cc49.js');
|
|
10
10
|
|
|
11
11
|
const StoreAlt = `<!-- Generated by IcoMoon.io -->
|
|
File without changes
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
4
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c78562f8.js';
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c78562f8.js';
|
|
5
5
|
|
|
6
6
|
const sallaAddProductButtonCss = ":host{display:block}salla-add-product-button[width=wide]{width:100%}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-c78562f8.js';
|
|
5
5
|
import { S as Search } from './search-19ea3313.js';
|
|
6
6
|
|
|
7
7
|
const sallaButtonCss = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-c78562f8.js';
|
|
5
5
|
|
|
6
6
|
const SallaConditionalFields = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-c78562f8.js';
|
|
5
5
|
|
|
6
6
|
const sallaInstallmentCss = "#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-c78562f8.js';
|
|
5
5
|
import { S as Search } from './search-19ea3313.js';
|
|
6
6
|
|
|
7
7
|
const StoreAlt = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
4
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c78562f8.js';
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
Stencil Client Patch Browser v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t,H as e}from"./p-
|
|
4
|
+
import{r as s,h as t,H as e}from"./p-336eda99.js";import{S as l}from"./p-475ef754.js";var i;!function(s){s.DEFAULT="default",s.AVAILABILITY="availability"}(i||(i={}));const a=class{constructor(t){s(this,t),this.mode=i.DEFAULT,this.scopes=[],this.originalScopesList=[],this.isOpenedBefore=salla.storage.get("branch-choosed-before"),this.selection="optional",this.searchDisplayLimit=6,this.getFormTitle=()=>{var s;return(null===(s=this.originalScopesList)||void 0===s?void 0:s.length)<2?"":this.mode===i.DEFAULT?this.shoppingFromAnotherBranch:this.searchForAvailabilityInOtherBranch},salla.event.on("scopes::open",(({mode:s=null,product_id:t=null})=>{this.open(s,t)})),salla.lang.onLoaded((()=>{this.branchNotFound=salla.lang.get("blocks.scope.branch_looking_for_not_found"),this.ourServiceIsNotFound=salla.lang.get("blocks.scope.our_services_not_available_in_this_branch"),this.searchForAvailabilityInOtherBranch=salla.lang.get("blocks.scope.search_for_availability_in_other_branches"),this.shoppingFromAnotherBranch=salla.lang.get("blocks.scope.shopping_from_another_branch"),this.nowBrowsingFrom=salla.lang.get("blocks.scope.you_are_browse_store_from"),this.confirmButton=salla.lang.get("common.elements.confirm"),this.scopeSearchPlaceholder=salla.lang.get("blocks.scope.searching_for_a_branch")}))}async close(){var s;return await(null===(s=this.modal)||void 0===s?void 0:s.close())}async open(s=i.DEFAULT,t=null){return this.setScopeValues([]),this.mode=void 0!==s&&[i.AVAILABILITY,i.DEFAULT].includes(s)?s:i.DEFAULT,this.modal.loading(),this.modal.open(),await(s==i.AVAILABILITY?salla.scope.getProductAvailability(t):salla.scope.get()).then((t=>{this.setScopeValues(s==i.AVAILABILITY?t.data:t.data.scopes)})).catch((s=>console.log(s))).finally((()=>{this.modal.stopLoading()}))}async handleSubmit(){let s={scope_id:this.current_scope.id};return this.changeBtn.load(),await salla.scope.change(s).then((()=>{salla.storage.set("branch-choosed-before",!0),salla.storage.set("scope",this.current_scope.id),window.location.search+="&scope="+this.current_scope.id})).catch((s=>console.log(s))).finally((()=>{this.changeBtn.stop()}))}setScopeValues(s){this.scopes=s,this.originalScopesList=s,1==s.length?(this.current_scope=s[0],this.selected_scope=s[0]):(this.current_scope=s.find((s=>s.selected)),this.selected_scope=s.find((s=>s.selected)))}handleSearchFieldTyping(s){let t=s.target.value.toLocaleLowerCase();this.scopes=t?this.originalScopesList.filter((s=>s.name.toLowerCase().includes(t))):this.originalScopesList}handleScopeSelection(s){this.current_scope=this.scopes.find((t=>t.id==s.target.value))}placeholderContent(){return t("salla-placeholder",{alignment:"center",class:"s-scopes-placeholder"},t("span",{slot:"title"},this.branchNotFound),t("span",{slot:"description"},this.ourServiceIsNotFound))}defaultContent(){return[t("div",{class:"s-scopes-container s-scrollbar"},this.scopes.map((s=>t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("input",{id:`${this.selection} + '_scope_' + ${s.id}`,name:"lang",type:"radio",value:s.id,onChange:s=>this.handleScopeSelection(s),class:"s-scopes-input",checked:!!this.current_scope&&this.current_scope.id==s.id}),t("label",{htmlFor:`${this.selection} + '_scope_' + ${s.id}`,class:"s-scopes-label s-scopes-clickable"},t("span",null,s.name)))))),this.footerContent()]}availabilityContent(){return t("div",{class:"s-scopes-container"},this.scopes.map((s=>{var e,l,a,o,h,c;return t("div",{class:"s-scopes-input-wrap","data-selection":this.selection},t("h2",{class:{"s-scopes-label":!0,"s-scopes-clickable":this.mode===i.DEFAULT}},t("span",null,s.name)),t("h2",{style:{color:null===(l=null===(e=s)||void 0===e?void 0:e.availability)||void 0===l?void 0:l.color},class:`s-scopes-${null===(o=null===(a=s)||void 0===a?void 0:a.availability)||void 0===o?void 0:o.key}`},null===(c=null===(h=s)||void 0===h?void 0:h.availability)||void 0===c?void 0:c.label))})))}footerContent(){return t("div",{class:"s-scopes-footer"},t("slot",{name:"footer"},t("salla-button",{ref:s=>this.changeBtn=s,disabled:!this.current_scope,onClick:()=>this.handleSubmit(),class:"s-scopes-submit","loader-position":"center",width:"wide"},this.confirmButton)))}render(){return t(e,null,t("salla-modal",{ref:s=>this.modal=s,isClosable:!(!this.isOpenedBefore&&"optional"!=this.selection),class:"s-scopes-modal",isLoading:!0,"has-skeleton":!0},t("div",{slot:"loading"},t("div",{class:"s-scopes-skeleton"},t("salla-list-tile",{class:"s-scopes-header"},t("div",{slot:"icon",class:"s-scopes-header-icon"},t("salla-skeleton",{type:"circle"})),t("div",{slot:"title",class:"s-scopes-header-title mb-5"},t("salla-skeleton",{height:"15px",width:"50%"})),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},t("salla-skeleton",{height:"10px"}),t("salla-skeleton",{height:"10px",width:"75%"}))),t("div",{class:"s-scopes-skeleton-search"},t("salla-skeleton",{height:"10px",width:"50%"}),t("salla-skeleton",{height:"30px",width:"100%"})),t("div",{class:"s-scopes-skeleton-scopes"},t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"}),t("salla-skeleton",{height:"10px",width:"30%"}),t("salla-skeleton",{height:"10px",width:"25%"})),t("div",{class:"s-scopes-skeleton-btn"},t("salla-skeleton",{height:"40px",width:"100%"})))),t("salla-list-tile",{class:this.originalScopesList.length?"s-scopes-header block":"s-hidden"},t("div",{slot:"icon",class:"s-scopes-header-icon",innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>store-alt</title>\n<path d="M6.667 24h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.86 10.071l-4-8c-0.227-0.452-0.688-0.737-1.193-0.737h-21.333c-0.505 0-0.967 0.285-1.193 0.737l-4 8c-0.092 0.184-0.14 0.389-0.14 0.596v18.667c0 0.737 0.597 1.333 1.333 1.333h29.333c0.736 0 1.333-0.596 1.333-1.333v-18.667c0-0.207-0.048-0.412-0.14-0.596zM6.157 4h19.685l3.333 6.667h-26.352zM24 28h-5.333v-9.333h5.333zM29.333 28h-2.667v-10.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333v10.667h-13.333v-14.667h26.667zM6.667 18.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n'}),t("div",{slot:"title",class:"s-scopes-header-title"},this.nowBrowsingFrom),t("div",{slot:"subtitle",class:"s-scopes-header-subtitle"},this.selected_scope?this.selected_scope.name:"")),t("div",{class:"s-scopes-wrap"},!!this.originalScopesList.length&&t("h4",{class:"s-scopes-title"},this.getFormTitle()),this.originalScopesList.length>this.searchDisplayLimit?t("div",{class:"s-scopes-search-wrapper"},t("div",{class:"s-scopes-search-icon",innerHTML:l}),t("input",{type:"text",class:"s-scopes-search-input",onInput:s=>this.handleSearchFieldTyping(s),placeholder:this.scopeSearchPlaceholder})):"",this.scopes.length<2?this.placeholderContent():this.mode===i.DEFAULT?this.defaultContent():this.availabilityContent())))}componentDidLoad(){this.isOpenedBefore||"mandatory"!=this.selection||this.open()}};a.style=".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";export{a as salla_scopes}
|