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
package/readme.md CHANGED
@@ -1,76 +1,210 @@
1
- ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)
1
+ # Le-Kit
2
2
 
3
- # Le Kit
4
- ## Unusual Web Components
3
+ [![npm version](https://img.shields.io/npm/v/le-kit.svg)](https://www.npmjs.com/package/le-kit)
4
+ [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
5
5
 
6
- I'm creating a kit of web components built using [Stencil.js](https://stenciljs.com/).
6
+ A themeable web component library built with Stencil, featuring a dual-mode system for production and CMS editing.
7
7
 
8
- The idea is not to have another set of inputs, checkboxes, buttons, tabs and unique grid, but some rarely met components like the first two initial ones:
8
+ ## Features
9
9
 
10
- ## Le Round Progress
10
+ - 🎨 **Themeable** — CSS custom properties for complete styling control
11
+ - 🔧 **Dual Mode** — Production (`default`) and CMS editing (`admin`) modes
12
+ - 📦 **Multiple Builds** — Lazy-loaded, standalone, or admin-enabled bundles
13
+ - 🌐 **Framework Agnostic** — Works with any framework or vanilla JS
14
+ - 🪶 **Lightweight** — Tree-shakeable with minimal runtime overhead
11
15
 
12
- The round progress component is used more and more often after Apple announced the [Activity rings](https://www.apple.com/watch/close-your-rings/) for the Watch.
16
+ ## Installation
13
17
 
14
- With this component you can create almost the same look and feel as Apples rings and even more:
18
+ ```bash
19
+ npm install le-kit
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ### Option 1: Lazy Loading (Recommended)
25
+
26
+ The easiest way to use Le-Kit. Components are automatically loaded on-demand.
27
+
28
+ ```html
29
+ <!-- In your HTML -->
30
+ <script type="module">
31
+ import 'le-kit';
32
+ </script>
33
+
34
+ <!-- Include a theme -->
35
+ <link rel="stylesheet" href="node_modules/le-kit/dist/themes/default.css" />
36
+
37
+ <!-- Use components -->
38
+ <le-card>
39
+ <span slot="header">Welcome</span>
40
+ <p>Your content here</p>
41
+ <le-button slot="footer">Get Started</le-button>
42
+ </le-card>
43
+ ```
44
+
45
+ ### Option 2: Standalone Components (Tree-shakeable)
46
+
47
+ Import only the components you need for smaller bundle sizes.
48
+
49
+ ```tsx
50
+ // Import specific components
51
+ import { defineCustomElement as defineCard } from 'le-kit/components/le-card';
52
+ import { defineCustomElement as defineButton } from 'le-kit/components/le-button';
53
+
54
+ // Register them
55
+ defineCard();
56
+ defineButton();
57
+ ```
58
+
59
+ ### Option 3: Core Build (No Admin Code)
60
+
61
+ The core build has all CMS editing functionality stripped out at build time for the smallest possible bundle.
62
+
63
+ ```tsx
64
+ import { defineCustomElements } from 'le-kit/core';
65
+ defineCustomElements();
66
+ ```
67
+
68
+ > **Note for Stencil apps**: If you're using le-kit in another Stencil project, use the lazy-loading import (`import 'le-kit'`) instead to avoid runtime conflicts.
69
+
70
+ ### Option 4: Admin Build (CMS Editing)
71
+
72
+ Includes full CMS editing capabilities with inline editing and property panels.
73
+
74
+ ```tsx
75
+ import 'le-kit/admin';
76
+ ```
15
77
 
16
- **Circle Size** — the cirle size is taken from the elements width — you have to put the element inside a container with a fixed width to get the results
78
+ ```html
79
+ <!-- Enable admin mode -->
80
+ <html mode="admin">
81
+ <!-- Components now show editing UI -->
82
+ </html>
83
+ ```
84
+
85
+ ## Theming
86
+
87
+ Le-Kit ships with several built-in themes. Import the base styles plus your preferred theme:
88
+
89
+ ```html
90
+ <!-- Base tokens (required) -->
91
+ <link rel="stylesheet" href="le-kit/dist/themes/base.css" />
92
+
93
+ <!-- Choose a theme -->
94
+ <link rel="stylesheet" href="le-kit/dist/themes/default.css" />
95
+ <!-- or -->
96
+ <link rel="stylesheet" href="le-kit/dist/themes/dark.css" />
97
+ <link rel="stylesheet" href="le-kit/dist/themes/minimal.css" />
98
+ <link rel="stylesheet" href="le-kit/dist/themes/warm.css" />
99
+ <link rel="stylesheet" href="le-kit/dist/themes/gradient.css" />
100
+ ```
101
+
102
+ Or import in JavaScript:
103
+
104
+ ```tsx
105
+ import 'le-kit/themes/base';
106
+ import 'le-kit/themes/default';
107
+ ```
108
+
109
+ ### Custom Theming
110
+
111
+ Override CSS custom properties to match your brand:
17
112
 
18
- **Value** — the only attribute you can set is `value` it takes a value in percentage (0—100) and fills the progress accordingly.
113
+ ```css
114
+ :root {
115
+ --le-color-primary: #6366f1;
116
+ --le-color-secondary: #8b5cf6;
117
+ --le-radius-md: 12px;
118
+ --le-space-md: 1rem;
119
+ }
120
+ ```
121
+
122
+ ## Components
123
+
124
+ ### Layout
19
125
 
20
- ```<le-round-progress value="66"></le-round-progress>```
126
+ - **`<le-stack>`** — Flexbox layout with gap, alignment, and direction control
127
+ - **`<le-box>`** — Flexible container with padding and background options
128
+ - **`<le-card>`** — Card container with header, content, and footer slots
21
129
 
22
- **Content** — everything you put inside the component will be shown over the round progress, so be carefull.
130
+ ### Actions
23
131
 
24
- **Colors and bar width** — you should color the progress using css variables:
132
+ - **`<le-button>`** Button with variants (solid, outlined, clear) and colors
25
133
 
26
- * `--progress-width` (default: `4px`) — width of the progress bar;
27
- * `--progress-color` (default: `#999`) — color of the progress bar (no gradients yet, sorry);
28
- * `--progress-linecap` (default: `round`): `butt | round | square` — shape of the progress bar's end (see [stroke-linecap](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap));
29
- * `--progress-shadow`: `x y spread color` — shadow of the progress bar.
134
+ ### Content
30
135
 
31
- **Additional paths** you can set two more paths for the progress bar — a backgrounds, visible even when the progress is 0. It can help to build the bar you want to build:
136
+ - **`<le-text>`**Typography component with semantic variants
32
137
 
33
- * `--progress-path-color` — color of the path, required to make the path visible;
34
- * `--progress-path-width` (default: `--progress-width`) — width of the path (can be wider than the progress bar);
35
- * `--progress-path-dasharray`: `dash length, space between` — settings if you want to have dotted of dashed stoke;
36
- * `--progress-path-linecap` (default: `round`) — if it's dashed stroke, which end to use for dashes.
138
+ ### Feedback
37
139
 
38
- * `--progress-path2-color` same as the above;
39
- * `--progress-path2-width`;
40
- * `--progress-path2-dasharray`;
41
- * `--progress-path2-linecap`.
140
+ - **`<le-popup>`**Toast notifications and alerts
42
141
 
142
+ ## Usage Examples
43
143
 
144
+ ### Card with Actions
44
145
 
45
- ## Le Turntable
146
+ ```html
147
+ <le-card variant="elevated">
148
+ <h3 slot="header">Product Name</h3>
149
+ <p>Product description goes here with all the details.</p>
150
+ <le-stack slot="footer" justify="end" gap="8px">
151
+ <le-button variant="outlined">Cancel</le-button>
152
+ <le-button color="primary">Buy Now</le-button>
153
+ </le-stack>
154
+ </le-card>
155
+ ```
46
156
 
47
- Turntable component let's you turn the element initially, set the center point for the rotation and, most importantly, let's you... turn the element using mouse or fingers (on touch devices). And returns the new angle value.
157
+ ### Responsive Stack Layout
48
158
 
49
- Usage:
159
+ ```html
160
+ <le-stack direction="horizontal" wrap gap="16px" align="stretch">
161
+ <le-box>Item 1</le-box>
162
+ <le-box>Item 2</le-box>
163
+ <le-box>Item 3</le-box>
164
+ </le-stack>
50
165
  ```
51
- <le-turntable value="90" center="0 50%">
52
- Contents...
53
- </le-turntable>
166
+
167
+ ### Button Variants
168
+
169
+ ```html
170
+ <le-button variant="solid" color="primary">Primary</le-button>
171
+ <le-button variant="outlined" color="secondary">Secondary</le-button>
172
+ <le-button variant="clear" color="danger">Delete</le-button>
54
173
  ```
55
174
 
56
- **Value** `value`: `number` (0–360) initial degree to turn the component.
175
+ ## Admin Mode
176
+
177
+ Le-Kit includes a CMS editing mode that enables inline content editing and component configuration. This is useful for building visual editors and CMS interfaces.
178
+
179
+ ```html
180
+ <!-- Enable on the entire page -->
181
+ <html mode="admin">
182
+ <!-- Or on specific sections -->
183
+ <le-card mode="admin">
184
+ <!-- This card is now editable -->
185
+ </le-card>
186
+ </html>
187
+ ```
188
+
189
+ In admin mode, components display:
190
+
191
+ - Inline text editing for content slots
192
+ - Settings popovers for component properties
193
+ - Drop zones for adding new components
57
194
 
58
- **Center point for rotation** — `center`: `horizontalValue verticalValue` same values as for the css-property `transformOrigin`.
195
+ ## Browser Support
59
196
 
60
- The component is a Work In Progress yet.
197
+ Le-Kit supports all modern browsers:
61
198
 
199
+ - Chrome 79+
200
+ - Firefox 70+
201
+ - Safari 14+
202
+ - Edge 79+
62
203
 
63
- # Usage
204
+ ## License
64
205
 
65
- - Put a script tag similar to this `<script src='https://unpkg.com/le-kit@0.0.1/dist/le-kit.js'></script>` in the head of your index.html
66
- - Then you can use the element anywhere in your template, JSX, html etc
206
+ MIT License see [LICENSE](./LICENSE) for details.
67
207
 
68
- ### Node Modules
69
- - Run `npm install le-kit --save`
70
- - Put a script tag similar to this `<script src='node_modules/le-kit/dist/le-kit.js'></script>` in the head of your index.html
71
- - Then you can use the element anywhere in your template, JSX, html etc
208
+ ## Contributing
72
209
 
73
- ### In a stencil-starter app
74
- - Run `npm install le-kit --save`
75
- - Add an import to the npm packages `import le-kit;`
76
- - Then you can use the element anywhere in your template, JSX, html etc
210
+ Contributions welcome! Please read our contributing guidelines before submitting a PR.
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var le_kit_core_js_1 = require("../le-kit.core.js");
4
- var LeRoundProgress = function () { function t() { this.value = 0, this.padding = 0; } return t.prototype.updateValue = function (t) { this.value = parseFloat(t); }, t.prototype.updatePadding = function (t) { this.padding = parseFloat(t), this.calcParams(); }, t.prototype.updateProgressBackgrounds = function (t) { this.progressPaths = JSON.parse(t); }, t.prototype.componentWillLoad = function () { "string" == typeof this.paths && this.updateProgressBackgrounds(this.paths), this.calcParams(); }, t.prototype.calcParams = function () { var t = this.el.getBoundingClientRect().width, e = t - this.padding, r = Math.PI * e; this.params = { width: t, diameter: e, circumference: r }; }, t.prototype.getViewBox = function () { return "0 0 " + this.params.width + " " + this.params.width; }, t.prototype.getPath = function () { return "M" + this.params.width / 2 + " " + (this.params.width - this.params.diameter) / 2 + " a " + this.params.diameter / 2 + " " + this.params.diameter / 2 + " 0 0 1 0 " + this.params.diameter + " a " + this.params.diameter / 2 + " " + this.params.diameter / 2 + " 0 0 1 0 -" + this.params.diameter; }, t.prototype.getStrokeDashArray = function () { return this.value / 100 * this.params.circumference + ", " + this.params.circumference; }, t.prototype.getPaths = function () { var t = this; if (!this.progressPaths || !this.progressPaths.length)
5
- return null; var e = []; return this.progressPaths.forEach(function (r) { e.push(le_kit_core_js_1.h("path", { class: "round-progress--path", d: t.getPath(), stroke: r.color, "stroke-width": r.width, "stroke-dasharray": r.dasharray, "stroke-linecap": r.linecap })); }), le_kit_core_js_1.h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, e); }, t.prototype.render = function () { return le_kit_core_js_1.h("div", { class: "round-progress--container" }, this.getPaths(), le_kit_core_js_1.h("svg", { viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, le_kit_core_js_1.h("path", { class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), le_kit_core_js_1.h("slot", null)); }, Object.defineProperty(t, "is", { get: function () { return "le-round-progress"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "properties", { get: function () { return { el: { elementRef: !0 }, padding: { type: Number, attr: "padding", watchCallbacks: ["updatePadding"] }, params: { state: !0 }, paths: { type: String, attr: "paths", watchCallbacks: ["updateProgressBackgrounds"] }, value: { type: Number, attr: "value", watchCallbacks: ["updateValue"] } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "style", { get: function () { return ".round-progress--container{position:relative}.round-progress{position:absolute;top:0;left:0;right:0;bottom:0;display:block}.round-progress--progress{-webkit-filter:drop-shadow(var(--progress-shadow));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);-webkit-animation:progress--circle .5s ease-out forwards;animation:progress--circle .5s ease-out forwards;-webkit-transition:stroke-dasharray .5s ease-out;transition:stroke-dasharray .5s ease-out}\@-webkit-keyframes progress--circle{0%{stroke-dasharray:0 1000}}\@keyframes progress--circle{0%{stroke-dasharray:0 1000}}.round-progress--path{fill:none;stroke-linecap:round}"; }, enumerable: !0, configurable: !0 }), t; }();
6
- exports.LeRoundProgress = LeRoundProgress;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var le_kit_core_js_1 = require("../le-kit.core.js");
4
- var LeRoundProgress = function () { function t() { this.value = 0, this.padding = 0; } return t.prototype.updateValue = function (t) { this.value = parseFloat(t); }, t.prototype.updatePadding = function (t) { this.padding = parseFloat(t), this.calcParams(); }, t.prototype.updateProgressBackgrounds = function (t) { this.progressPaths = JSON.parse(t); }, t.prototype.componentWillLoad = function () { "string" == typeof this.paths && this.updateProgressBackgrounds(this.paths), this.calcParams(); }, t.prototype.calcParams = function () { var t = this.el.getBoundingClientRect().width, e = t - this.padding, r = Math.PI * e; this.params = { width: t, diameter: e, circumference: r }; }, t.prototype.getViewBox = function () { return "0 0 " + this.params.width + " " + this.params.width; }, t.prototype.getPath = function () { return "M" + this.params.width / 2 + " " + (this.params.width - this.params.diameter) / 2 + " a " + this.params.diameter / 2 + " " + this.params.diameter / 2 + " 0 0 1 0 " + this.params.diameter + " a " + this.params.diameter / 2 + " " + this.params.diameter / 2 + " 0 0 1 0 -" + this.params.diameter; }, t.prototype.getStrokeDashArray = function () { return this.value / 100 * this.params.circumference + ", " + this.params.circumference; }, t.prototype.getPaths = function () { var t = this; if (!this.progressPaths || !this.progressPaths.length)
5
- return null; var e = []; return this.progressPaths.forEach(function (r) { e.push(le_kit_core_js_1.h("path", { class: "round-progress--path", d: t.getPath(), stroke: r.color, "stroke-width": r.width, "stroke-dasharray": r.dasharray, "stroke-linecap": r.linecap })); }), le_kit_core_js_1.h("svg", { viewBox: this.getViewBox(), class: "round-progress" }, e); }, t.prototype.render = function () { return le_kit_core_js_1.h("div", { class: "round-progress--container" }, this.getPaths(), le_kit_core_js_1.h("svg", { viewBox: this.getViewBox(), class: "round-progress round-progress--progress" }, le_kit_core_js_1.h("path", { class: "round-progress--circle", "stroke-dasharray": this.getStrokeDashArray(), d: this.getPath() })), le_kit_core_js_1.h("slot", null)); }, Object.defineProperty(t, "is", { get: function () { return "le-round-progress"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "properties", { get: function () { return { el: { elementRef: !0 }, padding: { type: Number, attr: "padding", watchCallbacks: ["updatePadding"] }, params: { state: !0 }, paths: { type: String, attr: "paths", watchCallbacks: ["updateProgressBackgrounds"] }, value: { type: Number, attr: "value", watchCallbacks: ["updateValue"] } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "style", { get: function () { return ".round-progress--container.sc-le-round-progress{position:relative}.round-progress.sc-le-round-progress{position:absolute;top:0;left:0;right:0;bottom:0;display:block}.round-progress--progress.sc-le-round-progress{-webkit-filter:drop-shadow(var(--progress-shadow));filter:drop-shadow(var(--progress-shadow))}.round-progress--circle.sc-le-round-progress{fill:none;stroke:var(--progress-color,#999);stroke-width:var(--progress-width,4);stroke-linecap:var(--progress-linecap,round);-webkit-animation:progress--circle .5s ease-out forwards;animation:progress--circle .5s ease-out forwards;-webkit-transition:stroke-dasharray .5s ease-out;transition:stroke-dasharray .5s ease-out}\@-webkit-keyframes progress--circle{0%{stroke-dasharray:0 1000}}\@keyframes progress--circle{0%{stroke-dasharray:0 1000}}.round-progress--path.sc-le-round-progress{fill:none;stroke-linecap:round}"; }, enumerable: !0, configurable: !0 }), t; }();
6
- exports.LeRoundProgress = LeRoundProgress;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var le_kit_core_js_1 = require("../le-kit.core.js");
4
- var LeTurntable = function () { function e() { this.center = "center", this.value = 0, this.rotating = !1, this.currentAngle = 0; } return e.prototype.updateValue = function (e) { this.rotating || (this.currentAngle = parseFloat(e), this.setAngle(this.currentAngle)); }, e.prototype.handleMouseDown = function (e) { return this.rotating = !0, this.startAngle = this.getAngle(e.pageX, e.pageY), e.preventDefault(), e.cancelBubble = !0, !1; }, e.prototype.handleMouseMove = function (e) { if (this.rotating)
5
- return this.setAngle(this.currentAngle + (this.getAngle(e.pageX, e.pageY) - this.startAngle)), !1; }, e.prototype.handleMouseUp = function (e) { if (this.rotating) {
6
- var t = this.currentAngle + (this.getAngle(e.pageX, e.pageY) - this.startAngle);
7
- return this.setAngle(t), this.currentAngle = t, this.rotating = !1, !1;
8
- } }, e.prototype.handleWindowResize = function () { this.getTransformOrigin(); }, e.prototype.componentDidLoad = function () { this.el.style.transformOrigin = this.center, this.currentAngle = this.value, this.getTransformOrigin(), this.setAngle(this.currentAngle); }, e.prototype.componentDidUpdate = function () { this.getTransformOrigin(); }, e.prototype.getTransformOrigin = function () { var e; e = window.getComputedStyle(this.el, null).transformOrigin.split(" ").map(function (e) { return Math.round(parseFloat(e)); }), this.centerX = e[0], this.centerY = e[1]; var t = null, n = ((t = document.documentElement) || (t = document.body.parentNode)) && "number" == typeof t.scrollLeft ? t : document.body, r = this.el.getBoundingClientRect(); this.pageX = Math.round(r.left + n.scrollLeft), this.pageY = Math.round(r.top + n.scrollTop); }, e.prototype.getAngle = function (e, t) { return Math.round(180 * Math.atan2(t - this.pageY - this.centerY, e - this.pageX - this.centerX) / Math.PI * 100) / 100; }, e.prototype.setAngle = function (e) { this.el.style.transform = "rotate(" + e + "deg)"; }, e.prototype.render = function () { return le_kit_core_js_1.h("div", { class: "turntable", onMouseDown: this.handleMouseDown.bind(this) }, le_kit_core_js_1.h("slot", null)); }, Object.defineProperty(e, "is", { get: function () { return "le-turntable"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "properties", { get: function () { return { center: { type: String, attr: "center" }, el: { elementRef: !0 }, value: { type: Number, attr: "value", watchCallbacks: ["updateValue"] } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "listeners", { get: function () { return [{ name: "window:mousemove", method: "handleMouseMove", passive: !0 }, { name: "window:mouseup", method: "handleMouseUp", passive: !0 }, { name: "window:resize", method: "handleWindowResize", passive: !0 }]; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "style", { get: function () { return ":host{display:block;cursor:-webkit-grab;cursor:grab}div.turntable{width:100%;height:100%;padding:1px}"; }, enumerable: !0, configurable: !0 }), e; }();
9
- exports.LeTurntable = LeTurntable;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var le_kit_core_js_1 = require("../le-kit.core.js");
4
- var LeTurntable = function () { function e() { this.center = "center", this.value = 0, this.rotating = !1, this.currentAngle = 0; } return e.prototype.updateValue = function (e) { this.rotating || (this.currentAngle = parseFloat(e), this.setAngle(this.currentAngle)); }, e.prototype.handleMouseDown = function (e) { return this.rotating = !0, this.startAngle = this.getAngle(e.pageX, e.pageY), e.preventDefault(), e.cancelBubble = !0, !1; }, e.prototype.handleMouseMove = function (e) { if (this.rotating)
5
- return this.setAngle(this.currentAngle + (this.getAngle(e.pageX, e.pageY) - this.startAngle)), !1; }, e.prototype.handleMouseUp = function (e) { if (this.rotating) {
6
- var t = this.currentAngle + (this.getAngle(e.pageX, e.pageY) - this.startAngle);
7
- return this.setAngle(t), this.currentAngle = t, this.rotating = !1, !1;
8
- } }, e.prototype.handleWindowResize = function () { this.getTransformOrigin(); }, e.prototype.componentDidLoad = function () { this.el.style.transformOrigin = this.center, this.currentAngle = this.value, this.getTransformOrigin(), this.setAngle(this.currentAngle); }, e.prototype.componentDidUpdate = function () { this.getTransformOrigin(); }, e.prototype.getTransformOrigin = function () { var e; e = window.getComputedStyle(this.el, null).transformOrigin.split(" ").map(function (e) { return Math.round(parseFloat(e)); }), this.centerX = e[0], this.centerY = e[1]; var t = null, n = ((t = document.documentElement) || (t = document.body.parentNode)) && "number" == typeof t.scrollLeft ? t : document.body, r = this.el.getBoundingClientRect(); this.pageX = Math.round(r.left + n.scrollLeft), this.pageY = Math.round(r.top + n.scrollTop); }, e.prototype.getAngle = function (e, t) { return Math.round(180 * Math.atan2(t - this.pageY - this.centerY, e - this.pageX - this.centerX) / Math.PI * 100) / 100; }, e.prototype.setAngle = function (e) { this.el.style.transform = "rotate(" + e + "deg)"; }, e.prototype.render = function () { return le_kit_core_js_1.h("div", { class: "turntable", onMouseDown: this.handleMouseDown.bind(this) }, le_kit_core_js_1.h("slot", null)); }, Object.defineProperty(e, "is", { get: function () { return "le-turntable"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "properties", { get: function () { return { center: { type: String, attr: "center" }, el: { elementRef: !0 }, value: { type: Number, attr: "value", watchCallbacks: ["updateValue"] } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "listeners", { get: function () { return [{ name: "window:mousemove", method: "handleMouseMove", passive: !0 }, { name: "window:mouseup", method: "handleMouseUp", passive: !0 }, { name: "window:resize", method: "handleWindowResize", passive: !0 }]; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "style", { get: function () { return ".sc-le-turntable-h{display:block;cursor:-webkit-grab;cursor:grab}div.turntable.sc-le-turntable{width:100%;height:100%;padding:1px}"; }, enumerable: !0, configurable: !0 }), e; }();
9
- exports.LeTurntable = LeTurntable;
@@ -1 +0,0 @@
1
- // LeKit: ES Module
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // LeKit: Host Data, ES Module/es5 Target
4
- exports.COMPONENTS = [["le-round-progress", "jqoqzji9", 1, [["el", 64], ["padding", 1, 0, 1, 8], ["params", 16], ["paths", 1, 0, 1, 2], ["value", 1, 0, 1, 8]], 1], ["le-turntable", "novg0vs0", 1, [["center", 1, 0, 1, 2], ["el", 64], ["value", 1, 0, 1, 8]], 1, [["window:mousemove", "handleMouseMove", 0, 1], ["window:mouseup", "handleMouseUp", 0, 1], ["window:resize", "handleWindowResize", 0, 1]]]];