@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,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Cb1tfi_9.js');
|
|
4
|
+
|
|
5
|
+
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)}`;
|
|
6
|
+
|
|
7
|
+
const UiSegmented = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.uiChange = index.createEvent(this, "uiChange");
|
|
11
|
+
/** Lista de segmentos. */
|
|
12
|
+
this.items = [];
|
|
13
|
+
/** Valor do segmento ativo. */
|
|
14
|
+
this.value = "";
|
|
15
|
+
this.select = (value) => {
|
|
16
|
+
if (value === this.value)
|
|
17
|
+
return;
|
|
18
|
+
this.value = value;
|
|
19
|
+
this.uiChange.emit(value);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h(index.Host, { key: '92649a392383aebb62bab90e3f20a008783f2ed2' }, index.h("div", { key: '22983cd496ee1f9ed1dbf49d989c409cdca3c8b4', class: "track", role: "radiogroup" }, this.items.map((item) => {
|
|
24
|
+
const active = item.value === this.value;
|
|
25
|
+
return (index.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));
|
|
26
|
+
}))));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
UiSegmented.style = uiSegmentedCss();
|
|
30
|
+
|
|
31
|
+
exports.ui_segmented = UiSegmented;
|
|
@@ -20,7 +20,7 @@ const UiSelect = class {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const hasValue = this.value !== undefined && this.value !== "";
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
23
|
+
return (index.h(index.Host, { key: '5f41047362d77643cc663925900c15c6cd10ec60' }, index.h("div", { key: '53ec77b2100bdd6de568ad549a42ad8fd080ac6a', class: "wrapper" }, index.h("select", { key: 'b0b4b1def7b7166bf24f996f9736a670a9b7b052', class: "select", name: this.name, disabled: this.disabled, onChange: this.onChange }, this.placeholder && (index.h("option", { key: 'e83b039418ac74bb3124c151dca9af43ff05dd61', value: "", disabled: true, selected: !hasValue }, this.placeholder)), this.options.map((option) => (index.h("option", { value: option.value, selected: option.value === this.value }, option.label)))), index.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" }, index.h("polyline", { key: 'ab5e3cb2419dc63fbcd3804740b781c856ae8240', points: "6 9 12 15 18 9" })))));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
UiSelect.style = uiSelectCss();
|
|
@@ -11,7 +11,7 @@ const UiSeparator = class {
|
|
|
11
11
|
this.orientation = "horizontal";
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: '33e452485ff7838e37a378f9acba10f242069cfc', role: "separator", "aria-orientation": this.orientation, class: `orientation-${this.orientation}` }));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
UiSeparator.style = uiSeparatorCss();
|
|
@@ -9,7 +9,7 @@ const UiSkeleton = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h(index.Host, { key: '
|
|
12
|
+
return (index.h(index.Host, { key: '8f839817a493a8221e9d3b2e95fd7ae5ece2e70e' }, index.h("span", { key: '295dce8e9e6489def8b20a703f04c65ad3740ce8', class: "skeleton" })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
UiSkeleton.style = uiSkeletonCss();
|
|
@@ -29,7 +29,7 @@ const UiSlider = class {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (index.h(index.Host, { key: '
|
|
32
|
+
return (index.h(index.Host, { key: '22fe57f0e95edb2e169718c8b1fb5c2f3d78ddfe' }, index.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 })));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
UiSlider.style = uiSliderCss();
|
|
@@ -11,7 +11,7 @@ const UiSpinner = class {
|
|
|
11
11
|
this.size = "md";
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: '0414d6e3be8588ad4c71c5e4cf227075ac7494ab', role: "status" }, index.h("span", { key: '61e5d0a16b5fd566767ef098477c3144a9c1c987', class: { spinner: true, [`size-${this.size}`]: true } }), index.h("span", { key: 'ea33b6e6603ba23e7a117ef978329c83818a044b', class: "sr-only" }, "Carregando")));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
UiSpinner.style = uiSpinnerCss();
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Cb1tfi_9.js');
|
|
4
|
+
|
|
5
|
+
const uiStackCss = () => `:host{display:block}.stack{display:flex;font-family:var(--ui-font-sans)}`;
|
|
6
|
+
|
|
7
|
+
const GAP = {
|
|
8
|
+
xs: "0.25rem",
|
|
9
|
+
sm: "0.5rem",
|
|
10
|
+
md: "1rem",
|
|
11
|
+
lg: "1.5rem",
|
|
12
|
+
xl: "2rem",
|
|
13
|
+
};
|
|
14
|
+
const ALIGN = {
|
|
15
|
+
start: "flex-start",
|
|
16
|
+
center: "center",
|
|
17
|
+
end: "flex-end",
|
|
18
|
+
stretch: "stretch",
|
|
19
|
+
};
|
|
20
|
+
const JUSTIFY = {
|
|
21
|
+
start: "flex-start",
|
|
22
|
+
center: "center",
|
|
23
|
+
end: "flex-end",
|
|
24
|
+
between: "space-between",
|
|
25
|
+
};
|
|
26
|
+
const UiStack = class {
|
|
27
|
+
constructor(hostRef) {
|
|
28
|
+
index.registerInstance(this, hostRef);
|
|
29
|
+
/** Direção do empilhamento. */
|
|
30
|
+
this.direction = "vertical";
|
|
31
|
+
/** Espaçamento entre itens. */
|
|
32
|
+
this.gap = "md";
|
|
33
|
+
/** Alinhamento no eixo cruzado. */
|
|
34
|
+
this.align = "stretch";
|
|
35
|
+
/** Distribuição no eixo principal. */
|
|
36
|
+
this.justify = "start";
|
|
37
|
+
/** Permite quebra de linha dos itens. */
|
|
38
|
+
this.wrap = false;
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const style = {
|
|
42
|
+
flexDirection: this.direction === "horizontal" ? "row" : "column",
|
|
43
|
+
gap: GAP[this.gap],
|
|
44
|
+
alignItems: ALIGN[this.align],
|
|
45
|
+
justifyContent: JUSTIFY[this.justify],
|
|
46
|
+
flexWrap: this.wrap ? "wrap" : "nowrap",
|
|
47
|
+
};
|
|
48
|
+
return (index.h(index.Host, { key: 'ba9547e72877aa05a5e93afbe098d7402b315df3' }, index.h("div", { key: 'e0fd73777e2211925435f2fd8bfcb74ad2eb8085', class: "stack", style: style }, index.h("slot", { key: '3a5aa50721c641f0cc81328a21262ff5d375e55c' }))));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
UiStack.style = uiStackCss();
|
|
52
|
+
|
|
53
|
+
exports.ui_stack = UiStack;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Cb1tfi_9.js');
|
|
4
|
+
|
|
5
|
+
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)}`;
|
|
6
|
+
|
|
7
|
+
const UiStat = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
/** Direção da tendência. */
|
|
11
|
+
this.trend = "neutral";
|
|
12
|
+
}
|
|
13
|
+
renderArrow() {
|
|
14
|
+
if (this.trend === "down") {
|
|
15
|
+
return (index.h("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { d: "M6 11 1 4h10z" })));
|
|
16
|
+
}
|
|
17
|
+
if (this.trend === "up") {
|
|
18
|
+
return (index.h("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { d: "M6 1 11 8H1z" })));
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return (index.h(index.Host, { key: '7afc03397921ff23d08da136999896a40d8a31be' }, index.h("div", { key: '35a7d594e9ebb426f10ff256ba4805ee88a0100c', class: "card" }, index.h("p", { key: '92a82cf415c22f884ed782d410e25559ff391017', class: "label" }, this.label), index.h("div", { key: '1c8d08800ca0a6f38e574930c5187ec979666a62', class: "value-row" }, index.h("span", { key: '0bb5e825e9d51a045638f48616c24bdc7a4a0ee0', class: "value" }, this.value), this.delta && (index.h("span", { key: '01aa434582c8eee2c1fd6b69c16de0262fb89daf', class: { delta: true, [`trend-${this.trend}`]: true } }, this.renderArrow(), this.delta))), index.h("div", { key: '4446e15c156412cc8b6c72f823a49396f31e8e74', class: "extra" }, index.h("slot", { key: 'ca4e0cc60f588840d3fd88e3efaecabb84cd633d' })))));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
UiStat.style = uiStatCss();
|
|
27
|
+
|
|
28
|
+
exports.ui_stat = UiStat;
|
|
@@ -26,7 +26,7 @@ const UiSwitch = class {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (index.h(index.Host, { key: '
|
|
29
|
+
return (index.h(index.Host, { key: '018ccd47d567e5c16ce40a600c15a9e2281301d2' }, index.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 }, index.h("span", { key: '4ac740348a215ff97e0cae3bbbbd411163760792', class: "thumb" }))));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
UiSwitch.style = uiSwitchCss();
|
|
@@ -20,10 +20,10 @@ const UiTabs = class {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
23
|
+
return (index.h(index.Host, { key: 'fc0926743b6a547c13660f574fc56abefc6e6c2e' }, index.h("div", { key: 'a1582c6234e1faaa5cb6b563a51ecf2192a88d40', class: "tablist", role: "tablist" }, this.items.map((item) => {
|
|
24
24
|
const active = item.value === this.value;
|
|
25
25
|
return (index.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));
|
|
26
|
-
})), index.h("div", { key: '
|
|
26
|
+
})), index.h("div", { key: '5d9b8d61e8005b7e6baa216ffd571f7b9403acd5', class: "panel", role: "tabpanel" }, index.h("slot", { key: '8ba0cf22e6e837f038c2ec7fad8d533287325119', name: this.value }))));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
UiTabs.style = uiTabsCss();
|
|
@@ -27,7 +27,7 @@ const UiTextarea = class {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (index.h(index.Host, { key: '
|
|
30
|
+
return (index.h(index.Host, { key: 'ba1b88ab3fa990a903e6d61f31fbbade7b58eb27' }, index.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)));
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
UiTextarea.style = uiTextareaCss();
|
|
@@ -57,7 +57,7 @@ const UiThemeToggle = class {
|
|
|
57
57
|
return (index.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" }, index.h("circle", { cx: "12", cy: "12", r: "4" }), index.h("line", { x1: "12", y1: "2", x2: "12", y2: "4" }), index.h("line", { x1: "12", y1: "20", x2: "12", y2: "22" }), index.h("line", { x1: "2", y1: "12", x2: "4", y2: "12" }), index.h("line", { x1: "20", y1: "12", x2: "22", y2: "12" }), index.h("line", { x1: "4.93", y1: "4.93", x2: "6.34", y2: "6.34" }), index.h("line", { x1: "17.66", y1: "17.66", x2: "19.07", y2: "19.07" }), index.h("line", { x1: "4.93", y1: "19.07", x2: "6.34", y2: "17.66" }), index.h("line", { x1: "17.66", y1: "6.34", x2: "19.07", y2: "4.93" })));
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (index.h(index.Host, { key: '
|
|
60
|
+
return (index.h(index.Host, { key: 'da51d59a9d5b28dec214d4fe63f5cebf78d80a51' }, index.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())));
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
UiThemeToggle.style = uiThemeToggleCss();
|
|
@@ -54,7 +54,7 @@ const UiToast = class {
|
|
|
54
54
|
this.dismiss();
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: '
|
|
57
|
+
return (index.h(index.Host, { key: '79bd3e7ed207efd5ff62f5296ab11a06993ce347' }, this.open && (index.h("div", { key: '15a138288380473dff3ff1880e3298e211377339', class: { toast: true, [`variant-${this.variant}`]: true }, role: "status" }, index.h("div", { key: '33adfee858ddfd37f144b34f8677f312b89c04f3', class: "body" }, this.heading && index.h("p", { key: 'a56d837636f27897f06a8d693f28763b4bc95db6', class: "heading" }, this.heading), this.description && (index.h("p", { key: '7c86fb20c84c42e3c5e3262cc91061e9a80804aa', class: "description" }, this.description))), index.h("button", { key: '4d8160818b76b65c29a27e4404c39a7525441a72', class: "close", type: "button", "aria-label": "Fechar", onClick: () => this.dismiss() }, index.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" }, index.h("line", { key: 'c8440dbbb12ce67dd30a052aef92bc736a4532f9', x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { key: '9ee2d2ec78efa7566e63feb337e346a5574ccf55', x1: "6", y1: "6", x2: "18", y2: "18" })))))));
|
|
58
58
|
}
|
|
59
59
|
static get watchers() { return {
|
|
60
60
|
"open": [{
|
|
@@ -21,7 +21,7 @@ const UiToaster = class {
|
|
|
21
21
|
this.items = this.items.filter((item) => item.id !== id);
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
24
|
+
return (index.h(index.Host, { key: 'eb3198a053270b41c8b632b91135987f04735ac5' }, index.h("div", { key: 'd37bf3710646977e7db39690f221e76360c43aee', class: "container" }, this.items.map((item) => (index.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) }))))));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
UiToaster.style = uiToasterCss();
|
|
@@ -55,7 +55,7 @@ const UiTooltip = class {
|
|
|
55
55
|
this.cleanup = undefined;
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: '5e20fbcdd1ae94f29596938ab465a863b46ed65b', onMouseEnter: this.onEnter, onMouseLeave: this.onLeave, onFocusin: this.onEnter, onFocusout: this.onLeave }, index.h("span", { key: '5f4e8b75930fee583f37f1977473c60f6e681ee6', class: "trigger", ref: (el) => (this.triggerEl = el) }, index.h("slot", { key: 'eae9e842023fe1e4589d2af1889c6e6753bc9010' })), index.h("div", { key: 'dc815b28e5d1dfbd91a970ce50b77fc8ecd3f5ab', class: { tooltip: true, "is-visible": this.visible }, role: "tooltip", ref: (el) => (this.floatingEl = el) }, this.content)));
|
|
59
59
|
}
|
|
60
60
|
get host() { return index.getElement(this); }
|
|
61
61
|
};
|
package/dist/cjs/uikit.cjs.js
CHANGED
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
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-
|
|
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-alert.cjs",[[257,"ui-alert",{"variant":[1],"heading":[1],"dismissible":[4],"open":[32]}]]],["ui-avatar.cjs",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1],"status":[1]}]]],["ui-avatar-group.cjs",[[257,"ui-avatar-group"]]],["ui-badge.cjs",[[257,"ui-badge",{"variant":[1],"dot":[4],"removable":[4]}]]],["ui-breadcrumb.cjs",[[257,"ui-breadcrumb"]]],["ui-breadcrumb-item.cjs",[[257,"ui-breadcrumb-item",{"href":[1],"current":[4]}]]],["ui-button.cjs",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1],"full":[516]}]]],["ui-card.cjs",[[257,"ui-card"]]],["ui-checkbox.cjs",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-container.cjs",[[257,"ui-container",{"size":[1],"padded":[4]}]]],["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-grid.cjs",[[257,"ui-grid",{"columns":[2],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ui-input.cjs",[[257,"ui-input",{"value":[1025],"placeholder":[1],"type":[1],"disabled":[4],"invalid":[4],"name":[1],"clearable":[4]}]]],["ui-label.cjs",[[257,"ui-label"]]],["ui-pagination.cjs",[[1,"ui-pagination",{"total":[2],"current":[1538],"siblings":[2]}]]],["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-segmented.cjs",[[1,"ui-segmented",{"items":[16],"value":[1537]}]]],["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-stack.cjs",[[257,"ui-stack",{"direction":[1],"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ui-stat.cjs",[[257,"ui-stat",{"label":[1],"value":[1],"delta":[1],"trend":[1]}]]],["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
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
"components/ui-alert/ui-alert.js",
|
|
3
4
|
"components/ui-badge/ui-badge.js",
|
|
4
5
|
"components/ui-button/ui-button.js",
|
|
6
|
+
"components/ui-container/ui-container.js",
|
|
7
|
+
"components/ui-grid/ui-grid.js",
|
|
5
8
|
"components/ui-spinner/ui-spinner.js",
|
|
6
9
|
"components/ui-radio-group/ui-radio-group.js",
|
|
10
|
+
"components/ui-segmented/ui-segmented.js",
|
|
7
11
|
"components/ui-select/ui-select.js",
|
|
8
12
|
"components/ui-separator/ui-separator.js",
|
|
13
|
+
"components/ui-stack/ui-stack.js",
|
|
14
|
+
"components/ui-stat/ui-stat.js",
|
|
9
15
|
"components/ui-tabs/ui-tabs.js",
|
|
10
16
|
"components/ui-toast/ui-toast.js",
|
|
11
17
|
"components/ui-toaster/ui-toaster.js",
|
|
12
18
|
"components/ui-accordion/ui-accordion.js",
|
|
13
19
|
"components/ui-accordion-item/ui-accordion-item.js",
|
|
14
20
|
"components/ui-avatar/ui-avatar.js",
|
|
21
|
+
"components/ui-avatar-group/ui-avatar-group.js",
|
|
22
|
+
"components/ui-breadcrumb/ui-breadcrumb.js",
|
|
23
|
+
"components/ui-breadcrumb-item/ui-breadcrumb-item.js",
|
|
15
24
|
"components/ui-card/ui-card.js",
|
|
16
25
|
"components/ui-checkbox/ui-checkbox.js",
|
|
17
26
|
"components/ui-dialog/ui-dialog.js",
|
|
@@ -22,6 +31,7 @@
|
|
|
22
31
|
"components/ui-input/ui-input.js",
|
|
23
32
|
"components/ui-label/ui-label.js",
|
|
24
33
|
"components/ui-loading-overlay/ui-loading-overlay.js",
|
|
34
|
+
"components/ui-pagination/ui-pagination.js",
|
|
25
35
|
"components/ui-popover/ui-popover.js",
|
|
26
36
|
"components/ui-progress/ui-progress.js",
|
|
27
37
|
"components/ui-reveal/ui-reveal.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class UiAccordion {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '839f17ea9b81b97b0ca49e89d9907c6a0571f049' }, h("slot", { key: '71badd4150a835acfaa0d5867287a30c8a0b7936' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "ui-accordion"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class UiAccordionItem {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '4b2e9ef0cda9117df86bef529c4bead45bbe8090' }, h("details", { key: '18c5ff6f8d9ac966d36240949670d84fc2603883', open: this.open, onToggle: this.onToggle }, h("summary", { key: '608bb56fe9b4558d50dc50be2edb922233de35aa' }, h("span", { key: '5d65f0199fff46a4a32139ab1565533dfb299ea9', class: "heading" }, this.heading), h("svg", { key: 'dd32e7223d4eab848185fe027e86892643e98070', 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: 'd9d02a5e5cfe20a77ae5cd6e383962656038d6d5', points: "6 9 12 15 18 9" }))), h("div", { key: 'b82b7a754b6eb160044b0eadf85ff7a8812e80a5', class: "content" }, h("slot", { key: 'c6a5b13158bbef248980737d9cea866178d2122c' })))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "ui-accordion-item"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.alert {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: 0.75rem;
|
|
9
|
+
padding: 0.875rem 1rem;
|
|
10
|
+
border: 1px solid var(--ui-border);
|
|
11
|
+
border-left: 3px solid var(--ui-info);
|
|
12
|
+
border-radius: var(--ui-radius);
|
|
13
|
+
font-family: var(--ui-font-sans);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.indicator {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
margin-top: 0.0625rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon {
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.body {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 0.25rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.heading {
|
|
35
|
+
margin: 0;
|
|
36
|
+
font-size: 0.875rem;
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
color: var(--ui-foreground);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.content {
|
|
42
|
+
font-size: 0.8125rem;
|
|
43
|
+
color: var(--ui-text-soft);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.close {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
padding: 0.125rem;
|
|
52
|
+
border: none;
|
|
53
|
+
background: transparent;
|
|
54
|
+
color: var(--ui-text-muted);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
border-radius: var(--ui-radius-sm);
|
|
57
|
+
transition: color var(--ui-duration) var(--ui-ease);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.close:hover {
|
|
61
|
+
color: var(--ui-foreground);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Variantes */
|
|
65
|
+
.variant-info {
|
|
66
|
+
border-left-color: var(--ui-info);
|
|
67
|
+
background: color-mix(in srgb, var(--ui-info) 12%, transparent);
|
|
68
|
+
}
|
|
69
|
+
.variant-info .indicator {
|
|
70
|
+
color: var(--ui-info);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.variant-success {
|
|
74
|
+
border-left-color: var(--ui-success);
|
|
75
|
+
background: color-mix(in srgb, var(--ui-success) 12%, transparent);
|
|
76
|
+
}
|
|
77
|
+
.variant-success .indicator {
|
|
78
|
+
color: var(--ui-success);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.variant-warning {
|
|
82
|
+
border-left-color: var(--ui-warning);
|
|
83
|
+
background: color-mix(in srgb, var(--ui-warning) 12%, transparent);
|
|
84
|
+
}
|
|
85
|
+
.variant-warning .indicator {
|
|
86
|
+
color: var(--ui-warning);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.variant-danger {
|
|
90
|
+
border-left-color: var(--ui-danger);
|
|
91
|
+
background: color-mix(in srgb, var(--ui-danger) 12%, transparent);
|
|
92
|
+
}
|
|
93
|
+
.variant-danger .indicator {
|
|
94
|
+
color: var(--ui-danger);
|
|
95
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class UiAlert {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Variante visual. */
|
|
5
|
+
this.variant = "info";
|
|
6
|
+
/** Exibe o botão de fechar. */
|
|
7
|
+
this.dismissible = false;
|
|
8
|
+
/** Controla a visibilidade interna do alerta. */
|
|
9
|
+
this.open = true;
|
|
10
|
+
this.dismiss = () => {
|
|
11
|
+
this.open = false;
|
|
12
|
+
this.uiClose.emit();
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
renderIcon() {
|
|
16
|
+
switch (this.variant) {
|
|
17
|
+
case "success":
|
|
18
|
+
return (h("svg", { class: "icon", 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: "10" }), h("path", { d: "M8 12l3 3 5-6" })));
|
|
19
|
+
case "warning":
|
|
20
|
+
return (h("svg", { class: "icon", 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("path", { d: "M10.3 3.3 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.3a2 2 0 0 0-3.4 0Z" }), h("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), h("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })));
|
|
21
|
+
case "danger":
|
|
22
|
+
return (h("svg", { class: "icon", 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: "10" }), h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), h("line", { x1: "9", y1: "9", x2: "15", y2: "15" })));
|
|
23
|
+
default:
|
|
24
|
+
return (h("svg", { class: "icon", 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: "10" }), h("line", { x1: "12", y1: "11", x2: "12", y2: "16" }), h("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return (h(Host, { key: '0de470e0aec991fe0ed4b47d4b14075d0153ef54' }, this.open && (h("div", { key: 'd17b7326f4c76fe99a32f402fb53a095721bf209', class: { alert: true, [`variant-${this.variant}`]: true }, role: "alert" }, h("span", { key: '124489a92f47b4c7751f9af674b13add775bf3d3', class: "indicator" }, this.renderIcon()), h("div", { key: '9c0741a48bee7225f7831b18ab492156c217f5a5', class: "body" }, this.heading && h("p", { key: 'f883db0bdd9b48cfc1915d209675f681cc846d95', class: "heading" }, this.heading), h("div", { key: '4a1de1b6a5f6fc84eead49a0a0357067b6c3dcab', class: "content" }, h("slot", { key: '21ac76a2d287bb4e8629bac25cd3753886d14b5d' }))), this.dismissible && (h("button", { key: 'f96e21942bed9489b296f76b6bdcc026f4351141', class: "close", type: "button", "aria-label": "Fechar", onClick: this.dismiss }, h("svg", { key: 'a64eaf844dbc6a0fd4fbc699deac73702a7ff300', 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("line", { key: 'e05e78664e7161af63d9e420a77726b52f14fff5', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: 'f6e62b74f93061762881b30866c105b332e79870', x1: "6", y1: "6", x2: "18", y2: "18" }))))))));
|
|
29
|
+
}
|
|
30
|
+
static get is() { return "ui-alert"; }
|
|
31
|
+
static get encapsulation() { return "shadow"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["ui-alert.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["ui-alert.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get properties() {
|
|
43
|
+
return {
|
|
44
|
+
"variant": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "UiAlertVariant",
|
|
49
|
+
"resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
|
|
50
|
+
"references": {
|
|
51
|
+
"UiAlertVariant": {
|
|
52
|
+
"location": "local",
|
|
53
|
+
"path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-alert/ui-alert.tsx",
|
|
54
|
+
"id": "src/components/ui-alert/ui-alert.tsx::UiAlertVariant"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": "Variante visual."
|
|
63
|
+
},
|
|
64
|
+
"getter": false,
|
|
65
|
+
"setter": false,
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"attribute": "variant",
|
|
68
|
+
"defaultValue": "\"info\""
|
|
69
|
+
},
|
|
70
|
+
"heading": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "string",
|
|
75
|
+
"resolved": "string | undefined",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": true,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": "T\u00EDtulo do alerta."
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"attribute": "heading"
|
|
88
|
+
},
|
|
89
|
+
"dismissible": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "boolean",
|
|
94
|
+
"resolved": "boolean",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Exibe o bot\u00E3o de fechar."
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"attribute": "dismissible",
|
|
107
|
+
"defaultValue": "false"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
static get states() {
|
|
112
|
+
return {
|
|
113
|
+
"open": {}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get events() {
|
|
117
|
+
return [{
|
|
118
|
+
"method": "uiClose",
|
|
119
|
+
"name": "uiClose",
|
|
120
|
+
"bubbles": true,
|
|
121
|
+
"cancelable": true,
|
|
122
|
+
"composed": true,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": "Emitido quando o alerta \u00E9 fechado."
|
|
126
|
+
},
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "void",
|
|
129
|
+
"resolved": "void",
|
|
130
|
+
"references": {}
|
|
131
|
+
}
|
|
132
|
+
}];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -28,3 +28,34 @@
|
|
|
28
28
|
color: var(--ui-text-muted);
|
|
29
29
|
line-height: 1;
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
.wrapper {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.status {
|
|
38
|
+
position: absolute;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
width: 28%;
|
|
42
|
+
height: 28%;
|
|
43
|
+
min-width: 0.55rem;
|
|
44
|
+
min-height: 0.55rem;
|
|
45
|
+
border-radius: var(--ui-radius-full);
|
|
46
|
+
border: 2px solid var(--ui-background);
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.status-online {
|
|
51
|
+
background: var(--ui-success);
|
|
52
|
+
}
|
|
53
|
+
.status-busy {
|
|
54
|
+
background: var(--ui-danger);
|
|
55
|
+
}
|
|
56
|
+
.status-away {
|
|
57
|
+
background: var(--ui-warning);
|
|
58
|
+
}
|
|
59
|
+
.status-offline {
|
|
60
|
+
background: var(--ui-text-faint);
|
|
61
|
+
}
|