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
|
@@ -1,102 +1,210 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class LeTurntable {
|
|
3
|
+
// host element
|
|
4
|
+
el;
|
|
5
|
+
// transform origin
|
|
6
|
+
// gets the same values as transform-origin css property
|
|
7
|
+
center = 'center';
|
|
8
|
+
// transform rotate
|
|
9
|
+
value = 0;
|
|
10
|
+
updateValue(newValue) {
|
|
11
|
+
if (!this.rotating) {
|
|
12
|
+
this.currentAngle = parseFloat(newValue);
|
|
13
|
+
this.setAngle(this.currentAngle);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Internal state
|
|
18
|
+
*
|
|
19
|
+
* using properties instead of @State decoratorm
|
|
20
|
+
* because we are only changing styles of the element and don't
|
|
21
|
+
* need the element to be rerendered
|
|
22
|
+
*/
|
|
23
|
+
// indicates is the element being manually rotated right now
|
|
24
|
+
rotating = false;
|
|
25
|
+
// coordinates of the transform origin in pixels
|
|
26
|
+
centerX;
|
|
27
|
+
centerY;
|
|
28
|
+
// element page (body?) offset in pixels
|
|
29
|
+
pageX;
|
|
30
|
+
pageY;
|
|
31
|
+
currentAngle = 0;
|
|
32
|
+
// angle at the start of the drag
|
|
33
|
+
startAngle;
|
|
34
|
+
/**
|
|
35
|
+
* Event listeners
|
|
36
|
+
*/
|
|
37
|
+
handleMouseDown(evt) {
|
|
38
|
+
// set rotating mode on
|
|
39
|
+
this.rotating = true;
|
|
40
|
+
// get start angle
|
|
41
|
+
// getting pageX/Y, because when the element is transformed
|
|
42
|
+
// relative values are useless
|
|
43
|
+
this.startAngle = this.getAngle(evt.pageX, evt.pageY);
|
|
44
|
+
// cancel the event to prevent text selection
|
|
45
|
+
evt.preventDefault();
|
|
46
|
+
evt.stopPropagation();
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Fires when the mouse moves
|
|
51
|
+
* checks is the element rotating right now and if it is
|
|
52
|
+
* then calc the current angle and rotate the element
|
|
53
|
+
*
|
|
54
|
+
* TODO: attach events only after the dragStart?
|
|
55
|
+
*/
|
|
56
|
+
handleMouseMove(evt) {
|
|
57
|
+
if (this.rotating) {
|
|
58
|
+
// calc angle update and rotate element
|
|
59
|
+
this.setAngle(this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle));
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
handleMouseUp(evt) {
|
|
64
|
+
if (this.rotating) {
|
|
65
|
+
const angle = this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle);
|
|
66
|
+
this.setAngle(angle);
|
|
67
|
+
this.currentAngle = angle;
|
|
68
|
+
this.rotating = false;
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// on window resize the center should be recalculated
|
|
73
|
+
handleWindowResize() {
|
|
74
|
+
this.getTransformOrigin();
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Component lifecycles
|
|
78
|
+
*/
|
|
79
|
+
componentDidLoad() {
|
|
80
|
+
this.el.style.transformOrigin = this.center;
|
|
81
|
+
this.currentAngle = this.value;
|
|
82
|
+
this.getTransformOrigin();
|
|
83
|
+
this.setAngle(this.currentAngle);
|
|
84
|
+
}
|
|
85
|
+
componentDidUpdate() {
|
|
86
|
+
this.getTransformOrigin();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Calculates the transform origin of the component
|
|
90
|
+
* and the page offset in pixels
|
|
91
|
+
*
|
|
92
|
+
* We'll need these values to calculate the angle of pointer event
|
|
93
|
+
*/
|
|
94
|
+
getTransformOrigin() {
|
|
95
|
+
// transform origin
|
|
96
|
+
[this.centerX, this.centerY] = window
|
|
97
|
+
.getComputedStyle(this.el, null)
|
|
98
|
+
.transformOrigin.split(' ')
|
|
99
|
+
.map(val => Math.round(parseFloat(val)));
|
|
100
|
+
// page offset
|
|
101
|
+
let t = null;
|
|
102
|
+
const scrollContainer = ((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.scrollLeft === 'number' ? t : document.body;
|
|
103
|
+
const clientRects = this.el.getBoundingClientRect();
|
|
104
|
+
this.pageX = Math.round(clientRects.left + scrollContainer.scrollLeft);
|
|
105
|
+
this.pageY = Math.round(clientRects.top + scrollContainer.scrollTop);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Calculates current angle
|
|
109
|
+
*
|
|
110
|
+
* @param {number} posX horizontal mouse position
|
|
111
|
+
* @param {number} posY vertical mouse position
|
|
112
|
+
*/
|
|
113
|
+
getAngle(posX, posY) {
|
|
114
|
+
const x = posX - this.pageX - this.centerX;
|
|
115
|
+
const y = posY - this.pageY - this.centerY;
|
|
116
|
+
const angle = Math.round(((Math.atan2(y, x) * 180) / Math.PI) * 100) / 100;
|
|
117
|
+
return angle;
|
|
118
|
+
}
|
|
119
|
+
setAngle(angle) {
|
|
120
|
+
this.el.style.transform = `rotate(${angle}deg)`;
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
return (h("div", { key: 'ec9a506a360881ab3c3df97027c8a25d663f6819', class: "turntable", onMouseDown: this.handleMouseDown.bind(this) }, h("slot", { key: '926a84fa75952bdc3e44f1b2146848401e8ab10f' })));
|
|
124
|
+
}
|
|
125
|
+
static get is() { return "le-turntable"; }
|
|
126
|
+
static get encapsulation() { return "shadow"; }
|
|
127
|
+
static get originalStyleUrls() {
|
|
128
|
+
return {
|
|
129
|
+
"$": ["le-turntable.css"]
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
static get styleUrls() {
|
|
133
|
+
return {
|
|
134
|
+
"$": ["le-turntable.css"]
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get properties() {
|
|
138
|
+
return {
|
|
139
|
+
"center": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": ""
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"attribute": "center",
|
|
157
|
+
"defaultValue": "'center'"
|
|
158
|
+
},
|
|
159
|
+
"value": {
|
|
160
|
+
"type": "number",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "number",
|
|
164
|
+
"resolved": "number",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": ""
|
|
172
|
+
},
|
|
173
|
+
"getter": false,
|
|
174
|
+
"setter": false,
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"attribute": "value",
|
|
177
|
+
"defaultValue": "0"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static get elementRef() { return "el"; }
|
|
182
|
+
static get watchers() {
|
|
183
|
+
return [{
|
|
184
|
+
"propName": "value",
|
|
185
|
+
"methodName": "updateValue"
|
|
186
|
+
}];
|
|
187
|
+
}
|
|
188
|
+
static get listeners() {
|
|
189
|
+
return [{
|
|
190
|
+
"name": "mousemove",
|
|
191
|
+
"method": "handleMouseMove",
|
|
192
|
+
"target": "window",
|
|
193
|
+
"capture": false,
|
|
194
|
+
"passive": true
|
|
195
|
+
}, {
|
|
196
|
+
"name": "mouseup",
|
|
197
|
+
"method": "handleMouseUp",
|
|
198
|
+
"target": "window",
|
|
199
|
+
"capture": false,
|
|
200
|
+
"passive": true
|
|
201
|
+
}, {
|
|
202
|
+
"name": "resize",
|
|
203
|
+
"method": "handleWindowResize",
|
|
204
|
+
"target": "window",
|
|
205
|
+
"capture": false,
|
|
206
|
+
"passive": true
|
|
207
|
+
}];
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=le-turntable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"le-turntable.js","sourceRoot":"","sources":["../../../src/components/le-turntable/le-turntable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAO3E,MAAM,OAAO,WAAW;IACtB,eAAe;IACJ,EAAE,CAAc;IAE3B,mBAAmB;IACnB,wDAAwD;IAChD,MAAM,GAAW,QAAQ,CAAC;IAElC,mBAAmB;IACX,KAAK,GAAW,CAAC,CAAC;IAG1B,WAAW,CAAC,QAAQ;QAClB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IAEH,4DAA4D;IAC5D,QAAQ,GAAG,KAAK,CAAC;IAEjB,gDAAgD;IAChD,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,wCAAwC;IACxC,KAAK,CAAS;IACd,KAAK,CAAS;IAEd,YAAY,GAAW,CAAC,CAAC;IACzB,iCAAiC;IACjC,UAAU,CAAS;IAEnB;;OAEG;IACH,eAAe,CAAC,GAAe;QAC7B,uBAAuB;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,kBAAkB;QAClB,6DAA6D;QAC7D,gCAAgC;QAChC,IAAI,CAAC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G,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QAC3E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,CAAC,KAAK;QACZ,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,KAAK,MAAM,CAAC;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,WAAW,EAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YACjE,8DAAQ,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, Listen, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'le-turntable',\n styleUrl: 'le-turntable.css',\n shadow: true,\n})\nexport class LeTurntable {\n // host element\n @Element() el: HTMLElement;\n\n // transform origin\n // gets the same values as transform-origin css property\n @Prop() center: string = 'center';\n\n // transform rotate\n @Prop() value: number = 0;\n\n @Watch('value')\n updateValue(newValue) {\n if (!this.rotating) {\n this.currentAngle = parseFloat(newValue);\n this.setAngle(this.currentAngle);\n }\n }\n\n /**\n * Internal state\n *\n * using properties instead of @State decoratorm\n * because we are only changing styles of the element and don't\n * need the element to be rerendered\n */\n\n // indicates is the element being manually rotated right now\n rotating = false;\n\n // coordinates of the transform origin in pixels\n centerX: number;\n centerY: number;\n\n // element page (body?) offset in pixels\n pageX: number;\n pageY: number;\n\n currentAngle: number = 0;\n // angle at the start of the drag\n startAngle: number;\n\n /**\n * Event listeners\n */\n handleMouseDown(evt: MouseEvent) {\n // set rotating mode on\n this.rotating = true;\n\n // get start angle\n // getting pageX/Y, because when the element is transformed\n // relative values are useless\n this.startAngle = this.getAngle(evt.pageX, evt.pageY);\n\n // cancel the event to prevent text selection\n evt.preventDefault();\n evt.stopPropagation();\n return false;\n }\n\n /**\n * Fires when the mouse moves\n * checks is the element rotating right now and if it is\n * then calc the current angle and rotate the element\n *\n * TODO: attach events only after the dragStart?\n */\n @Listen('mousemove', { target: 'window' })\n handleMouseMove(evt: MouseEvent) {\n if (this.rotating) {\n // calc angle update and rotate element\n this.setAngle(this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle));\n return false;\n }\n }\n\n @Listen('mouseup', { target: 'window' })\n handleMouseUp(evt: MouseEvent) {\n if (this.rotating) {\n const angle = this.currentAngle + (this.getAngle(evt.pageX, evt.pageY) - this.startAngle);\n this.setAngle(angle);\n this.currentAngle = angle;\n this.rotating = false;\n return false;\n }\n }\n\n // on window resize the center should be recalculated\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n this.getTransformOrigin();\n }\n\n /**\n * Component lifecycles\n */\n componentDidLoad() {\n this.el.style.transformOrigin = this.center;\n this.currentAngle = this.value;\n\n this.getTransformOrigin();\n this.setAngle(this.currentAngle);\n }\n\n componentDidUpdate() {\n this.getTransformOrigin();\n }\n\n /**\n * Calculates the transform origin of the component\n * and the page offset in pixels\n *\n * We'll need these values to calculate the angle of pointer event\n */\n getTransformOrigin() {\n // transform origin\n [this.centerX, this.centerY] = window\n .getComputedStyle(this.el, null)\n .transformOrigin.split(' ')\n .map(val => Math.round(parseFloat(val)));\n // page offset\n let t = null;\n const scrollContainer = ((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.scrollLeft === 'number' ? t : document.body;\n const clientRects = this.el.getBoundingClientRect();\n this.pageX = Math.round(clientRects.left + scrollContainer.scrollLeft);\n this.pageY = Math.round(clientRects.top + scrollContainer.scrollTop);\n }\n\n /**\n * Calculates current angle\n *\n * @param {number} posX horizontal mouse position\n * @param {number} posY vertical mouse position\n */\n getAngle(posX: number, posY: number) {\n const x = posX - this.pageX - this.centerX;\n const y = posY - this.pageY - this.centerY;\n const angle = Math.round(((Math.atan2(y, x) * 180) / Math.PI) * 100) / 100;\n return angle;\n }\n\n setAngle(angle) {\n this.el.style.transform = `rotate(${angle}deg)`;\n }\n\n render() {\n return (\n <div class=\"turntable\" onMouseDown={this.handleMouseDown.bind(this)}>\n <slot />\n </div>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { setMode } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Global mode initialization for le-kit components.
|
|
4
|
+
*
|
|
5
|
+
* Mode inheritance works as follows:
|
|
6
|
+
* 1. Check the element's own `mode` attribute
|
|
7
|
+
* 2. Traverse up the DOM to find a parent with `mode` attribute
|
|
8
|
+
* 3. Check the document root element (html) for `mode` attribute
|
|
9
|
+
* 4. Fall back to 'default'
|
|
10
|
+
*
|
|
11
|
+
* This allows setting mode at any level:
|
|
12
|
+
* - `<html mode="admin">` - all components in admin mode
|
|
13
|
+
* - `<le-card mode="admin">` - this card and its children in admin mode
|
|
14
|
+
*/
|
|
15
|
+
function initializeMode() {
|
|
16
|
+
setMode((el) => {
|
|
17
|
+
// 1. Check element's own mode attribute
|
|
18
|
+
const ownMode = el.getAttribute('mode');
|
|
19
|
+
if (ownMode) {
|
|
20
|
+
return ownMode;
|
|
21
|
+
}
|
|
22
|
+
// 2. Traverse up the DOM tree to find inherited mode
|
|
23
|
+
let parent = el.parentElement;
|
|
24
|
+
while (parent) {
|
|
25
|
+
const parentMode = parent.getAttribute('mode');
|
|
26
|
+
if (parentMode) {
|
|
27
|
+
return parentMode;
|
|
28
|
+
}
|
|
29
|
+
parent = parent.parentElement;
|
|
30
|
+
}
|
|
31
|
+
// 3. Check document root element
|
|
32
|
+
const rootMode = document.documentElement.getAttribute('mode');
|
|
33
|
+
if (rootMode) {
|
|
34
|
+
return rootMode;
|
|
35
|
+
}
|
|
36
|
+
// 4. Default mode
|
|
37
|
+
return 'default';
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
// Default export for Stencil global script
|
|
41
|
+
export default initializeMode;
|
|
42
|
+
/**
|
|
43
|
+
* Helper function to get the current mode for an element.
|
|
44
|
+
* Can be used programmatically in components.
|
|
45
|
+
*
|
|
46
|
+
* This function traverses both regular DOM and shadow DOM boundaries
|
|
47
|
+
* to find the nearest mode attribute.
|
|
48
|
+
*/
|
|
49
|
+
export function getMode(el) {
|
|
50
|
+
// Check element's own mode
|
|
51
|
+
const ownMode = el.getAttribute('mode');
|
|
52
|
+
if (ownMode) {
|
|
53
|
+
return ownMode;
|
|
54
|
+
}
|
|
55
|
+
// Traverse up DOM, crossing shadow boundaries
|
|
56
|
+
let current = el;
|
|
57
|
+
while (current) {
|
|
58
|
+
// Try parent element first
|
|
59
|
+
if (current instanceof Element && current.parentElement) {
|
|
60
|
+
current = current.parentElement;
|
|
61
|
+
const mode = current.getAttribute?.('mode');
|
|
62
|
+
if (mode) {
|
|
63
|
+
return mode;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// No parent element - check if we're in a shadow root
|
|
68
|
+
const root = current.getRootNode();
|
|
69
|
+
if (root instanceof ShadowRoot) {
|
|
70
|
+
// Cross the shadow boundary to the host element
|
|
71
|
+
current = root.host;
|
|
72
|
+
const mode = current.getAttribute?.('mode');
|
|
73
|
+
if (mode) {
|
|
74
|
+
return mode;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// We've reached the document root
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Check document root
|
|
84
|
+
const rootMode = document.documentElement.getAttribute('mode');
|
|
85
|
+
if (rootMode) {
|
|
86
|
+
return rootMode;
|
|
87
|
+
}
|
|
88
|
+
return 'default';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Helper function to get the current theme for an element.
|
|
92
|
+
* Theme inheritance works the same as mode - cascades through DOM.
|
|
93
|
+
*/
|
|
94
|
+
export function getTheme(el) {
|
|
95
|
+
// Check element's own theme
|
|
96
|
+
const ownTheme = el.getAttribute('theme');
|
|
97
|
+
if (ownTheme) {
|
|
98
|
+
return ownTheme;
|
|
99
|
+
}
|
|
100
|
+
// Traverse up DOM
|
|
101
|
+
let parent = el.parentElement;
|
|
102
|
+
while (parent) {
|
|
103
|
+
const parentTheme = parent.getAttribute('theme');
|
|
104
|
+
if (parentTheme) {
|
|
105
|
+
return parentTheme;
|
|
106
|
+
}
|
|
107
|
+
parent = parent.parentElement;
|
|
108
|
+
}
|
|
109
|
+
// Check root
|
|
110
|
+
const rootTheme = document.documentElement.getAttribute('theme');
|
|
111
|
+
if (rootTheme) {
|
|
112
|
+
return rootTheme;
|
|
113
|
+
}
|
|
114
|
+
return 'default';
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Helper function to set mode on the document root.
|
|
118
|
+
* Useful for switching all components to admin mode.
|
|
119
|
+
*/
|
|
120
|
+
export function setGlobalMode(mode) {
|
|
121
|
+
document.documentElement.setAttribute('mode', mode);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Helper function to set theme on the document root.
|
|
125
|
+
* Useful for switching all components to a different theme.
|
|
126
|
+
*/
|
|
127
|
+
export function setGlobalTheme(theme) {
|
|
128
|
+
document.documentElement.setAttribute('theme', theme);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/global/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC;;;;;;;;;;;;GAYG;AACH,SAAS,cAAc;IACrB,OAAO,CAAC,CAAC,EAAe,EAAa,EAAE;QACrC,wCAAwC;QACxC,MAAM,OAAO,GA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;IACjC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAe;IAC3C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAiB;IAC9C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { setMode } from '@stencil/core';\n\nexport type LeKitMode = 'default' | 'admin' | string;\nexport type LeKitTheme = 'default' | 'dark' | string;\n\n/**\n * Global mode initialization for le-kit components.\n *\n * Mode inheritance works as follows:\n * 1. Check the element's own `mode` attribute\n * 2. Traverse up the DOM to find a parent with `mode` attribute\n * 3. Check the document root element (html) for `mode` attribute\n * 4. Fall back to 'default'\n *\n * This allows setting mode at any level:\n * - `<html mode=\"admin\">` - all components in admin mode\n * - `<le-card mode=\"admin\">` - this card and its children in admin mode\n */\nfunction initializeMode() {\n setMode((el: HTMLElement): LeKitMode => {\n // 1. Check element's own mode attribute\n const ownMode = el.getAttribute('mode');\n if (ownMode) {\n return ownMode as LeKitMode;\n }\n\n // 2. Traverse up the DOM tree to find inherited mode\n let parent = el.parentElement;\n while (parent) {\n const parentMode = parent.getAttribute('mode');\n if (parentMode) {\n return parentMode as LeKitMode;\n }\n parent = parent.parentElement;\n }\n\n // 3. Check document root element\n const rootMode = document.documentElement.getAttribute('mode');\n if (rootMode) {\n return rootMode as LeKitMode;\n }\n\n // 4. Default mode\n return 'default';\n });\n}\n\n// Default export for Stencil global script\nexport default initializeMode;\n\n/**\n * Helper function to get the current mode for an element.\n * Can be used programmatically in components.\n * \n * This function traverses both regular DOM and shadow DOM boundaries\n * to find the nearest mode attribute.\n */\nexport function getMode(el: HTMLElement): LeKitMode {\n // Check element's own mode\n const ownMode = el.getAttribute('mode');\n if (ownMode) {\n return ownMode as LeKitMode;\n }\n\n // Traverse up DOM, crossing shadow boundaries\n let current: Node | null = el;\n while (current) {\n // Try parent element first\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n const mode = (current as HTMLElement).getAttribute?.('mode');\n if (mode) {\n return mode as LeKitMode;\n }\n } else {\n // No parent element - check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary to the host element\n current = root.host;\n const mode = (current as HTMLElement).getAttribute?.('mode');\n if (mode) {\n return mode as LeKitMode;\n }\n } else {\n // We've reached the document root\n break;\n }\n }\n }\n\n // Check document root\n const rootMode = document.documentElement.getAttribute('mode');\n if (rootMode) {\n return rootMode as LeKitMode;\n }\n\n return 'default';\n}\n\n/**\n * Helper function to get the current theme for an element.\n * Theme inheritance works the same as mode - cascades through DOM.\n */\nexport function getTheme(el: HTMLElement): LeKitTheme {\n // Check element's own theme\n const ownTheme = el.getAttribute('theme');\n if (ownTheme) {\n return ownTheme as LeKitTheme;\n }\n\n // Traverse up DOM\n let parent = el.parentElement;\n while (parent) {\n const parentTheme = parent.getAttribute('theme');\n if (parentTheme) {\n return parentTheme as LeKitTheme;\n }\n parent = parent.parentElement;\n }\n\n // Check root\n const rootTheme = document.documentElement.getAttribute('theme');\n if (rootTheme) {\n return rootTheme as LeKitTheme;\n }\n\n return 'default';\n}\n\n/**\n * Helper function to set mode on the document root.\n * Useful for switching all components to admin mode.\n */\nexport function setGlobalMode(mode: LeKitMode): void {\n document.documentElement.setAttribute('mode', mode);\n}\n\n/**\n * Helper function to set theme on the document root.\n * Useful for switching all components to a different theme.\n */\nexport function setGlobalTheme(theme: LeKitTheme): void {\n document.documentElement.setAttribute('theme', theme);\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full Le-Kit component exports
|
|
3
|
+
* Includes all components with admin mode support
|
|
4
|
+
*
|
|
5
|
+
* Auto-generated by scripts/build-targets.mjs
|
|
6
|
+
* Do not edit manually.
|
|
7
|
+
*/
|
|
8
|
+
// Component class exports
|
|
9
|
+
export { LeBox } from './components/le-box/le-box';
|
|
10
|
+
export { LeButton } from './components/le-button/le-button';
|
|
11
|
+
export { LeCard } from './components/le-card/le-card';
|
|
12
|
+
export { LeCheckbox } from './components/le-checkbox/le-checkbox';
|
|
13
|
+
export { LeComponent } from './components/le-component/le-component';
|
|
14
|
+
export { LeNumberInput } from './components/le-number-input/le-number-input';
|
|
15
|
+
export { LePopover } from './components/le-popover/le-popover';
|
|
16
|
+
export { LePopup } from './components/le-popup/le-popup';
|
|
17
|
+
export { LeRoundProgress } from './components/le-round-progress/le-round-progress';
|
|
18
|
+
export { LeSlot } from './components/le-slot/le-slot';
|
|
19
|
+
export { LeStack } from './components/le-stack/le-stack';
|
|
20
|
+
export { LeStringInput } from './components/le-string-input/le-string-input';
|
|
21
|
+
export { LeText } from './components/le-text/le-text';
|
|
22
|
+
export { LeTurntable } from './components/le-turntable/le-turntable';
|
|
23
|
+
// Re-export utilities and types from main index
|
|
24
|
+
export { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';
|
|
25
|
+
export { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';
|
|
26
|
+
export { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';
|
|
27
|
+
//# sourceMappingURL=index-admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-admin.js","sourceRoot":"","sources":["../src/index-admin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0BAA0B;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,gDAAgD;AAChD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["/**\n * Full Le-Kit component exports\n * Includes all components with admin mode support\n * \n * Auto-generated by scripts/build-targets.mjs\n * Do not edit manually.\n */\n\n// Component class exports\nexport { LeBox } from './components/le-box/le-box';\nexport { LeButton } from './components/le-button/le-button';\nexport { LeCard } from './components/le-card/le-card';\nexport { LeCheckbox } from './components/le-checkbox/le-checkbox';\nexport { LeComponent } from './components/le-component/le-component';\nexport { LeNumberInput } from './components/le-number-input/le-number-input';\nexport { LePopover } from './components/le-popover/le-popover';\nexport { LePopup } from './components/le-popup/le-popup';\nexport { LeRoundProgress } from './components/le-round-progress/le-round-progress';\nexport { LeSlot } from './components/le-slot/le-slot';\nexport { LeStack } from './components/le-stack/le-stack';\nexport { LeStringInput } from './components/le-string-input/le-string-input';\nexport { LeText } from './components/le-text/le-text';\nexport { LeTurntable } from './components/le-turntable/le-turntable';\n\n// Re-export utilities and types from main index\nexport { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';\nexport { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';\nexport type { LeKitMode, LeKitTheme } from './global/app';\nexport { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';\nexport type { PopupOptions } from './components/le-popup/le-popup.api';\nexport type { PopupResult, PopupType, PopupPosition } from './components/le-popup/le-popup';\n\n// Type exports\nexport type * from './types/options';\nexport type * from './types/blocks';\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Le-Kit component exports
|
|
3
|
+
* Excludes admin-only components (le-component, le-slot)
|
|
4
|
+
*
|
|
5
|
+
* Auto-generated by scripts/build-targets.mjs
|
|
6
|
+
* Do not edit manually.
|
|
7
|
+
*/
|
|
8
|
+
// Component class exports
|
|
9
|
+
export { LeBox } from './components/le-box/le-box';
|
|
10
|
+
export { LeButton } from './components/le-button/le-button';
|
|
11
|
+
export { LeCard } from './components/le-card/le-card';
|
|
12
|
+
export { LeCheckbox } from './components/le-checkbox/le-checkbox';
|
|
13
|
+
export { LeNumberInput } from './components/le-number-input/le-number-input';
|
|
14
|
+
export { LePopover } from './components/le-popover/le-popover';
|
|
15
|
+
export { LePopup } from './components/le-popup/le-popup';
|
|
16
|
+
export { LeRoundProgress } from './components/le-round-progress/le-round-progress';
|
|
17
|
+
export { LeStack } from './components/le-stack/le-stack';
|
|
18
|
+
export { LeStringInput } from './components/le-string-input/le-string-input';
|
|
19
|
+
export { LeText } from './components/le-text/le-text';
|
|
20
|
+
export { LeTurntable } from './components/le-turntable/le-turntable';
|
|
21
|
+
// Re-export utilities and types from main index
|
|
22
|
+
export { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';
|
|
23
|
+
export { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';
|
|
24
|
+
export { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';
|
|
25
|
+
//# sourceMappingURL=index-core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-core.js","sourceRoot":"","sources":["../src/index-core.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0BAA0B;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,gDAAgD;AAChD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["/**\n * Core Le-Kit component exports\n * Excludes admin-only components (le-component, le-slot)\n * \n * Auto-generated by scripts/build-targets.mjs\n * Do not edit manually.\n */\n\n// Component class exports\nexport { LeBox } from './components/le-box/le-box';\nexport { LeButton } from './components/le-button/le-button';\nexport { LeCard } from './components/le-card/le-card';\nexport { LeCheckbox } from './components/le-checkbox/le-checkbox';\nexport { LeNumberInput } from './components/le-number-input/le-number-input';\nexport { LePopover } from './components/le-popover/le-popover';\nexport { LePopup } from './components/le-popup/le-popup';\nexport { LeRoundProgress } from './components/le-round-progress/le-round-progress';\nexport { LeStack } from './components/le-stack/le-stack';\nexport { LeStringInput } from './components/le-string-input/le-string-input';\nexport { LeText } from './components/le-text/le-text';\nexport { LeTurntable } from './components/le-turntable/le-turntable';\n\n// Re-export utilities and types from main index\nexport { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';\nexport { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';\nexport type { LeKitMode, LeKitTheme } from './global/app';\nexport { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';\nexport type { PopupOptions } from './components/le-popup/le-popup.api';\nexport type { PopupResult, PopupType, PopupPosition } from './components/le-popup/le-popup';\n\n// Type exports\nexport type * from './types/options';\nexport type * from './types/blocks';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Entry point for le-kit component library
|
|
3
|
+
*
|
|
4
|
+
* This file exports utilities, types, and helper functions.
|
|
5
|
+
* Components are auto-registered and available as custom elements.
|
|
6
|
+
*
|
|
7
|
+
* @see README.md for usage instructions
|
|
8
|
+
*/
|
|
9
|
+
// Utility exports
|
|
10
|
+
export { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';
|
|
11
|
+
// Global mode and theme helpers
|
|
12
|
+
export { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';
|
|
13
|
+
// Popup/dialog programmatic API
|
|
14
|
+
export { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEhF,gCAAgC;AAChC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGhF,gCAAgC;AAChC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC","sourcesContent":["/**\n * @fileoverview Entry point for le-kit component library\n *\n * This file exports utilities, types, and helper functions.\n * Components are auto-registered and available as custom elements.\n *\n * @see README.md for usage instructions\n */\n\n// Utility exports\nexport { generateId, parseCommaSeparated, slotHasContent } from './utils/utils';\n\n// Global mode and theme helpers\nexport { getMode, setGlobalMode, getTheme, setGlobalTheme } from './global/app';\nexport type { LeKitMode, LeKitTheme } from './global/app';\n\n// Popup/dialog programmatic API\nexport { leAlert, leConfirm, lePrompt } from './components/le-popup/le-popup.api';\nexport type { PopupOptions } from './components/le-popup/le-popup.api';\nexport type { PopupResult, PopupType, PopupPosition } from './components/le-popup/le-popup';\n\n// Type exports\nexport type * from './components.d.ts';\n"]}
|