@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,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Cb1tfi_9.js');
|
|
4
|
+
var floatingUi_dom = require('./floating-ui.dom-BPemvNRD.js');
|
|
5
|
+
|
|
6
|
+
const uiTooltipCss = () => `:host{display:inline-block}.trigger{display:inline-flex}.tooltip{position:fixed;top:0;left:0;z-index:50;width:max-content;max-width:18rem;padding:0.375rem 0.75rem;font-family:var(--ui-font-sans);font-size:0.75rem;line-height:1.4;color:var(--ui-foreground);border:1px solid var(--ui-border);background:var(--ui-panel-strong);box-shadow:var(--ui-shadow-lg);backdrop-filter:blur(22px);border-radius:var(--ui-radius-sm);pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-duration) var(--ui-ease), transform var(--ui-duration) var(--ui-ease)}.tooltip.is-visible{opacity:1;transform:scale(1)}`;
|
|
7
|
+
|
|
8
|
+
const UiTooltip = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/** Texto exibido no balão flutuante. */
|
|
12
|
+
this.content = "";
|
|
13
|
+
/** Posição preferida do balão relativa ao gatilho. */
|
|
14
|
+
this.placement = "top";
|
|
15
|
+
/** Atraso (ms) antes de exibir o balão. */
|
|
16
|
+
this.openDelay = 200;
|
|
17
|
+
this.visible = false;
|
|
18
|
+
this.onEnter = () => {
|
|
19
|
+
if (this.timer)
|
|
20
|
+
clearTimeout(this.timer);
|
|
21
|
+
this.timer = setTimeout(() => {
|
|
22
|
+
this.visible = true;
|
|
23
|
+
requestAnimationFrame(() => this.start());
|
|
24
|
+
}, this.openDelay);
|
|
25
|
+
};
|
|
26
|
+
this.onLeave = () => {
|
|
27
|
+
if (this.timer)
|
|
28
|
+
clearTimeout(this.timer);
|
|
29
|
+
this.visible = false;
|
|
30
|
+
this.stop();
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.stop();
|
|
35
|
+
if (this.timer)
|
|
36
|
+
clearTimeout(this.timer);
|
|
37
|
+
}
|
|
38
|
+
start() {
|
|
39
|
+
if (!this.triggerEl || !this.floatingEl)
|
|
40
|
+
return;
|
|
41
|
+
this.stop();
|
|
42
|
+
this.cleanup = floatingUi_dom.autoUpdate(this.triggerEl, this.floatingEl, () => {
|
|
43
|
+
if (!this.triggerEl || !this.floatingEl)
|
|
44
|
+
return;
|
|
45
|
+
floatingUi_dom.computePosition(this.triggerEl, this.floatingEl, {
|
|
46
|
+
placement: this.placement,
|
|
47
|
+
middleware: [floatingUi_dom.offset(8), floatingUi_dom.flip(), floatingUi_dom.shift({ padding: 8 })],
|
|
48
|
+
}).then(({ x, y }) => {
|
|
49
|
+
Object.assign(this.floatingEl.style, { left: `${x}px`, top: `${y}px` });
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
stop() {
|
|
54
|
+
this.cleanup?.();
|
|
55
|
+
this.cleanup = undefined;
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return (index.h(index.Host, { key: '49f898bc54da31cf9f6b5189577bae89f6681bf8', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, index.h("span", { key: '394744f0b34ec0c534b417ba520f2b805b582802', class: "trigger", ref: (el) => (this.triggerEl = el) }, index.h("slot", { key: '7afd6d807490d8af4fffeb38e69de825f7d3c138' })), index.h("div", { key: '3d12cffd7fd903ec6178961bf40476b063ee1563', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
|
|
59
|
+
}
|
|
60
|
+
get host() { return index.getElement(this); }
|
|
61
|
+
};
|
|
62
|
+
UiTooltip.style = uiTooltipCss();
|
|
63
|
+
|
|
64
|
+
exports.ui_tooltip = UiTooltip;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Cb1tfi_9.js');
|
|
4
|
+
|
|
5
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
|
+
/*
|
|
7
|
+
Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var patchBrowser = () => {
|
|
11
|
+
const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('uikit.cjs.js', document.baseURI).href));
|
|
12
|
+
const opts = {};
|
|
13
|
+
if (importMeta !== "") {
|
|
14
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
15
|
+
}
|
|
16
|
+
return index.promiseResolve(opts);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
patchBrowser().then(async (options) => {
|
|
20
|
+
await index.globalScripts();
|
|
21
|
+
return index.bootstrapLazy([["ui-loading-overlay.cjs",[[1,"ui-loading-overlay",{"visible":[4],"label":[1],"spinnerSize":[1,"spinner-size"]}]]],["ui-toaster.cjs",[[1,"ui-toaster",{"items":[32],"toast":[64]}]]],["ui-accordion.cjs",[[257,"ui-accordion"]]],["ui-accordion-item.cjs",[[257,"ui-accordion-item",{"heading":[1],"open":[1540]}]]],["ui-avatar.cjs",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1]}]]],["ui-badge.cjs",[[257,"ui-badge",{"variant":[1]}]]],["ui-button.cjs",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1]}]]],["ui-card.cjs",[[257,"ui-card"]]],["ui-checkbox.cjs",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-dialog.cjs",[[257,"ui-dialog",{"open":[1540],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-drawer.cjs",[[257,"ui-drawer",{"open":[1540],"side":[513],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-dropdown-item.cjs",[[257,"ui-dropdown-item",{"disabled":[516]}]]],["ui-dropdown-menu.cjs",[[257,"ui-dropdown-menu",{"open":[1540],"placement":[1],"show":[64],"close":[64]},[[0,"uiDropdownClose","onItemClose"]],{"open":[{"onOpenChange":0}]}]]],["ui-field.cjs",[[257,"ui-field",{"label":[1],"description":[1],"error":[1],"required":[4],"fieldId":[1,"field-id"]}]]],["ui-input.cjs",[[1,"ui-input",{"value":[1025],"placeholder":[1],"type":[1],"disabled":[4],"invalid":[4],"name":[1]}]]],["ui-label.cjs",[[257,"ui-label"]]],["ui-popover.cjs",[[257,"ui-popover",{"open":[1540],"placement":[1],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-progress.cjs",[[1,"ui-progress",{"value":[2],"max":[2],"indeterminate":[4]}]]],["ui-radio-group.cjs",[[1,"ui-radio-group",{"value":[1025],"name":[1],"options":[16],"disabled":[4]}]]],["ui-reveal.cjs",[[257,"ui-reveal",{"delay":[2],"visible":[32]}]]],["ui-scroll-progress.cjs",[[1,"ui-scroll-progress",{"progress":[32]}]]],["ui-section.cjs",[[257,"ui-section",{"eyebrow":[1],"heading":[1],"description":[1]}]]],["ui-select.cjs",[[1,"ui-select",{"value":[1025],"disabled":[4],"name":[1],"options":[16],"placeholder":[1]}]]],["ui-separator.cjs",[[1,"ui-separator",{"orientation":[513]}]]],["ui-skeleton.cjs",[[1,"ui-skeleton"]]],["ui-slider.cjs",[[1,"ui-slider",{"value":[1026],"min":[2],"max":[2],"step":[2],"disabled":[4]}]]],["ui-switch.cjs",[[1,"ui-switch",{"checked":[1540],"disabled":[4]}]]],["ui-tabs.cjs",[[257,"ui-tabs",{"value":[1537],"items":[16]}]]],["ui-textarea.cjs",[[1,"ui-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"invalid":[4],"name":[1],"rows":[2]}]]],["ui-theme-toggle.cjs",[[1,"ui-theme-toggle",{"isDark":[32]}]]],["ui-tooltip.cjs",[[257,"ui-tooltip",{"content":[1],"placement":[1],"openDelay":[2,"open-delay"],"visible":[32]}]]],["ui-spinner.cjs",[[1,"ui-spinner",{"size":[1]}]]],["ui-toast.cjs",[[1,"ui-toast",{"open":[1540],"variant":[1],"heading":[1],"description":[1],"duration":[2],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]]], options);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/ui-badge/ui-badge.js",
|
|
4
|
+
"components/ui-button/ui-button.js",
|
|
5
|
+
"components/ui-spinner/ui-spinner.js",
|
|
6
|
+
"components/ui-radio-group/ui-radio-group.js",
|
|
7
|
+
"components/ui-select/ui-select.js",
|
|
8
|
+
"components/ui-separator/ui-separator.js",
|
|
9
|
+
"components/ui-tabs/ui-tabs.js",
|
|
10
|
+
"components/ui-toast/ui-toast.js",
|
|
11
|
+
"components/ui-toaster/ui-toaster.js",
|
|
12
|
+
"components/ui-accordion/ui-accordion.js",
|
|
13
|
+
"components/ui-accordion-item/ui-accordion-item.js",
|
|
14
|
+
"components/ui-avatar/ui-avatar.js",
|
|
15
|
+
"components/ui-card/ui-card.js",
|
|
16
|
+
"components/ui-checkbox/ui-checkbox.js",
|
|
17
|
+
"components/ui-dialog/ui-dialog.js",
|
|
18
|
+
"components/ui-drawer/ui-drawer.js",
|
|
19
|
+
"components/ui-dropdown-item/ui-dropdown-item.js",
|
|
20
|
+
"components/ui-dropdown-menu/ui-dropdown-menu.js",
|
|
21
|
+
"components/ui-field/ui-field.js",
|
|
22
|
+
"components/ui-input/ui-input.js",
|
|
23
|
+
"components/ui-label/ui-label.js",
|
|
24
|
+
"components/ui-loading-overlay/ui-loading-overlay.js",
|
|
25
|
+
"components/ui-popover/ui-popover.js",
|
|
26
|
+
"components/ui-progress/ui-progress.js",
|
|
27
|
+
"components/ui-reveal/ui-reveal.js",
|
|
28
|
+
"components/ui-scroll-progress/ui-scroll-progress.js",
|
|
29
|
+
"components/ui-section/ui-section.js",
|
|
30
|
+
"components/ui-skeleton/ui-skeleton.js",
|
|
31
|
+
"components/ui-slider/ui-slider.js",
|
|
32
|
+
"components/ui-switch/ui-switch.js",
|
|
33
|
+
"components/ui-textarea/ui-textarea.js",
|
|
34
|
+
"components/ui-theme-toggle/ui-theme-toggle.js",
|
|
35
|
+
"components/ui-tooltip/ui-tooltip.js"
|
|
36
|
+
],
|
|
37
|
+
"mixins": [],
|
|
38
|
+
"compiler": {
|
|
39
|
+
"name": "@stencil/core",
|
|
40
|
+
"version": "4.43.5",
|
|
41
|
+
"typescriptVersion": "5.8.3"
|
|
42
|
+
},
|
|
43
|
+
"collections": [],
|
|
44
|
+
"bundles": []
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiAccordion {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { key: '0d6a0faf16d8cacc925818349b38f8acaa186fdb' }, h("slot", { key: '060f07d2ed0104666101f2984affc84eb33239d0' })));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "ui-accordion"; }
|
|
7
|
+
static get encapsulation() { return "shadow"; }
|
|
8
|
+
static get originalStyleUrls() {
|
|
9
|
+
return {
|
|
10
|
+
"$": ["ui-accordion.css"]
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static get styleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["ui-accordion.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-family: var(--ui-font-sans);
|
|
4
|
+
border-bottom: 1px solid var(--ui-border);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
summary {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
padding: 1rem 0;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
color: var(--ui-foreground);
|
|
16
|
+
list-style: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
summary::-webkit-details-marker {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
summary:focus-visible {
|
|
25
|
+
box-shadow: 0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring);
|
|
26
|
+
border-radius: var(--ui-radius-sm);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.chevron {
|
|
30
|
+
flex: none;
|
|
31
|
+
color: var(--ui-text-muted);
|
|
32
|
+
transition: transform var(--ui-duration) var(--ui-ease);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
details[open] .chevron {
|
|
36
|
+
transform: rotate(180deg);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.content {
|
|
40
|
+
padding-bottom: 1rem;
|
|
41
|
+
color: var(--ui-text-muted);
|
|
42
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiAccordionItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Título exibido no cabeçalho. */
|
|
5
|
+
this.heading = "";
|
|
6
|
+
/** Estado aberto/fechado. */
|
|
7
|
+
this.open = false;
|
|
8
|
+
this.onToggle = (event) => {
|
|
9
|
+
const details = event.currentTarget;
|
|
10
|
+
this.open = details.open;
|
|
11
|
+
this.uiToggle.emit(this.open);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, { key: 'c1c8a792a0e8ab52c4750af995c98ffda3b47cf0' }, h("details", { key: '3eaa096ad9a9b0f22fe0b2a34b254deb4e6b7df5', open: this.open, onToggle: this.onToggle }, h("summary", { key: 'eb86d25aa684879440b87ce1113d282fb07e81ce' }, h("span", { key: 'c70e1823bec0a32432cf74438c6d62a7b145e067', class: "heading" }, this.heading), h("svg", { key: '65f9e9179ec29d10115a6938be5fb2481bdcbcfc', class: "chevron", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: 'def877261275e0eb0f830651fe35d524497686b9', points: "6 9 12 15 18 9" }))), h("div", { key: '91c0120a4a7c02cbdb97bded4c77e6eeea63ce83', class: "content" }, h("slot", { key: '590ed083fb0a3969bdadb2376532b4ceb9bcc597' })))));
|
|
16
|
+
}
|
|
17
|
+
static get is() { return "ui-accordion-item"; }
|
|
18
|
+
static get encapsulation() { return "shadow"; }
|
|
19
|
+
static get originalStyleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["ui-accordion-item.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get styleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["ui-accordion-item.css"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
"heading": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "string",
|
|
36
|
+
"resolved": "string",
|
|
37
|
+
"references": {}
|
|
38
|
+
},
|
|
39
|
+
"required": false,
|
|
40
|
+
"optional": false,
|
|
41
|
+
"docs": {
|
|
42
|
+
"tags": [],
|
|
43
|
+
"text": "T\u00EDtulo exibido no cabe\u00E7alho."
|
|
44
|
+
},
|
|
45
|
+
"getter": false,
|
|
46
|
+
"setter": false,
|
|
47
|
+
"reflect": false,
|
|
48
|
+
"attribute": "heading",
|
|
49
|
+
"defaultValue": "\"\""
|
|
50
|
+
},
|
|
51
|
+
"open": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"mutable": true,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "boolean",
|
|
56
|
+
"resolved": "boolean",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": "Estado aberto/fechado."
|
|
64
|
+
},
|
|
65
|
+
"getter": false,
|
|
66
|
+
"setter": false,
|
|
67
|
+
"reflect": true,
|
|
68
|
+
"attribute": "open",
|
|
69
|
+
"defaultValue": "false"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static get events() {
|
|
74
|
+
return [{
|
|
75
|
+
"method": "uiToggle",
|
|
76
|
+
"name": "uiToggle",
|
|
77
|
+
"bubbles": true,
|
|
78
|
+
"cancelable": true,
|
|
79
|
+
"composed": true,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": "Emitido quando o item \u00E9 aberto ou fechado."
|
|
83
|
+
},
|
|
84
|
+
"complexType": {
|
|
85
|
+
"original": "boolean",
|
|
86
|
+
"resolved": "boolean",
|
|
87
|
+
"references": {}
|
|
88
|
+
}
|
|
89
|
+
}];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
/* Tamanho customizável via --ui-avatar-size (default 2.5rem). */
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.avatar {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: var(--ui-avatar-size, 2.5rem);
|
|
11
|
+
height: var(--ui-avatar-size, 2.5rem);
|
|
12
|
+
border-radius: var(--ui-radius-full);
|
|
13
|
+
border: 1px solid var(--ui-border);
|
|
14
|
+
background: var(--ui-chip);
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
font-family: var(--ui-font-sans);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.image {
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fallback {
|
|
26
|
+
font-size: 0.875rem;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
color: var(--ui-text-muted);
|
|
29
|
+
line-height: 1;
|
|
30
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiAvatar {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Texto alternativo da imagem. */
|
|
5
|
+
this.alt = "";
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { key: '5c1258b170c4bb32cca3177574292a2b7661ebf2' }, h("span", { key: '35991cb32d1958e8c5b11ccba182e9d43531aadb', class: "avatar" }, this.src ? (h("img", { class: "image", src: this.src, alt: this.alt })) : (h("span", { class: "fallback" }, this.fallback)))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "ui-avatar"; }
|
|
11
|
+
static get encapsulation() { return "shadow"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["ui-avatar.css"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["ui-avatar.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"src": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "string",
|
|
29
|
+
"resolved": "string | undefined",
|
|
30
|
+
"references": {}
|
|
31
|
+
},
|
|
32
|
+
"required": false,
|
|
33
|
+
"optional": true,
|
|
34
|
+
"docs": {
|
|
35
|
+
"tags": [],
|
|
36
|
+
"text": "URL da imagem do avatar."
|
|
37
|
+
},
|
|
38
|
+
"getter": false,
|
|
39
|
+
"setter": false,
|
|
40
|
+
"reflect": false,
|
|
41
|
+
"attribute": "src"
|
|
42
|
+
},
|
|
43
|
+
"alt": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"mutable": false,
|
|
46
|
+
"complexType": {
|
|
47
|
+
"original": "string",
|
|
48
|
+
"resolved": "string",
|
|
49
|
+
"references": {}
|
|
50
|
+
},
|
|
51
|
+
"required": false,
|
|
52
|
+
"optional": false,
|
|
53
|
+
"docs": {
|
|
54
|
+
"tags": [],
|
|
55
|
+
"text": "Texto alternativo da imagem."
|
|
56
|
+
},
|
|
57
|
+
"getter": false,
|
|
58
|
+
"setter": false,
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"attribute": "alt",
|
|
61
|
+
"defaultValue": "\"\""
|
|
62
|
+
},
|
|
63
|
+
"fallback": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string | undefined",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": true,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": "Texto exibido quando n\u00E3o h\u00E1 imagem (ex.: iniciais)."
|
|
76
|
+
},
|
|
77
|
+
"getter": false,
|
|
78
|
+
"setter": false,
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"attribute": "fallback"
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.badge {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.25rem;
|
|
9
|
+
border: 1px solid transparent;
|
|
10
|
+
border-radius: var(--ui-radius-full);
|
|
11
|
+
padding: 0.25rem 0.75rem;
|
|
12
|
+
font-family: var(--ui-font-sans);
|
|
13
|
+
font-size: 0.75rem;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
backdrop-filter: blur(22px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.variant-default {
|
|
19
|
+
background: var(--ui-chip);
|
|
20
|
+
border-color: var(--ui-border);
|
|
21
|
+
color: var(--ui-text-soft);
|
|
22
|
+
}
|
|
23
|
+
.variant-solid {
|
|
24
|
+
background: var(--ui-accent);
|
|
25
|
+
color: var(--ui-accent-contrast);
|
|
26
|
+
}
|
|
27
|
+
.variant-outline {
|
|
28
|
+
border-color: var(--ui-border-strong);
|
|
29
|
+
color: var(--ui-foreground);
|
|
30
|
+
}
|
|
31
|
+
.variant-success {
|
|
32
|
+
background: color-mix(in srgb, var(--ui-success) 15%, transparent);
|
|
33
|
+
color: var(--ui-success);
|
|
34
|
+
}
|
|
35
|
+
.variant-warning {
|
|
36
|
+
background: color-mix(in srgb, var(--ui-warning) 15%, transparent);
|
|
37
|
+
color: var(--ui-warning);
|
|
38
|
+
}
|
|
39
|
+
.variant-danger {
|
|
40
|
+
background: color-mix(in srgb, var(--ui-danger) 15%, transparent);
|
|
41
|
+
color: var(--ui-danger);
|
|
42
|
+
}
|
|
43
|
+
.variant-info {
|
|
44
|
+
background: color-mix(in srgb, var(--ui-info) 15%, transparent);
|
|
45
|
+
color: var(--ui-info);
|
|
46
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiBadge {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Variante visual. */
|
|
5
|
+
this.variant = "default";
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { key: '260e9e23ffa9a624e17e5a794217402ab2167f31' }, h("span", { key: '1b0d40c5b9a46c5928132d050e3c2f9e3bcd4ea8', class: { badge: true, [`variant-${this.variant}`]: true } }, h("slot", { key: '9680659040a4d48bdb53415e40bbbef9819063d9' }))));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "ui-badge"; }
|
|
11
|
+
static get encapsulation() { return "shadow"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["ui-badge.css"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["ui-badge.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"variant": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "UiBadgeVariant",
|
|
29
|
+
"resolved": "\"danger\" | \"default\" | \"info\" | \"outline\" | \"solid\" | \"success\" | \"warning\"",
|
|
30
|
+
"references": {
|
|
31
|
+
"UiBadgeVariant": {
|
|
32
|
+
"location": "local",
|
|
33
|
+
"path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-badge/ui-badge.tsx",
|
|
34
|
+
"id": "src/components/ui-badge/ui-badge.tsx::UiBadgeVariant"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": "Variante visual."
|
|
43
|
+
},
|
|
44
|
+
"getter": false,
|
|
45
|
+
"setter": false,
|
|
46
|
+
"reflect": false,
|
|
47
|
+
"attribute": "variant",
|
|
48
|
+
"defaultValue": "\"default\""
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.btn {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
border: 1px solid transparent;
|
|
12
|
+
border-radius: var(--ui-radius-full);
|
|
13
|
+
font-family: var(--ui-font-sans);
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
outline: none;
|
|
17
|
+
transition: all var(--ui-duration) var(--ui-ease);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.btn:active {
|
|
21
|
+
transform: scale(0.98);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.btn:focus-visible {
|
|
25
|
+
box-shadow: 0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn:disabled {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
opacity: 0.5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Tamanhos */
|
|
34
|
+
.size-sm {
|
|
35
|
+
height: 2.25rem;
|
|
36
|
+
padding: 0 1rem;
|
|
37
|
+
font-size: 0.75rem;
|
|
38
|
+
}
|
|
39
|
+
.size-md {
|
|
40
|
+
height: 2.75rem;
|
|
41
|
+
padding: 0 1.25rem;
|
|
42
|
+
font-size: 0.875rem;
|
|
43
|
+
}
|
|
44
|
+
.size-lg {
|
|
45
|
+
height: 3rem;
|
|
46
|
+
padding: 0 1.5rem;
|
|
47
|
+
font-size: 1rem;
|
|
48
|
+
}
|
|
49
|
+
.size-icon {
|
|
50
|
+
height: 2.5rem;
|
|
51
|
+
width: 2.5rem;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Variantes */
|
|
56
|
+
.variant-solid {
|
|
57
|
+
background: var(--ui-accent);
|
|
58
|
+
color: var(--ui-accent-contrast);
|
|
59
|
+
box-shadow: var(--ui-shadow);
|
|
60
|
+
}
|
|
61
|
+
.variant-solid:hover {
|
|
62
|
+
filter: brightness(1.1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.variant-default {
|
|
66
|
+
background: var(--ui-panel-strong);
|
|
67
|
+
color: var(--ui-foreground);
|
|
68
|
+
border-color: var(--ui-border);
|
|
69
|
+
backdrop-filter: blur(22px);
|
|
70
|
+
}
|
|
71
|
+
.variant-default:hover {
|
|
72
|
+
border-color: var(--ui-border-strong);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.variant-subtle {
|
|
76
|
+
background: var(--ui-chip);
|
|
77
|
+
color: var(--ui-foreground);
|
|
78
|
+
border-color: var(--ui-border);
|
|
79
|
+
backdrop-filter: blur(22px);
|
|
80
|
+
}
|
|
81
|
+
.variant-subtle:hover {
|
|
82
|
+
background: var(--ui-panel);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.variant-outline {
|
|
86
|
+
color: var(--ui-foreground);
|
|
87
|
+
border-color: var(--ui-border-strong);
|
|
88
|
+
}
|
|
89
|
+
.variant-outline:hover {
|
|
90
|
+
background: var(--ui-chip);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.variant-ghost {
|
|
94
|
+
color: var(--ui-text-soft);
|
|
95
|
+
}
|
|
96
|
+
.variant-ghost:hover {
|
|
97
|
+
background: var(--ui-chip);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.variant-destructive {
|
|
101
|
+
background: var(--ui-danger);
|
|
102
|
+
color: var(--ui-on-status);
|
|
103
|
+
}
|
|
104
|
+
.variant-destructive:hover {
|
|
105
|
+
filter: brightness(1.1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.variant-link {
|
|
109
|
+
color: var(--ui-accent);
|
|
110
|
+
text-underline-offset: 4px;
|
|
111
|
+
}
|
|
112
|
+
.variant-link:hover {
|
|
113
|
+
text-decoration: underline;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Spinner de loading */
|
|
117
|
+
.spinner {
|
|
118
|
+
width: 1rem;
|
|
119
|
+
height: 1rem;
|
|
120
|
+
border-radius: 9999px;
|
|
121
|
+
border: 2px solid currentColor;
|
|
122
|
+
border-top-color: transparent;
|
|
123
|
+
animation: ui-button-spin 0.7s linear infinite;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@keyframes ui-button-spin {
|
|
127
|
+
to {
|
|
128
|
+
transform: rotate(360deg);
|
|
129
|
+
}
|
|
130
|
+
}
|