le-kit 0.1.7 → 0.1.8

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 (198) hide show
  1. package/custom-elements.json +877 -877
  2. package/dist/cjs/index-D7B9TPh8.js.map +1 -1
  3. package/dist/collection/components/le-popup/le-popup.js +7 -7
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/core/cjs/index-D7B9TPh8.js +1835 -0
  6. package/dist/core/cjs/index-D7B9TPh8.js.map +1 -0
  7. package/dist/core/cjs/index.cjs.js +119 -0
  8. package/dist/core/cjs/index.cjs.js.map +1 -0
  9. package/dist/core/cjs/le-box.cjs.entry.js +184 -0
  10. package/dist/core/cjs/le-box.entry.cjs.js.map +1 -0
  11. package/dist/core/cjs/le-button.cjs.entry.js +92 -0
  12. package/dist/core/cjs/le-button.entry.cjs.js.map +1 -0
  13. package/dist/core/cjs/le-card.cjs.entry.js +29 -0
  14. package/dist/core/cjs/le-card.entry.cjs.js.map +1 -0
  15. package/dist/core/cjs/le-checkbox.cjs.entry.js +61 -0
  16. package/dist/core/cjs/le-checkbox.entry.cjs.js.map +1 -0
  17. package/dist/core/cjs/le-kit.cjs.js +25 -0
  18. package/dist/core/cjs/le-kit.cjs.js.map +1 -0
  19. package/dist/core/cjs/le-number-input.cjs.entry.js +202 -0
  20. package/dist/core/cjs/le-number-input.entry.cjs.js.map +1 -0
  21. package/dist/core/cjs/le-popover.cjs.entry.js +348 -0
  22. package/dist/core/cjs/le-popover.entry.cjs.js.map +1 -0
  23. package/dist/core/cjs/le-popup.cjs.entry.js +212 -0
  24. package/dist/core/cjs/le-popup.entry.cjs.js.map +1 -0
  25. package/dist/core/cjs/le-round-progress.cjs.entry.js +106 -0
  26. package/dist/core/cjs/le-round-progress.entry.cjs.js.map +1 -0
  27. package/dist/core/cjs/le-stack.cjs.entry.js +135 -0
  28. package/dist/core/cjs/le-stack.entry.cjs.js.map +1 -0
  29. package/dist/core/cjs/le-string-input.cjs.entry.js +95 -0
  30. package/dist/core/cjs/le-string-input.entry.cjs.js.map +1 -0
  31. package/dist/core/cjs/le-text.cjs.entry.js +335 -0
  32. package/dist/core/cjs/le-text.entry.cjs.js.map +1 -0
  33. package/dist/core/cjs/le-turntable.cjs.entry.js +139 -0
  34. package/dist/core/cjs/le-turntable.entry.cjs.js.map +1 -0
  35. package/dist/core/cjs/loader.cjs.js +13 -0
  36. package/dist/core/cjs/loader.cjs.js.map +1 -0
  37. package/dist/core/cjs/utils-DrsoID-a.js +152 -0
  38. package/dist/core/cjs/utils-DrsoID-a.js.map +1 -0
  39. package/dist/core/collection/collection-manifest.json +24 -0
  40. package/dist/core/collection/components/le-box/le-box.default.css +37 -0
  41. package/dist/core/collection/components/le-box/le-box.js +614 -0
  42. package/dist/core/collection/components/le-box/le-box.js.map +1 -0
  43. package/dist/core/collection/components/le-button/le-button.default.css +263 -0
  44. package/dist/core/collection/components/le-button/le-button.js +368 -0
  45. package/dist/core/collection/components/le-button/le-button.js.map +1 -0
  46. package/dist/core/collection/components/le-card/le-card.default.css +74 -0
  47. package/dist/core/collection/components/le-card/le-card.js +102 -0
  48. package/dist/core/collection/components/le-card/le-card.js.map +1 -0
  49. package/dist/core/collection/components/le-checkbox/le-checkbox.css +93 -0
  50. package/dist/core/collection/components/le-checkbox/le-checkbox.js +192 -0
  51. package/dist/core/collection/components/le-checkbox/le-checkbox.js.map +1 -0
  52. package/dist/core/collection/components/le-number-input/le-number-input.css +135 -0
  53. package/dist/core/collection/components/le-number-input/le-number-input.js +515 -0
  54. package/dist/core/collection/components/le-number-input/le-number-input.js.map +1 -0
  55. package/dist/core/collection/components/le-popover/le-popover.css +143 -0
  56. package/dist/core/collection/components/le-popover/le-popover.js +693 -0
  57. package/dist/core/collection/components/le-popover/le-popover.js.map +1 -0
  58. package/dist/core/collection/components/le-popup/le-popup.api.js +101 -0
  59. package/dist/core/collection/components/le-popup/le-popup.api.js.map +1 -0
  60. package/dist/core/collection/components/le-popup/le-popup.css +222 -0
  61. package/dist/core/collection/components/le-popup/le-popup.js +596 -0
  62. package/dist/core/collection/components/le-popup/le-popup.js.map +1 -0
  63. package/dist/core/collection/components/le-round-progress/le-round-progress.css +34 -0
  64. package/dist/core/collection/components/le-round-progress/le-round-progress.js +184 -0
  65. package/dist/core/collection/components/le-round-progress/le-round-progress.js.map +1 -0
  66. package/dist/core/collection/components/le-stack/le-stack.default.css +37 -0
  67. package/dist/core/collection/components/le-stack/le-stack.js +389 -0
  68. package/dist/core/collection/components/le-stack/le-stack.js.map +1 -0
  69. package/dist/core/collection/components/le-string-input/le-string-input.css +83 -0
  70. package/dist/core/collection/components/le-string-input/le-string-input.js +359 -0
  71. package/dist/core/collection/components/le-string-input/le-string-input.js.map +1 -0
  72. package/dist/core/collection/components/le-text/le-text.default.css +169 -0
  73. package/dist/core/collection/components/le-text/le-text.js +475 -0
  74. package/dist/core/collection/components/le-text/le-text.js.map +1 -0
  75. package/dist/core/collection/components/le-turntable/le-turntable.css +10 -0
  76. package/dist/core/collection/components/le-turntable/le-turntable.js +210 -0
  77. package/dist/core/collection/components/le-turntable/le-turntable.js.map +1 -0
  78. package/dist/core/collection/global/app.js +167 -0
  79. package/dist/core/collection/global/app.js.map +1 -0
  80. package/dist/core/collection/index.js +15 -0
  81. package/dist/core/collection/index.js.map +1 -0
  82. package/dist/core/collection/types/blocks.js +115 -0
  83. package/dist/core/collection/types/blocks.js.map +1 -0
  84. package/dist/core/collection/types/options.js +2 -0
  85. package/dist/core/collection/types/options.js.map +1 -0
  86. package/dist/core/collection/utils/utils.js +141 -0
  87. package/dist/core/collection/utils/utils.js.map +1 -0
  88. package/dist/core/esm/index-PS-3Rz-c.js +1818 -0
  89. package/dist/core/esm/index-PS-3Rz-c.js.map +1 -0
  90. package/dist/core/esm/index.js +106 -0
  91. package/dist/core/esm/index.js.map +1 -0
  92. package/dist/core/esm/le-box.entry.js +182 -0
  93. package/dist/core/esm/le-box.entry.js.map +1 -0
  94. package/dist/core/esm/le-button.entry.js +90 -0
  95. package/dist/core/esm/le-button.entry.js.map +1 -0
  96. package/dist/core/esm/le-card.entry.js +27 -0
  97. package/dist/core/esm/le-card.entry.js.map +1 -0
  98. package/dist/core/esm/le-checkbox.entry.js +59 -0
  99. package/dist/core/esm/le-checkbox.entry.js.map +1 -0
  100. package/dist/core/esm/le-kit.js +21 -0
  101. package/dist/core/esm/le-kit.js.map +1 -0
  102. package/dist/core/esm/le-number-input.entry.js +200 -0
  103. package/dist/core/esm/le-number-input.entry.js.map +1 -0
  104. package/dist/core/esm/le-popover.entry.js +346 -0
  105. package/dist/core/esm/le-popover.entry.js.map +1 -0
  106. package/dist/core/esm/le-popup.entry.js +210 -0
  107. package/dist/core/esm/le-popup.entry.js.map +1 -0
  108. package/dist/core/esm/le-round-progress.entry.js +104 -0
  109. package/dist/core/esm/le-round-progress.entry.js.map +1 -0
  110. package/dist/core/esm/le-stack.entry.js +133 -0
  111. package/dist/core/esm/le-stack.entry.js.map +1 -0
  112. package/dist/core/esm/le-string-input.entry.js +93 -0
  113. package/dist/core/esm/le-string-input.entry.js.map +1 -0
  114. package/dist/core/esm/le-text.entry.js +333 -0
  115. package/dist/core/esm/le-text.entry.js.map +1 -0
  116. package/dist/core/esm/le-turntable.entry.js +137 -0
  117. package/dist/core/esm/le-turntable.entry.js.map +1 -0
  118. package/dist/core/esm/loader.js +11 -0
  119. package/dist/core/esm/loader.js.map +1 -0
  120. package/dist/core/esm/utils-lgjSfQP0.js +146 -0
  121. package/dist/core/esm/utils-lgjSfQP0.js.map +1 -0
  122. package/dist/core/index.cjs.js +1 -0
  123. package/dist/core/index.js +1 -0
  124. package/dist/core/le-kit/index.esm.js +2 -0
  125. package/dist/core/le-kit/index.esm.js.map +1 -0
  126. package/dist/core/le-kit/le-box.entry.esm.js.map +1 -0
  127. package/dist/core/le-kit/le-button.entry.esm.js.map +1 -0
  128. package/dist/core/le-kit/le-card.entry.esm.js.map +1 -0
  129. package/dist/core/le-kit/le-checkbox.entry.esm.js.map +1 -0
  130. package/dist/core/le-kit/le-kit.css +1 -0
  131. package/dist/core/le-kit/le-kit.esm.js +2 -0
  132. package/dist/core/le-kit/le-kit.esm.js.map +1 -0
  133. package/dist/core/le-kit/le-number-input.entry.esm.js.map +1 -0
  134. package/dist/core/le-kit/le-popover.entry.esm.js.map +1 -0
  135. package/dist/core/le-kit/le-popup.entry.esm.js.map +1 -0
  136. package/dist/core/le-kit/le-round-progress.entry.esm.js.map +1 -0
  137. package/dist/core/le-kit/le-stack.entry.esm.js.map +1 -0
  138. package/dist/core/le-kit/le-string-input.entry.esm.js.map +1 -0
  139. package/dist/core/le-kit/le-text.entry.esm.js.map +1 -0
  140. package/dist/core/le-kit/le-turntable.entry.esm.js.map +1 -0
  141. package/dist/core/le-kit/loader.esm.js.map +1 -0
  142. package/dist/core/le-kit/p-1c5262eb.entry.js +2 -0
  143. package/dist/core/le-kit/p-1c5262eb.entry.js.map +1 -0
  144. package/dist/core/le-kit/p-32c08678.entry.js +2 -0
  145. package/dist/core/le-kit/p-32c08678.entry.js.map +1 -0
  146. package/dist/core/le-kit/p-38e7ec05.entry.js +2 -0
  147. package/dist/core/le-kit/p-38e7ec05.entry.js.map +1 -0
  148. package/dist/core/le-kit/p-4bf51acc.entry.js +2 -0
  149. package/dist/core/le-kit/p-4bf51acc.entry.js.map +1 -0
  150. package/dist/core/le-kit/p-86961f34.entry.js +2 -0
  151. package/dist/core/le-kit/p-86961f34.entry.js.map +1 -0
  152. package/dist/core/le-kit/p-9ee92c29.entry.js +2 -0
  153. package/dist/core/le-kit/p-9ee92c29.entry.js.map +1 -0
  154. package/dist/core/le-kit/p-DN2JVY-7.js +2 -0
  155. package/dist/core/le-kit/p-DN2JVY-7.js.map +1 -0
  156. package/dist/core/le-kit/p-PS-3Rz-c.js +3 -0
  157. package/dist/core/le-kit/p-PS-3Rz-c.js.map +1 -0
  158. package/dist/core/le-kit/p-a07048f8.entry.js +2 -0
  159. package/dist/core/le-kit/p-a07048f8.entry.js.map +1 -0
  160. package/dist/core/le-kit/p-a24b042d.entry.js +2 -0
  161. package/dist/core/le-kit/p-a24b042d.entry.js.map +1 -0
  162. package/dist/core/le-kit/p-bbc9e13e.entry.js +2 -0
  163. package/dist/core/le-kit/p-bbc9e13e.entry.js.map +1 -0
  164. package/dist/core/le-kit/p-c4223c60.entry.js +2 -0
  165. package/dist/core/le-kit/p-c4223c60.entry.js.map +1 -0
  166. package/dist/core/le-kit/p-dcf1343d.entry.js +2 -0
  167. package/dist/core/le-kit/p-dcf1343d.entry.js.map +1 -0
  168. package/dist/core/le-kit/p-fb4e68e0.entry.js +2 -0
  169. package/dist/core/le-kit/p-fb4e68e0.entry.js.map +1 -0
  170. package/dist/core/loader/cdn.js +1 -0
  171. package/dist/core/loader/index.cjs.js +1 -0
  172. package/dist/core/loader/index.d.ts +24 -0
  173. package/dist/core/loader/index.es2017.js +1 -0
  174. package/dist/core/loader/index.js +2 -0
  175. package/dist/core/types/components/le-box/le-box.d.ts +111 -0
  176. package/dist/core/types/components/le-button/le-button.d.ts +78 -0
  177. package/dist/core/types/components/le-card/le-card.d.ts +37 -0
  178. package/dist/core/types/components/le-checkbox/le-checkbox.d.ts +46 -0
  179. package/dist/core/types/components/le-number-input/le-number-input.d.ts +106 -0
  180. package/dist/core/types/components/le-popover/le-popover.d.ts +109 -0
  181. package/dist/core/types/components/le-popup/le-popup.api.d.ts +73 -0
  182. package/dist/core/types/components/le-popup/le-popup.d.ts +122 -0
  183. package/dist/core/types/components/le-round-progress/le-round-progress.d.ts +37 -0
  184. package/dist/core/types/components/le-stack/le-stack.d.ts +73 -0
  185. package/dist/core/types/components/le-string-input/le-string-input.d.ts +83 -0
  186. package/dist/core/types/components/le-text/le-text.d.ts +141 -0
  187. package/dist/core/types/components/le-turntable/le-turntable.d.ts +55 -0
  188. package/dist/core/types/components.d.ts +1752 -0
  189. package/dist/core/types/global/app.d.ts +73 -0
  190. package/dist/core/types/index.d.ts +15 -0
  191. package/dist/core/types/stencil-public-runtime.d.ts +1756 -0
  192. package/dist/core/types/types/blocks.d.ts +136 -0
  193. package/dist/core/types/types/options.d.ts +124 -0
  194. package/dist/core/types/utils/utils.d.ts +54 -0
  195. package/dist/docs.json +8 -8
  196. package/dist/esm/index-PS-3Rz-c.js.map +1 -1
  197. package/dist/le-kit/p-PS-3Rz-c.js.map +1 -1
  198. package/package.json +19 -2
@@ -0,0 +1,184 @@
1
+ import { h } from "@stencil/core";
2
+ export class LeRoundProgress {
3
+ // host element
4
+ el;
5
+ // progress value coming from an attribute
6
+ value = 0;
7
+ updateValue(newValue) {
8
+ this.value = parseFloat(newValue);
9
+ }
10
+ // padding value coming from an attribute
11
+ padding = 0;
12
+ updatePadding(newValue) {
13
+ this.padding = parseFloat(newValue);
14
+ this.calcParams();
15
+ }
16
+ // the progress backgrounds can be as many as needed
17
+ // but it should be JSON format: double quotes and strict commas
18
+ paths;
19
+ updateProgressBackgrounds(newValue) {
20
+ this.progressPaths = JSON.parse(newValue);
21
+ }
22
+ progressPaths;
23
+ params;
24
+ /**
25
+ * Component lifecycles
26
+ *
27
+ * Before the component is loaded, we need to calculate and update params
28
+ * using the component size (width of the round progress)
29
+ * and progress width (max of )
30
+ */
31
+ componentWillLoad() {
32
+ if (typeof this.paths === 'string') {
33
+ this.updateProgressBackgrounds(this.paths);
34
+ }
35
+ this.calcParams();
36
+ }
37
+ calcParams() {
38
+ // get element width
39
+ const width = this.el.getBoundingClientRect().width;
40
+ const diameter = width - this.padding;
41
+ // calc circumference — we'll need it later to calc the stroke paths
42
+ const circumference = Math.PI * diameter;
43
+ this.params = { width, diameter, circumference };
44
+ }
45
+ /**
46
+ * Returns the viewPath attribute value for the SVG
47
+ * based on the width of the parent element
48
+ */
49
+ getViewBox() {
50
+ return '0 0 ' + this.params.width + ' ' + this.params.width;
51
+ }
52
+ /**
53
+ * Returns the circular path for the progress stroke
54
+ * and additional paths in the background
55
+ */
56
+ getPath() {
57
+ return ('M' +
58
+ this.params.width / 2 +
59
+ ' ' +
60
+ (this.params.width - this.params.diameter) / 2 +
61
+ ' a ' +
62
+ this.params.diameter / 2 +
63
+ ' ' +
64
+ this.params.diameter / 2 +
65
+ ' 0 0 1 0 ' +
66
+ this.params.diameter +
67
+ ' a ' +
68
+ this.params.diameter / 2 +
69
+ ' ' +
70
+ this.params.diameter / 2 +
71
+ ' 0 0 1 0 -' +
72
+ this.params.diameter);
73
+ }
74
+ getStrokeDashArray() {
75
+ return (this.value / 100) * this.params.circumference + ', ' + this.params.circumference;
76
+ }
77
+ getPaths() {
78
+ if (!this.progressPaths || !this.progressPaths.length) {
79
+ return null;
80
+ }
81
+ let paths = [];
82
+ this.progressPaths.forEach(bg => {
83
+ paths.push(h("path", { class: "round-progress--path", d: this.getPath(), stroke: bg.color, "stroke-width": bg.width, "stroke-dasharray": bg.dasharray, "stroke-linecap": bg.linecap }));
84
+ });
85
+ return (h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, paths));
86
+ }
87
+ render() {
88
+ return (h("div", { key: 'de00fb6044bc7499c6af118195ff8586acb00c17', class: "round-progress--container" }, this.getPaths(), h("svg", { key: 'c6750092889a484c92902c25e91ab902d9be2f8a', viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, h("path", { key: '7d6ed780e2b69708b1bc067876dce45c7c1427db', class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), h("slot", { key: '66b2c27cdddb1454b123cd146e78220f99683e6f' })));
89
+ }
90
+ static get is() { return "le-round-progress"; }
91
+ static get encapsulation() { return "shadow"; }
92
+ static get originalStyleUrls() {
93
+ return {
94
+ "$": ["le-round-progress.css"]
95
+ };
96
+ }
97
+ static get styleUrls() {
98
+ return {
99
+ "$": ["le-round-progress.css"]
100
+ };
101
+ }
102
+ static get properties() {
103
+ return {
104
+ "value": {
105
+ "type": "number",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "number",
109
+ "resolved": "number",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": ""
117
+ },
118
+ "getter": false,
119
+ "setter": false,
120
+ "reflect": false,
121
+ "attribute": "value",
122
+ "defaultValue": "0"
123
+ },
124
+ "padding": {
125
+ "type": "number",
126
+ "mutable": false,
127
+ "complexType": {
128
+ "original": "number",
129
+ "resolved": "number",
130
+ "references": {}
131
+ },
132
+ "required": false,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "getter": false,
139
+ "setter": false,
140
+ "reflect": false,
141
+ "attribute": "padding",
142
+ "defaultValue": "0"
143
+ },
144
+ "paths": {
145
+ "type": "string",
146
+ "mutable": false,
147
+ "complexType": {
148
+ "original": "string",
149
+ "resolved": "string",
150
+ "references": {}
151
+ },
152
+ "required": false,
153
+ "optional": false,
154
+ "docs": {
155
+ "tags": [],
156
+ "text": ""
157
+ },
158
+ "getter": false,
159
+ "setter": false,
160
+ "reflect": false,
161
+ "attribute": "paths"
162
+ }
163
+ };
164
+ }
165
+ static get states() {
166
+ return {
167
+ "params": {}
168
+ };
169
+ }
170
+ static get elementRef() { return "el"; }
171
+ static get watchers() {
172
+ return [{
173
+ "propName": "value",
174
+ "methodName": "updateValue"
175
+ }, {
176
+ "propName": "padding",
177
+ "methodName": "updatePadding"
178
+ }, {
179
+ "propName": "paths",
180
+ "methodName": "updateProgressBackgrounds"
181
+ }];
182
+ }
183
+ }
184
+ //# sourceMappingURL=le-round-progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-round-progress.js","sourceRoot":"","sources":["../../../src-core/components/le-round-progress/le-round-progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAO1E,MAAM,OAAO,eAAe;IAC1B,eAAe;IACJ,EAAE,CAAc;IAE3B,0CAA0C;IAClC,KAAK,GAAW,CAAC,CAAC;IAE1B,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,gBAAgB,IACpD,KAAK,CACF,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,2BAA2B;YACnC,IAAI,CAAC,QAAQ,EAAE;YAChB,4DAAK,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAC,yCAAyC;gBAC9E,6DAAM,KAAK,EAAC,wBAAwB,sBAAmB,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,GAAI,CACnG;YACN,8DAAQ,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'le-round-progress',\n styleUrl: 'le-round-progress.css',\n shadow: true,\n})\nexport class LeRoundProgress {\n // host element\n @Element() el: HTMLElement;\n\n // progress value coming from an attribute\n @Prop() value: number = 0;\n @Watch('value')\n updateValue(newValue: string) {\n this.value = parseFloat(newValue);\n }\n\n // padding value coming from an attribute\n @Prop() padding: number = 0;\n @Watch('padding')\n updatePadding(newValue: string) {\n this.padding = parseFloat(newValue);\n this.calcParams();\n }\n\n // the progress backgrounds can be as many as needed\n // but it should be JSON format: double quotes and strict commas\n @Prop() paths: string;\n @Watch('paths')\n updateProgressBackgrounds(newValue: string) {\n this.progressPaths = JSON.parse(newValue);\n }\n progressPaths: any[];\n\n @State() params: {\n width: number;\n diameter: number;\n circumference: number;\n };\n\n /**\n * Component lifecycles\n *\n * Before the component is loaded, we need to calculate and update params\n * using the component size (width of the round progress)\n * and progress width (max of )\n */\n componentWillLoad() {\n if (typeof this.paths === 'string') {\n this.updateProgressBackgrounds(this.paths);\n }\n this.calcParams();\n }\n\n calcParams() {\n // get element width\n const width = this.el.getBoundingClientRect().width;\n const diameter = width - this.padding;\n // calc circumference — we'll need it later to calc the stroke paths\n const circumference = Math.PI * diameter;\n\n this.params = { width, diameter, circumference };\n }\n\n /**\n * Returns the viewPath attribute value for the SVG\n * based on the width of the parent element\n */\n getViewBox() {\n return '0 0 ' + this.params.width + ' ' + this.params.width;\n }\n\n /**\n * Returns the circular path for the progress stroke\n * and additional paths in the background\n */\n getPath() {\n return (\n 'M' +\n this.params.width / 2 +\n ' ' +\n (this.params.width - this.params.diameter) / 2 +\n ' a ' +\n this.params.diameter / 2 +\n ' ' +\n this.params.diameter / 2 +\n ' 0 0 1 0 ' +\n this.params.diameter +\n ' a ' +\n this.params.diameter / 2 +\n ' ' +\n this.params.diameter / 2 +\n ' 0 0 1 0 -' +\n this.params.diameter\n );\n }\n\n getStrokeDashArray() {\n return (this.value / 100) * this.params.circumference + ', ' + this.params.circumference;\n }\n\n getPaths() {\n if (!this.progressPaths || !this.progressPaths.length) {\n return null;\n }\n let paths = [];\n this.progressPaths.forEach(bg => {\n paths.push(<path class=\"round-progress--path\" d={this.getPath()} stroke={bg.color} stroke-width={bg.width} stroke-dasharray={bg.dasharray} stroke-linecap={bg.linecap} />);\n });\n return (\n <svg viewBox={this.getViewBox()} class=\"round-progress\">\n {paths}\n </svg>\n );\n }\n\n render() {\n return (\n <div class=\"round-progress--container\">\n {this.getPaths()}\n <svg viewBox={this.getViewBox()} class=\"round-progress round-progress--progress\">\n <path class=\"round-progress--circle\" stroke-dasharray={this.getStrokeDashArray()} d={this.getPath()} />\n </svg>\n <slot />\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * le-stack default styles
3
+ *
4
+ * The component uses inline styles for flex properties to allow
5
+ * dynamic prop-based configuration. This CSS handles theming.
6
+ */
7
+
8
+ :host {
9
+ display: block;
10
+ }
11
+
12
+ :host([hidden]) {
13
+ display: none;
14
+ }
15
+
16
+ /* Base stack container */
17
+ .stack {
18
+ gap: var(--le-stack-gap, var(--le-space-md));
19
+ }
20
+
21
+ /* Full width/height variants */
22
+ :host(.full-width) {
23
+ width: 100%;
24
+ }
25
+
26
+ :host(.full-height) {
27
+ height: 100%;
28
+ }
29
+
30
+ /* Direction-specific defaults */
31
+ :host(.direction-horizontal) .stack {
32
+ min-height: 0;
33
+ }
34
+
35
+ :host(.direction-vertical) .stack {
36
+ min-width: 0;
37
+ }
@@ -0,0 +1,389 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { classnames } from "../../utils/utils";
3
+ /**
4
+ * A flexible stack layout component using CSS flexbox.
5
+ *
6
+ * `le-stack` arranges its children in a row (horizontal) or column (vertical)
7
+ * with configurable spacing, alignment, and wrapping behavior. Perfect for
8
+ * creating responsive layouts.
9
+ *
10
+ * @slot - Default slot for stack items (le-box components recommended)
11
+ *
12
+ * @cssprop --le-stack-gap - Gap between items (defaults to var(--le-space-md))
13
+ *
14
+ * @csspart stack - The main stack container
15
+ *
16
+ * @cmsEditable true
17
+ * @cmsCategory Layout
18
+ */
19
+ export class LeStack {
20
+ el;
21
+ /**
22
+ * Direction of the stack layout
23
+ * @allowedValues horizontal | vertical
24
+ */
25
+ direction = 'horizontal';
26
+ /**
27
+ * Gap between items (CSS value like '8px', '1rem', 'var(--le-space-md)')
28
+ */
29
+ gap;
30
+ /**
31
+ * Alignment of items on the cross axis
32
+ * @allowedValues start | center | end | stretch | baseline
33
+ */
34
+ align = 'stretch';
35
+ /**
36
+ * Distribution of items on the main axis
37
+ * @allowedValues start | center | end | space-between | space-around | space-evenly
38
+ */
39
+ justify = 'start';
40
+ /**
41
+ * Whether items should wrap to multiple lines
42
+ */
43
+ wrap = false;
44
+ /**
45
+ * Alignment of wrapped lines (only applies when wrap is true)
46
+ * @allowedValues start | center | end | stretch | space-between | space-around
47
+ */
48
+ alignContent = 'stretch';
49
+ /**
50
+ * Whether to reverse the order of items
51
+ */
52
+ reverse = false;
53
+ /**
54
+ * Maximum number of items allowed in the stack (for CMS validation)
55
+ * @min 1
56
+ */
57
+ maxItems;
58
+ /**
59
+ * Whether the stack should take full width of its container
60
+ */
61
+ fullWidth = false;
62
+ /**
63
+ * Whether the stack should take full height of its container
64
+ */
65
+ fullHeight = false;
66
+ /**
67
+ * Padding inside the stack container (CSS value)
68
+ */
69
+ padding;
70
+ getFlexDirection() {
71
+ const base = this.direction === 'vertical' ? 'column' : 'row';
72
+ return this.reverse ? `${base}-reverse` : base;
73
+ }
74
+ getAlignItems() {
75
+ const alignMap = {
76
+ start: 'flex-start',
77
+ center: 'center',
78
+ end: 'flex-end',
79
+ stretch: 'stretch',
80
+ baseline: 'baseline',
81
+ };
82
+ return alignMap[this.align] || 'stretch';
83
+ }
84
+ getJustifyContent() {
85
+ const justifyMap = {
86
+ start: 'flex-start',
87
+ center: 'center',
88
+ end: 'flex-end',
89
+ 'space-between': 'space-between',
90
+ 'space-around': 'space-around',
91
+ 'space-evenly': 'space-evenly',
92
+ };
93
+ return justifyMap[this.justify] || 'flex-start';
94
+ }
95
+ getAlignContent() {
96
+ const alignContentMap = {
97
+ start: 'flex-start',
98
+ center: 'center',
99
+ end: 'flex-end',
100
+ stretch: 'stretch',
101
+ 'space-between': 'space-between',
102
+ 'space-around': 'space-around',
103
+ };
104
+ return alignContentMap[this.alignContent] || 'stretch';
105
+ }
106
+ render() {
107
+ const style = {
108
+ display: 'flex',
109
+ flexDirection: this.getFlexDirection(),
110
+ alignItems: this.getAlignItems(),
111
+ justifyContent: this.getJustifyContent(),
112
+ flexWrap: this.wrap ? 'wrap' : 'nowrap',
113
+ };
114
+ if (this.wrap) {
115
+ style.alignContent = this.getAlignContent();
116
+ }
117
+ if (this.gap) {
118
+ style.gap = this.gap;
119
+ }
120
+ if (this.padding) {
121
+ style.padding = this.padding;
122
+ }
123
+ // if (this.fullWidth) {
124
+ // style.width = '100%';
125
+ // }
126
+ // if (this.fullHeight) {
127
+ // style.height = '100%';
128
+ // }
129
+ const hostClass = classnames(`direction-${this.direction}`, {
130
+ 'wrap': this.wrap,
131
+ 'reverse': this.reverse,
132
+ 'full-width': this.fullWidth,
133
+ 'full-height': this.fullHeight,
134
+ });
135
+ // Slot style for admin mode - make items display in the same direction
136
+ const slotStyle = `display: flex; flex-direction: ${this.getFlexDirection()}; gap: ${this.gap || 'var(--le-space-md)'}; flex-wrap: ${this.wrap ? 'wrap' : 'nowrap'}; justify-content: ${this.getJustifyContent()}; align-items: ${this.getAlignItems()};`;
137
+ return (h(Host, { key: '2cb4f4d86677c74c2db364f5d401d7911067c9d2', class: hostClass }, h("div", { key: '4f3a69840cf5c1efd22ef3bb9d18198f8d578a20', class: "stack", part: "stack", style: style }, h("slot", { key: 'ce93b2e01cb09e5351839894464f8f64e203f98e' }))));
138
+ }
139
+ static get is() { return "le-stack"; }
140
+ static get encapsulation() { return "shadow"; }
141
+ static get originalStyleUrls() {
142
+ return {
143
+ "$": ["le-stack.default.css"]
144
+ };
145
+ }
146
+ static get styleUrls() {
147
+ return {
148
+ "$": ["le-stack.default.css"]
149
+ };
150
+ }
151
+ static get properties() {
152
+ return {
153
+ "direction": {
154
+ "type": "string",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "'horizontal' | 'vertical'",
158
+ "resolved": "\"horizontal\" | \"vertical\"",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [{
165
+ "name": "allowedValues",
166
+ "text": "horizontal | vertical"
167
+ }],
168
+ "text": "Direction of the stack layout"
169
+ },
170
+ "getter": false,
171
+ "setter": false,
172
+ "reflect": false,
173
+ "attribute": "direction",
174
+ "defaultValue": "'horizontal'"
175
+ },
176
+ "gap": {
177
+ "type": "string",
178
+ "mutable": false,
179
+ "complexType": {
180
+ "original": "string",
181
+ "resolved": "string",
182
+ "references": {}
183
+ },
184
+ "required": false,
185
+ "optional": true,
186
+ "docs": {
187
+ "tags": [],
188
+ "text": "Gap between items (CSS value like '8px', '1rem', 'var(--le-space-md)')"
189
+ },
190
+ "getter": false,
191
+ "setter": false,
192
+ "reflect": false,
193
+ "attribute": "gap"
194
+ },
195
+ "align": {
196
+ "type": "string",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "'start' | 'center' | 'end' | 'stretch' | 'baseline'",
200
+ "resolved": "\"baseline\" | \"center\" | \"end\" | \"start\" | \"stretch\"",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [{
207
+ "name": "allowedValues",
208
+ "text": "start | center | end | stretch | baseline"
209
+ }],
210
+ "text": "Alignment of items on the cross axis"
211
+ },
212
+ "getter": false,
213
+ "setter": false,
214
+ "reflect": false,
215
+ "attribute": "align",
216
+ "defaultValue": "'stretch'"
217
+ },
218
+ "justify": {
219
+ "type": "string",
220
+ "mutable": false,
221
+ "complexType": {
222
+ "original": "'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly'",
223
+ "resolved": "\"center\" | \"end\" | \"space-around\" | \"space-between\" | \"space-evenly\" | \"start\"",
224
+ "references": {}
225
+ },
226
+ "required": false,
227
+ "optional": false,
228
+ "docs": {
229
+ "tags": [{
230
+ "name": "allowedValues",
231
+ "text": "start | center | end | space-between | space-around | space-evenly"
232
+ }],
233
+ "text": "Distribution of items on the main axis"
234
+ },
235
+ "getter": false,
236
+ "setter": false,
237
+ "reflect": false,
238
+ "attribute": "justify",
239
+ "defaultValue": "'start'"
240
+ },
241
+ "wrap": {
242
+ "type": "boolean",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "boolean",
246
+ "resolved": "boolean",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": false,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "Whether items should wrap to multiple lines"
254
+ },
255
+ "getter": false,
256
+ "setter": false,
257
+ "reflect": false,
258
+ "attribute": "wrap",
259
+ "defaultValue": "false"
260
+ },
261
+ "alignContent": {
262
+ "type": "string",
263
+ "mutable": false,
264
+ "complexType": {
265
+ "original": "'start' | 'center' | 'end' | 'stretch' | 'space-between' | 'space-around'",
266
+ "resolved": "\"center\" | \"end\" | \"space-around\" | \"space-between\" | \"start\" | \"stretch\"",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [{
273
+ "name": "allowedValues",
274
+ "text": "start | center | end | stretch | space-between | space-around"
275
+ }],
276
+ "text": "Alignment of wrapped lines (only applies when wrap is true)"
277
+ },
278
+ "getter": false,
279
+ "setter": false,
280
+ "reflect": false,
281
+ "attribute": "align-content",
282
+ "defaultValue": "'stretch'"
283
+ },
284
+ "reverse": {
285
+ "type": "boolean",
286
+ "mutable": false,
287
+ "complexType": {
288
+ "original": "boolean",
289
+ "resolved": "boolean",
290
+ "references": {}
291
+ },
292
+ "required": false,
293
+ "optional": false,
294
+ "docs": {
295
+ "tags": [],
296
+ "text": "Whether to reverse the order of items"
297
+ },
298
+ "getter": false,
299
+ "setter": false,
300
+ "reflect": false,
301
+ "attribute": "reverse",
302
+ "defaultValue": "false"
303
+ },
304
+ "maxItems": {
305
+ "type": "number",
306
+ "mutable": false,
307
+ "complexType": {
308
+ "original": "number",
309
+ "resolved": "number",
310
+ "references": {}
311
+ },
312
+ "required": false,
313
+ "optional": true,
314
+ "docs": {
315
+ "tags": [{
316
+ "name": "min",
317
+ "text": "1"
318
+ }],
319
+ "text": "Maximum number of items allowed in the stack (for CMS validation)"
320
+ },
321
+ "getter": false,
322
+ "setter": false,
323
+ "reflect": false,
324
+ "attribute": "max-items"
325
+ },
326
+ "fullWidth": {
327
+ "type": "boolean",
328
+ "mutable": false,
329
+ "complexType": {
330
+ "original": "boolean",
331
+ "resolved": "boolean",
332
+ "references": {}
333
+ },
334
+ "required": false,
335
+ "optional": false,
336
+ "docs": {
337
+ "tags": [],
338
+ "text": "Whether the stack should take full width of its container"
339
+ },
340
+ "getter": false,
341
+ "setter": false,
342
+ "reflect": false,
343
+ "attribute": "full-width",
344
+ "defaultValue": "false"
345
+ },
346
+ "fullHeight": {
347
+ "type": "boolean",
348
+ "mutable": false,
349
+ "complexType": {
350
+ "original": "boolean",
351
+ "resolved": "boolean",
352
+ "references": {}
353
+ },
354
+ "required": false,
355
+ "optional": false,
356
+ "docs": {
357
+ "tags": [],
358
+ "text": "Whether the stack should take full height of its container"
359
+ },
360
+ "getter": false,
361
+ "setter": false,
362
+ "reflect": false,
363
+ "attribute": "full-height",
364
+ "defaultValue": "false"
365
+ },
366
+ "padding": {
367
+ "type": "string",
368
+ "mutable": false,
369
+ "complexType": {
370
+ "original": "string",
371
+ "resolved": "string",
372
+ "references": {}
373
+ },
374
+ "required": false,
375
+ "optional": true,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": "Padding inside the stack container (CSS value)"
379
+ },
380
+ "getter": false,
381
+ "setter": false,
382
+ "reflect": false,
383
+ "attribute": "padding"
384
+ }
385
+ };
386
+ }
387
+ static get elementRef() { return "el"; }
388
+ }
389
+ //# sourceMappingURL=le-stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-stack.js","sourceRoot":"","sources":["../../../src-core/components/le-stack/le-stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAG,IAAI,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,OAAO;IACP,EAAE,CAAc;IAE3B;;;OAGG;IACK,SAAS,GAA8B,YAAY,CAAC;IAE5D;;OAEG;IACK,GAAG,CAAU;IAErB;;;OAGG;IACK,KAAK,GAAwD,SAAS,CAAC;IAE/E;;;OAGG;IACK,OAAO,GAAmF,OAAO,CAAC;IAE1G;;OAEG;IACK,IAAI,GAAY,KAAK,CAAC;IAE9B;;;OAGG;IACK,YAAY,GAA8E,SAAS,CAAC;IAE5G;;OAEG;IACK,OAAO,GAAY,KAAK,CAAC;IAEjC;;;OAGG;IACK,QAAQ,CAAU;IAE1B;;OAEG;IACK,SAAS,GAAY,KAAK,CAAC;IAEn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X,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element , Host } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible stack layout component using CSS flexbox.\n *\n * `le-stack` arranges its children in a row (horizontal) or column (vertical)\n * with configurable spacing, alignment, and wrapping behavior. Perfect for\n * creating responsive layouts.\n *\n * @slot - Default slot for stack items (le-box components recommended)\n *\n * @cssprop --le-stack-gap - Gap between items (defaults to var(--le-space-md))\n *\n * @csspart stack - The main stack container\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-stack',\n styleUrl: 'le-stack.default.css',\n shadow: true,\n})\nexport class LeStack {\n @Element() el: HTMLElement;\n\n /**\n * Direction of the stack layout\n * @allowedValues horizontal | vertical\n */\n @Prop() direction: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Gap between items (CSS value like '8px', '1rem', 'var(--le-space-md)')\n */\n @Prop() gap?: string;\n\n /**\n * Alignment of items on the cross axis\n * @allowedValues start | center | end | stretch | baseline\n */\n @Prop() align: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'stretch';\n\n /**\n * Distribution of items on the main axis\n * @allowedValues start | center | end | space-between | space-around | space-evenly\n */\n @Prop() justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly' = 'start';\n\n /**\n * Whether items should wrap to multiple lines\n */\n @Prop() wrap: boolean = false;\n\n /**\n * Alignment of wrapped lines (only applies when wrap is true)\n * @allowedValues start | center | end | stretch | space-between | space-around\n */\n @Prop() alignContent: 'start' | 'center' | 'end' | 'stretch' | 'space-between' | 'space-around' = 'stretch';\n\n /**\n * Whether to reverse the order of items\n */\n @Prop() reverse: boolean = false;\n\n /**\n * Maximum number of items allowed in the stack (for CMS validation)\n * @min 1\n */\n @Prop() maxItems?: number;\n\n /**\n * Whether the stack should take full width of its container\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * Whether the stack should take full height of its container\n */\n @Prop() fullHeight: boolean = false;\n\n /**\n * Padding inside the stack container (CSS value)\n */\n @Prop() padding?: string;\n\n private getFlexDirection(): string {\n const base = this.direction === 'vertical' ? 'column' : 'row';\n return this.reverse ? `${base}-reverse` : base;\n }\n\n private getAlignItems(): string {\n const alignMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n };\n return alignMap[this.align] || 'stretch';\n }\n\n private getJustifyContent(): string {\n const justifyMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n 'space-between': 'space-between',\n 'space-around': 'space-around',\n 'space-evenly': 'space-evenly',\n };\n return justifyMap[this.justify] || 'flex-start';\n }\n\n private getAlignContent(): string {\n const alignContentMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n 'space-between': 'space-between',\n 'space-around': 'space-around',\n };\n return alignContentMap[this.alignContent] || 'stretch';\n }\n\n render() {\n const style: { [key: string]: string } = {\n display: 'flex',\n flexDirection: this.getFlexDirection(),\n alignItems: this.getAlignItems(),\n justifyContent: this.getJustifyContent(),\n flexWrap: this.wrap ? 'wrap' : 'nowrap',\n };\n\n if (this.wrap) {\n style.alignContent = this.getAlignContent();\n }\n\n if (this.gap) {\n style.gap = this.gap;\n }\n\n if (this.padding) {\n style.padding = this.padding;\n }\n\n // if (this.fullWidth) {\n // style.width = '100%';\n // }\n\n // if (this.fullHeight) {\n // style.height = '100%';\n // }\n\n const hostClass = classnames(\n `direction-${this.direction}`,\n {\n 'wrap': this.wrap,\n 'reverse': this.reverse,\n 'full-width': this.fullWidth,\n 'full-height': this.fullHeight,\n }\n );\n\n // Slot style for admin mode - make items display in the same direction\n const slotStyle = `display: flex; flex-direction: ${this.getFlexDirection()}; gap: ${this.gap || 'var(--le-space-md)'}; flex-wrap: ${this.wrap ? 'wrap' : 'nowrap'}; justify-content: ${this.getJustifyContent()}; align-items: ${this.getAlignItems()};`;\n\n return (\n <Host class={hostClass}>\n <div class=\"stack\" part=\"stack\" style={style}>\n \n <slot></slot>\n \n </div>\n </Host>\n );\n }\n}\n"]}