le-kit 0.1.11 → 0.1.13

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 (279) hide show
  1. package/custom-elements.json +1192 -1192
  2. package/dist/{core/cjs/index-D7B9TPh8.js → cjs/index-o1DRKw1g.js} +11 -4
  3. package/dist/cjs/index-o1DRKw1g.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +3 -3
  5. package/dist/cjs/le-box.cjs.entry.js +2 -2
  6. package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +1 -1
  7. package/dist/cjs/le-button_6.cjs.entry.js +11 -5
  8. package/dist/cjs/le-card.cjs.entry.js +2 -2
  9. package/dist/cjs/le-kit.cjs.js +1 -1
  10. package/dist/cjs/le-number-input.cjs.entry.js +2 -2
  11. package/dist/cjs/le-popup.cjs.entry.js +1 -1
  12. package/dist/cjs/le-round-progress.cjs.entry.js +1 -1
  13. package/dist/cjs/le-stack.cjs.entry.js +2 -2
  14. package/dist/cjs/le-text.cjs.entry.js +2 -2
  15. package/dist/cjs/le-turntable.cjs.entry.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/{core/cjs/utils-DrsoID-a.js → cjs/utils-DqhadIxH.js} +3 -3
  18. package/dist/cjs/{utils-DrsoID-a.js.map → utils-DqhadIxH.js.map} +1 -1
  19. package/dist/collection/assets/custom-elements.json +4305 -0
  20. package/dist/collection/components/le-component/le-component.js +5 -2
  21. package/dist/collection/components/le-component/le-component.js.map +1 -1
  22. package/dist/collection/components/le-slot/le-slot.js +6 -3
  23. package/dist/collection/components/le-slot/le-slot.js.map +1 -1
  24. package/dist/collection/dist/collection/themes/base.css +89 -0
  25. package/dist/collection/dist/collection/themes/dark.css +100 -0
  26. package/dist/collection/dist/collection/themes/default.css +108 -0
  27. package/dist/collection/dist/collection/themes/gradient.css +100 -0
  28. package/dist/collection/dist/collection/themes/index.css +413 -0
  29. package/dist/collection/dist/collection/themes/minimal.css +100 -0
  30. package/dist/collection/dist/collection/themes/warm.css +100 -0
  31. package/dist/collection/global/app.js +1 -1
  32. package/dist/collection/global/app.js.map +1 -1
  33. package/dist/collection/index.js +1 -1
  34. package/dist/collection/index.js.map +1 -1
  35. package/dist/collection/themes/base.css +89 -0
  36. package/dist/collection/themes/dark.css +100 -0
  37. package/dist/collection/themes/default.css +108 -0
  38. package/dist/collection/themes/gradient.css +100 -0
  39. package/dist/collection/themes/index.css +413 -0
  40. package/dist/collection/themes/minimal.css +100 -0
  41. package/dist/collection/themes/warm.css +100 -0
  42. package/dist/components/index.d.ts +33 -0
  43. package/dist/components/index.js +113 -0
  44. package/dist/components/index.js.map +1 -0
  45. package/dist/components/le-box.d.ts +11 -0
  46. package/dist/components/le-box.js +257 -0
  47. package/dist/components/le-box.js.map +1 -0
  48. package/dist/components/le-button.d.ts +11 -0
  49. package/dist/components/le-button.js +9 -0
  50. package/dist/components/le-button.js.map +1 -0
  51. package/dist/components/le-button2.js +1149 -0
  52. package/dist/components/le-button2.js.map +1 -0
  53. package/dist/components/le-card.d.ts +11 -0
  54. package/dist/components/le-card.js +84 -0
  55. package/dist/components/le-card.js.map +1 -0
  56. package/dist/components/le-checkbox.d.ts +11 -0
  57. package/dist/components/le-checkbox.js +9 -0
  58. package/dist/components/le-checkbox.js.map +1 -0
  59. package/dist/components/le-component.d.ts +11 -0
  60. package/dist/components/le-component.js +9 -0
  61. package/dist/components/le-component.js.map +1 -0
  62. package/dist/components/le-number-input.d.ts +11 -0
  63. package/dist/components/le-number-input.js +272 -0
  64. package/dist/components/le-number-input.js.map +1 -0
  65. package/dist/components/le-popover.d.ts +11 -0
  66. package/dist/components/le-popover.js +9 -0
  67. package/dist/components/le-popover.js.map +1 -0
  68. package/dist/components/le-popover2.js +382 -0
  69. package/dist/components/le-popover2.js.map +1 -0
  70. package/dist/components/le-popup.d.ts +11 -0
  71. package/dist/components/le-popup.js +279 -0
  72. package/dist/components/le-popup.js.map +1 -0
  73. package/dist/components/le-round-progress.d.ts +11 -0
  74. package/dist/components/le-round-progress.js +135 -0
  75. package/dist/components/le-round-progress.js.map +1 -0
  76. package/dist/components/le-slot.d.ts +11 -0
  77. package/dist/components/le-slot.js +9 -0
  78. package/dist/components/le-slot.js.map +1 -0
  79. package/dist/components/le-stack.d.ts +11 -0
  80. package/dist/components/le-stack.js +199 -0
  81. package/dist/components/le-stack.js.map +1 -0
  82. package/dist/components/le-string-input.d.ts +11 -0
  83. package/dist/components/le-string-input.js +9 -0
  84. package/dist/components/le-string-input.js.map +1 -0
  85. package/dist/components/le-text.d.ts +11 -0
  86. package/dist/components/le-text.js +399 -0
  87. package/dist/components/le-text.js.map +1 -0
  88. package/dist/components/le-turntable.d.ts +11 -0
  89. package/dist/components/le-turntable.js +164 -0
  90. package/dist/components/le-turntable.js.map +1 -0
  91. package/dist/components/utils.js +310 -0
  92. package/dist/components/utils.js.map +1 -0
  93. package/dist/{cjs/index-D7B9TPh8.js → core/cjs/index-BsRb_UTe.js} +4 -4
  94. package/dist/core/cjs/index-BsRb_UTe.js.map +1 -0
  95. package/dist/core/cjs/index.cjs.js +3 -3
  96. package/dist/core/cjs/le-box.cjs.entry.js +2 -2
  97. package/dist/core/cjs/le-button.cjs.entry.js +2 -2
  98. package/dist/core/cjs/le-card.cjs.entry.js +2 -2
  99. package/dist/core/cjs/le-checkbox.cjs.entry.js +2 -2
  100. package/dist/core/cjs/le-kit.cjs.js +1 -1
  101. package/dist/core/cjs/le-number-input.cjs.entry.js +2 -2
  102. package/dist/core/cjs/le-popover.cjs.entry.js +1 -1
  103. package/dist/core/cjs/le-popup.cjs.entry.js +1 -1
  104. package/dist/core/cjs/le-round-progress.cjs.entry.js +1 -1
  105. package/dist/core/cjs/le-stack.cjs.entry.js +2 -2
  106. package/dist/core/cjs/le-string-input.cjs.entry.js +2 -2
  107. package/dist/core/cjs/le-text.cjs.entry.js +2 -2
  108. package/dist/core/cjs/le-turntable.cjs.entry.js +1 -1
  109. package/dist/core/cjs/loader.cjs.js +1 -1
  110. package/dist/{cjs/utils-DrsoID-a.js → core/cjs/utils-nsP8_w8_.js} +3 -3
  111. package/dist/core/cjs/{utils-DrsoID-a.js.map → utils-nsP8_w8_.js.map} +1 -1
  112. package/dist/core/collection/assets/custom-elements.json +4305 -0
  113. package/dist/core/collection/global/app.js +1 -1
  114. package/dist/core/collection/global/app.js.map +1 -1
  115. package/dist/core/collection/index.js +1 -1
  116. package/dist/core/collection/index.js.map +1 -1
  117. package/dist/core/collection/themes/base.css +89 -0
  118. package/dist/core/collection/themes/dark.css +100 -0
  119. package/dist/core/collection/themes/default.css +108 -0
  120. package/dist/core/collection/themes/gradient.css +100 -0
  121. package/dist/core/collection/themes/index.css +413 -0
  122. package/dist/core/collection/themes/minimal.css +100 -0
  123. package/dist/core/collection/themes/warm.css +100 -0
  124. package/dist/core/components/index.d.ts +33 -0
  125. package/dist/core/components/index.js +113 -0
  126. package/dist/core/components/index.js.map +1 -0
  127. package/dist/core/components/le-box.d.ts +11 -0
  128. package/dist/core/components/le-box.js +225 -0
  129. package/dist/core/components/le-box.js.map +1 -0
  130. package/dist/core/components/le-button.d.ts +11 -0
  131. package/dist/core/components/le-button.js +9 -0
  132. package/dist/core/components/le-button.js.map +1 -0
  133. package/dist/core/components/le-button2.js +121 -0
  134. package/dist/core/components/le-button2.js.map +1 -0
  135. package/dist/core/components/le-card.d.ts +11 -0
  136. package/dist/core/components/le-card.js +52 -0
  137. package/dist/core/components/le-card.js.map +1 -0
  138. package/dist/core/components/le-checkbox.d.ts +11 -0
  139. package/dist/core/components/le-checkbox.js +87 -0
  140. package/dist/core/components/le-checkbox.js.map +1 -0
  141. package/dist/core/components/le-number-input.d.ts +11 -0
  142. package/dist/core/components/le-number-input.js +246 -0
  143. package/dist/core/components/le-number-input.js.map +1 -0
  144. package/dist/core/components/le-popover.d.ts +11 -0
  145. package/dist/core/components/le-popover.js +385 -0
  146. package/dist/core/components/le-popover.js.map +1 -0
  147. package/dist/core/components/le-popup.d.ts +11 -0
  148. package/dist/core/components/le-popup.js +253 -0
  149. package/dist/core/components/le-popup.js.map +1 -0
  150. package/dist/core/components/le-round-progress.d.ts +11 -0
  151. package/dist/core/components/le-round-progress.js +135 -0
  152. package/dist/core/components/le-round-progress.js.map +1 -0
  153. package/dist/core/components/le-stack.d.ts +11 -0
  154. package/dist/core/components/le-stack.js +167 -0
  155. package/dist/core/components/le-stack.js.map +1 -0
  156. package/dist/core/components/le-string-input.d.ts +11 -0
  157. package/dist/core/components/le-string-input.js +127 -0
  158. package/dist/core/components/le-string-input.js.map +1 -0
  159. package/dist/core/components/le-text.d.ts +11 -0
  160. package/dist/core/components/le-text.js +367 -0
  161. package/dist/core/components/le-text.js.map +1 -0
  162. package/dist/core/components/le-turntable.d.ts +11 -0
  163. package/dist/core/components/le-turntable.js +164 -0
  164. package/dist/core/components/le-turntable.js.map +1 -0
  165. package/dist/core/components/utils.js +310 -0
  166. package/dist/core/components/utils.js.map +1 -0
  167. package/dist/core/esm/{index-PS-3Rz-c.js → index-CJ-z5Zj1.js} +4 -4
  168. package/dist/core/esm/index-CJ-z5Zj1.js.map +1 -0
  169. package/dist/core/esm/index.js +2 -2
  170. package/dist/core/esm/le-box.entry.js +2 -2
  171. package/dist/core/esm/le-button.entry.js +2 -2
  172. package/dist/core/esm/le-card.entry.js +2 -2
  173. package/dist/core/esm/le-checkbox.entry.js +2 -2
  174. package/dist/core/esm/le-kit.js +2 -2
  175. package/dist/core/esm/le-number-input.entry.js +2 -2
  176. package/dist/core/esm/le-popover.entry.js +1 -1
  177. package/dist/core/esm/le-popup.entry.js +1 -1
  178. package/dist/core/esm/le-round-progress.entry.js +1 -1
  179. package/dist/core/esm/le-stack.entry.js +2 -2
  180. package/dist/core/esm/le-string-input.entry.js +2 -2
  181. package/dist/core/esm/le-text.entry.js +2 -2
  182. package/dist/core/esm/le-turntable.entry.js +1 -1
  183. package/dist/core/esm/loader.js +2 -2
  184. package/dist/core/esm/{utils-lgjSfQP0.js → utils-Bxmld82M.js} +3 -3
  185. package/dist/core/esm/{utils-lgjSfQP0.js.map → utils-Bxmld82M.js.map} +1 -1
  186. package/dist/core/le-kit/index.esm.js +1 -1
  187. package/dist/core/le-kit/le-kit.esm.js +1 -1
  188. package/dist/core/le-kit/{p-a5f1e539.entry.js → p-0308bd1f.entry.js} +2 -2
  189. package/dist/core/le-kit/{p-1c5262eb.entry.js → p-257495cc.entry.js} +2 -2
  190. package/dist/core/le-kit/{p-32c08678.entry.js → p-2ac4789a.entry.js} +2 -2
  191. package/dist/core/le-kit/{p-4bf51acc.entry.js → p-45eace7c.entry.js} +2 -2
  192. package/dist/core/le-kit/{p-fd665f35.entry.js → p-556086ca.entry.js} +2 -2
  193. package/dist/core/le-kit/{p-dcf1343d.entry.js → p-5ef81068.entry.js} +2 -2
  194. package/dist/core/le-kit/{p-a24b042d.entry.js → p-66d35f48.entry.js} +2 -2
  195. package/dist/core/le-kit/{p-4a9a9805.entry.js → p-73682c5e.entry.js} +2 -2
  196. package/dist/{le-kit/p-PS-3Rz-c.js → core/le-kit/p-CJ-z5Zj1.js} +1 -1
  197. package/dist/core/le-kit/p-CJ-z5Zj1.js.map +1 -0
  198. package/dist/core/le-kit/{p-DN2JVY-7.js → p-Drz36PDp.js} +2 -2
  199. package/dist/core/le-kit/{p-DN2JVY-7.js.map → p-Drz36PDp.js.map} +1 -1
  200. package/dist/core/le-kit/{p-bbc9e13e.entry.js → p-aa6e906f.entry.js} +2 -2
  201. package/dist/core/le-kit/{p-38e7ec05.entry.js → p-d75214f9.entry.js} +2 -2
  202. package/dist/core/le-kit/{p-9ee92c29.entry.js → p-df552906.entry.js} +2 -2
  203. package/dist/core/le-kit/{p-c4223c60.entry.js → p-e0861e82.entry.js} +2 -2
  204. package/dist/core/types/global/app.d.ts +1 -1
  205. package/dist/core/types/index.d.ts +1 -1
  206. package/dist/docs.json +1 -1
  207. package/dist/esm/{index-PS-3Rz-c.js → index-CwNQ1GTa.js} +10 -4
  208. package/dist/esm/index-CwNQ1GTa.js.map +1 -0
  209. package/dist/esm/index.js +2 -2
  210. package/dist/esm/le-box.entry.js +2 -2
  211. package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +1 -1
  212. package/dist/esm/le-button_6.entry.js +11 -5
  213. package/dist/esm/le-card.entry.js +2 -2
  214. package/dist/esm/le-kit.js +2 -2
  215. package/dist/esm/le-number-input.entry.js +2 -2
  216. package/dist/esm/le-popup.entry.js +1 -1
  217. package/dist/esm/le-round-progress.entry.js +1 -1
  218. package/dist/esm/le-stack.entry.js +2 -2
  219. package/dist/esm/le-text.entry.js +2 -2
  220. package/dist/esm/le-turntable.entry.js +1 -1
  221. package/dist/esm/loader.js +2 -2
  222. package/dist/esm/{utils-lgjSfQP0.js → utils-Cf7fMI0j.js} +3 -3
  223. package/dist/esm/{utils-lgjSfQP0.js.map → utils-Cf7fMI0j.js.map} +1 -1
  224. package/dist/le-kit/assets/custom-elements.json +4305 -0
  225. package/dist/le-kit/dist/collection/themes/base.css +89 -0
  226. package/dist/le-kit/dist/collection/themes/dark.css +100 -0
  227. package/dist/le-kit/dist/collection/themes/default.css +108 -0
  228. package/dist/le-kit/dist/collection/themes/gradient.css +100 -0
  229. package/dist/le-kit/dist/collection/themes/index.css +413 -0
  230. package/dist/le-kit/dist/collection/themes/minimal.css +100 -0
  231. package/dist/le-kit/dist/collection/themes/warm.css +100 -0
  232. package/dist/le-kit/index.esm.js +1 -1
  233. package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +1 -1
  234. package/dist/le-kit/le-kit.esm.js +1 -1
  235. package/dist/le-kit/{p-935bb2d4.entry.js → p-08dbcc25.entry.js} +2 -2
  236. package/dist/le-kit/{p-d8157b06.entry.js → p-5dc35729.entry.js} +2 -2
  237. package/dist/le-kit/{p-34102cef.entry.js → p-64374730.entry.js} +2 -2
  238. package/dist/le-kit/{p-27710b5b.entry.js → p-79ec6f7c.entry.js} +2 -2
  239. package/dist/le-kit/{p-ccabc638.entry.js → p-8daf3c7f.entry.js} +2 -2
  240. package/dist/le-kit/p-9c69235d.entry.js +2 -0
  241. package/dist/le-kit/p-9c69235d.entry.js.map +1 -0
  242. package/dist/{core/le-kit/p-PS-3Rz-c.js → le-kit/p-CwNQ1GTa.js} +2 -2
  243. package/dist/le-kit/p-CwNQ1GTa.js.map +1 -0
  244. package/dist/le-kit/{p-e8c2ca0e.entry.js → p-ad398acd.entry.js} +2 -2
  245. package/dist/le-kit/{p-9d3dc4e5.entry.js → p-b8122ad6.entry.js} +2 -2
  246. package/dist/le-kit/{p-56a80e6d.entry.js → p-f9008505.entry.js} +2 -2
  247. package/dist/le-kit/{p-DN2JVY-7.js → p-y3FECAx9.js} +2 -2
  248. package/dist/le-kit/{p-DN2JVY-7.js.map → p-y3FECAx9.js.map} +1 -1
  249. package/dist/types/global/app.d.ts +1 -1
  250. package/dist/types/index.d.ts +1 -1
  251. package/package.json +2 -2
  252. package/dist/cjs/index-D7B9TPh8.js.map +0 -1
  253. package/dist/core/cjs/index-D7B9TPh8.js.map +0 -1
  254. package/dist/core/esm/index-PS-3Rz-c.js.map +0 -1
  255. package/dist/core/le-kit/p-PS-3Rz-c.js.map +0 -1
  256. package/dist/esm/index-PS-3Rz-c.js.map +0 -1
  257. package/dist/le-kit/p-615ea10f.entry.js +0 -2
  258. package/dist/le-kit/p-615ea10f.entry.js.map +0 -1
  259. package/dist/le-kit/p-PS-3Rz-c.js.map +0 -1
  260. /package/dist/core/le-kit/{p-a5f1e539.entry.js.map → p-0308bd1f.entry.js.map} +0 -0
  261. /package/dist/core/le-kit/{p-1c5262eb.entry.js.map → p-257495cc.entry.js.map} +0 -0
  262. /package/dist/core/le-kit/{p-32c08678.entry.js.map → p-2ac4789a.entry.js.map} +0 -0
  263. /package/dist/core/le-kit/{p-4bf51acc.entry.js.map → p-45eace7c.entry.js.map} +0 -0
  264. /package/dist/core/le-kit/{p-fd665f35.entry.js.map → p-556086ca.entry.js.map} +0 -0
  265. /package/dist/core/le-kit/{p-dcf1343d.entry.js.map → p-5ef81068.entry.js.map} +0 -0
  266. /package/dist/core/le-kit/{p-a24b042d.entry.js.map → p-66d35f48.entry.js.map} +0 -0
  267. /package/dist/core/le-kit/{p-4a9a9805.entry.js.map → p-73682c5e.entry.js.map} +0 -0
  268. /package/dist/core/le-kit/{p-bbc9e13e.entry.js.map → p-aa6e906f.entry.js.map} +0 -0
  269. /package/dist/core/le-kit/{p-38e7ec05.entry.js.map → p-d75214f9.entry.js.map} +0 -0
  270. /package/dist/core/le-kit/{p-9ee92c29.entry.js.map → p-df552906.entry.js.map} +0 -0
  271. /package/dist/core/le-kit/{p-c4223c60.entry.js.map → p-e0861e82.entry.js.map} +0 -0
  272. /package/dist/le-kit/{p-935bb2d4.entry.js.map → p-08dbcc25.entry.js.map} +0 -0
  273. /package/dist/le-kit/{p-d8157b06.entry.js.map → p-5dc35729.entry.js.map} +0 -0
  274. /package/dist/le-kit/{p-34102cef.entry.js.map → p-64374730.entry.js.map} +0 -0
  275. /package/dist/le-kit/{p-27710b5b.entry.js.map → p-79ec6f7c.entry.js.map} +0 -0
  276. /package/dist/le-kit/{p-ccabc638.entry.js.map → p-8daf3c7f.entry.js.map} +0 -0
  277. /package/dist/le-kit/{p-e8c2ca0e.entry.js.map → p-ad398acd.entry.js.map} +0 -0
  278. /package/dist/le-kit/{p-9d3dc4e5.entry.js.map → p-b8122ad6.entry.js.map} +0 -0
  279. /package/dist/le-kit/{p-56a80e6d.entry.js.map → p-f9008505.entry.js.map} +0 -0
@@ -0,0 +1,253 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$2 } from './le-button2.js';
3
+
4
+ const lePopupCss = ":host{display:contents}.le-popup-dialog{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;padding:0;border:none;background:transparent;max-width:none;max-height:none;overflow:visible;--_popup-min-width:var(--le-popup-min-width, 320px);--_popup-max-width:var(--le-popup-max-width, min(500px, 90vw));--_popup-min-height:var(--le-popup-min-height, auto)}.le-popup-dialog::backdrop{background:var(--le-popup-backdrop-color, rgba(0, 0, 0, 0.5));animation:le-popup-backdrop-fade 0.2s ease-out}@keyframes le-popup-backdrop-fade{from{opacity:0}to{opacity:1}}.le-popup-position-center{margin:auto}.le-popup-position-top{margin:var(--le-space-2xl, 48px) auto auto auto}.le-popup-position-top-left{margin:var(--le-space-lg, 24px) auto auto var(--le-space-lg, 24px)}.le-popup-position-top-right{margin:var(--le-space-lg, 24px) var(--le-space-lg, 24px) auto auto}.le-popup-position-bottom{margin:auto auto var(--le-space-2xl, 48px) auto}.le-popup-position-bottom-left{margin:auto auto var(--le-space-lg, 24px) var(--le-space-lg, 24px)}.le-popup-position-bottom-right{margin:auto var(--le-space-lg, 24px) var(--le-space-lg, 24px) auto}.le-popup-container{display:flex;flex-direction:column;min-width:var(--_popup-min-width);max-width:var(--_popup-max-width);min-height:var(--_popup-min-height);max-height:calc(100vh - var(--le-space-2xl, 48px) * 2);background:var(--le-color-surface, #ffffff);border:1px solid var(--le-color-border, #e0e0e0);border-radius:var(--le-radius-lg, 12px);box-shadow:var(--le-shadow-xl, 0 8px 32px rgba(0, 0, 0, 0.15));overflow:hidden;font-family:var(--le-font-family, system-ui, -apple-system, sans-serif);color:var(--le-color-text, #333);animation:le-popup-appear 0.2s ease-out}@keyframes le-popup-appear{from{opacity:0;transform:scale(0.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}.le-popup-header{flex-shrink:0;padding:var(--le-space-md, 16px) var(--le-space-lg, 24px);border-bottom:1px solid var(--le-color-border, #e0e0e0);background:var(--le-color-surface-alt, #f9f9f9);font-size:var(--le-font-size-lg, 1.125rem);font-weight:var(--le-font-weight-semibold, 600);color:var(--le-color-text, #333)}.le-popup-body{flex:1;padding:var(--le-space-lg, 24px);overflow-y:auto}.le-popup-message{margin:0;font-size:var(--le-font-size-md, 1rem);line-height:var(--le-line-height-relaxed, 1.6);color:var(--le-color-text, #333)}.le-popup-message+::slotted(*){margin-top:var(--le-space-md, 16px)}.le-popup-input{display:block;width:100%;margin-top:var(--le-space-md, 16px);padding:var(--le-space-sm, 8px) var(--le-space-md, 16px);font-family:inherit;font-size:var(--le-font-size-md, 1rem);color:var(--le-color-text, #333);background:var(--le-color-background, #fff);border:1px solid var(--le-color-border, #e0e0e0);border-radius:var(--le-radius-md, 8px);outline:none;transition:border-color var(--le-transition-fast, 0.15s ease),\n box-shadow var(--le-transition-fast, 0.15s ease);box-sizing:border-box}.le-popup-input:focus{border-color:var(--le-color-primary, #2196f3);box-shadow:0 0 0 3px var(--le-color-primary-light, rgba(33, 150, 243, 0.2))}.le-popup-input::placeholder{color:var(--le-color-text-muted, #999)}.le-popup-footer{flex-shrink:0;display:flex;justify-content:flex-end;gap:var(--le-space-sm, 8px);padding:var(--le-space-md, 16px) var(--le-space-lg, 24px);border-top:1px solid var(--le-color-border, #e0e0e0);background:var(--le-color-surface-alt, #f9f9f9)}.le-popup-btn{min-width:80px}@media (max-width: 480px){.le-popup-container{min-width:calc(100vw - var(--le-space-md, 16px) * 2);max-width:calc(100vw - var(--le-space-md, 16px) * 2)}.le-popup-footer{flex-direction:column-reverse}.le-popup-btn{width:100%}}";
5
+
6
+ const LePopup$1 = /*@__PURE__*/ proxyCustomElement(class LePopup extends HTMLElement {
7
+ constructor(registerHost) {
8
+ super();
9
+ if (registerHost !== false) {
10
+ this.__registerHost();
11
+ }
12
+ this.__attachShadow();
13
+ this.leConfirm = createEvent(this, "leConfirm", 7);
14
+ this.leCancel = createEvent(this, "leCancel", 7);
15
+ this.leOpen = createEvent(this, "leOpen", 7);
16
+ this.leClose = createEvent(this, "leClose", 7);
17
+ }
18
+ get el() { return this; }
19
+ /**
20
+ * Whether the popup is currently visible
21
+ */
22
+ open = false;
23
+ /**
24
+ * Type of popup: alert (OK only), confirm (OK/Cancel), prompt (input + OK/Cancel), custom
25
+ */
26
+ type = 'alert';
27
+ /**
28
+ * Optional title for the popup header
29
+ */
30
+ popupTitle;
31
+ /**
32
+ * Message text to display (for alert/confirm/prompt types)
33
+ */
34
+ message;
35
+ /**
36
+ * Whether the popup is modal (blocks interaction with page behind)
37
+ */
38
+ modal = true;
39
+ /**
40
+ * Position of the popup on screen
41
+ */
42
+ position = 'center';
43
+ /**
44
+ * Text for the confirm/OK button
45
+ */
46
+ confirmText = 'OK';
47
+ /**
48
+ * Text for the cancel button
49
+ */
50
+ cancelText = 'Cancel';
51
+ /**
52
+ * Placeholder text for prompt input
53
+ */
54
+ placeholder = '';
55
+ /**
56
+ * Default value for prompt input
57
+ */
58
+ defaultValue = '';
59
+ /**
60
+ * Whether clicking the backdrop closes the popup (modal only)
61
+ */
62
+ closeOnBackdrop = true;
63
+ /**
64
+ * Internal state for prompt input value
65
+ */
66
+ inputValue = '';
67
+ /**
68
+ * Emitted when the popup is confirmed (OK clicked)
69
+ */
70
+ leConfirm;
71
+ /**
72
+ * Emitted when the popup is cancelled (Cancel clicked or dismissed)
73
+ */
74
+ leCancel;
75
+ /**
76
+ * Emitted when the popup opens
77
+ */
78
+ leOpen;
79
+ /**
80
+ * Emitted when the popup closes
81
+ */
82
+ leClose;
83
+ dialogEl;
84
+ inputEl;
85
+ resolvePromise;
86
+ componentWillLoad() {
87
+ this.inputValue = this.defaultValue;
88
+ }
89
+ componentDidLoad() {
90
+ // Native dialog handles Escape key automatically when modal
91
+ // We just need to listen for the cancel event
92
+ this.dialogEl?.addEventListener('cancel', this.handleDialogCancel);
93
+ }
94
+ disconnectedCallback() {
95
+ this.dialogEl?.removeEventListener('cancel', this.handleDialogCancel);
96
+ }
97
+ handleDialogCancel = (e) => {
98
+ e.preventDefault(); // Prevent default close to handle it ourselves
99
+ this.handleCancel();
100
+ };
101
+ /**
102
+ * Opens the popup and returns a promise that resolves when closed
103
+ */
104
+ async show() {
105
+ return new Promise((resolve) => {
106
+ this.resolvePromise = resolve;
107
+ this.inputValue = this.defaultValue;
108
+ this.open = true;
109
+ // Use requestAnimationFrame to ensure the dialog element is rendered
110
+ requestAnimationFrame(() => {
111
+ if (this.dialogEl) {
112
+ if (this.modal) {
113
+ this.dialogEl.showModal();
114
+ }
115
+ else {
116
+ this.dialogEl.show();
117
+ }
118
+ this.leOpen.emit();
119
+ // Focus input for prompt type
120
+ if (this.type === 'prompt' && this.inputEl) {
121
+ this.inputEl.focus();
122
+ this.inputEl.select();
123
+ }
124
+ }
125
+ });
126
+ });
127
+ }
128
+ /**
129
+ * Closes the popup with a result
130
+ */
131
+ async hide(confirmed = false) {
132
+ const result = {
133
+ confirmed,
134
+ value: this.type === 'prompt' ? this.inputValue : undefined,
135
+ };
136
+ this.dialogEl?.close();
137
+ this.open = false;
138
+ this.leClose.emit(result);
139
+ if (this.resolvePromise) {
140
+ this.resolvePromise(result);
141
+ this.resolvePromise = undefined;
142
+ }
143
+ }
144
+ handleConfirm = () => {
145
+ const result = {
146
+ confirmed: true,
147
+ value: this.type === 'prompt' ? this.inputValue : undefined,
148
+ };
149
+ this.leConfirm.emit(result);
150
+ this.hide(true);
151
+ };
152
+ handleCancel = () => {
153
+ const result = {
154
+ confirmed: false,
155
+ value: undefined,
156
+ };
157
+ this.leCancel.emit(result);
158
+ this.hide(false);
159
+ };
160
+ handleBackdropClick = (e) => {
161
+ // Check if click was on the dialog backdrop (outside the dialog box)
162
+ if (this.closeOnBackdrop && e.target === this.dialogEl) {
163
+ const rect = this.dialogEl.getBoundingClientRect();
164
+ const clickedInDialog = (e.clientX >= rect.left &&
165
+ e.clientX <= rect.right &&
166
+ e.clientY >= rect.top &&
167
+ e.clientY <= rect.bottom);
168
+ if (!clickedInDialog) {
169
+ this.handleCancel();
170
+ }
171
+ }
172
+ };
173
+ handleInputChange = (e) => {
174
+ this.inputValue = e.target.value;
175
+ };
176
+ handleKeyDown = (e) => {
177
+ if (e.key === 'Enter' && this.type !== 'custom') {
178
+ e.preventDefault();
179
+ this.handleConfirm();
180
+ }
181
+ };
182
+ hasSlot(name) {
183
+ return !!this.el.querySelector(`[slot="${name}"]`);
184
+ }
185
+ renderHeader() {
186
+ if (this.hasSlot('header')) {
187
+ return (h("div", { class: "le-popup-header", part: "header" }, h("slot", { name: "header" })));
188
+ }
189
+ if (this.popupTitle) {
190
+ return (h("div", { class: "le-popup-header", part: "header" }, this.popupTitle));
191
+ }
192
+ return null;
193
+ }
194
+ renderBody() {
195
+ return (h("div", { class: "le-popup-body", part: "body" }, this.message && h("p", { class: "le-popup-message" }, this.message), this.type === 'prompt' && (h("input", { type: "text", class: "le-popup-input", part: "input", placeholder: this.placeholder, value: this.inputValue, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, ref: (el) => (this.inputEl = el) })), h("slot", null)));
196
+ }
197
+ renderFooter() {
198
+ if (this.hasSlot('footer')) {
199
+ return (h("div", { class: "le-popup-footer", part: "footer" }, h("slot", { name: "footer" })));
200
+ }
201
+ // For custom type without footer slot, don't render default buttons
202
+ if (this.type === 'custom') {
203
+ return null;
204
+ }
205
+ return (h("div", { class: "le-popup-footer", part: "footer" }, (this.type === 'confirm' || this.type === 'prompt') && (h("le-button", { variant: "outlined", part: "button-cancel", class: "le-popup-btn", onClick: this.handleCancel }, this.cancelText)), h("le-button", { variant: "solid", part: "button-confirm", class: "le-popup-btn", onClick: this.handleConfirm }, this.confirmText)));
206
+ }
207
+ render() {
208
+ const positionClass = `le-popup-position-${this.position}`;
209
+ return (h("dialog", { key: '2577d13672e69f8e6667a88aa089e4785d5eef9b', class: `le-popup-dialog ${positionClass}`, part: "dialog", ref: (el) => (this.dialogEl = el), onClick: this.handleBackdropClick }, h("div", { key: '7e4cf46898f81d8a0690ebc8649b356d8ffeb360', class: "le-popup-container", part: "container" }, this.renderHeader(), this.renderBody(), this.renderFooter())));
210
+ }
211
+ static get style() { return lePopupCss; }
212
+ }, [769, "le-popup", {
213
+ "open": [1540],
214
+ "type": [1],
215
+ "popupTitle": [1, "popup-title"],
216
+ "message": [1],
217
+ "modal": [4],
218
+ "position": [1],
219
+ "confirmText": [1, "confirm-text"],
220
+ "cancelText": [1, "cancel-text"],
221
+ "placeholder": [1],
222
+ "defaultValue": [1, "default-value"],
223
+ "closeOnBackdrop": [4, "close-on-backdrop"],
224
+ "inputValue": [32],
225
+ "show": [64],
226
+ "hide": [64]
227
+ }]);
228
+ function defineCustomElement$1() {
229
+ if (typeof customElements === "undefined") {
230
+ return;
231
+ }
232
+ const components = ["le-popup", "le-button"];
233
+ components.forEach(tagName => { switch (tagName) {
234
+ case "le-popup":
235
+ if (!customElements.get(tagName)) {
236
+ customElements.define(tagName, LePopup$1);
237
+ }
238
+ break;
239
+ case "le-button":
240
+ if (!customElements.get(tagName)) {
241
+ defineCustomElement$2();
242
+ }
243
+ break;
244
+ } });
245
+ }
246
+
247
+ const LePopup = LePopup$1;
248
+ const defineCustomElement = defineCustomElement$1;
249
+
250
+ export { LePopup, defineCustomElement };
251
+ //# sourceMappingURL=le-popup.js.map
252
+
253
+ //# sourceMappingURL=le-popup.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-popup.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,ylHAAylH;;MCuC/lHA,SAAO,iBAAAC,kBAAA,CAAA,MAAA,OAAA,SAAA,WAAA,CAAA;;;;;;;;;;;;;AAGlB;;AAEG;IACqC,IAAI,GAAY,KAAK;AAE7D;;AAEG;IACK,IAAI,GAAc,OAAO;AAEjC;;AAEG;AACK,IAAA,UAAU;AAElB;;AAEG;AACK,IAAA,OAAO;AAEf;;AAEG;IACK,KAAK,GAAY,IAAI;AAE7B;;AAEG;IACK,QAAQ,GAAkB,QAAQ;AAE1C;;AAEG;IACK,WAAW,GAAW,IAAI;AAElC;;AAEG;IACK,UAAU,GAAW,QAAQ;AAErC;;AAEG;IACK,WAAW,GAAW,EAAE;AAEhC;;AAEG;IACK,YAAY,GAAW,EAAE;AAEjC;;AAEG;IACK,eAAe,GAAY,IAAI;AAEvC;;AAEG;IACM,UAAU,GAAW,EAAE;AAEhC;;AAE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B,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAA,EAEzB,IAAI,CAAC,UAAU,CACN,CACb,EACD,CACE,CAAA,WAAA,EAAA,EAAA,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,IAAI,CAAC,aAAa,EAE1B,EAAA,IAAI,CAAC,WAAW,CACP,CACR;;IAIV,MAAM,GAAA;AACJ,QAAA,MAAM,aAAa,GAAG,CAAA,kBAAA,EAAqB,IAAI,CAAC,QAAQ,EAAE;AAE1D,QAAA,QACE,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,CAAA,gBAAA,EAAmB,aAAa,CAAA,CAAE,EACzC,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,EACjC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAA,EAG/B,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,WAAW,EAAA,EAC7C,IAAI,CAAC,YAAY,EAAE,EACnB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,YAAY,EAAE,CAChB,CAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["LePopup","__stencil_proxyCustomElement"],"sources":["src-core/components/le-popup/le-popup.css?tag=le-popup&encapsulation=shadow","src-core/components/le-popup/le-popup.tsx"],"sourcesContent":["/* ============================================\n le-popup.css\n Popup/Dialog component using native <dialog>\n Uses CSS variables for easy theming\n ============================================ */\n\n:host {\n display: contents;\n}\n\n/* ============================================\n Native Dialog Element\n ============================================ */\n\n.le-popup-dialog {\n /* Reset default dialog styles */\n position: fixed;\n z-index: 100;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 0;\n border: none;\n background: transparent;\n max-width: none;\n max-height: none;\n overflow: visible;\n \n /* Sizing variables */\n --_popup-min-width: var(--le-popup-min-width, 320px);\n --_popup-max-width: var(--le-popup-max-width, min(500px, 90vw));\n --_popup-min-height: var(--le-popup-min-height, auto);\n}\n\n/* Backdrop styling (native ::backdrop pseudo-element) */\n.le-popup-dialog::backdrop {\n background: var(--le-popup-backdrop-color, rgba(0, 0, 0, 0.5));\n animation: le-popup-backdrop-fade 0.2s ease-out;\n}\n\n@keyframes le-popup-backdrop-fade {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* ============================================\n Position Variants\n Using margin to position within viewport\n ============================================ */\n\n/* Center (default) */\n.le-popup-position-center {\n margin: auto;\n}\n\n/* Top positions */\n.le-popup-position-top {\n margin: var(--le-space-2xl, 48px) auto auto auto;\n}\n\n.le-popup-position-top-left {\n margin: var(--le-space-lg, 24px) auto auto var(--le-space-lg, 24px);\n}\n\n.le-popup-position-top-right {\n margin: var(--le-space-lg, 24px) var(--le-space-lg, 24px) auto auto;\n}\n\n/* Bottom positions */\n.le-popup-position-bottom {\n margin: auto auto var(--le-space-2xl, 48px) auto;\n}\n\n.le-popup-position-bottom-left {\n margin: auto auto var(--le-space-lg, 24px) var(--le-space-lg, 24px);\n}\n\n.le-popup-position-bottom-right {\n margin: auto var(--le-space-lg, 24px) var(--le-space-lg, 24px) auto;\n}\n\n/* ============================================\n Container (the visible dialog box)\n ============================================ */\n\n.le-popup-container {\n display: flex;\n flex-direction: column;\n min-width: var(--_popup-min-width);\n max-width: var(--_popup-max-width);\n min-height: var(--_popup-min-height);\n max-height: calc(100vh - var(--le-space-2xl, 48px) * 2);\n background: var(--le-color-surface, #ffffff);\n border: 1px solid var(--le-color-border, #e0e0e0);\n border-radius: var(--le-radius-lg, 12px);\n box-shadow: var(--le-shadow-xl, 0 8px 32px rgba(0, 0, 0, 0.15));\n overflow: hidden;\n font-family: var(--le-font-family, system-ui, -apple-system, sans-serif);\n color: var(--le-color-text, #333);\n \n /* Animation */\n animation: le-popup-appear 0.2s ease-out;\n}\n\n@keyframes le-popup-appear {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n/* ============================================\n Header\n ============================================ */\n\n.le-popup-header {\n flex-shrink: 0;\n padding: var(--le-space-md, 16px) var(--le-space-lg, 24px);\n border-bottom: 1px solid var(--le-color-border, #e0e0e0);\n background: var(--le-color-surface-alt, #f9f9f9);\n font-size: var(--le-font-size-lg, 1.125rem);\n font-weight: var(--le-font-weight-semibold, 600);\n color: var(--le-color-text, #333);\n}\n\n/* ============================================\n Body\n ============================================ */\n\n.le-popup-body {\n flex: 1;\n padding: var(--le-space-lg, 24px);\n overflow-y: auto;\n}\n\n.le-popup-message {\n margin: 0;\n font-size: var(--le-font-size-md, 1rem);\n line-height: var(--le-line-height-relaxed, 1.6);\n color: var(--le-color-text, #333);\n}\n\n/* When there's both message and slot content */\n.le-popup-message + ::slotted(*) {\n margin-top: var(--le-space-md, 16px);\n}\n\n/* ============================================\n Input (for prompt type)\n ============================================ */\n\n.le-popup-input {\n display: block;\n width: 100%;\n margin-top: var(--le-space-md, 16px);\n padding: var(--le-space-sm, 8px) var(--le-space-md, 16px);\n font-family: inherit;\n font-size: var(--le-font-size-md, 1rem);\n color: var(--le-color-text, #333);\n background: var(--le-color-background, #fff);\n border: 1px solid var(--le-color-border, #e0e0e0);\n border-radius: var(--le-radius-md, 8px);\n outline: none;\n transition: border-color var(--le-transition-fast, 0.15s ease),\n box-shadow var(--le-transition-fast, 0.15s ease);\n box-sizing: border-box;\n}\n\n.le-popup-input:focus {\n border-color: var(--le-color-primary, #2196f3);\n box-shadow: 0 0 0 3px var(--le-color-primary-light, rgba(33, 150, 243, 0.2));\n}\n\n.le-popup-input::placeholder {\n color: var(--le-color-text-muted, #999);\n}\n\n/* ============================================\n Footer (buttons)\n ============================================ */\n\n.le-popup-footer {\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n gap: var(--le-space-sm, 8px);\n padding: var(--le-space-md, 16px) var(--le-space-lg, 24px);\n border-top: 1px solid var(--le-color-border, #e0e0e0);\n background: var(--le-color-surface-alt, #f9f9f9);\n}\n\n/* ============================================\n Buttons\n ============================================ */\n\n.le-popup-btn {\n min-width: 80px;\n}\n\n/* ============================================\n Responsive adjustments\n ============================================ */\n\n@media (max-width: 480px) {\n .le-popup-container {\n min-width: calc(100vw - var(--le-space-md, 16px) * 2);\n max-width: calc(100vw - var(--le-space-md, 16px) * 2);\n }\n \n .le-popup-footer {\n flex-direction: column-reverse;\n }\n \n .le-popup-btn {\n width: 100%;\n }\n}","import { Component, Prop, Method, Event, EventEmitter, State, Element, h } from '@stencil/core';\n\n/**\n * Popup type determines the buttons shown\n */\nexport type PopupType = 'alert' | 'confirm' | 'prompt' | 'custom';\n\n/**\n * Popup position on the screen\n */\nexport type PopupPosition = 'center' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\n/**\n * Result returned by the popup when closed\n */\nexport interface PopupResult {\n confirmed: boolean;\n value?: string;\n}\n\n/**\n * A flexible popup/dialog component for alerts, confirms, prompts, and custom content.\n * \n * Uses the native HTML <dialog> element for proper modal behavior, accessibility,\n * and focus management. Can be used declaratively in HTML or programmatically \n * via leAlert(), leConfirm(), lePrompt().\n *\n * @slot - Default slot for custom body content\n * @slot header - Custom header content (replaces title)\n * @slot footer - Custom footer content (replaces default buttons)\n * \n * @cmsInternal true\n * @cmsCategory System\n */\n@Component({\n tag: 'le-popup',\n styleUrl: 'le-popup.css',\n shadow: true,\n})\nexport class LePopup {\n @Element() el: HTMLElement;\n\n /**\n * Whether the popup is currently visible\n */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /**\n * Type of popup: alert (OK only), confirm (OK/Cancel), prompt (input + OK/Cancel), custom\n */\n @Prop() type: PopupType = 'alert';\n\n /**\n * Optional title for the popup header\n */\n @Prop() popupTitle?: string;\n\n /**\n * Message text to display (for alert/confirm/prompt types)\n */\n @Prop() message?: string;\n\n /**\n * Whether the popup is modal (blocks interaction with page behind)\n */\n @Prop() modal: boolean = true;\n\n /**\n * Position of the popup on screen\n */\n @Prop() position: PopupPosition = 'center';\n\n /**\n * Text for the confirm/OK button\n */\n @Prop() confirmText: string = 'OK';\n\n /**\n * Text for the cancel button\n */\n @Prop() cancelText: string = 'Cancel';\n\n /**\n * Placeholder text for prompt input\n */\n @Prop() placeholder: string = '';\n\n /**\n * Default value for prompt input\n */\n @Prop() defaultValue: string = '';\n\n /**\n * Whether clicking the backdrop closes the popup (modal only)\n */\n @Prop() closeOnBackdrop: boolean = true;\n\n /**\n * Internal state for prompt input value\n */\n @State() inputValue: string = '';\n\n /**\n * Emitted when the popup is confirmed (OK clicked)\n */\n @Event() leConfirm: EventEmitter<PopupResult>;\n\n /**\n * Emitted when the popup is cancelled (Cancel clicked or dismissed)\n */\n @Event() leCancel: EventEmitter<PopupResult>;\n\n /**\n * Emitted when the popup opens\n */\n @Event() leOpen: EventEmitter<void>;\n\n /**\n * Emitted when the popup closes\n */\n @Event() leClose: EventEmitter<PopupResult>;\n\n private dialogEl?: HTMLDialogElement;\n private inputEl?: HTMLInputElement;\n private resolvePromise?: (result: PopupResult) => void;\n\n componentWillLoad() {\n this.inputValue = this.defaultValue;\n }\n\n componentDidLoad() {\n // Native dialog handles Escape key automatically when modal\n // We just need to listen for the cancel event\n this.dialogEl?.addEventListener('cancel', this.handleDialogCancel);\n }\n\n disconnectedCallback() {\n this.dialogEl?.removeEventListener('cancel', this.handleDialogCancel);\n }\n\n private handleDialogCancel = (e: Event) => {\n e.preventDefault(); // Prevent default close to handle it ourselves\n this.handleCancel();\n };\n\n /**\n * Opens the popup and returns a promise that resolves when closed\n */\n @Method()\n async show(): Promise<PopupResult> {\n return new Promise((resolve) => {\n this.resolvePromise = resolve;\n this.inputValue = this.defaultValue;\n this.open = true;\n \n // Use requestAnimationFrame to ensure the dialog element is rendered\n requestAnimationFrame(() => {\n if (this.dialogEl) {\n if (this.modal) {\n this.dialogEl.showModal();\n } else {\n this.dialogEl.show();\n }\n \n this.leOpen.emit();\n \n // Focus input for prompt type\n if (this.type === 'prompt' && this.inputEl) {\n this.inputEl.focus();\n this.inputEl.select();\n }\n }\n });\n });\n }\n\n /**\n * Closes the popup with a result\n */\n @Method()\n async hide(confirmed: boolean = false) {\n const result: PopupResult = {\n confirmed,\n value: this.type === 'prompt' ? this.inputValue : undefined,\n };\n \n this.dialogEl?.close();\n this.open = false;\n this.leClose.emit(result);\n \n if (this.resolvePromise) {\n this.resolvePromise(result);\n this.resolvePromise = undefined;\n }\n }\n\n private handleConfirm = () => {\n const result: PopupResult = {\n confirmed: true,\n value: this.type === 'prompt' ? this.inputValue : undefined,\n };\n this.leConfirm.emit(result);\n this.hide(true);\n };\n\n private handleCancel = () => {\n const result: PopupResult = {\n confirmed: false,\n value: undefined,\n };\n this.leCancel.emit(result);\n this.hide(false);\n };\n\n private handleBackdropClick = (e: MouseEvent) => {\n // Check if click was on the dialog backdrop (outside the dialog box)\n if (this.closeOnBackdrop && e.target === this.dialogEl) {\n const rect = this.dialogEl.getBoundingClientRect();\n const clickedInDialog = (\n e.clientX >= rect.left &&\n e.clientX <= rect.right &&\n e.clientY >= rect.top &&\n e.clientY <= rect.bottom\n );\n if (!clickedInDialog) {\n this.handleCancel();\n }\n }\n };\n\n private handleInputChange = (e: Event) => {\n this.inputValue = (e.target as HTMLInputElement).value;\n };\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Enter' && this.type !== 'custom') {\n e.preventDefault();\n this.handleConfirm();\n }\n };\n\n private hasSlot(name: string): boolean {\n return !!this.el.querySelector(`[slot=\"${name}\"]`);\n }\n\n private renderHeader() {\n if (this.hasSlot('header')) {\n return (\n <div class=\"le-popup-header\" part=\"header\">\n <slot name=\"header\"></slot>\n </div>\n );\n }\n \n if (this.popupTitle) {\n return (\n <div class=\"le-popup-header\" part=\"header\">\n {this.popupTitle}\n </div>\n );\n }\n \n return null;\n }\n\n private renderBody() {\n return (\n <div class=\"le-popup-body\" part=\"body\">\n {this.message && <p class=\"le-popup-message\">{this.message}</p>}\n \n {this.type === 'prompt' && (\n <input\n type=\"text\"\n class=\"le-popup-input\"\n part=\"input\"\n placeholder={this.placeholder}\n value={this.inputValue}\n onInput={this.handleInputChange}\n onKeyDown={this.handleKeyDown}\n ref={(el) => (this.inputEl = el)}\n />\n )}\n \n {/* Default slot for custom content */}\n \n <slot></slot>\n \n </div>\n );\n }\n\n private renderFooter() {\n if (this.hasSlot('footer')) {\n return (\n <div class=\"le-popup-footer\" part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n );\n }\n \n // For custom type without footer slot, don't render default buttons\n if (this.type === 'custom') {\n return null;\n }\n \n return (\n <div class=\"le-popup-footer\" part=\"footer\">\n {(this.type === 'confirm' || this.type === 'prompt') && (\n <le-button\n variant=\"outlined\"\n part=\"button-cancel\"\n class=\"le-popup-btn\"\n onClick={this.handleCancel}\n >\n {this.cancelText}\n </le-button>\n )}\n <le-button\n variant=\"solid\"\n part=\"button-confirm\"\n class=\"le-popup-btn\"\n onClick={this.handleConfirm}\n >\n {this.confirmText}\n </le-button>\n </div>\n );\n }\n\n render() {\n const positionClass = `le-popup-position-${this.position}`;\n \n return (\n <dialog\n class={`le-popup-dialog ${positionClass}`}\n part=\"dialog\"\n ref={(el) => (this.dialogEl = el)}\n onClick={this.handleBackdropClick}\n >\n \n <div class=\"le-popup-container\" part=\"container\">\n {this.renderHeader()}\n {this.renderBody()}\n {this.renderFooter()}\n </div>\n \n </dialog>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface LeRoundProgress extends Components.LeRoundProgress, HTMLElement {}
4
+ export const LeRoundProgress: {
5
+ prototype: LeRoundProgress;
6
+ new (): LeRoundProgress;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,135 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
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$1 = /*@__PURE__*/ proxyCustomElement(class LeRoundProgress extends HTMLElement {
6
+ constructor(registerHost) {
7
+ super();
8
+ if (registerHost !== false) {
9
+ this.__registerHost();
10
+ }
11
+ this.__attachShadow();
12
+ }
13
+ get el() { return this; }
14
+ // progress value coming from an attribute
15
+ value = 0;
16
+ updateValue(newValue) {
17
+ this.value = parseFloat(newValue);
18
+ }
19
+ // padding value coming from an attribute
20
+ padding = 0;
21
+ updatePadding(newValue) {
22
+ this.padding = parseFloat(newValue);
23
+ this.calcParams();
24
+ }
25
+ // the progress backgrounds can be as many as needed
26
+ // but it should be JSON format: double quotes and strict commas
27
+ paths;
28
+ updateProgressBackgrounds(newValue) {
29
+ this.progressPaths = JSON.parse(newValue);
30
+ }
31
+ progressPaths;
32
+ params;
33
+ /**
34
+ * Component lifecycles
35
+ *
36
+ * Before the component is loaded, we need to calculate and update params
37
+ * using the component size (width of the round progress)
38
+ * and progress width (max of )
39
+ */
40
+ componentWillLoad() {
41
+ if (typeof this.paths === 'string') {
42
+ this.updateProgressBackgrounds(this.paths);
43
+ }
44
+ this.calcParams();
45
+ }
46
+ calcParams() {
47
+ // get element width
48
+ const width = this.el.getBoundingClientRect().width;
49
+ const diameter = width - this.padding;
50
+ // calc circumference — we'll need it later to calc the stroke paths
51
+ const circumference = Math.PI * diameter;
52
+ this.params = { width, diameter, circumference };
53
+ }
54
+ /**
55
+ * Returns the viewPath attribute value for the SVG
56
+ * based on the width of the parent element
57
+ */
58
+ getViewBox() {
59
+ return '0 0 ' + this.params.width + ' ' + this.params.width;
60
+ }
61
+ /**
62
+ * Returns the circular path for the progress stroke
63
+ * and additional paths in the background
64
+ */
65
+ getPath() {
66
+ return ('M' +
67
+ this.params.width / 2 +
68
+ ' ' +
69
+ (this.params.width - this.params.diameter) / 2 +
70
+ ' a ' +
71
+ this.params.diameter / 2 +
72
+ ' ' +
73
+ this.params.diameter / 2 +
74
+ ' 0 0 1 0 ' +
75
+ this.params.diameter +
76
+ ' a ' +
77
+ this.params.diameter / 2 +
78
+ ' ' +
79
+ this.params.diameter / 2 +
80
+ ' 0 0 1 0 -' +
81
+ this.params.diameter);
82
+ }
83
+ getStrokeDashArray() {
84
+ return (this.value / 100) * this.params.circumference + ', ' + this.params.circumference;
85
+ }
86
+ getPaths() {
87
+ if (!this.progressPaths || !this.progressPaths.length) {
88
+ return null;
89
+ }
90
+ let paths = [];
91
+ this.progressPaths.forEach(bg => {
92
+ 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 }));
93
+ });
94
+ return (h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, paths));
95
+ }
96
+ render() {
97
+ 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' })));
98
+ }
99
+ static get watchers() { return {
100
+ "value": ["updateValue"],
101
+ "padding": ["updatePadding"],
102
+ "paths": ["updateProgressBackgrounds"]
103
+ }; }
104
+ static get style() { return leRoundProgressCss; }
105
+ }, [769, "le-round-progress", {
106
+ "value": [2],
107
+ "padding": [2],
108
+ "paths": [1],
109
+ "params": [32]
110
+ }, undefined, {
111
+ "value": ["updateValue"],
112
+ "padding": ["updatePadding"],
113
+ "paths": ["updateProgressBackgrounds"]
114
+ }]);
115
+ function defineCustomElement$1() {
116
+ if (typeof customElements === "undefined") {
117
+ return;
118
+ }
119
+ const components = ["le-round-progress"];
120
+ components.forEach(tagName => { switch (tagName) {
121
+ case "le-round-progress":
122
+ if (!customElements.get(tagName)) {
123
+ customElements.define(tagName, LeRoundProgress$1);
124
+ }
125
+ break;
126
+ } });
127
+ }
128
+
129
+ const LeRoundProgress = LeRoundProgress$1;
130
+ const defineCustomElement = defineCustomElement$1;
131
+
132
+ export { LeRoundProgress, defineCustomElement };
133
+ //# sourceMappingURL=le-round-progress.js.map
134
+
135
+ //# sourceMappingURL=le-round-progress.js.map
@@ -0,0 +1 @@
1
+ {"file":"le-round-progress.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,oiBAAoiB;;MCOljBA,iBAAe,iBAAAC,kBAAA,CAAA,MAAA,eAAA,SAAA,WAAA,CAAA;;;;;;;;;;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,EAAA;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;;AAE3C,IAAA,aAAa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IAAI,CAAC,OAAO,EAAE,GAAI,CACnG,EACN,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["LeRoundProgress","__stencil_proxyCustomElement"],"sources":["src-core/components/le-round-progress/le-round-progress.css?tag=le-round-progress&encapsulation=shadow","src-core/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"],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../../dist/types/components";
2
+
3
+ interface LeStack extends Components.LeStack, HTMLElement {}
4
+ export const LeStack: {
5
+ prototype: LeStack;
6
+ new (): LeStack;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,167 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { h as classnames } from './utils.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$1 = /*@__PURE__*/ proxyCustomElement(class LeStack extends HTMLElement {
7
+ constructor(registerHost) {
8
+ super();
9
+ if (registerHost !== false) {
10
+ this.__registerHost();
11
+ }
12
+ this.__attachShadow();
13
+ }
14
+ get el() { return this; }
15
+ /**
16
+ * Direction of the stack layout
17
+ * @allowedValues horizontal | vertical
18
+ */
19
+ direction = 'horizontal';
20
+ /**
21
+ * Gap between items (CSS value like '8px', '1rem', 'var(--le-space-md)')
22
+ */
23
+ gap;
24
+ /**
25
+ * Alignment of items on the cross axis
26
+ * @allowedValues start | center | end | stretch | baseline
27
+ */
28
+ align = 'stretch';
29
+ /**
30
+ * Distribution of items on the main axis
31
+ * @allowedValues start | center | end | space-between | space-around | space-evenly
32
+ */
33
+ justify = 'start';
34
+ /**
35
+ * Whether items should wrap to multiple lines
36
+ */
37
+ wrap = false;
38
+ /**
39
+ * Alignment of wrapped lines (only applies when wrap is true)
40
+ * @allowedValues start | center | end | stretch | space-between | space-around
41
+ */
42
+ alignContent = 'stretch';
43
+ /**
44
+ * Whether to reverse the order of items
45
+ */
46
+ reverse = false;
47
+ /**
48
+ * Maximum number of items allowed in the stack (for CMS validation)
49
+ * @min 1
50
+ */
51
+ maxItems;
52
+ /**
53
+ * Whether the stack should take full width of its container
54
+ */
55
+ fullWidth = false;
56
+ /**
57
+ * Whether the stack should take full height of its container
58
+ */
59
+ fullHeight = false;
60
+ /**
61
+ * Padding inside the stack container (CSS value)
62
+ */
63
+ padding;
64
+ getFlexDirection() {
65
+ const base = this.direction === 'vertical' ? 'column' : 'row';
66
+ return this.reverse ? `${base}-reverse` : base;
67
+ }
68
+ getAlignItems() {
69
+ const alignMap = {
70
+ start: 'flex-start',
71
+ center: 'center',
72
+ end: 'flex-end',
73
+ stretch: 'stretch',
74
+ baseline: 'baseline',
75
+ };
76
+ return alignMap[this.align] || 'stretch';
77
+ }
78
+ getJustifyContent() {
79
+ const justifyMap = {
80
+ start: 'flex-start',
81
+ center: 'center',
82
+ end: 'flex-end',
83
+ 'space-between': 'space-between',
84
+ 'space-around': 'space-around',
85
+ 'space-evenly': 'space-evenly',
86
+ };
87
+ return justifyMap[this.justify] || 'flex-start';
88
+ }
89
+ getAlignContent() {
90
+ const alignContentMap = {
91
+ start: 'flex-start',
92
+ center: 'center',
93
+ end: 'flex-end',
94
+ stretch: 'stretch',
95
+ 'space-between': 'space-between',
96
+ 'space-around': 'space-around',
97
+ };
98
+ return alignContentMap[this.alignContent] || 'stretch';
99
+ }
100
+ render() {
101
+ const style = {
102
+ display: 'flex',
103
+ flexDirection: this.getFlexDirection(),
104
+ alignItems: this.getAlignItems(),
105
+ justifyContent: this.getJustifyContent(),
106
+ flexWrap: this.wrap ? 'wrap' : 'nowrap',
107
+ };
108
+ if (this.wrap) {
109
+ style.alignContent = this.getAlignContent();
110
+ }
111
+ if (this.gap) {
112
+ style.gap = this.gap;
113
+ }
114
+ if (this.padding) {
115
+ style.padding = this.padding;
116
+ }
117
+ // if (this.fullWidth) {
118
+ // style.width = '100%';
119
+ // }
120
+ // if (this.fullHeight) {
121
+ // style.height = '100%';
122
+ // }
123
+ const hostClass = classnames(`direction-${this.direction}`, {
124
+ 'wrap': this.wrap,
125
+ 'reverse': this.reverse,
126
+ 'full-width': this.fullWidth,
127
+ 'full-height': this.fullHeight,
128
+ });
129
+ // Slot style for admin mode - make items display in the same direction
130
+ `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()};`;
131
+ return (h(Host, { key: '2cb4f4d86677c74c2db364f5d401d7911067c9d2', class: hostClass }, h("div", { key: '4f3a69840cf5c1efd22ef3bb9d18198f8d578a20', class: "stack", part: "stack", style: style }, h("slot", { key: 'ce93b2e01cb09e5351839894464f8f64e203f98e' }))));
132
+ }
133
+ static get style() { return leStackDefaultCss; }
134
+ }, [769, "le-stack", {
135
+ "direction": [1],
136
+ "gap": [1],
137
+ "align": [1],
138
+ "justify": [1],
139
+ "wrap": [4],
140
+ "alignContent": [1, "align-content"],
141
+ "reverse": [4],
142
+ "maxItems": [2, "max-items"],
143
+ "fullWidth": [4, "full-width"],
144
+ "fullHeight": [4, "full-height"],
145
+ "padding": [1]
146
+ }]);
147
+ function defineCustomElement$1() {
148
+ if (typeof customElements === "undefined") {
149
+ return;
150
+ }
151
+ const components = ["le-stack"];
152
+ components.forEach(tagName => { switch (tagName) {
153
+ case "le-stack":
154
+ if (!customElements.get(tagName)) {
155
+ customElements.define(tagName, LeStack$1);
156
+ }
157
+ break;
158
+ } });
159
+ }
160
+
161
+ const LeStack = LeStack$1;
162
+ const defineCustomElement = defineCustomElement$1;
163
+
164
+ export { LeStack, defineCustomElement };
165
+ //# sourceMappingURL=le-stack.js.map
166
+
167
+ //# sourceMappingURL=le-stack.js.map