@threadlabs/looma 0.1.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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/chunk-G53JEAQK.js +94 -0
- package/dist/chunk-OF57X5AR.js +10 -0
- package/dist/chunk-UL7UIUJZ.js +20 -0
- package/dist/chunk-YK4MTZGJ.js +1580 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/events-TcQIzpNv.js +19 -0
- package/dist/cjs/id-CYbKpaYr.js +9 -0
- package/dist/cjs/index-D07f6BOw.js +1569 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/looma.cjs.js +25 -0
- package/dist/cjs/manager-BOpVXb92.js +93 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +51 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +50 -0
- package/dist/cjs/ui-badge.cjs.entry.js +19 -0
- package/dist/cjs/ui-button.cjs.entry.js +62 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +91 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +201 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +93 -0
- package/dist/cjs/ui-disclosure.cjs.entry.js +109 -0
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +20 -0
- package/dist/cjs/ui-form-field.cjs.entry.js +59 -0
- package/dist/cjs/ui-icon-button.cjs.entry.js +21 -0
- package/dist/cjs/ui-input.cjs.entry.js +101 -0
- package/dist/cjs/ui-menu-item.cjs.entry.js +19 -0
- package/dist/cjs/ui-menu.cjs.entry.js +96 -0
- package/dist/cjs/ui-popover.cjs.entry.js +92 -0
- package/dist/cjs/ui-radio-group.cjs.entry.js +134 -0
- package/dist/cjs/ui-radio.cjs.entry.js +85 -0
- package/dist/cjs/ui-search-result-row.cjs.entry.js +47 -0
- package/dist/cjs/ui-search-shell.cjs.entry.js +39 -0
- package/dist/cjs/ui-select.cjs.entry.js +100 -0
- package/dist/cjs/ui-switch.cjs.entry.js +65 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +117 -0
- package/dist/cjs/ui-textarea.cjs.entry.js +106 -0
- package/dist/cjs/ui-toast-region.cjs.entry.js +67 -0
- package/dist/cjs/ui-tooltip.cjs.entry.js +133 -0
- package/dist/cjs/ui-top-bar.cjs.entry.js +43 -0
- package/dist/collection/collection-manifest.json +38 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +35 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +130 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +32 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +103 -0
- package/dist/collection/components/ui-badge/ui-badge.css +74 -0
- package/dist/collection/components/ui-badge/ui-badge.js +62 -0
- package/dist/collection/components/ui-button/ui-button.css +101 -0
- package/dist/collection/components/ui-button/ui-button.js +127 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +24 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +223 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +17 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +272 -0
- package/dist/collection/components/ui-dialog/ui-dialog.css +65 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +185 -0
- package/dist/collection/components/ui-disclosure/ui-disclosure.css +7 -0
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +182 -0
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +70 -0
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +85 -0
- package/dist/collection/components/ui-form-field/ui-form-field.css +21 -0
- package/dist/collection/components/ui-form-field/ui-form-field.js +125 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +92 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +106 -0
- package/dist/collection/components/ui-input/ui-input.css +46 -0
- package/dist/collection/components/ui-input/ui-input.js +213 -0
- package/dist/collection/components/ui-menu/ui-menu.css +37 -0
- package/dist/collection/components/ui-menu/ui-menu.js +149 -0
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +26 -0
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +64 -0
- package/dist/collection/components/ui-popover/ui-popover.css +8 -0
- package/dist/collection/components/ui-popover/ui-popover.js +144 -0
- package/dist/collection/components/ui-radio/ui-radio.css +22 -0
- package/dist/collection/components/ui-radio/ui-radio.js +213 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +10 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +247 -0
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +80 -0
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +100 -0
- package/dist/collection/components/ui-search-shell/ui-search-shell.css +61 -0
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +46 -0
- package/dist/collection/components/ui-select/ui-select.css +62 -0
- package/dist/collection/components/ui-select/ui-select.js +212 -0
- package/dist/collection/components/ui-switch/ui-switch.css +63 -0
- package/dist/collection/components/ui-switch/ui-switch.js +177 -0
- package/dist/collection/components/ui-tabs/ui-tabs.css +65 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +190 -0
- package/dist/collection/components/ui-textarea/ui-textarea.css +48 -0
- package/dist/collection/components/ui-textarea/ui-textarea.js +238 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +52 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +100 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +14 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +205 -0
- package/dist/collection/components/ui-top-bar/ui-top-bar.css +43 -0
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +52 -0
- package/dist/collection/overlay/manager.js +90 -0
- package/dist/collection/utils/events.js +13 -0
- package/dist/collection/utils/id.js +5 -0
- package/dist/collection/utils/initials.js +11 -0
- package/dist/components/index.d.ts +88 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CIA4RyEp.js +1 -0
- package/dist/components/p-CR7f2MQC.js +1 -0
- package/dist/components/p-JwSoedEO.js +1 -0
- package/dist/components/p-WvL4iAhX.js +1 -0
- package/dist/components/p-hgBUJRDa.js +1 -0
- package/dist/components/ui-avatar-group.d.ts +11 -0
- package/dist/components/ui-avatar-group.js +1 -0
- package/dist/components/ui-avatar.d.ts +11 -0
- package/dist/components/ui-avatar.js +1 -0
- package/dist/components/ui-badge.d.ts +11 -0
- package/dist/components/ui-badge.js +1 -0
- package/dist/components/ui-button.d.ts +11 -0
- package/dist/components/ui-button.js +1 -0
- package/dist/components/ui-checkbox.d.ts +11 -0
- package/dist/components/ui-checkbox.js +1 -0
- package/dist/components/ui-context-menu.d.ts +11 -0
- package/dist/components/ui-context-menu.js +1 -0
- package/dist/components/ui-dialog.d.ts +11 -0
- package/dist/components/ui-dialog.js +1 -0
- package/dist/components/ui-disclosure.d.ts +11 -0
- package/dist/components/ui-disclosure.js +1 -0
- package/dist/components/ui-floating-action-button.d.ts +11 -0
- package/dist/components/ui-floating-action-button.js +1 -0
- package/dist/components/ui-form-field.d.ts +11 -0
- package/dist/components/ui-form-field.js +1 -0
- package/dist/components/ui-icon-button.d.ts +11 -0
- package/dist/components/ui-icon-button.js +1 -0
- package/dist/components/ui-input.d.ts +11 -0
- package/dist/components/ui-input.js +1 -0
- package/dist/components/ui-menu-item.d.ts +11 -0
- package/dist/components/ui-menu-item.js +1 -0
- package/dist/components/ui-menu.d.ts +11 -0
- package/dist/components/ui-menu.js +1 -0
- package/dist/components/ui-popover.d.ts +11 -0
- package/dist/components/ui-popover.js +1 -0
- package/dist/components/ui-radio-group.d.ts +11 -0
- package/dist/components/ui-radio-group.js +1 -0
- package/dist/components/ui-radio.d.ts +11 -0
- package/dist/components/ui-radio.js +1 -0
- package/dist/components/ui-search-result-row.d.ts +11 -0
- package/dist/components/ui-search-result-row.js +1 -0
- package/dist/components/ui-search-shell.d.ts +11 -0
- package/dist/components/ui-search-shell.js +1 -0
- package/dist/components/ui-select.d.ts +11 -0
- package/dist/components/ui-select.js +1 -0
- package/dist/components/ui-switch.d.ts +11 -0
- package/dist/components/ui-switch.js +1 -0
- package/dist/components/ui-tabs.d.ts +11 -0
- package/dist/components/ui-tabs.js +1 -0
- package/dist/components/ui-textarea.d.ts +11 -0
- package/dist/components/ui-textarea.js +1 -0
- package/dist/components/ui-toast-region.d.ts +11 -0
- package/dist/components/ui-toast-region.js +1 -0
- package/dist/components/ui-tooltip.d.ts +11 -0
- package/dist/components/ui-tooltip.js +1 -0
- package/dist/components/ui-top-bar.d.ts +11 -0
- package/dist/components/ui-top-bar.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/events-JwSoedEO.js +15 -0
- package/dist/esm/id-hgBUJRDa.js +7 -0
- package/dist/esm/index-CEeiinfk.js +1561 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/looma.js +21 -0
- package/dist/esm/manager-CR7f2MQC.js +89 -0
- package/dist/esm/ui-avatar-group.entry.js +49 -0
- package/dist/esm/ui-avatar.entry.js +48 -0
- package/dist/esm/ui-badge.entry.js +17 -0
- package/dist/esm/ui-button.entry.js +60 -0
- package/dist/esm/ui-checkbox.entry.js +89 -0
- package/dist/esm/ui-context-menu.entry.js +199 -0
- package/dist/esm/ui-dialog.entry.js +91 -0
- package/dist/esm/ui-disclosure.entry.js +107 -0
- package/dist/esm/ui-floating-action-button.entry.js +18 -0
- package/dist/esm/ui-form-field.entry.js +57 -0
- package/dist/esm/ui-icon-button.entry.js +19 -0
- package/dist/esm/ui-input.entry.js +99 -0
- package/dist/esm/ui-menu-item.entry.js +17 -0
- package/dist/esm/ui-menu.entry.js +94 -0
- package/dist/esm/ui-popover.entry.js +90 -0
- package/dist/esm/ui-radio-group.entry.js +132 -0
- package/dist/esm/ui-radio.entry.js +83 -0
- package/dist/esm/ui-search-result-row.entry.js +45 -0
- package/dist/esm/ui-search-shell.entry.js +37 -0
- package/dist/esm/ui-select.entry.js +98 -0
- package/dist/esm/ui-switch.entry.js +63 -0
- package/dist/esm/ui-tabs.entry.js +115 -0
- package/dist/esm/ui-textarea.entry.js +104 -0
- package/dist/esm/ui-toast-region.entry.js +65 -0
- package/dist/esm/ui-tooltip.entry.js +131 -0
- package/dist/esm/ui-top-bar.entry.js +41 -0
- package/dist/index.cjs +4062 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +129 -0
- package/dist/looma/index.esm.js +0 -0
- package/dist/looma/looma.esm.js +1 -0
- package/dist/looma/p-03f0594b.entry.js +1 -0
- package/dist/looma/p-15e619fd.entry.js +1 -0
- package/dist/looma/p-201243dc.entry.js +1 -0
- package/dist/looma/p-24d7aa5b.entry.js +1 -0
- package/dist/looma/p-341ba64a.entry.js +1 -0
- package/dist/looma/p-41d62a83.entry.js +1 -0
- package/dist/looma/p-4742e6b4.entry.js +1 -0
- package/dist/looma/p-4c54d489.entry.js +1 -0
- package/dist/looma/p-52c537fa.entry.js +1 -0
- package/dist/looma/p-5a645647.entry.js +1 -0
- package/dist/looma/p-610b2eca.entry.js +1 -0
- package/dist/looma/p-649dad92.entry.js +1 -0
- package/dist/looma/p-66a203a1.entry.js +1 -0
- package/dist/looma/p-754cfff3.entry.js +1 -0
- package/dist/looma/p-93ce1c62.entry.js +1 -0
- package/dist/looma/p-955fb814.entry.js +1 -0
- package/dist/looma/p-96de71ad.entry.js +1 -0
- package/dist/looma/p-CEeiinfk.js +2 -0
- package/dist/looma/p-CR7f2MQC.js +1 -0
- package/dist/looma/p-DQuL1Twl.js +1 -0
- package/dist/looma/p-JwSoedEO.js +1 -0
- package/dist/looma/p-ab4151d5.entry.js +1 -0
- package/dist/looma/p-c14233bc.entry.js +1 -0
- package/dist/looma/p-dc857ed4.entry.js +1 -0
- package/dist/looma/p-dfcb2cca.entry.js +1 -0
- package/dist/looma/p-dff144bd.entry.js +1 -0
- package/dist/looma/p-ebb74106.entry.js +1 -0
- package/dist/looma/p-ecb5739b.entry.js +1 -0
- package/dist/looma/p-ee31c7b4.entry.js +1 -0
- package/dist/looma/p-fa4659c4.entry.js +1 -0
- package/dist/looma/p-hgBUJRDa.js +1 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +11 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +12 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +5 -0
- package/dist/types/components/ui-button/ui-button.d.ts +13 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +19 -0
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +37 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +19 -0
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +20 -0
- package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +6 -0
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +10 -0
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +7 -0
- package/dist/types/components/ui-input/ui-input.d.ts +19 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +14 -0
- package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +5 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +16 -0
- package/dist/types/components/ui-radio/ui-radio.d.ts +17 -0
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +21 -0
- package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +15 -0
- package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +9 -0
- package/dist/types/components/ui-select/ui-select.d.ts +19 -0
- package/dist/types/components/ui-switch/ui-switch.d.ts +15 -0
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +17 -0
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +20 -0
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +12 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +24 -0
- package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +12 -0
- package/dist/types/components.d.ts +1148 -0
- package/dist/types/overlay/manager.d.ts +14 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/events.d.ts +4 -0
- package/dist/types/utils/id.d.ts +1 -0
- package/dist/types/utils/initials.d.ts +1 -0
- package/dist/ui-avatar-group.entry-BZGXBOSE.js +59 -0
- package/dist/ui-avatar.entry-S2O2W5SA.js +51 -0
- package/dist/ui-badge.entry-CVJDISCR.js +22 -0
- package/dist/ui-button.entry-LNJBEJFE.js +72 -0
- package/dist/ui-checkbox.entry-5RA2CB43.js +102 -0
- package/dist/ui-context-menu.entry-UUOCT75F.js +211 -0
- package/dist/ui-dialog.entry-OEPJTEES.js +106 -0
- package/dist/ui-disclosure.entry-LRRISGUD.js +120 -0
- package/dist/ui-floating-action-button.entry-7TSAZRXP.js +23 -0
- package/dist/ui-form-field.entry-73YOVICF.js +67 -0
- package/dist/ui-icon-button.entry-MNXGPG36.js +24 -0
- package/dist/ui-input.entry-UWRVAOSW.js +112 -0
- package/dist/ui-menu-item.entry-5AOJO5MP.js +22 -0
- package/dist/ui-menu.entry-YDS6UMB5.js +98 -0
- package/dist/ui-popover.entry-PGWDCQIX.js +104 -0
- package/dist/ui-radio-group.entry-RHP5GNWU.js +142 -0
- package/dist/ui-radio.entry-5WRWPSTK.js +96 -0
- package/dist/ui-search-result-row.entry-IKJB2SJJ.js +50 -0
- package/dist/ui-search-shell.entry-ZIWF4ZHH.js +41 -0
- package/dist/ui-select.entry-N5TIKHR7.js +111 -0
- package/dist/ui-switch.entry-WUSZTXIR.js +75 -0
- package/dist/ui-tabs.entry-UFAVAQIF.js +124 -0
- package/dist/ui-textarea.entry-BYT47RAQ.js +117 -0
- package/dist/ui-toast-region.entry-6UYR3ZU2.js +78 -0
- package/dist/ui-tooltip.entry-YS7UX4FS.js +145 -0
- package/dist/ui-top-bar.entry-V27H6NFO.js +49 -0
- package/editor/chunk-JKRA4D4W.js +435 -0
- package/editor/chunk-NOOV344H.js +783 -0
- package/editor/extensions/index.d.ts +78 -0
- package/editor/extensions/index.js +28 -0
- package/editor/index.d.ts +7 -0
- package/editor/index.js +29 -0
- package/editor/table-overlay-DTr3KC9e.d.ts +12 -0
- package/editor/ui.d.ts +48 -0
- package/editor/ui.js +1 -0
- package/editor.css +662 -0
- package/layout/index.cjs +207 -0
- package/layout/index.css +166 -0
- package/layout/index.d.cts +3 -0
- package/layout/index.d.ts +3 -0
- package/layout/index.js +182 -0
- package/layout.css +124 -0
- 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 +244 -0
- package/styles.css +899 -0
- package/theme-dark.css +59 -0
- package/theme-high-contrast.css +21 -0
- package/theme-light.css +30 -0
- package/tokens.css +148 -0
- package/vue/chunk-J4UBEIIL.js +83 -0
- package/vue/editor/index.d.ts +89 -0
- package/vue/editor/index.js +125 -0
- package/vue/index.d.ts +167 -0
- package/vue/index.js +113 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dispatchDetail,
|
|
3
|
+
eventToTrigger
|
|
4
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
5
|
+
import {
|
|
6
|
+
Host,
|
|
7
|
+
getElement,
|
|
8
|
+
h,
|
|
9
|
+
registerInstance
|
|
10
|
+
} from "./chunk-YK4MTZGJ.js";
|
|
11
|
+
|
|
12
|
+
// dist/esm/ui-textarea.entry.js
|
|
13
|
+
var uiTextareaCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
14
|
+
var UITextarea = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
registerInstance(this, hostRef);
|
|
17
|
+
}
|
|
18
|
+
get host() {
|
|
19
|
+
return getElement(this);
|
|
20
|
+
}
|
|
21
|
+
value = "";
|
|
22
|
+
defaultValue = "";
|
|
23
|
+
disabled = false;
|
|
24
|
+
invalid = false;
|
|
25
|
+
readOnly = false;
|
|
26
|
+
rows = 4;
|
|
27
|
+
internalValue = "";
|
|
28
|
+
slotRef;
|
|
29
|
+
syncFromProp() {
|
|
30
|
+
this.internalValue = this.value;
|
|
31
|
+
}
|
|
32
|
+
syncToTextarea() {
|
|
33
|
+
const textarea = this.getTextarea();
|
|
34
|
+
if (!textarea)
|
|
35
|
+
return;
|
|
36
|
+
this.host.dataset.invalid = this.invalid ? "true" : "";
|
|
37
|
+
textarea.value = this.internalValue;
|
|
38
|
+
textarea.defaultValue = this.defaultValue;
|
|
39
|
+
textarea.disabled = this.disabled;
|
|
40
|
+
textarea.readOnly = this.readOnly;
|
|
41
|
+
textarea.rows = this.rows;
|
|
42
|
+
textarea.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
43
|
+
}
|
|
44
|
+
componentDidLoad() {
|
|
45
|
+
this.syncFromProp();
|
|
46
|
+
this.slotRef?.addEventListener("slotchange", () => this.syncToTextarea());
|
|
47
|
+
this.syncToTextarea();
|
|
48
|
+
const textarea = this.getTextarea();
|
|
49
|
+
textarea?.addEventListener("input", this.onInput);
|
|
50
|
+
textarea?.addEventListener("change", this.onChange);
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
const textarea = this.getTextarea();
|
|
54
|
+
textarea?.removeEventListener("input", this.onInput);
|
|
55
|
+
textarea?.removeEventListener("change", this.onChange);
|
|
56
|
+
}
|
|
57
|
+
componentDidUpdate() {
|
|
58
|
+
this.syncToTextarea();
|
|
59
|
+
}
|
|
60
|
+
getTextarea() {
|
|
61
|
+
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
62
|
+
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
63
|
+
return nodes.find((el) => el.tagName === "TEXTAREA") ?? null;
|
|
64
|
+
}
|
|
65
|
+
onInput = (e) => {
|
|
66
|
+
const textarea = e.target;
|
|
67
|
+
if (!textarea)
|
|
68
|
+
return;
|
|
69
|
+
this.internalValue = textarea.value;
|
|
70
|
+
dispatchDetail(this.host, "input", {
|
|
71
|
+
value: this.internalValue,
|
|
72
|
+
trigger: eventToTrigger(e)
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
onChange = (e) => {
|
|
76
|
+
const textarea = this.getTextarea();
|
|
77
|
+
if (!textarea)
|
|
78
|
+
return;
|
|
79
|
+
this.internalValue = textarea.value;
|
|
80
|
+
dispatchDetail(this.host, "change", {
|
|
81
|
+
value: this.internalValue,
|
|
82
|
+
trigger: eventToTrigger(e)
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
render() {
|
|
86
|
+
return h(Host, { key: "d52719875939fa9b2f757a35fb4cd1aa31a194c5", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "e40ba71b60cae07437219d6ab4b5879b26af1ac2", ref: (el) => this.slotRef = el }));
|
|
87
|
+
}
|
|
88
|
+
static get watchers() {
|
|
89
|
+
return {
|
|
90
|
+
"value": [{
|
|
91
|
+
"syncFromProp": 0
|
|
92
|
+
}],
|
|
93
|
+
"internalValue": [{
|
|
94
|
+
"syncToTextarea": 0
|
|
95
|
+
}],
|
|
96
|
+
"defaultValue": [{
|
|
97
|
+
"syncToTextarea": 0
|
|
98
|
+
}],
|
|
99
|
+
"disabled": [{
|
|
100
|
+
"syncToTextarea": 0
|
|
101
|
+
}],
|
|
102
|
+
"invalid": [{
|
|
103
|
+
"syncToTextarea": 0
|
|
104
|
+
}],
|
|
105
|
+
"readOnly": [{
|
|
106
|
+
"syncToTextarea": 0
|
|
107
|
+
}],
|
|
108
|
+
"rows": [{
|
|
109
|
+
"syncToTextarea": 0
|
|
110
|
+
}]
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
UITextarea.style = uiTextareaCss();
|
|
115
|
+
export {
|
|
116
|
+
UITextarea as ui_textarea
|
|
117
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dispatchDetail,
|
|
3
|
+
eventToTrigger
|
|
4
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
5
|
+
import {
|
|
6
|
+
Host,
|
|
7
|
+
getElement,
|
|
8
|
+
h,
|
|
9
|
+
registerInstance
|
|
10
|
+
} from "./chunk-YK4MTZGJ.js";
|
|
11
|
+
|
|
12
|
+
// dist/esm/ui-toast-region.entry.js
|
|
13
|
+
var uiToastRegionCss = () => `:host{position:fixed;top:var(--ui-space-4);left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);max-width:min(24rem, 90vw);pointer-events:none}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}`;
|
|
14
|
+
var UIToastRegion = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
registerInstance(this, hostRef);
|
|
17
|
+
}
|
|
18
|
+
get host() {
|
|
19
|
+
return getElement(this);
|
|
20
|
+
}
|
|
21
|
+
open = true;
|
|
22
|
+
internalOpen = true;
|
|
23
|
+
syncFromProp() {
|
|
24
|
+
this.internalOpen = this.open;
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.syncFromProp();
|
|
28
|
+
this.host.addEventListener("click", this.onClick);
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.host.removeEventListener("click", this.onClick);
|
|
32
|
+
}
|
|
33
|
+
getToasts() {
|
|
34
|
+
return Array.from(this.host.querySelectorAll("[data-ui-toast]"));
|
|
35
|
+
}
|
|
36
|
+
updateOpenState() {
|
|
37
|
+
const toasts = this.getToasts();
|
|
38
|
+
this.internalOpen = toasts.length > 0;
|
|
39
|
+
}
|
|
40
|
+
onClick = (e) => {
|
|
41
|
+
const dismissBtn = e.target.closest?.("[data-ui-toast-dismiss]");
|
|
42
|
+
if (!dismissBtn)
|
|
43
|
+
return;
|
|
44
|
+
const toast = dismissBtn.closest?.("[data-ui-toast]");
|
|
45
|
+
if (!toast)
|
|
46
|
+
return;
|
|
47
|
+
const id = toast.id ?? "";
|
|
48
|
+
toast.setAttribute("aria-hidden", "true");
|
|
49
|
+
toast.remove();
|
|
50
|
+
dispatchDetail(this.host, "dismiss", {
|
|
51
|
+
id,
|
|
52
|
+
reason: "action",
|
|
53
|
+
trigger: eventToTrigger(e)
|
|
54
|
+
});
|
|
55
|
+
this.updateOpenState();
|
|
56
|
+
if (this.getToasts().length === 0) {
|
|
57
|
+
dispatchDetail(this.host, "close", {
|
|
58
|
+
open: false,
|
|
59
|
+
reason: "action",
|
|
60
|
+
trigger: eventToTrigger(e)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
render() {
|
|
65
|
+
return h(Host, { key: "8e99577d8770984b8d6d29e442931570c1f1bc4d", role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "06f2c6cf39c4795afc0937669aa2104821aef3d6" }));
|
|
66
|
+
}
|
|
67
|
+
static get watchers() {
|
|
68
|
+
return {
|
|
69
|
+
"open": [{
|
|
70
|
+
"syncFromProp": 0
|
|
71
|
+
}]
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
UIToastRegion.style = uiToastRegionCss();
|
|
76
|
+
export {
|
|
77
|
+
UIToastRegion as ui_toast_region
|
|
78
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
closeOverlay,
|
|
3
|
+
openOverlay,
|
|
4
|
+
requestTopOverlayClose
|
|
5
|
+
} from "./chunk-G53JEAQK.js";
|
|
6
|
+
import {
|
|
7
|
+
dispatchDetail
|
|
8
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
9
|
+
import {
|
|
10
|
+
Host,
|
|
11
|
+
getElement,
|
|
12
|
+
h,
|
|
13
|
+
registerInstance
|
|
14
|
+
} from "./chunk-YK4MTZGJ.js";
|
|
15
|
+
|
|
16
|
+
// dist/esm/ui-tooltip.entry.js
|
|
17
|
+
var uiTooltipCss = () => `:host{display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host([hidden]){display:none !important}`;
|
|
18
|
+
var UITooltip = class {
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
registerInstance(this, hostRef);
|
|
21
|
+
}
|
|
22
|
+
get host() {
|
|
23
|
+
return getElement(this);
|
|
24
|
+
}
|
|
25
|
+
for = "";
|
|
26
|
+
open = false;
|
|
27
|
+
defaultOpen = false;
|
|
28
|
+
internalOpen = false;
|
|
29
|
+
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
30
|
+
trigger = null;
|
|
31
|
+
syncFromProp() {
|
|
32
|
+
this.internalOpen = this.open;
|
|
33
|
+
}
|
|
34
|
+
syncOverlay() {
|
|
35
|
+
if (this.internalOpen) {
|
|
36
|
+
openOverlay({
|
|
37
|
+
id: this.overlayId,
|
|
38
|
+
modal: false,
|
|
39
|
+
element: this.host,
|
|
40
|
+
dismissible: true,
|
|
41
|
+
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger)
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
closeOverlay(this.overlayId);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
componentDidLoad() {
|
|
48
|
+
this.syncFromProp();
|
|
49
|
+
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
50
|
+
this.resolveTrigger();
|
|
51
|
+
this.attachTriggerListeners();
|
|
52
|
+
this.host.addEventListener("keydown", this.onKeydown);
|
|
53
|
+
this.syncOverlay();
|
|
54
|
+
}
|
|
55
|
+
componentDidUpdate() {
|
|
56
|
+
this.resolveTrigger();
|
|
57
|
+
this.attachTriggerListeners();
|
|
58
|
+
this.syncOverlay();
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
this.detachTriggerListeners();
|
|
62
|
+
this.host.removeEventListener("keydown", this.onKeydown);
|
|
63
|
+
closeOverlay(this.overlayId);
|
|
64
|
+
}
|
|
65
|
+
resolveTrigger() {
|
|
66
|
+
if (this.for) {
|
|
67
|
+
this.trigger = document.getElementById(this.for);
|
|
68
|
+
} else {
|
|
69
|
+
this.trigger = this.host.previousElementSibling;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
attachTriggerListeners() {
|
|
73
|
+
this.detachTriggerListeners();
|
|
74
|
+
if (!this.trigger)
|
|
75
|
+
return;
|
|
76
|
+
this.trigger.addEventListener("pointerenter", this.onTriggerEnter);
|
|
77
|
+
this.trigger.addEventListener("pointerleave", this.onTriggerLeave);
|
|
78
|
+
this.trigger.addEventListener("focusin", this.onTriggerFocusIn);
|
|
79
|
+
this.trigger.addEventListener("focusout", this.onTriggerFocusOut);
|
|
80
|
+
}
|
|
81
|
+
detachTriggerListeners() {
|
|
82
|
+
if (!this.trigger)
|
|
83
|
+
return;
|
|
84
|
+
this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
|
|
85
|
+
this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
|
|
86
|
+
this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
|
|
87
|
+
this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
|
|
88
|
+
}
|
|
89
|
+
onTriggerEnter = () => {
|
|
90
|
+
this.internalOpen = true;
|
|
91
|
+
dispatchDetail(this.host, "open", { open: true, reason: "action", trigger: "pointer" });
|
|
92
|
+
this.syncOverlay();
|
|
93
|
+
};
|
|
94
|
+
onTriggerLeave = () => {
|
|
95
|
+
this.internalOpen = false;
|
|
96
|
+
dispatchDetail(this.host, "close", { open: false, reason: "action", trigger: "pointer" });
|
|
97
|
+
this.syncOverlay();
|
|
98
|
+
};
|
|
99
|
+
onTriggerFocusIn = () => {
|
|
100
|
+
this.internalOpen = true;
|
|
101
|
+
dispatchDetail(this.host, "open", { open: true, reason: "action", trigger: "keyboard" });
|
|
102
|
+
this.syncOverlay();
|
|
103
|
+
};
|
|
104
|
+
onTriggerFocusOut = (e) => {
|
|
105
|
+
const related = e.relatedTarget;
|
|
106
|
+
if (related && this.host.contains(related))
|
|
107
|
+
return;
|
|
108
|
+
this.internalOpen = false;
|
|
109
|
+
dispatchDetail(this.host, "close", { open: false, reason: "action", trigger: "keyboard" });
|
|
110
|
+
this.syncOverlay();
|
|
111
|
+
};
|
|
112
|
+
handleRequestClose(reason, trigger) {
|
|
113
|
+
if (reason === "escape") {
|
|
114
|
+
this.internalOpen = false;
|
|
115
|
+
dispatchDetail(this.host, "close", {
|
|
116
|
+
open: false,
|
|
117
|
+
reason: "escape",
|
|
118
|
+
trigger
|
|
119
|
+
});
|
|
120
|
+
this.trigger?.focus();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
onKeydown = (e) => {
|
|
124
|
+
if (e.key === "Escape") {
|
|
125
|
+
requestTopOverlayClose("escape", "keyboard");
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
render() {
|
|
129
|
+
return h(Host, { key: "900ec6fc08ea7a7965195e8203fd779e70cfa6e6", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "b384f779fa9a229cf635be5adb3476ca93270c24" }));
|
|
130
|
+
}
|
|
131
|
+
static get watchers() {
|
|
132
|
+
return {
|
|
133
|
+
"open": [{
|
|
134
|
+
"syncFromProp": 0
|
|
135
|
+
}],
|
|
136
|
+
"internalOpen": [{
|
|
137
|
+
"syncOverlay": 0
|
|
138
|
+
}]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
UITooltip.style = uiTooltipCss();
|
|
143
|
+
export {
|
|
144
|
+
UITooltip as ui_tooltip
|
|
145
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
getElement,
|
|
4
|
+
h,
|
|
5
|
+
registerInstance
|
|
6
|
+
} from "./chunk-YK4MTZGJ.js";
|
|
7
|
+
|
|
8
|
+
// dist/esm/ui-top-bar.entry.js
|
|
9
|
+
var uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:var(--ui-top-bar-height, 56px);display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem));background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
|
|
10
|
+
function slotHasContent(slot) {
|
|
11
|
+
if (!slot) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
15
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
16
|
+
return Boolean(node.textContent?.trim());
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
var UITopBar = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
registerInstance(this, hostRef);
|
|
24
|
+
}
|
|
25
|
+
get host() {
|
|
26
|
+
return getElement(this);
|
|
27
|
+
}
|
|
28
|
+
hasLeading = false;
|
|
29
|
+
hasSearch = false;
|
|
30
|
+
hasActions = false;
|
|
31
|
+
leadingSlot;
|
|
32
|
+
searchSlot;
|
|
33
|
+
actionsSlot;
|
|
34
|
+
componentDidLoad() {
|
|
35
|
+
this.syncSlots();
|
|
36
|
+
}
|
|
37
|
+
syncSlots = () => {
|
|
38
|
+
this.hasLeading = slotHasContent(this.leadingSlot);
|
|
39
|
+
this.hasSearch = slotHasContent(this.searchSlot);
|
|
40
|
+
this.hasActions = slotHasContent(this.actionsSlot);
|
|
41
|
+
};
|
|
42
|
+
render() {
|
|
43
|
+
return h(Host, { key: "23cbff2fdb06a40f0380dbf217d064cb1b9f7a9c" }, h("header", { key: "9472960f4445f8ed7d0800d71db3cbac020fca3f", class: "top-bar", part: "base" }, h("div", { key: "d408be025d90fdcf1416213b9e76f3b780f47d97", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "3dc4db316a040ff10a8b8b218b42799d3e1a7b97", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "1b362f19f9a738600afb266e9641c0ee5c8870c9", class: "top-bar__title" }, h("slot", { key: "bb93d34a3dea15c697dcd19dc0ecc3488ee390c8" })), h("div", { key: "3d61d781b654ee1d91a6ce5ba64db9732ee1f8ee", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "5731817be644f10ed745fdc0868b85b66a9c06d4", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "2ee868b93f5195832830900382545b2131e78bb8", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "1d410fa60f112904cfb866cff5a3f2fb18021c93", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
UITopBar.style = uiTopBarCss();
|
|
47
|
+
export {
|
|
48
|
+
UITopBar as ui_top_bar
|
|
49
|
+
};
|