le-kit 0.0.3 → 0.1.1

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 (357) hide show
  1. package/LICENSE +1 -1
  2. package/dist/admin/index.d.ts +25 -0
  3. package/dist/admin/index.js +80 -0
  4. package/dist/cjs/index-CO4npcak.js +1796 -0
  5. package/dist/cjs/index-CO4npcak.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +117 -0
  7. package/dist/cjs/index.cjs.js.map +1 -0
  8. package/dist/cjs/le-box.cjs.entry.js +184 -0
  9. package/dist/cjs/le-box.entry.cjs.js.map +1 -0
  10. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +1 -0
  11. package/dist/cjs/le-button_6.cjs.entry.js +1199 -0
  12. package/dist/cjs/le-card.cjs.entry.js +29 -0
  13. package/dist/cjs/le-card.entry.cjs.js.map +1 -0
  14. package/dist/cjs/le-kit.cjs.js +25 -0
  15. package/dist/cjs/le-kit.cjs.js.map +1 -0
  16. package/dist/cjs/le-number-input.cjs.entry.js +202 -0
  17. package/dist/cjs/le-number-input.entry.cjs.js.map +1 -0
  18. package/dist/cjs/le-popup.cjs.entry.js +212 -0
  19. package/dist/cjs/le-popup.entry.cjs.js.map +1 -0
  20. package/dist/cjs/le-round-progress.cjs.entry.js +106 -0
  21. package/dist/cjs/le-round-progress.entry.cjs.js.map +1 -0
  22. package/dist/cjs/le-stack.cjs.entry.js +135 -0
  23. package/dist/cjs/le-stack.entry.cjs.js.map +1 -0
  24. package/dist/cjs/le-text.cjs.entry.js +335 -0
  25. package/dist/cjs/le-text.entry.cjs.js.map +1 -0
  26. package/dist/cjs/le-turntable.cjs.entry.js +139 -0
  27. package/dist/cjs/le-turntable.entry.cjs.js.map +1 -0
  28. package/dist/cjs/loader.cjs.js +13 -0
  29. package/dist/cjs/loader.cjs.js.map +1 -0
  30. package/dist/cjs/utils-BeT0iyCQ.js +152 -0
  31. package/dist/cjs/utils-BeT0iyCQ.js.map +1 -0
  32. package/dist/collection/collection-manifest.json +20 -102
  33. package/dist/collection/components/le-box/le-box.default.css +37 -0
  34. package/dist/collection/components/le-box/le-box.js +614 -0
  35. package/dist/collection/components/le-box/le-box.js.map +1 -0
  36. package/dist/collection/components/le-button/le-button.default.css +263 -0
  37. package/dist/collection/components/le-button/le-button.js +368 -0
  38. package/dist/collection/components/le-button/le-button.js.map +1 -0
  39. package/dist/collection/components/le-card/le-card.default.css +74 -0
  40. package/dist/collection/components/le-card/le-card.js +102 -0
  41. package/dist/collection/components/le-card/le-card.js.map +1 -0
  42. package/dist/collection/components/le-checkbox/le-checkbox.css +93 -0
  43. package/dist/collection/components/le-checkbox/le-checkbox.js +192 -0
  44. package/dist/collection/components/le-checkbox/le-checkbox.js.map +1 -0
  45. package/dist/collection/components/le-component/le-component.css +189 -0
  46. package/dist/collection/components/le-component/le-component.js +359 -0
  47. package/dist/collection/components/le-component/le-component.js.map +1 -0
  48. package/dist/collection/components/le-number-input/le-number-input.css +135 -0
  49. package/dist/collection/components/le-number-input/le-number-input.js +515 -0
  50. package/dist/collection/components/le-number-input/le-number-input.js.map +1 -0
  51. package/dist/collection/components/le-popover/le-popover.css +143 -0
  52. package/dist/collection/components/le-popover/le-popover.js +693 -0
  53. package/dist/collection/components/le-popover/le-popover.js.map +1 -0
  54. package/dist/collection/components/le-popup/le-popup.api.js +101 -0
  55. package/dist/collection/components/le-popup/le-popup.api.js.map +1 -0
  56. package/dist/collection/components/le-popup/le-popup.css +222 -0
  57. package/dist/collection/components/le-popup/le-popup.js +596 -0
  58. package/dist/collection/components/le-popup/le-popup.js.map +1 -0
  59. package/dist/collection/components/le-round-progress/le-round-progress.js +184 -84
  60. package/dist/collection/components/le-round-progress/le-round-progress.js.map +1 -0
  61. package/dist/collection/components/le-slot/le-slot.default.css +222 -0
  62. package/dist/collection/components/le-slot/le-slot.js +636 -0
  63. package/dist/collection/components/le-slot/le-slot.js.map +1 -0
  64. package/dist/collection/components/le-stack/le-stack.default.css +37 -0
  65. package/dist/collection/components/le-stack/le-stack.js +389 -0
  66. package/dist/collection/components/le-stack/le-stack.js.map +1 -0
  67. package/dist/collection/components/le-string-input/le-string-input.css +83 -0
  68. package/dist/collection/components/le-string-input/le-string-input.js +359 -0
  69. package/dist/collection/components/le-string-input/le-string-input.js.map +1 -0
  70. package/dist/collection/components/le-text/le-text.default.css +169 -0
  71. package/dist/collection/components/le-text/le-text.js +475 -0
  72. package/dist/collection/components/le-text/le-text.js.map +1 -0
  73. package/dist/collection/components/le-turntable/le-turntable.js +210 -102
  74. package/dist/collection/components/le-turntable/le-turntable.js.map +1 -0
  75. package/dist/collection/global/app.js +130 -0
  76. package/dist/collection/global/app.js.map +1 -0
  77. package/dist/collection/index-admin.js +27 -0
  78. package/dist/collection/index-admin.js.map +1 -0
  79. package/dist/collection/index-core.js +25 -0
  80. package/dist/collection/index-core.js.map +1 -0
  81. package/dist/collection/index.js +15 -0
  82. package/dist/collection/index.js.map +1 -0
  83. package/dist/collection/types/blocks.js +115 -0
  84. package/dist/collection/types/blocks.js.map +1 -0
  85. package/dist/collection/types/options.js +2 -0
  86. package/dist/collection/types/options.js.map +1 -0
  87. package/dist/collection/utils/utils.js +141 -5
  88. package/dist/collection/utils/utils.js.map +1 -0
  89. package/dist/components/index.d.ts +64 -0
  90. package/dist/components/index.js +127 -0
  91. package/dist/components/index.js.map +1 -0
  92. package/dist/components/le-box.d.ts +11 -0
  93. package/dist/components/le-box.js +256 -0
  94. package/dist/components/le-box.js.map +1 -0
  95. package/dist/components/le-button.d.ts +11 -0
  96. package/dist/components/le-button.js +9 -0
  97. package/dist/components/le-button.js.map +1 -0
  98. package/dist/components/le-button2.js +1408 -0
  99. package/dist/components/le-button2.js.map +1 -0
  100. package/dist/components/le-card.d.ts +11 -0
  101. package/dist/components/le-card.js +83 -0
  102. package/dist/components/le-card.js.map +1 -0
  103. package/dist/components/le-checkbox.d.ts +11 -0
  104. package/dist/components/le-checkbox.js +9 -0
  105. package/dist/components/le-checkbox.js.map +1 -0
  106. package/dist/components/le-component.d.ts +11 -0
  107. package/dist/components/le-component.js +9 -0
  108. package/dist/components/le-component.js.map +1 -0
  109. package/dist/components/le-number-input.d.ts +11 -0
  110. package/dist/components/le-number-input.js +271 -0
  111. package/dist/components/le-number-input.js.map +1 -0
  112. package/dist/components/le-popover.d.ts +11 -0
  113. package/dist/components/le-popover.js +9 -0
  114. package/dist/components/le-popover.js.map +1 -0
  115. package/dist/components/le-popover2.js +382 -0
  116. package/dist/components/le-popover2.js.map +1 -0
  117. package/dist/components/le-popup.d.ts +11 -0
  118. package/dist/components/le-popup.js +279 -0
  119. package/dist/components/le-popup.js.map +1 -0
  120. package/dist/components/le-round-progress.d.ts +11 -0
  121. package/dist/components/le-round-progress.js +135 -0
  122. package/dist/components/le-round-progress.js.map +1 -0
  123. package/dist/components/le-slot.d.ts +11 -0
  124. package/dist/components/le-slot.js +9 -0
  125. package/dist/components/le-slot.js.map +1 -0
  126. package/dist/components/le-stack.d.ts +11 -0
  127. package/dist/components/le-stack.js +198 -0
  128. package/dist/components/le-stack.js.map +1 -0
  129. package/dist/components/le-string-input.d.ts +11 -0
  130. package/dist/components/le-string-input.js +9 -0
  131. package/dist/components/le-string-input.js.map +1 -0
  132. package/dist/components/le-text.d.ts +11 -0
  133. package/dist/components/le-text.js +398 -0
  134. package/dist/components/le-text.js.map +1 -0
  135. package/dist/components/le-turntable.d.ts +11 -0
  136. package/dist/components/le-turntable.js +164 -0
  137. package/dist/components/le-turntable.js.map +1 -0
  138. package/dist/core/components/index.d.ts +64 -0
  139. package/dist/core/components/index.js +127 -0
  140. package/dist/core/components/index.js.map +1 -0
  141. package/dist/core/components/le-box.d.ts +11 -0
  142. package/dist/core/components/le-box.js +246 -0
  143. package/dist/core/components/le-box.js.map +1 -0
  144. package/dist/core/components/le-button.d.ts +11 -0
  145. package/dist/core/components/le-button.js +9 -0
  146. package/dist/core/components/le-button.js.map +1 -0
  147. package/dist/core/components/le-button2.js +1358 -0
  148. package/dist/core/components/le-button2.js.map +1 -0
  149. package/dist/core/components/le-card.d.ts +11 -0
  150. package/dist/core/components/le-card.js +73 -0
  151. package/dist/core/components/le-card.js.map +1 -0
  152. package/dist/core/components/le-checkbox.d.ts +11 -0
  153. package/dist/core/components/le-checkbox.js +9 -0
  154. package/dist/core/components/le-checkbox.js.map +1 -0
  155. package/dist/core/components/le-component.js.map +1 -0
  156. package/dist/core/components/le-number-input.d.ts +11 -0
  157. package/dist/core/components/le-number-input.js +261 -0
  158. package/dist/core/components/le-number-input.js.map +1 -0
  159. package/dist/core/components/le-popover.d.ts +11 -0
  160. package/dist/core/components/le-popover.js +9 -0
  161. package/dist/core/components/le-popover.js.map +1 -0
  162. package/dist/core/components/le-popover2.js +382 -0
  163. package/dist/core/components/le-popover2.js.map +1 -0
  164. package/dist/core/components/le-popup.d.ts +11 -0
  165. package/dist/core/components/le-popup.js +269 -0
  166. package/dist/core/components/le-popup.js.map +1 -0
  167. package/dist/core/components/le-round-progress.d.ts +11 -0
  168. package/dist/core/components/le-round-progress.js +135 -0
  169. package/dist/core/components/le-round-progress.js.map +1 -0
  170. package/dist/core/components/le-slot.js.map +1 -0
  171. package/dist/core/components/le-stack.d.ts +11 -0
  172. package/dist/core/components/le-stack.js +188 -0
  173. package/dist/core/components/le-stack.js.map +1 -0
  174. package/dist/core/components/le-string-input.d.ts +11 -0
  175. package/dist/core/components/le-string-input.js +9 -0
  176. package/dist/core/components/le-string-input.js.map +1 -0
  177. package/dist/core/components/le-text.d.ts +11 -0
  178. package/dist/core/components/le-text.js +388 -0
  179. package/dist/core/components/le-text.js.map +1 -0
  180. package/dist/core/components/le-turntable.d.ts +11 -0
  181. package/dist/core/components/le-turntable.js +164 -0
  182. package/dist/core/components/le-turntable.js.map +1 -0
  183. package/dist/core/index.d.ts +23 -0
  184. package/dist/core/index.js +74 -0
  185. package/dist/core/stencil-runtime.js +1 -0
  186. package/dist/docs.d.ts +443 -0
  187. package/dist/docs.json +5185 -0
  188. package/dist/esm/index-D71TXvJa.js +1781 -0
  189. package/dist/esm/index-D71TXvJa.js.map +1 -0
  190. package/dist/esm/index.js +105 -5
  191. package/dist/esm/index.js.map +1 -0
  192. package/dist/esm/le-box.entry.js +182 -0
  193. package/dist/esm/le-box.entry.js.map +1 -0
  194. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +1 -0
  195. package/dist/esm/le-button_6.entry.js +1192 -0
  196. package/dist/esm/le-card.entry.js +27 -0
  197. package/dist/esm/le-card.entry.js.map +1 -0
  198. package/dist/esm/le-kit.js +21 -0
  199. package/dist/esm/le-kit.js.map +1 -0
  200. package/dist/esm/le-number-input.entry.js +200 -0
  201. package/dist/esm/le-number-input.entry.js.map +1 -0
  202. package/dist/esm/le-popup.entry.js +210 -0
  203. package/dist/esm/le-popup.entry.js.map +1 -0
  204. package/dist/esm/le-round-progress.entry.js +104 -0
  205. package/dist/esm/le-round-progress.entry.js.map +1 -0
  206. package/dist/esm/le-stack.entry.js +133 -0
  207. package/dist/esm/le-stack.entry.js.map +1 -0
  208. package/dist/esm/le-text.entry.js +333 -0
  209. package/dist/esm/le-text.entry.js.map +1 -0
  210. package/dist/esm/le-turntable.entry.js +137 -0
  211. package/dist/esm/le-turntable.entry.js.map +1 -0
  212. package/dist/esm/loader.js +11 -0
  213. package/dist/esm/loader.js.map +1 -0
  214. package/dist/esm/utils-CJLZrrdC.js +146 -0
  215. package/dist/esm/utils-CJLZrrdC.js.map +1 -0
  216. package/dist/index.cjs.js +1 -0
  217. package/dist/index.js +1 -2
  218. package/dist/le-kit/index-D21JjI31.js.map +1 -0
  219. package/dist/le-kit/index.esm.js +2 -0
  220. package/dist/le-kit/index.esm.js.map +1 -0
  221. package/dist/le-kit/le-box.entry.esm.js.map +1 -0
  222. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +1 -0
  223. package/dist/le-kit/le-card.entry.esm.js.map +1 -0
  224. package/dist/le-kit/le-kit.css +1 -0
  225. package/dist/le-kit/le-kit.esm.js +2 -0
  226. package/dist/le-kit/le-kit.esm.js.map +1 -0
  227. package/dist/le-kit/le-number-input.entry.esm.js.map +1 -0
  228. package/dist/le-kit/le-popup.entry.esm.js.map +1 -0
  229. package/dist/le-kit/le-round-progress.entry.esm.js.map +1 -0
  230. package/dist/le-kit/le-stack.entry.esm.js.map +1 -0
  231. package/dist/le-kit/le-text.entry.esm.js.map +1 -0
  232. package/dist/le-kit/le-turntable.entry.esm.js.map +1 -0
  233. package/dist/le-kit/loader.esm.js.map +1 -0
  234. package/dist/le-kit/p-024a764e.entry.js +2 -0
  235. package/dist/le-kit/p-024a764e.entry.js.map +1 -0
  236. package/dist/le-kit/p-073cf0b9.entry.js +2 -0
  237. package/dist/le-kit/p-073cf0b9.entry.js.map +1 -0
  238. package/dist/le-kit/p-0955b105.entry.js +2 -0
  239. package/dist/le-kit/p-0955b105.entry.js.map +1 -0
  240. package/dist/le-kit/p-18d79ee2.entry.js +2 -0
  241. package/dist/le-kit/p-18d79ee2.entry.js.map +1 -0
  242. package/dist/le-kit/p-4b1d3b6d.entry.js +2 -0
  243. package/dist/le-kit/p-4b1d3b6d.entry.js.map +1 -0
  244. package/dist/le-kit/p-79d179bd.entry.js +2 -0
  245. package/dist/le-kit/p-79d179bd.entry.js.map +1 -0
  246. package/dist/le-kit/p-D71TXvJa.js +3 -0
  247. package/dist/le-kit/p-D71TXvJa.js.map +1 -0
  248. package/dist/le-kit/p-c8a9288e.entry.js +2 -0
  249. package/dist/le-kit/p-c8a9288e.entry.js.map +1 -0
  250. package/dist/le-kit/p-cfc35bd3.entry.js +2 -0
  251. package/dist/le-kit/p-cfc35bd3.entry.js.map +1 -0
  252. package/dist/le-kit/p-d04da1f5.entry.js +2 -0
  253. package/dist/le-kit/p-d04da1f5.entry.js.map +1 -0
  254. package/dist/le-kit/p-qIai5-eB.js +2 -0
  255. package/dist/le-kit/p-qIai5-eB.js.map +1 -0
  256. package/dist/le-kit/utils-apol-Xc_.js.map +1 -0
  257. package/dist/themes/base.css +89 -0
  258. package/dist/themes/dark.css +100 -0
  259. package/dist/themes/default.css +108 -0
  260. package/dist/themes/gradient.css +100 -0
  261. package/dist/themes/index.css +413 -0
  262. package/dist/themes/minimal.css +100 -0
  263. package/dist/themes/warm.css +100 -0
  264. package/dist/types/components/le-box/le-box.d.ts +111 -0
  265. package/dist/types/components/le-button/le-button.d.ts +78 -0
  266. package/dist/types/components/le-card/le-card.d.ts +37 -0
  267. package/dist/types/components/le-checkbox/le-checkbox.d.ts +46 -0
  268. package/dist/types/components/le-component/le-component.d.ts +115 -0
  269. package/dist/types/components/le-number-input/le-number-input.d.ts +106 -0
  270. package/dist/types/components/le-popover/le-popover.d.ts +109 -0
  271. package/dist/types/components/le-popup/le-popup.api.d.ts +73 -0
  272. package/dist/types/components/le-popup/le-popup.d.ts +122 -0
  273. package/dist/types/components/le-round-progress/le-round-progress.d.ts +2 -3
  274. package/dist/types/components/le-slot/le-slot.d.ts +149 -0
  275. package/dist/types/components/le-stack/le-stack.d.ts +73 -0
  276. package/dist/types/components/le-string-input/le-string-input.d.ts +83 -0
  277. package/dist/types/components/le-text/le-text.d.ts +141 -0
  278. package/dist/types/components/le-turntable/le-turntable.d.ts +1 -2
  279. package/dist/types/components.d.ts +2030 -62
  280. package/dist/types/global/app.d.ts +40 -0
  281. package/dist/types/index-admin.d.ts +29 -0
  282. package/dist/types/index-core.d.ts +27 -0
  283. package/dist/types/index.d.ts +15 -0
  284. package/dist/types/stencil-public-runtime.d.ts +1756 -0
  285. package/dist/types/types/blocks.d.ts +136 -0
  286. package/dist/types/types/options.d.ts +124 -0
  287. package/dist/types/utils/utils.d.ts +54 -1
  288. package/loader/cdn.js +1 -0
  289. package/loader/index.cjs.js +1 -0
  290. package/loader/index.d.ts +24 -0
  291. package/loader/index.es2017.js +1 -0
  292. package/loader/index.js +2 -0
  293. package/package.json +64 -13
  294. package/readme.md +180 -46
  295. package/dist/cjs/es5/build/jqoqzji9.entry.js +0 -6
  296. package/dist/cjs/es5/build/jqoqzji9.sc.entry.js +0 -6
  297. package/dist/cjs/es5/build/novg0vs0.entry.js +0 -9
  298. package/dist/cjs/es5/build/novg0vs0.sc.entry.js +0 -9
  299. package/dist/cjs/es5/index.js +0 -1
  300. package/dist/cjs/es5/le-kit.components.js +0 -4
  301. package/dist/cjs/es5/le-kit.core.js +0 -459
  302. package/dist/cjs/es5/le-kit.define.js +0 -9
  303. package/dist/cjs/es5/polyfills/array.js +0 -63
  304. package/dist/cjs/es5/polyfills/css-shim.js +0 -178
  305. package/dist/cjs/es5/polyfills/dom.js +0 -125
  306. package/dist/cjs/es5/polyfills/fetch.js +0 -186
  307. package/dist/cjs/es5/polyfills/map.js +0 -54
  308. package/dist/cjs/es5/polyfills/object.js +0 -27
  309. package/dist/cjs/es5/polyfills/promise.js +0 -80
  310. package/dist/cjs/es5/polyfills/string.js +0 -15
  311. package/dist/cjs/es5/polyfills/tslib.js +0 -244
  312. package/dist/cjs/es5/polyfills/url.js +0 -68
  313. package/dist/collection/interface.js +0 -0
  314. package/dist/esm/es2017/build/jqoqzji9.entry.js +0 -88
  315. package/dist/esm/es2017/build/jqoqzji9.sc.entry.js +0 -88
  316. package/dist/esm/es2017/build/novg0vs0.entry.js +0 -106
  317. package/dist/esm/es2017/build/novg0vs0.sc.entry.js +0 -106
  318. package/dist/esm/es2017/index.js +0 -1
  319. package/dist/esm/es2017/le-kit.components.js +0 -2
  320. package/dist/esm/es2017/le-kit.core.js +0 -5
  321. package/dist/esm/es2017/le-kit.define.js +0 -9
  322. package/dist/esm/es5/build/jqoqzji9.entry.js +0 -1
  323. package/dist/esm/es5/build/jqoqzji9.sc.entry.js +0 -1
  324. package/dist/esm/es5/build/novg0vs0.entry.js +0 -1
  325. package/dist/esm/es5/build/novg0vs0.sc.entry.js +0 -1
  326. package/dist/esm/es5/index.js +0 -1
  327. package/dist/esm/es5/le-kit.components.js +0 -2
  328. package/dist/esm/es5/le-kit.core.js +0 -5
  329. package/dist/esm/es5/le-kit.define.js +0 -9
  330. package/dist/esm/es5/polyfills/array.js +0 -23
  331. package/dist/esm/es5/polyfills/css-shim.js +0 -8
  332. package/dist/esm/es5/polyfills/dom.js +0 -22
  333. package/dist/esm/es5/polyfills/fetch.js +0 -20
  334. package/dist/esm/es5/polyfills/map.js +0 -7
  335. package/dist/esm/es5/polyfills/object.js +0 -20
  336. package/dist/esm/es5/polyfills/promise.js +0 -8
  337. package/dist/esm/es5/polyfills/string.js +0 -12
  338. package/dist/esm/es5/polyfills/tslib.js +0 -160
  339. package/dist/esm/es5/polyfills/url.js +0 -7
  340. package/dist/le-kit/jqoqzji9.entry.js +0 -1
  341. package/dist/le-kit/jqoqzji9.es5.entry.js +0 -1
  342. package/dist/le-kit/jqoqzji9.sc.entry.js +0 -1
  343. package/dist/le-kit/jqoqzji9.sc.es5.entry.js +0 -1
  344. package/dist/le-kit/le-kit.lfyfa4jd.js +0 -123
  345. package/dist/le-kit/le-kit.rzqb8hph.js +0 -4
  346. package/dist/le-kit/novg0vs0.entry.js +0 -1
  347. package/dist/le-kit/novg0vs0.es5.entry.js +0 -1
  348. package/dist/le-kit/novg0vs0.sc.entry.js +0 -1
  349. package/dist/le-kit/novg0vs0.sc.es5.entry.js +0 -1
  350. package/dist/le-kit.js +0 -1
  351. package/dist/loader/index.cjs.js +0 -1
  352. package/dist/loader/index.d.ts +0 -1
  353. package/dist/loader/index.es2017.js +0 -1
  354. package/dist/loader/index.js +0 -1
  355. package/dist/loader/package.json +0 -9
  356. package/dist/types/stencil.core.d.ts +0 -1203
  357. package/dist/web-components.json +0 -41
@@ -0,0 +1,104 @@
1
+ import { r as registerInstance, h as getElement, i as h } from './index-D71TXvJa.js';
2
+
3
+ const leRoundProgressCss = ".round-progress--container{position:relative}.round-progress{position:absolute;top:0;left:0;right:0;bottom:0;display:block}.round-progress--progress{filter:drop-shadow(var(--progress-shadow))}.round-progress--circle{fill:none;stroke:var(--progress-color, #999);stroke-width:var(--progress-width, 4);stroke-linecap:var(--progress-linecap, round);animation:progress--circle 0.5s ease-out forwards;transition:stroke-dasharray 0.5s ease-out}@keyframes progress--circle{0%{stroke-dasharray:0 1000}}.round-progress--path{fill:none;stroke-linecap:round}";
4
+
5
+ const LeRoundProgress = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ get el() { return getElement(this); }
10
+ // progress value coming from an attribute
11
+ value = 0;
12
+ updateValue(newValue) {
13
+ this.value = parseFloat(newValue);
14
+ }
15
+ // padding value coming from an attribute
16
+ padding = 0;
17
+ updatePadding(newValue) {
18
+ this.padding = parseFloat(newValue);
19
+ this.calcParams();
20
+ }
21
+ // the progress backgrounds can be as many as needed
22
+ // but it should be JSON format: double quotes and strict commas
23
+ paths;
24
+ updateProgressBackgrounds(newValue) {
25
+ this.progressPaths = JSON.parse(newValue);
26
+ }
27
+ progressPaths;
28
+ params;
29
+ /**
30
+ * Component lifecycles
31
+ *
32
+ * Before the component is loaded, we need to calculate and update params
33
+ * using the component size (width of the round progress)
34
+ * and progress width (max of )
35
+ */
36
+ componentWillLoad() {
37
+ if (typeof this.paths === 'string') {
38
+ this.updateProgressBackgrounds(this.paths);
39
+ }
40
+ this.calcParams();
41
+ }
42
+ calcParams() {
43
+ // get element width
44
+ const width = this.el.getBoundingClientRect().width;
45
+ const diameter = width - this.padding;
46
+ // calc circumference — we'll need it later to calc the stroke paths
47
+ const circumference = Math.PI * diameter;
48
+ this.params = { width, diameter, circumference };
49
+ }
50
+ /**
51
+ * Returns the viewPath attribute value for the SVG
52
+ * based on the width of the parent element
53
+ */
54
+ getViewBox() {
55
+ return '0 0 ' + this.params.width + ' ' + this.params.width;
56
+ }
57
+ /**
58
+ * Returns the circular path for the progress stroke
59
+ * and additional paths in the background
60
+ */
61
+ getPath() {
62
+ return ('M' +
63
+ this.params.width / 2 +
64
+ ' ' +
65
+ (this.params.width - this.params.diameter) / 2 +
66
+ ' a ' +
67
+ this.params.diameter / 2 +
68
+ ' ' +
69
+ this.params.diameter / 2 +
70
+ ' 0 0 1 0 ' +
71
+ this.params.diameter +
72
+ ' a ' +
73
+ this.params.diameter / 2 +
74
+ ' ' +
75
+ this.params.diameter / 2 +
76
+ ' 0 0 1 0 -' +
77
+ this.params.diameter);
78
+ }
79
+ getStrokeDashArray() {
80
+ return (this.value / 100) * this.params.circumference + ', ' + this.params.circumference;
81
+ }
82
+ getPaths() {
83
+ if (!this.progressPaths || !this.progressPaths.length) {
84
+ return null;
85
+ }
86
+ let paths = [];
87
+ this.progressPaths.forEach(bg => {
88
+ 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 }));
89
+ });
90
+ return (h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, paths));
91
+ }
92
+ render() {
93
+ return (h("div", { key: '1ffc36704bee5d0822623ac4559ad2d4690095a4', class: "round-progress--container" }, this.getPaths(), h("svg", { key: '12e4dfe5fe2df0cb672d4c001459b8dcc8253591', viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, h("path", { key: 'd8ce69610687fb578ce2104bd3eccba24951dd96', class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), h("slot", { key: '3976b08a7e838579d6af34a778a8756255d98e57' })));
94
+ }
95
+ static get watchers() { return {
96
+ "value": ["updateValue"],
97
+ "padding": ["updatePadding"],
98
+ "paths": ["updateProgressBackgrounds"]
99
+ }; }
100
+ };
101
+ LeRoundProgress.style = leRoundProgressCss;
102
+
103
+ export { LeRoundProgress as le_round_progress };
104
+ //# sourceMappingURL=le-round-progress.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-round-progress.entry.js","sources":["src/components/le-round-progress/le-round-progress.css?tag=le-round-progress&encapsulation=shadow","src/components/le-round-progress/le-round-progress.tsx"],"sourcesContent":[".round-progress--container {\n position: relative;\n}\n\n.round-progress {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n}\n\n.round-progress--progress {\n filter: drop-shadow(var(--progress-shadow));\n}\n\n.round-progress--circle {\n fill: none;\n stroke: var(--progress-color, #999);\n stroke-width: var(--progress-width, 4);\n stroke-linecap: var(--progress-linecap, round);\n animation: progress--circle 0.5s ease-out forwards;\n transition: stroke-dasharray 0.5s ease-out;\n}\n\n@keyframes progress--circle {\n 0% { stroke-dasharray: 0 1000; }\n}\n\n.round-progress--path {\n fill: none;\n stroke-linecap: round;\n}\n","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"],"names":[],"mappings":";;AAAA,MAAM,kBAAkB,GAAG,oiBAAoiB;;MCOljB,eAAe,GAAA,MAAA;;;;;;IAKlB,KAAK,GAAW,CAAC;AAEzB,IAAA,WAAW,CAAC,QAAgB,EAAA;AAC1B,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC;;;IAI3B,OAAO,GAAW,CAAC;AAE3B,IAAA,aAAa,CAAC,QAAgB,EAAA;AAC5B,QAAA,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,UAAU,EAAE;;;;AAKX,IAAA,KAAK;AAEb,IAAA,yBAAyB,CAAC,QAAgB,E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EAAM,KAAK,EAAC,wBAAwB,EAAmB,kBAAA,EAAA,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,GAAI,CACnG,EACN,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;;;;;;;;"}
@@ -0,0 +1,133 @@
1
+ import { r as registerInstance, h as getElement, i as h } from './index-D71TXvJa.js';
2
+ import { c as classnames } from './utils-CJLZrrdC.js';
3
+
4
+ const leStackDefaultCss = ":host{display:block}:host([hidden]){display:none}.stack{gap:var(--le-stack-gap, var(--le-space-md))}:host(.full-width){width:100%}:host(.full-height){height:100%}:host(.direction-horizontal) .stack{min-height:0}:host(.direction-vertical) .stack{min-width:0}";
5
+
6
+ const LeStack = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ }
10
+ get el() { return getElement(this); }
11
+ /**
12
+ * Direction of the stack layout
13
+ * @allowedValues horizontal | vertical
14
+ */
15
+ direction = 'horizontal';
16
+ /**
17
+ * Gap between items (CSS value like '8px', '1rem', 'var(--le-space-md)')
18
+ */
19
+ gap;
20
+ /**
21
+ * Alignment of items on the cross axis
22
+ * @allowedValues start | center | end | stretch | baseline
23
+ */
24
+ align = 'stretch';
25
+ /**
26
+ * Distribution of items on the main axis
27
+ * @allowedValues start | center | end | space-between | space-around | space-evenly
28
+ */
29
+ justify = 'start';
30
+ /**
31
+ * Whether items should wrap to multiple lines
32
+ */
33
+ wrap = false;
34
+ /**
35
+ * Alignment of wrapped lines (only applies when wrap is true)
36
+ * @allowedValues start | center | end | stretch | space-between | space-around
37
+ */
38
+ alignContent = 'stretch';
39
+ /**
40
+ * Whether to reverse the order of items
41
+ */
42
+ reverse = false;
43
+ /**
44
+ * Maximum number of items allowed in the stack (for CMS validation)
45
+ * @min 1
46
+ */
47
+ maxItems;
48
+ /**
49
+ * Whether the stack should take full width of its container
50
+ */
51
+ fullWidth = false;
52
+ /**
53
+ * Whether the stack should take full height of its container
54
+ */
55
+ fullHeight = false;
56
+ /**
57
+ * Padding inside the stack container (CSS value)
58
+ */
59
+ padding;
60
+ getFlexDirection() {
61
+ const base = this.direction === 'vertical' ? 'column' : 'row';
62
+ return this.reverse ? `${base}-reverse` : base;
63
+ }
64
+ getAlignItems() {
65
+ const alignMap = {
66
+ start: 'flex-start',
67
+ center: 'center',
68
+ end: 'flex-end',
69
+ stretch: 'stretch',
70
+ baseline: 'baseline',
71
+ };
72
+ return alignMap[this.align] || 'stretch';
73
+ }
74
+ getJustifyContent() {
75
+ const justifyMap = {
76
+ start: 'flex-start',
77
+ center: 'center',
78
+ end: 'flex-end',
79
+ 'space-between': 'space-between',
80
+ 'space-around': 'space-around',
81
+ 'space-evenly': 'space-evenly',
82
+ };
83
+ return justifyMap[this.justify] || 'flex-start';
84
+ }
85
+ getAlignContent() {
86
+ const alignContentMap = {
87
+ start: 'flex-start',
88
+ center: 'center',
89
+ end: 'flex-end',
90
+ stretch: 'stretch',
91
+ 'space-between': 'space-between',
92
+ 'space-around': 'space-around',
93
+ };
94
+ return alignContentMap[this.alignContent] || 'stretch';
95
+ }
96
+ render() {
97
+ const style = {
98
+ display: 'flex',
99
+ flexDirection: this.getFlexDirection(),
100
+ alignItems: this.getAlignItems(),
101
+ justifyContent: this.getJustifyContent(),
102
+ flexWrap: this.wrap ? 'wrap' : 'nowrap',
103
+ };
104
+ if (this.wrap) {
105
+ style.alignContent = this.getAlignContent();
106
+ }
107
+ if (this.gap) {
108
+ style.gap = this.gap;
109
+ }
110
+ if (this.padding) {
111
+ style.padding = this.padding;
112
+ }
113
+ // if (this.fullWidth) {
114
+ // style.width = '100%';
115
+ // }
116
+ // if (this.fullHeight) {
117
+ // style.height = '100%';
118
+ // }
119
+ const hostClass = classnames(`direction-${this.direction}`, {
120
+ 'wrap': this.wrap,
121
+ 'reverse': this.reverse,
122
+ 'full-width': this.fullWidth,
123
+ 'full-height': this.fullHeight,
124
+ });
125
+ // Slot style for admin mode - make items display in the same direction
126
+ 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()};`;
127
+ return (h("le-component", { key: 'e1547512915e47e4c5ddbcbcbd3971579e45a140', component: "le-stack", hostClass: hostClass }, h("div", { key: '61a4fd57c61c56a8abac0ae2348e6e48034efc4d', class: "stack", part: "stack", style: style }, h("le-slot", { key: '0ef0f996ce0efcb20a47171197d82e5b326c7e8c', name: "", description: `Items arranged ${this.direction}ly${this.maxItems ? ` (max ${this.maxItems})` : ''}`, type: "slot", "allowed-components": "le-text,le-box,le-card,le-button,le-stack", slotStyle: slotStyle }, h("slot", { key: 'f41f351d8b6dbdaf20756e9bc317a35a0424fc6c' })))));
128
+ }
129
+ };
130
+ LeStack.style = leStackDefaultCss;
131
+
132
+ export { LeStack as le_stack };
133
+ //# sourceMappingURL=le-stack.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-stack.entry.js","sources":["src/components/le-stack/le-stack.default.css?tag=le-stack&encapsulation=shadow","src/components/le-stack/le-stack.tsx"],"sourcesContent":["/**\n * le-stack default styles\n *\n * The component uses inline styles for flex properties to allow\n * dynamic prop-based configuration. This CSS handles theming.\n */\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n/* Base stack container */\n.stack {\n gap: var(--le-stack-gap, var(--le-space-md));\n}\n\n/* Full width/height variants */\n:host(.full-width) {\n width: 100%;\n}\n\n:host(.full-height) {\n height: 100%;\n}\n\n/* Direction-specific defaults */\n:host(.direction-horizontal) .stack {\n min-height: 0;\n}\n\n:host(.direction-vertical) .stack {\n min-width: 0;\n}\n","import { Component, Prop, h, Element } 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 <le-component component=\"le-stack\" hostClass={hostClass}>\n <div class=\"stack\" part=\"stack\" style={style}>\n <le-slot\n name=\"\"\n description={`Items arranged ${this.direction}ly${this.maxItems ? ` (max ${this.maxItems})` : ''}`}\n type=\"slot\"\n allowed-components=\"le-text,le-box,le-card,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AAU;AAC/B,SAAA,CACF;;AAGD,QAAA,MAAM,SAAS,GAAG,CAAA,+BAAA,EAAkC,IAAI,CAAC,gBAAgB,EAAE,CAAA,OAAA,EAAU,IAAI,CAAC,GAAG,IAAI,oBAAoB,CAAgB,aAAA,EAAA,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,QAAQ,sBAAsB,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,IAAI,CAAC,aAAa,EAAE,GAAG;QAEzP,QACE,qEAAc,SAAS,EAAC,UAAU,EAAC,SAAS,EAAE,SAAS,EAAA,EACrD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,EAAA,EAC1C,CAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,EAAE,EACP,WAAW,EAAE,CAAkB,eAAA,EAAA,IAAI,CAAC,SAAS,CAAA,EAAA,EAAK,IAAI,CAAC,QAAQ,GAAG,CAAA,MAAA,EAAS,IAAI,CAAC,QAAQ,CAAA,CAAA,CAAG,GAAG,EAAE,CAAA,CAAE,EAClG,IAAI,EAAC,MAAM,EACQ,oBAAA,EAAA,2CAA2C,EAC9D,SAAS,EAAE,SAAS,EAAA,EAEpB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACL,CACN,CACO;;;;;;;"}
@@ -0,0 +1,333 @@
1
+ import { r as registerInstance, h as getElement, i as h, H as Host } from './index-D71TXvJa.js';
2
+ import { o as observeModeChanges } from './utils-CJLZrrdC.js';
3
+
4
+ const leTextDefaultCss = ":host{display:block}:host([hidden]){display:none}.le-text{margin:0;color:var(--le-text-color, var(--le-color-text));font-family:var(--le-font-family);line-height:var(--le-text-line-height, 1.5)}.variant-p{font-size:var(--le-font-size-base, 1rem);font-weight:var(--le-font-weight-normal, 400);color:var(--le-color-text)}.variant-h1{font-size:var(--le-font-size-4xl, 2.5rem);font-weight:var(--le-font-weight-bold, 700);line-height:1.2;color:var(--le-color-text);letter-spacing:-0.02em}.variant-h2{font-size:var(--le-font-size-3xl, 2rem);font-weight:var(--le-font-weight-bold, 700);line-height:1.25;color:var(--le-color-text);letter-spacing:-0.01em}.variant-h3{font-size:var(--le-font-size-2xl, 1.5rem);font-weight:var(--le-font-weight-semibold, 600);line-height:1.3;color:var(--le-color-text)}.variant-h4{font-size:var(--le-font-size-xl, 1.25rem);font-weight:var(--le-font-weight-semibold, 600);line-height:1.35;color:var(--le-color-text)}.variant-h5{font-size:var(--le-font-size-lg, 1.125rem);font-weight:var(--le-font-weight-medium, 500);line-height:1.4;color:var(--le-color-text)}.variant-h6{font-size:var(--le-font-size-base, 1rem);font-weight:var(--le-font-weight-medium, 500);line-height:1.45;color:var(--le-color-text);text-transform:uppercase;letter-spacing:0.05em}.variant-code{font-family:var(--le-font-family-mono, 'SF Mono', 'Fira Code', 'Consolas', monospace);font-size:var(--le-font-size-sm, 0.875rem);background:var(--le-color-surface-alt, #f5f5f5);padding:var(--le-space-md);border-radius:var(--le-radius-md);overflow-x:auto;white-space:pre-wrap;color:var(--le-color-text)}.variant-quote{font-size:var(--le-font-size-lg, 1.125rem);font-style:italic;color:var(--le-color-text-secondary);border-left:4px solid var(--le-color-primary);padding-left:var(--le-space-lg);margin-left:0;margin-right:0}.variant-label{font-size:var(--le-font-size-sm, 0.875rem);font-weight:var(--le-font-weight-medium, 500);color:var(--le-color-text-secondary);text-transform:uppercase;letter-spacing:0.05em}.variant-small{font-size:var(--le-font-size-sm, 0.875rem);color:var(--le-color-text-secondary)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.truncate.max-lines-2,.truncate.max-lines-3,.truncate.max-lines-4,.truncate.max-lines-5{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical}.truncate.max-lines-2{-webkit-line-clamp:2;line-clamp:2}.truncate.max-lines-3{-webkit-line-clamp:3;line-clamp:3}.truncate.max-lines-4{-webkit-line-clamp:4;line-clamp:4}.truncate.max-lines-5{-webkit-line-clamp:5;line-clamp:5}:host([align=\"center\"]) .le-text{text-align:center}:host([align=\"right\"]) .le-text{text-align:right}:host([align=\"justify\"]) .le-text{text-align:justify}.le-text a{color:var(--le-color-primary);text-decoration:underline}.le-text a:hover{color:var(--le-color-primary-dark)}.le-text strong,.le-text b{font-weight:var(--le-font-weight-bold, 700)}.le-text em,.le-text i{font-style:italic}.le-text u{text-decoration:underline}.le-text s,.le-text strike{text-decoration:line-through}";
5
+
6
+ const LeText = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ }
10
+ get el() { return getElement(this); }
11
+ /**
12
+ * The semantic variant/type of text element
13
+ * @allowedValues p | h1 | h2 | h3 | h4 | h5 | h6 | code | quote | label | small
14
+ */
15
+ variant = 'p';
16
+ /**
17
+ * Text alignment
18
+ * @allowedValues left | center | right | justify
19
+ */
20
+ align = 'left';
21
+ /**
22
+ * Text color (CSS value or theme token)
23
+ */
24
+ color;
25
+ /**
26
+ * Whether the text should truncate with ellipsis
27
+ */
28
+ truncate = false;
29
+ /**
30
+ * Maximum number of lines before truncating (requires truncate=true)
31
+ */
32
+ maxLines;
33
+ /**
34
+ * Internal state to track admin mode
35
+ */
36
+ adminMode = false;
37
+ /**
38
+ * The HTML content being edited
39
+ */
40
+ content = '';
41
+ /**
42
+ * Whether the editor is focused (shows toolbar)
43
+ */
44
+ isFocused = false;
45
+ /**
46
+ * Current selection state for toolbar button highlighting
47
+ */
48
+ selectionState = {
49
+ isBold: false,
50
+ isItalic: false,
51
+ isUnderline: false,
52
+ isStrikethrough: false,
53
+ isLink: false,
54
+ blockType: 'p',
55
+ };
56
+ /**
57
+ * Reference to the contenteditable element
58
+ */
59
+ editorRef;
60
+ /**
61
+ * Reference to the slot element
62
+ */
63
+ slotRef;
64
+ disconnectModeObserver;
65
+ connectedCallback() {
66
+ this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {
67
+ const wasAdmin = this.adminMode;
68
+ this.adminMode = mode === 'admin';
69
+ if (this.adminMode && !wasAdmin) {
70
+ // Entering admin mode - read content from slot
71
+ requestAnimationFrame(() => this.readSlottedContent());
72
+ }
73
+ else if (!this.adminMode && wasAdmin) {
74
+ // Leaving admin mode - sync content back to slot
75
+ this.syncContentToSlot();
76
+ }
77
+ });
78
+ }
79
+ disconnectedCallback() {
80
+ this.disconnectModeObserver?.();
81
+ }
82
+ onVariantChange() {
83
+ // When variant changes in admin mode, update the content wrapper
84
+ if (this.adminMode && this.editorRef) {
85
+ this.syncContentToSlot();
86
+ }
87
+ }
88
+ /**
89
+ * Read content from slotted elements
90
+ */
91
+ readSlottedContent() {
92
+ if (!this.slotRef)
93
+ return;
94
+ const assignedNodes = this.slotRef.assignedNodes({ flatten: true });
95
+ // Collect all content from assigned nodes
96
+ let html = '';
97
+ assignedNodes.forEach(node => {
98
+ if (node.nodeType === Node.TEXT_NODE) {
99
+ html += node.textContent;
100
+ }
101
+ else if (node.nodeType === Node.ELEMENT_NODE) {
102
+ html += node.innerHTML || node.textContent;
103
+ }
104
+ });
105
+ this.content = html.trim();
106
+ }
107
+ /**
108
+ * Sync edited content back to the slot
109
+ */
110
+ syncContentToSlot() {
111
+ if (!this.editorRef)
112
+ return;
113
+ const newContent = this.editorRef.innerHTML;
114
+ // Update the light DOM content
115
+ // We need to update the actual slotted content
116
+ const slot = this.slotRef;
117
+ if (slot) {
118
+ const assignedNodes = slot.assignedNodes({ flatten: true });
119
+ if (assignedNodes.length > 0) {
120
+ const firstNode = assignedNodes[0];
121
+ if (firstNode.nodeType === Node.ELEMENT_NODE) {
122
+ firstNode.innerHTML = newContent;
123
+ }
124
+ else if (firstNode.nodeType === Node.TEXT_NODE) {
125
+ // Replace text node with the new content
126
+ const parent = firstNode.parentNode;
127
+ if (parent) {
128
+ // Create a temporary element to parse HTML
129
+ const temp = document.createElement('span');
130
+ temp.innerHTML = newContent;
131
+ // Replace the text node
132
+ parent.replaceChild(temp, firstNode);
133
+ // Unwrap the span if it only contains text
134
+ if (temp.childNodes.length === 1 && temp.firstChild?.nodeType === Node.TEXT_NODE) {
135
+ parent.replaceChild(temp.firstChild, temp);
136
+ }
137
+ }
138
+ }
139
+ }
140
+ else {
141
+ // No assigned nodes, set innerHTML on the host's light DOM
142
+ this.el.innerHTML = newContent;
143
+ }
144
+ }
145
+ }
146
+ /**
147
+ * Handle input in the contenteditable
148
+ */
149
+ handleInput = () => {
150
+ if (this.editorRef) {
151
+ this.content = this.editorRef.innerHTML;
152
+ this.updateSelectionState();
153
+ }
154
+ };
155
+ /**
156
+ * Handle focus on the editor
157
+ */
158
+ handleFocus = () => {
159
+ this.isFocused = true;
160
+ this.updateSelectionState();
161
+ };
162
+ /**
163
+ * Handle blur on the editor
164
+ */
165
+ handleBlur = (e) => {
166
+ // Check if focus moved to toolbar
167
+ const relatedTarget = e.relatedTarget;
168
+ const toolbar = this.el.shadowRoot?.querySelector('.le-text-toolbar');
169
+ if (toolbar?.contains(relatedTarget)) {
170
+ // Focus moved to toolbar, keep it open
171
+ return;
172
+ }
173
+ // Small delay to allow toolbar clicks to register
174
+ setTimeout(() => {
175
+ if (!this.el.shadowRoot?.activeElement) {
176
+ this.isFocused = false;
177
+ this.syncContentToSlot();
178
+ }
179
+ }, 150);
180
+ };
181
+ /**
182
+ * Handle selection change to update toolbar state
183
+ */
184
+ handleSelectionChange = () => {
185
+ this.updateSelectionState();
186
+ };
187
+ /**
188
+ * Update the selection state for toolbar highlighting
189
+ */
190
+ updateSelectionState() {
191
+ const selection = window.getSelection();
192
+ if (!selection || selection.rangeCount === 0)
193
+ return;
194
+ this.selectionState = {
195
+ isBold: document.queryCommandState('bold'),
196
+ isItalic: document.queryCommandState('italic'),
197
+ isUnderline: document.queryCommandState('underline'),
198
+ isStrikethrough: document.queryCommandState('strikeThrough'),
199
+ isLink: this.isSelectionInLink(selection),
200
+ blockType: this.variant,
201
+ };
202
+ }
203
+ /**
204
+ * Check if current selection is within a link
205
+ */
206
+ isSelectionInLink(selection) {
207
+ if (!selection.anchorNode)
208
+ return false;
209
+ let node = selection.anchorNode;
210
+ while (node && node !== this.editorRef) {
211
+ if (node.nodeName === 'A')
212
+ return true;
213
+ node = node.parentNode;
214
+ }
215
+ return false;
216
+ }
217
+ /**
218
+ * Execute a formatting command
219
+ */
220
+ execCommand(command, value) {
221
+ // Focus the editor first
222
+ this.editorRef?.focus();
223
+ // Execute the command
224
+ document.execCommand(command, false, value);
225
+ // Update state
226
+ this.handleInput();
227
+ this.updateSelectionState();
228
+ }
229
+ /**
230
+ * Toggle bold formatting
231
+ */
232
+ toggleBold = (e) => {
233
+ e.preventDefault();
234
+ this.execCommand('bold');
235
+ };
236
+ /**
237
+ * Toggle italic formatting
238
+ */
239
+ toggleItalic = (e) => {
240
+ e.preventDefault();
241
+ this.execCommand('italic');
242
+ };
243
+ /**
244
+ * Toggle underline formatting
245
+ */
246
+ toggleUnderline = (e) => {
247
+ e.preventDefault();
248
+ this.execCommand('underline');
249
+ };
250
+ /**
251
+ * Toggle strikethrough formatting
252
+ */
253
+ toggleStrikethrough = (e) => {
254
+ e.preventDefault();
255
+ this.execCommand('strikeThrough');
256
+ };
257
+ /**
258
+ * Add or edit a link
259
+ */
260
+ toggleLink = (e) => {
261
+ e.preventDefault();
262
+ if (this.selectionState.isLink) {
263
+ // Remove link
264
+ this.execCommand('unlink');
265
+ }
266
+ else {
267
+ // Add link
268
+ const url = prompt('Enter URL:', 'https://');
269
+ if (url) {
270
+ this.execCommand('createLink', url);
271
+ }
272
+ }
273
+ };
274
+ /**
275
+ * Change the block type/variant
276
+ */
277
+ changeVariant = (e) => {
278
+ const select = e.target;
279
+ this.variant = select.value;
280
+ };
281
+ /**
282
+ * Render the formatting toolbar
283
+ */
284
+ renderToolbar() {
285
+ return (h("div", { class: "le-text-toolbar" }, h("select", { class: "le-text-toolbar-select", onChange: this.changeVariant, onMouseDown: (e) => e.preventDefault() }, h("option", { value: "p", selected: this.variant === 'p' }, "Paragraph"), h("option", { value: "h1", selected: this.variant === 'h1' }, "Heading 1"), h("option", { value: "h2", selected: this.variant === 'h2' }, "Heading 2"), h("option", { value: "h3", selected: this.variant === 'h3' }, "Heading 3"), h("option", { value: "h4", selected: this.variant === 'h4' }, "Heading 4"), h("option", { value: "h5", selected: this.variant === 'h5' }, "Heading 5"), h("option", { value: "h6", selected: this.variant === 'h6' }, "Heading 6"), h("option", { value: "quote", selected: this.variant === 'quote' }, "Quote"), h("option", { value: "code", selected: this.variant === 'code' }, "Code"), h("option", { value: "label", selected: this.variant === 'label' }, "Label"), h("option", { value: "small", selected: this.variant === 'small' }, "Small")), h("div", { class: "le-text-toolbar-divider" }), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isBold }, onMouseDown: this.toggleBold, title: "Bold (Ctrl+B)" }, h("strong", null, "B")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isItalic }, onMouseDown: this.toggleItalic, title: "Italic (Ctrl+I)" }, h("em", null, "I")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isUnderline }, onMouseDown: this.toggleUnderline, title: "Underline (Ctrl+U)" }, h("span", { style: { textDecoration: 'underline' } }, "U")), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isStrikethrough }, onMouseDown: this.toggleStrikethrough, title: "Strikethrough" }, h("span", { style: { textDecoration: 'line-through' } }, "S")), h("div", { class: "le-text-toolbar-divider" }), h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isLink }, onMouseDown: this.toggleLink, title: this.selectionState.isLink ? 'Remove link' : 'Add link' }, "\uD83D\uDD17")));
286
+ }
287
+ /**
288
+ * Get the semantic tag for the current variant
289
+ */
290
+ getTag() {
291
+ switch (this.variant) {
292
+ case 'quote':
293
+ return 'blockquote';
294
+ case 'code':
295
+ return 'pre';
296
+ case 'label':
297
+ return 'label';
298
+ case 'small':
299
+ return 'small';
300
+ default:
301
+ return this.variant; // h1-h6, p
302
+ }
303
+ }
304
+ render() {
305
+ const Tag = this.getTag();
306
+ const textStyle = {};
307
+ if (this.color) {
308
+ textStyle.color = this.color;
309
+ }
310
+ if (this.align) {
311
+ textStyle.textAlign = this.align;
312
+ }
313
+ const textClass = {
314
+ 'le-text': true,
315
+ [`variant-${this.variant}`]: true,
316
+ 'truncate': this.truncate,
317
+ [`max-lines-${this.maxLines}`]: this.truncate && this.maxLines,
318
+ };
319
+ // Admin mode - show rich text editor
320
+ if (this.adminMode) {
321
+ return (h(Host, { class: "admin-mode" }, h("le-component", { component: "le-text" }, h("div", { class: "le-text-editor-wrapper" }, this.isFocused && this.renderToolbar(), h(Tag, { class: textClass, part: "text", style: textStyle }, h("div", { ref: (el) => this.editorRef = el, class: "le-text-editor", contentEditable: true, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleSelectionChange, onMouseUp: this.handleSelectionChange, innerHTML: this.content })), h("div", { class: "hidden-slot" }, h("slot", { ref: (el) => this.slotRef = el, onSlotchange: () => this.readSlottedContent() }))))));
322
+ }
323
+ // Default mode - render semantic element with slotted content
324
+ return (h(Host, null, h(Tag, { class: textClass, part: "text", style: textStyle }, h("slot", { ref: (el) => this.slotRef = el }))));
325
+ }
326
+ static get watchers() { return {
327
+ "variant": ["onVariantChange"]
328
+ }; }
329
+ };
330
+ LeText.style = leTextDefaultCss;
331
+
332
+ export { LeText as le_text };
333
+ //# sourceMappingURL=le-text.entry.js.map