@andespindola/ui-core 0.1.1 → 0.2.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ui-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ui-alert.cjs.entry.js +40 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +17 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ui-badge.cjs.entry.js +7 -2
- package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +23 -0
- package/dist/cjs/ui-breadcrumb.cjs.entry.js +17 -0
- package/dist/cjs/ui-button.cjs.entry.js +5 -3
- package/dist/cjs/ui-card.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ui-container.cjs.entry.js +26 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-grid.cjs.entry.js +34 -0
- package/dist/cjs/ui-input.cjs.entry.js +10 -2
- package/dist/cjs/ui-label.cjs.entry.js +1 -1
- package/dist/cjs/ui-pagination.cjs.entry.js +63 -0
- package/dist/cjs/ui-popover.cjs.entry.js +1 -1
- package/dist/cjs/ui-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-reveal.cjs.entry.js +1 -1
- package/dist/cjs/ui-scroll-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-section.cjs.entry.js +1 -1
- package/dist/cjs/ui-segmented.cjs.entry.js +31 -0
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-separator.cjs.entry.js +1 -1
- package/dist/cjs/ui-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ui-slider.cjs.entry.js +1 -1
- package/dist/cjs/ui-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ui-stack.cjs.entry.js +53 -0
- package/dist/cjs/ui-stat.cjs.entry.js +28 -0
- package/dist/cjs/ui-switch.cjs.entry.js +1 -1
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-theme-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast.cjs.entry.js +1 -1
- package/dist/cjs/ui-toaster.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/uikit.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/ui-accordion/ui-accordion.js +1 -1
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +1 -1
- package/dist/collection/components/ui-alert/ui-alert.css +95 -0
- package/dist/collection/components/ui-alert/ui-alert.js +134 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +31 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +20 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +22 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +21 -0
- package/dist/collection/components/ui-badge/ui-badge.css +26 -0
- package/dist/collection/components/ui-badge/ui-badge.js +63 -1
- package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.css +15 -0
- package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.js +18 -0
- package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.css +30 -0
- package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.js +69 -0
- package/dist/collection/components/ui-button/ui-button.css +11 -1
- package/dist/collection/components/ui-button/ui-button.js +24 -2
- package/dist/collection/components/ui-card/ui-card.js +1 -1
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +6 -2
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
- package/dist/collection/components/ui-container/ui-container.css +38 -0
- package/dist/collection/components/ui-container/ui-container.js +79 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-drawer/ui-drawer.js +1 -1
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +1 -1
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +1 -1
- package/dist/collection/components/ui-field/ui-field.js +1 -1
- package/dist/collection/components/ui-grid/ui-grid.css +8 -0
- package/dist/collection/components/ui-grid/ui-grid.js +106 -0
- package/dist/collection/components/ui-input/ui-input.css +65 -14
- package/dist/collection/components/ui-input/ui-input.js +29 -1
- package/dist/collection/components/ui-label/ui-label.js +1 -1
- package/dist/collection/components/ui-pagination/ui-pagination.css +59 -0
- package/dist/collection/components/ui-pagination/ui-pagination.js +147 -0
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-progress/ui-progress.js +1 -1
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-reveal/ui-reveal.js +1 -1
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +1 -1
- package/dist/collection/components/ui-section/ui-section.js +1 -1
- package/dist/collection/components/ui-segmented/ui-segmented.css +46 -0
- package/dist/collection/components/ui-segmented/ui-segmented.js +99 -0
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-separator/ui-separator.js +1 -1
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +1 -1
- package/dist/collection/components/ui-slider/ui-slider.js +1 -1
- package/dist/collection/components/ui-spinner/ui-spinner.js +1 -1
- package/dist/collection/components/ui-stack/ui-stack.css +8 -0
- package/dist/collection/components/ui-stack/ui-stack.js +184 -0
- package/dist/collection/components/ui-stat/ui-stat.css +69 -0
- package/dist/collection/components/ui-stat/ui-stat.js +118 -0
- package/dist/collection/components/ui-switch/ui-switch.js +1 -1
- package/dist/collection/components/ui-tabs/ui-tabs.js +2 -2
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +1 -1
- package/dist/collection/components/ui-toast/ui-toast.js +1 -1
- package/dist/collection/components/ui-toaster/ui-toaster.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/components/{p-Bz9HyboB.js → p-BwNtNvTb.js} +1 -1
- package/dist/components/{p-fApcMAzN.js → p-CgsjJD8o.js} +1 -1
- package/dist/components/ui-accordion-item.js +1 -1
- package/dist/components/ui-accordion.js +1 -1
- package/dist/components/ui-alert.d.ts +11 -0
- package/dist/components/ui-alert.js +1 -0
- package/dist/components/ui-avatar-group.d.ts +11 -0
- package/dist/components/ui-avatar-group.js +1 -0
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-breadcrumb-item.d.ts +11 -0
- package/dist/components/ui-breadcrumb-item.js +1 -0
- package/dist/components/ui-breadcrumb.d.ts +11 -0
- package/dist/components/ui-breadcrumb.js +1 -0
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-card.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-container.d.ts +11 -0
- package/dist/components/ui-container.js +1 -0
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-drawer.js +1 -1
- package/dist/components/ui-dropdown-item.js +1 -1
- package/dist/components/ui-dropdown-menu.js +1 -1
- package/dist/components/ui-field.js +1 -1
- package/dist/components/ui-grid.d.ts +11 -0
- package/dist/components/ui-grid.js +1 -0
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-label.js +1 -1
- package/dist/components/ui-loading-overlay.js +1 -1
- package/dist/components/ui-pagination.d.ts +11 -0
- package/dist/components/ui-pagination.js +1 -0
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-progress.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-reveal.js +1 -1
- package/dist/components/ui-scroll-progress.js +1 -1
- package/dist/components/ui-section.js +1 -1
- package/dist/components/ui-segmented.d.ts +11 -0
- package/dist/components/ui-segmented.js +1 -0
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-separator.js +1 -1
- package/dist/components/ui-skeleton.js +1 -1
- package/dist/components/ui-slider.js +1 -1
- package/dist/components/ui-spinner.js +1 -1
- package/dist/components/ui-stack.d.ts +11 -0
- package/dist/components/ui-stack.js +1 -0
- package/dist/components/ui-stat.d.ts +11 -0
- package/dist/components/ui-stat.js +1 -0
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-theme-toggle.js +1 -1
- package/dist/components/ui-toast.js +1 -1
- package/dist/components/ui-toaster.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ui-accordion-item.entry.js +1 -1
- package/dist/esm/ui-accordion.entry.js +1 -1
- package/dist/esm/ui-alert.entry.js +38 -0
- package/dist/esm/ui-avatar-group.entry.js +15 -0
- package/dist/esm/ui-avatar.entry.js +2 -2
- package/dist/esm/ui-badge.entry.js +8 -3
- package/dist/esm/ui-breadcrumb-item.entry.js +21 -0
- package/dist/esm/ui-breadcrumb.entry.js +15 -0
- package/dist/esm/ui-button.entry.js +5 -3
- package/dist/esm/ui-card.entry.js +1 -1
- package/dist/esm/ui-checkbox.entry.js +2 -2
- package/dist/esm/ui-container.entry.js +24 -0
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-drawer.entry.js +1 -1
- package/dist/esm/ui-dropdown-item.entry.js +1 -1
- package/dist/esm/ui-dropdown-menu.entry.js +1 -1
- package/dist/esm/ui-field.entry.js +1 -1
- package/dist/esm/ui-grid.entry.js +32 -0
- package/dist/esm/ui-input.entry.js +10 -2
- package/dist/esm/ui-label.entry.js +1 -1
- package/dist/esm/ui-pagination.entry.js +61 -0
- package/dist/esm/ui-popover.entry.js +1 -1
- package/dist/esm/ui-progress.entry.js +1 -1
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-reveal.entry.js +1 -1
- package/dist/esm/ui-scroll-progress.entry.js +1 -1
- package/dist/esm/ui-section.entry.js +1 -1
- package/dist/esm/ui-segmented.entry.js +29 -0
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-separator.entry.js +1 -1
- package/dist/esm/ui-skeleton.entry.js +1 -1
- package/dist/esm/ui-slider.entry.js +1 -1
- package/dist/esm/ui-spinner.entry.js +1 -1
- package/dist/esm/ui-stack.entry.js +51 -0
- package/dist/esm/ui-stat.entry.js +26 -0
- package/dist/esm/ui-switch.entry.js +1 -1
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-theme-toggle.entry.js +1 -1
- package/dist/esm/ui-toast.entry.js +1 -1
- package/dist/esm/ui-toaster.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +1 -1
- package/dist/esm/uikit.js +1 -1
- package/dist/types/components/ui-alert/ui-alert.d.ts +17 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +2 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +6 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +7 -0
- package/dist/types/components/ui-breadcrumb/ui-breadcrumb.d.ts +3 -0
- package/dist/types/components/ui-breadcrumb-item/ui-breadcrumb-item.d.ts +8 -0
- package/dist/types/components/ui-button/ui-button.d.ts +2 -0
- package/dist/types/components/ui-container/ui-container.d.ts +8 -0
- package/dist/types/components/ui-grid/ui-grid.d.ts +10 -0
- package/dist/types/components/ui-input/ui-input.d.ts +3 -0
- package/dist/types/components/ui-pagination/ui-pagination.d.ts +15 -0
- package/dist/types/components/ui-segmented/ui-segmented.d.ts +15 -0
- package/dist/types/components/ui-stack/ui-stack.d.ts +17 -0
- package/dist/types/components/ui-stat/ui-stat.d.ts +13 -0
- package/dist/types/components.d.ts +552 -0
- package/dist/uikit/{p-29fe5b7f.entry.js → p-09895cd0.entry.js} +1 -1
- package/dist/uikit/p-0cba0d11.entry.js +1 -0
- package/dist/uikit/p-12db6a6e.entry.js +1 -0
- package/dist/uikit/{p-4a1abc1c.entry.js → p-1d016ea4.entry.js} +1 -1
- package/dist/uikit/p-25637424.entry.js +1 -0
- package/dist/uikit/p-2601d8b6.entry.js +1 -0
- package/dist/uikit/p-2de05aac.entry.js +1 -0
- package/dist/uikit/{p-e0652ddf.entry.js → p-3996590f.entry.js} +1 -1
- package/dist/uikit/{p-ed1111eb.entry.js → p-3fc062a6.entry.js} +1 -1
- package/dist/uikit/p-45e80e73.entry.js +1 -0
- package/dist/uikit/{p-97de6ea6.entry.js → p-55a23f91.entry.js} +1 -1
- package/dist/uikit/p-567f7496.entry.js +1 -0
- package/dist/uikit/p-5951a496.entry.js +1 -0
- package/dist/uikit/{p-9aa557d1.entry.js → p-595e146f.entry.js} +1 -1
- package/dist/uikit/p-635862e6.entry.js +1 -0
- package/dist/uikit/{p-777c6902.entry.js → p-67963692.entry.js} +1 -1
- package/dist/uikit/{p-7b2a9e68.entry.js → p-6c0e9809.entry.js} +1 -1
- package/dist/uikit/{p-b0aba484.entry.js → p-74b60a60.entry.js} +1 -1
- package/dist/uikit/p-7a3d85da.entry.js +1 -0
- package/dist/uikit/{p-38cbea54.entry.js → p-7f2c2924.entry.js} +1 -1
- package/dist/uikit/{p-8a238373.entry.js → p-81b45a43.entry.js} +1 -1
- package/dist/uikit/{p-d8e7ae10.entry.js → p-86ed6154.entry.js} +1 -1
- package/dist/uikit/p-94ad46a5.entry.js +1 -0
- package/dist/uikit/{p-9f0d4ae1.entry.js → p-95cd976e.entry.js} +1 -1
- package/dist/uikit/{p-777d8c7a.entry.js → p-979f6178.entry.js} +1 -1
- package/dist/uikit/p-97d4dbf4.entry.js +1 -0
- package/dist/uikit/p-9a4dc343.entry.js +1 -0
- package/dist/uikit/p-9a9590b9.entry.js +1 -0
- package/dist/uikit/p-a01305a5.entry.js +1 -0
- package/dist/uikit/p-a080f46a.entry.js +1 -0
- package/dist/uikit/p-a92a7b19.entry.js +1 -0
- package/dist/uikit/{p-d6c9bfbc.entry.js → p-a977a0db.entry.js} +1 -1
- package/dist/uikit/p-b2df8437.entry.js +1 -0
- package/dist/uikit/{p-58ed99a2.entry.js → p-c73c1009.entry.js} +1 -1
- package/dist/uikit/{p-83159bfc.entry.js → p-cd0ec835.entry.js} +1 -1
- package/dist/uikit/p-d20452b4.entry.js +1 -0
- package/dist/uikit/p-d7021157.entry.js +1 -0
- package/dist/uikit/{p-280337b0.entry.js → p-db07f9c5.entry.js} +1 -1
- package/dist/uikit/{p-9b43d670.entry.js → p-dca9f6f9.entry.js} +1 -1
- package/dist/uikit/p-ddd70374.entry.js +1 -0
- package/dist/uikit/{p-a0ccdb22.entry.js → p-faa98928.entry.js} +1 -1
- package/dist/uikit/{p-32df7fd0.entry.js → p-fd832f52.entry.js} +1 -1
- package/dist/uikit/uikit.esm.js +1 -1
- package/package.json +8 -3
- package/dist/uikit/p-0096eefe.entry.js +0 -1
- package/dist/uikit/p-11350db1.entry.js +0 -1
- package/dist/uikit/p-128ae3e4.entry.js +0 -1
- package/dist/uikit/p-24edfe3e.entry.js +0 -1
- package/dist/uikit/p-3c866608.entry.js +0 -1
- package/dist/uikit/p-5555523c.entry.js +0 -1
- package/dist/uikit/p-6fa4be86.entry.js +0 -1
- package/dist/uikit/p-9c57cf57.entry.js +0 -1
- package/dist/uikit/p-cf56c9ba.entry.js +0 -1
- package/dist/uikit/p-d13860dc.entry.js +0 -1
- package/dist/uikit/p-e54139a1.entry.js +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-DYwlrXg_.js';
|
|
2
|
+
|
|
3
|
+
const uiPaginationCss = () => `:host{display:inline-block}.pagination{display:inline-flex;align-items:center;gap:0.25rem;font-family:var(--ui-font-sans)}.page{display:inline-flex;align-items:center;justify-content:center;min-width:2.25rem;height:2.25rem;padding:0 0.5rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm);background:transparent;color:var(--ui-foreground);font-family:var(--ui-font-sans);font-size:0.875rem;cursor:pointer;outline:none;transition:all var(--ui-duration) var(--ui-ease)}.page:hover{border-color:var(--ui-border-strong);background:var(--ui-chip)}.page:focus-visible{box-shadow:0 0 0 2px var(--ui-ring)}.page:disabled{pointer-events:none;opacity:0.5}.page.active{background:var(--ui-accent);color:var(--ui-accent-contrast);border-color:var(--ui-accent);box-shadow:var(--ui-shadow-sm)}.ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:2.25rem;height:2.25rem;color:var(--ui-text-faint);font-size:0.875rem}`;
|
|
4
|
+
|
|
5
|
+
const UiPagination = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.uiChange = createEvent(this, "uiChange");
|
|
9
|
+
/** Total de páginas. */
|
|
10
|
+
this.total = 1;
|
|
11
|
+
/** Página atual. */
|
|
12
|
+
this.current = 1;
|
|
13
|
+
/** Quantidade de páginas ao redor da atual. */
|
|
14
|
+
this.siblings = 1;
|
|
15
|
+
this.clamp = (page) => Math.min(Math.max(page, 1), Math.max(this.total, 1));
|
|
16
|
+
this.go = (page) => {
|
|
17
|
+
const next = this.clamp(page);
|
|
18
|
+
if (next === this.current)
|
|
19
|
+
return;
|
|
20
|
+
this.current = next;
|
|
21
|
+
this.uiChange.emit(next);
|
|
22
|
+
};
|
|
23
|
+
this.buildRange = () => {
|
|
24
|
+
const total = Math.max(this.total, 1);
|
|
25
|
+
const current = this.clamp(this.current);
|
|
26
|
+
const siblings = Math.max(this.siblings, 0);
|
|
27
|
+
const start = Math.max(current - siblings, 1);
|
|
28
|
+
const end = Math.min(current + siblings, total);
|
|
29
|
+
const pages = new Set([1, total]);
|
|
30
|
+
for (let page = start; page <= end; page += 1)
|
|
31
|
+
pages.add(page);
|
|
32
|
+
const sorted = Array.from(pages)
|
|
33
|
+
.filter((page) => page >= 1 && page <= total)
|
|
34
|
+
.sort((a, b) => a - b);
|
|
35
|
+
const result = [];
|
|
36
|
+
let previous = 0;
|
|
37
|
+
for (const page of sorted) {
|
|
38
|
+
if (previous && page - previous > 1)
|
|
39
|
+
result.push("...");
|
|
40
|
+
result.push(page);
|
|
41
|
+
previous = page;
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const total = Math.max(this.total, 1);
|
|
48
|
+
const current = this.clamp(this.current);
|
|
49
|
+
const entries = this.buildRange();
|
|
50
|
+
return (h(Host, { key: '405a1c41db3850f25ffc14a053b12c0767809b1e' }, h("nav", { key: 'bd9baa3307cb5576ca81ab82653b44ccd4cb0385', class: "pagination", role: "navigation", "aria-label": "Pagina\u00E7\u00E3o" }, h("button", { key: '8efdfeb278037fabab6b82ba4083a7d23a00d612', class: "page nav", type: "button", "aria-label": "P\u00E1gina anterior", disabled: current <= 1, onClick: () => this.go(current - 1) }, "\u2039"), entries.map((entry, index) => {
|
|
51
|
+
if (entry === "...") {
|
|
52
|
+
return (h("span", { key: `ellipsis-${index}`, class: "ellipsis", "aria-hidden": "true" }, "\u2026"));
|
|
53
|
+
}
|
|
54
|
+
const active = entry === current;
|
|
55
|
+
return (h("button", { key: entry, class: { page: true, active }, type: "button", "aria-label": `Página ${entry}`, "aria-current": active ? "page" : undefined, onClick: () => this.go(entry) }, entry));
|
|
56
|
+
}), h("button", { key: '5ba13b9a59857423e65a4d10630eb66cc32c30fe', class: "page nav", type: "button", "aria-label": "Pr\u00F3xima p\u00E1gina", disabled: current >= total, onClick: () => this.go(current + 1) }, "\u203A"))));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
UiPagination.style = uiPaginationCss();
|
|
60
|
+
|
|
61
|
+
export { UiPagination as ui_pagination };
|
|
@@ -78,7 +78,7 @@ const UiPopover = class {
|
|
|
78
78
|
this.cleanup = undefined;
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '61b4088ff4d61701a3466619274e60ac64fcc420' }, h("span", { key: 'd2d00f4dbf391ea1bc119870e399187d98634de6', class: "trigger", ref: (el) => (this.triggerEl = el), onClick: this.onTriggerClick }, h("slot", { key: 'ece70edbdda096821de68295e55a3fba3caeada4', name: "trigger" })), h("div", { key: 'f30e5a570e49eb9c7056fd820bc57408dd78e013', class: { panel: true, "is-open": this.open }, ref: (el) => (this.floatingEl = el) }, h("slot", { key: '5823d3c7ed47946d812a2c34002fc5fd0cfc8a29' }))));
|
|
82
82
|
}
|
|
83
83
|
get host() { return getElement(this); }
|
|
84
84
|
static get watchers() { return {
|
|
@@ -23,7 +23,7 @@ const UiProgress = class {
|
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
25
|
const determinate = !this.isIndeterminate;
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '8f40e0e4a439959e1474d2952f0f891438fb3ecf', role: "progressbar", "aria-valuenow": determinate ? String(this.value) : undefined, "aria-valuemin": determinate ? "0" : undefined, "aria-valuemax": determinate ? String(this.max) : undefined }, h("div", { key: '9bfd7557efbfad05a8b170764b96935f00cbdaeb', class: "track" }, h("div", { key: '02205ac65e75f27f52869991b168c6397c8b2760', class: { indicator: true, indeterminate: this.isIndeterminate }, style: determinate ? { width: `${this.percent}%` } : undefined }))));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
UiProgress.style = uiProgressCss();
|
|
@@ -36,7 +36,7 @@ const UiRadioGroup = class {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '67c377ec552ea8cb6ea3d015bab1ee3d66ee436c' }, h("div", { key: 'aa52c74b8473ca06b762811a900d90cdfc8f7422', class: "group", role: "radiogroup" }, this.options.map((option, index) => {
|
|
40
40
|
const selected = option.value === this.value;
|
|
41
41
|
return (h("button", { class: "radio", type: "button", role: "radio", "aria-checked": selected ? "true" : "false", tabindex: selected || (!this.value && index === 0) ? "0" : "-1", disabled: this.disabled, onClick: () => this.select(option.value), onKeyDown: (event) => this.onKeyDown(event, index) }, h("span", { class: "indicator" }, h("span", { class: "dot" })), h("span", { class: "label" }, option.label)));
|
|
42
42
|
}))));
|
|
@@ -30,7 +30,7 @@ const UiReveal = class {
|
|
|
30
30
|
this.observer?.disconnect();
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '4ab570c0eaa9fb6b4d6a9d01887fde6edd72ba8d' }, h("div", { key: 'cf0287499bfa5107fb49cadc85c85f2f70063967', class: { reveal: true, visible: this.visible }, style: { transitionDelay: `${this.delay}ms` } }, h("slot", { key: 'b46502732e597f13d60ec55be0d456dba8181386' }))));
|
|
34
34
|
}
|
|
35
35
|
get host() { return getElement(this); }
|
|
36
36
|
};
|
|
@@ -27,7 +27,7 @@ const UiScrollProgress = class {
|
|
|
27
27
|
window.removeEventListener("scroll", this.onScroll);
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'cb2d746b6e0ca3642a0460cff5685f2eb83a6301' }, h("div", { key: '7fdb8b414f833110c389aef8620c313fb8c001c7', class: "bar", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(this.progress * 100), style: { transform: `scaleX(${this.progress})` } })));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
UiScrollProgress.style = uiScrollProgressCss();
|
|
@@ -13,7 +13,7 @@ const UiSection = class {
|
|
|
13
13
|
this.description = "";
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '71344e4d5a4c6bccade1bf5151aeba1dffa14d7f' }, h("section", { key: '404cb27c6db128f60608b4eff44fa6e05520016b' }, this.eyebrow && h("p", { key: '204ced95531d3bf77c2a32f940c3ec4bc0e76f53', class: "eyebrow" }, this.eyebrow), this.heading && h("h2", { key: '46818123dd264ef60db8ff9c7a2ad93979d71434', class: "heading" }, this.heading), this.description && h("p", { key: 'eaba39853cd12a874c9079e2181aca9e0fc130b7', class: "description" }, this.description), h("slot", { key: '24d02b1d9176e42d7906ef43881807d7cfda2e52' }))));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
UiSection.style = uiSectionCss();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-DYwlrXg_.js';
|
|
2
|
+
|
|
3
|
+
const uiSegmentedCss = () => `:host{display:inline-block}.track{display:inline-flex;align-items:center;gap:0.125rem;padding:0.25rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-full);background:var(--ui-chip);font-family:var(--ui-font-sans)}.segment{display:inline-flex;align-items:center;justify-content:center;height:2rem;padding:0 0.875rem;border:none;border-radius:var(--ui-radius-full);background:transparent;color:var(--ui-text-muted);font-family:var(--ui-font-sans);font-size:0.8125rem;font-weight:500;cursor:pointer;outline:none;transition:all var(--ui-duration) var(--ui-ease)}.segment:hover{color:var(--ui-foreground)}.segment:focus-visible{box-shadow:0 0 0 2px var(--ui-ring)}.segment.active{background:var(--ui-panel-strong);color:var(--ui-foreground);box-shadow:var(--ui-shadow-sm)}`;
|
|
4
|
+
|
|
5
|
+
const UiSegmented = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.uiChange = createEvent(this, "uiChange");
|
|
9
|
+
/** Lista de segmentos. */
|
|
10
|
+
this.items = [];
|
|
11
|
+
/** Valor do segmento ativo. */
|
|
12
|
+
this.value = "";
|
|
13
|
+
this.select = (value) => {
|
|
14
|
+
if (value === this.value)
|
|
15
|
+
return;
|
|
16
|
+
this.value = value;
|
|
17
|
+
this.uiChange.emit(value);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { key: '92649a392383aebb62bab90e3f20a008783f2ed2' }, h("div", { key: '22983cd496ee1f9ed1dbf49d989c409cdca3c8b4', class: "track", role: "radiogroup" }, this.items.map((item) => {
|
|
22
|
+
const active = item.value === this.value;
|
|
23
|
+
return (h("button", { key: item.value, class: { segment: true, active }, type: "button", role: "radio", "aria-checked": active ? "true" : "false", onClick: () => this.select(item.value) }, item.label));
|
|
24
|
+
}))));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
UiSegmented.style = uiSegmentedCss();
|
|
28
|
+
|
|
29
|
+
export { UiSegmented as ui_segmented };
|
|
@@ -18,7 +18,7 @@ const UiSelect = class {
|
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
const hasValue = this.value !== undefined && this.value !== "";
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '5f41047362d77643cc663925900c15c6cd10ec60' }, h("div", { key: '53ec77b2100bdd6de568ad549a42ad8fd080ac6a', class: "wrapper" }, h("select", { key: 'b0b4b1def7b7166bf24f996f9736a670a9b7b052', class: "select", name: this.name, disabled: this.disabled, onChange: this.onChange }, this.placeholder && (h("option", { key: 'e83b039418ac74bb3124c151dca9af43ff05dd61', value: "", disabled: true, selected: !hasValue }, this.placeholder)), this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.value }, option.label)))), h("svg", { key: 'bb3165c856d11b352b2c7a64cc12ab4284541fb4', class: "chevron", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: 'ab5e3cb2419dc63fbcd3804740b781c856ae8240', points: "6 9 12 15 18 9" })))));
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
UiSelect.style = uiSelectCss();
|
|
@@ -9,7 +9,7 @@ const UiSeparator = class {
|
|
|
9
9
|
this.orientation = "horizontal";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '33e452485ff7838e37a378f9acba10f242069cfc', role: "separator", "aria-orientation": this.orientation, class: `orientation-${this.orientation}` }));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
UiSeparator.style = uiSeparatorCss();
|
|
@@ -7,7 +7,7 @@ const UiSkeleton = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '8f839817a493a8221e9d3b2e95fd7ae5ece2e70e' }, h("span", { key: '295dce8e9e6489def8b20a703f04c65ad3740ce8', class: "skeleton" })));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
UiSkeleton.style = uiSkeletonCss();
|
|
@@ -27,7 +27,7 @@ const UiSlider = class {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '22fe57f0e95edb2e169718c8b1fb5c2f3d78ddfe' }, h("input", { key: 'a9e16ef8f97f412c22911f72c4b7212f6d04a293', class: "slider", type: "range", min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, onInput: this.onInput, onChange: this.onChange })));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
UiSlider.style = uiSliderCss();
|
|
@@ -9,7 +9,7 @@ const UiSpinner = class {
|
|
|
9
9
|
this.size = "md";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '0414d6e3be8588ad4c71c5e4cf227075ac7494ab', role: "status" }, h("span", { key: '61e5d0a16b5fd566767ef098477c3144a9c1c987', class: { spinner: true, [`size-${this.size}`]: true } }), h("span", { key: 'ea33b6e6603ba23e7a117ef978329c83818a044b', class: "sr-only" }, "Carregando")));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
UiSpinner.style = uiSpinnerCss();
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-DYwlrXg_.js';
|
|
2
|
+
|
|
3
|
+
const uiStackCss = () => `:host{display:block}.stack{display:flex;font-family:var(--ui-font-sans)}`;
|
|
4
|
+
|
|
5
|
+
const GAP = {
|
|
6
|
+
xs: "0.25rem",
|
|
7
|
+
sm: "0.5rem",
|
|
8
|
+
md: "1rem",
|
|
9
|
+
lg: "1.5rem",
|
|
10
|
+
xl: "2rem",
|
|
11
|
+
};
|
|
12
|
+
const ALIGN = {
|
|
13
|
+
start: "flex-start",
|
|
14
|
+
center: "center",
|
|
15
|
+
end: "flex-end",
|
|
16
|
+
stretch: "stretch",
|
|
17
|
+
};
|
|
18
|
+
const JUSTIFY = {
|
|
19
|
+
start: "flex-start",
|
|
20
|
+
center: "center",
|
|
21
|
+
end: "flex-end",
|
|
22
|
+
between: "space-between",
|
|
23
|
+
};
|
|
24
|
+
const UiStack = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
registerInstance(this, hostRef);
|
|
27
|
+
/** Direção do empilhamento. */
|
|
28
|
+
this.direction = "vertical";
|
|
29
|
+
/** Espaçamento entre itens. */
|
|
30
|
+
this.gap = "md";
|
|
31
|
+
/** Alinhamento no eixo cruzado. */
|
|
32
|
+
this.align = "stretch";
|
|
33
|
+
/** Distribuição no eixo principal. */
|
|
34
|
+
this.justify = "start";
|
|
35
|
+
/** Permite quebra de linha dos itens. */
|
|
36
|
+
this.wrap = false;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
const style = {
|
|
40
|
+
flexDirection: this.direction === "horizontal" ? "row" : "column",
|
|
41
|
+
gap: GAP[this.gap],
|
|
42
|
+
alignItems: ALIGN[this.align],
|
|
43
|
+
justifyContent: JUSTIFY[this.justify],
|
|
44
|
+
flexWrap: this.wrap ? "wrap" : "nowrap",
|
|
45
|
+
};
|
|
46
|
+
return (h(Host, { key: 'ba9547e72877aa05a5e93afbe098d7402b315df3' }, h("div", { key: 'e0fd73777e2211925435f2fd8bfcb74ad2eb8085', class: "stack", style: style }, h("slot", { key: '3a5aa50721c641f0cc81328a21262ff5d375e55c' }))));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
UiStack.style = uiStackCss();
|
|
50
|
+
|
|
51
|
+
export { UiStack as ui_stack };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-DYwlrXg_.js';
|
|
2
|
+
|
|
3
|
+
const uiStatCss = () => `:host{display:block}.card{display:flex;flex-direction:column;gap:0.5rem;padding:1.25rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg);background:var(--ui-panel);backdrop-filter:blur(22px);font-family:var(--ui-font-sans)}.label{margin:0;text-transform:uppercase;letter-spacing:0.08em;font-size:0.7rem;font-weight:500;color:var(--ui-text-faint)}.value-row{display:flex;align-items:baseline;gap:0.625rem}.value{font-size:1.875rem;font-weight:600;line-height:1.1;color:var(--ui-foreground)}.delta{display:inline-flex;align-items:center;gap:0.25rem;padding:0.125rem 0.5rem;border-radius:var(--ui-radius-full);font-size:0.75rem;font-weight:600}.delta svg{display:block}.trend-up{color:var(--ui-success);background:color-mix(in srgb, var(--ui-success) 14%, transparent)}.trend-down{color:var(--ui-danger);background:color-mix(in srgb, var(--ui-danger) 14%, transparent)}.trend-neutral{color:var(--ui-text-muted);background:var(--ui-chip)}.extra{font-size:0.8125rem;color:var(--ui-text-muted)}`;
|
|
4
|
+
|
|
5
|
+
const UiStat = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/** Direção da tendência. */
|
|
9
|
+
this.trend = "neutral";
|
|
10
|
+
}
|
|
11
|
+
renderArrow() {
|
|
12
|
+
if (this.trend === "down") {
|
|
13
|
+
return (h("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true" }, h("path", { d: "M6 11 1 4h10z" })));
|
|
14
|
+
}
|
|
15
|
+
if (this.trend === "up") {
|
|
16
|
+
return (h("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true" }, h("path", { d: "M6 1 11 8H1z" })));
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (h(Host, { key: '7afc03397921ff23d08da136999896a40d8a31be' }, h("div", { key: '35a7d594e9ebb426f10ff256ba4805ee88a0100c', class: "card" }, h("p", { key: '92a82cf415c22f884ed782d410e25559ff391017', class: "label" }, this.label), h("div", { key: '1c8d08800ca0a6f38e574930c5187ec979666a62', class: "value-row" }, h("span", { key: '0bb5e825e9d51a045638f48616c24bdc7a4a0ee0', class: "value" }, this.value), this.delta && (h("span", { key: '01aa434582c8eee2c1fd6b69c16de0262fb89daf', class: { delta: true, [`trend-${this.trend}`]: true } }, this.renderArrow(), this.delta))), h("div", { key: '4446e15c156412cc8b6c72f823a49396f31e8e74', class: "extra" }, h("slot", { key: 'ca4e0cc60f588840d3fd88e3efaecabb84cd633d' })))));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
UiStat.style = uiStatCss();
|
|
25
|
+
|
|
26
|
+
export { UiStat as ui_stat };
|
|
@@ -24,7 +24,7 @@ const UiSwitch = class {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '018ccd47d567e5c16ce40a600c15a9e2281301d2' }, h("button", { key: '7975d671d3c6d048b760b285a68e9ae832c93ebc', class: "switch", type: "button", role: "switch", "aria-checked": this.checked ? "true" : "false", disabled: this.disabled, onClick: this.toggle, onKeyDown: this.onKeyDown }, h("span", { key: '4ac740348a215ff97e0cae3bbbbd411163760792', class: "thumb" }))));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
UiSwitch.style = uiSwitchCss();
|
|
@@ -18,10 +18,10 @@ const UiTabs = class {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'fc0926743b6a547c13660f574fc56abefc6e6c2e' }, h("div", { key: 'a1582c6234e1faaa5cb6b563a51ecf2192a88d40', class: "tablist", role: "tablist" }, this.items.map((item) => {
|
|
22
22
|
const active = item.value === this.value;
|
|
23
23
|
return (h("button", { key: item.value, class: { tab: true, active }, type: "button", role: "tab", "aria-selected": active ? "true" : "false", onClick: () => this.select(item.value) }, item.label));
|
|
24
|
-
})), h("div", { key: '
|
|
24
|
+
})), h("div", { key: '5d9b8d61e8005b7e6baa216ffd571f7b9403acd5', class: "panel", role: "tabpanel" }, h("slot", { key: '8ba0cf22e6e837f038c2ec7fad8d533287325119', name: this.value }))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
UiTabs.style = uiTabsCss();
|
|
@@ -25,7 +25,7 @@ const UiTextarea = class {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: 'ba1b88ab3fa990a903e6d61f31fbbade7b58eb27' }, h("textarea", { key: 'f9ac9e1aff98e94b3562b812cef34fcc138cd350', class: { textarea: true, invalid: this.invalid }, name: this.name, rows: this.rows, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.invalid ? "true" : null, onInput: this.onInput, onChange: this.onChange }, this.value)));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
UiTextarea.style = uiTextareaCss();
|
|
@@ -55,7 +55,7 @@ const UiThemeToggle = class {
|
|
|
55
55
|
return (h("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "4" }), h("line", { x1: "12", y1: "2", x2: "12", y2: "4" }), h("line", { x1: "12", y1: "20", x2: "12", y2: "22" }), h("line", { x1: "2", y1: "12", x2: "4", y2: "12" }), h("line", { x1: "20", y1: "12", x2: "22", y2: "12" }), h("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }), h("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }), h("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }), h("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })));
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: 'da51d59a9d5b28dec214d4fe63f5cebf78d80a51' }, h("button", { key: '55436252c82f49628c4b0394905623bc5a78dc00', class: "toggle", type: "button", "aria-label": this.isDark ? "Ativar tema claro" : "Ativar tema escuro", "aria-pressed": this.isDark ? "true" : "false", onClick: this.toggle }, this.renderIcon())));
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
UiThemeToggle.style = uiThemeToggleCss();
|
|
@@ -52,7 +52,7 @@ const UiToast = class {
|
|
|
52
52
|
this.dismiss();
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '79bd3e7ed207efd5ff62f5296ab11a06993ce347' }, this.open && (h("div", { key: '15a138288380473dff3ff1880e3298e211377339', class: { toast: true, [`variant-${this.variant}`]: true }, role: "status" }, h("div", { key: '33adfee858ddfd37f144b34f8677f312b89c04f3', class: "body" }, this.heading && h("p", { key: 'a56d837636f27897f06a8d693f28763b4bc95db6', class: "heading" }, this.heading), this.description && (h("p", { key: '7c86fb20c84c42e3c5e3262cc91061e9a80804aa', class: "description" }, this.description))), h("button", { key: '4d8160818b76b65c29a27e4404c39a7525441a72', class: "close", type: "button", "aria-label": "Fechar", onClick: () => this.dismiss() }, h("svg", { key: 'ce7ee6982cc1d742b4d4de8573ca11d18166c814', 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: 'c8440dbbb12ce67dd30a052aef92bc736a4532f9', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '9ee2d2ec78efa7566e63feb337e346a5574ccf55', x1: "6", y1: "6", x2: "18", y2: "18" })))))));
|
|
56
56
|
}
|
|
57
57
|
static get watchers() { return {
|
|
58
58
|
"open": [{
|
|
@@ -19,7 +19,7 @@ const UiToaster = class {
|
|
|
19
19
|
this.items = this.items.filter((item) => item.id !== id);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'eb3198a053270b41c8b632b91135987f04735ac5' }, h("div", { key: 'd37bf3710646977e7db39690f221e76360c43aee', 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) }))))));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
UiToaster.style = uiToasterCss();
|
|
@@ -53,7 +53,7 @@ const UiTooltip = class {
|
|
|
53
53
|
this.cleanup = undefined;
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '5e20fbcdd1ae94f29596938ab465a863b46ed65b', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, h("span", { key: '5f4e8b75930fee583f37f1977473c60f6e681ee6', class: "trigger", ref: (el) => (this.triggerEl = el) }, h("slot", { key: 'eae9e842023fe1e4589d2af1889c6e6753bc9010' })), h("div", { key: 'dc815b28e5d1dfbd91a970ce50b77fc8ecd3f5ab', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
|
|
57
57
|
}
|
|
58
58
|
get host() { return getElement(this); }
|
|
59
59
|
};
|
package/dist/esm/uikit.js
CHANGED
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["ui-loading-overlay",[[1,"ui-loading-overlay",{"visible":[4],"label":[1],"spinnerSize":[1,"spinner-size"]}]]],["ui-toaster",[[1,"ui-toaster",{"items":[32],"toast":[64]}]]],["ui-accordion",[[257,"ui-accordion"]]],["ui-accordion-item",[[257,"ui-accordion-item",{"heading":[1],"open":[1540]}]]],["ui-avatar",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1]}]]],["ui-badge",[[257,"ui-badge",{"variant":[1]}]]],["ui-button",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1]}]]],["ui-card",[[257,"ui-card"]]],["ui-checkbox",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-dialog",[[257,"ui-dialog",{"open":[1540],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-drawer",[[257,"ui-drawer",{"open":[1540],"side":[513],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-dropdown-item",[[257,"ui-dropdown-item",{"disabled":[516]}]]],["ui-dropdown-menu",[[257,"ui-dropdown-menu",{"open":[1540],"placement":[1],"show":[64],"close":[64]},[[0,"uiDropdownClose","onItemClose"]],{"open":[{"onOpenChange":0}]}]]],["ui-field",[[257,"ui-field",{"label":[1],"description":[1],"error":[1],"required":[4],"fieldId":[1,"field-id"]}]]],["ui-
|
|
19
|
+
return bootstrapLazy([["ui-loading-overlay",[[1,"ui-loading-overlay",{"visible":[4],"label":[1],"spinnerSize":[1,"spinner-size"]}]]],["ui-toaster",[[1,"ui-toaster",{"items":[32],"toast":[64]}]]],["ui-accordion",[[257,"ui-accordion"]]],["ui-accordion-item",[[257,"ui-accordion-item",{"heading":[1],"open":[1540]}]]],["ui-alert",[[257,"ui-alert",{"variant":[1],"heading":[1],"dismissible":[4],"open":[32]}]]],["ui-avatar",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1],"status":[1]}]]],["ui-avatar-group",[[257,"ui-avatar-group"]]],["ui-badge",[[257,"ui-badge",{"variant":[1],"dot":[4],"removable":[4]}]]],["ui-breadcrumb",[[257,"ui-breadcrumb"]]],["ui-breadcrumb-item",[[257,"ui-breadcrumb-item",{"href":[1],"current":[4]}]]],["ui-button",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1],"full":[516]}]]],["ui-card",[[257,"ui-card"]]],["ui-checkbox",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-container",[[257,"ui-container",{"size":[1],"padded":[4]}]]],["ui-dialog",[[257,"ui-dialog",{"open":[1540],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-drawer",[[257,"ui-drawer",{"open":[1540],"side":[513],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-dropdown-item",[[257,"ui-dropdown-item",{"disabled":[516]}]]],["ui-dropdown-menu",[[257,"ui-dropdown-menu",{"open":[1540],"placement":[1],"show":[64],"close":[64]},[[0,"uiDropdownClose","onItemClose"]],{"open":[{"onOpenChange":0}]}]]],["ui-field",[[257,"ui-field",{"label":[1],"description":[1],"error":[1],"required":[4],"fieldId":[1,"field-id"]}]]],["ui-grid",[[257,"ui-grid",{"columns":[2],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ui-input",[[257,"ui-input",{"value":[1025],"placeholder":[1],"type":[1],"disabled":[4],"invalid":[4],"name":[1],"clearable":[4]}]]],["ui-label",[[257,"ui-label"]]],["ui-pagination",[[1,"ui-pagination",{"total":[2],"current":[1538],"siblings":[2]}]]],["ui-popover",[[257,"ui-popover",{"open":[1540],"placement":[1],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-progress",[[1,"ui-progress",{"value":[2],"max":[2],"indeterminate":[4]}]]],["ui-radio-group",[[1,"ui-radio-group",{"value":[1025],"name":[1],"options":[16],"disabled":[4]}]]],["ui-reveal",[[257,"ui-reveal",{"delay":[2],"visible":[32]}]]],["ui-scroll-progress",[[1,"ui-scroll-progress",{"progress":[32]}]]],["ui-section",[[257,"ui-section",{"eyebrow":[1],"heading":[1],"description":[1]}]]],["ui-segmented",[[1,"ui-segmented",{"items":[16],"value":[1537]}]]],["ui-select",[[1,"ui-select",{"value":[1025],"disabled":[4],"name":[1],"options":[16],"placeholder":[1]}]]],["ui-separator",[[1,"ui-separator",{"orientation":[513]}]]],["ui-skeleton",[[1,"ui-skeleton"]]],["ui-slider",[[1,"ui-slider",{"value":[1026],"min":[2],"max":[2],"step":[2],"disabled":[4]}]]],["ui-stack",[[257,"ui-stack",{"direction":[1],"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ui-stat",[[257,"ui-stat",{"label":[1],"value":[1],"delta":[1],"trend":[1]}]]],["ui-switch",[[1,"ui-switch",{"checked":[1540],"disabled":[4]}]]],["ui-tabs",[[257,"ui-tabs",{"value":[1537],"items":[16]}]]],["ui-textarea",[[1,"ui-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"invalid":[4],"name":[1],"rows":[2]}]]],["ui-theme-toggle",[[1,"ui-theme-toggle",{"isDark":[32]}]]],["ui-tooltip",[[257,"ui-tooltip",{"content":[1],"placement":[1],"openDelay":[2,"open-delay"],"visible":[32]}]]],["ui-spinner",[[1,"ui-spinner",{"size":[1]}]]],["ui-toast",[[1,"ui-toast",{"open":[1540],"variant":[1],"heading":[1],"description":[1],"duration":[2],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export type UiAlertVariant = "info" | "success" | "warning" | "danger";
|
|
3
|
+
export declare class UiAlert {
|
|
4
|
+
/** Variante visual. */
|
|
5
|
+
variant: UiAlertVariant;
|
|
6
|
+
/** Título do alerta. */
|
|
7
|
+
heading?: string;
|
|
8
|
+
/** Exibe o botão de fechar. */
|
|
9
|
+
dismissible: boolean;
|
|
10
|
+
/** Controla a visibilidade interna do alerta. */
|
|
11
|
+
open: boolean;
|
|
12
|
+
/** Emitido quando o alerta é fechado. */
|
|
13
|
+
uiClose: EventEmitter<void>;
|
|
14
|
+
private dismiss;
|
|
15
|
+
private renderIcon;
|
|
16
|
+
render(): any;
|
|
17
|
+
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
1
2
|
export type UiBadgeVariant = "default" | "solid" | "outline" | "success" | "warning" | "danger" | "info";
|
|
2
3
|
export declare class UiBadge {
|
|
3
4
|
/** Variante visual. */
|
|
4
5
|
variant: UiBadgeVariant;
|
|
6
|
+
/** Exibe um ponto colorido à esquerda. */
|
|
7
|
+
dot: boolean;
|
|
8
|
+
/** Exibe um botão para remover o badge. */
|
|
9
|
+
removable: boolean;
|
|
10
|
+
/** Emitido ao clicar no botão de remover. */
|
|
11
|
+
uiRemove: EventEmitter<void>;
|
|
5
12
|
render(): any;
|
|
6
13
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type UiGridGap = "xs" | "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export declare class UiGrid {
|
|
3
|
+
/** Número de colunas da grade. */
|
|
4
|
+
columns: number;
|
|
5
|
+
/** Espaçamento entre células. */
|
|
6
|
+
gap: UiGridGap;
|
|
7
|
+
/** Largura mínima por item para layout responsivo (auto-fit). */
|
|
8
|
+
minItemWidth?: string;
|
|
9
|
+
render(): any;
|
|
10
|
+
}
|
|
@@ -12,11 +12,14 @@ export declare class UiInput {
|
|
|
12
12
|
invalid: boolean;
|
|
13
13
|
/** Nome do campo. */
|
|
14
14
|
name?: string;
|
|
15
|
+
/** Exibe um botão para limpar o valor quando preenchido. */
|
|
16
|
+
clearable: boolean;
|
|
15
17
|
/** Emitido a cada digitação. */
|
|
16
18
|
uiInput: EventEmitter<string>;
|
|
17
19
|
/** Emitido ao confirmar (change). */
|
|
18
20
|
uiChange: EventEmitter<string>;
|
|
19
21
|
private onInput;
|
|
20
22
|
private onChange;
|
|
23
|
+
private clear;
|
|
21
24
|
render(): any;
|
|
22
25
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export declare class UiPagination {
|
|
3
|
+
/** Total de páginas. */
|
|
4
|
+
total: number;
|
|
5
|
+
/** Página atual. */
|
|
6
|
+
current: number;
|
|
7
|
+
/** Quantidade de páginas ao redor da atual. */
|
|
8
|
+
siblings: number;
|
|
9
|
+
/** Emitido quando a página muda. */
|
|
10
|
+
uiChange: EventEmitter<number>;
|
|
11
|
+
private clamp;
|
|
12
|
+
private go;
|
|
13
|
+
private buildRange;
|
|
14
|
+
render(): any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export interface UiSegmentedItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class UiSegmented {
|
|
7
|
+
/** Lista de segmentos. */
|
|
8
|
+
items: UiSegmentedItem[];
|
|
9
|
+
/** Valor do segmento ativo. */
|
|
10
|
+
value: string;
|
|
11
|
+
/** Emitido quando o segmento ativo muda. */
|
|
12
|
+
uiChange: EventEmitter<string>;
|
|
13
|
+
private select;
|
|
14
|
+
render(): any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type UiStackDirection = "vertical" | "horizontal";
|
|
2
|
+
export type UiStackGap = "xs" | "sm" | "md" | "lg" | "xl";
|
|
3
|
+
export type UiStackAlign = "start" | "center" | "end" | "stretch";
|
|
4
|
+
export type UiStackJustify = "start" | "center" | "end" | "between";
|
|
5
|
+
export declare class UiStack {
|
|
6
|
+
/** Direção do empilhamento. */
|
|
7
|
+
direction: UiStackDirection;
|
|
8
|
+
/** Espaçamento entre itens. */
|
|
9
|
+
gap: UiStackGap;
|
|
10
|
+
/** Alinhamento no eixo cruzado. */
|
|
11
|
+
align: UiStackAlign;
|
|
12
|
+
/** Distribuição no eixo principal. */
|
|
13
|
+
justify: UiStackJustify;
|
|
14
|
+
/** Permite quebra de linha dos itens. */
|
|
15
|
+
wrap: boolean;
|
|
16
|
+
render(): any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type UiStatTrend = "up" | "down" | "neutral";
|
|
2
|
+
export declare class UiStat {
|
|
3
|
+
/** Rótulo da métrica. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Valor principal exibido. */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Variação exibida no chip (ex.: "+12%"). */
|
|
8
|
+
delta?: string;
|
|
9
|
+
/** Direção da tendência. */
|
|
10
|
+
trend: UiStatTrend;
|
|
11
|
+
private renderArrow;
|
|
12
|
+
render(): any;
|
|
13
|
+
}
|