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,359 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { classnames, observeModeChanges } from "../../utils/utils";
3
+ /**
4
+ * Component wrapper for admin mode editing.
5
+ *
6
+ * This component is used internally by other components to provide admin-mode
7
+ * editing capabilities. It wraps the component's rendered output and shows
8
+ * a settings popover for editing properties.
9
+ *
10
+ * In default mode, it acts as a simple passthrough (display: contents).
11
+ * In admin mode, it shows a border, component name header, and settings popover.
12
+ *
13
+ * The host element is found automatically by traversing up through the shadow DOM.
14
+ *
15
+ * Usage inside a component's render method:
16
+ * ```tsx
17
+ * render() {
18
+ * return (
19
+ * <le-component component="le-card">
20
+ * <Host>...</Host>
21
+ * </le-component>
22
+ * );
23
+ * }
24
+ * ```
25
+ *
26
+ * @slot - The component's rendered content
27
+ *
28
+ * @cmsInternal true
29
+ * @cmsCategory System
30
+ */
31
+ export class LeComponent {
32
+ el;
33
+ /**
34
+ * The tag name of the component (e.g., 'le-card').
35
+ * Used to look up property metadata and display the component name.
36
+ */
37
+ component;
38
+ /**
39
+ * Optional display name for the component.
40
+ * If not provided, the tag name will be formatted as the display name.
41
+ */
42
+ displayName;
43
+ /**
44
+ * Classes to apply to the host element.
45
+ * Allows parent components to pass their styling classes.
46
+ */
47
+ hostClass;
48
+ /**
49
+ * Inline styles to apply to the host element.
50
+ * Allows parent components to pass dynamic styles (e.g., flex properties).
51
+ */
52
+ hostStyle;
53
+ /**
54
+ * Reference to the host element (found automatically from parent)
55
+ */
56
+ hostElement;
57
+ /**
58
+ * Internal state to track admin mode
59
+ */
60
+ adminMode = false;
61
+ /**
62
+ * Component metadata loaded from Custom Elements Manifest
63
+ */
64
+ componentMeta = null;
65
+ /**
66
+ * Current property values of the host component
67
+ */
68
+ propertyValues = {};
69
+ disconnectModeObserver;
70
+ connectedCallback() {
71
+ // Find the host element - le-component is rendered inside the component's shadow DOM,
72
+ // so we need to find the shadow root's host element
73
+ this.findHostElement();
74
+ this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {
75
+ this.adminMode = mode === 'admin';
76
+ // Load metadata and refresh property values only when entering admin mode
77
+ if (this.adminMode) {
78
+ if (!this.componentMeta) {
79
+ this.loadComponentMetadata();
80
+ }
81
+ else {
82
+ this.readPropertyValues();
83
+ }
84
+ }
85
+ });
86
+ }
87
+ /**
88
+ * Find the host element by traversing up through shadow DOM
89
+ */
90
+ findHostElement() {
91
+ // Get the shadow root that contains this le-component
92
+ const rootNode = this.el.getRootNode();
93
+ if (rootNode instanceof ShadowRoot) {
94
+ // The host of this shadow root is our target component (e.g., le-card)
95
+ this.hostElement = rootNode.host;
96
+ }
97
+ }
98
+ componentDidLoad() {
99
+ // Read initial property values from the host element
100
+ this.readPropertyValues();
101
+ }
102
+ disconnectedCallback() {
103
+ this.disconnectModeObserver?.();
104
+ }
105
+ /**
106
+ * Formats a tag name into a display name
107
+ * e.g., 'le-card' -> 'Card'
108
+ */
109
+ formatDisplayName(tagName) {
110
+ return tagName
111
+ .replace(/^le-/, '') // Remove 'le-' prefix
112
+ .split('-')
113
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
114
+ .join(' ');
115
+ }
116
+ /**
117
+ * Load component metadata from the Custom Elements Manifest
118
+ */
119
+ async loadComponentMetadata() {
120
+ try {
121
+ // Fetch the manifest - in production this would be bundled or cached
122
+ const response = await fetch('/custom-elements.json');
123
+ const manifest = await response.json();
124
+ // Find the component definition
125
+ for (const module of manifest.modules) {
126
+ for (const declaration of module.declarations || []) {
127
+ if (declaration.tagName === this.component) {
128
+ const attributes = (declaration.attributes || []).filter((attr) => !this.isInternalAttribute(attr.name));
129
+ this.componentMeta = {
130
+ tagName: declaration.tagName,
131
+ description: declaration.description,
132
+ attributes,
133
+ };
134
+ // console.log(`[le-component] Loaded metadata for ${this.component}:`, this.componentMeta);
135
+ // Read property values after metadata is loaded
136
+ this.readPropertyValues();
137
+ return;
138
+ }
139
+ }
140
+ }
141
+ // console.warn(`[le-component] No metadata found for component: ${this.component}`);
142
+ }
143
+ catch (error) {
144
+ // console.warn(`[le-component] Failed to load metadata for component: ${this.component}`, error);
145
+ }
146
+ }
147
+ /**
148
+ * Check if an attribute is internal (should not be shown in editor)
149
+ */
150
+ isInternalAttribute(name) {
151
+ const internalAttrs = ['mode', 'theme', 'class', 'style', 'id', 'slot'];
152
+ return internalAttrs.includes(name);
153
+ }
154
+ /**
155
+ * Read current property values from the host element
156
+ */
157
+ readPropertyValues() {
158
+ if (!this.hostElement || !this.componentMeta)
159
+ return;
160
+ const values = {};
161
+ for (const attr of this.componentMeta.attributes) {
162
+ const value = this.hostElement.getAttribute(attr.name);
163
+ values[attr.name] = this.parseAttributeValue(value, attr.type?.text);
164
+ }
165
+ this.propertyValues = values;
166
+ }
167
+ /**
168
+ * Parse an attribute value based on its type
169
+ */
170
+ parseAttributeValue(value, type) {
171
+ if (value === null)
172
+ return undefined;
173
+ if (type === 'boolean') {
174
+ return value !== null && value !== 'false';
175
+ }
176
+ if (type === 'number') {
177
+ return parseFloat(value);
178
+ }
179
+ return value;
180
+ }
181
+ /**
182
+ * Handle property value changes from the editor
183
+ */
184
+ handlePropertyChange(attrName, value, type) {
185
+ if (!this.hostElement)
186
+ return;
187
+ // Update the host element's attribute
188
+ if (type === 'boolean') {
189
+ if (value) {
190
+ this.hostElement.setAttribute(attrName, '');
191
+ }
192
+ else {
193
+ this.hostElement.removeAttribute(attrName);
194
+ }
195
+ }
196
+ else if (value === undefined || value === '') {
197
+ this.hostElement.removeAttribute(attrName);
198
+ }
199
+ else {
200
+ this.hostElement.setAttribute(attrName, String(value));
201
+ }
202
+ // Update local state
203
+ this.propertyValues = { ...this.propertyValues, [attrName]: value };
204
+ }
205
+ /**
206
+ * Delete this component from the DOM
207
+ */
208
+ deleteComponent() {
209
+ if (!this.hostElement)
210
+ return;
211
+ // Confirm deletion
212
+ const name = this.displayName || this.formatDisplayName(this.component);
213
+ if (!confirm(`Delete this ${name}?`))
214
+ return;
215
+ // Remove the host element from its parent
216
+ const parent = this.hostElement.parentElement;
217
+ if (parent) {
218
+ this.hostElement.remove();
219
+ }
220
+ }
221
+ /**
222
+ * Render the property editor form
223
+ */
224
+ renderPropertyEditor() {
225
+ const hasProperties = this.componentMeta && this.componentMeta.attributes.length > 0;
226
+ return (h("div", { class: "property-editor-container" }, hasProperties ? (h("form", { class: "property-editor", onSubmit: (e) => e.preventDefault() }, this.componentMeta.attributes.map(attr => this.renderPropertyField(attr)))) : (h("p", { class: "no-properties" }, "No editable properties")), h("div", { class: "property-editor-actions" }, h("le-button", { type: "button", variant: "outlined", color: "danger", "full-width": true, onClick: () => this.deleteComponent() }, h("span", { slot: "icon-start" }, "\uD83D\uDDD1\uFE0F"), h("span", null, "Delete Component")))));
227
+ }
228
+ /**
229
+ * Render a single property field based on its type
230
+ */
231
+ renderPropertyField(attr) {
232
+ const value = this.propertyValues[attr.name];
233
+ const type = attr.type?.text || 'string';
234
+ // Check if type is a union of string literals (e.g., "'default' | 'outlined' | 'elevated'")
235
+ const enumMatch = type.match(/^'[^']+'/);
236
+ if (enumMatch) {
237
+ const options = type.split('|').map(opt => opt.trim().replace(/'/g, ''));
238
+ return (h("div", { class: "property-field" }, h("label", { htmlFor: `prop-${attr.name}` }, attr.name, attr.description && h("span", { class: "property-hint" }, attr.description)), h("select", { id: `prop-${attr.name}`, onChange: (e) => this.handlePropertyChange(attr.name, e.target.value, type) }, options.map(opt => (h("option", { value: opt, selected: value === opt || (!value && attr.default?.replace(/'/g, '') === opt) }, opt))))));
239
+ }
240
+ // Boolean type
241
+ if (type === 'boolean') {
242
+ return (h("div", { class: "property-field property-field--checkbox" }, h("le-checkbox", { name: `prop-${attr.name}`, checked: value === true || value === '', onChange: (e) => this.handlePropertyChange(attr.name, e.target.checked, type) }, attr.name, attr.description && h("div", { slot: "description" }, attr.description))));
243
+ }
244
+ // Number type
245
+ if (type === 'number') {
246
+ return (h("div", { class: "property-field" }, h("label", { htmlFor: `prop-${attr.name}` }, attr.name, attr.description && h("span", { class: "property-hint" }, attr.description)), h("input", { type: "number", id: `prop-${attr.name}`, value: value ?? '', placeholder: attr.default, onChange: (e) => this.handlePropertyChange(attr.name, e.target.value, type) })));
247
+ }
248
+ // Default: string/text input
249
+ return (h("div", { class: "property-field" }, h("le-string-input", { name: `prop-${attr.name}`, label: attr.name, value: value ?? '', placeholder: attr.default?.replace(/'/g, ''), onChange: (e) => this.handlePropertyChange(attr.name, e.detail.value, type) }, h("span", { slot: "description" }, attr.description))));
250
+ }
251
+ render() {
252
+ const name = this.displayName || this.formatDisplayName(this.component);
253
+ // In default mode, just pass through content with host classes
254
+ if (!this.adminMode) {
255
+ return (h(Host, { class: classnames(this.component, this.hostClass), style: this.hostStyle }, h("slot", null)));
256
+ }
257
+ // In admin mode, show wrapper with header and settings
258
+ return (h(Host, { class: classnames(this.component, this.hostClass, 'admin-mode'), style: this.hostStyle }, h("div", { class: "le-component-wrapper" }, h("div", { class: "le-component-header" }, h("span", { class: "le-component-name" }, name), h("le-popover", { popoverTitle: `${name} Settings`, position: "right", align: "start", "min-width": "300px", mode: "default" }, h("le-button", { type: "button", class: "le-component-button", slot: "trigger", variant: "clear", size: "small", "aria-label": "Edit component properties", "icon-only": true }, h("span", { class: "le-component-trigger", slot: "icon-only" }, "\u2699")), this.renderPropertyEditor())), h("div", { class: "le-component-content" }, h("slot", null)))));
259
+ }
260
+ static get is() { return "le-component"; }
261
+ static get encapsulation() { return "shadow"; }
262
+ static get originalStyleUrls() {
263
+ return {
264
+ "$": ["le-component.css"]
265
+ };
266
+ }
267
+ static get styleUrls() {
268
+ return {
269
+ "$": ["le-component.css"]
270
+ };
271
+ }
272
+ static get properties() {
273
+ return {
274
+ "component": {
275
+ "type": "string",
276
+ "mutable": false,
277
+ "complexType": {
278
+ "original": "string",
279
+ "resolved": "string",
280
+ "references": {}
281
+ },
282
+ "required": true,
283
+ "optional": false,
284
+ "docs": {
285
+ "tags": [],
286
+ "text": "The tag name of the component (e.g., 'le-card').\nUsed to look up property metadata and display the component name."
287
+ },
288
+ "getter": false,
289
+ "setter": false,
290
+ "reflect": false,
291
+ "attribute": "component"
292
+ },
293
+ "displayName": {
294
+ "type": "string",
295
+ "mutable": false,
296
+ "complexType": {
297
+ "original": "string",
298
+ "resolved": "string",
299
+ "references": {}
300
+ },
301
+ "required": false,
302
+ "optional": true,
303
+ "docs": {
304
+ "tags": [],
305
+ "text": "Optional display name for the component.\nIf not provided, the tag name will be formatted as the display name."
306
+ },
307
+ "getter": false,
308
+ "setter": false,
309
+ "reflect": false,
310
+ "attribute": "display-name"
311
+ },
312
+ "hostClass": {
313
+ "type": "string",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "string",
317
+ "resolved": "string",
318
+ "references": {}
319
+ },
320
+ "required": false,
321
+ "optional": true,
322
+ "docs": {
323
+ "tags": [],
324
+ "text": "Classes to apply to the host element.\nAllows parent components to pass their styling classes."
325
+ },
326
+ "getter": false,
327
+ "setter": false,
328
+ "reflect": false,
329
+ "attribute": "host-class"
330
+ },
331
+ "hostStyle": {
332
+ "type": "unknown",
333
+ "mutable": false,
334
+ "complexType": {
335
+ "original": "{ [key: string]: string }",
336
+ "resolved": "{ [key: string]: string; }",
337
+ "references": {}
338
+ },
339
+ "required": false,
340
+ "optional": true,
341
+ "docs": {
342
+ "tags": [],
343
+ "text": "Inline styles to apply to the host element.\nAllows parent components to pass dynamic styles (e.g., flex properties)."
344
+ },
345
+ "getter": false,
346
+ "setter": false
347
+ }
348
+ };
349
+ }
350
+ static get states() {
351
+ return {
352
+ "adminMode": {},
353
+ "componentMeta": {},
354
+ "propertyValues": {}
355
+ };
356
+ }
357
+ static get elementRef() { return "el"; }
358
+ }
359
+ //# sourceMappingURL=le-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"le-component.js","sourceRoot":"","sources":["../../../src/components/le-component/le-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,MAAM,OAAO,WAAW;IACX,EAAE,CAAc;IAE3B;;;OAGG;IACK,SAAS,CAAU;IAE3B;;;OAGG;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C5E,eAAa,CACR,CACR,CAAC;QACJ,CAAC;QAED,uDAAuD;QACvD,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS;YAC1F,WAAK,KAAK,EAAC,sBAAsB;gBAC/B,WAAK,KAAK,EAAC,qBAAqB;oBAC9B,YAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAQ;oBAC7C,kBACE,YAAY,EAAE,GAAG,IAAI,WAAW,EAChC,QAAQ,EAAC,OAAO,EAChB,KAAK,EAAC,OAAO,eACH,OAAO,EACjB,IAAI,EAAC,SAAS;wBAEd,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,SAAS,EACd,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,OAAO,gBACD,2BAA2B;4BAGtC,YAAM,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,WAAW,aAAS,CAClD;wBACX,IAAI,CAAC,oBAAoB,EAAE,CACjB,CACT;gBACN,WAAK,KAAK,EAAC,sBAAsB;oBAC/B,eAAa,CACT,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h, Host, Element } from '@stencil/core';\nimport { classnames, observeModeChanges } from '../../utils/utils';\n\n/**\n * Component wrapper for admin mode editing.\n *\n * This component is used internally by other components to provide admin-mode \n * editing capabilities. It wraps the component's rendered output and shows\n * a settings popover for editing properties.\n *\n * In default mode, it acts as a simple passthrough (display: contents).\n * In admin mode, it shows a border, component name header, and settings popover.\n *\n * The host element is found automatically by traversing up through the shadow DOM.\n *\n * Usage inside a component's render method:\n * ```tsx\n * render() {\n * return (\n * <le-component component=\"le-card\">\n * <Host>...</Host>\n * </le-component>\n * );\n * }\n * ```\n *\n * @slot - The component's rendered content\n *\n * @cmsInternal true\n * @cmsCategory System\n */\n@Component({\n tag: 'le-component',\n styleUrl: 'le-component.css',\n shadow: true,\n})\nexport class LeComponent {\n @Element() el: HTMLElement;\n\n /**\n * The tag name of the component (e.g., 'le-card').\n * Used to look up property metadata and display the component name.\n */\n @Prop() component!: string;\n\n /**\n * Optional display name for the component.\n * If not provided, the tag name will be formatted as the display name.\n */\n @Prop() displayName?: string;\n\n /**\n * Classes to apply to the host element.\n * Allows parent components to pass their styling classes.\n */\n @Prop() hostClass?: string;\n\n /**\n * Inline styles to apply to the host element.\n * Allows parent components to pass dynamic styles (e.g., flex properties).\n */\n @Prop() hostStyle?: { [key: string]: string };\n\n /**\n * Reference to the host element (found automatically from parent)\n */\n private hostElement?: HTMLElement;\n\n /**\n * Internal state to track admin mode\n */\n @State() private adminMode: boolean = false;\n\n /**\n * Component metadata loaded from Custom Elements Manifest\n */\n @State() private componentMeta: ComponentMetadata | null = null;\n\n /**\n * Current property values of the host component\n */\n @State() private propertyValues: Record<string, any> = {};\n\n private disconnectModeObserver?: () => void;\n\n connectedCallback() {\n // Find the host element - le-component is rendered inside the component's shadow DOM,\n // so we need to find the shadow root's host element\n this.findHostElement();\n\n this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n this.adminMode = mode === 'admin';\n // Load metadata and refresh property values only when entering admin mode\n if (this.adminMode) {\n if (!this.componentMeta) {\n this.loadComponentMetadata();\n } else {\n this.readPropertyValues();\n }\n }\n });\n }\n\n /**\n * Find the host element by traversing up through shadow DOM\n */\n private findHostElement() {\n // Get the shadow root that contains this le-component\n const rootNode = this.el.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n // The host of this shadow root is our target component (e.g., le-card)\n this.hostElement = rootNode.host as HTMLElement;\n }\n }\n\n componentDidLoad() {\n // Read initial property values from the host element\n this.readPropertyValues();\n }\n\n disconnectedCallback() {\n this.disconnectModeObserver?.();\n }\n\n /**\n * Formats a tag name into a display name\n * e.g., 'le-card' -> 'Card'\n */\n private formatDisplayName(tagName: string): string {\n return tagName\n .replace(/^le-/, '') // Remove 'le-' prefix\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Load component metadata from the Custom Elements Manifest\n */\n private async loadComponentMetadata() {\n try {\n // Fetch the manifest - in production this would be bundled or cached\n const response = await fetch('/custom-elements.json');\n const manifest = await response.json();\n\n // Find the component definition\n for (const module of manifest.modules) {\n for (const declaration of module.declarations || []) {\n if (declaration.tagName === this.component) {\n const attributes = (declaration.attributes || []).filter(\n (attr: AttributeMetadata) => !this.isInternalAttribute(attr.name)\n );\n this.componentMeta = {\n tagName: declaration.tagName,\n description: declaration.description,\n attributes,\n };\n // console.log(`[le-component] Loaded metadata for ${this.component}:`, this.componentMeta);\n // Read property values after metadata is loaded\n this.readPropertyValues();\n return;\n }\n }\n }\n // console.warn(`[le-component] No metadata found for component: ${this.component}`);\n } catch (error) {\n // console.warn(`[le-component] Failed to load metadata for component: ${this.component}`, error);\n }\n }\n\n /**\n * Check if an attribute is internal (should not be shown in editor)\n */\n private isInternalAttribute(name: string): boolean {\n const internalAttrs = ['mode', 'theme', 'class', 'style', 'id', 'slot'];\n return internalAttrs.includes(name);\n }\n\n /**\n * Read current property values from the host element\n */\n private readPropertyValues() {\n if (!this.hostElement || !this.componentMeta) return;\n\n const values: Record<string, any> = {};\n for (const attr of this.componentMeta.attributes) {\n const value = this.hostElement.getAttribute(attr.name);\n values[attr.name] = this.parseAttributeValue(value, attr.type?.text);\n }\n this.propertyValues = values;\n }\n\n /**\n * Parse an attribute value based on its type\n */\n private parseAttributeValue(value: string | null, type?: string): any {\n if (value === null) return undefined;\n \n if (type === 'boolean') {\n return value !== null && value !== 'false';\n }\n if (type === 'number') {\n return parseFloat(value);\n }\n return value;\n }\n\n /**\n * Handle property value changes from the editor\n */\n private handlePropertyChange(attrName: string, value: any, type?: string) {\n if (!this.hostElement) return;\n\n // Update the host element's attribute\n if (type === 'boolean') {\n if (value) {\n this.hostElement.setAttribute(attrName, '');\n } else {\n this.hostElement.removeAttribute(attrName);\n }\n } else if (value === undefined || value === '') {\n this.hostElement.removeAttribute(attrName);\n } else {\n this.hostElement.setAttribute(attrName, String(value));\n }\n\n // Update local state\n this.propertyValues = { ...this.propertyValues, [attrName]: value };\n }\n\n /**\n * Delete this component from the DOM\n */\n private deleteComponent() {\n if (!this.hostElement) return;\n\n // Confirm deletion\n const name = this.displayName || this.formatDisplayName(this.component);\n if (!confirm(`Delete this ${name}?`)) return;\n\n // Remove the host element from its parent\n const parent = this.hostElement.parentElement;\n if (parent) {\n this.hostElement.remove();\n }\n }\n\n /**\n * Render the property editor form\n */\n private renderPropertyEditor() {\n const hasProperties = this.componentMeta && this.componentMeta.attributes.length > 0;\n\n return (\n <div class=\"property-editor-container\">\n {hasProperties ? (\n <form class=\"property-editor\" onSubmit={(e) => e.preventDefault()}>\n {this.componentMeta!.attributes.map(attr => this.renderPropertyField(attr))}\n </form>\n ) : (\n <p class=\"no-properties\">No editable properties</p>\n )}\n <div class=\"property-editor-actions\">\n <le-button\n type=\"button\"\n variant=\"outlined\"\n color=\"danger\"\n full-width\n onClick={() => this.deleteComponent()}\n >\n <span slot=\"icon-start\">🗑️</span>\n <span>Delete Component</span>\n </le-button>\n </div>\n </div>\n );\n }\n\n /**\n * Render a single property field based on its type\n */\n private renderPropertyField(attr: AttributeMetadata) {\n const value = this.propertyValues[attr.name];\n const type = attr.type?.text || 'string';\n\n // Check if type is a union of string literals (e.g., \"'default' | 'outlined' | 'elevated'\")\n const enumMatch = type.match(/^'[^']+'/);\n if (enumMatch) {\n const options = type.split('|').map(opt => opt.trim().replace(/'/g, ''));\n return (\n <div class=\"property-field\">\n <label htmlFor={`prop-${attr.name}`}>\n {attr.name}\n {attr.description && <span class=\"property-hint\">{attr.description}</span>}\n </label>\n <select\n id={`prop-${attr.name}`}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLSelectElement).value, type)}\n >\n {options.map(opt => (\n <option value={opt} selected={value === opt || (!value && attr.default?.replace(/'/g, '') === opt)}>{opt}</option>\n ))}\n </select>\n </div>\n );\n }\n\n // Boolean type\n if (type === 'boolean') {\n return (\n <div class=\"property-field property-field--checkbox\">\n <le-checkbox\n name={`prop-${attr.name}`}\n checked={value === true || value === ''}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLInputElement).checked, type)}\n >\n {attr.name}\n {attr.description && <div slot=\"description\">{attr.description}</div>}\n </le-checkbox>\n </div>\n );\n }\n\n // Number type\n if (type === 'number') {\n return (\n <div class=\"property-field\">\n <label htmlFor={`prop-${attr.name}`}>\n {attr.name}\n {attr.description && <span class=\"property-hint\">{attr.description}</span>}\n </label>\n <input\n type=\"number\"\n id={`prop-${attr.name}`}\n value={value ?? ''}\n placeholder={attr.default}\n onChange={(e) => this.handlePropertyChange(attr.name, (e.target as HTMLInputElement).value, type)}\n />\n </div>\n );\n }\n\n // Default: string/text input\n return (\n <div class=\"property-field\">\n <le-string-input\n name={`prop-${attr.name}`}\n label={attr.name}\n value={value ?? ''}\n placeholder={attr.default?.replace(/'/g, '')}\n onChange={(e: any) => this.handlePropertyChange(attr.name, e.detail.value, type)}\n >\n <span slot=\"description\">{attr.description}</span>\n </le-string-input>\n </div>\n );\n }\n\n render() {\n const name = this.displayName || this.formatDisplayName(this.component);\n\n // In default mode, just pass through content with host classes\n if (!this.adminMode) {\n return (\n <Host class={classnames(this.component, this.hostClass)} style={this.hostStyle}>\n <slot></slot>\n </Host>\n );\n }\n\n // In admin mode, show wrapper with header and settings\n return (\n <Host class={classnames(this.component, this.hostClass, 'admin-mode')} style={this.hostStyle}>\n <div class=\"le-component-wrapper\">\n <div class=\"le-component-header\">\n <span class=\"le-component-name\">{name}</span>\n <le-popover \n popoverTitle={`${name} Settings`}\n position=\"right\"\n align=\"start\"\n min-width=\"300px\"\n mode=\"default\"\n >\n <le-button\n type=\"button\"\n class=\"le-component-button\"\n slot=\"trigger\"\n variant=\"clear\"\n size=\"small\"\n aria-label=\"Edit component properties\"\n icon-only\n >\n <span class=\"le-component-trigger\" slot=\"icon-only\">⚙</span>\n </le-button>\n {this.renderPropertyEditor()}\n </le-popover>\n </div>\n <div class=\"le-component-content\">\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n\n/**\n * Type definitions for component metadata\n */\ninterface ComponentMetadata {\n tagName: string;\n description?: string;\n attributes: AttributeMetadata[];\n}\n\ninterface AttributeMetadata {\n name: string;\n fieldName?: string;\n description?: string;\n default?: string;\n type?: {\n text: string;\n };\n}\n"]}
@@ -0,0 +1,135 @@
1
+ :host {
2
+ display: block;
3
+ --le-input-bg: var(--le-color-surface, #ffffff);
4
+ --le-input-color: var(--le-color-text-primary, #333333);
5
+ --le-input-border: var(--le-border-width, 2px) solid var(--le-color-border-input, #007bff);
6
+ --le-input-radius: var(--le-radius-sm, 4px);
7
+ --le-input-padding: 2px 6px;
8
+ --le-input-height: 1.5rem;
9
+ --le-input-label-color: var(--le-color-text-primary, #333333);
10
+ --le-input-desc-color: var(--le-color-text-secondary, #666666);
11
+ --le-input-placeholder-color: #999999;
12
+ --le-input-border-error: 2px solid var(--le-color-danger, #dc3545);
13
+ --le-input-error-color: var(--le-color-danger, #dc3545);
14
+ }
15
+
16
+ .le-input-wrapper {
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 2px;
20
+ }
21
+
22
+ .le-input-label {
23
+ display: block;
24
+ font-size: 0.9em;
25
+ font-weight: 500;
26
+ color: var(--le-input-label-color);
27
+ margin-bottom: 2px;
28
+ }
29
+
30
+ .le-input-container {
31
+ position: relative;
32
+ display: flex;
33
+ align-items: center;
34
+ background: var(--le-input-bg);
35
+ border: var(--le-input-border);
36
+ border-radius: var(--le-input-radius);
37
+ transition: border-color 0.2s;
38
+ }
39
+
40
+ .le-input-container:focus-within {
41
+ outline: 2px solid var(--le-color-focus);
42
+ outline-offset: 2px;
43
+ }
44
+
45
+ .le-input-container.has-error {
46
+ border: var(--le-input-border-error);
47
+ }
48
+
49
+ :host([disabled]) .le-input-container {
50
+ opacity: 0.6;
51
+ background-color: rgba(0,0,0,0.05);
52
+ cursor: not-allowed;
53
+ }
54
+
55
+ input {
56
+ flex: 1;
57
+ width: 100%;
58
+ height: calc(var(--le-input-height) - 2px);
59
+ padding: var(--le-input-padding);
60
+ border: none;
61
+ background: transparent;
62
+ color: var(--le-input-color);
63
+ font-family: inherit;
64
+ font-size: inherit;
65
+ outline: none;
66
+ text-align: right; /* Aligned to end */
67
+ -moz-appearance: textfield; /* Remove default spinners in Firefox */
68
+ }
69
+
70
+ /* Remove default spinners in Chrome/Safari/Edge */
71
+ input::-webkit-outer-spin-button,
72
+ input::-webkit-inner-spin-button {
73
+ -webkit-appearance: none;
74
+ margin: 0;
75
+ }
76
+
77
+ input::placeholder {
78
+ color: var(--le-input-placeholder-color);
79
+ }
80
+
81
+ .icon-start, .icon-end {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ padding: 0 8px;
86
+ color: var(--le-input-desc-color);
87
+ }
88
+
89
+ .le-input-controls {
90
+ display: flex;
91
+ flex-direction: column;
92
+ border-left: 1px solid var(--le-color-border, #cccccc);
93
+ height: 100%;
94
+ }
95
+
96
+ .le-input-control-btn {
97
+ --le-button-border-radius: 0;
98
+ --le-button-padding-x: 0;
99
+ --le-button-padding-y: 0;
100
+ --le-button-small-font-size: 9.5px;
101
+ --le-button-small-padding: 0 0.2rem;
102
+ --le-button-icon-aspect-ratio: 2;
103
+
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ height: 50%;
108
+ cursor: pointer;
109
+ background: none;
110
+ border: none;
111
+ color: var(--le-input-desc-color);
112
+ font-size: 10px;
113
+ line-height: 1;
114
+ }
115
+
116
+ .le-input-control-btn:hover {
117
+ background-color: rgba(0,0,0,0.05);
118
+ color: var(--le-color-primary, #007bff);
119
+ }
120
+
121
+ .le-input-control-btn:active {
122
+ background-color: rgba(0,0,0,0.1);
123
+ }
124
+
125
+ .le-input-description {
126
+ font-size: 0.85em;
127
+ color: var(--le-input-desc-color);
128
+ margin-top: 2px;
129
+ }
130
+
131
+ .le-input-error {
132
+ font-size: 0.85em;
133
+ color: var(--le-input-error-color);
134
+ margin-top: 2px;
135
+ }