@deepfuture/dui-components 0.0.1
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/accordion/accordion-context.d.ts +15 -0
- package/accordion/accordion-context.js +3 -0
- package/accordion/accordion-item.d.ts +22 -0
- package/accordion/accordion-item.js +254 -0
- package/accordion/accordion.d.ts +20 -0
- package/accordion/accordion.js +185 -0
- package/accordion/index.d.ts +3 -0
- package/accordion/index.js +2 -0
- package/accordion/register.d.ts +1 -0
- package/accordion/register.js +8 -0
- package/alert-dialog/alert-dialog-close.d.ts +15 -0
- package/alert-dialog/alert-dialog-close.js +35 -0
- package/alert-dialog/alert-dialog-context.d.ts +13 -0
- package/alert-dialog/alert-dialog-context.js +3 -0
- package/alert-dialog/alert-dialog-popup.d.ts +34 -0
- package/alert-dialog/alert-dialog-popup.js +260 -0
- package/alert-dialog/alert-dialog-trigger.d.ts +15 -0
- package/alert-dialog/alert-dialog-trigger.js +52 -0
- package/alert-dialog/alert-dialog.d.ts +30 -0
- package/alert-dialog/alert-dialog.js +97 -0
- package/alert-dialog/index.d.ts +6 -0
- package/alert-dialog/index.js +4 -0
- package/alert-dialog/register.d.ts +1 -0
- package/alert-dialog/register.js +16 -0
- package/all.d.ts +86 -0
- package/all.js +191 -0
- package/avatar/avatar.d.ts +41 -0
- package/avatar/avatar.js +188 -0
- package/avatar/index.d.ts +2 -0
- package/avatar/index.js +1 -0
- package/avatar/register.d.ts +1 -0
- package/avatar/register.js +4 -0
- package/badge/badge.d.ts +14 -0
- package/badge/badge.js +43 -0
- package/badge/index.d.ts +2 -0
- package/badge/index.js +1 -0
- package/badge/register.d.ts +1 -0
- package/badge/register.js +4 -0
- package/breadcrumb/breadcrumb-ellipsis.d.ts +14 -0
- package/breadcrumb/breadcrumb-ellipsis.js +39 -0
- package/breadcrumb/breadcrumb-item.d.ts +13 -0
- package/breadcrumb/breadcrumb-item.js +31 -0
- package/breadcrumb/breadcrumb-link.d.ts +14 -0
- package/breadcrumb/breadcrumb-link.js +32 -0
- package/breadcrumb/breadcrumb-page.d.ts +13 -0
- package/breadcrumb/breadcrumb-page.js +36 -0
- package/breadcrumb/breadcrumb-separator.d.ts +14 -0
- package/breadcrumb/breadcrumb-separator.js +36 -0
- package/breadcrumb/breadcrumb.d.ts +14 -0
- package/breadcrumb/breadcrumb.js +38 -0
- package/breadcrumb/index.d.ts +6 -0
- package/breadcrumb/index.js +6 -0
- package/breadcrumb/register.d.ts +1 -0
- package/breadcrumb/register.js +14 -0
- package/button/button.d.ts +38 -0
- package/button/button.js +143 -0
- package/button/index.d.ts +2 -0
- package/button/index.js +1 -0
- package/button/register.d.ts +1 -0
- package/button/register.js +4 -0
- package/calendar/calendar.d.ts +33 -0
- package/calendar/calendar.js +428 -0
- package/calendar/index.d.ts +1 -0
- package/calendar/index.js +1 -0
- package/calendar/register.d.ts +1 -0
- package/calendar/register.js +4 -0
- package/center/center.d.ts +14 -0
- package/center/center.js +37 -0
- package/center/index.d.ts +1 -0
- package/center/index.js +1 -0
- package/center/register.d.ts +1 -0
- package/center/register.js +4 -0
- package/checkbox/checkbox-group-context.d.ts +11 -0
- package/checkbox/checkbox-group-context.js +3 -0
- package/checkbox/checkbox-group.d.ts +34 -0
- package/checkbox/checkbox-group.js +128 -0
- package/checkbox/checkbox.d.ts +46 -0
- package/checkbox/checkbox.js +314 -0
- package/checkbox/index.d.ts +3 -0
- package/checkbox/index.js +2 -0
- package/checkbox/register.d.ts +1 -0
- package/checkbox/register.js +8 -0
- package/collapsible/collapsible.d.ts +22 -0
- package/collapsible/collapsible.js +227 -0
- package/collapsible/index.d.ts +1 -0
- package/collapsible/index.js +1 -0
- package/collapsible/register.d.ts +1 -0
- package/collapsible/register.js +4 -0
- package/combobox/combobox.d.ts +46 -0
- package/combobox/combobox.js +524 -0
- package/combobox/index.d.ts +2 -0
- package/combobox/index.js +1 -0
- package/combobox/register.d.ts +1 -0
- package/combobox/register.js +4 -0
- package/command/command-context.d.ts +30 -0
- package/command/command-context.js +3 -0
- package/command/command-empty.d.ts +10 -0
- package/command/command-empty.js +50 -0
- package/command/command-group.d.ts +15 -0
- package/command/command-group.js +79 -0
- package/command/command-input.d.ts +13 -0
- package/command/command-input.js +106 -0
- package/command/command-item.d.ts +20 -0
- package/command/command-item.js +175 -0
- package/command/command-list.d.ts +9 -0
- package/command/command-list.js +43 -0
- package/command/command-score.d.ts +6 -0
- package/command/command-score.js +31 -0
- package/command/command-separator.d.ts +7 -0
- package/command/command-separator.js +15 -0
- package/command/command-shortcut.d.ts +7 -0
- package/command/command-shortcut.js +16 -0
- package/command/command.d.ts +25 -0
- package/command/command.js +278 -0
- package/command/index.d.ts +10 -0
- package/command/index.js +9 -0
- package/command/register.d.ts +1 -0
- package/command/register.js +22 -0
- package/data-table/data-table.d.ts +59 -0
- package/data-table/data-table.js +416 -0
- package/data-table/index.d.ts +2 -0
- package/data-table/index.js +1 -0
- package/data-table/register.d.ts +1 -0
- package/data-table/register.js +4 -0
- package/dialog/dialog-close.d.ts +15 -0
- package/dialog/dialog-close.js +35 -0
- package/dialog/dialog-context.d.ts +13 -0
- package/dialog/dialog-context.js +3 -0
- package/dialog/dialog-popup.d.ts +36 -0
- package/dialog/dialog-popup.js +277 -0
- package/dialog/dialog-trigger.d.ts +15 -0
- package/dialog/dialog-trigger.js +52 -0
- package/dialog/dialog.d.ts +30 -0
- package/dialog/dialog.js +97 -0
- package/dialog/index.d.ts +6 -0
- package/dialog/index.js +4 -0
- package/dialog/register.d.ts +1 -0
- package/dialog/register.js +16 -0
- package/dropzone/dropzone.d.ts +74 -0
- package/dropzone/dropzone.js +357 -0
- package/dropzone/index.d.ts +2 -0
- package/dropzone/index.js +1 -0
- package/dropzone/register.d.ts +1 -0
- package/dropzone/register.js +4 -0
- package/field/field-context.d.ts +20 -0
- package/field/field-context.js +2 -0
- package/field/index.d.ts +2 -0
- package/field/index.js +1 -0
- package/global.d.ts +189 -0
- package/hstack/hstack.d.ts +25 -0
- package/hstack/hstack.js +141 -0
- package/hstack/index.d.ts +2 -0
- package/hstack/index.js +1 -0
- package/hstack/register.d.ts +1 -0
- package/hstack/register.js +4 -0
- package/icon/icon.d.ts +16 -0
- package/icon/icon.js +34 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.js +1 -0
- package/icon/register.d.ts +1 -0
- package/icon/register.js +4 -0
- package/input/index.d.ts +1 -0
- package/input/index.js +1 -0
- package/input/input.d.ts +47 -0
- package/input/input.js +205 -0
- package/input/register.d.ts +1 -0
- package/input/register.js +4 -0
- package/link/index.d.ts +1 -0
- package/link/index.js +1 -0
- package/link/link.d.ts +27 -0
- package/link/link.js +57 -0
- package/link/register.d.ts +1 -0
- package/link/register.js +4 -0
- package/menu/index.d.ts +2 -0
- package/menu/index.js +2 -0
- package/menu/menu-item.d.ts +17 -0
- package/menu/menu-item.js +62 -0
- package/menu/menu.d.ts +15 -0
- package/menu/menu.js +228 -0
- package/menu/register.d.ts +1 -0
- package/menu/register.js +8 -0
- package/menubar/index.d.ts +2 -0
- package/menubar/index.js +1 -0
- package/menubar/menubar-context.d.ts +9 -0
- package/menubar/menubar-context.js +2 -0
- package/menubar/menubar.d.ts +19 -0
- package/menubar/menubar.js +130 -0
- package/menubar/register.d.ts +1 -0
- package/menubar/register.js +4 -0
- package/number-field/index.d.ts +1 -0
- package/number-field/index.js +1 -0
- package/number-field/number-field.d.ts +34 -0
- package/number-field/number-field.js +326 -0
- package/number-field/register.d.ts +1 -0
- package/number-field/register.js +4 -0
- package/package.json +217 -0
- package/page-inset/index.d.ts +1 -0
- package/page-inset/index.js +1 -0
- package/page-inset/page-inset.d.ts +28 -0
- package/page-inset/page-inset.js +103 -0
- package/page-inset/register.d.ts +1 -0
- package/page-inset/register.js +4 -0
- package/popover/index.d.ts +6 -0
- package/popover/index.js +4 -0
- package/popover/popover-close.d.ts +13 -0
- package/popover/popover-close.js +33 -0
- package/popover/popover-context.d.ts +17 -0
- package/popover/popover-context.js +3 -0
- package/popover/popover-popup.d.ts +20 -0
- package/popover/popover-popup.js +176 -0
- package/popover/popover-trigger.d.ts +13 -0
- package/popover/popover-trigger.js +57 -0
- package/popover/popover.d.ts +30 -0
- package/popover/popover.js +140 -0
- package/popover/register.d.ts +1 -0
- package/popover/register.js +16 -0
- package/portal/index.d.ts +2 -0
- package/portal/index.js +1 -0
- package/portal/portal.d.ts +29 -0
- package/portal/portal.js +115 -0
- package/portal/register.d.ts +1 -0
- package/portal/register.js +4 -0
- package/preview-card/index.d.ts +5 -0
- package/preview-card/index.js +3 -0
- package/preview-card/preview-card-context.d.ts +16 -0
- package/preview-card/preview-card-context.js +3 -0
- package/preview-card/preview-card-popup.d.ts +16 -0
- package/preview-card/preview-card-popup.js +167 -0
- package/preview-card/preview-card-trigger.d.ts +13 -0
- package/preview-card/preview-card-trigger.js +75 -0
- package/preview-card/preview-card.d.ts +34 -0
- package/preview-card/preview-card.js +164 -0
- package/preview-card/register.d.ts +1 -0
- package/preview-card/register.js +12 -0
- package/progress/index.d.ts +1 -0
- package/progress/index.js +1 -0
- package/progress/progress.d.ts +19 -0
- package/progress/progress.js +94 -0
- package/progress/register.d.ts +1 -0
- package/progress/register.js +4 -0
- package/radio/index.d.ts +3 -0
- package/radio/index.js +2 -0
- package/radio/radio-group-context.d.ts +11 -0
- package/radio/radio-group-context.js +2 -0
- package/radio/radio-group.d.ts +37 -0
- package/radio/radio-group.js +135 -0
- package/radio/radio.d.ts +27 -0
- package/radio/radio.js +204 -0
- package/radio/register.d.ts +1 -0
- package/radio/register.js +8 -0
- package/scroll-area/index.d.ts +1 -0
- package/scroll-area/index.js +1 -0
- package/scroll-area/register.d.ts +1 -0
- package/scroll-area/register.js +4 -0
- package/scroll-area/scroll-area.d.ts +38 -0
- package/scroll-area/scroll-area.js +453 -0
- package/select/index.d.ts +2 -0
- package/select/index.js +1 -0
- package/select/register.d.ts +1 -0
- package/select/register.js +4 -0
- package/select/select.d.ts +36 -0
- package/select/select.js +404 -0
- package/separator/index.d.ts +1 -0
- package/separator/index.js +1 -0
- package/separator/register.d.ts +1 -0
- package/separator/register.js +4 -0
- package/separator/separator.d.ts +12 -0
- package/separator/separator.js +50 -0
- package/sidebar/index.d.ts +16 -0
- package/sidebar/index.js +13 -0
- package/sidebar/register.d.ts +1 -0
- package/sidebar/register.js +52 -0
- package/sidebar/sidebar-content.d.ts +14 -0
- package/sidebar/sidebar-content.js +30 -0
- package/sidebar/sidebar-context.d.ts +15 -0
- package/sidebar/sidebar-context.js +3 -0
- package/sidebar/sidebar-footer.d.ts +12 -0
- package/sidebar/sidebar-footer.js +21 -0
- package/sidebar/sidebar-group-label.d.ts +17 -0
- package/sidebar/sidebar-group-label.js +49 -0
- package/sidebar/sidebar-group.d.ts +15 -0
- package/sidebar/sidebar-group.js +29 -0
- package/sidebar/sidebar-header.d.ts +12 -0
- package/sidebar/sidebar-header.js +21 -0
- package/sidebar/sidebar-inset.d.ts +15 -0
- package/sidebar/sidebar-inset.js +29 -0
- package/sidebar/sidebar-menu-button.d.ts +31 -0
- package/sidebar/sidebar-menu-button.js +201 -0
- package/sidebar/sidebar-menu-item.d.ts +12 -0
- package/sidebar/sidebar-menu-item.js +20 -0
- package/sidebar/sidebar-menu.d.ts +14 -0
- package/sidebar/sidebar-menu.js +30 -0
- package/sidebar/sidebar-provider.d.ts +34 -0
- package/sidebar/sidebar-provider.js +157 -0
- package/sidebar/sidebar-separator.d.ts +12 -0
- package/sidebar/sidebar-separator.js +24 -0
- package/sidebar/sidebar-trigger.d.ts +16 -0
- package/sidebar/sidebar-trigger.js +50 -0
- package/sidebar/sidebar.d.ts +21 -0
- package/sidebar/sidebar.js +228 -0
- package/slider/index.d.ts +1 -0
- package/slider/index.js +1 -0
- package/slider/register.d.ts +1 -0
- package/slider/register.js +4 -0
- package/slider/slider.d.ts +37 -0
- package/slider/slider.js +268 -0
- package/spinner/index.d.ts +1 -0
- package/spinner/index.js +1 -0
- package/spinner/register.d.ts +1 -0
- package/spinner/register.js +4 -0
- package/spinner/spinner.d.ts +18 -0
- package/spinner/spinner.js +138 -0
- package/switch/index.d.ts +1 -0
- package/switch/index.js +1 -0
- package/switch/register.d.ts +1 -0
- package/switch/register.js +4 -0
- package/switch/switch.d.ts +29 -0
- package/switch/switch.js +201 -0
- package/tabs/index.d.ts +6 -0
- package/tabs/index.js +5 -0
- package/tabs/register.d.ts +1 -0
- package/tabs/register.js +10 -0
- package/tabs/tab.d.ts +16 -0
- package/tabs/tab.js +98 -0
- package/tabs/tabs-context.d.ts +8 -0
- package/tabs/tabs-context.js +2 -0
- package/tabs/tabs-indicator.d.ts +11 -0
- package/tabs/tabs-indicator.js +27 -0
- package/tabs/tabs-list.d.ts +17 -0
- package/tabs/tabs-list.js +85 -0
- package/tabs/tabs-panel.d.ts +18 -0
- package/tabs/tabs-panel.js +85 -0
- package/tabs/tabs.d.ts +24 -0
- package/tabs/tabs.js +111 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.js +1 -0
- package/textarea/register.d.ts +1 -0
- package/textarea/register.js +4 -0
- package/textarea/textarea.d.ts +37 -0
- package/textarea/textarea.js +170 -0
- package/toggle/index.d.ts +3 -0
- package/toggle/index.js +2 -0
- package/toggle/register.d.ts +1 -0
- package/toggle/register.js +8 -0
- package/toggle/toggle-group-context.d.ts +9 -0
- package/toggle/toggle-group-context.js +2 -0
- package/toggle/toggle-group.d.ts +27 -0
- package/toggle/toggle-group.js +163 -0
- package/toggle/toggle.d.ts +25 -0
- package/toggle/toggle.js +124 -0
- package/toolbar/index.d.ts +1 -0
- package/toolbar/index.js +1 -0
- package/toolbar/register.d.ts +1 -0
- package/toolbar/register.js +4 -0
- package/toolbar/toolbar.d.ts +15 -0
- package/toolbar/toolbar.js +89 -0
- package/tooltip/index.d.ts +5 -0
- package/tooltip/index.js +3 -0
- package/tooltip/register.d.ts +1 -0
- package/tooltip/register.js +12 -0
- package/tooltip/tooltip-context.d.ts +17 -0
- package/tooltip/tooltip-context.js +3 -0
- package/tooltip/tooltip-popup.d.ts +16 -0
- package/tooltip/tooltip-popup.js +162 -0
- package/tooltip/tooltip-trigger.d.ts +15 -0
- package/tooltip/tooltip-trigger.js +110 -0
- package/tooltip/tooltip.d.ts +36 -0
- package/tooltip/tooltip.js +176 -0
- package/trunc/index.d.ts +1 -0
- package/trunc/index.js +1 -0
- package/trunc/register.d.ts +1 -0
- package/trunc/register.js +4 -0
- package/trunc/trunc.d.ts +19 -0
- package/trunc/trunc.js +68 -0
- package/vstack/index.d.ts +1 -0
- package/vstack/index.js +1 -0
- package/vstack/register.d.ts +1 -0
- package/vstack/register.js +4 -0
- package/vstack/vstack.d.ts +17 -0
- package/vstack/vstack.js +83 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement, nothing } from "lit";
|
|
8
|
+
import { property } from "lit/decorators.js";
|
|
9
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
10
|
+
/** Structural styles only — layout CSS. */
|
|
11
|
+
const styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[part="track"] {
|
|
17
|
+
position: relative;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[part="indicator"] {
|
|
23
|
+
position: absolute;
|
|
24
|
+
inset-block: 0;
|
|
25
|
+
inset-inline-start: 0;
|
|
26
|
+
width: var(--progress-value, 0%);
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
/**
|
|
31
|
+
* `<dui-progress>` — A progress bar indicating completion status.
|
|
32
|
+
*
|
|
33
|
+
* Set `value` to a number for determinate progress, or leave `null` for indeterminate.
|
|
34
|
+
*
|
|
35
|
+
* @csspart root - The outer container.
|
|
36
|
+
* @csspart track - The progress track.
|
|
37
|
+
* @csspart indicator - The filled indicator.
|
|
38
|
+
*/
|
|
39
|
+
export class DuiProgress extends LitElement {
|
|
40
|
+
static { this.tagName = "dui-progress"; }
|
|
41
|
+
static { this.styles = [base, styles]; }
|
|
42
|
+
#value_accessor_storage = null;
|
|
43
|
+
get value() { return this.#value_accessor_storage; }
|
|
44
|
+
set value(value) { this.#value_accessor_storage = value; }
|
|
45
|
+
#min_accessor_storage = 0;
|
|
46
|
+
get min() { return this.#min_accessor_storage; }
|
|
47
|
+
set min(value) { this.#min_accessor_storage = value; }
|
|
48
|
+
#max_accessor_storage = 100;
|
|
49
|
+
get max() { return this.#max_accessor_storage; }
|
|
50
|
+
set max(value) { this.#max_accessor_storage = value; }
|
|
51
|
+
get #percent() {
|
|
52
|
+
if (this.value === null)
|
|
53
|
+
return 0;
|
|
54
|
+
const range = this.max - this.min;
|
|
55
|
+
if (range <= 0)
|
|
56
|
+
return 0;
|
|
57
|
+
return Math.max(0, Math.min(100, ((this.value - this.min) / range) * 100));
|
|
58
|
+
}
|
|
59
|
+
get #isIndeterminate() {
|
|
60
|
+
return this.value === null;
|
|
61
|
+
}
|
|
62
|
+
get #isComplete() {
|
|
63
|
+
return this.value !== null && this.value >= this.max;
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
const percent = this.#percent;
|
|
67
|
+
return html `
|
|
68
|
+
<div
|
|
69
|
+
part="root"
|
|
70
|
+
role="progressbar"
|
|
71
|
+
aria-valuenow="${this.value ?? nothing}"
|
|
72
|
+
aria-valuemin="${this.min}"
|
|
73
|
+
aria-valuemax="${this.max}"
|
|
74
|
+
?data-complete="${this.#isComplete}"
|
|
75
|
+
?data-progressing="${!this.#isIndeterminate && !this.#isComplete}"
|
|
76
|
+
?data-indeterminate="${this.#isIndeterminate}"
|
|
77
|
+
style="--progress-value: ${percent}%"
|
|
78
|
+
>
|
|
79
|
+
<div part="track">
|
|
80
|
+
<div part="indicator"></div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
__decorate([
|
|
87
|
+
property({ type: Number })
|
|
88
|
+
], DuiProgress.prototype, "value", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: Number })
|
|
91
|
+
], DuiProgress.prototype, "min", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Number })
|
|
94
|
+
], DuiProgress.prototype, "max", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/radio/index.d.ts
ADDED
package/radio/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type RadioGroupContext = {
|
|
2
|
+
readonly name: string | undefined;
|
|
3
|
+
readonly value: string | undefined;
|
|
4
|
+
readonly disabled: boolean;
|
|
5
|
+
readonly readOnly: boolean;
|
|
6
|
+
readonly required: boolean;
|
|
7
|
+
readonly select: (value: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const radioGroupContext: {
|
|
10
|
+
__context__: RadioGroupContext;
|
|
11
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/radio */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
export declare const valueChangeEvent: (detail: {
|
|
4
|
+
value: string;
|
|
5
|
+
}) => CustomEvent<{
|
|
6
|
+
value: string;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* `<dui-radio-group>` — Groups multiple radio buttons with shared state.
|
|
10
|
+
*
|
|
11
|
+
* Only one radio can be selected at a time within a group. Supports
|
|
12
|
+
* controlled and uncontrolled usage.
|
|
13
|
+
*
|
|
14
|
+
* @slot - Default slot for `<dui-radio>` children.
|
|
15
|
+
* @csspart root - The group container element.
|
|
16
|
+
* @fires value-change - Fired when the selected value changes. Detail: { value: string }
|
|
17
|
+
*/
|
|
18
|
+
export declare class DuiRadioGroup extends LitElement {
|
|
19
|
+
#private;
|
|
20
|
+
static tagName: "dui-radio-group";
|
|
21
|
+
static styles: import("lit").CSSResult[];
|
|
22
|
+
/** The name attribute for form submission. */
|
|
23
|
+
accessor name: string | undefined;
|
|
24
|
+
/** Selected value (controlled). */
|
|
25
|
+
accessor value: string | undefined;
|
|
26
|
+
/** Initial selected value for uncontrolled usage. */
|
|
27
|
+
accessor defaultValue: string | undefined;
|
|
28
|
+
/** Whether all radios in the group are disabled. */
|
|
29
|
+
accessor disabled: boolean;
|
|
30
|
+
/** Whether all radios in the group are read-only. */
|
|
31
|
+
accessor readOnly: boolean;
|
|
32
|
+
/** Whether a selection is required. */
|
|
33
|
+
accessor required: boolean;
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
willUpdate(): void;
|
|
36
|
+
render(): TemplateResult;
|
|
37
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/radio */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
import { css, html, LitElement } from "lit";
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
11
|
+
import { customEvent } from "@deepfuture/dui-core/event";
|
|
12
|
+
export const valueChangeEvent = customEvent("value-change", {
|
|
13
|
+
bubbles: true,
|
|
14
|
+
composed: true,
|
|
15
|
+
});
|
|
16
|
+
/** Structural styles only — layout CSS. */
|
|
17
|
+
const styles = css `
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[part="root"] {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: start;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[part="root"][data-disabled] {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
/**
|
|
33
|
+
* `<dui-radio-group>` — Groups multiple radio buttons with shared state.
|
|
34
|
+
*
|
|
35
|
+
* Only one radio can be selected at a time within a group. Supports
|
|
36
|
+
* controlled and uncontrolled usage.
|
|
37
|
+
*
|
|
38
|
+
* @slot - Default slot for `<dui-radio>` children.
|
|
39
|
+
* @csspart root - The group container element.
|
|
40
|
+
* @fires value-change - Fired when the selected value changes. Detail: { value: string }
|
|
41
|
+
*/
|
|
42
|
+
export class DuiRadioGroup extends LitElement {
|
|
43
|
+
static { this.tagName = "dui-radio-group"; }
|
|
44
|
+
static { this.styles = [base, styles]; }
|
|
45
|
+
#name_accessor_storage = undefined;
|
|
46
|
+
/** The name attribute for form submission. */
|
|
47
|
+
get name() { return this.#name_accessor_storage; }
|
|
48
|
+
set name(value) { this.#name_accessor_storage = value; }
|
|
49
|
+
#value_accessor_storage = undefined;
|
|
50
|
+
/** Selected value (controlled). */
|
|
51
|
+
get value() { return this.#value_accessor_storage; }
|
|
52
|
+
set value(value) { this.#value_accessor_storage = value; }
|
|
53
|
+
#defaultValue_accessor_storage = undefined;
|
|
54
|
+
/** Initial selected value for uncontrolled usage. */
|
|
55
|
+
get defaultValue() { return this.#defaultValue_accessor_storage; }
|
|
56
|
+
set defaultValue(value) { this.#defaultValue_accessor_storage = value; }
|
|
57
|
+
#disabled_accessor_storage = false;
|
|
58
|
+
/** Whether all radios in the group are disabled. */
|
|
59
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
60
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
61
|
+
#readOnly_accessor_storage = false;
|
|
62
|
+
/** Whether all radios in the group are read-only. */
|
|
63
|
+
get readOnly() { return this.#readOnly_accessor_storage; }
|
|
64
|
+
set readOnly(value) { this.#readOnly_accessor_storage = value; }
|
|
65
|
+
#required_accessor_storage = false;
|
|
66
|
+
/** Whether a selection is required. */
|
|
67
|
+
get required() { return this.#required_accessor_storage; }
|
|
68
|
+
set required(value) { this.#required_accessor_storage = value; }
|
|
69
|
+
#internalValue_accessor_storage = undefined;
|
|
70
|
+
get #internalValue() { return this.#internalValue_accessor_storage; }
|
|
71
|
+
set #internalValue(value) { this.#internalValue_accessor_storage = value; }
|
|
72
|
+
#getSelectedValue = () => this.value ?? this.#internalValue;
|
|
73
|
+
#select = (val) => {
|
|
74
|
+
if (this.disabled || this.readOnly)
|
|
75
|
+
return;
|
|
76
|
+
if (this.value === undefined) {
|
|
77
|
+
this.#internalValue = val;
|
|
78
|
+
}
|
|
79
|
+
this.dispatchEvent(valueChangeEvent({ value: val }));
|
|
80
|
+
};
|
|
81
|
+
#ctx_accessor_storage = this.#buildContext();
|
|
82
|
+
get #ctx() { return this.#ctx_accessor_storage; }
|
|
83
|
+
set #ctx(value) { this.#ctx_accessor_storage = value; }
|
|
84
|
+
#buildContext() {
|
|
85
|
+
return {
|
|
86
|
+
name: this.name,
|
|
87
|
+
value: this.#getSelectedValue(),
|
|
88
|
+
disabled: this.disabled,
|
|
89
|
+
readOnly: this.readOnly,
|
|
90
|
+
required: this.required,
|
|
91
|
+
select: this.#select,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
connectedCallback() {
|
|
95
|
+
super.connectedCallback();
|
|
96
|
+
if (this.value === undefined && this.defaultValue !== undefined) {
|
|
97
|
+
this.#internalValue = this.defaultValue;
|
|
98
|
+
}
|
|
99
|
+
this.#ctx = this.#buildContext();
|
|
100
|
+
}
|
|
101
|
+
willUpdate() {
|
|
102
|
+
this.#ctx = this.#buildContext();
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
return html `
|
|
106
|
+
<div
|
|
107
|
+
part="root"
|
|
108
|
+
role="radiogroup"
|
|
109
|
+
?data-disabled="${this.disabled}"
|
|
110
|
+
?data-readonly="${this.readOnly}"
|
|
111
|
+
?data-required="${this.required}"
|
|
112
|
+
>
|
|
113
|
+
<slot></slot>
|
|
114
|
+
</div>
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
__decorate([
|
|
119
|
+
property()
|
|
120
|
+
], DuiRadioGroup.prototype, "name", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
property()
|
|
123
|
+
], DuiRadioGroup.prototype, "value", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ attribute: "default-value" })
|
|
126
|
+
], DuiRadioGroup.prototype, "defaultValue", null);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: Boolean, reflect: true })
|
|
129
|
+
], DuiRadioGroup.prototype, "disabled", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
property({ type: Boolean, reflect: true, attribute: "read-only" })
|
|
132
|
+
], DuiRadioGroup.prototype, "readOnly", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
property({ type: Boolean, reflect: true })
|
|
135
|
+
], DuiRadioGroup.prototype, "required", null);
|
package/radio/radio.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/radio */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-radio>` — A radio button input.
|
|
5
|
+
*
|
|
6
|
+
* Must be used within a `<dui-radio-group>`. Only one radio can be
|
|
7
|
+
* selected at a time within a group.
|
|
8
|
+
*
|
|
9
|
+
* @slot - Label content.
|
|
10
|
+
* @csspart root - The radio container.
|
|
11
|
+
* @csspart indicator - The selected state indicator.
|
|
12
|
+
* @cssprop --radio-size - Size of the radio button.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DuiRadio extends LitElement {
|
|
15
|
+
#private;
|
|
16
|
+
static tagName: "dui-radio";
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
/** The value attribute for this radio option. */
|
|
19
|
+
accessor value: string;
|
|
20
|
+
/** Whether the radio is disabled. */
|
|
21
|
+
accessor disabled: boolean;
|
|
22
|
+
/** Whether the radio is read-only. */
|
|
23
|
+
accessor readOnly: boolean;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
render(): TemplateResult;
|
|
27
|
+
}
|
package/radio/radio.js
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/radio */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
import { css, html, LitElement, nothing } from "lit";
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { ContextConsumer } from "@lit/context";
|
|
11
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
12
|
+
import { radioGroupContext } from "./radio-group-context.js";
|
|
13
|
+
/** Structural styles only — layout CSS. */
|
|
14
|
+
const styles = css `
|
|
15
|
+
:host {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([disabled]) {
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[part="root"] {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
outline: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
border: none;
|
|
35
|
+
transition-property: background, border-color, box-shadow, filter, transform;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[part="root"][data-disabled] {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[part="root"][data-readonly] {
|
|
43
|
+
cursor: default;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[part="indicator"] {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[part="indicator"][data-unchecked] {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.hidden-input {
|
|
59
|
+
position: absolute;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
margin: 0;
|
|
63
|
+
width: 0;
|
|
64
|
+
height: 0;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
/**
|
|
68
|
+
* `<dui-radio>` — A radio button input.
|
|
69
|
+
*
|
|
70
|
+
* Must be used within a `<dui-radio-group>`. Only one radio can be
|
|
71
|
+
* selected at a time within a group.
|
|
72
|
+
*
|
|
73
|
+
* @slot - Label content.
|
|
74
|
+
* @csspart root - The radio container.
|
|
75
|
+
* @csspart indicator - The selected state indicator.
|
|
76
|
+
* @cssprop --radio-size - Size of the radio button.
|
|
77
|
+
*/
|
|
78
|
+
export class DuiRadio extends LitElement {
|
|
79
|
+
static { this.tagName = "dui-radio"; }
|
|
80
|
+
static { this.styles = [base, styles]; }
|
|
81
|
+
#value_accessor_storage = "";
|
|
82
|
+
/** The value attribute for this radio option. */
|
|
83
|
+
get value() { return this.#value_accessor_storage; }
|
|
84
|
+
set value(value) { this.#value_accessor_storage = value; }
|
|
85
|
+
#disabled_accessor_storage = false;
|
|
86
|
+
/** Whether the radio is disabled. */
|
|
87
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
88
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
89
|
+
#readOnly_accessor_storage = false;
|
|
90
|
+
/** Whether the radio is read-only. */
|
|
91
|
+
get readOnly() { return this.#readOnly_accessor_storage; }
|
|
92
|
+
set readOnly(value) { this.#readOnly_accessor_storage = value; }
|
|
93
|
+
#groupCtx = new ContextConsumer(this, {
|
|
94
|
+
context: radioGroupContext,
|
|
95
|
+
subscribe: true,
|
|
96
|
+
});
|
|
97
|
+
#fieldCtx_accessor_storage;
|
|
98
|
+
get #fieldCtx() { return this.#fieldCtx_accessor_storage; }
|
|
99
|
+
set #fieldCtx(value) { this.#fieldCtx_accessor_storage = value; }
|
|
100
|
+
get #isChecked() {
|
|
101
|
+
return this.#groupCtx.value?.value === this.value;
|
|
102
|
+
}
|
|
103
|
+
get #isDisabled() {
|
|
104
|
+
return (this.disabled ||
|
|
105
|
+
(this.#groupCtx.value?.disabled ?? false) ||
|
|
106
|
+
(this.#fieldCtx?.disabled ?? false));
|
|
107
|
+
}
|
|
108
|
+
get #isReadOnly() {
|
|
109
|
+
return this.readOnly || (this.#groupCtx.value?.readOnly ?? false);
|
|
110
|
+
}
|
|
111
|
+
get #isRequired() {
|
|
112
|
+
return this.#groupCtx.value?.required ?? false;
|
|
113
|
+
}
|
|
114
|
+
get #isInvalid() {
|
|
115
|
+
return this.#fieldCtx?.invalid ?? false;
|
|
116
|
+
}
|
|
117
|
+
connectedCallback() {
|
|
118
|
+
super.connectedCallback();
|
|
119
|
+
this.addEventListener("click", this.#handleHostClick);
|
|
120
|
+
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
super.disconnectedCallback();
|
|
123
|
+
this.removeEventListener("click", this.#handleHostClick);
|
|
124
|
+
}
|
|
125
|
+
#handleHostClick = (e) => {
|
|
126
|
+
if (e.target.closest("[part='root']"))
|
|
127
|
+
return;
|
|
128
|
+
this.#handleClick(e);
|
|
129
|
+
};
|
|
130
|
+
#handleClick = (_e) => {
|
|
131
|
+
if (this.#isDisabled || this.#isReadOnly)
|
|
132
|
+
return;
|
|
133
|
+
const ctx = this.#groupCtx.value;
|
|
134
|
+
if (ctx) {
|
|
135
|
+
ctx.select(this.value);
|
|
136
|
+
this.#fieldCtx?.markDirty();
|
|
137
|
+
this.#fieldCtx?.markTouched();
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
#handleKeyDown = (e) => {
|
|
141
|
+
if (e.key === " ") {
|
|
142
|
+
e.preventDefault();
|
|
143
|
+
this.#handleClick(e);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
render() {
|
|
147
|
+
const isChecked = this.#isChecked;
|
|
148
|
+
const isDisabled = this.#isDisabled;
|
|
149
|
+
const isReadOnly = this.#isReadOnly;
|
|
150
|
+
const isRequired = this.#isRequired;
|
|
151
|
+
const isInvalid = this.#isInvalid;
|
|
152
|
+
const controlId = this.#fieldCtx?.controlId ?? "";
|
|
153
|
+
return html `
|
|
154
|
+
<span
|
|
155
|
+
part="root"
|
|
156
|
+
role="radio"
|
|
157
|
+
id="${controlId || nothing}"
|
|
158
|
+
aria-checked="${String(isChecked)}"
|
|
159
|
+
aria-disabled="${isDisabled ? "true" : nothing}"
|
|
160
|
+
aria-readonly="${isReadOnly ? "true" : nothing}"
|
|
161
|
+
aria-required="${isRequired ? "true" : nothing}"
|
|
162
|
+
aria-invalid="${isInvalid ? "true" : nothing}"
|
|
163
|
+
tabindex="${isDisabled ? nothing : "0"}"
|
|
164
|
+
?data-checked="${isChecked}"
|
|
165
|
+
?data-unchecked="${!isChecked}"
|
|
166
|
+
?data-disabled="${isDisabled}"
|
|
167
|
+
?data-readonly="${isReadOnly}"
|
|
168
|
+
?data-required="${isRequired}"
|
|
169
|
+
?data-invalid="${isInvalid}"
|
|
170
|
+
@click="${this.#handleClick}"
|
|
171
|
+
@keydown="${this.#handleKeyDown}"
|
|
172
|
+
>
|
|
173
|
+
<span
|
|
174
|
+
part="indicator"
|
|
175
|
+
?data-checked="${isChecked}"
|
|
176
|
+
?data-unchecked="${!isChecked}"
|
|
177
|
+
>
|
|
178
|
+
${isChecked ? html `<span part="dot"></span>` : nothing}
|
|
179
|
+
</span>
|
|
180
|
+
<input
|
|
181
|
+
type="radio"
|
|
182
|
+
name="${this.#groupCtx.value?.name ?? nothing}"
|
|
183
|
+
value="${this.value}"
|
|
184
|
+
.checked="${isChecked}"
|
|
185
|
+
?disabled="${isDisabled}"
|
|
186
|
+
?required="${isRequired}"
|
|
187
|
+
class="hidden-input"
|
|
188
|
+
aria-hidden="true"
|
|
189
|
+
tabindex="-1"
|
|
190
|
+
/>
|
|
191
|
+
</span>
|
|
192
|
+
<slot></slot>
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
__decorate([
|
|
197
|
+
property()
|
|
198
|
+
], DuiRadio.prototype, "value", null);
|
|
199
|
+
__decorate([
|
|
200
|
+
property({ type: Boolean, reflect: true })
|
|
201
|
+
], DuiRadio.prototype, "disabled", null);
|
|
202
|
+
__decorate([
|
|
203
|
+
property({ type: Boolean, reflect: true, attribute: "read-only" })
|
|
204
|
+
], DuiRadio.prototype, "readOnly", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DuiRadio } from "./radio.js";
|
|
2
|
+
import { DuiRadioGroup } from "./radio-group.js";
|
|
3
|
+
if (!customElements.get(DuiRadio.tagName)) {
|
|
4
|
+
customElements.define(DuiRadio.tagName, DuiRadio);
|
|
5
|
+
}
|
|
6
|
+
if (!customElements.get(DuiRadioGroup.tagName)) {
|
|
7
|
+
customElements.define(DuiRadioGroup.tagName, DuiRadioGroup);
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DuiScrollArea } from "./scroll-area.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DuiScrollArea } from "./scroll-area.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/scroll-area */
|
|
2
|
+
import { LitElement, type PropertyValues, type TemplateResult } from "lit";
|
|
3
|
+
type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
|
|
4
|
+
/**
|
|
5
|
+
* `<dui-scroll-area>` — A scroll container with custom styled scrollbar.
|
|
6
|
+
*
|
|
7
|
+
* Hides the native scrollbar and renders a custom track + thumb with
|
|
8
|
+
* auto-hide behavior. Supports vertical, horizontal, or both orientations.
|
|
9
|
+
*
|
|
10
|
+
* @slot - Default slot for scrollable content.
|
|
11
|
+
*
|
|
12
|
+
* @cssprop [--scroll-area-max-height] - Max-height constraint.
|
|
13
|
+
* @cssprop [--scroll-area-thumb-color] - Scrollbar thumb color.
|
|
14
|
+
* @cssprop [--scroll-fade-color] - Fade overlay color.
|
|
15
|
+
*/
|
|
16
|
+
export declare class DuiScrollArea extends LitElement {
|
|
17
|
+
#private;
|
|
18
|
+
static tagName: "dui-scroll-area";
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
20
|
+
/** Scroll direction(s). */
|
|
21
|
+
accessor orientation: ScrollAreaOrientation;
|
|
22
|
+
/** Show a fade overlay at the top when scrolled. */
|
|
23
|
+
accessor fade: boolean;
|
|
24
|
+
/** Optional max-height constraint (CSS value). */
|
|
25
|
+
accessor maxHeight: string | undefined;
|
|
26
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
disconnectedCallback(): void;
|
|
29
|
+
protected firstUpdated(): void;
|
|
30
|
+
/** Scroll the viewport to the bottom. */
|
|
31
|
+
scrollToBottom(): Promise<void>;
|
|
32
|
+
/** Whether the viewport is scrolled to the top. */
|
|
33
|
+
get isAtTop(): boolean;
|
|
34
|
+
/** Whether the viewport is scrolled to the bottom. */
|
|
35
|
+
get isAtBottom(): boolean;
|
|
36
|
+
render(): TemplateResult;
|
|
37
|
+
}
|
|
38
|
+
export {};
|