@andespindola/ui-core 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/README.md +45 -0
- package/dist/cjs/floating-ui.dom-BPemvNRD.js +1542 -0
- package/dist/cjs/index-Cb1tfi_9.js +1728 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/ui-accordion-item.cjs.entry.js +27 -0
- package/dist/cjs/ui-accordion.cjs.entry.js +17 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +19 -0
- package/dist/cjs/ui-badge.cjs.entry.js +19 -0
- package/dist/cjs/ui-button.cjs.entry.js +31 -0
- package/dist/cjs/ui-card.cjs.entry.js +17 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +34 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +57 -0
- package/dist/cjs/ui-drawer.cjs.entry.js +59 -0
- package/dist/cjs/ui-dropdown-item.cjs.entry.js +27 -0
- package/dist/cjs/ui-dropdown-menu.cjs.entry.js +97 -0
- package/dist/cjs/ui-field.cjs.entry.js +19 -0
- package/dist/cjs/ui-input.cjs.entry.js +35 -0
- package/dist/cjs/ui-label.cjs.entry.js +17 -0
- package/dist/cjs/ui-loading-overlay.cjs.entry.js +24 -0
- package/dist/cjs/ui-popover.cjs.entry.js +94 -0
- package/dist/cjs/ui-progress.cjs.entry.js +33 -0
- package/dist/cjs/ui-radio-group.cjs.entry.js +49 -0
- package/dist/cjs/ui-reveal.cjs.entry.js +41 -0
- package/dist/cjs/ui-scroll-progress.cjs.entry.js +37 -0
- package/dist/cjs/ui-section.cjs.entry.js +23 -0
- package/dist/cjs/ui-select.cjs.entry.js +28 -0
- package/dist/cjs/ui-separator.cjs.entry.js +19 -0
- package/dist/cjs/ui-skeleton.cjs.entry.js +17 -0
- package/dist/cjs/ui-slider.cjs.entry.js +37 -0
- package/dist/cjs/ui-spinner.cjs.entry.js +19 -0
- package/dist/cjs/ui-switch.cjs.entry.js +34 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +31 -0
- package/dist/cjs/ui-textarea.cjs.entry.js +35 -0
- package/dist/cjs/ui-theme-toggle.cjs.entry.js +65 -0
- package/dist/cjs/ui-toast.cjs.entry.js +67 -0
- package/dist/cjs/ui-toaster.cjs.entry.js +29 -0
- package/dist/cjs/ui-tooltip.cjs.entry.js +64 -0
- package/dist/cjs/uikit.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +45 -0
- package/dist/collection/components/ui-accordion/ui-accordion.css +4 -0
- package/dist/collection/components/ui-accordion/ui-accordion.js +18 -0
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.css +42 -0
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +91 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +30 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +84 -0
- package/dist/collection/components/ui-badge/ui-badge.css +46 -0
- package/dist/collection/components/ui-badge/ui-badge.js +52 -0
- package/dist/collection/components/ui-button/ui-button.css +130 -0
- package/dist/collection/components/ui-button/ui-button.js +150 -0
- package/dist/collection/components/ui-card/ui-card.css +24 -0
- package/dist/collection/components/ui-card/ui-card.js +18 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +46 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +136 -0
- package/dist/collection/components/ui-dialog/ui-dialog.css +48 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +140 -0
- package/dist/collection/components/ui-drawer/ui-drawer.css +88 -0
- package/dist/collection/components/ui-drawer/ui-drawer.js +162 -0
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.css +36 -0
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +71 -0
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.css +39 -0
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +216 -0
- package/dist/collection/components/ui-field/ui-field.css +34 -0
- package/dist/collection/components/ui-field/ui-field.js +122 -0
- package/dist/collection/components/ui-input/ui-input.css +40 -0
- package/dist/collection/components/ui-input/ui-input.js +191 -0
- package/dist/collection/components/ui-label/ui-label.css +10 -0
- package/dist/collection/components/ui-label/ui-label.js +18 -0
- package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.css +24 -0
- package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.js +102 -0
- package/dist/collection/components/ui-popover/ui-popover.css +36 -0
- package/dist/collection/components/ui-popover/ui-popover.js +204 -0
- package/dist/collection/components/ui-progress/ui-progress.css +32 -0
- package/dist/collection/components/ui-progress/ui-progress.js +100 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +67 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +155 -0
- package/dist/collection/components/ui-reveal/ui-reveal.css +17 -0
- package/dist/collection/components/ui-reveal/ui-reveal.js +73 -0
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.css +20 -0
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +45 -0
- package/dist/collection/components/ui-section/ui-section.css +32 -0
- package/dist/collection/components/ui-section/ui-section.js +90 -0
- package/dist/collection/components/ui-select/ui-select.css +49 -0
- package/dist/collection/components/ui-select/ui-select.js +153 -0
- package/dist/collection/components/ui-separator/ui-separator.css +15 -0
- package/dist/collection/components/ui-separator/ui-separator.js +52 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.css +27 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +18 -0
- package/dist/collection/components/ui-slider/ui-slider.css +80 -0
- package/dist/collection/components/ui-slider/ui-slider.js +175 -0
- package/dist/collection/components/ui-spinner/ui-spinner.css +39 -0
- package/dist/collection/components/ui-spinner/ui-spinner.js +52 -0
- package/dist/collection/components/ui-switch/ui-switch.css +47 -0
- package/dist/collection/components/ui-switch/ui-switch.js +98 -0
- package/dist/collection/components/ui-tabs/ui-tabs.css +38 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +99 -0
- package/dist/collection/components/ui-textarea/ui-textarea.css +42 -0
- package/dist/collection/components/ui-textarea/ui-textarea.js +191 -0
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.css +28 -0
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +90 -0
- package/dist/collection/components/ui-toast/ui-toast.css +81 -0
- package/dist/collection/components/ui-toast/ui-toast.js +234 -0
- package/dist/collection/components/ui-toaster/ui-toaster.css +15 -0
- package/dist/collection/components/ui-toaster/ui-toaster.js +67 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +37 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +143 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-Bz9HyboB.js +1 -0
- package/dist/components/p-C8ePpPG3.js +1 -0
- package/dist/components/p-CyBRmmbs.js +1 -0
- package/dist/components/ui-accordion-item.d.ts +11 -0
- package/dist/components/ui-accordion-item.js +1 -0
- package/dist/components/ui-accordion.d.ts +11 -0
- package/dist/components/ui-accordion.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-card.d.ts +11 -0
- package/dist/components/ui-card.js +1 -0
- package/dist/components/ui-checkbox.d.ts +11 -0
- package/dist/components/ui-checkbox.js +1 -0
- package/dist/components/ui-dialog.d.ts +11 -0
- package/dist/components/ui-dialog.js +1 -0
- package/dist/components/ui-drawer.d.ts +11 -0
- package/dist/components/ui-drawer.js +1 -0
- package/dist/components/ui-dropdown-item.d.ts +11 -0
- package/dist/components/ui-dropdown-item.js +1 -0
- package/dist/components/ui-dropdown-menu.d.ts +11 -0
- package/dist/components/ui-dropdown-menu.js +1 -0
- package/dist/components/ui-field.d.ts +11 -0
- package/dist/components/ui-field.js +1 -0
- package/dist/components/ui-input.d.ts +11 -0
- package/dist/components/ui-input.js +1 -0
- package/dist/components/ui-label.d.ts +11 -0
- package/dist/components/ui-label.js +1 -0
- package/dist/components/ui-loading-overlay.d.ts +11 -0
- package/dist/components/ui-loading-overlay.js +1 -0
- package/dist/components/ui-popover.d.ts +11 -0
- package/dist/components/ui-popover.js +1 -0
- package/dist/components/ui-progress.d.ts +11 -0
- package/dist/components/ui-progress.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-reveal.d.ts +11 -0
- package/dist/components/ui-reveal.js +1 -0
- package/dist/components/ui-scroll-progress.d.ts +11 -0
- package/dist/components/ui-scroll-progress.js +1 -0
- package/dist/components/ui-section.d.ts +11 -0
- package/dist/components/ui-section.js +1 -0
- package/dist/components/ui-select.d.ts +11 -0
- package/dist/components/ui-select.js +1 -0
- package/dist/components/ui-separator.d.ts +11 -0
- package/dist/components/ui-separator.js +1 -0
- package/dist/components/ui-skeleton.d.ts +11 -0
- package/dist/components/ui-skeleton.js +1 -0
- package/dist/components/ui-slider.d.ts +11 -0
- package/dist/components/ui-slider.js +1 -0
- package/dist/components/ui-spinner.d.ts +11 -0
- package/dist/components/ui-spinner.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-theme-toggle.d.ts +11 -0
- package/dist/components/ui-theme-toggle.js +1 -0
- package/dist/components/ui-toast.d.ts +11 -0
- package/dist/components/ui-toast.js +1 -0
- package/dist/components/ui-toaster.d.ts +11 -0
- package/dist/components/ui-toaster.js +1 -0
- package/dist/components/ui-tooltip.d.ts +11 -0
- package/dist/components/ui-tooltip.js +1 -0
- package/dist/esm/floating-ui.dom-CyBRmmbs.js +1536 -0
- package/dist/esm/index-DYwlrXg_.js +1718 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/ui-accordion-item.entry.js +25 -0
- package/dist/esm/ui-accordion.entry.js +15 -0
- package/dist/esm/ui-avatar.entry.js +17 -0
- package/dist/esm/ui-badge.entry.js +17 -0
- package/dist/esm/ui-button.entry.js +29 -0
- package/dist/esm/ui-card.entry.js +15 -0
- package/dist/esm/ui-checkbox.entry.js +32 -0
- package/dist/esm/ui-dialog.entry.js +55 -0
- package/dist/esm/ui-drawer.entry.js +57 -0
- package/dist/esm/ui-dropdown-item.entry.js +25 -0
- package/dist/esm/ui-dropdown-menu.entry.js +95 -0
- package/dist/esm/ui-field.entry.js +17 -0
- package/dist/esm/ui-input.entry.js +33 -0
- package/dist/esm/ui-label.entry.js +15 -0
- package/dist/esm/ui-loading-overlay.entry.js +22 -0
- package/dist/esm/ui-popover.entry.js +92 -0
- package/dist/esm/ui-progress.entry.js +31 -0
- package/dist/esm/ui-radio-group.entry.js +47 -0
- package/dist/esm/ui-reveal.entry.js +39 -0
- package/dist/esm/ui-scroll-progress.entry.js +35 -0
- package/dist/esm/ui-section.entry.js +21 -0
- package/dist/esm/ui-select.entry.js +26 -0
- package/dist/esm/ui-separator.entry.js +17 -0
- package/dist/esm/ui-skeleton.entry.js +15 -0
- package/dist/esm/ui-slider.entry.js +35 -0
- package/dist/esm/ui-spinner.entry.js +17 -0
- package/dist/esm/ui-switch.entry.js +32 -0
- package/dist/esm/ui-tabs.entry.js +29 -0
- package/dist/esm/ui-textarea.entry.js +33 -0
- package/dist/esm/ui-theme-toggle.entry.js +63 -0
- package/dist/esm/ui-toast.entry.js +65 -0
- package/dist/esm/ui-toaster.entry.js +27 -0
- package/dist/esm/ui-tooltip.entry.js +62 -0
- package/dist/esm/uikit.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/ui-accordion/ui-accordion.d.ts +3 -0
- package/dist/types/components/ui-accordion-item/ui-accordion-item.d.ts +11 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +9 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +6 -0
- package/dist/types/components/ui-button/ui-button.d.ts +15 -0
- package/dist/types/components/ui-card/ui-card.d.ts +3 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +16 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +18 -0
- package/dist/types/components/ui-drawer/ui-drawer.d.ts +20 -0
- package/dist/types/components/ui-dropdown-item/ui-dropdown-item.d.ts +10 -0
- package/dist/types/components/ui-dropdown-menu/ui-dropdown-menu.d.ts +28 -0
- package/dist/types/components/ui-field/ui-field.d.ts +13 -0
- package/dist/types/components/ui-input/ui-input.d.ts +22 -0
- package/dist/types/components/ui-label/ui-label.d.ts +3 -0
- package/dist/types/components/ui-loading-overlay/ui-loading-overlay.d.ts +15 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +27 -0
- package/dist/types/components/ui-progress/ui-progress.d.ts +11 -0
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +20 -0
- package/dist/types/components/ui-reveal/ui-reveal.d.ts +11 -0
- package/dist/types/components/ui-scroll-progress/ui-scroll-progress.d.ts +8 -0
- package/dist/types/components/ui-section/ui-section.d.ts +9 -0
- package/dist/types/components/ui-select/ui-select.d.ts +21 -0
- package/dist/types/components/ui-separator/ui-separator.d.ts +6 -0
- package/dist/types/components/ui-skeleton/ui-skeleton.d.ts +3 -0
- package/dist/types/components/ui-slider/ui-slider.d.ts +20 -0
- package/dist/types/components/ui-spinner/ui-spinner.d.ts +6 -0
- package/dist/types/components/ui-switch/ui-switch.d.ts +12 -0
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +15 -0
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +22 -0
- package/dist/types/components/ui-theme-toggle/ui-theme-toggle.d.ts +13 -0
- package/dist/types/components/ui-toast/ui-toast.d.ts +28 -0
- package/dist/types/components/ui-toaster/ui-toaster.d.ts +19 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +21 -0
- package/dist/types/components.d.ts +1727 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/uikit/index.esm.js +0 -0
- package/dist/uikit/p-06d6d907.entry.js +1 -0
- package/dist/uikit/p-0fb4949b.entry.js +1 -0
- package/dist/uikit/p-162302d1.entry.js +1 -0
- package/dist/uikit/p-19b81437.entry.js +1 -0
- package/dist/uikit/p-24edfe3e.entry.js +1 -0
- package/dist/uikit/p-3d30bc7a.entry.js +1 -0
- package/dist/uikit/p-4382718f.entry.js +1 -0
- package/dist/uikit/p-4a1abc1c.entry.js +1 -0
- package/dist/uikit/p-57058c30.entry.js +1 -0
- package/dist/uikit/p-5df32809.entry.js +1 -0
- package/dist/uikit/p-5ea42ee5.entry.js +1 -0
- package/dist/uikit/p-629c1728.entry.js +1 -0
- package/dist/uikit/p-76f0f79f.entry.js +1 -0
- package/dist/uikit/p-83159bfc.entry.js +1 -0
- package/dist/uikit/p-8bcd423c.entry.js +1 -0
- package/dist/uikit/p-8cebbe65.entry.js +1 -0
- package/dist/uikit/p-90d49509.entry.js +1 -0
- package/dist/uikit/p-94fb298e.entry.js +1 -0
- package/dist/uikit/p-9aa557d1.entry.js +1 -0
- package/dist/uikit/p-9c57cf57.entry.js +1 -0
- package/dist/uikit/p-9d784b04.entry.js +1 -0
- package/dist/uikit/p-9e7b81ef.entry.js +1 -0
- package/dist/uikit/p-9f7c6ca8.entry.js +1 -0
- package/dist/uikit/p-CyBRmmbs.js +1 -0
- package/dist/uikit/p-DYwlrXg_.js +2 -0
- package/dist/uikit/p-a7be1c69.entry.js +1 -0
- package/dist/uikit/p-b30aa6a6.entry.js +1 -0
- package/dist/uikit/p-b61e3df4.entry.js +1 -0
- package/dist/uikit/p-c72ed105.entry.js +1 -0
- package/dist/uikit/p-cb2adfb7.entry.js +1 -0
- package/dist/uikit/p-cf10ca3b.entry.js +1 -0
- package/dist/uikit/p-e410c789.entry.js +1 -0
- package/dist/uikit/p-f7402442.entry.js +1 -0
- package/dist/uikit/p-fd05c146.entry.js +1 -0
- package/dist/uikit/p-fd1648bf.entry.js +1 -0
- package/dist/uikit/uikit.css +6 -0
- package/dist/uikit/uikit.esm.js +1 -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 +48 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class UiToast {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Controla a visibilidade do toast. */
|
|
5
|
+
this.open = false;
|
|
6
|
+
/** Variante visual (afeta a borda lateral). */
|
|
7
|
+
this.variant = "default";
|
|
8
|
+
/** Tempo em ms até o auto-dismiss. */
|
|
9
|
+
this.duration = 4000;
|
|
10
|
+
}
|
|
11
|
+
onOpenChange(value) {
|
|
12
|
+
if (value)
|
|
13
|
+
this.startTimer();
|
|
14
|
+
else
|
|
15
|
+
this.clearTimer();
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
if (this.open)
|
|
19
|
+
this.startTimer();
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this.clearTimer();
|
|
23
|
+
}
|
|
24
|
+
startTimer() {
|
|
25
|
+
this.clearTimer();
|
|
26
|
+
if (this.duration > 0) {
|
|
27
|
+
this.timer = setTimeout(() => this.dismiss(), this.duration);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
clearTimer() {
|
|
31
|
+
if (this.timer) {
|
|
32
|
+
clearTimeout(this.timer);
|
|
33
|
+
this.timer = undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
dismiss() {
|
|
37
|
+
this.clearTimer();
|
|
38
|
+
this.open = false;
|
|
39
|
+
this.uiClose.emit();
|
|
40
|
+
}
|
|
41
|
+
/** Abre o toast imperativamente. */
|
|
42
|
+
async show() {
|
|
43
|
+
this.open = true;
|
|
44
|
+
}
|
|
45
|
+
/** Fecha o toast imperativamente. */
|
|
46
|
+
async close() {
|
|
47
|
+
this.dismiss();
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
return (h(Host, { key: 'abe85b33019341e670263a3fabefe1c73c203a12' }, this.open && (h("div", { key: 'c205504fb55e2a6fa613b54faa7f7b532e7d2998', class: { toast: true, [`variant-${this.variant}`]: true }, role: "status" }, h("div", { key: '6e7c37d0946cefa13c4d0dc0e611263c27ddbd9c', class: "body" }, this.heading && h("p", { key: '2052d9b3a812be260a59e0162983643c9ca6ea58', class: "heading" }, this.heading), this.description && (h("p", { key: '968ed3b147a1cc5e30f8595b0206b4c1368c2598', class: "description" }, this.description))), h("button", { key: '9199db49bf8d563426eae6342dd99f062db43cb3', class: "close", type: "button", "aria-label": "Fechar", onClick: () => this.dismiss() }, h("svg", { key: 'e6f1abf5c953a819aadb205a879e46cf60e9417a', width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { key: '390cb58060de58f0fcd75045597f4d835ce15cbc', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '2259ed783b26c3c0070ec365713ba61e3e9efbe1', x1: "6", y1: "6", x2: "18", y2: "18" })))))));
|
|
51
|
+
}
|
|
52
|
+
static get is() { return "ui-toast"; }
|
|
53
|
+
static get encapsulation() { return "shadow"; }
|
|
54
|
+
static get originalStyleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["ui-toast.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get styleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["ui-toast.css"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get properties() {
|
|
65
|
+
return {
|
|
66
|
+
"open": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": true,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": "Controla a visibilidade do toast."
|
|
79
|
+
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
82
|
+
"reflect": true,
|
|
83
|
+
"attribute": "open",
|
|
84
|
+
"defaultValue": "false"
|
|
85
|
+
},
|
|
86
|
+
"variant": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "UiToastVariant",
|
|
91
|
+
"resolved": "\"danger\" | \"default\" | \"success\" | \"warning\"",
|
|
92
|
+
"references": {
|
|
93
|
+
"UiToastVariant": {
|
|
94
|
+
"location": "local",
|
|
95
|
+
"path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-toast/ui-toast.tsx",
|
|
96
|
+
"id": "src/components/ui-toast/ui-toast.tsx::UiToastVariant"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Variante visual (afeta a borda lateral)."
|
|
105
|
+
},
|
|
106
|
+
"getter": false,
|
|
107
|
+
"setter": false,
|
|
108
|
+
"reflect": false,
|
|
109
|
+
"attribute": "variant",
|
|
110
|
+
"defaultValue": "\"default\""
|
|
111
|
+
},
|
|
112
|
+
"heading": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "string",
|
|
117
|
+
"resolved": "string | undefined",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": true,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "T\u00EDtulo do toast."
|
|
125
|
+
},
|
|
126
|
+
"getter": false,
|
|
127
|
+
"setter": false,
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"attribute": "heading"
|
|
130
|
+
},
|
|
131
|
+
"description": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string | undefined",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": "Descri\u00E7\u00E3o do toast."
|
|
144
|
+
},
|
|
145
|
+
"getter": false,
|
|
146
|
+
"setter": false,
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"attribute": "description"
|
|
149
|
+
},
|
|
150
|
+
"duration": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "number",
|
|
155
|
+
"resolved": "number",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Tempo em ms at\u00E9 o auto-dismiss."
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"attribute": "duration",
|
|
168
|
+
"defaultValue": "4000"
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get events() {
|
|
173
|
+
return [{
|
|
174
|
+
"method": "uiClose",
|
|
175
|
+
"name": "uiClose",
|
|
176
|
+
"bubbles": true,
|
|
177
|
+
"cancelable": true,
|
|
178
|
+
"composed": true,
|
|
179
|
+
"docs": {
|
|
180
|
+
"tags": [],
|
|
181
|
+
"text": "Emitido quando o toast \u00E9 fechado (timer, close() ou bot\u00E3o)."
|
|
182
|
+
},
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "void",
|
|
185
|
+
"resolved": "void",
|
|
186
|
+
"references": {}
|
|
187
|
+
}
|
|
188
|
+
}];
|
|
189
|
+
}
|
|
190
|
+
static get methods() {
|
|
191
|
+
return {
|
|
192
|
+
"show": {
|
|
193
|
+
"complexType": {
|
|
194
|
+
"signature": "() => Promise<void>",
|
|
195
|
+
"parameters": [],
|
|
196
|
+
"references": {
|
|
197
|
+
"Promise": {
|
|
198
|
+
"location": "global",
|
|
199
|
+
"id": "global::Promise"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"return": "Promise<void>"
|
|
203
|
+
},
|
|
204
|
+
"docs": {
|
|
205
|
+
"text": "Abre o toast imperativamente.",
|
|
206
|
+
"tags": []
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"close": {
|
|
210
|
+
"complexType": {
|
|
211
|
+
"signature": "() => Promise<void>",
|
|
212
|
+
"parameters": [],
|
|
213
|
+
"references": {
|
|
214
|
+
"Promise": {
|
|
215
|
+
"location": "global",
|
|
216
|
+
"id": "global::Promise"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"return": "Promise<void>"
|
|
220
|
+
},
|
|
221
|
+
"docs": {
|
|
222
|
+
"text": "Fecha o toast imperativamente.",
|
|
223
|
+
"tags": []
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
static get watchers() {
|
|
229
|
+
return [{
|
|
230
|
+
"propName": "open",
|
|
231
|
+
"methodName": "onOpenChange"
|
|
232
|
+
}];
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiToaster {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.items = [];
|
|
5
|
+
this.counter = 0;
|
|
6
|
+
}
|
|
7
|
+
/** Enfileira um novo toast imperativamente. */
|
|
8
|
+
async toast(opts) {
|
|
9
|
+
const id = `toast-${this.counter++}-${Math.random()
|
|
10
|
+
.toString(36)
|
|
11
|
+
.slice(2)}`;
|
|
12
|
+
this.items = [...this.items, { ...opts, id }];
|
|
13
|
+
}
|
|
14
|
+
remove(id) {
|
|
15
|
+
this.items = this.items.filter((item) => item.id !== id);
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (h(Host, { key: '51de8367f0037a6b7ea809bb643d0a20e41553bf' }, h("div", { key: '34a6d8310ce460ee5cec6e87ab20266a9a522177', class: "container" }, this.items.map((item) => (h("ui-toast", { key: item.id, open: true, heading: item.heading, description: item.description, variant: item.variant ?? "default", duration: item.duration ?? 4000, onUiClose: () => this.remove(item.id) }))))));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "ui-toaster"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["ui-toaster.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["ui-toaster.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get states() {
|
|
33
|
+
return {
|
|
34
|
+
"items": {}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get methods() {
|
|
38
|
+
return {
|
|
39
|
+
"toast": {
|
|
40
|
+
"complexType": {
|
|
41
|
+
"signature": "(opts: UiToastOptions) => Promise<void>",
|
|
42
|
+
"parameters": [{
|
|
43
|
+
"name": "opts",
|
|
44
|
+
"type": "UiToastOptions",
|
|
45
|
+
"docs": ""
|
|
46
|
+
}],
|
|
47
|
+
"references": {
|
|
48
|
+
"Promise": {
|
|
49
|
+
"location": "global",
|
|
50
|
+
"id": "global::Promise"
|
|
51
|
+
},
|
|
52
|
+
"UiToastOptions": {
|
|
53
|
+
"location": "local",
|
|
54
|
+
"path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-toaster/ui-toaster.tsx",
|
|
55
|
+
"id": "src/components/ui-toaster/ui-toaster.tsx::UiToastOptions"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"return": "Promise<void>"
|
|
59
|
+
},
|
|
60
|
+
"docs": {
|
|
61
|
+
"text": "Enfileira um novo toast imperativamente.",
|
|
62
|
+
"tags": []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.trigger {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tooltip {
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
z-index: 50;
|
|
14
|
+
width: max-content;
|
|
15
|
+
max-width: 18rem;
|
|
16
|
+
padding: 0.375rem 0.75rem;
|
|
17
|
+
font-family: var(--ui-font-sans);
|
|
18
|
+
font-size: 0.75rem;
|
|
19
|
+
line-height: 1.4;
|
|
20
|
+
color: var(--ui-foreground);
|
|
21
|
+
border: 1px solid var(--ui-border);
|
|
22
|
+
background: var(--ui-panel-strong);
|
|
23
|
+
box-shadow: var(--ui-shadow-lg);
|
|
24
|
+
backdrop-filter: blur(22px);
|
|
25
|
+
border-radius: var(--ui-radius-sm);
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
transform: scale(0.96);
|
|
29
|
+
transition:
|
|
30
|
+
opacity var(--ui-duration) var(--ui-ease),
|
|
31
|
+
transform var(--ui-duration) var(--ui-ease);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tooltip.is-visible {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: scale(1);
|
|
37
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { computePosition, autoUpdate, offset, flip, shift, } from "@floating-ui/dom";
|
|
3
|
+
export class UiTooltip {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** Texto exibido no balão flutuante. */
|
|
6
|
+
this.content = "";
|
|
7
|
+
/** Posição preferida do balão relativa ao gatilho. */
|
|
8
|
+
this.placement = "top";
|
|
9
|
+
/** Atraso (ms) antes de exibir o balão. */
|
|
10
|
+
this.openDelay = 200;
|
|
11
|
+
this.visible = false;
|
|
12
|
+
this.onEnter = () => {
|
|
13
|
+
if (this.timer)
|
|
14
|
+
clearTimeout(this.timer);
|
|
15
|
+
this.timer = setTimeout(() => {
|
|
16
|
+
this.visible = true;
|
|
17
|
+
requestAnimationFrame(() => this.start());
|
|
18
|
+
}, this.openDelay);
|
|
19
|
+
};
|
|
20
|
+
this.onLeave = () => {
|
|
21
|
+
if (this.timer)
|
|
22
|
+
clearTimeout(this.timer);
|
|
23
|
+
this.visible = false;
|
|
24
|
+
this.stop();
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
disconnectedCallback() {
|
|
28
|
+
this.stop();
|
|
29
|
+
if (this.timer)
|
|
30
|
+
clearTimeout(this.timer);
|
|
31
|
+
}
|
|
32
|
+
start() {
|
|
33
|
+
if (!this.triggerEl || !this.floatingEl)
|
|
34
|
+
return;
|
|
35
|
+
this.stop();
|
|
36
|
+
this.cleanup = autoUpdate(this.triggerEl, this.floatingEl, () => {
|
|
37
|
+
if (!this.triggerEl || !this.floatingEl)
|
|
38
|
+
return;
|
|
39
|
+
computePosition(this.triggerEl, this.floatingEl, {
|
|
40
|
+
placement: this.placement,
|
|
41
|
+
middleware: [offset(8), flip(), shift({ padding: 8 })],
|
|
42
|
+
}).then(({ x, y }) => {
|
|
43
|
+
Object.assign(this.floatingEl.style, { left: `${x}px`, top: `${y}px` });
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
stop() {
|
|
48
|
+
this.cleanup?.();
|
|
49
|
+
this.cleanup = undefined;
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
return (h(Host, { key: '49f898bc54da31cf9f6b5189577bae89f6681bf8', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, h("span", { key: '394744f0b34ec0c534b417ba520f2b805b582802', class: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: '7afd6d807490d8af4fffeb38e69de825f7d3c138' })), h("div", { key: '3d12cffd7fd903ec6178961bf40476b063ee1563', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
|
|
53
|
+
}
|
|
54
|
+
static get is() { return "ui-tooltip"; }
|
|
55
|
+
static get encapsulation() { return "shadow"; }
|
|
56
|
+
static get originalStyleUrls() {
|
|
57
|
+
return {
|
|
58
|
+
"$": ["ui-tooltip.css"]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get styleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["ui-tooltip.css"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get properties() {
|
|
67
|
+
return {
|
|
68
|
+
"content": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"mutable": false,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "string",
|
|
73
|
+
"resolved": "string",
|
|
74
|
+
"references": {}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": false,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": "Texto exibido no bal\u00E3o flutuante."
|
|
81
|
+
},
|
|
82
|
+
"getter": false,
|
|
83
|
+
"setter": false,
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"attribute": "content",
|
|
86
|
+
"defaultValue": "\"\""
|
|
87
|
+
},
|
|
88
|
+
"placement": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "Placement",
|
|
93
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
94
|
+
"references": {
|
|
95
|
+
"Placement": {
|
|
96
|
+
"location": "import",
|
|
97
|
+
"path": "@floating-ui/dom",
|
|
98
|
+
"id": "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement",
|
|
99
|
+
"referenceLocation": "Placement"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Posi\u00E7\u00E3o preferida do bal\u00E3o relativa ao gatilho."
|
|
108
|
+
},
|
|
109
|
+
"getter": false,
|
|
110
|
+
"setter": false,
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"attribute": "placement",
|
|
113
|
+
"defaultValue": "\"top\""
|
|
114
|
+
},
|
|
115
|
+
"openDelay": {
|
|
116
|
+
"type": "number",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "number",
|
|
120
|
+
"resolved": "number",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "Atraso (ms) antes de exibir o bal\u00E3o."
|
|
128
|
+
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"attribute": "open-delay",
|
|
133
|
+
"defaultValue": "200"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get states() {
|
|
138
|
+
return {
|
|
139
|
+
"visible": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
static get elementRef() { return "host"; }
|
|
143
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
+
* will result in the same behavior.
|
|
25
|
+
*/
|
|
26
|
+
export declare const setNonce: (nonce: string) => void
|
|
27
|
+
|
|
28
|
+
export interface SetPlatformOptions {
|
|
29
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
34
|
+
|
|
35
|
+
export * from '../types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=':root{--ui-background:#f6f7fb;--ui-foreground:#090b12;--ui-muted:#475467;--ui-text-soft:#263244;--ui-text-muted:#667085;--ui-text-faint:#8a94a6;--ui-border:rgba(15, 23, 42, 0.12);--ui-border-strong:rgba(15, 23, 42, 0.22);--ui-panel:rgba(255, 255, 255, 0.72);--ui-panel-strong:rgba(255, 255, 255, 0.9);--ui-panel-dark:rgba(255, 255, 255, 0.62);--ui-chip:rgba(255, 255, 255, 0.68);--ui-overlay:rgba(15, 23, 42, 0.32);--ui-accent:#26d0ce;--ui-accent-strong:#5b8cff;--ui-accent-contrast:#020617;--ui-ring:rgba(38, 208, 206, 0.34);--ui-success:#17c964;--ui-warning:#f5a524;--ui-danger:#f31260;--ui-info:#5b8cff;--ui-on-status:#ffffff;--ui-radius-sm:0.625rem;--ui-radius:1rem;--ui-radius-lg:1.5rem;--ui-radius-xl:1.75rem;--ui-radius-full:9999px;--ui-shadow-sm:0 1px 2px rgba(15, 23, 42, 0.08);--ui-shadow:0 16px 60px rgba(15, 23, 42, 0.1);--ui-shadow-lg:0 24px 80px rgba(15, 23, 42, 0.16);--ui-ease:cubic-bezier(0.22, 1, 0.36, 1);--ui-duration-fast:150ms;--ui-duration:300ms;--ui-duration-slow:600ms;--ui-font-sans:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,\n "Segoe UI", sans-serif;--ui-font-mono:ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, monospace;--ui-page-gradient:radial-gradient(circle at 16% 0%, rgba(38, 208, 206, 0.16), transparent 30rem),\n radial-gradient(circle at 78% 12%, rgba(91, 140, 255, 0.14), transparent 34rem),\n linear-gradient(180deg, #f7f9fe 0%, #eef4fb 52%, #e8eef7 100%)}.dark{--ui-background:#03050b;--ui-foreground:#f8fbff;--ui-muted:#9aa7bd;--ui-text-soft:#e2e8f0;--ui-text-muted:#cbd5e1;--ui-text-faint:#94a3b8;--ui-border:rgba(226, 232, 240, 0.12);--ui-border-strong:rgba(226, 232, 240, 0.22);--ui-panel:rgba(9, 13, 24, 0.68);--ui-panel-strong:rgba(11, 16, 29, 0.86);--ui-panel-dark:rgba(0, 0, 0, 0.28);--ui-chip:rgba(255, 255, 255, 0.055);--ui-overlay:rgba(2, 4, 9, 0.62);--ui-accent:#64fff2;--ui-accent-strong:#8aa8ff;--ui-accent-contrast:#020617;--ui-ring:rgba(100, 255, 242, 0.24);--ui-success:#45d483;--ui-warning:#f7b750;--ui-danger:#f871a0;--ui-info:#8aa8ff;--ui-shadow-sm:0 1px 2px rgba(0, 0, 0, 0.4);--ui-shadow:0 16px 60px rgba(0, 0, 0, 0.24);--ui-shadow-lg:0 24px 80px rgba(0, 0, 0, 0.18);--ui-page-gradient:radial-gradient(circle at 18% 0%, rgba(38, 208, 206, 0.18), transparent 30rem),\n radial-gradient(circle at 78% 10%, rgba(91, 140, 255, 0.14), transparent 34rem),\n linear-gradient(180deg, var(--ui-background), #070911 58%, #03050b)}:where(html){font-family:var(--ui-font-sans)}';function e(t,e,n){const i="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==i;){const i=Object.getOwnPropertyDescriptor(t,e);if(i&&(!n||i.get))return i;t=Object.getPrototypeOf(t)}}var n,i=(t,n)=>{var i;Object.entries(null!=(i=n.i.t)?i:{}).map((([i,[r]])=>{if(31&r||32&r){const r=t[i],o=e(Object.getPrototypeOf(t),i,!0)||Object.getOwnPropertyDescriptor(t,i);o&&Object.defineProperty(t,i,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(i)?t[i]=n.o.get(i):void 0!==r&&(t[i]=r)}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,l=(t,e)=>(0,console.error)(t,e),s=new Map,a="undefined"!=typeof window?window:{},u=a.HTMLElement||class{},c={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,i)=>t.addEventListener(e,n,i),rel:(t,e,n,i)=>t.removeEventListener(e,n,i),ce:(t,e)=>new CustomEvent(t,e)},f=(()=>{try{return!!a.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!f&&(()=>!!a.document&&Object.getOwnPropertyDescriptor(a.document.adoptedStyleSheets,"length").writable)(),p=!1,b=[],g=[],m=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&c.l?v(y):c.raf(y))},h=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},y=()=>{h(b),h(g),(p=b.length>0)&&c.raf(y)},v=t=>Promise.resolve(void 0).then(t),w=m(g,!0),$=t=>{const e=new URL(t,c.u);return e.origin!==a.location.origin?e.href:e.pathname},j=t=>c.u=t;function x(){var e;const i=this.attachShadow({mode:"open"});if(void 0===n&&(n=null!=(e=function(t){if(!f)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(t))?e:null),n)d?i.adoptedStyleSheets.push(n):i.adoptedStyleSheets=[...i.adoptedStyleSheets,n];else if(!f){const e=document.createElement("style");e.innerHTML=t,i.prepend(e)}}var O,S=new WeakMap,k=t=>"sc-"+t.p,M=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let i=null,r=null,o=!1,l=!1;const s=[],a=e=>{for(let n=0;n<e.length;n++)i=e[n],Array.isArray(i)?a(i):null!=i&&"boolean"!=typeof i&&((o="function"!=typeof t&&!M(i))&&(i+=""),o&&l?s[s.length-1].m+=i:s.push(o?C(null,i):i),l=o)};if(a(n),e){e.key&&(r=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=C(t,null);return u.h=e,s.length>0&&(u.v=s),u.$=r,u},C=(t,e)=>({l:0,j:t,m:null!=e?e:null,O:null,v:null,h:null,$:null}),A={},L=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const i of e){if(n)break;for(const e of t[i])if("string"==typeof e){n=!0;break}}if(!n)return t;const i={};for(const n of e)i[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return i},N=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,P=(t,e)=>{const n=t;return{emit:t=>R(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},R=(t,e,n)=>{const i=c.ce(e,n);return t.dispatchEvent(i),i},U=(t,e,n,i,l,s)=>{if(n===i)return;let u=o(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,r=D(n);let o=D(i);e.remove(...r.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!r.includes(t))))}else if("style"===e){for(const e in n)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)n&&i[e]===n[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if("ref"===e)i&&Q(i,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=r(t);if(e&&e.i&&e.i.t){const t=e.i.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==i||!1===i?!1===i&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===i?"":i))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=i}catch(t){}return}{const r=M(i);if((u||r&&null!==i)&&!l)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const r=null==i?"":i;"list"===e?u=!1:null!=n&&t[e]===r||("function"==typeof t.__lookupSetter__(e)?t[e]=r:t.setAttribute(e,r))}}catch(t){}null==i||!1===i?!1===i&&""!==t.getAttribute(e)||t.removeAttribute(e):(!u||4&s||l)&&!r&&1===t.nodeType&&t.setAttribute(e,i=!0===i?"":i)}}else if(e="-"===e[2]?e.slice(3):o(a,f)?f.slice(2):f[2]+e.slice(3),n||i){const r=e.endsWith(F);e=e.replace(H,""),n&&c.rel(t,e,n,r),i&&c.ael(t,e,i,r)}},_=/\s/,D=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(_):[]),F="Capture",H=RegExp(F+"$"),W=(t,e,n)=>{const i=11===e.O.nodeType&&e.O.host?e.O.host:e.O,r=t&&t.h||{},o=e.h||{};for(const t of z(Object.keys(r)))t in o||U(i,t,r[t],void 0,n,e.l);for(const t of z(Object.keys(o)))U(i,t,r[t],o[t],n,e.l)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var I=!1,V=!1,q=[],B=[],T=(t,e,n)=>{const i=e.v[n];let r,o,l=0;if(null!=i.m)r=i.O=a.document.createTextNode(i.m);else{if(V||(V="svg"===i.j),!a.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(r=i.O=a.document.createElementNS(V?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.j),V&&"foreignObject"===i.j&&(V=!1),W(null,i,V),i.v){const e="template"===i.j?r.content:r;for(l=0;l<i.v.length;++l)o=T(t,i,l),o&&e.appendChild(o)}"svg"===i.j?V=!1:"foreignObject"===r.tagName&&(V=!0)}return r["s-hn"]=O,r},Y=(t,e,n,i,r,o)=>{let l,s=t;for(s.shadowRoot&&s.tagName===O&&(s=s.shadowRoot),"template"===n.j&&(s=s.content);r<=o;++r)i[r]&&(l=T(null,n,r),l&&(i[r].O=l,X(s,l,e)))},Z=(t,e,n)=>{for(let i=e;i<=n;++i){const e=t[i];if(e){const t=e.O;K(e),t&&t.remove()}}},G=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),J=(t,e,n=!1)=>{const i=e.O=t.O,r=t.v,o=e.v,l=e.j,s=e.m;null==s?(V="svg"===l||"foreignObject"!==l&&V,"slot"!==l||I||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{c.l|=1;const e=t.closest(O.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),i=Array.from(t.__childNodes||t.childNodes);for(const t of n?i.reverse():i)null!=t["s-sh"]&&(X(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.l&=-2})(e.O.parentElement)),W(t,e,V),null!==r&&null!==o?((t,e,n,i,r=!1)=>{let o,l,s=0,a=0,u=0,c=0,f=e.length-1,d=e[0],p=e[f],b=i.length-1,g=i[0],m=i[b];const h="template"===n.j?t.content:t;for(;s<=f&&a<=b;)if(null==d)d=e[++s];else if(null==p)p=e[--f];else if(null==g)g=i[++a];else if(null==m)m=i[--b];else if(G(d,g,r))J(d,g,r),d=e[++s],g=i[++a];else if(G(p,m,r))J(p,m,r),p=e[--f],m=i[--b];else if(G(d,m,r))J(d,m,r),X(h,d.O,p.O.nextSibling),d=e[++s],m=i[--b];else if(G(p,g,r))J(p,g,r),X(h,p.O,d.O),p=e[--f],g=i[++a];else{for(u=-1,c=s;c<=f;++c)if(e[c]&&null!==e[c].$&&e[c].$===g.$){u=c;break}u>=0?(l=e[u],l.j!==g.j?o=T(e&&e[a],n,u):(J(l,g,r),e[u]=void 0,o=l.O),g=i[++a]):(o=T(e&&e[a],n,a),g=i[++a]),o&&X(d.O.parentNode,o,d.O)}s>f?Y(t,null==i[b+1]?null:i[b+1].O,n,i,a,b):a>b&&Z(e,s,f)})(i,r,e,o,n):null!==o?(null!==t.m&&(i.textContent=""),Y(i,null,e,o,0,o.length-1)):!n&&null!==r&&Z(r,0,r.length-1),V&&"svg"===l&&(V=!1)):t.m!==s&&(i.data=s)},K=t=>{t.h&&t.h.ref&&q.push((()=>t.h.ref(null))),t.v&&t.v.map(K)},Q=(t,e)=>{B.push((()=>t(e)))},X=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),tt=(t,e,n=!1)=>{const i=t.$hostElement$,r=t.i,o=t.k||C(null,null),l=(t=>t&&t.j===A)(e)?e:E(null,null,e);if(O=i.tagName,r.M&&(l.h=l.h||{},r.M.forEach((([t,e])=>{l.h[e]=i[t]}))),n&&l.h)for(const t of Object.keys(l.h))i.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(l.h[t]=i[t]);l.j=null,l.l|=4,t.k=l,l.O=o.O=i.shadowRoot||i,I=!(!(1&r.l)||128&r.l),J(o,l,n),q.forEach((t=>t())),q.length=0,B.forEach((t=>t())),B.length=0},et=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((i=>t.C=()=>{e["s-p"].splice(n-1,1),i()})))}},nt=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);et(t,t.A);const n=()=>it(t,e);if(!e)return w(n);queueMicrotask((()=>{n()}))},it=(t,e)=>{const n=t.$hostElement$,i=n;if(!i)throw 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 r;return r=ct(i,e?"componentWillLoad":"componentWillUpdate",void 0,n),r=rt(r,(()=>ct(i,"componentWillRender",void 0,n))),rt(r,(()=>lt(t,i,e)))},rt=(t,e)=>ot(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,lt=async(t,e,n)=>{var i;const r=t.$hostElement$,o=r["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,i=e.l,r=((t,e)=>{var n,i,r;const o=k(e),l=s.get(o);if(!a.document)return o;if(t=11===t.nodeType?t:a.document,l)if("string"==typeof l){let r,s=S.get(t=t.head||t);if(s||S.set(t,s=new Set),!s.has(o)){r=a.document.createElement("style"),r.textContent=l;const u=null!=(n=c.L)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=a.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=u&&r.setAttribute("nonce",u),!(1&e.l))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(r,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(i=t.defaultView)?i:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(l),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=l+e.textContent:t.prepend(r)}else t.append(r);1&e.l&&t.insertBefore(r,null),4&e.l&&(r.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(o)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(o)){const n=null!=(r=t.defaultView)?r:t.ownerDocument.defaultView;let i;if(l.constructor===n.CSSStyleSheet)i=l;else{i=new n.CSSStyleSheet;for(let t=0;t<l.cssRules.length;t++)i.insertRule(l.cssRules[t].cssText,t)}d?t.adoptedStyleSheets.push(i):t.adoptedStyleSheets=[...t.adoptedStyleSheets,i],e.add(o)}}return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&i&&(n["s-sc"]=r,n.classList.add(r+"-h"))})(t);st(t,e,r,n),o&&(o.map((t=>t())),r["s-rc"]=void 0);{const e=null!=(i=r["s-p"])?i:[],n=()=>at(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.l|=4,e.length=0)}},st=(t,e,n,i)=>{try{e=e.render(),t.l&=-17,t.l|=2,tt(t,e,i)}catch(e){l(e,t.$hostElement$)}return null},at=t=>{const e=t.$hostElement$,n=e,i=t.A;ct(n,"componentDidRender",void 0,e),64&t.l?ct(n,"componentDidUpdate",void 0,e):(t.l|=64,ft(e),ct(n,"componentDidLoad",void 0,e),t.N(e),i||ut()),t.C&&(t.C(),t.C=void 0),512&t.l&&v((()=>nt(t,!1))),t.l&=-517},ut=()=>{v((()=>R(a,"appload",{detail:{namespace:"uikit"}})))},ct=(t,e,n,i)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,i)}},ft=t=>t.classList.add("hydrated"),dt=(t,e,n,i)=>{const o=r(t);if(!o)return;const s=t,a=o.o.get(e),u=o.l,c=s;if(!((n=N(n,i.t[e][0]))===a||Number.isNaN(a)&&Number.isNaN(n))){if(o.o.set(e,n),i.P){const t=i.P[e];t&&t.map((t=>{try{const[[i,r]]=Object.entries(t);(128&u||1&r)&&(c?c[i](n,a,e):o.R.push((()=>{o.U[i](n,a,e)})))}catch(t){l(t,s)}}))}if(2&u){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,a,e)&&!(16&u))return;16&u||nt(o,!1)}}},pt=(t,n)=>{var i,o;const l=t.prototype;{t.watchers&&!n.P&&(n.P=L(t.watchers)),t.deserializers&&!n._&&(n._=t.deserializers),t.serializers&&!n.D&&(n.D=t.serializers);const s=Object.entries(null!=(i=n.t)?i:{});s.map((([t,[i]])=>{if(31&i||32&i){const{get:o,set:s}=e(l,t)||{};o&&(n.t[t][0]|=2048),s&&(n.t[t][0]|=4096),Object.defineProperty(l,t,{get(){return o?o.apply(this):((t,e)=>r(this).o.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(l,t,{set(e){const o=r(this);if(o){if(s)return void 0===(32&i?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(e=o.o.get(t)),s.call(this,N(e,i)),void dt(this,t,e=32&i?this[t]:o.$hostElement$[t],n);dt(this,t,e,n)}}})}}));{const e=new Map;l.attributeChangedCallback=function(t,i,o){c.jmp((()=>{var a;const u=e.get(t),c=r(this);if(this.hasOwnProperty(u),l.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==o)return;if(null==u){const e=null==c?void 0:c.l;if(c&&e&&!(8&e)&&o!==i){const r=this,l=null==(a=n.P)?void 0:a[t];null==l||l.forEach((n=>{const[[l,s]]=Object.entries(n);null!=r[l]&&(128&e||1&s)&&r[l].call(r,o,i,t)}))}return}const f=s.find((([t])=>t===u)),d=f&&4&f[1][0],p=d&&null===o&&void 0===this[u];d&&(o=null!==o&&"false"!==o);const b=Object.getOwnPropertyDescriptor(l,u);p||o==this[u]||b.get&&!b.set||(this[u]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.P)?o:{}),...s.filter((([t,e])=>31&e[0])).map((([t,i])=>{var r;const o=i[1]||t;return e.set(o,t),512&i[0]&&(null==(r=n.M)||r.push([t,o])),o}))]))}}return t},bt=(t,e)=>{const n={l:e[0],p:e[1]};try{n.t=e[2],n.F=e[3],n.P=L(t.P),n._=t._,n.D=t.D,n.M=[];const o=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,i:e,o:new Map,H:new Map};n.W=new Promise((t=>n.N=t)),t["s-p"]=[],t["s-rc"]=[];const r=n;t.__stencil__getHostRef=()=>r,512&e.l&&i(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=r(this);if(!t)return;gt(this,t,n.F),this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.l)){const e=r(t);if(!e)return;const n=e.i,i=()=>{};if(1&e.l)gt(t,e,n.F),(null==e?void 0:e.U)||(null==e?void 0:e.W)&&e.W.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){et(e,e.A=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 i;try{if(!(32&e.l)&&(e.l|=32,i=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),i&&i.style)){let t;"string"==typeof i.style&&(t=i.style);const e=k(n);if(!s.has(e)){const i=()=>{};((t,e,n)=>{let i=s.get(t);f&&n?(i=i||new CSSStyleSheet,"string"==typeof i?i=e:i.replaceSync(e)):i=e,s.set(t,i)})(e,t,!!(1&n.l)),i()}}const r=e.A,o=()=>nt(e,!0);r&&r["s-rc"]?r["s-rc"].push(o):o()}catch(n){l(n,t),e.C&&(e.C(),e.C=void 0),e.N&&e.N(t)}})(t,e,n)}i()}})(this),o&&o.call(this)},disconnectedCallback(){(async t=>{if(!(1&c.l)){const e=r(t);(null==e?void 0:e.I)&&(e.I.map((t=>t())),e.I=void 0)}S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else x.call(this,n)}}),Object.defineProperty(t,"is",{value:n.p,configurable:!0}),pt(t,n)}catch(e){return l(e),t}},gt=(t,e,n)=>{n&&a.document&&n.map((([n,i,r])=>{const o=t,l=mt(e,r),s=ht(n);c.ael(o,i,l,s),(e.I=e.I||[]).push((()=>c.rel(o,i,l,s)))}))},mt=(t,e)=>n=>{try{t.$hostElement$[e](n)}catch(e){l(e,t.$hostElement$)}},ht=t=>({passive:!!(1&t),capture:!!(2&t)}),yt=t=>c.L=t,vt=t=>Object.assign(c,t),wt=new WeakMap;function $t(t,e){let n=wt.get(e);n||(n={l:0,i:{l:0,p:e.tagName},$hostElement$:e},wt.set(e,n)),tt(n,t)}function jt(t){return t}export{u as H,A as a,P as c,$ as getAssetPath,E as h,bt as p,$t as render,j as setAssetPath,yt as setNonce,vt as setPlatformOptions,jt as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as s,H as i,h as r,a as n}from"./index.js";const t=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.size="md"}render(){return r(n,{key:"cedf6e857d1f4e6561c78f3fd3076341c2d8ecdc",role:"status"},r("span",{key:"7200580dccc32b30829725ad84e913c3b1afee60",class:{spinner:!0,[`size-${this.size}`]:!0}}),r("span",{key:"63d4cfee2e5cebabc3c7b3b6ed95a656daa65705",class:"sr-only"},"Carregando"))}static get style(){return":host{display:inline-flex;color:var(--ui-accent)}.spinner{display:inline-block;border-radius:var(--ui-radius-full);border:2px solid currentColor;border-top-color:transparent;animation:ui-spinner-spin 0.7s linear infinite}.size-sm{width:1rem;height:1rem}.size-md{width:1.5rem;height:1.5rem}.size-lg{width:2rem;height:2rem}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@keyframes ui-spinner-spin{to{transform:rotate(360deg)}}"}},[1,"ui-spinner",{size:[1]}]);function a(){"undefined"!=typeof customElements&&["ui-spinner"].forEach((s=>{"ui-spinner"===s&&(customElements.get(e(s))||customElements.define(e(s),t))}))}a();export{t as U,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as a,c as i,h as r,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiClose=i(this,"uiClose"),this.open=!1,this.variant="default",this.duration=4e3}onOpenChange(e){e?this.startTimer():this.clearTimer()}componentDidLoad(){this.open&&this.startTimer()}disconnectedCallback(){this.clearTimer()}startTimer(){this.clearTimer(),this.duration>0&&(this.timer=setTimeout((()=>this.dismiss()),this.duration))}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=void 0)}dismiss(){this.clearTimer(),this.open=!1,this.uiClose.emit()}async show(){this.open=!0}async close(){this.dismiss()}render(){return r(s,{key:"abe85b33019341e670263a3fabefe1c73c203a12"},this.open&&r("div",{key:"c205504fb55e2a6fa613b54faa7f7b532e7d2998",class:{toast:!0,[`variant-${this.variant}`]:!0},role:"status"},r("div",{key:"6e7c37d0946cefa13c4d0dc0e611263c27ddbd9c",class:"body"},this.heading&&r("p",{key:"2052d9b3a812be260a59e0162983643c9ca6ea58",class:"heading"},this.heading),this.description&&r("p",{key:"968ed3b147a1cc5e30f8595b0206b4c1368c2598",class:"description"},this.description)),r("button",{key:"9199db49bf8d563426eae6342dd99f062db43cb3",class:"close",type:"button","aria-label":"Fechar",onClick:()=>this.dismiss()},r("svg",{key:"e6f1abf5c953a819aadb205a879e46cf60e9417a",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},r("line",{key:"390cb58060de58f0fcd75045597f4d835ce15cbc",x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{key:"2259ed783b26c3c0070ec365713ba61e3e9efbe1",x1:"6",y1:"6",x2:"18",y2:"18"})))))}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{display:block}.toast{display:flex;align-items:flex-start;gap:0.75rem;padding:0.875rem 1rem;border:1px solid var(--ui-border);border-left:3px solid var(--ui-accent);border-radius:var(--ui-radius);background:var(--ui-panel-strong);backdrop-filter:blur(22px);box-shadow:var(--ui-shadow-lg);font-family:var(--ui-font-sans);animation:ui-toast-pop var(--ui-duration) var(--ui-ease)}.variant-default{border-left-color:var(--ui-accent)}.variant-success{border-left-color:var(--ui-success)}.variant-warning{border-left-color:var(--ui-warning)}.variant-danger{border-left-color:var(--ui-danger)}.body{flex:1;min-width:0;display:flex;flex-direction:column;gap:0.25rem}.heading{margin:0;font-size:0.875rem;font-weight:600;color:var(--ui-foreground)}.description{margin:0;font-size:0.8125rem;color:var(--ui-text-muted)}.close{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0.125rem;border:none;background:transparent;color:var(--ui-text-muted);cursor:pointer;border-radius:var(--ui-radius-sm);transition:color var(--ui-duration) var(--ui-ease)}.close:hover{color:var(--ui-foreground)}@keyframes ui-toast-pop{from{opacity:0;transform:translateY(0.5rem) scale(0.98)}to{opacity:1;transform:translateY(0) scale(1)}}"}},[1,"ui-toast",{open:[1540],variant:[1],heading:[1],description:[1],duration:[2],show:[64],close:[64]},void 0,{open:[{onOpenChange:0}]}]);function n(){"undefined"!=typeof customElements&&["ui-toast"].forEach((t=>{"ui-toast"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}n();export{o as U,n as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=Math.min,n=Math.max,e=Math.round,o=Math.floor,r=t=>({x:t,y:t}),i={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,o,r){return n(e,t(o,r))}function l(t,n){return"function"==typeof t?t(n):t}function a(t){return t.split("-")[0]}function s(t){return t.split("-")[1]}function u(t){return"x"===t?"y":"x"}function f(t){return"y"===t?"height":"width"}function d(t){const n=t[0];return"t"===n||"b"===n?"y":"x"}function m(t){return u(d(t))}function y(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const h=["left","right"],p=["right","left"],x=["top","bottom"],w=["bottom","top"];function g(t){const n=a(t);return i[n]+t.slice(n.length)}function v(t){const{x:n,y:e,width:o,height:r}=t;return{width:o,height:r,top:e,left:n,right:n+o,bottom:e+r,x:n,y:e}}function b(t,n,e){let{reference:o,floating:r}=t;const i=d(n),c=m(n),l=f(c),u=a(n),y="y"===i,h=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,x=o[l]/2-r[l]/2;let w;switch(u){case"top":w={x:h,y:o.y-r.height};break;case"bottom":w={x:h,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:p};break;case"left":w={x:o.x-r.width,y:p};break;default:w={x:o.x,y:o.y}}switch(s(n)){case"start":w[c]-=x*(e&&y?-1:1);break;case"end":w[c]+=x*(e&&y?-1:1)}return w}async function A(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:c,elements:a,strategy:s}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=l(n,t),h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(y),p=a[m?"floating"===d?"reference":"floating":d],x=v(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(p)))||e?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),w="floating"===d?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},A=v(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:s}):w);return{top:(x.top-A.top+h.top)/b.y,bottom:(A.bottom-x.bottom+h.bottom)/b.y,left:(x.left-A.left+h.left)/b.x,right:(A.right-x.right+h.right)/b.x}}const S=new Set(["left","top"]);function R(){return"undefined"!=typeof window}function F(t){return O(t)?(t.nodeName||"").toLowerCase():"#document"}function k(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function C(t){var n;return null==(n=(O(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function O(t){return!!R()&&(t instanceof Node||t instanceof k(t).Node)}function T(t){return!!R()&&(t instanceof Element||t instanceof k(t).Element)}function M(t){return!!R()&&(t instanceof HTMLElement||t instanceof k(t).HTMLElement)}function P(t){return!(!R()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof k(t).ShadowRoot)}function D(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=H(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&"inline"!==r&&"contents"!==r}function z(t){return/^(table|td|th)$/.test(F(t))}function L(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const E=/transform|translate|scale|rotate|perspective|filter/,B=/paint|layout|strict|content/,$=t=>!!t&&"none"!==t;let I;function N(t){const n=T(t)?H(t):t;return $(n.transform)||$(n.translate)||$(n.scale)||$(n.rotate)||$(n.perspective)||!j()&&($(n.backdropFilter)||$(n.filter))||E.test(n.willChange||"")||B.test(n.contain||"")}function j(){return null==I&&(I="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),I}function q(t){return/^(html|body|#document)$/.test(F(t))}function H(t){return k(t).getComputedStyle(t)}function V(t){return T(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if("html"===F(t))return t;const n=t.assignedSlot||t.parentNode||P(t)&&t.host||C(t);return P(n)?n.host:n}function Y(t){const n=X(t);return q(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&D(n)?n:Y(n)}function _(t,n,e){var o;void 0===n&&(n=[]),void 0===e&&(e=!0);const r=Y(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),c=k(r);if(i){const t=G(c);return n.concat(c,c.visualViewport||[],D(r)?r:[],t&&e?_(t):[])}return n.concat(r,_(r,[],e))}function G(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function J(t){const n=H(t);let o=parseFloat(n.width)||0,r=parseFloat(n.height)||0;const i=M(t),c=i?t.offsetWidth:o,l=i?t.offsetHeight:r,a=e(o)!==c||e(r)!==l;return a&&(o=c,r=l),{width:o,height:r,$:a}}function K(t){return T(t)?t:t.contextElement}function Q(t){const n=K(t);if(!M(n))return r(1);const o=n.getBoundingClientRect(),{width:i,height:c,$:l}=J(n);let a=(l?e(o.width):o.width)/i,s=(l?e(o.height):o.height)/c;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const U=r(0);function W(t){const n=k(t);return j()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:U}function Z(t,n,e,o){void 0===n&&(n=!1),void 0===e&&(e=!1);const i=t.getBoundingClientRect(),c=K(t);let l=r(1);n&&(o?T(o)&&(l=Q(o)):l=Q(t));const a=function(t,n,e){return void 0===n&&(n=!1),!(!e||n&&e!==k(t))&&n}(c,e,o)?W(c):r(0);let s=(i.left+a.x)/l.x,u=(i.top+a.y)/l.y,f=i.width/l.x,d=i.height/l.y;if(c){const t=k(c),n=o&&T(o)?k(o):o;let e=t,r=G(e);for(;r&&o&&n!==e;){const t=Q(r),n=r.getBoundingClientRect(),o=H(r),i=n.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,c=n.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,u*=t.y,f*=t.x,d*=t.y,s+=i,u+=c,e=k(r),r=G(e)}}return v({width:f,height:d,x:s,y:u})}function tt(t,n){const e=V(t).scrollLeft;return n?n.left+e:Z(C(t)).left+e}function nt(t,n){const e=t.getBoundingClientRect();return{x:e.left+n.scrollLeft-tt(t,e),y:e.top+n.scrollTop}}function et(t,e,o){let i;if("viewport"===e)i=function(t,n){const e=k(t),o=C(t),r=e.visualViewport;let i=o.clientWidth,c=o.clientHeight,l=0,a=0;if(r){i=r.width,c=r.height;const t=j();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,a=r.offsetTop)}const s=tt(o);if(s<=0){const t=o.ownerDocument,n=t.body,e=getComputedStyle(n),r="CSS1Compat"===t.compatMode&&parseFloat(e.marginLeft)+parseFloat(e.marginRight)||0,c=Math.abs(o.clientWidth-n.clientWidth-r);c<=25&&(i-=c)}else s<=25&&(i+=s);return{width:i,height:c,x:l,y:a}}(t,o);else if("document"===e)i=function(t){const e=C(t),o=V(t),r=t.ownerDocument.body,i=n(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),c=n(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-o.scrollLeft+tt(t);const a=-o.scrollTop;return"rtl"===H(r).direction&&(l+=n(e.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:a}}(C(t));else if(T(e))i=function(t,n){const e=Z(t,!0,"fixed"===n),o=e.top+t.clientTop,i=e.left+t.clientLeft,c=M(t)?Q(t):r(1);return{width:t.clientWidth*c.x,height:t.clientHeight*c.y,x:i*c.x,y:o*c.y}}(e,o);else{const n=W(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return v(i)}function ot(t,n){const e=X(t);return!(e===n||!T(e)||q(e))&&("fixed"===H(e).position||ot(e,n))}function rt(t,n,e){const o=M(n),i=C(n),c="fixed"===e,l=Z(t,!0,c,n);let a={scrollLeft:0,scrollTop:0};const s=r(0);function u(){s.x=tt(i)}if(o||!o&&!c)if(("body"!==F(n)||D(i))&&(a=V(n)),o){const t=Z(n,!0,c,n);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}else i&&u();c&&!o&&i&&u();const f=!i||o||c?r(0):nt(i,a);return{x:l.left+a.scrollLeft-s.x-f.x,y:l.top+a.scrollTop-s.y-f.y,width:l.width,height:l.height}}function it(t){return"static"===H(t).position}function ct(t,n){if(!M(t)||"fixed"===H(t).position)return null;if(n)return n(t);let e=t.offsetParent;return C(t)===e&&(e=e.ownerDocument.body),e}function lt(t,n){const e=k(t);if(L(t))return e;if(!M(t)){let n=X(t);for(;n&&!q(n);){if(T(n)&&!it(n))return n;n=X(n)}return e}let o=ct(t,n);for(;o&&z(o)&&it(o);)o=ct(o,n);return o&&q(o)&&it(o)&&!N(o)?e:o||function(t){let n=X(t);for(;M(n)&&!q(n);){if(N(n))return n;if(L(n))return null;n=X(n)}return null}(t)||e}const at={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:n,rect:e,offsetParent:o,strategy:i}=t;const c="fixed"===i,l=C(o),a=!!n&&L(n.floating);if(o===l||a&&c)return e;let s={scrollLeft:0,scrollTop:0},u=r(1);const f=r(0),d=M(o);if((d||!d&&!c)&&(("body"!==F(o)||D(l))&&(s=V(o)),d)){const t=Z(o);u=Q(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const m=!l||d||c?r(0):nt(l,s);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-s.scrollLeft*u.x+f.x+m.x,y:e.y*u.y-s.scrollTop*u.y+f.y+m.y}},getDocumentElement:C,getClippingRect:function(e){let{element:o,boundary:r,rootBoundary:i,strategy:c}=e;const l=[..."clippingAncestors"===r?L(o)?[]:function(t,n){const e=n.get(t);if(e)return e;let o=_(t,[],!1).filter((t=>T(t)&&"body"!==F(t))),r=null;const i="fixed"===H(t).position;let c=i?X(t):t;for(;T(c)&&!q(c);){const n=H(c),e=N(c);e||"fixed"!==n.position||(r=null),(i?!e&&!r:!e&&"static"===n.position&&r&&("absolute"===r.position||"fixed"===r.position)||D(c)&&!e&&ot(t,c))?o=o.filter((t=>t!==c)):r=n,c=X(c)}return n.set(t,o),o}(o,this._c):[].concat(r),i],a=et(o,l[0],c);let s=a.top,u=a.right,f=a.bottom,d=a.left;for(let e=1;e<l.length;e++){const r=et(o,l[e],c);s=n(r.top,s),u=t(r.right,u),f=t(r.bottom,f),d=n(r.left,d)}return{width:u-d,height:f-s,x:d,y:s}},getOffsetParent:lt,getElementRects:async function(t){const n=this.getOffsetParent||lt,e=this.getDimensions,o=await e(t.floating);return{reference:rt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:n,height:e}=J(t);return{width:n,height:e}},getScale:Q,isElement:T,isRTL:function(t){return"rtl"===H(t).direction}};function st(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function ut(e,r,i,c){void 0===c&&(c={});const{ancestorScroll:l=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=c,d=K(e),m=l||a?[...d?_(d):[],...r?_(r):[]]:[];m.forEach((t=>{l&&t.addEventListener("scroll",i,{passive:!0}),a&&t.addEventListener("resize",i)}));const y=d&&u?function(e,r){let i,c=null;const l=C(e);function a(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function s(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),a();const d=e.getBoundingClientRect(),{left:m,top:y,width:h,height:p}=d;if(u||r(),!h||!p)return;const x={rootMargin:-o(y)+"px "+-o(l.clientWidth-(m+h))+"px "+-o(l.clientHeight-(y+p))+"px "+-o(m)+"px",threshold:n(0,t(1,f))||1};let w=!0;function g(t){const n=t[0].intersectionRatio;if(n!==f){if(!w)return s();n?s(!1,n):i=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==n||st(d,e.getBoundingClientRect())||s(),w=!1}try{c=new IntersectionObserver(g,{...x,root:l.ownerDocument})}catch(t){c=new IntersectionObserver(g,x)}c.observe(e)}(!0),a}(d,i):null;let h,p=-1,x=null;s&&(x=new ResizeObserver((t=>{let[n]=t;n&&n.target===d&&x&&r&&(x.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=x)||t.observe(r)}))),i()})),d&&!f&&x.observe(d),r&&x.observe(r));let w=f?Z(e):null;return f&&function t(){const n=Z(e);w&&!st(w,n)&&i(),w=n,h=requestAnimationFrame(t)}(),i(),()=>{var t;m.forEach((t=>{l&&t.removeEventListener("scroll",i),a&&t.removeEventListener("resize",i)})),null==y||y(),null==(t=x)||t.disconnect(),x=null,f&&cancelAnimationFrame(h)}}const ft=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var e,o;const{x:r,y:i,placement:c,middlewareData:u}=n,f=await async function(t,n){const{placement:e,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),c=a(e),u=s(e),f="y"===d(e),m=S.has(c)?-1:1,y=i&&f?-1:1,h=l(n,t);let{mainAxis:p,crossAxis:x,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&"number"==typeof w&&(x="end"===u?-1*w:w),f?{x:x*y,y:p*m}:{x:p*m,y:x*y}}(n,t);return c===(null==(e=u.offset)?void 0:e.placement)&&null!=(o=u.arrow)&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:c}}}}},dt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:r,platform:i}=n,{mainAxis:s=!0,crossAxis:f=!1,limiter:m={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...y}=l(t,n),h={x:e,y:o},p=await i.detectOverflow(n,y),x=d(a(r)),w=u(x);let g=h[w],v=h[x];s&&(g=c(g+p["y"===w?"top":"left"],g,g-p["y"===w?"bottom":"right"])),f&&(v=c(v+p["y"===x?"top":"left"],v,v-p["y"===x?"bottom":"right"]));const b=m.fn({...n,[w]:g,[x]:v});return{...b,data:{x:b.x-e,y:b.y-o,enabled:{[w]:s,[x]:f}}}}}},mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e,o;const{placement:r,middlewareData:i,rects:c,initialPlacement:u,platform:v,elements:b}=n,{mainAxis:A=!0,crossAxis:S=!0,fallbackPlacements:R,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:C=!0,...O}=l(t,n);if(null!=(e=i.arrow)&&e.alignmentOffset)return{};const T=a(r),M=d(u),P=a(u)===u,D=await(null==v.isRTL?void 0:v.isRTL(b.floating)),z=R||(P||!C?[g(u)]:function(t){const n=g(t);return[y(t),n,y(n)]}(u)),L="none"!==k;!R&&L&&z.push(...function(t,n,e,o){const r=s(t);let i=function(t,n,e){switch(t){case"top":case"bottom":return e?n?p:h:n?h:p;case"left":case"right":return n?x:w;default:return[]}}(a(t),"start"===e,o);return r&&(i=i.map((t=>t+"-"+r)),n&&(i=i.concat(i.map(y)))),i}(u,C,k,D));const E=[u,...z],B=await v.detectOverflow(n,O),$=[];let I=(null==(o=i.flip)?void 0:o.overflows)||[];if(A&&$.push(B[T]),S){const t=function(t,n,e){void 0===e&&(e=!1);const o=s(t),r=m(t),i=f(r);let c="x"===r?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[i]>n.floating[i]&&(c=g(c)),[c,g(c)]}(r,c,D);$.push(B[t[0]],B[t[1]])}if(I=[...I,{placement:r,overflows:$}],!$.every((t=>t<=0))){var N,j;const t=((null==(N=i.flip)?void 0:N.index)||0)+1,n=E[t];if(n&&("alignment"!==S||M===d(n)||I.every((t=>d(t.placement)!==M||t.overflows[0]>0))))return{data:{index:t,overflows:I},reset:{placement:n}};let e=null==(j=I.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:j.placement;if(!e)switch(F){case"bestFit":{var q;const t=null==(q=I.filter((t=>{if(L){const n=d(t.placement);return n===M||"y"===n}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:q[0];t&&(e=t);break}case"initialPlacement":e=u}if(r!==e)return{reset:{placement:e}}}return{}}}},yt=(t,n,e)=>{const o=new Map,r={platform:at,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:c}=e,l=c.detectOverflow?c:{...c,detectOverflow:A},a=await(null==c.isRTL?void 0:c.isRTL(n));let s=await c.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=b(s,o,a),d=o,m=0;const y={};for(let e=0;e<i.length;e++){const h=i[e];if(!h)continue;const{name:p,fn:x}=h,{x:w,y:g,data:v,reset:A}=await x({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:y,rects:s,platform:l,elements:{reference:t,floating:n}});u=null!=w?w:u,f=null!=g?g:f,y[p]={...y[p],...v},A&&m<50&&(m++,"object"==typeof A&&(A.placement&&(d=A.placement),A.rects&&(s=!0===A.rects?await c.getElementRects({reference:t,floating:n,strategy:r}):A.rects),({x:u,y:f}=b(s,d,a))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:y}})(t,n,{...r,platform:i})};export{ut as a,yt as c,mt as f,ft as o,dt as s}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiAccordionItem extends Components.UiAccordionItem, HTMLElement {}
|
|
4
|
+
export const UiAccordionItem: {
|
|
5
|
+
prototype: UiAccordionItem;
|
|
6
|
+
new (): UiAccordionItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|