le-kit 0.3.5 → 0.5.0
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/LLM_CONTEXT.md +1377 -0
- package/dist/cjs/{index-BPF04Jvb.js → index-BzadfLTc.js} +6 -3
- package/dist/cjs/index-BzadfLTc.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/le-bar_16.cjs.entry.js +21 -21
- package/dist/cjs/le-box.cjs.entry.js +5 -5
- package/dist/cjs/le-card.cjs.entry.js +5 -5
- package/dist/cjs/le-code-input.cjs.entry.js +181 -0
- package/dist/cjs/le-combobox.cjs.entry.js +2 -2
- package/dist/cjs/le-header-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/le-kit.cjs.js +2 -2
- package/dist/cjs/le-multiselect.cjs.entry.js +4 -4
- package/dist/cjs/le-number-input.cjs.entry.js +3 -3
- package/dist/cjs/le-round-progress.cjs.entry.js +2 -2
- package/dist/cjs/le-segmented-control.cjs.entry.js +2 -2
- package/dist/cjs/le-side-panel-toggle.cjs.entry.js +229 -0
- package/dist/cjs/le-side-panel.cjs.entry.js +546 -0
- package/dist/cjs/le-stack.cjs.entry.js +3 -3
- package/dist/cjs/le-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/le-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/le-tab.cjs.entry.js +3 -3
- package/dist/cjs/le-tabs.cjs.entry.js +4 -4
- package/dist/cjs/le-tag.cjs.entry.js +2 -2
- package/dist/cjs/le-text.cjs.entry.js +8 -8
- package/dist/cjs/le-turntable.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-BYsLPHN1.js → utils-Dxx9WhWK.js} +3 -3
- package/dist/cjs/{utils-BYsLPHN1.js.map → utils-Dxx9WhWK.js.map} +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/le-box/le-box.js +3 -3
- package/dist/collection/components/le-box/le-box.js.map +1 -1
- package/dist/collection/components/le-button/le-button.css +2 -2
- package/dist/collection/components/le-button/le-button.js +1 -1
- package/dist/collection/components/le-card/le-card.js +3 -3
- package/dist/collection/components/le-card/le-card.js.map +1 -1
- package/dist/collection/components/le-checkbox/le-checkbox.js +1 -1
- package/dist/collection/components/le-code-input/le-code-input.css +106 -0
- package/dist/collection/components/le-code-input/le-code-input.js +466 -0
- package/dist/collection/components/le-code-input/le-code-input.js.map +1 -0
- package/dist/collection/components/le-collapse/le-collapse.js +1 -1
- package/dist/collection/components/le-combobox/le-combobox.js +1 -1
- package/dist/collection/components/le-current-heading/le-current-heading.js +1 -1
- package/dist/collection/components/le-dropdown-base/le-dropdown-base.js +1 -1
- package/dist/collection/components/le-header/le-header.js +2 -2
- package/dist/collection/components/le-header-placeholder/le-header-placeholder.js +1 -1
- package/dist/collection/components/le-icon/le-icon.js +1 -1
- package/dist/collection/components/le-multiselect/le-multiselect.js +3 -3
- package/dist/collection/components/le-navigation/le-navigation.css +10 -4
- package/dist/collection/components/le-number-input/le-number-input.js +1 -1
- package/dist/collection/components/le-popover/le-popover.js +3 -3
- package/dist/collection/components/le-round-progress/le-round-progress.js +1 -1
- package/dist/collection/components/le-scroll-progress/le-scroll-progress.js +1 -1
- package/dist/collection/components/le-segmented-control/le-segmented-control.js +1 -1
- package/dist/collection/components/le-select/le-select.js +2 -2
- package/dist/collection/components/le-side-panel/le-side-panel.css +193 -0
- package/dist/collection/components/le-side-panel/le-side-panel.js +953 -0
- package/dist/collection/components/le-side-panel/le-side-panel.js.map +1 -0
- package/dist/collection/components/le-side-panel-toggle/le-side-panel-toggle.js +610 -0
- package/dist/collection/components/le-side-panel-toggle/le-side-panel-toggle.js.map +1 -0
- package/dist/collection/components/le-slot/le-slot.js +1 -1
- package/dist/collection/components/le-stack/le-stack.js +1 -1
- package/dist/collection/components/le-string-input/le-string-input.js +2 -2
- package/dist/collection/components/le-tab/le-tab.js +1 -1
- package/dist/collection/components/le-tab-bar/le-tab-bar.js +1 -1
- package/dist/collection/components/le-tab-panel/le-tab-panel.js +2 -2
- package/dist/collection/components/le-tabs/le-tabs.js +2 -2
- package/dist/collection/components/le-tag/le-tag.js +1 -1
- package/dist/collection/components/le-text/le-text.js +7 -7
- package/dist/collection/components/le-text/le-text.js.map +1 -1
- package/dist/collection/components/le-turntable/le-turntable.js +1 -1
- package/dist/collection/dist/components/assets/custom-elements.json +5288 -3895
- package/dist/collection/dist/components/assets/icons/side-panel.json +61 -0
- package/dist/collection/dist/themes/dark.css +1 -0
- package/dist/collection/dist/themes/default.css +1 -0
- package/dist/collection/dist/themes/gradient.css +1 -0
- package/dist/collection/dist/themes/minimal.css +1 -0
- package/dist/collection/dist/themes/warm.css +1 -0
- package/dist/components/assets/custom-elements.json +5288 -3895
- package/dist/components/assets/icons/side-panel.json +61 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/le-box.js +3 -3
- package/dist/components/le-box.js.map +1 -1
- package/dist/components/le-button2.js +8 -8
- package/dist/components/le-button2.js.map +1 -1
- package/dist/components/le-card.js +3 -3
- package/dist/components/le-card.js.map +1 -1
- package/dist/components/le-code-input.d.ts +11 -0
- package/dist/components/le-code-input.js +265 -0
- package/dist/components/le-code-input.js.map +1 -0
- package/dist/components/le-collapse2.js +1 -1
- package/dist/components/le-combobox.js +1 -1
- package/dist/components/le-current-heading.js +1 -1
- package/dist/components/le-dropdown-base2.js +1 -1
- package/dist/components/le-header-placeholder.js +1 -1
- package/dist/components/le-header.js +2 -2
- package/dist/components/le-icon2.js +1 -1
- package/dist/components/le-multiselect.js +3 -3
- package/dist/components/le-navigation.js +1 -1
- package/dist/components/le-navigation.js.map +1 -1
- package/dist/components/le-number-input.js +1 -1
- package/dist/components/le-popover2.js +3 -3
- package/dist/components/le-round-progress.js +1 -1
- package/dist/components/le-scroll-progress.js +1 -1
- package/dist/components/le-segmented-control.js +1 -1
- package/dist/components/le-side-panel-toggle.d.ts +11 -0
- package/dist/components/le-side-panel-toggle.js +9 -0
- package/dist/components/le-side-panel-toggle.js.map +1 -0
- package/dist/components/le-side-panel-toggle2.js +311 -0
- package/dist/components/le-side-panel-toggle2.js.map +1 -0
- package/dist/components/le-side-panel.d.ts +11 -0
- package/dist/components/le-side-panel.js +660 -0
- package/dist/components/le-side-panel.js.map +1 -0
- package/dist/components/le-stack.js +1 -1
- package/dist/components/le-tab-bar.js +1 -1
- package/dist/components/le-tab-panel.js +2 -2
- package/dist/components/le-tab2.js +1 -1
- package/dist/components/le-tabs.js +2 -2
- package/dist/components/le-tag2.js +1 -1
- package/dist/components/le-text.js +6 -6
- package/dist/components/le-text.js.map +1 -1
- package/dist/components/le-turntable.js +1 -1
- package/dist/docs.json +4829 -3121
- package/dist/esm/{index-C-Chwj1b.js → index-DFTm5BqT.js} +7 -4
- package/dist/esm/index-DFTm5BqT.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/le-bar_16.entry.js +21 -21
- package/dist/esm/le-box.entry.js +5 -5
- package/dist/esm/le-box.entry.js.map +1 -1
- package/dist/esm/le-card.entry.js +5 -5
- package/dist/esm/le-card.entry.js.map +1 -1
- package/dist/esm/le-code-input.entry.js +179 -0
- package/dist/esm/le-code-input.entry.js.map +1 -0
- package/dist/esm/le-combobox.entry.js +2 -2
- package/dist/esm/le-header-placeholder.entry.js +2 -2
- package/dist/esm/le-kit.js +3 -3
- package/dist/esm/le-multiselect.entry.js +4 -4
- package/dist/esm/le-number-input.entry.js +3 -3
- package/dist/esm/le-round-progress.entry.js +2 -2
- package/dist/esm/le-segmented-control.entry.js +2 -2
- package/dist/esm/le-side-panel-toggle.entry.js +227 -0
- package/dist/esm/le-side-panel-toggle.entry.js.map +1 -0
- package/dist/esm/le-side-panel.entry.js +544 -0
- package/dist/esm/le-side-panel.entry.js.map +1 -0
- package/dist/esm/le-stack.entry.js +3 -3
- package/dist/esm/le-tab-bar.entry.js +2 -2
- package/dist/esm/le-tab-panel.entry.js +3 -3
- package/dist/esm/le-tab.entry.js +3 -3
- package/dist/esm/le-tabs.entry.js +4 -4
- package/dist/esm/le-tag.entry.js +2 -2
- package/dist/esm/le-text.entry.js +8 -8
- package/dist/esm/le-text.entry.js.map +1 -1
- package/dist/esm/le-turntable.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-B3alHV04.js → utils-DZYCZLrF.js} +3 -3
- package/dist/esm/{utils-B3alHV04.js.map → utils-DZYCZLrF.js.map} +1 -1
- package/dist/le-kit/dist/components/assets/custom-elements.json +5288 -3895
- package/dist/le-kit/dist/components/assets/icons/side-panel.json +61 -0
- package/dist/le-kit/dist/themes/dark.css +1 -0
- package/dist/le-kit/dist/themes/default.css +1 -0
- package/dist/le-kit/dist/themes/gradient.css +1 -0
- package/dist/le-kit/dist/themes/minimal.css +1 -0
- package/dist/le-kit/dist/themes/warm.css +1 -0
- package/dist/le-kit/index.esm.js +1 -1
- package/dist/le-kit/le-kit.css +1 -1
- package/dist/le-kit/le-kit.esm.js +1 -1
- package/dist/le-kit/p-221d379a.entry.js +2 -0
- package/dist/le-kit/p-221d379a.entry.js.map +1 -0
- package/dist/le-kit/p-24112ca3.entry.js +2 -0
- package/dist/le-kit/{p-e1846fc2.entry.js.map → p-24112ca3.entry.js.map} +1 -1
- package/dist/le-kit/p-2c6d080d.entry.js +2 -0
- package/dist/le-kit/{p-3ceede4e.entry.js.map → p-2c6d080d.entry.js.map} +1 -1
- package/dist/le-kit/{p-ea71f22c.entry.js → p-46276e77.entry.js} +2 -2
- package/dist/le-kit/p-46276e77.entry.js.map +1 -0
- package/dist/le-kit/p-516c8531.entry.js +2 -0
- package/dist/le-kit/p-6b69f9a2.entry.js +2 -0
- package/dist/le-kit/{p-f8034500.entry.js.map → p-6b69f9a2.entry.js.map} +1 -1
- package/dist/le-kit/p-6d14306f.entry.js +2 -0
- package/dist/le-kit/{p-06d2d79c.entry.js.map → p-6d14306f.entry.js.map} +1 -1
- package/dist/le-kit/{p-2230ecd7.entry.js → p-7bcdf2d4.entry.js} +2 -2
- package/dist/le-kit/{p-3d22aeb2.entry.js → p-7cf1e23c.entry.js} +2 -2
- package/dist/le-kit/{p-e6b2cf9a.entry.js → p-85f2fd4d.entry.js} +2 -2
- package/dist/le-kit/p-98242429.entry.js +2 -0
- package/dist/le-kit/p-98242429.entry.js.map +1 -0
- package/dist/le-kit/{p-DFr88Szp.js → p-D8RYDS9p.js} +2 -2
- package/dist/le-kit/{p-DFr88Szp.js.map → p-D8RYDS9p.js.map} +1 -1
- package/dist/le-kit/{p-C-Chwj1b.js → p-DFTm5BqT.js} +3 -3
- package/dist/le-kit/p-DFTm5BqT.js.map +1 -0
- package/dist/le-kit/{p-68d836a3.entry.js → p-ab6c1def.entry.js} +2 -2
- package/dist/le-kit/{p-3d873cdb.entry.js → p-ae4ead64.entry.js} +2 -2
- package/dist/le-kit/{p-d161946c.entry.js → p-b05d4511.entry.js} +2 -2
- package/dist/le-kit/{p-923828fe.entry.js → p-b6ac02ff.entry.js} +2 -2
- package/dist/le-kit/p-c24769e2.entry.js +2 -0
- package/dist/le-kit/{p-33c2168a.entry.js.map → p-c24769e2.entry.js.map} +1 -1
- package/dist/le-kit/{p-be2a7276.entry.js → p-dc0445ad.entry.js} +2 -2
- package/dist/le-kit/p-eb5286f2.entry.js +2 -0
- package/dist/le-kit/p-eb5286f2.entry.js.map +1 -0
- package/dist/le-kit/p-eb710c8e.entry.js +2 -0
- package/dist/le-kit/p-eb710c8e.entry.js.map +1 -0
- package/dist/le-kit/{p-5d72c894.entry.js → p-f78b1ee6.entry.js} +2 -2
- package/dist/le-kit/p-f78b1ee6.entry.js.map +1 -0
- package/dist/themes/dark.css +1 -0
- package/dist/themes/default.css +1 -0
- package/dist/themes/gradient.css +1 -0
- package/dist/themes/minimal.css +1 -0
- package/dist/themes/warm.css +1 -0
- package/dist/types/components/le-code-input/le-code-input.d.ts +102 -0
- package/dist/types/components/le-side-panel/le-side-panel.d.ts +100 -0
- package/dist/types/components/le-side-panel-toggle/le-side-panel-toggle.d.ts +48 -0
- package/dist/types/components.d.ts +519 -2
- package/package.json +7 -5
- package/dist/cjs/index-BPF04Jvb.js.map +0 -1
- package/dist/esm/index-C-Chwj1b.js.map +0 -1
- package/dist/le-kit/p-05ccab91.entry.js +0 -2
- package/dist/le-kit/p-05ccab91.entry.js.map +0 -1
- package/dist/le-kit/p-06d2d79c.entry.js +0 -2
- package/dist/le-kit/p-33c2168a.entry.js +0 -2
- package/dist/le-kit/p-3ceede4e.entry.js +0 -2
- package/dist/le-kit/p-4a45ff67.entry.js +0 -2
- package/dist/le-kit/p-5d72c894.entry.js.map +0 -1
- package/dist/le-kit/p-C-Chwj1b.js.map +0 -1
- package/dist/le-kit/p-e1846fc2.entry.js +0 -2
- package/dist/le-kit/p-ea71f22c.entry.js.map +0 -1
- package/dist/le-kit/p-f8034500.entry.js +0 -2
- /package/dist/collection/components/le-box/{le-box.default.css → le-box.css} +0 -0
- /package/dist/collection/components/le-card/{le-card.default.css → le-card.css} +0 -0
- /package/dist/collection/components/le-text/{le-text.default.css → le-text.css} +0 -0
- /package/dist/le-kit/{p-4a45ff67.entry.js.map → p-516c8531.entry.js.map} +0 -0
- /package/dist/le-kit/{p-2230ecd7.entry.js.map → p-7bcdf2d4.entry.js.map} +0 -0
- /package/dist/le-kit/{p-3d22aeb2.entry.js.map → p-7cf1e23c.entry.js.map} +0 -0
- /package/dist/le-kit/{p-e6b2cf9a.entry.js.map → p-85f2fd4d.entry.js.map} +0 -0
- /package/dist/le-kit/{p-68d836a3.entry.js.map → p-ab6c1def.entry.js.map} +0 -0
- /package/dist/le-kit/{p-3d873cdb.entry.js.map → p-ae4ead64.entry.js.map} +0 -0
- /package/dist/le-kit/{p-d161946c.entry.js.map → p-b05d4511.entry.js.map} +0 -0
- /package/dist/le-kit/{p-923828fe.entry.js.map → p-b6ac02ff.entry.js.map} +0 -0
- /package/dist/le-kit/{p-be2a7276.entry.js.map → p-dc0445ad.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BzadfLTc.js');
|
|
4
4
|
|
|
5
5
|
const leTagCss = () => `:host{display:inline-flex;--le-tag-font-size:var(--le-font-size-sm);--le-tag-font-weight:var(--le-font-weight-medium);--le-tag-color:var(--le-color-text);--le-tag-bg:var(--le-color-surface-alt);--le-tag-dismiss-size:1.75em}:host([disabled]){opacity:0.5;pointer-events:none}.tag{display:inline-flex;align-items:center;gap:var(--le-tag-gap, 0.375rem);padding:var(--le-tag-padding-y, 0.25rem) var(--le-tag-padding-x, 0.625rem);font-size:var(--le-tag-font-size);font-weight:var(--le-tag-font-weight);line-height:1.4;color:var(--le-tag-color, var(--le-color-text, #1f2937));background:var(--le-tag-bg, var(--le-color-surface-alt, #f3f4f6));border:1px solid var(--le-tag-border-color, transparent);border-radius:var(--le-tag-border-radius, 9999px);white-space:nowrap;user-select:none}:host([size='small']) .tag{--le-tag-font-size:0.75rem;--le-tag-padding-x:0.5rem;--le-tag-padding-y:0.125rem;--le-tag-gap:0.25rem;--le-tag-dismiss-size:1.25em}:host([size='large']) .tag{--le-tag-font-size:1rem;--le-tag-padding-x:0.875rem;--le-tag-padding-y:0.375rem;--le-tag-gap:0.5rem;--le-tag-dismiss-size:2em}:host([variant='primary']) .tag{--le-tag-bg:var(--le-color-primary, #dbeafe);--le-tag-color:var(--le-color-primary-contrast, #1e40af)}:host([variant='success']) .tag{--le-tag-bg:var(--le-color-success, #dcfce7);--le-tag-color:var(--le-color-success-contrast, #166534)}:host([variant='warning']) .tag{--le-tag-bg:var(--le-color-warning-light, #fef3c7);--le-tag-color:var(--le-color-warning-contrast, #92400e)}:host([variant='danger']) .tag{--le-tag-bg:var(--le-color-danger, #fee2e2);--le-tag-color:var(--le-color-danger-contrast, #991b1b)}.tag-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.tag-icon img{width:1em;height:1em;object-fit:contain}.tag-label{display:inline-block}.tag-dismiss{display:inline-flex;align-items:center;justify-content:center;width:var(--le-tag-dismiss-size);height:var(--le-tag-dismiss-size);padding:0;margin-block:calc(var(--le-tag-dismiss-size) * -1);margin-right:calc(var(--le-tag-dismiss-size) / 3 * -1);border:none;background:transparent;color:currentColor;opacity:0.6;cursor:pointer;border-radius:50%;transition:opacity 0.15s ease, background-color 0.15s ease}.tag-dismiss:hover{opacity:1;background:rgba(0, 0, 0, 0.1)}.tag-dismiss:focus-visible{outline:2px solid var(--le-color-primary, #3b82f6);outline-offset:1px}.tag-dismiss svg{width:0.75em;height:0.75em}.tag-dismiss:disabled{cursor:not-allowed}`;
|
|
6
6
|
|
|
@@ -59,7 +59,7 @@ const LeTag = class {
|
|
|
59
59
|
return index.h("span", { class: "tag-icon" }, this.icon);
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (index.h("le-component", { key: '
|
|
62
|
+
return (index.h("le-component", { key: '8c76ae38877bbb3ba35588adadee0cf61b76ffed', component: "le-tag" }, index.h("span", { key: 'a2dd1709505e58baada6fb9b40312e207435e8a6', class: "tag" }, this.renderIcon(), index.h("span", { key: '99bac5f6df170af17de5550b9f0489538e9760bc', class: "tag-label" }, index.h("le-slot", { key: '41740e400b168986980e8ff93187af9828cca5f9', name: "", tag: "span", type: "text" }, index.h("slot", { key: 'd823f3dc74c1e49b89fe5fff2df9d7e244d7d591' }, this.label))), this.dismissible && (index.h("button", { key: '96a058e3cab2d7fb091e1e6ec77404f8cf80358c', type: "button", class: "tag-dismiss", onClick: this.handleDismiss, disabled: this.disabled, "aria-label": "Remove" }, index.h("svg", { key: 'bfbb3f7c73aef6f06f5c45e98d4047d2aa629f2c', viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { key: '16a68b9458ccd806415d5ef8bda7fa1513cdf46d', d: "M4 4l8 8M12 4l-8 8" })))))));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
LeTag.style = leTagCss();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var utils = require('./utils-
|
|
3
|
+
var index = require('./index-BzadfLTc.js');
|
|
4
|
+
var utils = require('./utils-Dxx9WhWK.js');
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const leTextCss = () => `:host{display:block}:host([hidden]){display:none}.le-text{margin:0;color:var(--le-text-color, var(--le-color-text));font-family:var(--le-font-family);line-height:var(--le-text-line-height, 1.5)}.variant-p{font-size:var(--le-font-size-base, 1rem);font-weight:var(--le-font-weight-normal, 400);color:var(--le-color-text)}.variant-h1{font-size:var(--le-font-size-4xl, 2.5rem);font-weight:var(--le-font-weight-bold, 700);line-height:1.2;color:var(--le-color-text);letter-spacing:-0.02em}.variant-h2{font-size:var(--le-font-size-3xl, 2rem);font-weight:var(--le-font-weight-bold, 700);line-height:1.25;color:var(--le-color-text);letter-spacing:-0.01em}.variant-h3{font-size:var(--le-font-size-2xl, 1.5rem);font-weight:var(--le-font-weight-semibold, 600);line-height:1.3;color:var(--le-color-text)}.variant-h4{font-size:var(--le-font-size-xl, 1.25rem);font-weight:var(--le-font-weight-semibold, 600);line-height:1.35;color:var(--le-color-text)}.variant-h5{font-size:var(--le-font-size-lg, 1.125rem);font-weight:var(--le-font-weight-medium, 500);line-height:1.4;color:var(--le-color-text)}.variant-h6{font-size:var(--le-font-size-base, 1rem);font-weight:var(--le-font-weight-medium, 500);line-height:1.45;color:var(--le-color-text);text-transform:uppercase;letter-spacing:0.05em}.variant-code{font-family:var(--le-font-family-mono, 'SF Mono', 'Fira Code', 'Consolas', monospace);font-size:var(--le-font-size-sm, 0.875rem);background:var(--le-color-surface-alt, #f5f5f5);padding:var(--le-space-md);border-radius:var(--le-radius-md);overflow-x:auto;white-space:pre-wrap;color:var(--le-color-text)}.variant-quote{font-size:var(--le-font-size-lg, 1.125rem);font-style:italic;color:var(--le-color-text-secondary);border-left:4px solid var(--le-color-primary);padding-left:var(--le-space-lg);margin-left:0;margin-right:0}.variant-label{font-size:var(--le-font-size-sm, 0.875rem);font-weight:var(--le-font-weight-medium, 500);color:var(--le-color-text-secondary);text-transform:uppercase;letter-spacing:0.05em}.variant-small{font-size:var(--le-font-size-sm, 0.875rem);color:var(--le-color-text-secondary)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.truncate.max-lines-2,.truncate.max-lines-3,.truncate.max-lines-4,.truncate.max-lines-5{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical}.truncate.max-lines-2{-webkit-line-clamp:2;line-clamp:2}.truncate.max-lines-3{-webkit-line-clamp:3;line-clamp:3}.truncate.max-lines-4{-webkit-line-clamp:4;line-clamp:4}.truncate.max-lines-5{-webkit-line-clamp:5;line-clamp:5}:host([align="center"]) .le-text{text-align:center}:host([align="right"]) .le-text{text-align:right}:host([align="justify"]) .le-text{text-align:justify}.le-text a{color:var(--le-color-primary);text-decoration:underline}.le-text a:hover{color:var(--le-color-primary-dark)}.le-text strong,.le-text b{font-weight:var(--le-font-weight-bold, 700)}.le-text em,.le-text i{font-style:italic}.le-text u{text-decoration:underline}.le-text s,.le-text strike{text-decoration:line-through}`;
|
|
7
7
|
|
|
8
8
|
const LeText = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -65,7 +65,7 @@ const LeText = class {
|
|
|
65
65
|
slotRef;
|
|
66
66
|
disconnectModeObserver;
|
|
67
67
|
connectedCallback() {
|
|
68
|
-
this.disconnectModeObserver = utils.observeModeChanges(this.el,
|
|
68
|
+
this.disconnectModeObserver = utils.observeModeChanges(this.el, mode => {
|
|
69
69
|
const wasAdmin = this.adminMode;
|
|
70
70
|
this.adminMode = mode === 'admin';
|
|
71
71
|
if (this.adminMode && !wasAdmin) {
|
|
@@ -284,7 +284,7 @@ const LeText = class {
|
|
|
284
284
|
* Render the formatting toolbar
|
|
285
285
|
*/
|
|
286
286
|
renderToolbar() {
|
|
287
|
-
return (index.h("div", { class: "le-text-toolbar" }, index.h("select", { class: "le-text-toolbar-select", onChange: this.changeVariant, onMouseDown:
|
|
287
|
+
return (index.h("div", { class: "le-text-toolbar" }, index.h("select", { class: "le-text-toolbar-select", onChange: this.changeVariant, onMouseDown: e => e.preventDefault() }, index.h("option", { value: "p", selected: this.variant === 'p' }, "Paragraph"), index.h("option", { value: "h1", selected: this.variant === 'h1' }, "Heading 1"), index.h("option", { value: "h2", selected: this.variant === 'h2' }, "Heading 2"), index.h("option", { value: "h3", selected: this.variant === 'h3' }, "Heading 3"), index.h("option", { value: "h4", selected: this.variant === 'h4' }, "Heading 4"), index.h("option", { value: "h5", selected: this.variant === 'h5' }, "Heading 5"), index.h("option", { value: "h6", selected: this.variant === 'h6' }, "Heading 6"), index.h("option", { value: "quote", selected: this.variant === 'quote' }, "Quote"), index.h("option", { value: "code", selected: this.variant === 'code' }, "Code"), index.h("option", { value: "label", selected: this.variant === 'label' }, "Label"), index.h("option", { value: "small", selected: this.variant === 'small' }, "Small")), index.h("div", { class: "le-text-toolbar-divider" }), index.h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isBold }, onMouseDown: this.toggleBold, title: "Bold (Ctrl+B)" }, index.h("strong", null, "B")), index.h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isItalic }, onMouseDown: this.toggleItalic, title: "Italic (Ctrl+I)" }, index.h("em", null, "I")), index.h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isUnderline }, onMouseDown: this.toggleUnderline, title: "Underline (Ctrl+U)" }, index.h("span", { style: { textDecoration: 'underline' } }, "U")), index.h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isStrikethrough }, onMouseDown: this.toggleStrikethrough, title: "Strikethrough" }, index.h("span", { style: { textDecoration: 'line-through' } }, "S")), index.h("div", { class: "le-text-toolbar-divider" }), index.h("button", { type: "button", class: { 'le-text-toolbar-btn': true, 'active': this.selectionState.isLink }, onMouseDown: this.toggleLink, title: this.selectionState.isLink ? 'Remove link' : 'Add link' }, "\uD83D\uDD17")));
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* Get the semantic tag for the current variant
|
|
@@ -320,16 +320,16 @@ const LeText = class {
|
|
|
320
320
|
};
|
|
321
321
|
// Admin mode - show rich text editor
|
|
322
322
|
if (this.adminMode) {
|
|
323
|
-
return (index.h(index.Host, { class: "admin-mode" }, index.h("le-component", { component: "le-text" }, index.h("div", { class: "le-text-editor-wrapper" }, this.isFocused && this.renderToolbar(), index.h(Tag, { class: textClass, part: "text", style: textStyle }, index.h("div", { ref:
|
|
323
|
+
return (index.h(index.Host, { class: "admin-mode" }, index.h("le-component", { component: "le-text" }, index.h("div", { class: "le-text-editor-wrapper" }, this.isFocused && this.renderToolbar(), index.h(Tag, { class: textClass, part: "text", style: textStyle }, index.h("div", { ref: el => (this.editorRef = el), class: "le-text-editor", contentEditable: true, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleSelectionChange, onMouseUp: this.handleSelectionChange, innerHTML: this.content })), index.h("div", { class: "hidden-slot" }, index.h("slot", { ref: el => (this.slotRef = el), onSlotchange: () => this.readSlottedContent() }))))));
|
|
324
324
|
}
|
|
325
325
|
// Default mode - render semantic element with slotted content
|
|
326
|
-
return (index.h(index.Host, null, index.h(Tag, { class: textClass, part: "text", style: textStyle }, index.h("slot", { ref:
|
|
326
|
+
return (index.h(index.Host, null, index.h(Tag, { class: textClass, part: "text", style: textStyle }, index.h("slot", { ref: el => (this.slotRef = el) }))));
|
|
327
327
|
}
|
|
328
328
|
static get watchers() { return {
|
|
329
329
|
"variant": ["onVariantChange"]
|
|
330
330
|
}; }
|
|
331
331
|
};
|
|
332
|
-
LeText.style =
|
|
332
|
+
LeText.style = leTextCss();
|
|
333
333
|
|
|
334
334
|
exports.le_text = LeText;
|
|
335
335
|
//# sourceMappingURL=le-text.entry.cjs.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BzadfLTc.js');
|
|
4
4
|
|
|
5
5
|
const leTurntableCss = () => `:host{display:block;cursor:grab}div.turntable{width:100%;height:100%;padding:1px}`;
|
|
6
6
|
|
|
@@ -127,7 +127,7 @@ const LeTurntable = class {
|
|
|
127
127
|
this.el.style.transform = `rotate(${angle}deg)`;
|
|
128
128
|
}
|
|
129
129
|
render() {
|
|
130
|
-
return (index.h("div", { key: '
|
|
130
|
+
return (index.h("div", { key: '50d1e3a01db9e77a3c391e04af74b70f39c23f8f', class: "turntable", onMouseDown: this.handleMouseDown.bind(this) }, index.h("slot", { key: 'a4c5d3cc2a99edf860ff7aa5318fa76443cdd2fd' })));
|
|
131
131
|
}
|
|
132
132
|
static get watchers() { return {
|
|
133
133
|
"value": ["updateValue"]
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BzadfLTc.js');
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["le-bar_16.cjs",[[769,"le-navigation",{"items":[1],"orientation":[513],"wrap":[516],"overflowMode":[513,"overflow-mode"],"minVisibleItemsForMore":[2,"min-visible-items-for-more"],"align":[513],"activeUrl":[1,"active-url"],"searchable":[4],"searchPlaceholder":[1,"search-placeholder"],"emptyText":[1,"empty-text"],"submenuSearchable":[4,"submenu-searchable"],"searchQuery":[32],"openState":[32],"overflowIds":[32],"hamburgerActive":[32],"submenuQueries":[32],"overflowPopoverOpen":[32]},null,{"items":["handleLayoutInputsChange"],"orientation":["handleLayoutInputsChange"],"wrap":["handleLayoutInputsChange"],"overflowMode":["handleLayoutInputsChange"]}],[769,"le-header",{"isStatic":[516,"static"],"sticky":[516],"fixed":[516],"revealOnScroll":[513,"reveal-on-scroll"],"shrinkOffset":[513,"shrink-offset"],"expandOnHover":[516,"expand-on-hover"],"revealed":[32],"shrunk":[32],"placeholderHeight":[32],"hoverActive":[32]},[[9,"scroll","onWindowScroll"],[9,"resize","onWindowResize"]],{"revealOnScroll":["onBehaviorPropsChange"],"shrinkOffset":["onBehaviorPropsChange"],"fixed":["onBehaviorPropsChange"],"sticky":["onBehaviorPropsChange"],"isStatic":["onBehaviorPropsChange"]}],[769,"le-current-heading",{"selector":[1],"activeText":[32]},[[9,"scroll","onScroll"],[9,"resize","onResize"]],{"selector":["onSelectorChange"]}],[769,"le-scroll-progress",{"trackScrollProgress":[513,"track-scroll-progress"],"progress":[32]},[[9,"scroll","onScroll"],[9,"resize","onResize"]],{"trackScrollProgress":["onTrackChange"]}],[769,"le-collapse",{"closed":[1540],"scrollDown":[516,"scroll-down"],"noFading":[516,"no-fading"],"collapseOnHeaderShrink":[516,"collapse-on-header-shrink"],"headerShrunk":[32]},[[8,"leHeaderShrinkChange","handleHeaderShrink"]],{"open":["onOpenChange"],"headerShrunk":["onDrivenStateChange"]}],[769,"le-bar",{"overflow":[513],"alignItems":[513,"align-items"],"arrows":[4],"disablePopover":[4,"disable-popover"],"minVisibleItems":[2,"min-visible-items"],"showAllMenu":[8,"show-all-menu"],"popoverOpen":[32],"hamburgerActive":[32],"overflowingIds":[32],"canScrollStart":[32],"canScrollEnd":[32],"allMenuOpen":[32],"containerHeight":[32],"recalculate":[64]},[[0,"slotchange","handleSlotChange"]],{"overflow":["handleOverflowChange"]}],[769,"le-icon",{"name":[1],"size":[2],"iconData":[32],"visible":[32]},null,{"name":["loadIconData"]}],[769,"le-dropdown-base",{"options":[16],"value":[8],"multiple":[4],"open":[1540],"disabled":[516],"filterFn":[16],"filterQuery":[1,"filter-query"],"emptyText":[1,"empty-text"],"showCheckboxes":[4,"show-checkboxes"],"maxHeight":[1,"max-height"],"width":[1],"fullWidth":[4,"full-width"],"closeOnClickOutside":[4,"close-on-click-outside"],"focusedIndex":[32],"filteredOptions":[32],"show":[64],"hide":[64],"toggle":[64]},null,{"options":["handleOptionsChange"],"filterQuery":["handleOptionsChange"]}],[769,"le-button",{"mode":[1537],"variant":[1],"color":[1],"size":[1],"selected":[4],"fullWidth":[516,"full-width"],"iconOnly":[1,"icon-only"],"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"disabled":[4],"type":[1],"href":[1],"target":[1],"align":[1]}],[769,"le-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"externalId":[1,"external-id"]}],[769,"le-component",{"component":[1],"displayName":[1,"display-name"],"hostClass":[1,"host-class"],"hostStyle":[16],"adminMode":[32],"componentMeta":[32],"propertyValues":[32]}],[769,"le-popup",{"mode":[1537],"open":[1540],"type":[1],"popupTitle":[1,"popup-title"],"message":[1],"modal":[4],"position":[1],"confirmText":[1,"confirm-text"],"cancelText":[1,"cancel-text"],"placeholder":[1],"defaultValue":[1,"default-value"],"closeOnBackdrop":[4,"close-on-backdrop"],"inputValue":[32],"show":[64],"hide":[64]}],[769,"le-select",{"options":[1],"value":[1032],"placeholder":[1],"disabled":[516],"required":[4],"name":[1],"fullWidth":[4,"full-width"],"size":[513],"variant":[513],"searchable":[4],"emptyText":[1,"empty-text"],"open":[1540],"selectedOption":[32],"searchQuery":[32],"showDropdown":[64],"hideDropdown":[64]},null,{"value":["handleValueChange"],"options":["handleOptionsChange"]}],[769,"le-slot",{"type":[1],"name":[1],"label":[1],"description":[1],"allowedComponents":[1,"allowed-components"],"multiple":[4],"required":[4],"placeholder":[1],"tag":[1],"slotStyle":[1,"slot-style"],"adminMode":[32],"textValue":[32],"isValidHtml":[32],"availableComponents":[32],"pickerOpen":[32]}],[769,"le-string-input",{"inputRef":[16],"mode":[1537],"value":[1537],"name":[1],"type":[1],"label":[1],"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"placeholder":[1],"hideDescription":[4,"hide-description"],"disabled":[4],"readonly":[4],"externalId":[1,"external-id"]}],[769,"le-popover",{"mode":[1537],"open":[1540],"position":[1],"align":[1],"popoverTitle":[1,"popover-title"],"showClose":[4,"show-close"],"closeOnClickOutside":[4,"close-on-click-outside"],"closeOnEscape":[4,"close-on-escape"],"offset":[2],"width":[1],"minWidth":[1,"min-width"],"maxWidth":[1,"max-width"],"triggerFullWidth":[4,"trigger-full-width"],"isPositioned":[32],"updatePosition":[64],"show":[64],"hide":[64],"toggle":[64]}]]],["le-multiselect.cjs",[[769,"le-multiselect",{"options":[1],"value":[1040],"placeholder":[1],"disabled":[516],"required":[4],"name":[1],"fullWidth":[516,"full-width"],"size":[513],"maxSelections":[2,"max-selections"],"showSelectAll":[1032,"show-select-all"],"searchable":[4],"emptyText":[1,"empty-text"],"open":[1540],"selectAllLabel":[32],"deselectAllLabel":[32],"selectedOptions":[32],"searchQuery":[32],"showDropdown":[64],"hideDropdown":[64],"clearSelection":[64]},null,{"value":["handleValueChange"],"options":["handleOptionsChange"],"showSelectAll":["handleShowSelectAllChange"]}]]],["le-segmented-control.cjs",[[769,"le-segmented-control",{"options":[16],"value":[1032],"size":[1],"overflow":[1],"fullWidth":[4,"full-width"],"disabled":[4],"segmentConfigs":[32],"focusedIndex":[32],"isDeclarativeMode":[32]},[[0,"slotchange","handleSlotChange"]],{"options":["tabsChanged"]}]]],["le-tab-bar.cjs",[[769,"le-tab-bar",{"tabs":[16],"selected":[1032],"fullWidth":[4,"full-width"],"showLabels":[4,"show-labels"],"position":[1],"size":[1],"bordered":[4],"tabConfigs":[32],"isDeclarativeMode":[32],"focusedIndex":[32]},[[0,"slotchange","handleSlotChange"]],{"selected":["selectedChanged"],"tabs":["tabsChanged"]}]]],["le-tabs.cjs",[[769,"le-tabs",{"tabs":[16],"selected":[1032],"orientation":[1],"position":[1],"variant":[1],"fullWidth":[4,"full-width"],"size":[1],"wrap":[4],"overflow":[1],"tabConfigs":[32],"focusedIndex":[32],"isDeclarativeMode":[32]},[[0,"slotchange","handleSlotChange"]],{"selected":["selectedChanged"],"tabs":["tabsChanged"]}]]],["le-box.cjs",[[769,"le-box",{"grow":[2],"shrink":[2],"basis":[1],"width":[1],"height":[1],"minWidth":[1,"min-width"],"maxWidth":[1,"max-width"],"minHeight":[1,"min-height"],"maxHeight":[1,"max-height"],"background":[1],"borderRadius":[1,"border-radius"],"border":[1],"alignSelf":[1,"align-self"],"alignContent":[1,"align-content"],"justifyContent":[1,"justify-content"],"padding":[1],"order":[2],"displayFlex":[4,"display-flex"],"innerDirection":[1,"inner-direction"],"innerGap":[1,"inner-gap"]}]]],["le-card.cjs",[[769,"le-card",{"variant":[1],"interactive":[4]}]]],["le-combobox.cjs",[[769,"le-combobox",{"options":[1],"value":[1032],"placeholder":[1],"disabled":[516],"required":[4],"name":[1],"fullWidth":[516,"full-width"],"size":[513],"allowCustom":[4,"allow-custom"],"minSearchLength":[2,"min-search-length"],"emptyText":[1,"empty-text"],"open":[1540],"inputValue":[32],"selectedOption":[32],"showDropdown":[64],"hideDropdown":[64],"focusInput":[64]},[[8,"click","handleWindowClick"]],{"value":["handleValueChange"],"options":["handleOptionsChange"]}]]],["le-number-input.cjs",[[769,"le-number-input",{"value":[1538],"name":[1],"label":[1],"placeholder":[1],"min":[2],"max":[2],"step":[2],"required":[4],"disabled":[4],"readonly":[4],"iconStart":[1,"icon-start"],"showSpinners":[4,"show-spinners"],"externalId":[1,"external-id"],"isValid":[32],"validationMessage":[32]},null,{"value":["valueChanged"]}]]],["le-stack.cjs",[[769,"le-stack",{"direction":[1],"gap":[1],"align":[1],"justify":[1],"wrap":[4],"alignContent":[1,"align-content"],"reverse":[4],"maxItems":[2,"max-items"],"fullWidth":[4,"full-width"],"fullHeight":[4,"full-height"],"padding":[1]}]]],["le-tab-panel.cjs",[[769,"le-tab-panel",{"label":[1],"value":[1],"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"disabled":[4],"lazy":[4],"active":[32],"hasBeenActive":[32],"getValue":[64],"getTabConfig":[64],"setActive":[64]},null,{"active":["activeChanged"]}]]],["le-text.cjs",[[769,"le-text",{"variant":[1537],"align":[513],"color":[1],"truncate":[4],"maxLines":[2,"max-lines"],"adminMode":[32],"content":[32],"isFocused":[32],"selectionState":[32]},null,{"variant":["onVariantChange"]}]]],["le-header-placeholder.cjs",[[256,"le-header-placeholder"]]],["le-round-progress.cjs",[[769,"le-round-progress",{"value":[2],"padding":[2],"paths":[1],"params":[32]},null,{"value":["updateValue"],"padding":["updatePadding"],"paths":["updateProgressBackgrounds"]}]]],["le-turntable.cjs",[[769,"le-turntable",{"center":[1],"value":[2]},[[9,"mousemove","handleMouseMove"],[9,"mouseup","handleMouseUp"],[9,"resize","handleWindowResize"]],{"value":["updateValue"]}]]],["le-tag.cjs",[[769,"le-tag",{"label":[1],"mode":[1537],"icon":[1],"dismissible":[4],"disabled":[516],"size":[513],"variant":[513]}]]],["le-tab.cjs",[[769,"le-tab",{"mode":[1537],"label":[1],"value":[1],"variant":[1],"position":[1],"size":[1],"focusable":[4],"selected":[4],"fullWidth":[516,"full-width"],"icon":[1],"showLabel":[4,"show-label"],"iconStart":[1,"icon-start"],"iconEnd":[1,"icon-end"],"disabled":[4],"href":[1],"target":[1],"align":[1],"getTabConfig":[64]}]]]], options);
|
|
8
|
+
return index.bootstrapLazy(JSON.parse("[[\"le-bar_16.cjs\",[[769,\"le-navigation\",{\"items\":[1],\"orientation\":[513],\"wrap\":[516],\"overflowMode\":[513,\"overflow-mode\"],\"minVisibleItemsForMore\":[2,\"min-visible-items-for-more\"],\"align\":[513],\"activeUrl\":[1,\"active-url\"],\"searchable\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"emptyText\":[1,\"empty-text\"],\"submenuSearchable\":[4,\"submenu-searchable\"],\"searchQuery\":[32],\"openState\":[32],\"overflowIds\":[32],\"hamburgerActive\":[32],\"submenuQueries\":[32],\"overflowPopoverOpen\":[32]},null,{\"items\":[\"handleLayoutInputsChange\"],\"orientation\":[\"handleLayoutInputsChange\"],\"wrap\":[\"handleLayoutInputsChange\"],\"overflowMode\":[\"handleLayoutInputsChange\"]}],[769,\"le-header\",{\"isStatic\":[516,\"static\"],\"sticky\":[516],\"fixed\":[516],\"revealOnScroll\":[513,\"reveal-on-scroll\"],\"shrinkOffset\":[513,\"shrink-offset\"],\"expandOnHover\":[516,\"expand-on-hover\"],\"revealed\":[32],\"shrunk\":[32],\"placeholderHeight\":[32],\"hoverActive\":[32]},[[9,\"scroll\",\"onWindowScroll\"],[9,\"resize\",\"onWindowResize\"]],{\"revealOnScroll\":[\"onBehaviorPropsChange\"],\"shrinkOffset\":[\"onBehaviorPropsChange\"],\"fixed\":[\"onBehaviorPropsChange\"],\"sticky\":[\"onBehaviorPropsChange\"],\"isStatic\":[\"onBehaviorPropsChange\"]}],[769,\"le-current-heading\",{\"selector\":[1],\"activeText\":[32]},[[9,\"scroll\",\"onScroll\"],[9,\"resize\",\"onResize\"]],{\"selector\":[\"onSelectorChange\"]}],[769,\"le-scroll-progress\",{\"trackScrollProgress\":[513,\"track-scroll-progress\"],\"progress\":[32]},[[9,\"scroll\",\"onScroll\"],[9,\"resize\",\"onResize\"]],{\"trackScrollProgress\":[\"onTrackChange\"]}],[769,\"le-collapse\",{\"closed\":[1540],\"scrollDown\":[516,\"scroll-down\"],\"noFading\":[516,\"no-fading\"],\"collapseOnHeaderShrink\":[516,\"collapse-on-header-shrink\"],\"headerShrunk\":[32]},[[8,\"leHeaderShrinkChange\",\"handleHeaderShrink\"]],{\"open\":[\"onOpenChange\"],\"headerShrunk\":[\"onDrivenStateChange\"]}],[769,\"le-bar\",{\"overflow\":[513],\"alignItems\":[513,\"align-items\"],\"arrows\":[4],\"disablePopover\":[4,\"disable-popover\"],\"minVisibleItems\":[2,\"min-visible-items\"],\"showAllMenu\":[8,\"show-all-menu\"],\"popoverOpen\":[32],\"hamburgerActive\":[32],\"overflowingIds\":[32],\"canScrollStart\":[32],\"canScrollEnd\":[32],\"allMenuOpen\":[32],\"containerHeight\":[32],\"recalculate\":[64]},[[0,\"slotchange\",\"handleSlotChange\"]],{\"overflow\":[\"handleOverflowChange\"]}],[769,\"le-icon\",{\"name\":[1],\"size\":[2],\"iconData\":[32],\"visible\":[32]},null,{\"name\":[\"loadIconData\"]}],[769,\"le-dropdown-base\",{\"options\":[16],\"value\":[8],\"multiple\":[4],\"open\":[1540],\"disabled\":[516],\"filterFn\":[16],\"filterQuery\":[1,\"filter-query\"],\"emptyText\":[1,\"empty-text\"],\"showCheckboxes\":[4,\"show-checkboxes\"],\"maxHeight\":[1,\"max-height\"],\"width\":[1],\"fullWidth\":[4,\"full-width\"],\"closeOnClickOutside\":[4,\"close-on-click-outside\"],\"focusedIndex\":[32],\"filteredOptions\":[32],\"show\":[64],\"hide\":[64],\"toggle\":[64]},null,{\"options\":[\"handleOptionsChange\"],\"filterQuery\":[\"handleOptionsChange\"]}],[769,\"le-button\",{\"mode\":[1537],\"variant\":[1],\"color\":[1],\"size\":[1],\"selected\":[4],\"fullWidth\":[516,\"full-width\"],\"iconOnly\":[1,\"icon-only\"],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"disabled\":[4],\"type\":[1],\"href\":[1],\"target\":[1],\"align\":[1]}],[769,\"le-checkbox\",{\"checked\":[1540],\"disabled\":[4],\"name\":[1],\"value\":[1],\"externalId\":[1,\"external-id\"]}],[769,\"le-component\",{\"component\":[1],\"displayName\":[1,\"display-name\"],\"hostClass\":[1,\"host-class\"],\"hostStyle\":[16],\"adminMode\":[32],\"componentMeta\":[32],\"propertyValues\":[32]}],[769,\"le-popup\",{\"mode\":[1537],\"open\":[1540],\"type\":[1],\"popupTitle\":[1,\"popup-title\"],\"message\":[1],\"modal\":[4],\"position\":[1],\"confirmText\":[1,\"confirm-text\"],\"cancelText\":[1,\"cancel-text\"],\"placeholder\":[1],\"defaultValue\":[1,\"default-value\"],\"closeOnBackdrop\":[4,\"close-on-backdrop\"],\"inputValue\":[32],\"show\":[64],\"hide\":[64]}],[769,\"le-select\",{\"options\":[1],\"value\":[1032],\"placeholder\":[1],\"disabled\":[516],\"required\":[4],\"name\":[1],\"fullWidth\":[4,\"full-width\"],\"size\":[513],\"variant\":[513],\"searchable\":[4],\"emptyText\":[1,\"empty-text\"],\"open\":[1540],\"selectedOption\":[32],\"searchQuery\":[32],\"showDropdown\":[64],\"hideDropdown\":[64]},null,{\"value\":[\"handleValueChange\"],\"options\":[\"handleOptionsChange\"]}],[769,\"le-slot\",{\"type\":[1],\"name\":[1],\"label\":[1],\"description\":[1],\"allowedComponents\":[1,\"allowed-components\"],\"multiple\":[4],\"required\":[4],\"placeholder\":[1],\"tag\":[1],\"slotStyle\":[1,\"slot-style\"],\"adminMode\":[32],\"textValue\":[32],\"isValidHtml\":[32],\"availableComponents\":[32],\"pickerOpen\":[32]}],[769,\"le-string-input\",{\"inputRef\":[16],\"mode\":[1537],\"value\":[1537],\"name\":[1],\"type\":[1],\"label\":[1],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"placeholder\":[1],\"hideDescription\":[4,\"hide-description\"],\"disabled\":[4],\"readonly\":[4],\"externalId\":[1,\"external-id\"]}],[769,\"le-popover\",{\"mode\":[1537],\"open\":[1540],\"position\":[1],\"align\":[1],\"popoverTitle\":[1,\"popover-title\"],\"showClose\":[4,\"show-close\"],\"closeOnClickOutside\":[4,\"close-on-click-outside\"],\"closeOnEscape\":[4,\"close-on-escape\"],\"offset\":[2],\"width\":[1],\"minWidth\":[1,\"min-width\"],\"maxWidth\":[1,\"max-width\"],\"triggerFullWidth\":[4,\"trigger-full-width\"],\"isPositioned\":[32],\"updatePosition\":[64],\"show\":[64],\"hide\":[64],\"toggle\":[64]}]]],[\"le-multiselect.cjs\",[[769,\"le-multiselect\",{\"options\":[1],\"value\":[1040],\"placeholder\":[1],\"disabled\":[516],\"required\":[4],\"name\":[1],\"fullWidth\":[516,\"full-width\"],\"size\":[513],\"maxSelections\":[2,\"max-selections\"],\"showSelectAll\":[1032,\"show-select-all\"],\"searchable\":[4],\"emptyText\":[1,\"empty-text\"],\"open\":[1540],\"selectAllLabel\":[32],\"deselectAllLabel\":[32],\"selectedOptions\":[32],\"searchQuery\":[32],\"showDropdown\":[64],\"hideDropdown\":[64],\"clearSelection\":[64]},null,{\"value\":[\"handleValueChange\"],\"options\":[\"handleOptionsChange\"],\"showSelectAll\":[\"handleShowSelectAllChange\"]}]]],[\"le-segmented-control.cjs\",[[769,\"le-segmented-control\",{\"options\":[16],\"value\":[1032],\"size\":[1],\"overflow\":[1],\"fullWidth\":[4,\"full-width\"],\"disabled\":[4],\"segmentConfigs\":[32],\"focusedIndex\":[32],\"isDeclarativeMode\":[32]},[[0,\"slotchange\",\"handleSlotChange\"]],{\"options\":[\"tabsChanged\"]}]]],[\"le-side-panel.cjs\",[[769,\"le-side-panel\",{\"panelId\":[1,\"panel-id\"],\"side\":[1],\"collapseAt\":[1,\"collapse-at\"],\"narrowBehavior\":[1,\"narrow-behavior\"],\"open\":[1540],\"collapsed\":[1540],\"panelWidth\":[2,\"panel-width\"],\"minPanelWidth\":[2,\"min-panel-width\"],\"maxPanelWidth\":[2,\"max-panel-width\"],\"resizable\":[4],\"persistKey\":[1,\"persist-key\"],\"showCloseButton\":[4,\"show-close-button\"],\"autoShowOnWide\":[4,\"auto-show-on-wide\"],\"autoHideOnNarrow\":[4,\"auto-hide-on-narrow\"],\"panelLabel\":[1,\"panel-label\"],\"isNarrow\":[32],\"responsiveReady\":[32],\"overlayMounted\":[32],\"overlayVisible\":[32],\"currentWidthPx\":[32],\"resizing\":[32]},[[6,\"keydown\",\"onDocumentKeyDown\"],[4,\"leSidePanelRequestToggle\",\"onToggleRequest\"]],{\"panelWidth\":[\"onPanelWidthChanged\"],\"collapsed\":[\"onCollapsedChanged\"],\"open\":[\"onOpenChanged\"],\"collapseAt\":[\"onResponsivePropChanged\"],\"narrowBehavior\":[\"onResponsivePropChanged\"]}]]],[\"le-tab-bar.cjs\",[[769,\"le-tab-bar\",{\"tabs\":[16],\"selected\":[1032],\"fullWidth\":[4,\"full-width\"],\"showLabels\":[4,\"show-labels\"],\"position\":[1],\"size\":[1],\"bordered\":[4],\"tabConfigs\":[32],\"isDeclarativeMode\":[32],\"focusedIndex\":[32]},[[0,\"slotchange\",\"handleSlotChange\"]],{\"selected\":[\"selectedChanged\"],\"tabs\":[\"tabsChanged\"]}]]],[\"le-tabs.cjs\",[[769,\"le-tabs\",{\"tabs\":[16],\"selected\":[1032],\"orientation\":[1],\"position\":[1],\"variant\":[1],\"fullWidth\":[4,\"full-width\"],\"size\":[1],\"wrap\":[4],\"overflow\":[1],\"tabConfigs\":[32],\"focusedIndex\":[32],\"isDeclarativeMode\":[32]},[[0,\"slotchange\",\"handleSlotChange\"]],{\"selected\":[\"selectedChanged\"],\"tabs\":[\"tabsChanged\"]}]]],[\"le-box.cjs\",[[769,\"le-box\",{\"grow\":[2],\"shrink\":[2],\"basis\":[1],\"width\":[1],\"height\":[1],\"minWidth\":[1,\"min-width\"],\"maxWidth\":[1,\"max-width\"],\"minHeight\":[1,\"min-height\"],\"maxHeight\":[1,\"max-height\"],\"background\":[1],\"borderRadius\":[1,\"border-radius\"],\"border\":[1],\"alignSelf\":[1,\"align-self\"],\"alignContent\":[1,\"align-content\"],\"justifyContent\":[1,\"justify-content\"],\"padding\":[1],\"order\":[2],\"displayFlex\":[4,\"display-flex\"],\"innerDirection\":[1,\"inner-direction\"],\"innerGap\":[1,\"inner-gap\"]}]]],[\"le-card.cjs\",[[769,\"le-card\",{\"variant\":[1],\"interactive\":[4]}]]],[\"le-code-input.cjs\",[[769,\"le-code-input\",{\"value\":[1537],\"name\":[1],\"label\":[1],\"length\":[2],\"description\":[1],\"type\":[1],\"disabled\":[4],\"readonly\":[4],\"externalId\":[1,\"external-id\"],\"error\":[4],\"isFocused\":[32],\"selectionStart\":[32],\"selectionEnd\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"le-combobox.cjs\",[[769,\"le-combobox\",{\"options\":[1],\"value\":[1032],\"placeholder\":[1],\"disabled\":[516],\"required\":[4],\"name\":[1],\"fullWidth\":[516,\"full-width\"],\"size\":[513],\"allowCustom\":[4,\"allow-custom\"],\"minSearchLength\":[2,\"min-search-length\"],\"emptyText\":[1,\"empty-text\"],\"open\":[1540],\"inputValue\":[32],\"selectedOption\":[32],\"showDropdown\":[64],\"hideDropdown\":[64],\"focusInput\":[64]},[[8,\"click\",\"handleWindowClick\"]],{\"value\":[\"handleValueChange\"],\"options\":[\"handleOptionsChange\"]}]]],[\"le-number-input.cjs\",[[769,\"le-number-input\",{\"value\":[1538],\"name\":[1],\"label\":[1],\"placeholder\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"required\":[4],\"disabled\":[4],\"readonly\":[4],\"iconStart\":[1,\"icon-start\"],\"showSpinners\":[4,\"show-spinners\"],\"externalId\":[1,\"external-id\"],\"isValid\":[32],\"validationMessage\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"le-stack.cjs\",[[769,\"le-stack\",{\"direction\":[1],\"gap\":[1],\"align\":[1],\"justify\":[1],\"wrap\":[4],\"alignContent\":[1,\"align-content\"],\"reverse\":[4],\"maxItems\":[2,\"max-items\"],\"fullWidth\":[4,\"full-width\"],\"fullHeight\":[4,\"full-height\"],\"padding\":[1]}]]],[\"le-tab-panel.cjs\",[[769,\"le-tab-panel\",{\"label\":[1],\"value\":[1],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"disabled\":[4],\"lazy\":[4],\"active\":[32],\"hasBeenActive\":[32],\"getValue\":[64],\"getTabConfig\":[64],\"setActive\":[64]},null,{\"active\":[\"activeChanged\"]}]]],[\"le-text.cjs\",[[769,\"le-text\",{\"variant\":[1537],\"align\":[513],\"color\":[1],\"truncate\":[4],\"maxLines\":[2,\"max-lines\"],\"adminMode\":[32],\"content\":[32],\"isFocused\":[32],\"selectionState\":[32]},null,{\"variant\":[\"onVariantChange\"]}]]],[\"le-header-placeholder.cjs\",[[256,\"le-header-placeholder\"]]],[\"le-round-progress.cjs\",[[769,\"le-round-progress\",{\"value\":[2],\"padding\":[2],\"paths\":[1],\"params\":[32]},null,{\"value\":[\"updateValue\"],\"padding\":[\"updatePadding\"],\"paths\":[\"updateProgressBackgrounds\"]}]]],[\"le-turntable.cjs\",[[769,\"le-turntable\",{\"center\":[1],\"value\":[2]},[[9,\"mousemove\",\"handleMouseMove\"],[9,\"mouseup\",\"handleMouseUp\"],[9,\"resize\",\"handleWindowResize\"]],{\"value\":[\"updateValue\"]}]]],[\"le-tag.cjs\",[[769,\"le-tag\",{\"label\":[1],\"mode\":[1537],\"icon\":[1],\"dismissible\":[4],\"disabled\":[516],\"size\":[513],\"variant\":[513]}]]],[\"le-side-panel-toggle.cjs\",[[769,\"le-side-panel-toggle\",{\"panelId\":[1,\"panel-id\"],\"action\":[1],\"shortcut\":[1],\"disabled\":[4],\"mode\":[1537],\"variant\":[1],\"color\":[1],\"size\":[1],\"selected\":[4],\"fullWidth\":[516,\"full-width\"],\"iconOnly\":[1,\"icon-only\"],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"type\":[1],\"href\":[1],\"target\":[1],\"align\":[1]},null,{\"shortcut\":[\"onShortcutChanged\"]}]]],[\"le-tab.cjs\",[[769,\"le-tab\",{\"mode\":[1537],\"label\":[1],\"value\":[1],\"variant\":[1],\"position\":[1],\"size\":[1],\"focusable\":[4],\"selected\":[4],\"fullWidth\":[516,\"full-width\"],\"icon\":[1],\"showLabel\":[4,\"show-label\"],\"iconStart\":[1,\"icon-start\"],\"iconEnd\":[1,\"icon-end\"],\"disabled\":[4],\"href\":[1],\"target\":[1],\"align\":[1],\"getTabConfig\":[64]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BzadfLTc.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Utility functions for le-kit components
|
|
@@ -147,6 +147,6 @@ exports.generateId = generateId;
|
|
|
147
147
|
exports.observeModeChanges = observeModeChanges;
|
|
148
148
|
exports.parseCommaSeparated = parseCommaSeparated;
|
|
149
149
|
exports.slotHasContent = slotHasContent;
|
|
150
|
-
//# sourceMappingURL=utils-
|
|
150
|
+
//# sourceMappingURL=utils-Dxx9WhWK.js.map
|
|
151
151
|
|
|
152
|
-
//# sourceMappingURL=utils-
|
|
152
|
+
//# sourceMappingURL=utils-Dxx9WhWK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-Dxx9WhWK.js","sources":["src/utils/utils.ts"],"sourcesContent":["/**\n * Utility functions for le-kit components\n */\n\nimport { getMode } from '../global/app';\n\n/**\n * Generates a unique ID for component instances\n */\nexport function generateId(prefix: string = 'le'): string {\n return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;\n}\n\n/**\n * Parses a comma-separated string into an array\n */\nexport function parseCommaSeparated(value: string | undefined): string[] {\n if (!value) return [];\n return value\n .split(',')\n .map(s => s.trim())\n .filter(Boolean);\n}\n\n/**\n * Checks if a slot has content\n */\nexport function slotHasContent(el: HTMLElement, slotName: string = ''): boolean {\n const selector = slotName ? `[slot=\"${slotName}\"]` : ':not([slot])';\n return el.querySelector(selector) !== null;\n}\n\n/**\n * Sets up a MutationObserver to track mode changes on ancestor elements.\n * Returns a cleanup function to disconnect the observer.\n * \n * If the element or any ancestor has an explicit `mode` attribute, that creates\n * a \"mode boundary\" - the mode is determined from that point, not from further up.\n * This allows components like le-popover to force default mode for their children.\n * \n * @param el - The component's host element\n * @param callback - Function to call when mode changes, receives the new mode\n * @returns Cleanup function to disconnect the observer\n * \n * @example\n * ```tsx\n * export class MyComponent {\n * @Element() el: HTMLElement;\n * @State() adminMode: boolean = false;\n * private disconnectModeObserver?: () => void;\n * \n * connectedCallback() {\n * this.disconnectModeObserver = observeModeChanges(this.el, (mode) => {\n * this.adminMode = mode === 'admin';\n * });\n * }\n * \n * disconnectedCallback() {\n * this.disconnectModeObserver?.();\n * }\n * }\n * ```\n */\nexport function observeModeChanges(\n el: HTMLElement,\n callback: (mode: string) => void\n): () => void {\n // Call immediately with current mode\n callback(getMode(el));\n\n // Set up observer for mode attribute changes\n const observer = new MutationObserver(() => {\n callback(getMode(el));\n });\n\n // Observe the element itself (for mode boundary changes)\n observer.observe(el, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Observe document root\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n\n // Traverse up, crossing shadow boundaries, and observe each element\n let current: Node | null = el;\n while (current) {\n if (current instanceof Element && current.parentElement) {\n current = current.parentElement;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If this element has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n // Check if we're in a shadow root\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n // Cross the shadow boundary and observe the host\n current = root.host;\n observer.observe(current, {\n attributes: true,\n attributeFilter: ['mode'],\n });\n // If the host has an explicit mode, it's a boundary\n if ((current as Element).hasAttribute('mode')) {\n break;\n }\n } else {\n break;\n }\n }\n }\n\n // Return cleanup function\n return () => observer.disconnect();\n}\n\n/**\n * Combines multiple class names into a single string, filtering out falsy values.\n * \n * @param classes - arguments of class names, undefined, arrays, objects with boolean values and nested combinations of these\n * @returns Combined class names string\n */\nexport function classnames(...classes: any[]): string {\n const result: string[] = [];\n\n classes.forEach(cls => {\n if (!cls) return;\n\n if (typeof cls === 'string') {\n result.push(cls);\n } else if (Array.isArray(cls)) {\n result.push(classnames(...cls));\n } else if (typeof cls === 'object') {\n Object.entries(cls).forEach(([key, value]) => {\n if (value) {\n result.push(key);\n }\n });\n }\n });\n\n return result.join(' ');\n}\n"],"names":["getMode"],"mappings":";;;;AAAA;;AAEG;AAIH;;AAEG;AACa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AA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAClC,YAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;gBAC3C,IAAI,KAAK,EAAE;AACT,oBAAA,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;;AAEpB,aAAC,CAAC;;AAEN,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACzB;;;;;;;;"}
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
"components/le-bar/le-bar.js",
|
|
4
4
|
"components/le-navigation/le-navigation.js",
|
|
5
5
|
"components/le-popup/le-popup.js",
|
|
6
|
+
"components/le-side-panel/le-side-panel.js",
|
|
7
|
+
"components/le-side-panel-toggle/le-side-panel-toggle.js",
|
|
6
8
|
"components/le-box/le-box.js",
|
|
7
9
|
"components/le-button/le-button.js",
|
|
8
10
|
"components/le-card/le-card.js",
|
|
9
11
|
"components/le-checkbox/le-checkbox.js",
|
|
12
|
+
"components/le-code-input/le-code-input.js",
|
|
10
13
|
"components/le-collapse/le-collapse.js",
|
|
11
14
|
"components/le-combobox/le-combobox.js",
|
|
12
15
|
"components/le-component/le-component.js",
|
|
@@ -185,18 +185,18 @@ export class LeBox {
|
|
|
185
185
|
'display-flex': this.displayFlex,
|
|
186
186
|
[`inner-${this.innerDirection}`]: this.displayFlex,
|
|
187
187
|
});
|
|
188
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: '01fad47e9fdff2931a8f0a26d540bb1a5da6a626', style: hostStyle, class: hostClass }, h("le-component", { key: '2d6b2588889925835e91ecbf6be811d21b47b015', component: "le-box" }, h("div", { key: 'd43fd71f7f9e1211bb2dfaaf577c6c9bef78b794', class: "box", part: "box" }, h("div", { key: '1b8b1680dfeb7e6f31ac627d55ae05796bef4f02', class: "content", part: "content", style: contentStyle }, h("le-slot", { key: '8af26e1c5047b9d5ab9f4ae0464c34bf3e931805', name: "", description: "Content inside this flex item", type: "slot", "allowed-components": "le-text,le-card,le-button,le-stack,le-box" }, h("slot", { key: 'db95a80650aa9846eb27ccd75ee074a86a9ef47c' })))))));
|
|
189
189
|
}
|
|
190
190
|
static get is() { return "le-box"; }
|
|
191
191
|
static get encapsulation() { return "shadow"; }
|
|
192
192
|
static get originalStyleUrls() {
|
|
193
193
|
return {
|
|
194
|
-
"$": ["le-box.
|
|
194
|
+
"$": ["le-box.css"]
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
static get styleUrls() {
|
|
198
198
|
return {
|
|
199
|
-
"$": ["le-box.
|
|
199
|
+
"$": ["le-box.css"]
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"le-box.js","sourceRoot":"","sources":["../../../src/components/le-box/le-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;;;GAiBG;AAMH,MAAM,OAAO,KAAK;IACL,EAAE,CAAc;IAE3B;;;OAGG;IACK,IAAI,GAAW,CAAC,CAAC;IAEzB;;;OAGG;IACK,MAAM,GAAW,CAAC,CAAC;IAE3B;;OAEG;IACK,KAAK,GAAW,MAAM,CAAC;IAE/B;;OAEG;IACK,KAAK,CAAU;IAEvB;;OAEG;IACK,MAAM,CAAU;IAExB;;OAEG;IACK,QAAQ,CAAU;IAE1B;;OAEG;IACK,QAAQ,CAAU;IAE1B;;OAEG;IACK,SAAS,CAAU;IAE3B;;OAEG;IACK,SAAS,CAAU;IAE3B;;OAEG;IACK,UAAU,CAAU;IAE5B;;OAEG;IACK,YAAY,CAAU;IAE9B;;OAEG;IACK,MAAM,CAAU;IAExB;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, Host } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible box component for use as a flex item within le-stack.\n *\n * `le-box` wraps content and provides flex item properties like grow, shrink,\n * basis, and self-alignment. It can also control its internal content alignment.\n *\n * @slot - Default slot for box content\n *\n * @cssprop --le-box-bg - Background color\n * @cssprop --le-box-padding - Padding inside the box\n * @cssprop --le-box-border-radius - Border radius\n *\n * @csspart box - The main box container\n * @csspart content - The inner content wrapper\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-box',\n styleUrl: 'le-box.default.css',\n shadow: true,\n})\nexport class LeBox {\n @Element() el: HTMLElement;\n\n /**\n * Flex grow factor - how much the item should grow relative to siblings\n * @min 0\n */\n @Prop() grow: number = 0;\n\n /**\n * Flex shrink factor - how much the item should shrink relative to siblings\n * @min 0\n */\n @Prop() shrink: number = 1;\n\n /**\n * Flex basis - initial size before growing/shrinking (e.g., '200px', '25%', 'auto')\n */\n @Prop() basis: string = 'auto';\n\n /**\n * Width of the box (CSS value like '100px', '50%', 'auto')\n */\n @Prop() width?: string;\n\n /**\n * Height of the box (CSS value)\n */\n @Prop() height?: string;\n\n /**\n * Minimum width constraint\n */\n @Prop() minWidth?: string;\n\n /**\n * Maximum width constraint\n */\n @Prop() maxWidth?: string;\n\n /**\n * Minimum height constraint\n */\n @Prop() minHeight?: string;\n\n /**\n * Maximum height constraint\n */\n @Prop() maxHeight?: string;\n\n /**\n * Background color or CSS value (e.g., '#f0f0f0', 'var(--le-color-primary-light)')\n */\n @Prop() background?: string;\n\n /**\n * Border radius (e.g., '8px', 'var(--le-radius-md)')\n */\n @Prop() borderRadius?: string;\n\n /**\n * Border style (e.g., '1px solid #ccc', '2px dashed var(--le-color-border)')\n */\n @Prop() border?: string;\n\n /**\n * Self-alignment override for this item on the cross axis\n * @allowedValues auto | start | center | end | stretch | baseline\n */\n @Prop() alignSelf: 'auto' | 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'auto';\n\n /**\n * Internal horizontal alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() alignContent: 'start' | 'center' | 'end' | 'stretch' = 'stretch';\n\n /**\n * Internal vertical alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() justifyContent: 'start' | 'center' | 'end' | 'stretch' = 'start';\n\n /**\n * Padding inside the box (CSS value like '8px', '1rem')\n */\n @Prop() padding?: string;\n\n /**\n * Order in the flex container (lower values come first)\n */\n @Prop() order?: number;\n\n /**\n * Whether to display box content as flex (for internal alignment)\n */\n @Prop() displayFlex: boolean = false;\n\n /**\n * Direction of internal flex layout when displayFlex is true\n * @allowedValues horizontal | vertical\n */\n @Prop() innerDirection: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Gap between internal flex items when displayFlex is true\n */\n @Prop() innerGap?: string;\n\n private getAlignSelf(): string {\n const alignMap: Record<string, string> = {\n auto: 'auto',\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n };\n return alignMap[this.alignSelf] || 'auto';\n }\n\n private getContentAlign(): string {\n const alignMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return alignMap[this.alignContent] || 'stretch';\n }\n\n private getContentJustify(): string {\n const justifyMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return justifyMap[this.justifyContent] || 'flex-start';\n }\n\n render() {\n // Host styles for flex item behavior\n const hostStyle: { [key: string]: string } = {\n flexGrow: String(this.grow),\n flexShrink: String(this.shrink),\n flexBasis: this.basis,\n alignSelf: this.getAlignSelf(),\n };\n\n if (this.width) hostStyle.width = this.width;\n if (this.height) hostStyle.height = this.height;\n if (this.minWidth) hostStyle.minWidth = this.minWidth;\n if (this.maxWidth) hostStyle.maxWidth = this.maxWidth;\n if (this.minHeight) hostStyle.minHeight = this.minHeight;\n if (this.maxHeight) hostStyle.maxHeight = this.maxHeight;\n if (this.order !== undefined) hostStyle.order = String(this.order);\n\n // Inner content styles\n const contentStyle: { [key: string]: string } = {};\n\n if (this.padding) {\n contentStyle.padding = this.padding;\n }\n if (this.background) {\n contentStyle.background = this.background;\n }\n if (this.borderRadius) {\n contentStyle.borderRadius = this.borderRadius;\n }\n if (this.border) {\n contentStyle.border = this.border;\n }\n\n if (this.displayFlex) {\n contentStyle.display = 'flex';\n contentStyle.flexDirection = this.innerDirection === 'vertical' ? 'column' : 'row';\n contentStyle.alignItems = this.getContentAlign();\n contentStyle.justifyContent = this.getContentJustify();\n if (this.innerGap) {\n contentStyle.gap = this.innerGap;\n }\n }\n\n const hostClass = classnames({\n 'has-grow': this.grow > 0,\n 'display-flex': this.displayFlex,\n [`inner-${this.innerDirection}`]: this.displayFlex,\n });\n\n return (\n <Host style={hostStyle} class={hostClass}>\n <le-component component=\"le-box\">\n <div class=\"box\" part=\"box\">\n <div class=\"content\" part=\"content\" style={contentStyle}>\n <le-slot\n name=\"\"\n description=\"Content inside this flex item\"\n type=\"slot\"\n allowed-components=\"le-text,le-card,le-button,le-stack,le-box\"\n >\n <slot></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"le-box.js","sourceRoot":"","sources":["../../../src/components/le-box/le-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACl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SAAS,EAAC,QAAQ;gBAC9B,4DAAK,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK;oBACzB,4DAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,YAAY;wBACrD,gEACE,IAAI,EAAC,EAAE,EACP,WAAW,EAAC,+BAA+B,EAC3C,IAAI,EAAC,MAAM,wBACQ,2CAA2C;4BAE9D,8DAAa,CACL,CACN,CACF,CACO,CACV,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, Host } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible box component for use as a flex item within le-stack.\n *\n * `le-box` wraps content and provides flex item properties like grow, shrink,\n * basis, and self-alignment. It can also control its internal content alignment.\n *\n * @slot - Default slot for box content\n *\n * @cssprop --le-box-bg - Background color\n * @cssprop --le-box-padding - Padding inside the box\n * @cssprop --le-box-border-radius - Border radius\n *\n * @csspart box - The main box container\n * @csspart content - The inner content wrapper\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-box',\n styleUrl: 'le-box.css',\n shadow: true,\n})\nexport class LeBox {\n @Element() el: HTMLElement;\n\n /**\n * Flex grow factor - how much the item should grow relative to siblings\n * @min 0\n */\n @Prop() grow: number = 0;\n\n /**\n * Flex shrink factor - how much the item should shrink relative to siblings\n * @min 0\n */\n @Prop() shrink: number = 1;\n\n /**\n * Flex basis - initial size before growing/shrinking (e.g., '200px', '25%', 'auto')\n */\n @Prop() basis: string = 'auto';\n\n /**\n * Width of the box (CSS value like '100px', '50%', 'auto')\n */\n @Prop() width?: string;\n\n /**\n * Height of the box (CSS value)\n */\n @Prop() height?: string;\n\n /**\n * Minimum width constraint\n */\n @Prop() minWidth?: string;\n\n /**\n * Maximum width constraint\n */\n @Prop() maxWidth?: string;\n\n /**\n * Minimum height constraint\n */\n @Prop() minHeight?: string;\n\n /**\n * Maximum height constraint\n */\n @Prop() maxHeight?: string;\n\n /**\n * Background color or CSS value (e.g., '#f0f0f0', 'var(--le-color-primary-light)')\n */\n @Prop() background?: string;\n\n /**\n * Border radius (e.g., '8px', 'var(--le-radius-md)')\n */\n @Prop() borderRadius?: string;\n\n /**\n * Border style (e.g., '1px solid #ccc', '2px dashed var(--le-color-border)')\n */\n @Prop() border?: string;\n\n /**\n * Self-alignment override for this item on the cross axis\n * @allowedValues auto | start | center | end | stretch | baseline\n */\n @Prop() alignSelf: 'auto' | 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'auto';\n\n /**\n * Internal horizontal alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() alignContent: 'start' | 'center' | 'end' | 'stretch' = 'stretch';\n\n /**\n * Internal vertical alignment of content\n * @allowedValues start | center | end | stretch\n */\n @Prop() justifyContent: 'start' | 'center' | 'end' | 'stretch' = 'start';\n\n /**\n * Padding inside the box (CSS value like '8px', '1rem')\n */\n @Prop() padding?: string;\n\n /**\n * Order in the flex container (lower values come first)\n */\n @Prop() order?: number;\n\n /**\n * Whether to display box content as flex (for internal alignment)\n */\n @Prop() displayFlex: boolean = false;\n\n /**\n * Direction of internal flex layout when displayFlex is true\n * @allowedValues horizontal | vertical\n */\n @Prop() innerDirection: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Gap between internal flex items when displayFlex is true\n */\n @Prop() innerGap?: string;\n\n private getAlignSelf(): string {\n const alignMap: Record<string, string> = {\n auto: 'auto',\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n };\n return alignMap[this.alignSelf] || 'auto';\n }\n\n private getContentAlign(): string {\n const alignMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return alignMap[this.alignContent] || 'stretch';\n }\n\n private getContentJustify(): string {\n const justifyMap: Record<string, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n };\n return justifyMap[this.justifyContent] || 'flex-start';\n }\n\n render() {\n // Host styles for flex item behavior\n const hostStyle: { [key: string]: string } = {\n flexGrow: String(this.grow),\n flexShrink: String(this.shrink),\n flexBasis: this.basis,\n alignSelf: this.getAlignSelf(),\n };\n\n if (this.width) hostStyle.width = this.width;\n if (this.height) hostStyle.height = this.height;\n if (this.minWidth) hostStyle.minWidth = this.minWidth;\n if (this.maxWidth) hostStyle.maxWidth = this.maxWidth;\n if (this.minHeight) hostStyle.minHeight = this.minHeight;\n if (this.maxHeight) hostStyle.maxHeight = this.maxHeight;\n if (this.order !== undefined) hostStyle.order = String(this.order);\n\n // Inner content styles\n const contentStyle: { [key: string]: string } = {};\n\n if (this.padding) {\n contentStyle.padding = this.padding;\n }\n if (this.background) {\n contentStyle.background = this.background;\n }\n if (this.borderRadius) {\n contentStyle.borderRadius = this.borderRadius;\n }\n if (this.border) {\n contentStyle.border = this.border;\n }\n\n if (this.displayFlex) {\n contentStyle.display = 'flex';\n contentStyle.flexDirection = this.innerDirection === 'vertical' ? 'column' : 'row';\n contentStyle.alignItems = this.getContentAlign();\n contentStyle.justifyContent = this.getContentJustify();\n if (this.innerGap) {\n contentStyle.gap = this.innerGap;\n }\n }\n\n const hostClass = classnames({\n 'has-grow': this.grow > 0,\n 'display-flex': this.displayFlex,\n [`inner-${this.innerDirection}`]: this.displayFlex,\n });\n\n return (\n <Host style={hostStyle} class={hostClass}>\n <le-component component=\"le-box\">\n <div class=\"box\" part=\"box\">\n <div class=\"content\" part=\"content\" style={contentStyle}>\n <le-slot\n name=\"\"\n description=\"Content inside this flex item\"\n type=\"slot\"\n allowed-components=\"le-text,le-card,le-button,le-stack,le-box\"\n >\n <slot></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -217,8 +217,8 @@
|
|
|
217
217
|
|
|
218
218
|
/* Icon only */
|
|
219
219
|
:host(.icon-only) .le-button-container {
|
|
220
|
-
padding: 0.5rem;
|
|
221
|
-
padding-bottom: 0.6rem;
|
|
220
|
+
padding: var(--le-button-icon-only-padding, 0.5rem);
|
|
221
|
+
padding-bottom: var(--le-button-icon-only-padding, 0.6rem);
|
|
222
222
|
aspect-ratio: var(--le-button-icon-aspect-ratio, 1);
|
|
223
223
|
}
|
|
224
224
|
|
|
@@ -110,7 +110,7 @@ export class LeButton {
|
|
|
110
110
|
const attrs = this.href
|
|
111
111
|
? { href: this.href, target: this.target, role: 'button' }
|
|
112
112
|
: { type: this.type, disabled: this.disabled };
|
|
113
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: 'a42aef03b5faf34f47b50dff799316a6815babd5', class: classes }, h("le-component", { key: '86ef8acf04d43e829b83d3e225f210acefc99515', component: "le-button" }, h(TagType, { key: '44145a5244577aab167c103501b788f0088799e3', class: classnames('le-button-container', `le-button-align-${this.align}`), part: "button", ...attrs, onClick: this.handleClick }, this.iconOnly !== undefined ? (h("slot", { name: "icon-only" }, typeof this.iconOnly === 'string' ? this.iconOnly : null)) : (h(Fragment, null, h("span", { class: "le-button-label" }, this.iconStart && (h("span", { class: "icon-start", part: "icon-start" }, this.iconStart)), h("le-slot", { name: "", description: "Button text", type: "text", class: "content", part: "content" }, h("slot", null))), this.iconEnd && (h("span", { class: "icon-end", part: "icon-end" }, this.iconEnd))))))));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "le-button"; }
|
|
116
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -36,18 +36,18 @@ export class LeCard {
|
|
|
36
36
|
*/
|
|
37
37
|
interactive = false;
|
|
38
38
|
render() {
|
|
39
|
-
return (h("le-component", { key: '
|
|
39
|
+
return (h("le-component", { key: 'b4203e8775f711c1ce4d8b9a4270815f122271f2', component: "le-card", hostClass: classnames(`variant-${this.variant}`, { 'interactive': this.interactive }) }, h("div", { key: '0dc9231529fc6d2eb29bc5cde2c1dbf18b332a43', class: "card", part: "card" }, h("div", { key: '511fcec73b51b0931d92e0fee4d17b108c827e74', class: "card-header", part: "header" }, h("le-slot", { key: 'e50dbadbe53ce6fa343ac7cfccb5a5d8f58fbd01', name: "header", label: "Header", description: "Card title", type: "text", tag: "h3" }, h("slot", { key: '36e1f7c3c5c1c5a9d49261d1b1406efe4004389b', name: "header" }))), h("div", { key: 'f9da55c0661d7906161b77aa22edc1c6bb7fb8d4', class: "card-content", part: "content" }, h("le-slot", { key: '01670058d67851f1bd70b21fc4111b4bf2509f25', name: "", label: "Content", description: "Card content", type: "textarea", tag: "p", required: true }, h("slot", { key: 'e6eff48970eca2b3971f0ea7bfda3ca12bd1a3a1' }))), h("div", { key: 'ccd29257bc339a0d26c4750823fc635a182123cc', class: "card-footer", part: "footer" }, h("le-slot", { key: '198499afcbb9b0e82cac6cf976ab407697263c1f', name: "footer", label: "Footer", description: "Card footer with actions", "allowed-components": "le-button,le-link" }, h("slot", { key: '4d495b49f48ac142cdf739472b48d4bfb37933af', name: "footer" }))))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "le-card"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
43
43
|
static get originalStyleUrls() {
|
|
44
44
|
return {
|
|
45
|
-
"$": ["le-card.
|
|
45
|
+
"$": ["le-card.css"]
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
static get styleUrls() {
|
|
49
49
|
return {
|
|
50
|
-
"$": ["le-card.
|
|
50
|
+
"$": ["le-card.css"]
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"le-card.js","sourceRoot":"","sources":["../../../src/components/le-card/le-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,MAAM;IACN,EAAE,CAAc;IAE3B;;;OAGG;IACK,OAAO,GAAwC,SAAS,CAAC;IAEjE;;OAEG;IACK,WAAW,GAAY,KAAK,CAAC;IAErC,MAAM;QACJ,OAAO,CACL,qEAAc,SAAS,EAAC,SAAS,EAAC,SAAS,EAAE,UAAU,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;YACrH,4DAAK,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM;gBAC3B,4DAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ;oBACpC,gEAAS,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,WAAW,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,IAAI;wBACjF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACnB,CACN;gBAEN,4DAAK,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,SAAS;oBACtC,gEAAS,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,WAAW,EAAC,cAAc,EAAC,IAAI,EAAC,UAAU,EAAC,GAAG,EAAC,GAAG,EAAC,QAAQ;wBAC1F,8DAAa,CACL,CACN;gBAEN,4DAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ;oBACpC,gEAAS,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,WAAW,EAAC,0BAA0B,wBAAoB,mBAAmB;wBACjH,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACnB,CACN,CACF,CACO,CAChB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible card component with header, content, and footer slots.\n *\n * The card uses le-slot wrappers for each slot area. In admin mode,\n * le-slot shows placeholders for CMS editing. In default mode,\n * le-slot acts as a transparent passthrough.\n *\n * @slot header - Card header content (title, actions)\n * @slot - Default slot for main card content\n * @slot footer - Card footer content (buttons, links)\n *\n * @cssprop --le-card-bg - Card background color\n * @cssprop --le-card-border-radius - Card border radius\n * @cssprop --le-card-shadow - Card box shadow\n * @cssprop --le-card-padding - Card content padding\n *\n * @csspart card - The main card container\n * @csspart header - The card header section\n * @csspart content - The card content section\n * @csspart footer - The card footer section\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-card',\n styleUrl: 'le-card.
|
|
1
|
+
{"version":3,"file":"le-card.js","sourceRoot":"","sources":["../../../src/components/le-card/le-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,MAAM;IACN,EAAE,CAAc;IAE3B;;;OAGG;IACK,OAAO,GAAwC,SAAS,CAAC;IAEjE;;OAEG;IACK,WAAW,GAAY,KAAK,CAAC;IAErC,MAAM;QACJ,OAAO,CACL,qEAAc,SAAS,EAAC,SAAS,EAAC,SAAS,EAAE,UAAU,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;YACrH,4DAAK,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM;gBAC3B,4DAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ;oBACpC,gEAAS,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,WAAW,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,IAAI;wBACjF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACnB,CACN;gBAEN,4DAAK,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,SAAS;oBACtC,gEAAS,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,WAAW,EAAC,cAAc,EAAC,IAAI,EAAC,UAAU,EAAC,GAAG,EAAC,GAAG,EAAC,QAAQ;wBAC1F,8DAAa,CACL,CACN;gBAEN,4DAAK,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ;oBACpC,gEAAS,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,QAAQ,EAAC,WAAW,EAAC,0BAA0B,wBAAoB,mBAAmB;wBACjH,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACnB,CACN,CACF,CACO,CAChB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element } from '@stencil/core';\nimport { classnames } from '../../utils/utils';\n\n/**\n * A flexible card component with header, content, and footer slots.\n *\n * The card uses le-slot wrappers for each slot area. In admin mode,\n * le-slot shows placeholders for CMS editing. In default mode,\n * le-slot acts as a transparent passthrough.\n *\n * @slot header - Card header content (title, actions)\n * @slot - Default slot for main card content\n * @slot footer - Card footer content (buttons, links)\n *\n * @cssprop --le-card-bg - Card background color\n * @cssprop --le-card-border-radius - Card border radius\n * @cssprop --le-card-shadow - Card box shadow\n * @cssprop --le-card-padding - Card content padding\n *\n * @csspart card - The main card container\n * @csspart header - The card header section\n * @csspart content - The card content section\n * @csspart footer - The card footer section\n *\n * @cmsEditable true\n * @cmsCategory Layout\n */\n@Component({\n tag: 'le-card',\n styleUrl: 'le-card.css',\n shadow: true,\n})\nexport class LeCard {\n @Element() el: HTMLElement;\n\n /**\n * Card variant style\n * @allowedValues default | outlined | elevated\n */\n @Prop() variant: 'default' | 'outlined' | 'elevated' = 'default';\n\n /**\n * Whether the card is interactive (clickable)\n */\n @Prop() interactive: boolean = false;\n\n render() {\n return (\n <le-component component=\"le-card\" hostClass={classnames(`variant-${this.variant}`, { 'interactive': this.interactive })}>\n <div class=\"card\" part=\"card\">\n <div class=\"card-header\" part=\"header\">\n <le-slot name=\"header\" label=\"Header\" description=\"Card title\" type=\"text\" tag=\"h3\">\n <slot name=\"header\"></slot>\n </le-slot>\n </div>\n\n <div class=\"card-content\" part=\"content\">\n <le-slot name=\"\" label=\"Content\" description=\"Card content\" type=\"textarea\" tag=\"p\" required>\n <slot></slot>\n </le-slot>\n </div>\n\n <div class=\"card-footer\" part=\"footer\">\n <le-slot name=\"footer\" label=\"Footer\" description=\"Card footer with actions\" allowed-components=\"le-button,le-link\">\n <slot name=\"footer\"></slot>\n </le-slot>\n </div>\n </div>\n </le-component>\n );\n }\n}\n"]}
|
|
@@ -54,7 +54,7 @@ export class LeCheckbox {
|
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
56
|
render() {
|
|
57
|
-
return (h("le-component", { key: '
|
|
57
|
+
return (h("le-component", { key: 'cb04cc6a990ee321dd7e8fca2f0bf56c76a865fa', component: "le-checkbox", hostClass: classnames({ 'disabled': this.disabled }) }, h("div", { key: '1b8737eb0d572ba5fdf8c2cfc5ced4af5ef30997', class: "le-checkbox-wrapper" }, h("label", { key: '1d26d68565ade32489f2fade8120c7b8ad75b251', class: "le-checkbox-label" }, h("span", { key: '7e6b5e610c9f16c36b93c57284891366e6b3b756', class: "le-checkbox-input" }, h("input", { key: 'a12a374aa69526d802f36f00b0ae4bcd4ed27bc3', type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.handleChange })), h("span", { key: 'e4ea1f85102c99751f9853b8e23fbd40ebd24780', class: "le-checkbox-text" }, h("le-slot", { key: 'cdda2111e4dfa6d7270280bac305255980842d48', name: "", type: "text", tag: "span" }, h("slot", { key: '32f57155d7a56f48e5780e37ea1ccac308db6848' })))), h("div", { key: '37d54d8c87b90987653f66a319958849893e7d91', class: "le-checkbox-description" }, h("le-slot", { key: 'fceedc24ef6a3561120456e9b387801a40c5919c', name: "description", type: "text", tag: "div", label: "Description" }, h("slot", { key: 'f1f87b7192565831a2f20428e8e2c0a974166dfd', name: "description" }))))));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "le-checkbox"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
|
|
4
|
+
--le-input-bg: var(--le-color-surface, #ffffff);
|
|
5
|
+
--le-input-color: var(--le-color-text-primary, #333333);
|
|
6
|
+
--le-input-border: var(--le-border-width, 2px) solid var(--le-color-border-input, #007bff);
|
|
7
|
+
--le-input-radius: var(--le-radius-sm, 4px);
|
|
8
|
+
--le-input-border-focus: 2px solid var(--le-color-focus);
|
|
9
|
+
--le-input-border-focus-offset: 2px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.le-code-input-wrapper {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.le-input-label {
|
|
19
|
+
display: block;
|
|
20
|
+
margin-bottom: var(--le-spacing-2, 0.5rem);
|
|
21
|
+
color: var(--le-text-color, inherit);
|
|
22
|
+
font-size: var(--le-font-size-sm, 0.875rem);
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.input-group {
|
|
27
|
+
position: relative;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
width: fit-content;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ghost-input {
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
z-index: 10;
|
|
39
|
+
cursor: text;
|
|
40
|
+
color: transparent;
|
|
41
|
+
background: transparent;
|
|
42
|
+
caret-color: transparent;
|
|
43
|
+
border: none;
|
|
44
|
+
outline: none;
|
|
45
|
+
letter-spacing: 1em; /* Try to match boxes? */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ghost-input:disabled {
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.visual-container {
|
|
53
|
+
display: flex;
|
|
54
|
+
gap: var(--le-spacing-2, 8px);
|
|
55
|
+
pointer-events: none; /* Let clicks pass to ghost input */
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.code-box {
|
|
59
|
+
position: relative;
|
|
60
|
+
width: var(--le-code-box-size, 32px);
|
|
61
|
+
height: var(--le-code-box-size, 42px);
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
background: var(--le-input-bg);
|
|
66
|
+
border: var(--le-input-border);
|
|
67
|
+
border-radius: var(--le-input-radius);
|
|
68
|
+
color: var(--le-input-color);
|
|
69
|
+
font-size: 1.2rem;
|
|
70
|
+
transition: all 0.15s ease-in-out;
|
|
71
|
+
box-sizing: border-box;
|
|
72
|
+
user-select: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.code-box.active {
|
|
76
|
+
outline: var(--le-input-border-focus);
|
|
77
|
+
outline-offset: var(--le-input-border-focus-offset);
|
|
78
|
+
z-index: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.code-box.selected {
|
|
82
|
+
background-color: SelectedItem;
|
|
83
|
+
outline: var(--le-input-border-focus);
|
|
84
|
+
outline-offset: var(--le-input-border-focus-offset);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.input-group.has-error .code-box {
|
|
88
|
+
border: var(--le-input-border-error, 1px solid #ef4444);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.input-group.has-error .code-box.active {
|
|
92
|
+
border-width: 2px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host(.disabled) .code-box {
|
|
96
|
+
background-color: var(--le-color-disabled-bg, #f3f4f6);
|
|
97
|
+
color: var(--le-color-disabled-text, #9ca3af);
|
|
98
|
+
border-color: var(--le-color-disabled-border, #e5e7eb);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.le-input-description,
|
|
102
|
+
:host(p) {
|
|
103
|
+
margin-top: var(--le-spacing-1, 0.25rem);
|
|
104
|
+
color: var(--le-text-muted, #6b7280);
|
|
105
|
+
font-size: var(--le-font-size-sm, 0.875rem);
|
|
106
|
+
}
|