@andespindola/ui-core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/cjs/floating-ui.dom-BPemvNRD.js +1542 -0
- package/dist/cjs/index-Cb1tfi_9.js +1728 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/ui-accordion-item.cjs.entry.js +27 -0
- package/dist/cjs/ui-accordion.cjs.entry.js +17 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +19 -0
- package/dist/cjs/ui-badge.cjs.entry.js +19 -0
- package/dist/cjs/ui-button.cjs.entry.js +31 -0
- package/dist/cjs/ui-card.cjs.entry.js +17 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +34 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +57 -0
- package/dist/cjs/ui-drawer.cjs.entry.js +59 -0
- package/dist/cjs/ui-dropdown-item.cjs.entry.js +27 -0
- package/dist/cjs/ui-dropdown-menu.cjs.entry.js +97 -0
- package/dist/cjs/ui-field.cjs.entry.js +19 -0
- package/dist/cjs/ui-input.cjs.entry.js +35 -0
- package/dist/cjs/ui-label.cjs.entry.js +17 -0
- package/dist/cjs/ui-loading-overlay.cjs.entry.js +24 -0
- package/dist/cjs/ui-popover.cjs.entry.js +94 -0
- package/dist/cjs/ui-progress.cjs.entry.js +33 -0
- package/dist/cjs/ui-radio-group.cjs.entry.js +49 -0
- package/dist/cjs/ui-reveal.cjs.entry.js +41 -0
- package/dist/cjs/ui-scroll-progress.cjs.entry.js +37 -0
- package/dist/cjs/ui-section.cjs.entry.js +23 -0
- package/dist/cjs/ui-select.cjs.entry.js +28 -0
- package/dist/cjs/ui-separator.cjs.entry.js +19 -0
- package/dist/cjs/ui-skeleton.cjs.entry.js +17 -0
- package/dist/cjs/ui-slider.cjs.entry.js +37 -0
- package/dist/cjs/ui-spinner.cjs.entry.js +19 -0
- package/dist/cjs/ui-switch.cjs.entry.js +34 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +31 -0
- package/dist/cjs/ui-textarea.cjs.entry.js +35 -0
- package/dist/cjs/ui-theme-toggle.cjs.entry.js +65 -0
- package/dist/cjs/ui-toast.cjs.entry.js +67 -0
- package/dist/cjs/ui-toaster.cjs.entry.js +29 -0
- package/dist/cjs/ui-tooltip.cjs.entry.js +64 -0
- package/dist/cjs/uikit.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +45 -0
- package/dist/collection/components/ui-accordion/ui-accordion.css +4 -0
- package/dist/collection/components/ui-accordion/ui-accordion.js +18 -0
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.css +42 -0
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +91 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +30 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +84 -0
- package/dist/collection/components/ui-badge/ui-badge.css +46 -0
- package/dist/collection/components/ui-badge/ui-badge.js +52 -0
- package/dist/collection/components/ui-button/ui-button.css +130 -0
- package/dist/collection/components/ui-button/ui-button.js +150 -0
- package/dist/collection/components/ui-card/ui-card.css +24 -0
- package/dist/collection/components/ui-card/ui-card.js +18 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +46 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +136 -0
- package/dist/collection/components/ui-dialog/ui-dialog.css +48 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +140 -0
- package/dist/collection/components/ui-drawer/ui-drawer.css +88 -0
- package/dist/collection/components/ui-drawer/ui-drawer.js +162 -0
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.css +36 -0
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +71 -0
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.css +39 -0
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +216 -0
- package/dist/collection/components/ui-field/ui-field.css +34 -0
- package/dist/collection/components/ui-field/ui-field.js +122 -0
- package/dist/collection/components/ui-input/ui-input.css +40 -0
- package/dist/collection/components/ui-input/ui-input.js +191 -0
- package/dist/collection/components/ui-label/ui-label.css +10 -0
- package/dist/collection/components/ui-label/ui-label.js +18 -0
- package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.css +24 -0
- package/dist/collection/components/ui-loading-overlay/ui-loading-overlay.js +102 -0
- package/dist/collection/components/ui-popover/ui-popover.css +36 -0
- package/dist/collection/components/ui-popover/ui-popover.js +204 -0
- package/dist/collection/components/ui-progress/ui-progress.css +32 -0
- package/dist/collection/components/ui-progress/ui-progress.js +100 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +67 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +155 -0
- package/dist/collection/components/ui-reveal/ui-reveal.css +17 -0
- package/dist/collection/components/ui-reveal/ui-reveal.js +73 -0
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.css +20 -0
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +45 -0
- package/dist/collection/components/ui-section/ui-section.css +32 -0
- package/dist/collection/components/ui-section/ui-section.js +90 -0
- package/dist/collection/components/ui-select/ui-select.css +49 -0
- package/dist/collection/components/ui-select/ui-select.js +153 -0
- package/dist/collection/components/ui-separator/ui-separator.css +15 -0
- package/dist/collection/components/ui-separator/ui-separator.js +52 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.css +27 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +18 -0
- package/dist/collection/components/ui-slider/ui-slider.css +80 -0
- package/dist/collection/components/ui-slider/ui-slider.js +175 -0
- package/dist/collection/components/ui-spinner/ui-spinner.css +39 -0
- package/dist/collection/components/ui-spinner/ui-spinner.js +52 -0
- package/dist/collection/components/ui-switch/ui-switch.css +47 -0
- package/dist/collection/components/ui-switch/ui-switch.js +98 -0
- package/dist/collection/components/ui-tabs/ui-tabs.css +38 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +99 -0
- package/dist/collection/components/ui-textarea/ui-textarea.css +42 -0
- package/dist/collection/components/ui-textarea/ui-textarea.js +191 -0
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.css +28 -0
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +90 -0
- package/dist/collection/components/ui-toast/ui-toast.css +81 -0
- package/dist/collection/components/ui-toast/ui-toast.js +234 -0
- package/dist/collection/components/ui-toaster/ui-toaster.css +15 -0
- package/dist/collection/components/ui-toaster/ui-toaster.js +67 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +37 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +143 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-Bz9HyboB.js +1 -0
- package/dist/components/p-C8ePpPG3.js +1 -0
- package/dist/components/p-CyBRmmbs.js +1 -0
- package/dist/components/ui-accordion-item.d.ts +11 -0
- package/dist/components/ui-accordion-item.js +1 -0
- package/dist/components/ui-accordion.d.ts +11 -0
- package/dist/components/ui-accordion.js +1 -0
- package/dist/components/ui-avatar.d.ts +11 -0
- package/dist/components/ui-avatar.js +1 -0
- package/dist/components/ui-badge.d.ts +11 -0
- package/dist/components/ui-badge.js +1 -0
- package/dist/components/ui-button.d.ts +11 -0
- package/dist/components/ui-button.js +1 -0
- package/dist/components/ui-card.d.ts +11 -0
- package/dist/components/ui-card.js +1 -0
- package/dist/components/ui-checkbox.d.ts +11 -0
- package/dist/components/ui-checkbox.js +1 -0
- package/dist/components/ui-dialog.d.ts +11 -0
- package/dist/components/ui-dialog.js +1 -0
- package/dist/components/ui-drawer.d.ts +11 -0
- package/dist/components/ui-drawer.js +1 -0
- package/dist/components/ui-dropdown-item.d.ts +11 -0
- package/dist/components/ui-dropdown-item.js +1 -0
- package/dist/components/ui-dropdown-menu.d.ts +11 -0
- package/dist/components/ui-dropdown-menu.js +1 -0
- package/dist/components/ui-field.d.ts +11 -0
- package/dist/components/ui-field.js +1 -0
- package/dist/components/ui-input.d.ts +11 -0
- package/dist/components/ui-input.js +1 -0
- package/dist/components/ui-label.d.ts +11 -0
- package/dist/components/ui-label.js +1 -0
- package/dist/components/ui-loading-overlay.d.ts +11 -0
- package/dist/components/ui-loading-overlay.js +1 -0
- package/dist/components/ui-popover.d.ts +11 -0
- package/dist/components/ui-popover.js +1 -0
- package/dist/components/ui-progress.d.ts +11 -0
- package/dist/components/ui-progress.js +1 -0
- package/dist/components/ui-radio-group.d.ts +11 -0
- package/dist/components/ui-radio-group.js +1 -0
- package/dist/components/ui-reveal.d.ts +11 -0
- package/dist/components/ui-reveal.js +1 -0
- package/dist/components/ui-scroll-progress.d.ts +11 -0
- package/dist/components/ui-scroll-progress.js +1 -0
- package/dist/components/ui-section.d.ts +11 -0
- package/dist/components/ui-section.js +1 -0
- package/dist/components/ui-select.d.ts +11 -0
- package/dist/components/ui-select.js +1 -0
- package/dist/components/ui-separator.d.ts +11 -0
- package/dist/components/ui-separator.js +1 -0
- package/dist/components/ui-skeleton.d.ts +11 -0
- package/dist/components/ui-skeleton.js +1 -0
- package/dist/components/ui-slider.d.ts +11 -0
- package/dist/components/ui-slider.js +1 -0
- package/dist/components/ui-spinner.d.ts +11 -0
- package/dist/components/ui-spinner.js +1 -0
- package/dist/components/ui-switch.d.ts +11 -0
- package/dist/components/ui-switch.js +1 -0
- package/dist/components/ui-tabs.d.ts +11 -0
- package/dist/components/ui-tabs.js +1 -0
- package/dist/components/ui-textarea.d.ts +11 -0
- package/dist/components/ui-textarea.js +1 -0
- package/dist/components/ui-theme-toggle.d.ts +11 -0
- package/dist/components/ui-theme-toggle.js +1 -0
- package/dist/components/ui-toast.d.ts +11 -0
- package/dist/components/ui-toast.js +1 -0
- package/dist/components/ui-toaster.d.ts +11 -0
- package/dist/components/ui-toaster.js +1 -0
- package/dist/components/ui-tooltip.d.ts +11 -0
- package/dist/components/ui-tooltip.js +1 -0
- package/dist/esm/floating-ui.dom-CyBRmmbs.js +1536 -0
- package/dist/esm/index-DYwlrXg_.js +1718 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/ui-accordion-item.entry.js +25 -0
- package/dist/esm/ui-accordion.entry.js +15 -0
- package/dist/esm/ui-avatar.entry.js +17 -0
- package/dist/esm/ui-badge.entry.js +17 -0
- package/dist/esm/ui-button.entry.js +29 -0
- package/dist/esm/ui-card.entry.js +15 -0
- package/dist/esm/ui-checkbox.entry.js +32 -0
- package/dist/esm/ui-dialog.entry.js +55 -0
- package/dist/esm/ui-drawer.entry.js +57 -0
- package/dist/esm/ui-dropdown-item.entry.js +25 -0
- package/dist/esm/ui-dropdown-menu.entry.js +95 -0
- package/dist/esm/ui-field.entry.js +17 -0
- package/dist/esm/ui-input.entry.js +33 -0
- package/dist/esm/ui-label.entry.js +15 -0
- package/dist/esm/ui-loading-overlay.entry.js +22 -0
- package/dist/esm/ui-popover.entry.js +92 -0
- package/dist/esm/ui-progress.entry.js +31 -0
- package/dist/esm/ui-radio-group.entry.js +47 -0
- package/dist/esm/ui-reveal.entry.js +39 -0
- package/dist/esm/ui-scroll-progress.entry.js +35 -0
- package/dist/esm/ui-section.entry.js +21 -0
- package/dist/esm/ui-select.entry.js +26 -0
- package/dist/esm/ui-separator.entry.js +17 -0
- package/dist/esm/ui-skeleton.entry.js +15 -0
- package/dist/esm/ui-slider.entry.js +35 -0
- package/dist/esm/ui-spinner.entry.js +17 -0
- package/dist/esm/ui-switch.entry.js +32 -0
- package/dist/esm/ui-tabs.entry.js +29 -0
- package/dist/esm/ui-textarea.entry.js +33 -0
- package/dist/esm/ui-theme-toggle.entry.js +63 -0
- package/dist/esm/ui-toast.entry.js +65 -0
- package/dist/esm/ui-toaster.entry.js +27 -0
- package/dist/esm/ui-tooltip.entry.js +62 -0
- package/dist/esm/uikit.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/ui-accordion/ui-accordion.d.ts +3 -0
- package/dist/types/components/ui-accordion-item/ui-accordion-item.d.ts +11 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +9 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +6 -0
- package/dist/types/components/ui-button/ui-button.d.ts +15 -0
- package/dist/types/components/ui-card/ui-card.d.ts +3 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +16 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +18 -0
- package/dist/types/components/ui-drawer/ui-drawer.d.ts +20 -0
- package/dist/types/components/ui-dropdown-item/ui-dropdown-item.d.ts +10 -0
- package/dist/types/components/ui-dropdown-menu/ui-dropdown-menu.d.ts +28 -0
- package/dist/types/components/ui-field/ui-field.d.ts +13 -0
- package/dist/types/components/ui-input/ui-input.d.ts +22 -0
- package/dist/types/components/ui-label/ui-label.d.ts +3 -0
- package/dist/types/components/ui-loading-overlay/ui-loading-overlay.d.ts +15 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +27 -0
- package/dist/types/components/ui-progress/ui-progress.d.ts +11 -0
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +20 -0
- package/dist/types/components/ui-reveal/ui-reveal.d.ts +11 -0
- package/dist/types/components/ui-scroll-progress/ui-scroll-progress.d.ts +8 -0
- package/dist/types/components/ui-section/ui-section.d.ts +9 -0
- package/dist/types/components/ui-select/ui-select.d.ts +21 -0
- package/dist/types/components/ui-separator/ui-separator.d.ts +6 -0
- package/dist/types/components/ui-skeleton/ui-skeleton.d.ts +3 -0
- package/dist/types/components/ui-slider/ui-slider.d.ts +20 -0
- package/dist/types/components/ui-spinner/ui-spinner.d.ts +6 -0
- package/dist/types/components/ui-switch/ui-switch.d.ts +12 -0
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +15 -0
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +22 -0
- package/dist/types/components/ui-theme-toggle/ui-theme-toggle.d.ts +13 -0
- package/dist/types/components/ui-toast/ui-toast.d.ts +28 -0
- package/dist/types/components/ui-toaster/ui-toaster.d.ts +19 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +21 -0
- package/dist/types/components.d.ts +1727 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/dist/uikit/index.esm.js +0 -0
- package/dist/uikit/p-06d6d907.entry.js +1 -0
- package/dist/uikit/p-0fb4949b.entry.js +1 -0
- package/dist/uikit/p-162302d1.entry.js +1 -0
- package/dist/uikit/p-19b81437.entry.js +1 -0
- package/dist/uikit/p-24edfe3e.entry.js +1 -0
- package/dist/uikit/p-3d30bc7a.entry.js +1 -0
- package/dist/uikit/p-4382718f.entry.js +1 -0
- package/dist/uikit/p-4a1abc1c.entry.js +1 -0
- package/dist/uikit/p-57058c30.entry.js +1 -0
- package/dist/uikit/p-5df32809.entry.js +1 -0
- package/dist/uikit/p-5ea42ee5.entry.js +1 -0
- package/dist/uikit/p-629c1728.entry.js +1 -0
- package/dist/uikit/p-76f0f79f.entry.js +1 -0
- package/dist/uikit/p-83159bfc.entry.js +1 -0
- package/dist/uikit/p-8bcd423c.entry.js +1 -0
- package/dist/uikit/p-8cebbe65.entry.js +1 -0
- package/dist/uikit/p-90d49509.entry.js +1 -0
- package/dist/uikit/p-94fb298e.entry.js +1 -0
- package/dist/uikit/p-9aa557d1.entry.js +1 -0
- package/dist/uikit/p-9c57cf57.entry.js +1 -0
- package/dist/uikit/p-9d784b04.entry.js +1 -0
- package/dist/uikit/p-9e7b81ef.entry.js +1 -0
- package/dist/uikit/p-9f7c6ca8.entry.js +1 -0
- package/dist/uikit/p-CyBRmmbs.js +1 -0
- package/dist/uikit/p-DYwlrXg_.js +2 -0
- package/dist/uikit/p-a7be1c69.entry.js +1 -0
- package/dist/uikit/p-b30aa6a6.entry.js +1 -0
- package/dist/uikit/p-b61e3df4.entry.js +1 -0
- package/dist/uikit/p-c72ed105.entry.js +1 -0
- package/dist/uikit/p-cb2adfb7.entry.js +1 -0
- package/dist/uikit/p-cf10ca3b.entry.js +1 -0
- package/dist/uikit/p-e410c789.entry.js +1 -0
- package/dist/uikit/p-f7402442.entry.js +1 -0
- package/dist/uikit/p-fd05c146.entry.js +1 -0
- package/dist/uikit/p-fd1648bf.entry.js +1 -0
- package/dist/uikit/uikit.css +6 -0
- package/dist/uikit/uikit.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +48 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiSwitch {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Estado ligado/desligado. */
|
|
5
|
+
this.checked = false;
|
|
6
|
+
/** Desabilita o controle. */
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
this.toggle = () => {
|
|
9
|
+
if (this.disabled)
|
|
10
|
+
return;
|
|
11
|
+
this.checked = !this.checked;
|
|
12
|
+
this.uiChange.emit(this.checked);
|
|
13
|
+
};
|
|
14
|
+
this.onKeyDown = (event) => {
|
|
15
|
+
if (event.key === " " || event.key === "Enter") {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
this.toggle();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, { key: '495f30df67c0277471c4d01920f5608700943132' }, h("button", { key: '8327f2d141877994b6ddd3ba8b474e816cb2f949', class: "switch", type: "button", role: "switch", "aria-checked": this.checked ? "true" : "false", disabled: this.disabled, onClick: this.toggle, onKeyDown: this.onKeyDown }, h("span", { key: 'e91d3ffd7b8fdfb1a64f96746c5a396ecaecb882', class: "thumb" }))));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "ui-switch"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["ui-switch.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get styleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["ui-switch.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get properties() {
|
|
37
|
+
return {
|
|
38
|
+
"checked": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"mutable": true,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "boolean",
|
|
43
|
+
"resolved": "boolean",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": "Estado ligado/desligado."
|
|
51
|
+
},
|
|
52
|
+
"getter": false,
|
|
53
|
+
"setter": false,
|
|
54
|
+
"reflect": true,
|
|
55
|
+
"attribute": "checked",
|
|
56
|
+
"defaultValue": "false"
|
|
57
|
+
},
|
|
58
|
+
"disabled": {
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "boolean",
|
|
63
|
+
"resolved": "boolean",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "Desabilita o controle."
|
|
71
|
+
},
|
|
72
|
+
"getter": false,
|
|
73
|
+
"setter": false,
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"attribute": "disabled",
|
|
76
|
+
"defaultValue": "false"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get events() {
|
|
81
|
+
return [{
|
|
82
|
+
"method": "uiChange",
|
|
83
|
+
"name": "uiChange",
|
|
84
|
+
"bubbles": true,
|
|
85
|
+
"cancelable": true,
|
|
86
|
+
"composed": true,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "Emitido quando o estado muda."
|
|
90
|
+
},
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "boolean",
|
|
93
|
+
"resolved": "boolean",
|
|
94
|
+
"references": {}
|
|
95
|
+
}
|
|
96
|
+
}];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-family: var(--ui-font-sans);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tablist {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
gap: 0.25rem;
|
|
9
|
+
padding: 0.25rem;
|
|
10
|
+
border: 1px solid var(--ui-border);
|
|
11
|
+
border-radius: var(--ui-radius-full);
|
|
12
|
+
background: var(--ui-chip);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tab {
|
|
16
|
+
appearance: none;
|
|
17
|
+
border: none;
|
|
18
|
+
padding: 0.375rem 0.875rem;
|
|
19
|
+
border-radius: var(--ui-radius-full);
|
|
20
|
+
background: transparent;
|
|
21
|
+
color: var(--ui-text-muted);
|
|
22
|
+
font: inherit;
|
|
23
|
+
font-size: 0.875rem;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
outline: none;
|
|
27
|
+
transition: background var(--ui-duration) var(--ui-ease),
|
|
28
|
+
color var(--ui-duration) var(--ui-ease);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tab:focus-visible {
|
|
32
|
+
box-shadow: 0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tab.active {
|
|
36
|
+
background: var(--ui-panel-strong);
|
|
37
|
+
color: var(--ui-foreground);
|
|
38
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiTabs {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Valor da aba ativa. */
|
|
5
|
+
this.value = "";
|
|
6
|
+
/** Lista de abas. */
|
|
7
|
+
this.items = [];
|
|
8
|
+
this.select = (value) => {
|
|
9
|
+
if (value === this.value)
|
|
10
|
+
return;
|
|
11
|
+
this.value = value;
|
|
12
|
+
this.uiChange.emit(value);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { key: '8828dc9385a8c206a751e39fda9869116dda3001' }, h("div", { key: '8e13dc53f1c03da5a52adb8ec86da91c78c502b2', class: "tablist", role: "tablist" }, this.items.map((item) => {
|
|
17
|
+
const active = item.value === this.value;
|
|
18
|
+
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));
|
|
19
|
+
})), h("slot", { key: '1cd08dfe5ae2e2b6bf55eb90cb55f2c757c5589f', name: this.value })));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "ui-tabs"; }
|
|
22
|
+
static get encapsulation() { return "shadow"; }
|
|
23
|
+
static get originalStyleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["ui-tabs.css"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get styleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["ui-tabs.css"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get properties() {
|
|
34
|
+
return {
|
|
35
|
+
"value": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"mutable": true,
|
|
38
|
+
"complexType": {
|
|
39
|
+
"original": "string",
|
|
40
|
+
"resolved": "string",
|
|
41
|
+
"references": {}
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": "Valor da aba ativa."
|
|
48
|
+
},
|
|
49
|
+
"getter": false,
|
|
50
|
+
"setter": false,
|
|
51
|
+
"reflect": true,
|
|
52
|
+
"attribute": "value",
|
|
53
|
+
"defaultValue": "\"\""
|
|
54
|
+
},
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "unknown",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "UiTabItem[]",
|
|
60
|
+
"resolved": "UiTabItem[]",
|
|
61
|
+
"references": {
|
|
62
|
+
"UiTabItem": {
|
|
63
|
+
"location": "local",
|
|
64
|
+
"path": "/Users/andersonespindola/.ghq/github.com/andersonflima/ui/packages/core/src/components/ui-tabs/ui-tabs.tsx",
|
|
65
|
+
"id": "src/components/ui-tabs/ui-tabs.tsx::UiTabItem"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": "Lista de abas."
|
|
74
|
+
},
|
|
75
|
+
"getter": false,
|
|
76
|
+
"setter": false,
|
|
77
|
+
"defaultValue": "[]"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
static get events() {
|
|
82
|
+
return [{
|
|
83
|
+
"method": "uiChange",
|
|
84
|
+
"name": "uiChange",
|
|
85
|
+
"bubbles": true,
|
|
86
|
+
"cancelable": true,
|
|
87
|
+
"composed": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Emitido quando a aba ativa muda."
|
|
91
|
+
},
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "string",
|
|
94
|
+
"resolved": "string",
|
|
95
|
+
"references": {}
|
|
96
|
+
}
|
|
97
|
+
}];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.textarea {
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-height: 7rem;
|
|
8
|
+
padding: 0.75rem 1rem;
|
|
9
|
+
border: 1px solid var(--ui-border);
|
|
10
|
+
border-radius: var(--ui-radius-sm);
|
|
11
|
+
background: var(--ui-panel);
|
|
12
|
+
color: var(--ui-foreground);
|
|
13
|
+
font-family: var(--ui-font-sans);
|
|
14
|
+
font-size: 0.875rem;
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
outline: none;
|
|
17
|
+
backdrop-filter: blur(22px);
|
|
18
|
+
transition: all var(--ui-duration) var(--ui-ease);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
resize: vertical;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.textarea::placeholder {
|
|
24
|
+
color: var(--ui-text-faint);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.textarea:focus-visible {
|
|
28
|
+
border-color: var(--ui-accent);
|
|
29
|
+
box-shadow: 0 0 0 2px var(--ui-ring);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.textarea:disabled {
|
|
33
|
+
opacity: 0.5;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.textarea.invalid {
|
|
38
|
+
border-color: var(--ui-danger);
|
|
39
|
+
}
|
|
40
|
+
.textarea.invalid:focus-visible {
|
|
41
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-danger) 40%, transparent);
|
|
42
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiTextarea {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Valor do campo. */
|
|
5
|
+
this.value = "";
|
|
6
|
+
/** Desabilita o campo. */
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
/** Marca o campo como inválido (estilo + aria-invalid). */
|
|
9
|
+
this.invalid = false;
|
|
10
|
+
/** Número de linhas visíveis. */
|
|
11
|
+
this.rows = 4;
|
|
12
|
+
this.onInput = (event) => {
|
|
13
|
+
const target = event.target;
|
|
14
|
+
this.value = target.value;
|
|
15
|
+
this.uiInput.emit(target.value);
|
|
16
|
+
};
|
|
17
|
+
this.onChange = (event) => {
|
|
18
|
+
this.uiChange.emit(event.target.value);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, { key: '9dfb606e8b193b4ce3cc9f085454ff849892e838' }, h("textarea", { key: '0f4aa4078cae931c3e246613d51645162673b7d5', 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)));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "ui-textarea"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["ui-textarea.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get styleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["ui-textarea.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get properties() {
|
|
37
|
+
return {
|
|
38
|
+
"value": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"mutable": true,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "string",
|
|
43
|
+
"resolved": "string",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": "Valor do campo."
|
|
51
|
+
},
|
|
52
|
+
"getter": false,
|
|
53
|
+
"setter": false,
|
|
54
|
+
"reflect": false,
|
|
55
|
+
"attribute": "value",
|
|
56
|
+
"defaultValue": "\"\""
|
|
57
|
+
},
|
|
58
|
+
"placeholder": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string | undefined",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": true,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "Placeholder."
|
|
71
|
+
},
|
|
72
|
+
"getter": false,
|
|
73
|
+
"setter": false,
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"attribute": "placeholder"
|
|
76
|
+
},
|
|
77
|
+
"disabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "Desabilita o campo."
|
|
90
|
+
},
|
|
91
|
+
"getter": false,
|
|
92
|
+
"setter": false,
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"attribute": "disabled",
|
|
95
|
+
"defaultValue": "false"
|
|
96
|
+
},
|
|
97
|
+
"invalid": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "boolean",
|
|
102
|
+
"resolved": "boolean",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "Marca o campo como inv\u00E1lido (estilo + aria-invalid)."
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"attribute": "invalid",
|
|
115
|
+
"defaultValue": "false"
|
|
116
|
+
},
|
|
117
|
+
"name": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string | undefined",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": true,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Nome do campo."
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"attribute": "name"
|
|
135
|
+
},
|
|
136
|
+
"rows": {
|
|
137
|
+
"type": "number",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "number",
|
|
141
|
+
"resolved": "number",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "N\u00FAmero de linhas vis\u00EDveis."
|
|
149
|
+
},
|
|
150
|
+
"getter": false,
|
|
151
|
+
"setter": false,
|
|
152
|
+
"reflect": false,
|
|
153
|
+
"attribute": "rows",
|
|
154
|
+
"defaultValue": "4"
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
static get events() {
|
|
159
|
+
return [{
|
|
160
|
+
"method": "uiInput",
|
|
161
|
+
"name": "uiInput",
|
|
162
|
+
"bubbles": true,
|
|
163
|
+
"cancelable": true,
|
|
164
|
+
"composed": true,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Emitido a cada digita\u00E7\u00E3o."
|
|
168
|
+
},
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "string",
|
|
171
|
+
"resolved": "string",
|
|
172
|
+
"references": {}
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
"method": "uiChange",
|
|
176
|
+
"name": "uiChange",
|
|
177
|
+
"bubbles": true,
|
|
178
|
+
"cancelable": true,
|
|
179
|
+
"composed": true,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Emitido ao confirmar (change)."
|
|
183
|
+
},
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "string",
|
|
186
|
+
"resolved": "string",
|
|
187
|
+
"references": {}
|
|
188
|
+
}
|
|
189
|
+
}];
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.toggle {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 2.5rem;
|
|
10
|
+
height: 2.5rem;
|
|
11
|
+
padding: 0;
|
|
12
|
+
border: 1px solid var(--ui-border);
|
|
13
|
+
border-radius: var(--ui-radius-full);
|
|
14
|
+
background: var(--ui-chip);
|
|
15
|
+
color: var(--ui-foreground);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
outline: none;
|
|
18
|
+
transition: background var(--ui-duration) var(--ui-ease),
|
|
19
|
+
color var(--ui-duration) var(--ui-ease);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.toggle:focus-visible {
|
|
23
|
+
box-shadow: 0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.toggle:hover {
|
|
27
|
+
color: var(--ui-accent);
|
|
28
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
const STORAGE_KEY = "ui-theme";
|
|
3
|
+
export class UiThemeToggle {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** Indica se o tema escuro está ativo. */
|
|
6
|
+
this.isDark = false;
|
|
7
|
+
this.toggle = () => {
|
|
8
|
+
this.isDark = !this.isDark;
|
|
9
|
+
if (typeof window !== "undefined") {
|
|
10
|
+
try {
|
|
11
|
+
window.localStorage.setItem(STORAGE_KEY, this.isDark ? "dark" : "light");
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
// Persistência indisponível: segue apenas em memória.
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
this.applyTheme();
|
|
18
|
+
this.uiThemeChange.emit(this.isDark ? "dark" : "light");
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
this.isDark = this.resolveInitialTheme();
|
|
23
|
+
this.applyTheme();
|
|
24
|
+
}
|
|
25
|
+
resolveInitialTheme() {
|
|
26
|
+
if (typeof window === "undefined")
|
|
27
|
+
return false;
|
|
28
|
+
try {
|
|
29
|
+
const stored = window.localStorage.getItem(STORAGE_KEY);
|
|
30
|
+
if (stored === "dark")
|
|
31
|
+
return true;
|
|
32
|
+
if (stored === "light")
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// localStorage indisponível: usa preferência do sistema.
|
|
37
|
+
}
|
|
38
|
+
return (typeof window.matchMedia === "function" &&
|
|
39
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
40
|
+
}
|
|
41
|
+
applyTheme() {
|
|
42
|
+
if (typeof document === "undefined")
|
|
43
|
+
return;
|
|
44
|
+
document.documentElement.classList.toggle("dark", this.isDark);
|
|
45
|
+
}
|
|
46
|
+
renderIcon() {
|
|
47
|
+
if (this.isDark) {
|
|
48
|
+
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("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })));
|
|
49
|
+
}
|
|
50
|
+
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" })));
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (h(Host, { key: 'f4bbcb8298cf3dbc50c31a816e97b32b45a115a4' }, h("button", { key: 'f86adcf499252f07d2aaae4c6b07cf0d4bcb4c01', 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())));
|
|
54
|
+
}
|
|
55
|
+
static get is() { return "ui-theme-toggle"; }
|
|
56
|
+
static get encapsulation() { return "shadow"; }
|
|
57
|
+
static get originalStyleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["ui-theme-toggle.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get styleUrls() {
|
|
63
|
+
return {
|
|
64
|
+
"$": ["ui-theme-toggle.css"]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get states() {
|
|
68
|
+
return {
|
|
69
|
+
"isDark": {}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static get events() {
|
|
73
|
+
return [{
|
|
74
|
+
"method": "uiThemeChange",
|
|
75
|
+
"name": "uiThemeChange",
|
|
76
|
+
"bubbles": true,
|
|
77
|
+
"cancelable": true,
|
|
78
|
+
"composed": true,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "Emitido quando o tema \u00E9 alterado."
|
|
82
|
+
},
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "\"light\" | \"dark\"",
|
|
85
|
+
"resolved": "\"dark\" | \"light\"",
|
|
86
|
+
"references": {}
|
|
87
|
+
}
|
|
88
|
+
}];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.toast {
|
|
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-accent);
|
|
12
|
+
border-radius: var(--ui-radius);
|
|
13
|
+
background: var(--ui-panel-strong);
|
|
14
|
+
backdrop-filter: blur(22px);
|
|
15
|
+
box-shadow: var(--ui-shadow-lg);
|
|
16
|
+
font-family: var(--ui-font-sans);
|
|
17
|
+
animation: ui-toast-pop var(--ui-duration) var(--ui-ease);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.variant-default {
|
|
21
|
+
border-left-color: var(--ui-accent);
|
|
22
|
+
}
|
|
23
|
+
.variant-success {
|
|
24
|
+
border-left-color: var(--ui-success);
|
|
25
|
+
}
|
|
26
|
+
.variant-warning {
|
|
27
|
+
border-left-color: var(--ui-warning);
|
|
28
|
+
}
|
|
29
|
+
.variant-danger {
|
|
30
|
+
border-left-color: var(--ui-danger);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.body {
|
|
34
|
+
flex: 1;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: 0.25rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.heading {
|
|
42
|
+
margin: 0;
|
|
43
|
+
font-size: 0.875rem;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
color: var(--ui-foreground);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.description {
|
|
49
|
+
margin: 0;
|
|
50
|
+
font-size: 0.8125rem;
|
|
51
|
+
color: var(--ui-text-muted);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.close {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
padding: 0.125rem;
|
|
60
|
+
border: none;
|
|
61
|
+
background: transparent;
|
|
62
|
+
color: var(--ui-text-muted);
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
border-radius: var(--ui-radius-sm);
|
|
65
|
+
transition: color var(--ui-duration) var(--ui-ease);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.close:hover {
|
|
69
|
+
color: var(--ui-foreground);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes ui-toast-pop {
|
|
73
|
+
from {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
transform: translateY(0.5rem) scale(0.98);
|
|
76
|
+
}
|
|
77
|
+
to {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
transform: translateY(0) scale(1);
|
|
80
|
+
}
|
|
81
|
+
}
|