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.
- package/LICENSE +1 -1
- package/dist/admin/index.d.ts +25 -0
- package/dist/admin/index.js +80 -0
- package/dist/cjs/index-CO4npcak.js +1796 -0
- package/dist/cjs/index-CO4npcak.js.map +1 -0
- package/dist/cjs/index.cjs.js +117 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/le-box.cjs.entry.js +184 -0
- package/dist/cjs/le-box.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-button_6.cjs.entry.js +1199 -0
- package/dist/cjs/le-card.cjs.entry.js +29 -0
- package/dist/cjs/le-card.entry.cjs.js.map +1 -0
- package/dist/cjs/le-kit.cjs.js +25 -0
- package/dist/cjs/le-kit.cjs.js.map +1 -0
- package/dist/cjs/le-number-input.cjs.entry.js +202 -0
- package/dist/cjs/le-number-input.entry.cjs.js.map +1 -0
- package/dist/cjs/le-popup.cjs.entry.js +212 -0
- package/dist/cjs/le-popup.entry.cjs.js.map +1 -0
- package/dist/cjs/le-round-progress.cjs.entry.js +106 -0
- package/dist/cjs/le-round-progress.entry.cjs.js.map +1 -0
- package/dist/cjs/le-stack.cjs.entry.js +135 -0
- package/dist/cjs/le-stack.entry.cjs.js.map +1 -0
- package/dist/cjs/le-text.cjs.entry.js +335 -0
- package/dist/cjs/le-text.entry.cjs.js.map +1 -0
- package/dist/cjs/le-turntable.cjs.entry.js +139 -0
- package/dist/cjs/le-turntable.entry.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/utils-BeT0iyCQ.js +152 -0
- package/dist/cjs/utils-BeT0iyCQ.js.map +1 -0
- package/dist/collection/collection-manifest.json +20 -102
- package/dist/collection/components/le-box/le-box.default.css +37 -0
- package/dist/collection/components/le-box/le-box.js +614 -0
- package/dist/collection/components/le-box/le-box.js.map +1 -0
- package/dist/collection/components/le-button/le-button.default.css +263 -0
- package/dist/collection/components/le-button/le-button.js +368 -0
- package/dist/collection/components/le-button/le-button.js.map +1 -0
- package/dist/collection/components/le-card/le-card.default.css +74 -0
- package/dist/collection/components/le-card/le-card.js +102 -0
- package/dist/collection/components/le-card/le-card.js.map +1 -0
- package/dist/collection/components/le-checkbox/le-checkbox.css +93 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js +192 -0
- package/dist/collection/components/le-checkbox/le-checkbox.js.map +1 -0
- package/dist/collection/components/le-component/le-component.css +189 -0
- package/dist/collection/components/le-component/le-component.js +359 -0
- package/dist/collection/components/le-component/le-component.js.map +1 -0
- package/dist/collection/components/le-number-input/le-number-input.css +135 -0
- package/dist/collection/components/le-number-input/le-number-input.js +515 -0
- package/dist/collection/components/le-number-input/le-number-input.js.map +1 -0
- package/dist/collection/components/le-popover/le-popover.css +143 -0
- package/dist/collection/components/le-popover/le-popover.js +693 -0
- package/dist/collection/components/le-popover/le-popover.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.api.js +101 -0
- package/dist/collection/components/le-popup/le-popup.api.js.map +1 -0
- package/dist/collection/components/le-popup/le-popup.css +222 -0
- package/dist/collection/components/le-popup/le-popup.js +596 -0
- package/dist/collection/components/le-popup/le-popup.js.map +1 -0
- package/dist/collection/components/le-round-progress/le-round-progress.js +184 -84
- package/dist/collection/components/le-round-progress/le-round-progress.js.map +1 -0
- package/dist/collection/components/le-slot/le-slot.default.css +222 -0
- package/dist/collection/components/le-slot/le-slot.js +636 -0
- package/dist/collection/components/le-slot/le-slot.js.map +1 -0
- package/dist/collection/components/le-stack/le-stack.default.css +37 -0
- package/dist/collection/components/le-stack/le-stack.js +389 -0
- package/dist/collection/components/le-stack/le-stack.js.map +1 -0
- package/dist/collection/components/le-string-input/le-string-input.css +83 -0
- package/dist/collection/components/le-string-input/le-string-input.js +359 -0
- package/dist/collection/components/le-string-input/le-string-input.js.map +1 -0
- package/dist/collection/components/le-text/le-text.default.css +169 -0
- package/dist/collection/components/le-text/le-text.js +475 -0
- package/dist/collection/components/le-text/le-text.js.map +1 -0
- package/dist/collection/components/le-turntable/le-turntable.js +210 -102
- package/dist/collection/components/le-turntable/le-turntable.js.map +1 -0
- package/dist/collection/global/app.js +130 -0
- package/dist/collection/global/app.js.map +1 -0
- package/dist/collection/index-admin.js +27 -0
- package/dist/collection/index-admin.js.map +1 -0
- package/dist/collection/index-core.js +25 -0
- package/dist/collection/index-core.js.map +1 -0
- package/dist/collection/index.js +15 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/types/blocks.js +115 -0
- package/dist/collection/types/blocks.js.map +1 -0
- package/dist/collection/types/options.js +2 -0
- package/dist/collection/types/options.js.map +1 -0
- package/dist/collection/utils/utils.js +141 -5
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/index.d.ts +64 -0
- package/dist/components/index.js +127 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/le-box.d.ts +11 -0
- package/dist/components/le-box.js +256 -0
- package/dist/components/le-box.js.map +1 -0
- package/dist/components/le-button.d.ts +11 -0
- package/dist/components/le-button.js +9 -0
- package/dist/components/le-button.js.map +1 -0
- package/dist/components/le-button2.js +1408 -0
- package/dist/components/le-button2.js.map +1 -0
- package/dist/components/le-card.d.ts +11 -0
- package/dist/components/le-card.js +83 -0
- package/dist/components/le-card.js.map +1 -0
- package/dist/components/le-checkbox.d.ts +11 -0
- package/dist/components/le-checkbox.js +9 -0
- package/dist/components/le-checkbox.js.map +1 -0
- package/dist/components/le-component.d.ts +11 -0
- package/dist/components/le-component.js +9 -0
- package/dist/components/le-component.js.map +1 -0
- package/dist/components/le-number-input.d.ts +11 -0
- package/dist/components/le-number-input.js +271 -0
- package/dist/components/le-number-input.js.map +1 -0
- package/dist/components/le-popover.d.ts +11 -0
- package/dist/components/le-popover.js +9 -0
- package/dist/components/le-popover.js.map +1 -0
- package/dist/components/le-popover2.js +382 -0
- package/dist/components/le-popover2.js.map +1 -0
- package/dist/components/le-popup.d.ts +11 -0
- package/dist/components/le-popup.js +279 -0
- package/dist/components/le-popup.js.map +1 -0
- package/dist/components/le-round-progress.d.ts +11 -0
- package/dist/components/le-round-progress.js +135 -0
- package/dist/components/le-round-progress.js.map +1 -0
- package/dist/components/le-slot.d.ts +11 -0
- package/dist/components/le-slot.js +9 -0
- package/dist/components/le-slot.js.map +1 -0
- package/dist/components/le-stack.d.ts +11 -0
- package/dist/components/le-stack.js +198 -0
- package/dist/components/le-stack.js.map +1 -0
- package/dist/components/le-string-input.d.ts +11 -0
- package/dist/components/le-string-input.js +9 -0
- package/dist/components/le-string-input.js.map +1 -0
- package/dist/components/le-text.d.ts +11 -0
- package/dist/components/le-text.js +398 -0
- package/dist/components/le-text.js.map +1 -0
- package/dist/components/le-turntable.d.ts +11 -0
- package/dist/components/le-turntable.js +164 -0
- package/dist/components/le-turntable.js.map +1 -0
- package/dist/core/components/index.d.ts +64 -0
- package/dist/core/components/index.js +127 -0
- package/dist/core/components/index.js.map +1 -0
- package/dist/core/components/le-box.d.ts +11 -0
- package/dist/core/components/le-box.js +246 -0
- package/dist/core/components/le-box.js.map +1 -0
- package/dist/core/components/le-button.d.ts +11 -0
- package/dist/core/components/le-button.js +9 -0
- package/dist/core/components/le-button.js.map +1 -0
- package/dist/core/components/le-button2.js +1358 -0
- package/dist/core/components/le-button2.js.map +1 -0
- package/dist/core/components/le-card.d.ts +11 -0
- package/dist/core/components/le-card.js +73 -0
- package/dist/core/components/le-card.js.map +1 -0
- package/dist/core/components/le-checkbox.d.ts +11 -0
- package/dist/core/components/le-checkbox.js +9 -0
- package/dist/core/components/le-checkbox.js.map +1 -0
- package/dist/core/components/le-component.js.map +1 -0
- package/dist/core/components/le-number-input.d.ts +11 -0
- package/dist/core/components/le-number-input.js +261 -0
- package/dist/core/components/le-number-input.js.map +1 -0
- package/dist/core/components/le-popover.d.ts +11 -0
- package/dist/core/components/le-popover.js +9 -0
- package/dist/core/components/le-popover.js.map +1 -0
- package/dist/core/components/le-popover2.js +382 -0
- package/dist/core/components/le-popover2.js.map +1 -0
- package/dist/core/components/le-popup.d.ts +11 -0
- package/dist/core/components/le-popup.js +269 -0
- package/dist/core/components/le-popup.js.map +1 -0
- package/dist/core/components/le-round-progress.d.ts +11 -0
- package/dist/core/components/le-round-progress.js +135 -0
- package/dist/core/components/le-round-progress.js.map +1 -0
- package/dist/core/components/le-slot.js.map +1 -0
- package/dist/core/components/le-stack.d.ts +11 -0
- package/dist/core/components/le-stack.js +188 -0
- package/dist/core/components/le-stack.js.map +1 -0
- package/dist/core/components/le-string-input.d.ts +11 -0
- package/dist/core/components/le-string-input.js +9 -0
- package/dist/core/components/le-string-input.js.map +1 -0
- package/dist/core/components/le-text.d.ts +11 -0
- package/dist/core/components/le-text.js +388 -0
- package/dist/core/components/le-text.js.map +1 -0
- package/dist/core/components/le-turntable.d.ts +11 -0
- package/dist/core/components/le-turntable.js +164 -0
- package/dist/core/components/le-turntable.js.map +1 -0
- package/dist/core/index.d.ts +23 -0
- package/dist/core/index.js +74 -0
- package/dist/core/stencil-runtime.js +1 -0
- package/dist/docs.d.ts +443 -0
- package/dist/docs.json +5185 -0
- package/dist/esm/index-D71TXvJa.js +1781 -0
- package/dist/esm/index-D71TXvJa.js.map +1 -0
- package/dist/esm/index.js +105 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/le-box.entry.js +182 -0
- package/dist/esm/le-box.entry.js.map +1 -0
- package/dist/esm/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.js.map +1 -0
- package/dist/esm/le-button_6.entry.js +1192 -0
- package/dist/esm/le-card.entry.js +27 -0
- package/dist/esm/le-card.entry.js.map +1 -0
- package/dist/esm/le-kit.js +21 -0
- package/dist/esm/le-kit.js.map +1 -0
- package/dist/esm/le-number-input.entry.js +200 -0
- package/dist/esm/le-number-input.entry.js.map +1 -0
- package/dist/esm/le-popup.entry.js +210 -0
- package/dist/esm/le-popup.entry.js.map +1 -0
- package/dist/esm/le-round-progress.entry.js +104 -0
- package/dist/esm/le-round-progress.entry.js.map +1 -0
- package/dist/esm/le-stack.entry.js +133 -0
- package/dist/esm/le-stack.entry.js.map +1 -0
- package/dist/esm/le-text.entry.js +333 -0
- package/dist/esm/le-text.entry.js.map +1 -0
- package/dist/esm/le-turntable.entry.js +137 -0
- package/dist/esm/le-turntable.entry.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/utils-CJLZrrdC.js +146 -0
- package/dist/esm/utils-CJLZrrdC.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -2
- package/dist/le-kit/index-D21JjI31.js.map +1 -0
- package/dist/le-kit/index.esm.js +2 -0
- package/dist/le-kit/index.esm.js.map +1 -0
- package/dist/le-kit/le-box.entry.esm.js.map +1 -0
- package/dist/le-kit/le-button.le-checkbox.le-component.le-popover.le-slot.le-string-input.entry.esm.js.map +1 -0
- package/dist/le-kit/le-card.entry.esm.js.map +1 -0
- package/dist/le-kit/le-kit.css +1 -0
- package/dist/le-kit/le-kit.esm.js +2 -0
- package/dist/le-kit/le-kit.esm.js.map +1 -0
- package/dist/le-kit/le-number-input.entry.esm.js.map +1 -0
- package/dist/le-kit/le-popup.entry.esm.js.map +1 -0
- package/dist/le-kit/le-round-progress.entry.esm.js.map +1 -0
- package/dist/le-kit/le-stack.entry.esm.js.map +1 -0
- package/dist/le-kit/le-text.entry.esm.js.map +1 -0
- package/dist/le-kit/le-turntable.entry.esm.js.map +1 -0
- package/dist/le-kit/loader.esm.js.map +1 -0
- package/dist/le-kit/p-024a764e.entry.js +2 -0
- package/dist/le-kit/p-024a764e.entry.js.map +1 -0
- package/dist/le-kit/p-073cf0b9.entry.js +2 -0
- package/dist/le-kit/p-073cf0b9.entry.js.map +1 -0
- package/dist/le-kit/p-0955b105.entry.js +2 -0
- package/dist/le-kit/p-0955b105.entry.js.map +1 -0
- package/dist/le-kit/p-18d79ee2.entry.js +2 -0
- package/dist/le-kit/p-18d79ee2.entry.js.map +1 -0
- package/dist/le-kit/p-4b1d3b6d.entry.js +2 -0
- package/dist/le-kit/p-4b1d3b6d.entry.js.map +1 -0
- package/dist/le-kit/p-79d179bd.entry.js +2 -0
- package/dist/le-kit/p-79d179bd.entry.js.map +1 -0
- package/dist/le-kit/p-D71TXvJa.js +3 -0
- package/dist/le-kit/p-D71TXvJa.js.map +1 -0
- package/dist/le-kit/p-c8a9288e.entry.js +2 -0
- package/dist/le-kit/p-c8a9288e.entry.js.map +1 -0
- package/dist/le-kit/p-cfc35bd3.entry.js +2 -0
- package/dist/le-kit/p-cfc35bd3.entry.js.map +1 -0
- package/dist/le-kit/p-d04da1f5.entry.js +2 -0
- package/dist/le-kit/p-d04da1f5.entry.js.map +1 -0
- package/dist/le-kit/p-qIai5-eB.js +2 -0
- package/dist/le-kit/p-qIai5-eB.js.map +1 -0
- package/dist/le-kit/utils-apol-Xc_.js.map +1 -0
- package/dist/themes/base.css +89 -0
- package/dist/themes/dark.css +100 -0
- package/dist/themes/default.css +108 -0
- package/dist/themes/gradient.css +100 -0
- package/dist/themes/index.css +413 -0
- package/dist/themes/minimal.css +100 -0
- package/dist/themes/warm.css +100 -0
- package/dist/types/components/le-box/le-box.d.ts +111 -0
- package/dist/types/components/le-button/le-button.d.ts +78 -0
- package/dist/types/components/le-card/le-card.d.ts +37 -0
- package/dist/types/components/le-checkbox/le-checkbox.d.ts +46 -0
- package/dist/types/components/le-component/le-component.d.ts +115 -0
- package/dist/types/components/le-number-input/le-number-input.d.ts +106 -0
- package/dist/types/components/le-popover/le-popover.d.ts +109 -0
- package/dist/types/components/le-popup/le-popup.api.d.ts +73 -0
- package/dist/types/components/le-popup/le-popup.d.ts +122 -0
- package/dist/types/components/le-round-progress/le-round-progress.d.ts +2 -3
- package/dist/types/components/le-slot/le-slot.d.ts +149 -0
- package/dist/types/components/le-stack/le-stack.d.ts +73 -0
- package/dist/types/components/le-string-input/le-string-input.d.ts +83 -0
- package/dist/types/components/le-text/le-text.d.ts +141 -0
- package/dist/types/components/le-turntable/le-turntable.d.ts +1 -2
- package/dist/types/components.d.ts +2030 -62
- package/dist/types/global/app.d.ts +40 -0
- package/dist/types/index-admin.d.ts +29 -0
- package/dist/types/index-core.d.ts +27 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +1756 -0
- package/dist/types/types/blocks.d.ts +136 -0
- package/dist/types/types/options.d.ts +124 -0
- package/dist/types/utils/utils.d.ts +54 -1
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +64 -13
- package/readme.md +180 -46
- package/dist/cjs/es5/build/jqoqzji9.entry.js +0 -6
- package/dist/cjs/es5/build/jqoqzji9.sc.entry.js +0 -6
- package/dist/cjs/es5/build/novg0vs0.entry.js +0 -9
- package/dist/cjs/es5/build/novg0vs0.sc.entry.js +0 -9
- package/dist/cjs/es5/index.js +0 -1
- package/dist/cjs/es5/le-kit.components.js +0 -4
- package/dist/cjs/es5/le-kit.core.js +0 -459
- package/dist/cjs/es5/le-kit.define.js +0 -9
- package/dist/cjs/es5/polyfills/array.js +0 -63
- package/dist/cjs/es5/polyfills/css-shim.js +0 -178
- package/dist/cjs/es5/polyfills/dom.js +0 -125
- package/dist/cjs/es5/polyfills/fetch.js +0 -186
- package/dist/cjs/es5/polyfills/map.js +0 -54
- package/dist/cjs/es5/polyfills/object.js +0 -27
- package/dist/cjs/es5/polyfills/promise.js +0 -80
- package/dist/cjs/es5/polyfills/string.js +0 -15
- package/dist/cjs/es5/polyfills/tslib.js +0 -244
- package/dist/cjs/es5/polyfills/url.js +0 -68
- package/dist/collection/interface.js +0 -0
- package/dist/esm/es2017/build/jqoqzji9.entry.js +0 -88
- package/dist/esm/es2017/build/jqoqzji9.sc.entry.js +0 -88
- package/dist/esm/es2017/build/novg0vs0.entry.js +0 -106
- package/dist/esm/es2017/build/novg0vs0.sc.entry.js +0 -106
- package/dist/esm/es2017/index.js +0 -1
- package/dist/esm/es2017/le-kit.components.js +0 -2
- package/dist/esm/es2017/le-kit.core.js +0 -5
- package/dist/esm/es2017/le-kit.define.js +0 -9
- package/dist/esm/es5/build/jqoqzji9.entry.js +0 -1
- package/dist/esm/es5/build/jqoqzji9.sc.entry.js +0 -1
- package/dist/esm/es5/build/novg0vs0.entry.js +0 -1
- package/dist/esm/es5/build/novg0vs0.sc.entry.js +0 -1
- package/dist/esm/es5/index.js +0 -1
- package/dist/esm/es5/le-kit.components.js +0 -2
- package/dist/esm/es5/le-kit.core.js +0 -5
- package/dist/esm/es5/le-kit.define.js +0 -9
- package/dist/esm/es5/polyfills/array.js +0 -23
- package/dist/esm/es5/polyfills/css-shim.js +0 -8
- package/dist/esm/es5/polyfills/dom.js +0 -22
- package/dist/esm/es5/polyfills/fetch.js +0 -20
- package/dist/esm/es5/polyfills/map.js +0 -7
- package/dist/esm/es5/polyfills/object.js +0 -20
- package/dist/esm/es5/polyfills/promise.js +0 -8
- package/dist/esm/es5/polyfills/string.js +0 -12
- package/dist/esm/es5/polyfills/tslib.js +0 -160
- package/dist/esm/es5/polyfills/url.js +0 -7
- package/dist/le-kit/jqoqzji9.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.es5.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.sc.entry.js +0 -1
- package/dist/le-kit/jqoqzji9.sc.es5.entry.js +0 -1
- package/dist/le-kit/le-kit.lfyfa4jd.js +0 -123
- package/dist/le-kit/le-kit.rzqb8hph.js +0 -4
- package/dist/le-kit/novg0vs0.entry.js +0 -1
- package/dist/le-kit/novg0vs0.es5.entry.js +0 -1
- package/dist/le-kit/novg0vs0.sc.entry.js +0 -1
- package/dist/le-kit/novg0vs0.sc.es5.entry.js +0 -1
- package/dist/le-kit.js +0 -1
- package/dist/loader/index.cjs.js +0 -1
- package/dist/loader/index.d.ts +0 -1
- package/dist/loader/index.es2017.js +0 -1
- package/dist/loader/index.js +0 -1
- package/dist/loader/package.json +0 -9
- package/dist/types/stencil.core.d.ts +0 -1203
- package/dist/web-components.json +0 -41
package/readme.md
CHANGED
|
@@ -1,76 +1,210 @@
|
|
|
1
|
-
|
|
1
|
+
# Le-Kit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/le-kit)
|
|
4
|
+
[](https://stenciljs.com)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
A themeable web component library built with Stencil, featuring a dual-mode system for production and CMS editing.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Features
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
16
|
+
## Installation
|
|
13
17
|
|
|
14
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
130
|
+
### Actions
|
|
23
131
|
|
|
24
|
-
|
|
132
|
+
- **`<le-button>`** — Button with variants (solid, outlined, clear) and colors
|
|
25
133
|
|
|
26
|
-
|
|
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
|
-
|
|
136
|
+
- **`<le-text>`** — Typography component with semantic variants
|
|
32
137
|
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
157
|
+
### Responsive Stack Layout
|
|
48
158
|
|
|
49
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
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
|
-
|
|
195
|
+
## Browser Support
|
|
59
196
|
|
|
60
|
-
|
|
197
|
+
Le-Kit supports all modern browsers:
|
|
61
198
|
|
|
199
|
+
- Chrome 79+
|
|
200
|
+
- Firefox 70+
|
|
201
|
+
- Safari 14+
|
|
202
|
+
- Edge 79+
|
|
62
203
|
|
|
63
|
-
|
|
204
|
+
## License
|
|
64
205
|
|
|
65
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
package/dist/cjs/es5/index.js
DELETED
|
@@ -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]]]];
|