@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,190 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { eventToTrigger } from "../../utils/events";
|
|
3
|
+
import { dispatchDetail } from "../../utils/events";
|
|
4
|
+
export class UITabs {
|
|
5
|
+
host;
|
|
6
|
+
value = '';
|
|
7
|
+
defaultValue = '';
|
|
8
|
+
orientation = 'horizontal';
|
|
9
|
+
internalValue = '';
|
|
10
|
+
syncFromProp() {
|
|
11
|
+
this.internalValue = this.value;
|
|
12
|
+
}
|
|
13
|
+
syncState() {
|
|
14
|
+
const tabs = this.getTabs();
|
|
15
|
+
if (tabs.length === 0)
|
|
16
|
+
return;
|
|
17
|
+
tabs.forEach((tab) => {
|
|
18
|
+
const tabId = tab.id ?? tab.getAttribute('aria-controls') ?? '';
|
|
19
|
+
const isSelected = tabId === this.internalValue;
|
|
20
|
+
tab.setAttribute('aria-selected', String(isSelected));
|
|
21
|
+
tab.tabIndex = isSelected ? 0 : -1;
|
|
22
|
+
const controlsId = tab.getAttribute('aria-controls');
|
|
23
|
+
if (controlsId) {
|
|
24
|
+
const panel = this.host.querySelector(`#${CSS.escape(controlsId)}`) ?? document.getElementById(controlsId);
|
|
25
|
+
if (panel) {
|
|
26
|
+
panel.hidden = !isSelected;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
componentDidLoad() {
|
|
32
|
+
this.syncFromProp();
|
|
33
|
+
if (!this.internalValue && this.defaultValue) {
|
|
34
|
+
this.internalValue = this.defaultValue;
|
|
35
|
+
}
|
|
36
|
+
if (!this.internalValue) {
|
|
37
|
+
const tabs = this.getTabs();
|
|
38
|
+
if (tabs.length > 0) {
|
|
39
|
+
this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute('aria-controls') ?? '';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
this.syncState();
|
|
43
|
+
this.host.addEventListener('keydown', this.onKeydown);
|
|
44
|
+
this.host.addEventListener('click', this.onClick);
|
|
45
|
+
}
|
|
46
|
+
disconnectedCallback() {
|
|
47
|
+
this.host.removeEventListener('keydown', this.onKeydown);
|
|
48
|
+
this.host.removeEventListener('click', this.onClick);
|
|
49
|
+
}
|
|
50
|
+
componentDidUpdate() {
|
|
51
|
+
this.syncState();
|
|
52
|
+
}
|
|
53
|
+
getTabs() {
|
|
54
|
+
return Array.from(this.host.querySelectorAll('[role="tab"]'));
|
|
55
|
+
}
|
|
56
|
+
setValueFromTab(tab, trigger) {
|
|
57
|
+
const newValue = tab.id ?? tab.getAttribute('aria-controls') ?? '';
|
|
58
|
+
if (!newValue)
|
|
59
|
+
return;
|
|
60
|
+
const prev = this.internalValue;
|
|
61
|
+
this.internalValue = newValue;
|
|
62
|
+
this.syncState();
|
|
63
|
+
dispatchDetail(this.host, 'select', { value: newValue, previousValue: prev || undefined, trigger });
|
|
64
|
+
}
|
|
65
|
+
onClick = (e) => {
|
|
66
|
+
const tab = e.target.closest?.('[role="tab"]');
|
|
67
|
+
if (!tab || !this.host.contains(tab))
|
|
68
|
+
return;
|
|
69
|
+
this.setValueFromTab(tab, eventToTrigger(e));
|
|
70
|
+
};
|
|
71
|
+
onKeydown = (e) => {
|
|
72
|
+
const tab = e.target.closest?.('[role="tab"]');
|
|
73
|
+
if (!tab || !this.host.contains(tab))
|
|
74
|
+
return;
|
|
75
|
+
const tabs = this.getTabs();
|
|
76
|
+
if (tabs.length === 0)
|
|
77
|
+
return;
|
|
78
|
+
const currentIndex = tabs.indexOf(tab);
|
|
79
|
+
const isVertical = this.orientation === 'vertical';
|
|
80
|
+
const prevKey = isVertical ? 'ArrowUp' : 'ArrowLeft';
|
|
81
|
+
const nextKey = isVertical ? 'ArrowDown' : 'ArrowRight';
|
|
82
|
+
if (e.key === nextKey || e.key === prevKey) {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
const nextIndex = e.key === nextKey
|
|
85
|
+
? Math.min(currentIndex + 1, tabs.length - 1)
|
|
86
|
+
: currentIndex <= 0
|
|
87
|
+
? tabs.length - 1
|
|
88
|
+
: currentIndex - 1;
|
|
89
|
+
this.setValueFromTab(tabs[nextIndex], 'keyboard');
|
|
90
|
+
tabs[nextIndex].focus();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
render() {
|
|
94
|
+
return (h(Host, { key: 'd73e97facf3ffa020f349642bc6c0136f39fc463', orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: 'a7bd47a4b48780ddf1f21a917fd1cb747376640b' })));
|
|
95
|
+
}
|
|
96
|
+
static get is() { return "ui-tabs"; }
|
|
97
|
+
static get encapsulation() { return "shadow"; }
|
|
98
|
+
static get originalStyleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["ui-tabs.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get styleUrls() {
|
|
104
|
+
return {
|
|
105
|
+
"$": ["ui-tabs.css"]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
static get properties() {
|
|
109
|
+
return {
|
|
110
|
+
"value": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"reflect": false,
|
|
127
|
+
"attribute": "value",
|
|
128
|
+
"defaultValue": "''"
|
|
129
|
+
},
|
|
130
|
+
"defaultValue": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": ""
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false,
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"attribute": "default-value",
|
|
148
|
+
"defaultValue": "''"
|
|
149
|
+
},
|
|
150
|
+
"orientation": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "'horizontal' | 'vertical'",
|
|
155
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"attribute": "orientation",
|
|
168
|
+
"defaultValue": "'horizontal'"
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get states() {
|
|
173
|
+
return {
|
|
174
|
+
"internalValue": {}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
static get elementRef() { return "host"; }
|
|
178
|
+
static get watchers() {
|
|
179
|
+
return [{
|
|
180
|
+
"propName": "value",
|
|
181
|
+
"methodName": "syncFromProp"
|
|
182
|
+
}, {
|
|
183
|
+
"propName": "internalValue",
|
|
184
|
+
"methodName": "syncState"
|
|
185
|
+
}, {
|
|
186
|
+
"propName": "orientation",
|
|
187
|
+
"methodName": "syncState"
|
|
188
|
+
}];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
color: var(--ui-text-primary);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
::slotted(textarea) {
|
|
7
|
+
width: 100%;
|
|
8
|
+
appearance: none;
|
|
9
|
+
border: 1px solid var(--ui-border-default);
|
|
10
|
+
border-radius: var(--ui-radius-2);
|
|
11
|
+
background: var(--ui-surface-default);
|
|
12
|
+
color: inherit;
|
|
13
|
+
font: inherit;
|
|
14
|
+
line-height: var(--ui-line-height-md);
|
|
15
|
+
min-block-size: calc(var(--ui-space-12, 3rem) * 2);
|
|
16
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
17
|
+
margin: 0;
|
|
18
|
+
resize: vertical;
|
|
19
|
+
transition:
|
|
20
|
+
border-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
21
|
+
box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
|
|
22
|
+
background-color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
::slotted(textarea:hover:not(:focus):not(:disabled)) {
|
|
26
|
+
border-color: var(--ui-border-strong);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
::slotted(textarea:focus) {
|
|
30
|
+
border-color: var(--ui-focus-ring);
|
|
31
|
+
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([data-invalid='true'])::slotted(textarea),
|
|
35
|
+
::slotted(textarea[aria-invalid='true']) {
|
|
36
|
+
border-color: var(--ui-accent-active);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
::slotted(textarea:disabled) {
|
|
40
|
+
background: var(--ui-surface-muted);
|
|
41
|
+
color: var(--ui-text-muted);
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::slotted(textarea:focus-visible) {
|
|
46
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
47
|
+
outline-offset: 2px;
|
|
48
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { dispatchDetail, eventToTrigger } from "../../utils/events";
|
|
3
|
+
export class UITextarea {
|
|
4
|
+
host;
|
|
5
|
+
value = '';
|
|
6
|
+
defaultValue = '';
|
|
7
|
+
disabled = false;
|
|
8
|
+
invalid = false;
|
|
9
|
+
readOnly = false;
|
|
10
|
+
rows = 4;
|
|
11
|
+
internalValue = '';
|
|
12
|
+
slotRef;
|
|
13
|
+
syncFromProp() {
|
|
14
|
+
this.internalValue = this.value;
|
|
15
|
+
}
|
|
16
|
+
syncToTextarea() {
|
|
17
|
+
const textarea = this.getTextarea();
|
|
18
|
+
if (!textarea)
|
|
19
|
+
return;
|
|
20
|
+
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
21
|
+
textarea.value = this.internalValue;
|
|
22
|
+
textarea.defaultValue = this.defaultValue;
|
|
23
|
+
textarea.disabled = this.disabled;
|
|
24
|
+
textarea.readOnly = this.readOnly;
|
|
25
|
+
textarea.rows = this.rows;
|
|
26
|
+
textarea.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
27
|
+
}
|
|
28
|
+
componentDidLoad() {
|
|
29
|
+
this.syncFromProp();
|
|
30
|
+
this.slotRef?.addEventListener('slotchange', () => this.syncToTextarea());
|
|
31
|
+
this.syncToTextarea();
|
|
32
|
+
const textarea = this.getTextarea();
|
|
33
|
+
textarea?.addEventListener('input', this.onInput);
|
|
34
|
+
textarea?.addEventListener('change', this.onChange);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
const textarea = this.getTextarea();
|
|
38
|
+
textarea?.removeEventListener('input', this.onInput);
|
|
39
|
+
textarea?.removeEventListener('change', this.onChange);
|
|
40
|
+
}
|
|
41
|
+
componentDidUpdate() {
|
|
42
|
+
this.syncToTextarea();
|
|
43
|
+
}
|
|
44
|
+
getTextarea() {
|
|
45
|
+
const slot = this.host.shadowRoot?.querySelector('slot');
|
|
46
|
+
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
47
|
+
return nodes.find((el) => el.tagName === 'TEXTAREA') ?? null;
|
|
48
|
+
}
|
|
49
|
+
onInput = (e) => {
|
|
50
|
+
const textarea = e.target;
|
|
51
|
+
if (!textarea)
|
|
52
|
+
return;
|
|
53
|
+
this.internalValue = textarea.value;
|
|
54
|
+
dispatchDetail(this.host, 'input', {
|
|
55
|
+
value: this.internalValue,
|
|
56
|
+
trigger: eventToTrigger(e),
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
onChange = (e) => {
|
|
60
|
+
const textarea = this.getTextarea();
|
|
61
|
+
if (!textarea)
|
|
62
|
+
return;
|
|
63
|
+
this.internalValue = textarea.value;
|
|
64
|
+
dispatchDetail(this.host, 'change', {
|
|
65
|
+
value: this.internalValue,
|
|
66
|
+
trigger: eventToTrigger(e),
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
render() {
|
|
70
|
+
return (h(Host, { key: 'd52719875939fa9b2f757a35fb4cd1aa31a194c5', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: 'e40ba71b60cae07437219d6ab4b5879b26af1ac2', ref: (el) => (this.slotRef = el) })));
|
|
71
|
+
}
|
|
72
|
+
static get is() { return "ui-textarea"; }
|
|
73
|
+
static get encapsulation() { return "shadow"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["ui-textarea.css"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["ui-textarea.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"value": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "string",
|
|
91
|
+
"resolved": "string",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"getter": false,
|
|
101
|
+
"setter": false,
|
|
102
|
+
"reflect": false,
|
|
103
|
+
"attribute": "value",
|
|
104
|
+
"defaultValue": "''"
|
|
105
|
+
},
|
|
106
|
+
"defaultValue": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"getter": false,
|
|
121
|
+
"setter": false,
|
|
122
|
+
"reflect": false,
|
|
123
|
+
"attribute": "default-value",
|
|
124
|
+
"defaultValue": "''"
|
|
125
|
+
},
|
|
126
|
+
"disabled": {
|
|
127
|
+
"type": "boolean",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "boolean",
|
|
131
|
+
"resolved": "boolean",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"required": false,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": ""
|
|
139
|
+
},
|
|
140
|
+
"getter": false,
|
|
141
|
+
"setter": false,
|
|
142
|
+
"reflect": false,
|
|
143
|
+
"attribute": "disabled",
|
|
144
|
+
"defaultValue": "false"
|
|
145
|
+
},
|
|
146
|
+
"invalid": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "boolean",
|
|
151
|
+
"resolved": "boolean",
|
|
152
|
+
"references": {}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": ""
|
|
159
|
+
},
|
|
160
|
+
"getter": false,
|
|
161
|
+
"setter": false,
|
|
162
|
+
"reflect": false,
|
|
163
|
+
"attribute": "invalid",
|
|
164
|
+
"defaultValue": "false"
|
|
165
|
+
},
|
|
166
|
+
"readOnly": {
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "boolean",
|
|
171
|
+
"resolved": "boolean",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"getter": false,
|
|
181
|
+
"setter": false,
|
|
182
|
+
"reflect": false,
|
|
183
|
+
"attribute": "readonly",
|
|
184
|
+
"defaultValue": "false"
|
|
185
|
+
},
|
|
186
|
+
"rows": {
|
|
187
|
+
"type": "number",
|
|
188
|
+
"mutable": false,
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "number",
|
|
191
|
+
"resolved": "number",
|
|
192
|
+
"references": {}
|
|
193
|
+
},
|
|
194
|
+
"required": false,
|
|
195
|
+
"optional": false,
|
|
196
|
+
"docs": {
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": ""
|
|
199
|
+
},
|
|
200
|
+
"getter": false,
|
|
201
|
+
"setter": false,
|
|
202
|
+
"reflect": false,
|
|
203
|
+
"attribute": "rows",
|
|
204
|
+
"defaultValue": "4"
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static get states() {
|
|
209
|
+
return {
|
|
210
|
+
"internalValue": {}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
static get elementRef() { return "host"; }
|
|
214
|
+
static get watchers() {
|
|
215
|
+
return [{
|
|
216
|
+
"propName": "value",
|
|
217
|
+
"methodName": "syncFromProp"
|
|
218
|
+
}, {
|
|
219
|
+
"propName": "internalValue",
|
|
220
|
+
"methodName": "syncToTextarea"
|
|
221
|
+
}, {
|
|
222
|
+
"propName": "defaultValue",
|
|
223
|
+
"methodName": "syncToTextarea"
|
|
224
|
+
}, {
|
|
225
|
+
"propName": "disabled",
|
|
226
|
+
"methodName": "syncToTextarea"
|
|
227
|
+
}, {
|
|
228
|
+
"propName": "invalid",
|
|
229
|
+
"methodName": "syncToTextarea"
|
|
230
|
+
}, {
|
|
231
|
+
"propName": "readOnly",
|
|
232
|
+
"methodName": "syncToTextarea"
|
|
233
|
+
}, {
|
|
234
|
+
"propName": "rows",
|
|
235
|
+
"methodName": "syncToTextarea"
|
|
236
|
+
}];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: var(--ui-space-4);
|
|
4
|
+
left: 50%;
|
|
5
|
+
transform: translateX(-50%);
|
|
6
|
+
z-index: 9999;
|
|
7
|
+
display: grid;
|
|
8
|
+
gap: var(--ui-space-2);
|
|
9
|
+
max-width: min(24rem, 90vw);
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host > * {
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::slotted([data-ui-toast]) {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: 1fr auto;
|
|
20
|
+
gap: var(--ui-space-2);
|
|
21
|
+
align-items: start;
|
|
22
|
+
border: 1px solid var(--ui-border-default);
|
|
23
|
+
border-radius: var(--ui-radius-3);
|
|
24
|
+
padding: var(--ui-space-3) var(--ui-space-4);
|
|
25
|
+
background: var(--ui-surface-elevated);
|
|
26
|
+
color: var(--ui-text-primary);
|
|
27
|
+
box-shadow: var(--ui-shadow-lg);
|
|
28
|
+
animation: ui-toast-enter 0.25s var(--ui-motion-ease) forwards;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes ui-toast-enter {
|
|
32
|
+
from {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transform: translateY(-0.5rem);
|
|
35
|
+
}
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: translateY(0);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
::slotted([data-ui-toast][aria-hidden='true']) {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
::slotted([data-ui-toast-dismiss]) {
|
|
47
|
+
border: 0;
|
|
48
|
+
background: transparent;
|
|
49
|
+
color: var(--ui-text-secondary);
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
font: inherit;
|
|
52
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { eventToTrigger } from "../../utils/events";
|
|
3
|
+
import { dispatchDetail } from "../../utils/events";
|
|
4
|
+
export class UIToastRegion {
|
|
5
|
+
host;
|
|
6
|
+
open = true;
|
|
7
|
+
internalOpen = true;
|
|
8
|
+
syncFromProp() {
|
|
9
|
+
this.internalOpen = this.open;
|
|
10
|
+
}
|
|
11
|
+
componentDidLoad() {
|
|
12
|
+
this.syncFromProp();
|
|
13
|
+
this.host.addEventListener('click', this.onClick);
|
|
14
|
+
}
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
this.host.removeEventListener('click', this.onClick);
|
|
17
|
+
}
|
|
18
|
+
getToasts() {
|
|
19
|
+
return Array.from(this.host.querySelectorAll('[data-ui-toast]'));
|
|
20
|
+
}
|
|
21
|
+
updateOpenState() {
|
|
22
|
+
const toasts = this.getToasts();
|
|
23
|
+
this.internalOpen = toasts.length > 0;
|
|
24
|
+
}
|
|
25
|
+
onClick = (e) => {
|
|
26
|
+
const dismissBtn = e.target.closest?.('[data-ui-toast-dismiss]');
|
|
27
|
+
if (!dismissBtn)
|
|
28
|
+
return;
|
|
29
|
+
const toast = dismissBtn.closest?.('[data-ui-toast]');
|
|
30
|
+
if (!toast)
|
|
31
|
+
return;
|
|
32
|
+
const id = toast.id ?? '';
|
|
33
|
+
toast.setAttribute('aria-hidden', 'true');
|
|
34
|
+
toast.remove();
|
|
35
|
+
dispatchDetail(this.host, 'dismiss', {
|
|
36
|
+
id,
|
|
37
|
+
reason: 'action',
|
|
38
|
+
trigger: eventToTrigger(e),
|
|
39
|
+
});
|
|
40
|
+
this.updateOpenState();
|
|
41
|
+
if (this.getToasts().length === 0) {
|
|
42
|
+
dispatchDetail(this.host, 'close', {
|
|
43
|
+
open: false,
|
|
44
|
+
reason: 'action',
|
|
45
|
+
trigger: eventToTrigger(e),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
render() {
|
|
50
|
+
return (h(Host, { key: '8e99577d8770984b8d6d29e442931570c1f1bc4d', role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? '' : undefined }, h("slot", { key: '06f2c6cf39c4795afc0937669aa2104821aef3d6' })));
|
|
51
|
+
}
|
|
52
|
+
static get is() { return "ui-toast-region"; }
|
|
53
|
+
static get encapsulation() { return "shadow"; }
|
|
54
|
+
static get originalStyleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["ui-toast-region.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get styleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["ui-toast-region.css"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get properties() {
|
|
65
|
+
return {
|
|
66
|
+
"open": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
82
|
+
"reflect": false,
|
|
83
|
+
"attribute": "open",
|
|
84
|
+
"defaultValue": "true"
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
static get states() {
|
|
89
|
+
return {
|
|
90
|
+
"internalOpen": {}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get elementRef() { return "host"; }
|
|
94
|
+
static get watchers() {
|
|
95
|
+
return [{
|
|
96
|
+
"propName": "open",
|
|
97
|
+
"methodName": "syncFromProp"
|
|
98
|
+
}];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
border: 1px solid var(--ui-border-default);
|
|
4
|
+
border-radius: var(--ui-radius-2);
|
|
5
|
+
background: var(--ui-surface-elevated);
|
|
6
|
+
color: var(--ui-text-primary);
|
|
7
|
+
padding: var(--ui-space-2) var(--ui-space-3);
|
|
8
|
+
font-size: var(--ui-font-size-sm);
|
|
9
|
+
box-shadow: var(--ui-shadow-md);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host([hidden]) {
|
|
13
|
+
display: none !important;
|
|
14
|
+
}
|