@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,205 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { openOverlay, closeOverlay, requestTopOverlayClose } from "../../overlay/manager";
|
|
3
|
+
import { dispatchDetail } from "../../utils/events";
|
|
4
|
+
export class UITooltip {
|
|
5
|
+
host;
|
|
6
|
+
for = '';
|
|
7
|
+
open = false;
|
|
8
|
+
defaultOpen = false;
|
|
9
|
+
internalOpen = false;
|
|
10
|
+
overlayId = `ui-tooltip-${Math.random().toString(36).slice(2, 11)}`;
|
|
11
|
+
trigger = null;
|
|
12
|
+
syncFromProp() {
|
|
13
|
+
this.internalOpen = this.open;
|
|
14
|
+
}
|
|
15
|
+
syncOverlay() {
|
|
16
|
+
if (this.internalOpen) {
|
|
17
|
+
openOverlay({
|
|
18
|
+
id: this.overlayId,
|
|
19
|
+
modal: false,
|
|
20
|
+
element: this.host,
|
|
21
|
+
dismissible: true,
|
|
22
|
+
requestClose: (reason, trigger) => this.handleRequestClose(reason, trigger),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
closeOverlay(this.overlayId);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
componentDidLoad() {
|
|
30
|
+
this.syncFromProp();
|
|
31
|
+
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
32
|
+
this.resolveTrigger();
|
|
33
|
+
this.attachTriggerListeners();
|
|
34
|
+
this.host.addEventListener('keydown', this.onKeydown);
|
|
35
|
+
this.syncOverlay();
|
|
36
|
+
}
|
|
37
|
+
componentDidUpdate() {
|
|
38
|
+
this.resolveTrigger();
|
|
39
|
+
this.attachTriggerListeners();
|
|
40
|
+
this.syncOverlay();
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.detachTriggerListeners();
|
|
44
|
+
this.host.removeEventListener('keydown', this.onKeydown);
|
|
45
|
+
closeOverlay(this.overlayId);
|
|
46
|
+
}
|
|
47
|
+
resolveTrigger() {
|
|
48
|
+
if (this.for) {
|
|
49
|
+
this.trigger = document.getElementById(this.for);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.trigger = this.host.previousElementSibling;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
attachTriggerListeners() {
|
|
56
|
+
this.detachTriggerListeners();
|
|
57
|
+
if (!this.trigger)
|
|
58
|
+
return;
|
|
59
|
+
this.trigger.addEventListener('pointerenter', this.onTriggerEnter);
|
|
60
|
+
this.trigger.addEventListener('pointerleave', this.onTriggerLeave);
|
|
61
|
+
this.trigger.addEventListener('focusin', this.onTriggerFocusIn);
|
|
62
|
+
this.trigger.addEventListener('focusout', this.onTriggerFocusOut);
|
|
63
|
+
}
|
|
64
|
+
detachTriggerListeners() {
|
|
65
|
+
if (!this.trigger)
|
|
66
|
+
return;
|
|
67
|
+
this.trigger.removeEventListener('pointerenter', this.onTriggerEnter);
|
|
68
|
+
this.trigger.removeEventListener('pointerleave', this.onTriggerLeave);
|
|
69
|
+
this.trigger.removeEventListener('focusin', this.onTriggerFocusIn);
|
|
70
|
+
this.trigger.removeEventListener('focusout', this.onTriggerFocusOut);
|
|
71
|
+
}
|
|
72
|
+
onTriggerEnter = () => {
|
|
73
|
+
this.internalOpen = true;
|
|
74
|
+
dispatchDetail(this.host, 'open', { open: true, reason: 'action', trigger: 'pointer' });
|
|
75
|
+
this.syncOverlay();
|
|
76
|
+
};
|
|
77
|
+
onTriggerLeave = () => {
|
|
78
|
+
this.internalOpen = false;
|
|
79
|
+
dispatchDetail(this.host, 'close', { open: false, reason: 'action', trigger: 'pointer' });
|
|
80
|
+
this.syncOverlay();
|
|
81
|
+
};
|
|
82
|
+
onTriggerFocusIn = () => {
|
|
83
|
+
this.internalOpen = true;
|
|
84
|
+
dispatchDetail(this.host, 'open', { open: true, reason: 'action', trigger: 'keyboard' });
|
|
85
|
+
this.syncOverlay();
|
|
86
|
+
};
|
|
87
|
+
onTriggerFocusOut = (e) => {
|
|
88
|
+
const related = e.relatedTarget;
|
|
89
|
+
if (related && this.host.contains(related))
|
|
90
|
+
return;
|
|
91
|
+
this.internalOpen = false;
|
|
92
|
+
dispatchDetail(this.host, 'close', { open: false, reason: 'action', trigger: 'keyboard' });
|
|
93
|
+
this.syncOverlay();
|
|
94
|
+
};
|
|
95
|
+
handleRequestClose(reason, trigger) {
|
|
96
|
+
if (reason === 'escape') {
|
|
97
|
+
this.internalOpen = false;
|
|
98
|
+
dispatchDetail(this.host, 'close', {
|
|
99
|
+
open: false,
|
|
100
|
+
reason: 'escape',
|
|
101
|
+
trigger: trigger,
|
|
102
|
+
});
|
|
103
|
+
this.trigger?.focus();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
onKeydown = (e) => {
|
|
107
|
+
if (e.key === 'Escape') {
|
|
108
|
+
requestTopOverlayClose('escape', 'keyboard');
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
render() {
|
|
112
|
+
return (h(Host, { key: '900ec6fc08ea7a7965195e8203fd779e70cfa6e6', role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, h("slot", { key: 'b384f779fa9a229cf635be5adb3476ca93270c24' })));
|
|
113
|
+
}
|
|
114
|
+
static get is() { return "ui-tooltip"; }
|
|
115
|
+
static get encapsulation() { return "shadow"; }
|
|
116
|
+
static get originalStyleUrls() {
|
|
117
|
+
return {
|
|
118
|
+
"$": ["ui-tooltip.css"]
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
static get styleUrls() {
|
|
122
|
+
return {
|
|
123
|
+
"$": ["ui-tooltip.css"]
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
static get properties() {
|
|
127
|
+
return {
|
|
128
|
+
"for": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "string",
|
|
133
|
+
"resolved": "string",
|
|
134
|
+
"references": {}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": false,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [],
|
|
140
|
+
"text": ""
|
|
141
|
+
},
|
|
142
|
+
"getter": false,
|
|
143
|
+
"setter": false,
|
|
144
|
+
"reflect": false,
|
|
145
|
+
"attribute": "for",
|
|
146
|
+
"defaultValue": "''"
|
|
147
|
+
},
|
|
148
|
+
"open": {
|
|
149
|
+
"type": "boolean",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "boolean",
|
|
153
|
+
"resolved": "boolean",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": false,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"attribute": "open",
|
|
166
|
+
"defaultValue": "false"
|
|
167
|
+
},
|
|
168
|
+
"defaultOpen": {
|
|
169
|
+
"type": "boolean",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "boolean",
|
|
173
|
+
"resolved": "boolean",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": ""
|
|
181
|
+
},
|
|
182
|
+
"getter": false,
|
|
183
|
+
"setter": false,
|
|
184
|
+
"reflect": false,
|
|
185
|
+
"attribute": "default-open",
|
|
186
|
+
"defaultValue": "false"
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
static get states() {
|
|
191
|
+
return {
|
|
192
|
+
"internalOpen": {}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
static get elementRef() { return "host"; }
|
|
196
|
+
static get watchers() {
|
|
197
|
+
return [{
|
|
198
|
+
"propName": "open",
|
|
199
|
+
"methodName": "syncFromProp"
|
|
200
|
+
}, {
|
|
201
|
+
"propName": "internalOpen",
|
|
202
|
+
"methodName": "syncOverlay"
|
|
203
|
+
}];
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: sticky;
|
|
3
|
+
inset-block-start: 0;
|
|
4
|
+
z-index: var(--ui-top-bar-z-index, 100);
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.top-bar {
|
|
9
|
+
min-block-size: var(--ui-top-bar-height, 56px);
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));
|
|
13
|
+
padding-inline: var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem));
|
|
14
|
+
background: var(--ui-top-bar-bg, var(--ui-surface, #ffffff));
|
|
15
|
+
border-block-end: 1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.top-bar__leading,
|
|
19
|
+
.top-bar__search,
|
|
20
|
+
.top-bar__actions {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.top-bar__actions {
|
|
27
|
+
gap: var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.top-bar__title {
|
|
31
|
+
min-inline-size: 0;
|
|
32
|
+
flex: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[hidden] {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 768px) {
|
|
40
|
+
:host {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
function slotHasContent(slot) {
|
|
3
|
+
if (!slot) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
7
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
8
|
+
return Boolean(node.textContent?.trim());
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export class UITopBar {
|
|
14
|
+
host;
|
|
15
|
+
hasLeading = false;
|
|
16
|
+
hasSearch = false;
|
|
17
|
+
hasActions = false;
|
|
18
|
+
leadingSlot;
|
|
19
|
+
searchSlot;
|
|
20
|
+
actionsSlot;
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.syncSlots();
|
|
23
|
+
}
|
|
24
|
+
syncSlots = () => {
|
|
25
|
+
this.hasLeading = slotHasContent(this.leadingSlot);
|
|
26
|
+
this.hasSearch = slotHasContent(this.searchSlot);
|
|
27
|
+
this.hasActions = slotHasContent(this.actionsSlot);
|
|
28
|
+
};
|
|
29
|
+
render() {
|
|
30
|
+
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 })))));
|
|
31
|
+
}
|
|
32
|
+
static get is() { return "ui-top-bar"; }
|
|
33
|
+
static get encapsulation() { return "shadow"; }
|
|
34
|
+
static get originalStyleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["ui-top-bar.css"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get styleUrls() {
|
|
40
|
+
return {
|
|
41
|
+
"$": ["ui-top-bar.css"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static get states() {
|
|
45
|
+
return {
|
|
46
|
+
"hasLeading": {},
|
|
47
|
+
"hasSearch": {},
|
|
48
|
+
"hasActions": {}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static get elementRef() { return "host"; }
|
|
52
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const stack = [];
|
|
2
|
+
const scrollLockAttribute = "data-ui-scroll-lock";
|
|
3
|
+
let modalCount = 0;
|
|
4
|
+
let listenersAttached = false;
|
|
5
|
+
function syncScrollLock() {
|
|
6
|
+
if (typeof document === "undefined") {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const root = document.documentElement;
|
|
10
|
+
if (modalCount > 0) {
|
|
11
|
+
root.setAttribute(scrollLockAttribute, "true");
|
|
12
|
+
root.style.overflow = "hidden";
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
root.removeAttribute(scrollLockAttribute);
|
|
16
|
+
root.style.removeProperty("overflow");
|
|
17
|
+
}
|
|
18
|
+
function getOverlayDismissible(record) {
|
|
19
|
+
return record.dismissible ?? true;
|
|
20
|
+
}
|
|
21
|
+
function handleEscape(event) {
|
|
22
|
+
if (event.key !== "Escape") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
requestTopOverlayClose("escape", "keyboard");
|
|
26
|
+
}
|
|
27
|
+
function handleLightDismiss(event) {
|
|
28
|
+
const top = getTopOverlay();
|
|
29
|
+
if (!top || !getOverlayDismissible(top)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const target = event.target;
|
|
33
|
+
if (target instanceof Node && top.element.contains(target)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
requestTopOverlayClose("light-dismiss", "pointer");
|
|
37
|
+
}
|
|
38
|
+
function ensureListeners() {
|
|
39
|
+
if (listenersAttached || typeof document === "undefined") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
document.addEventListener("keydown", handleEscape);
|
|
43
|
+
document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
44
|
+
listenersAttached = true;
|
|
45
|
+
}
|
|
46
|
+
function removeListenersIfIdle() {
|
|
47
|
+
if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
document.removeEventListener("keydown", handleEscape);
|
|
51
|
+
document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
|
|
52
|
+
listenersAttached = false;
|
|
53
|
+
}
|
|
54
|
+
export function openOverlay(record) {
|
|
55
|
+
closeOverlay(record.id);
|
|
56
|
+
stack.push(record);
|
|
57
|
+
if (record.modal) {
|
|
58
|
+
modalCount += 1;
|
|
59
|
+
syncScrollLock();
|
|
60
|
+
}
|
|
61
|
+
ensureListeners();
|
|
62
|
+
}
|
|
63
|
+
export function closeOverlay(id) {
|
|
64
|
+
const index = stack.findIndex((record) => record.id === id);
|
|
65
|
+
if (index >= 0) {
|
|
66
|
+
const [record] = stack.splice(index, 1);
|
|
67
|
+
if (record?.modal) {
|
|
68
|
+
modalCount = Math.max(0, modalCount - 1);
|
|
69
|
+
syncScrollLock();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
removeListenersIfIdle();
|
|
73
|
+
}
|
|
74
|
+
export function getTopOverlay() {
|
|
75
|
+
return stack.at(-1);
|
|
76
|
+
}
|
|
77
|
+
export function isTopOverlay(id) {
|
|
78
|
+
return getTopOverlay()?.id === id;
|
|
79
|
+
}
|
|
80
|
+
export function requestTopOverlayClose(reason, trigger) {
|
|
81
|
+
const top = getTopOverlay();
|
|
82
|
+
if (!top) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
top.requestClose(reason, trigger);
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function eventToTrigger(event) {
|
|
2
|
+
if (event instanceof KeyboardEvent)
|
|
3
|
+
return 'keyboard';
|
|
4
|
+
if (event instanceof PointerEvent || event instanceof MouseEvent)
|
|
5
|
+
return 'pointer';
|
|
6
|
+
return 'programmatic';
|
|
7
|
+
}
|
|
8
|
+
export function isActivationKey(event) {
|
|
9
|
+
return event.key === 'Enter' || event.key === ' ';
|
|
10
|
+
}
|
|
11
|
+
export function dispatchDetail(el, name, detail) {
|
|
12
|
+
el.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function toInitials(value) {
|
|
2
|
+
const tokens = value
|
|
3
|
+
.trim()
|
|
4
|
+
.split(/\s+/)
|
|
5
|
+
.filter((token) => token.length > 0);
|
|
6
|
+
if (tokens.length === 0)
|
|
7
|
+
return '?';
|
|
8
|
+
if (tokens.length === 1)
|
|
9
|
+
return tokens[0].slice(0, 2).toUpperCase();
|
|
10
|
+
return `${tokens[0][0] ?? ''}${tokens[1][0] ?? ''}`.toUpperCase();
|
|
11
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* looma custom elements */
|
|
2
|
+
export { UIAvatar as UiAvatar } from '../types/components/ui-avatar/ui-avatar';
|
|
3
|
+
export { defineCustomElement as defineCustomElementUiAvatar } from './ui-avatar';
|
|
4
|
+
export { UIAvatarGroup as UiAvatarGroup } from '../types/components/ui-avatar-group/ui-avatar-group';
|
|
5
|
+
export { defineCustomElement as defineCustomElementUiAvatarGroup } from './ui-avatar-group';
|
|
6
|
+
export { UIBadge as UiBadge } from '../types/components/ui-badge/ui-badge';
|
|
7
|
+
export { defineCustomElement as defineCustomElementUiBadge } from './ui-badge';
|
|
8
|
+
export { UIButton as UiButton } from '../types/components/ui-button/ui-button';
|
|
9
|
+
export { defineCustomElement as defineCustomElementUiButton } from './ui-button';
|
|
10
|
+
export { UICheckbox as UiCheckbox } from '../types/components/ui-checkbox/ui-checkbox';
|
|
11
|
+
export { defineCustomElement as defineCustomElementUiCheckbox } from './ui-checkbox';
|
|
12
|
+
export { UIContextMenu as UiContextMenu } from '../types/components/ui-context-menu/ui-context-menu';
|
|
13
|
+
export { defineCustomElement as defineCustomElementUiContextMenu } from './ui-context-menu';
|
|
14
|
+
export { UIDialog as UiDialog } from '../types/components/ui-dialog/ui-dialog';
|
|
15
|
+
export { defineCustomElement as defineCustomElementUiDialog } from './ui-dialog';
|
|
16
|
+
export { UIDisclosure as UiDisclosure } from '../types/components/ui-disclosure/ui-disclosure';
|
|
17
|
+
export { defineCustomElement as defineCustomElementUiDisclosure } from './ui-disclosure';
|
|
18
|
+
export { UIFloatingActionButton as UiFloatingActionButton } from '../types/components/ui-floating-action-button/ui-floating-action-button';
|
|
19
|
+
export { defineCustomElement as defineCustomElementUiFloatingActionButton } from './ui-floating-action-button';
|
|
20
|
+
export { UIFormField as UiFormField } from '../types/components/ui-form-field/ui-form-field';
|
|
21
|
+
export { defineCustomElement as defineCustomElementUiFormField } from './ui-form-field';
|
|
22
|
+
export { UIIconButton as UiIconButton } from '../types/components/ui-icon-button/ui-icon-button';
|
|
23
|
+
export { defineCustomElement as defineCustomElementUiIconButton } from './ui-icon-button';
|
|
24
|
+
export { UIInput as UiInput } from '../types/components/ui-input/ui-input';
|
|
25
|
+
export { defineCustomElement as defineCustomElementUiInput } from './ui-input';
|
|
26
|
+
export { UIMenu as UiMenu } from '../types/components/ui-menu/ui-menu';
|
|
27
|
+
export { defineCustomElement as defineCustomElementUiMenu } from './ui-menu';
|
|
28
|
+
export { UIMenuItem as UiMenuItem } from '../types/components/ui-menu-item/ui-menu-item';
|
|
29
|
+
export { defineCustomElement as defineCustomElementUiMenuItem } from './ui-menu-item';
|
|
30
|
+
export { UIPopover as UiPopover } from '../types/components/ui-popover/ui-popover';
|
|
31
|
+
export { defineCustomElement as defineCustomElementUiPopover } from './ui-popover';
|
|
32
|
+
export { UIRadio as UiRadio } from '../types/components/ui-radio/ui-radio';
|
|
33
|
+
export { defineCustomElement as defineCustomElementUiRadio } from './ui-radio';
|
|
34
|
+
export { UIRadioGroup as UiRadioGroup } from '../types/components/ui-radio-group/ui-radio-group';
|
|
35
|
+
export { defineCustomElement as defineCustomElementUiRadioGroup } from './ui-radio-group';
|
|
36
|
+
export { UISearchResultRow as UiSearchResultRow } from '../types/components/ui-search-result-row/ui-search-result-row';
|
|
37
|
+
export { defineCustomElement as defineCustomElementUiSearchResultRow } from './ui-search-result-row';
|
|
38
|
+
export { UISearchShell as UiSearchShell } from '../types/components/ui-search-shell/ui-search-shell';
|
|
39
|
+
export { defineCustomElement as defineCustomElementUiSearchShell } from './ui-search-shell';
|
|
40
|
+
export { UISelect as UiSelect } from '../types/components/ui-select/ui-select';
|
|
41
|
+
export { defineCustomElement as defineCustomElementUiSelect } from './ui-select';
|
|
42
|
+
export { UISwitch as UiSwitch } from '../types/components/ui-switch/ui-switch';
|
|
43
|
+
export { defineCustomElement as defineCustomElementUiSwitch } from './ui-switch';
|
|
44
|
+
export { UITabs as UiTabs } from '../types/components/ui-tabs/ui-tabs';
|
|
45
|
+
export { defineCustomElement as defineCustomElementUiTabs } from './ui-tabs';
|
|
46
|
+
export { UITextarea as UiTextarea } from '../types/components/ui-textarea/ui-textarea';
|
|
47
|
+
export { defineCustomElement as defineCustomElementUiTextarea } from './ui-textarea';
|
|
48
|
+
export { UIToastRegion as UiToastRegion } from '../types/components/ui-toast-region/ui-toast-region';
|
|
49
|
+
export { defineCustomElement as defineCustomElementUiToastRegion } from './ui-toast-region';
|
|
50
|
+
export { UITooltip as UiTooltip } from '../types/components/ui-tooltip/ui-tooltip';
|
|
51
|
+
export { defineCustomElement as defineCustomElementUiTooltip } from './ui-tooltip';
|
|
52
|
+
export { UITopBar as UiTopBar } from '../types/components/ui-top-bar/ui-top-bar';
|
|
53
|
+
export { defineCustomElement as defineCustomElementUiTopBar } from './ui-top-bar';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
57
|
+
* if the path needs to be customized.
|
|
58
|
+
*/
|
|
59
|
+
export declare const getAssetPath: (path: string) => string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Used to manually set the base path where assets can be found.
|
|
63
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
64
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
65
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
66
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
67
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
68
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
69
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
70
|
+
*/
|
|
71
|
+
export declare const setAssetPath: (path: string) => void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
75
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
76
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
77
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
78
|
+
* will result in the same behavior.
|
|
79
|
+
*/
|
|
80
|
+
export declare const setNonce: (nonce: string) => void
|
|
81
|
+
|
|
82
|
+
export interface SetPlatformOptions {
|
|
83
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
84
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
85
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
86
|
+
}
|
|
87
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
88
|
+
export * from '../types/components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CIA4RyEp.js";export{UiAvatar,defineCustomElement as defineCustomElementUiAvatar}from"./ui-avatar.js";export{UiAvatarGroup,defineCustomElement as defineCustomElementUiAvatarGroup}from"./ui-avatar-group.js";export{UiBadge,defineCustomElement as defineCustomElementUiBadge}from"./ui-badge.js";export{UiButton,defineCustomElement as defineCustomElementUiButton}from"./ui-button.js";export{UiCheckbox,defineCustomElement as defineCustomElementUiCheckbox}from"./ui-checkbox.js";export{UiContextMenu,defineCustomElement as defineCustomElementUiContextMenu}from"./ui-context-menu.js";export{UiDialog,defineCustomElement as defineCustomElementUiDialog}from"./ui-dialog.js";export{UiDisclosure,defineCustomElement as defineCustomElementUiDisclosure}from"./ui-disclosure.js";export{UiFloatingActionButton,defineCustomElement as defineCustomElementUiFloatingActionButton}from"./ui-floating-action-button.js";export{UiFormField,defineCustomElement as defineCustomElementUiFormField}from"./ui-form-field.js";export{UiIconButton,defineCustomElement as defineCustomElementUiIconButton}from"./ui-icon-button.js";export{UiInput,defineCustomElement as defineCustomElementUiInput}from"./ui-input.js";export{UiMenu,defineCustomElement as defineCustomElementUiMenu}from"./ui-menu.js";export{UiMenuItem,defineCustomElement as defineCustomElementUiMenuItem}from"./ui-menu-item.js";export{UiPopover,defineCustomElement as defineCustomElementUiPopover}from"./ui-popover.js";export{UiRadio,defineCustomElement as defineCustomElementUiRadio}from"./ui-radio.js";export{UiRadioGroup,defineCustomElement as defineCustomElementUiRadioGroup}from"./ui-radio-group.js";export{UiSearchResultRow,defineCustomElement as defineCustomElementUiSearchResultRow}from"./ui-search-result-row.js";export{UiSearchShell,defineCustomElement as defineCustomElementUiSearchShell}from"./ui-search-shell.js";export{UiSelect,defineCustomElement as defineCustomElementUiSelect}from"./ui-select.js";export{UiSwitch,defineCustomElement as defineCustomElementUiSwitch}from"./ui-switch.js";export{UiTabs,defineCustomElement as defineCustomElementUiTabs}from"./ui-tabs.js";export{UiTextarea,defineCustomElement as defineCustomElementUiTextarea}from"./ui-textarea.js";export{UiToastRegion,defineCustomElement as defineCustomElementUiToastRegion}from"./ui-toast-region.js";export{UiTooltip,defineCustomElement as defineCustomElementUiTooltip}from"./ui-tooltip.js";export{UiTopBar,defineCustomElement as defineCustomElementUiTopBar}from"./ui-top-bar.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},f=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!f&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&u.i?$(b):u.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{y(p),y(h),(d=p.length>0)&&u.raf(b)},$=t=>Promise.resolve(undefined).then(t),v=m(h,!0),w=t=>{const e=new URL(t,u.u);return e.origin!==r.location.origin?e.href:e.pathname},g=t=>u.u=t;function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var O,S=new WeakMap,M=t=>"sc-"+t.p,k=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!k(l))&&(l=String(l)),s&&i?r[r.length-1].h+=l:r.push(s?A(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=A(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},A=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,$:null,m:null,v:null}),C={},x=(t,e)=>null==t||k(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?String(t):t,L=(t,e,n,s,i,c)=>{if(n===s)return;let f=o(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n);let o=_(s);e.remove(...l.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&G(s,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=k(s);if((f||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?f=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!f||4&c||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):o(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const l=e.endsWith(D);e=e.replace(H,""),n&&u.rel(t,e,n,l),s&&u.ael(t,e,s,l)}},N=/\s/,_=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(N):[]),D="Capture",H=new RegExp(D+"$"),P=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of R(Object.keys(o)))t in s||L(l,t,o[t],void 0,n,e.i);for(const t of R(Object.keys(s)))L(l,t,o[t],s[t],n,e.i)};function R(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var U=!1,W=!1,F=[],V=[],q=(t,e,n)=>{const l=e.$[n];let o,s,i=0;if(null!=l.h)o=l.O=r.document.createTextNode(l.h);else{if(!r.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=r.document.createElement(l.j),P(null,l,W),l.$){const e="template"===l.j?o.content:o;for(i=0;i<l.$.length;++i)s=q(t,l,i),s&&e.appendChild(s)}}return o["s-hn"]=O,o},z=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=q(null,n,o),i&&(l[o].O=i,I(r,i,e)))},T=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;B(e),t&&t.remove()}}},Y=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),Z=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$,i=e.h;null==i?("slot"!==e.j||U||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{u.i|=1;const e=t.closest(O.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(I(e,t,null!=n?n:null),t["s-sh"]=void 0)}u.i&=-2})(e.O.parentElement)),P(t,e,W),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=l.length-1,m=l[0],y=l[h];const b="template"===n.j?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=l[++c];else if(null==y)y=l[--h];else if(Y(d,m,o))Z(d,m,o),d=e[++r],m=l[++c];else if(Y(p,y,o))Z(p,y,o),p=e[--a],y=l[--h];else if(Y(d,y,o))Z(d,y,o),I(b,d.O,p.O.nextSibling),d=e[++r],y=l[--h];else if(Y(p,m,o))Z(p,m,o),I(b,p.O,d.O),p=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=q(e&&e[c],n,u):(Z(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=q(e&&e[c],n,c),m=l[++c]),s&&I(d.O.parentNode,s,d.O)}r>a?z(t,null==l[h+1]?null:l[h+1].O,n,l,c,h):c>h&&T(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.h&&(l.textContent=""),z(l,null,e,s,0,s.length-1)):!n&&null!==o&&T(o,0,o.length-1)):t.h!==i&&(l.data=i)},B=t=>{t.m&&t.m.ref&&F.push((()=>t.m.ref(null))),t.$&&t.$.map(B)},G=(t,e)=>{V.push((()=>t(e)))},I=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),J=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||A(null,null);var i;const r=(i=e)&&i.j===C?e:E(null,null,e);if(O=l.tagName,o.k&&(r.m=r.m||{},o.k.forEach((([t,e])=>{r.m[e]=l[t]}))),n&&r.m)for(const t of Object.keys(r.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=l[t]);r.j=null,r.i|=4,t.M=r,r.O=s.O=l.shadowRoot||l,U=!(!(1&o.i)||128&o.i),Z(s,r,n),F.forEach((t=>t())),F.length=0,V.forEach((t=>t())),V.length=0},K=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.A=()=>{e["s-p"].splice(n-1,1),l()})))}},Q=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);K(t,t.C);const n=()=>X(t,e);if(!e)return v(n);queueMicrotask((()=>{n()}))},X=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=it(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=tt(o,(()=>it(l,"componentWillRender",void 0,n))),tt(o,(()=>nt(t,l,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const s=M(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let o,i=S.get(t=t.head||t);if(i||S.set(t,i=new Set),!i.has(s)){o=r.document.createElement("style"),o.textContent=c;const d=null!=(n=u.L)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(c.constructor===n.CSSStyleSheet)l=c;else{l=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)l.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);lt(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>ot(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},lt=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,J(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},ot=t=>{const e=t.$hostElement$,n=e,l=t.C;it(n,"componentDidRender",void 0,e),64&t.i?it(n,"componentDidUpdate",void 0,e):(t.i|=64,rt(e),it(n,"componentDidLoad",void 0,e),t.N(e),l||st()),t.A&&(t.A(),t.A=void 0),512&t.i&&$((()=>Q(t,!1))),t.i&=-517},st=()=>{$((()=>(t=>{const e=u.ce("appload",{detail:{namespace:"looma"}});return t.dispatchEvent(e),e})(r)))},it=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,n,o)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),u=i.i,f=r;n=x(n,o.t[e][0]);const a=Number.isNaN(c)&&Number.isNaN(n);if(n!==c&&!a){if(i.o.set(e,n),o._){const t=o._[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,c,e):i.D.push((()=>{i.H[l](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||Q(i,!1)}}},ut=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n._&&(n._=e.watchers),e.deserializers&&!n.P&&(n.P=e.deserializers),e.serializers&&!n.R&&(n.R=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,l(this).o.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.apply(this,[x(t,o)]),void ct(this,e,t=32&o?this[e]:s.$hostElement$[e],n);ct(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n._)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,l])=>{var o;const s=l[1]||e;return t.set(s,e),512&l[0]&&(null==(o=n.k)||o.push([e,s])),s}))]))}}return e},ft=(t,e)=>{const o={i:e[0],p:e[1]};try{o.t=e[2],o._=t._,o.P=t.P,o.R=t.R,o.k=[];const r=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,U:new Map};l.W=new Promise((t=>l.N=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e.H)||(null==e?void 0:e.W)&&e.W.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){K(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=M(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);f&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.C,s=()=>Q(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.A&&(e.A(),e.A=void 0),e.N&&e.N(t)}})(t,e,n)}o()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{1&u.i||l(t),S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,o)}}),Object.defineProperty(t,"is",{value:o.p,configurable:!0}),ut(t,o)}catch(e){return s(e),t}},at=t=>u.L=t,dt=t=>Object.assign(u,t);function pt(t,e){J({l:{i:0,p:e.tagName},$hostElement$:e},t)}function ht(t){return t}export{c as H,at as a,dt as b,C as c,w as g,E as h,ft as p,pt as r,g as s,ht as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n=[],t="data-ui-scroll-lock";let e=0,o=!1;function c(){if("undefined"==typeof document)return;const n=document.documentElement;if(e>0)return n.setAttribute(t,"true"),void(n.style.overflow="hidden");n.removeAttribute(t),n.style.removeProperty("overflow")}function u(n){return n.dismissible??!0}function i(n){"Escape"===n.key&&a("escape","keyboard")}function d(n){const t=f();if(!t||!u(t))return;const e=n.target;e instanceof Node&&t.element.contains(e)||a("light-dismiss","pointer")}function r(t){s(t.id),n.push(t),t.modal&&(e+=1,c()),o||"undefined"==typeof document||(document.addEventListener("keydown",i),document.addEventListener("pointerdown",d,{capture:!0}),o=!0)}function s(t){const u=n.findIndex((n=>n.id===t));if(u>=0){const[t]=n.splice(u,1);t?.modal&&(e=Math.max(0,e-1),c())}!o||n.length>0||"undefined"==typeof document||(document.removeEventListener("keydown",i),document.removeEventListener("pointerdown",d,{capture:!0}),o=!1)}function f(){return n.at(-1)}function a(n,t){const e=f();return!!e&&!!(u(e)||"escape"!==n&&"light-dismiss"!==n)&&(e.requestClose(n,t),!0)}export{s as c,r as o,a as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){return n instanceof KeyboardEvent?"keyboard":n instanceof PointerEvent||n instanceof MouseEvent?"pointer":"programmatic"}function e(n){return"Enter"===n.key||" "===n.key}function t(n,e,t){n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}export{t as d,n as e,e as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,h as i,c as r,t as o}from"./p-CIA4RyEp.js";import{d as s,e as a}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;internalOpen=!1;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown)}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";s(this.host,"select",{value:i,trigger:a(e)}),s(this.host,"close",{open:!1,reason:"action",trigger:a(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const r=e.target.closest?.("ui-menu-item"),o=r&&r instanceof t?i.indexOf(r):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?o<0?0:Math.min(o+1,i.length-1):o<=0?i.length-1:o-1].focus());else if(e.preventDefault(),r&&o>=0){const e=r.getAttribute("value")??r.getAttribute("data-value")??"";s(this.host,"select",{value:e,trigger:"keyboard"}),s(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(r,{key:"f06ad0f8c09060495757ced2da095817409720b7",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"d504fd3c33894d0e464b957ce67c75fe8a24899c"}))}static get watchers(){return{open:[{syncFromProp:0}]}}static get style(){return":host{display:flex;flex-direction:column;min-width:12rem;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}]}]);function u(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(o(e))||customElements.define(o(e),n))}))}export{n as U,u as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=0;function r(r){return e+=1,`ui-core-${r}-${e}`}export{r as c}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiAvatarGroup extends Components.UiAvatarGroup, HTMLElement {}
|
|
4
|
+
export const UiAvatarGroup: {
|
|
5
|
+
prototype: UiAvatarGroup;
|
|
6
|
+
new (): UiAvatarGroup;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as t,h as r,c as a,t as o}from"./p-CIA4RyEp.js";const i=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}max=5;label="People";overflowCount=0;slotRef;syncOverflow(){this.updateOverflow()}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.updateOverflow())),this.updateOverflow()}componentDidUpdate(){this.updateOverflow()}updateOverflow(){const e=this.host.shadowRoot?.querySelector("slot"),t=(e?.assignedElements()??Array.from(this.host.children)).filter((e=>!e.hasAttribute("data-ui-avatar-group-overflow"))),r=t.length,a=Math.min(this.max,r),o=r>this.max?r-this.max:0;t.forEach(((e,t)=>{e.hidden=t>=a,e.setAttribute("aria-hidden",(t>=a)+"")})),this.overflowCount=o}render(){return r(a,{key:"9c8fbeb6e8c87ef4d86778a70a52f48b62717728",role:"list","aria-label":this.label||void 0},r("slot",{key:"432877b335f2a75f6b17a14b4be768c68ba04bfa"}),this.overflowCount>0&&r("span",{key:"ccf8007947e5d97edcdf42b7f4740db33560956b",class:"overflow",role:"listitem","aria-label":this.overflowCount+" more","data-ui-avatar-group-overflow":!0},"+",this.overflowCount))}static get watchers(){return{max:[{syncOverflow:0}]}}static get style(){return":host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}"}},[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},void 0,{max:[{syncOverflow:0}]}]),s=i,n=function(){"undefined"!=typeof customElements&&["ui-avatar-group"].forEach((e=>{"ui-avatar-group"===e&&(customElements.get(o(e))||customElements.define(o(e),i))}))};export{s as UiAvatarGroup,n as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiAvatar extends Components.UiAvatar, HTMLElement {}
|
|
4
|
+
export const UiAvatar: {
|
|
5
|
+
prototype: UiAvatar;
|
|
6
|
+
new (): UiAvatar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as a,t as e,H as t,h as i,c as s}from"./p-CIA4RyEp.js";const r=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow()}src="";alt="";name="";fallback="";hasImage=!1;watchSrc(){this.hasImage=!1}onImageLoad=()=>{this.hasImage=!0};onImageError=()=>{this.hasImage=!1};render(){const a=this.fallback||function(a){const e=a.trim().split(/\s+/).filter((a=>a.length>0));return 0===e.length?"?":1===e.length?e[0].slice(0,2).toUpperCase():`${e[0][0]??""}${e[1][0]??""}`.toUpperCase()}(this.name||this.alt),e=this.alt||this.name||"Avatar";return i(s,{key:"f61c3a4e5556be947b9f573591d4db0687fd01fd",role:"img","aria-label":e,"data-has-image":this.hasImage?"":void 0},i("div",{key:"03d4a3d1c86bb1d1779ad007ba12407230478dac",class:"avatar"},i("img",{key:"512015d68f9118bf8b8181b5b5118c133e783baf",src:this.src,alt:e,onLoad:this.onImageLoad,onError:this.onImageError,hidden:!this.hasImage,"aria-hidden":this.hasImage?"false":"true"}),i("span",{key:"48b0f1f81a6465c6021d4c867af67a559b9b8a67",class:"fallback",hidden:this.hasImage,"aria-hidden":this.hasImage?"true":"false"},a)))}static get watchers(){return{src:[{watchSrc:0}]}}static get style(){return":host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}"}},[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},void 0,{src:[{watchSrc:0}]}]),n=r,c=function(){"undefined"!=typeof customElements&&["ui-avatar"].forEach((a=>{"ui-avatar"===a&&(customElements.get(e(a))||customElements.define(e(a),r))}))};export{n as UiAvatar,c as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiBadge extends Components.UiBadge, HTMLElement {}
|
|
4
|
+
export const UiBadge: {
|
|
5
|
+
prototype: UiBadge;
|
|
6
|
+
new (): UiBadge;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as a,H as o,h as r,c as t,t as e}from"./p-CIA4RyEp.js";const n=a(class extends o{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow()}variant;tone;render(){return r(t,{key:"53eba0640816bc09ae198de29f9a1ac97c1d5f1d","data-variant":this.variant||void 0,"data-tone":this.tone||void 0},r("slot",{key:"abc8a9e09c2001f222f9aa8f164da76ff8343e01"}))}static get style(){return":host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}"}},[769,"ui-badge",{variant:[1],tone:[1]}]),i=n,s=function(){"undefined"!=typeof customElements&&["ui-badge"].forEach((a=>{"ui-badge"===a&&(customElements.get(e(a))||customElements.define(e(a),n))}))};export{i as UiBadge,s as defineCustomElement}
|