@everymatrix/cashier-method-details-cashpoint 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.
Files changed (48) hide show
  1. package/components/CashierError-BE2rWjBY.cjs +1 -0
  2. package/components/CashierError-Cqo0Isw0.js +952 -0
  3. package/components/CashierError-DGtSWlA8.js +952 -0
  4. package/components/CashierError-Dl7F3z5N.cjs +1 -0
  5. package/components/CashierError-MFUpHFa4.js +952 -0
  6. package/components/CashierError-N89Dmddy.js +952 -0
  7. package/components/CashierMethodDetailsCashpoint-B7xEmm1f.cjs +260 -0
  8. package/components/CashierMethodDetailsCashpoint-B9GC9RT2.js +17799 -0
  9. package/components/CashierMethodDetailsCashpoint-BO52Tpts.js +17799 -0
  10. package/components/CashierMethodDetailsCashpoint-C8KyJwJb.js +17716 -0
  11. package/components/CashierMethodDetailsCashpoint-kSVpU-dk.js +17716 -0
  12. package/components/CashierMethodDetailsCashpoint-tS8aAyOR.cjs +260 -0
  13. package/components/CashierModal-BBjJwf20.js +401 -0
  14. package/components/CashierModal-BKm7SyBC.cjs +1 -0
  15. package/components/CashierModal-CbNWDckK.cjs +1 -0
  16. package/components/CashierModal-CjLaeQM_.js +401 -0
  17. package/components/CashierModal-DBfaudnk.js +385 -0
  18. package/components/CashierModal-HWnU8wJb.js +385 -0
  19. package/components/CashierNotifications-C4-0zOMd.cjs +1 -0
  20. package/components/CashierNotifications-CTokg5Ca.js +129 -0
  21. package/components/CashierNotifications-Cw8tX1HT.cjs +1 -0
  22. package/components/CashierNotifications-D0KNUYI2.js +129 -0
  23. package/components/CashierNotifications-DfJyS04K.js +129 -0
  24. package/components/CashierNotifications-vUvqD8FB.js +129 -0
  25. package/components/CashierReceiptPage-2QG8K0On.cjs +29 -0
  26. package/components/CashierReceiptPage-BFXASfCC.js +2255 -0
  27. package/components/CashierReceiptPage-D3irF-jg.js +2235 -0
  28. package/components/CashierReceiptPage-DF53mGm7.js +2235 -0
  29. package/components/CashierReceiptPage-DwT6XtoN.cjs +29 -0
  30. package/components/CashierReceiptPage-bBa4q7ru.js +2255 -0
  31. package/es2015/cashier-method-details-cashpoint.cjs +1 -0
  32. package/es2015/cashier-method-details-cashpoint.js +16 -0
  33. package/esnext/cashier-method-details-cashpoint.js +14 -0
  34. package/package.json +24 -0
  35. package/stencil/app-globals-0f993ce5-D-kw1sls.js +5 -0
  36. package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
  37. package/stencil/index-97d17652-B6BYeRne.js +542 -0
  38. package/stencil/index-97d17652-BOr4KAqq.js +558 -0
  39. package/stencil/index-97d17652-zTl06Vn9.cjs +1 -0
  40. package/stencil/ui-image-BX-FBhad.cjs +1 -0
  41. package/stencil/ui-image-CP8Lp7fB.js +25 -0
  42. package/stencil/ui-image-Ch-GHki1.js +7 -0
  43. package/stencil/ui-image-b7b48fe5-BKRtoUuG.js +39 -0
  44. package/stencil/ui-image-b7b48fe5-HA45CrsG.js +39 -0
  45. package/stencil/ui-image-b7b48fe5-MC0x5ZQd.cjs +1 -0
  46. package/stencil/ui-image_2-CmVho0dS.js +157 -0
  47. package/stencil/ui-image_2-CyqE6j_W.cjs +55 -0
  48. package/stencil/ui-image_2-Daq38JGa.js +157 -0
@@ -0,0 +1,39 @@
1
+ import { r, h as s, H as n, g as a } from "./index-97d17652-BOr4KAqq.js";
2
+ const d = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}", o = d, h = class {
3
+ constructor(e) {
4
+ r(this, e), this.src = void 0, this.width = void 0, this.height = void 0, this.alt = void 0, this.styles = void 0, this.detectDistance = "200px", this.imgLoaded = !1, this.shouldLoad = !1;
5
+ }
6
+ handleSrc() {
7
+ if (!this.shouldLoad)
8
+ return;
9
+ const e = new Image();
10
+ e.onload = () => {
11
+ this.image && (this.image.src = this.src, this.imgLoaded = !0, e.onload = null);
12
+ }, e.src = this.src;
13
+ }
14
+ componentDidLoad() {
15
+ "IntersectionObserver" in window ? (this.el.__uxComponent = this, window.EMUxObserver || (window.EMUxObserver = new IntersectionObserver((e) => {
16
+ e.forEach((i) => {
17
+ if (i.isIntersecting) {
18
+ const t = i.target.__uxComponent;
19
+ t && (t.shouldLoad = !0, t.handleSrc()), window.EMUxObserver.unobserve(i.target);
20
+ }
21
+ });
22
+ }, { rootMargin: this.detectDistance })), window.EMUxObserver.observe(this.el)) : (this.shouldLoad = !0, this.handleSrc());
23
+ }
24
+ render() {
25
+ return s(n, { key: "f506ba73852f257ad80bf59ca177d2065a5f365e", class: "HostContainer" }, !this.imgLoaded && s("ui-skeleton", { key: "564ebfab701f827ddc2debccb7615926dbc9e876", class: "UiContainer", structure: "image", width: "100%", height: "100%" }), s("img", { key: "2188ca4494c10587f064acc5459ffc468948f497", ref: (e) => this.image = e, src: this.shouldLoad ? this.src : void 0, onLoad: () => this.imgLoaded = !0, style: this.styles, class: `UiContainer ${this.imgLoaded ? "Visible" : "Hidden"}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
26
+ }
27
+ get el() {
28
+ return a(this);
29
+ }
30
+ static get watchers() {
31
+ return {
32
+ src: ["handleSrc"]
33
+ };
34
+ }
35
+ };
36
+ h.style = o;
37
+ export {
38
+ h as U
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./index-97d17652-zTl06Vn9.cjs"),r=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}",d=r,n=class{constructor(e){i.registerInstance(this,e),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver(e=>{e.forEach(t=>{if(t.isIntersecting){const s=t.target.__uxComponent;s&&(s.shouldLoad=!0,s.handleSrc()),window.EMUxObserver.unobserve(t.target)}})},{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return i.h(i.Host,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&i.h("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),i.h("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:`UiContainer ${this.imgLoaded?"Visible":"Hidden"}`,alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return i.getElement(this)}static get watchers(){return{src:["handleSrc"]}}};n.style=d;exports.UiImage=n;
@@ -0,0 +1,157 @@
1
+ import { U as m } from "./ui-image-b7b48fe5-HA45CrsG.js";
2
+ import { r as n, h as t, H as r } from "./index-97d17652-BOr4KAqq.js";
3
+ const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", l = s, a = class {
4
+ constructor(e) {
5
+ n(this, e), this.stylingValue = {
6
+ width: this.handleStylingProps(this.width),
7
+ height: this.handleStylingProps(this.height),
8
+ borderRadius: this.handleStylingProps(this.borderRadius),
9
+ marginBottom: this.handleStylingProps(this.marginBottom),
10
+ marginTop: this.handleStylingProps(this.marginTop),
11
+ marginLeft: this.handleStylingProps(this.marginLeft),
12
+ marginRight: this.handleStylingProps(this.marginRight),
13
+ size: this.handleStylingProps(this.size)
14
+ }, this.structure = void 0, this.width = "unset", this.height = "unset", this.borderRadius = "unset", this.marginBottom = "unset", this.marginTop = "unset", this.marginLeft = "unset", this.marginRight = "unset", this.animation = !0, this.rows = 0, this.size = "100%";
15
+ }
16
+ handleStructureChange(e, i) {
17
+ i !== e && this.handleStructure(e);
18
+ }
19
+ handleStylingProps(e) {
20
+ switch (typeof e) {
21
+ case "number":
22
+ return e === 0 ? 0 : `${e}px`;
23
+ case "undefined":
24
+ return "unset";
25
+ case "string":
26
+ return ["auto", "unset", "none", "inherit", "initial"].includes(e) || e.endsWith("px") || e.endsWith("%") ? e : "unset";
27
+ default:
28
+ return "unset";
29
+ }
30
+ }
31
+ handleStructure(e) {
32
+ switch (e) {
33
+ case "logo":
34
+ return this.renderLogo();
35
+ case "image":
36
+ return this.renderImage();
37
+ case "title":
38
+ return this.renderTitle();
39
+ case "text":
40
+ return this.renderText();
41
+ case "rectangle":
42
+ return this.renderRectangle();
43
+ case "circle":
44
+ return this.renderCircle();
45
+ default:
46
+ return null;
47
+ }
48
+ }
49
+ renderLogo() {
50
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonLogo " + (this.animation ? "Skeleton" : "") }));
51
+ }
52
+ renderImage() {
53
+ return t("div", { class: "SkeletonImage " + (this.animation ? "Skeleton" : "") });
54
+ }
55
+ renderTitle() {
56
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonTitle " + (this.animation ? "Skeleton" : "") }));
57
+ }
58
+ renderText() {
59
+ return t("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((e, i) => t("div", { key: i, class: "SkeletonText " + (this.animation ? "Skeleton" : "") })));
60
+ }
61
+ renderRectangle() {
62
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonRectangle " + (this.animation ? "Skeleton" : "") }));
63
+ }
64
+ renderCircle() {
65
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonCircle " + (this.animation ? "Skeleton" : "") }));
66
+ }
67
+ render() {
68
+ let e = "";
69
+ switch (this.structure) {
70
+ case "logo":
71
+ e = `
72
+ :host {
73
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
74
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
75
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
76
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
77
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
78
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
79
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
80
+ }
81
+ `;
82
+ break;
83
+ case "image":
84
+ e = `
85
+ :host {
86
+ --emw-skeleton-image-width: ${this.stylingValue.width};
87
+ --emw-skeleton-image-height: ${this.stylingValue.height};
88
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
89
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
90
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
91
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
92
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
93
+ }
94
+ `;
95
+ break;
96
+ case "title":
97
+ e = `
98
+ :host {
99
+ --emw-skeleton-title-width: ${this.stylingValue.width};
100
+ --emw-skeleton-title-height: ${this.stylingValue.height};
101
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
102
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
103
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
104
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
105
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
106
+ }
107
+ `;
108
+ break;
109
+ case "text":
110
+ e = `
111
+ :host {
112
+ --emw-skeleton-text-width: ${this.stylingValue.width};
113
+ --emw-skeleton-text-height: ${this.stylingValue.height};
114
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
115
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
116
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
117
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
118
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
119
+ }
120
+ `;
121
+ break;
122
+ case "rectangle":
123
+ e = `
124
+ :host {
125
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
126
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
127
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
128
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
129
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
130
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
131
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
132
+ }
133
+ `;
134
+ break;
135
+ case "circle":
136
+ e = `
137
+ :host {
138
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
139
+ }
140
+ `;
141
+ break;
142
+ default:
143
+ e = "";
144
+ }
145
+ return t(r, { key: "c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8" }, t("style", { key: "9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19" }, e), this.handleStructure(this.structure));
146
+ }
147
+ static get watchers() {
148
+ return {
149
+ structure: ["handleStructureChange"]
150
+ };
151
+ }
152
+ };
153
+ a.style = l;
154
+ export {
155
+ m as ui_image,
156
+ a as ui_skeleton
157
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./ui-image-b7b48fe5-MC0x5ZQd.cjs"),t=require("./index-97d17652-zTl06Vn9.cjs"),s=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",l=s,n=class{constructor(e){t.registerInstance(this,e),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,i){i!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return e===0?0:`${e}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset";default:return"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t.h("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((e,i)=>t.h("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")})))}renderRectangle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t.h("div",{class:"SkeletonContainer"},t.h("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`
2
+ :host {
3
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
4
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
5
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
6
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
7
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
8
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
9
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
10
+ }
11
+ `;break;case"image":e=`
12
+ :host {
13
+ --emw-skeleton-image-width: ${this.stylingValue.width};
14
+ --emw-skeleton-image-height: ${this.stylingValue.height};
15
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
16
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
17
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
18
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
19
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
20
+ }
21
+ `;break;case"title":e=`
22
+ :host {
23
+ --emw-skeleton-title-width: ${this.stylingValue.width};
24
+ --emw-skeleton-title-height: ${this.stylingValue.height};
25
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
26
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
27
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
28
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
29
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
30
+ }
31
+ `;break;case"text":e=`
32
+ :host {
33
+ --emw-skeleton-text-width: ${this.stylingValue.width};
34
+ --emw-skeleton-text-height: ${this.stylingValue.height};
35
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
36
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
37
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
38
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
39
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
40
+ }
41
+ `;break;case"rectangle":e=`
42
+ :host {
43
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
44
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
45
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
46
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
47
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
48
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
49
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
50
+ }
51
+ `;break;case"circle":e=`
52
+ :host {
53
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
54
+ }
55
+ `;break;default:e=""}return t.h(t.Host,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t.h("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};n.style=l;exports.ui_image=r.UiImage;exports.ui_skeleton=n;
@@ -0,0 +1,157 @@
1
+ import { U as m } from "./ui-image-b7b48fe5-BKRtoUuG.js";
2
+ import { r as n, h as t, H as r } from "./index-97d17652-B6BYeRne.js";
3
+ const s = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}", l = s, a = class {
4
+ constructor(e) {
5
+ n(this, e), this.stylingValue = {
6
+ width: this.handleStylingProps(this.width),
7
+ height: this.handleStylingProps(this.height),
8
+ borderRadius: this.handleStylingProps(this.borderRadius),
9
+ marginBottom: this.handleStylingProps(this.marginBottom),
10
+ marginTop: this.handleStylingProps(this.marginTop),
11
+ marginLeft: this.handleStylingProps(this.marginLeft),
12
+ marginRight: this.handleStylingProps(this.marginRight),
13
+ size: this.handleStylingProps(this.size)
14
+ }, this.structure = void 0, this.width = "unset", this.height = "unset", this.borderRadius = "unset", this.marginBottom = "unset", this.marginTop = "unset", this.marginLeft = "unset", this.marginRight = "unset", this.animation = !0, this.rows = 0, this.size = "100%";
15
+ }
16
+ handleStructureChange(e, i) {
17
+ i !== e && this.handleStructure(e);
18
+ }
19
+ handleStylingProps(e) {
20
+ switch (typeof e) {
21
+ case "number":
22
+ return e === 0 ? 0 : `${e}px`;
23
+ case "undefined":
24
+ return "unset";
25
+ case "string":
26
+ return ["auto", "unset", "none", "inherit", "initial"].includes(e) || e.endsWith("px") || e.endsWith("%") ? e : "unset";
27
+ default:
28
+ return "unset";
29
+ }
30
+ }
31
+ handleStructure(e) {
32
+ switch (e) {
33
+ case "logo":
34
+ return this.renderLogo();
35
+ case "image":
36
+ return this.renderImage();
37
+ case "title":
38
+ return this.renderTitle();
39
+ case "text":
40
+ return this.renderText();
41
+ case "rectangle":
42
+ return this.renderRectangle();
43
+ case "circle":
44
+ return this.renderCircle();
45
+ default:
46
+ return null;
47
+ }
48
+ }
49
+ renderLogo() {
50
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonLogo " + (this.animation ? "Skeleton" : "") }));
51
+ }
52
+ renderImage() {
53
+ return t("div", { class: "SkeletonImage " + (this.animation ? "Skeleton" : "") });
54
+ }
55
+ renderTitle() {
56
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonTitle " + (this.animation ? "Skeleton" : "") }));
57
+ }
58
+ renderText() {
59
+ return t("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((e, i) => t("div", { key: i, class: "SkeletonText " + (this.animation ? "Skeleton" : "") })));
60
+ }
61
+ renderRectangle() {
62
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonRectangle " + (this.animation ? "Skeleton" : "") }));
63
+ }
64
+ renderCircle() {
65
+ return t("div", { class: "SkeletonContainer" }, t("div", { class: "SkeletonCircle " + (this.animation ? "Skeleton" : "") }));
66
+ }
67
+ render() {
68
+ let e = "";
69
+ switch (this.structure) {
70
+ case "logo":
71
+ e = `
72
+ :host {
73
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
74
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
75
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
76
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
77
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
78
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
79
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
80
+ }
81
+ `;
82
+ break;
83
+ case "image":
84
+ e = `
85
+ :host {
86
+ --emw-skeleton-image-width: ${this.stylingValue.width};
87
+ --emw-skeleton-image-height: ${this.stylingValue.height};
88
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
89
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
90
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
91
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
92
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
93
+ }
94
+ `;
95
+ break;
96
+ case "title":
97
+ e = `
98
+ :host {
99
+ --emw-skeleton-title-width: ${this.stylingValue.width};
100
+ --emw-skeleton-title-height: ${this.stylingValue.height};
101
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
102
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
103
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
104
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
105
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
106
+ }
107
+ `;
108
+ break;
109
+ case "text":
110
+ e = `
111
+ :host {
112
+ --emw-skeleton-text-width: ${this.stylingValue.width};
113
+ --emw-skeleton-text-height: ${this.stylingValue.height};
114
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
115
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
116
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
117
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
118
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
119
+ }
120
+ `;
121
+ break;
122
+ case "rectangle":
123
+ e = `
124
+ :host {
125
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
126
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
127
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
128
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
129
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
130
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
131
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
132
+ }
133
+ `;
134
+ break;
135
+ case "circle":
136
+ e = `
137
+ :host {
138
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
139
+ }
140
+ `;
141
+ break;
142
+ default:
143
+ e = "";
144
+ }
145
+ return t(r, { key: "c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8" }, t("style", { key: "9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19" }, e), this.handleStructure(this.structure));
146
+ }
147
+ static get watchers() {
148
+ return {
149
+ structure: ["handleStructureChange"]
150
+ };
151
+ }
152
+ };
153
+ a.style = l;
154
+ export {
155
+ m as ui_image,
156
+ a as ui_skeleton
157
+ };